order-list.vue 28 KB

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