order-list.vue 28 KB

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