order-list.vue 26 KB

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