order-list.vue 28 KB

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