order-list.vue 26 KB

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