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 ? 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('/seller/pages/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(id) {//订单详情跳转
  372. this.isModalLayer = true;
  373. this.$api.navigateTo(`/seller/pages/order/order-details?listType=${this.currentTab}&orderID=${id}`)
  374. },
  375. handButtonConfirm(data) {//获取点击
  376. this.handShowAlert(data)
  377. this.btnoRderID = data.orderId
  378. },
  379. handShowAlert(data) {//执行
  380. switch(data.type){
  381. case 'delete':
  382. this.handOrderDetele(data.orderId);
  383. break
  384. case 'cancel':
  385. this.handCenceConfirm(data.orderId)
  386. break
  387. case 'confirm':
  388. this.handOrderConfirm(data.orderId);
  389. break
  390. case 'again':
  391. this.handOrderAgain(data.orderId);
  392. break
  393. }
  394. },
  395. handOrderAgain(id){
  396. this.aganOrderID = id;
  397. this.SellerService.SellerCreateOrderAgain({orderId:this.aganOrderID,userId:this.userID,confirmFlag:0}).then(res =>{
  398. if(res.code==0){
  399. this.$api.setStorage('orderUserInfo',{clubID:res.data.clubId,againBuyProductIds:res.data.againBuyProductIds,userID:res.data.userId})
  400. this.$api.navigateTo('/seller/pages/cart/cart');
  401. }
  402. }).catch(error =>{
  403. if(error.code== -3){
  404. this.showAgan = true;
  405. this.promptitle = error.msg;
  406. this.failList = error.data;
  407. }else if(error.code== -2){
  408. this.$util.modal('',error.msg,'确定','',false,() =>{})
  409. }else{
  410. this.$util.msg(error.msg,2000)
  411. }
  412. })
  413. },
  414. handOrderConfirm (id){//确认订单
  415. this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
  416. this.OrderService.AffirmOrder({orderID:id}).then(response =>{
  417. this.$util.msg(response.msg,2000,true,'success');
  418. setTimeout(() => {
  419. this.getOrderDatainit(this.currentTab)
  420. },2000)
  421. }).catch(error =>{
  422. this.$util.msg(error.msg,2000)
  423. })
  424. })
  425. },
  426. handOrderDetele(id){//删除订单
  427. this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
  428. this.OrderService.DeleteOrder({orderID:id}).then(response =>{
  429. this.$util.msg(response.msg,2000,true,'success');
  430. setTimeout(() => {
  431. this.getOrderDatainit(this.currentTab)
  432. },2000)
  433. }).catch(error =>{
  434. this.$util.msg(error.msg,2000)
  435. })
  436. })
  437. },
  438. handCenceConfirm(id){//取消订单
  439. this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
  440. this.OrderService.CancelOrder({orderID:id}).then(response =>{
  441. this.$util.msg(response.msg,2000,true,'success');
  442. setTimeout(() => {
  443. this.getOrderDatainit(this.currentTab)
  444. },2000)
  445. }).catch(error =>{
  446. this.$util.msg(error.msg,2000)
  447. })
  448. })
  449. },
  450. handlSearchPath(){
  451. this.$api.navigateTo('/seller/pages/search/search-order')
  452. },
  453. onShareAppMessage (res){//分享转发
  454. this.isShareModal = false
  455. if (res.from === 'button') {// 来自页面内转发按钮
  456. // console.log(res.target)
  457. }
  458. return {
  459. title: '您有新的订单,请点击查看~',
  460. path: `/pages/user/order/order-sharelogin?orderID=${this.btnoRderID}&userID=${this.btnClubUserID}&serviceProviderId=${this.serviceProviderId}`,
  461. imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
  462. }
  463. },
  464. PromotionsFormat(promo){//促销活动类型数据处理
  465. if(promo!=null){
  466. if(promo.type == 1 && promo.mode == 1){
  467. return true
  468. }else{
  469. return false
  470. }
  471. }
  472. return false
  473. },
  474. //订单状态文字和颜色
  475. StateExpFormat (state){
  476. let stateText = '',
  477. stateTextObject={
  478. 0:'待确认',
  479. 4:'交易完成',
  480. 5:'订单完成',
  481. 6:'已关闭',
  482. 7:'交易全退',
  483. 77:'交易全退',
  484. 11:'待付款待发货',
  485. 12:'待付款部分发货',
  486. 13:'待付款已发货',
  487. 21:'部分付款待发货',
  488. 22:'部分付款部分发货',
  489. 23:'部分付款已发货',
  490. 31:'已付款待发货',
  491. 32:'已付款部分发货',
  492. 33:'已付款已发货',
  493. 111:'待付款待发货',
  494. }
  495. Object.keys(stateTextObject).forEach(key => {
  496. if(key == state){
  497. stateText = stateTextObject[key]
  498. }
  499. })
  500. return stateText;
  501. },
  502. orderPriceToFixed (n){
  503. let price ='';
  504. price = n.toFixed(2);
  505. return price
  506. },
  507. getHeaderTopHeight (){ // 状态栏高度
  508. let statusBarHeight = this.systeminfo.statusBarHeight
  509. let headerPosi = this.headerBtnPosi
  510. let btnPosi = { // 胶囊实际位置,坐标信息不是左上角原点
  511. height: headerPosi.height,
  512. width: headerPosi.width,
  513. // 胶囊top - 状态栏高度
  514. top: headerPosi.top - statusBarHeight,
  515. // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
  516. bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
  517. // 屏幕宽度 - 胶囊right
  518. right: this.systeminfo.screenWidth - headerPosi.right
  519. }
  520. this.navbarHeight= headerPosi.bottom + btnPosi.bottom// 原胶囊bottom + 现胶囊bottom
  521. },
  522. setHeaderBtnPosi (){
  523. // 获得胶囊按钮位置信息
  524. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  525. return headerBtnPosi
  526. },
  527. setSysteminfo (){
  528. let systeminfo;
  529. uni.getSystemInfo({ // 获取设备信息
  530. success: (res) => {
  531. systeminfo = res
  532. },
  533. })
  534. return systeminfo
  535. }
  536. },
  537. onPageScroll(e) {
  538. this.scrollTop = e.scrollTop;
  539. },
  540. onShow() {
  541. this.isModalLayer = false;
  542. this.getOrderDatainit(this.currentTab)
  543. }
  544. }
  545. </script>
  546. <style lang="scss">
  547. page{
  548. background-color: #FFFFFF;
  549. }
  550. /*tabbar start*/
  551. ::-webkit-scrollbar {
  552. width: 0;
  553. height: 0;
  554. color: transparent;
  555. }
  556. .order-section-top{
  557. width: 100%;
  558. position: fixed;
  559. top: 0;
  560. left: 0;
  561. z-index: 99;
  562. background: #FFFFFF;
  563. .tab-screen{
  564. height: 60rpx;
  565. width: 702rpx;
  566. padding: 10rpx 24rpx;
  567. border-top: 1px solid #F7F7F7;
  568. border-bottom: 1px solid #F7F7F7;
  569. display: flex;
  570. justify-content: center;
  571. justify-items: center;
  572. .tab-screen-item{
  573. flex: 1;
  574. height: 60rpx;
  575. border-radius: 10rpx;
  576. background: #F7F7F7;
  577. margin-right: 22rpx;
  578. line-height: 66rpx;
  579. font-size: $font-size-28;
  580. color: #333333;
  581. text-align: center;
  582. &.active{
  583. color: $color-system;
  584. }
  585. &:last-child{
  586. margin-right: 0;
  587. }
  588. }
  589. }
  590. }
  591. .tab-view::before {
  592. content: '';
  593. position: absolute;
  594. border-bottom: 1rpx solid #eaeef1;
  595. -webkit-transform: scaleY(0.5);
  596. transform: scaleY(0.5);
  597. bottom: 0;
  598. right: 0;
  599. left: 0;
  600. }
  601. .tab-view {
  602. width: 100%;
  603. height: 80rpx;
  604. overflow: hidden;
  605. box-sizing: border-box;
  606. background: #fff;
  607. white-space: nowrap;
  608. border-top: 1px solid #F7F7F7;
  609. }
  610. .tab-bar-item {
  611. padding: 0;
  612. height: 80rpx;
  613. min-width: 80rpx;
  614. line-height: 80rpx;
  615. margin: 0 28rpx;
  616. display: inline-block;
  617. text-align: center;
  618. box-sizing: border-box;
  619. &.active {
  620. border-bottom: 6rpx solid $color-system;
  621. }
  622. .tab-bar-title {
  623. height: 80rpx;
  624. line-height: 80rpx;
  625. font-size:$font-size-28;
  626. color: $text-color;
  627. }
  628. &.active .tab-bar-title {
  629. color: $color-system !important;
  630. }
  631. }
  632. .container {
  633. padding-bottom: env(safe-area-inset-bottom);
  634. height: auto;
  635. position: relative;
  636. }
  637. .tui-order-content{
  638. width: 100%;
  639. height: auto;
  640. }
  641. .tui-order-list {
  642. width: 100%;
  643. position: relative;
  644. }
  645. .tui-order-item {
  646. display: flex;
  647. flex-direction: column;
  648. width: 702rpx;
  649. padding:20rpx 24rpx 0 24rpx;
  650. background: #fff;
  651. border-bottom: 20rpx solid #F7F7F7;
  652. }
  653. .order-title{
  654. width: 100%;
  655. height: auto;
  656. .order-title-name{
  657. width: 100%;
  658. height: 72rpx;
  659. border-bottom: 1px solid #F7F7F7;
  660. line-height: 72rpx;
  661. text-align: left;
  662. font-size: $font-size-28;
  663. color: #333333;
  664. }
  665. .order-title-t{
  666. width: 100%;
  667. height: 68rpx;
  668. float: left;
  669. line-height: 68rpx;
  670. position: relative;
  671. .bage-icon{
  672. width: 50rpx;
  673. height: 50rpx;
  674. display: block;
  675. position: absolute;
  676. right: 0;
  677. top: 9rpx;
  678. }
  679. .bage-buss{
  680. display: inline-block;
  681. width: 72rpx;
  682. height: 30rpx;
  683. background:radial-gradient(circle,rgba(255,39,180,1) 0%,rgba(193,77,245,1) 100%);
  684. border-radius: 4rpx;
  685. line-height: 30rpx;
  686. font-size: $font-size-22;
  687. text-align: center;
  688. color: #FFFFFF;
  689. }
  690. .bage-auto{
  691. display: inline-block;
  692. width: 72rpx;
  693. height: 30rpx;
  694. background:radial-gradient(circle,rgba(255,180,39,1) 0%,rgba(245,142,77,1) 100%);
  695. border-radius: 4rpx;
  696. line-height: 30rpx;
  697. font-size: $font-size-22;
  698. text-align: center;
  699. color: #FFFFFF;
  700. }
  701. .Rebate{
  702. display: inline-block;
  703. width: 72rpx;
  704. height: 32rpx;
  705. background:#ff7a51;
  706. border-radius: 6rpx;
  707. line-height: 32rpx;
  708. text-align: center;
  709. color: #FFFFFF;
  710. margin-top: 10rpx;
  711. font-size: $font-size-22;
  712. margin-right: 20rpx;
  713. }
  714. .bage-text{
  715. display: inline-block;
  716. font-size: $font-size-28;
  717. line-height: 68rpx;
  718. text-align: left;
  719. color: $text-color;
  720. margin-left: 10rpx;
  721. }
  722. }
  723. .order-title-b{
  724. width: 100%;
  725. height: 40rpx;
  726. float: left;
  727. margin-top: 8rpx;
  728. .order-title-btxt{
  729. float: left;
  730. font-size: $font-size-28;
  731. line-height: 40rpx;
  732. color: #999999;
  733. text-align: lef
  734. }
  735. .order-title-tip{
  736. float: right;
  737. font-size: $font-size-28;
  738. line-height: 40rpx;
  739. text-align: right;
  740. color: #FF2A2A;
  741. }
  742. }
  743. }
  744. .goods-title{
  745. width: 100%;
  746. height: 56rpx;
  747. float: left;
  748. margin-top:10rpx;
  749. .floor-item-act{
  750. height: 56rpx;
  751. text-align: center;
  752. box-sizing: border-box;
  753. float: left;
  754. padding: 10rpx 0;
  755. margin-right: 12rpx;
  756. .floor-tags{
  757. height: 28rpx;
  758. border-radius: 6rpx;
  759. background-color: #FFFFFF;
  760. line-height: 28rpx;
  761. color: $color-system;
  762. text-align: center;
  763. display: inline-block;
  764. padding:0 16rpx;
  765. font-size: $font-size-20;
  766. border: 1px solid #E15616;
  767. float: left;
  768. }
  769. }
  770. .title-text{
  771. width: 400rpx;
  772. overflow: hidden;
  773. text-overflow:ellipsis;
  774. white-space: nowrap;
  775. float: left;
  776. font-size: $font-size-28;
  777. color: $text-color;
  778. text-align: left;
  779. line-height: 56rpx;
  780. font-weight: bold;
  781. }
  782. }
  783. .goods-item{
  784. width: 100%;
  785. height: auto;
  786. }
  787. .goods-pros-t{
  788. width: 100%;
  789. height: auto;
  790. padding:24rpx 0;
  791. .pros-img{
  792. float: left;
  793. width: 210rpx;
  794. height: 100%;
  795. border-radius: 10rpx;
  796. margin:0 26rpx 0 0;
  797. position: relative;
  798. .tips{
  799. display: inline-block;
  800. width: 80rpx;
  801. height: 40rpx;
  802. background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
  803. line-height: 40rpx;
  804. text-align: center;
  805. font-size: $font-size-24;
  806. color: #FFFFFF;
  807. border-radius:10rpx 0 10rpx 0 ;
  808. position: absolute;
  809. top:0;
  810. left: 0;
  811. }
  812. image{
  813. width: 210rpx;
  814. height: 210rpx;
  815. border-radius: 10rpx;
  816. border:1px solid #f3f3f3;
  817. }
  818. }
  819. }
  820. .pros-product{
  821. width: 460rpx;
  822. height: 100%;
  823. line-height: 36rpx;
  824. font-size: $font-size-26;
  825. position: relative;
  826. float: left;
  827. .producttitle{
  828. width: 100%;
  829. display: inline-block;
  830. height: auto;
  831. text-overflow:ellipsis;
  832. display: -webkit-box;
  833. word-break: break-all;
  834. -webkit-box-orient: vertical;
  835. -webkit-line-clamp: 2;
  836. overflow: hidden;
  837. margin-bottom: 8rpx;
  838. }
  839. .productspec{
  840. height: 36rpx;
  841. color: #999999;
  842. }
  843. .productprice{
  844. height: 48rpx;
  845. width: 100%;
  846. float: left;
  847. .price{
  848. line-height: 48rpx;
  849. font-size: $font-size-28;
  850. width: 48%;
  851. color: #FF2A2A;
  852. float: left;
  853. font-weight: bold;
  854. }
  855. .count{
  856. height: 100%;
  857. float: right;
  858. position: relative;
  859. .small{
  860. color: #666666;
  861. }
  862. }
  863. }
  864. .floor-item-act{
  865. width: 100%;
  866. height: 56rpx;
  867. text-align: center;
  868. box-sizing: border-box;
  869. float: left;
  870. padding:0 0 10rpx 0;
  871. .floor-tags{
  872. height: 28rpx;
  873. border-radius: 6rpx;
  874. background-color: #FFFFFF;
  875. line-height: 28rpx;
  876. color: $color-system;
  877. text-align: center;
  878. display: inline-block;
  879. padding:0 16rpx;
  880. font-size: $font-size-20;
  881. border: 1px solid #E15616;
  882. float: left;
  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>