order-list.vue 28 KB

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