order-list.vue 26 KB

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