order-list-retail.vue 27 KB

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