order-list.vue 26 KB

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