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