order-list.vue 27 KB

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