order-list.vue 26 KB

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