1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237 |
- <template>
- <view class="container" :style="{ paddingTop: navbarHeight + 82 + 'px' }">
- <!-- 自定义返回 -->
- <header-back
- :systeminfo="systeminfo"
- :navbar-data="nvabarData"
- :headerBtnPosi="headerBtnPosi"
- :isDelete="isDelete"
- :isUsertype="1"
- :screenTab="screenTab"
- @goSearchPath="handlSearchPath"
- >
- </header-back>
- <view class="order-section-top" :style="{ marginTop: navbarHeight + 'px' }">
- <scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
- <view
- v-for="(item, index) in orderTabBar"
- :key="index"
- class="tab-bar-item"
- :class="[currentTab == index ? 'active' : '']"
- :data-current="index"
- @tap.stop="onClickTab"
- >
- <text class="tab-bar-title">{{ item.text }}</text>
- </view>
- </scroll-view>
- <scroll-view scroll-x scroll-with-animation class="tab-screen" :scroll-left="scrollLeft">
- <view
- v-for="(item, index) in screenTabBar"
- :key="index"
- class="tab-screen-item"
- :class="[screenTab == index ? 'active' : '']"
- :data-current="index"
- @tap.stop="onClickScreenTab(index)"
- >{{ item.text }}</view
- >
- <view
- class="tab-screen-item"
- v-if="isManage"
- :data-current="3"
- :class="[screenTab == 3 ? 'active' : '']"
- @tap.stop="onClickScreenTab(3)"
- >组员订单</view
- >
- </scroll-view>
- </view>
- <swiper
- class="tab-content"
- :current="currentTab"
- duration="80"
- @animationfinish="onChange"
- :style="{ height: winHeight + 'px' }"
- >
- <swiper-item v-for="(tabItem, index) in orderTabBar" :key="index">
- <tui-skeleton
- v-if="skeletonShow"
- backgroundColor="#fafafa"
- borderRadius="10rpx"
- :isLoading="false"
- :loadingType="5"
- ></tui-skeleton>
- <scroll-view
- scroll-y
- class="scoll-y tui-skeleton"
- @scrolltolower="scrolltolower"
- :style="{ height: winHeight + 'px' }"
- >
- <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
- <!-- 空白页 -->
- <empty
- v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
- :typeIndex="currentTab"
- :navbarHeight="navbarHeight"
- ></empty>
- <!-- 列表 -->
- <view v-else class="tui-order-content">
- <view
- class="tui-order-item"
- v-for="(order, orderIndex) in tabItem.orderList"
- :key="orderIndex"
- @click.stop="detail(order)"
- >
- <view class="order-title">
- <view class="order-title-name">
- <text>{{ order.clubName ? order.clubName : '' }}</text>
- <text class="tags" v-if="order.svipUserFlag == 0 && order.userIdentity === 2"
- >VIP</text
- >
- <text class="tags sv" v-if="order.svipUserFlag == 1">SVIP</text>
- <view class="name" v-if="screenTab === 3">【 {{ order.serviceName ? order.serviceName : '' }} 】</view>
- </view>
- <view class="order-title-t">
- <view class="Rebate " v-if="order.rebateFlag == 1">返佣</view>
- <text
- class="bage-buss tui-skeleton-fillet"
- v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
- >
- 协销
- </text>
- <text
- class="bage-auto tui-skeleton-fillet"
- v-if="
- order.orderSubmitType == 0 ||
- order.orderSubmitType == 1 ||
- order.orderSubmitType == 2
- "
- >
- 自主
- </text>
- <text class="bage-text tui-skeleton-fillet">
- 订单编号:{{ order.orderNo }}({{ order.orderId }})
- </text>
- <image
- class="bage-icon"
- src="https://static.caimei365.com/app/img/icon/icon-type@3x.png"
- mode="widthFix"
- v-if="order.secondHandOrderFlag == 1"
- >
- </image>
- </view>
- <view class="order-title-b">
- <view class="order-title-btxt tui-skeleton-fillet">
- 下单时间:{{ order.orderTime }}
- </view>
- <view class="order-title-tip tui-skeleton-fillet">
- {{ StateExpFormat(order.status) }}
- </view>
- </view>
- </view>
- <block v-for="(shop, index) in order.shopOrderList" :key="index">
- <view class="goods-title">
- <view v-if="shop.shopPromotion" class="floor-item-act">
- <view class="floor-tags">{{ shop.shopPromotion.name }}</view>
- </view>
- <view class="title-text tui-skeleton-fillet">{{ shop.shopName }}</view>
- </view>
- <view
- class="goods-item"
- v-for="(pros, prosIndex) in shop.orderProductList"
- :key="prosIndex"
- >
- <view class="goods-pros-t">
- <view class="pros-img tui-skeleton-fillet">
- <image :src="pros.image" alt="" />
- <text class="tips" v-if="pros.productType == 2 || pros.productType == 1"
- >赠品</text
- >
- </view>
- <view class="pros-product clearfix">
- <view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
- <view
- class="productspec tui-skeleton-fillet"
- v-if="pros.productCategory != 2"
- >
- 规格:{{ pros.productUnit ? pros.productUnit : '' }}
- </view>
- <view class="productprice">
- <view
- class="price tui-skeleton-fillet"
- :class="
- pros.svipPriceFlag == 1 ||
- PromotionsFormat(pros.productPromotion)
- ? 'none'
- : ''
- "
- >
- <text>¥{{ pros.price | NumFormat }}</text>
- </view>
- <view class="count tui-skeleton-fillet">
- <text class="small">x</text>{{ pros.num }}
- </view>
- </view>
- <view class="floor-item-act">
- <template v-if="pros.productPromotion">
- <view
- v-if="PromotionsFormat(pros.productPromotion)"
- class="floor-tags"
- @click.stop="clickPopupShow(pros.productPromotion)"
- >
- {{ pros.productPromotion.name }}
- <text
- v-if="
- pros.productPromotion != null &&
- pros.productPromotion.type != 3
- "
- >
- :¥{{
- pros.productPromotion == null
- ? '0.00'
- : pros.productPromotion.touchPrice | NumFormat
- }}
- </text>
- </view>
- <view
- v-else-if="pros.productPromotion.type != 3"
- class="floor-tags"
- @click.stop="clickPopupShow(pros.productPromotion)"
- >{{ pros.productPromotion.name }}</view
- >
- </template>
- <template v-if="pros.svipPriceFlag == 1">
- <view class="svip-tags">
- <view class="tags">SVIP</view>
- <view class="price">{{ pros.svipPriceTag }}</view>
- </view>
- </template>
- </view>
- </view>
- </view>
- </view>
- </block>
- <view class="order-footer">
- <view class="order-footer-top" v-if="order.discountFee != 0"
- >经理折扣:¥{{ order.discountFee | NumFormat }}</view
- >
- <view class="order-footer-bot">
- <view class="count tui-skeleton-fillet">共{{ order.productCount }}件商品</view>
- <view
- class="money tui-skeleton-fillet"
- v-if="order.status == 31 || order.status == 32 || order.status == 33"
- >
- 已支付:<label style="color:#f94b4b ;"
- >¥{{ order.receiptAmount | NumFormat }}</label
- >
- </view>
- <view class="money tui-skeleton-fillet" v-else
- >待付总额:<label style="color:#f94b4b ;">
- ¥{{ order.pendingPayments | NumFormat }}</label
- >
- </view>
- </view>
- </view>
- <!-- 底部button -->
- <order-button
- ref="orderButton"
- v-if="screenTab != 3"
- :status="order.status"
- :order="order"
- :orderId="order.orderId"
- :rechargeGoods="order.rechargeGoods"
- :userId="order.userId"
- :secondHandOrderFlag="order.secondHandOrderFlag"
- @buttonConfirm="handButtonConfirm"
- >
- </order-button>
- </view>
- <!--加载loadding-->
- <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
- <tui-nomore
- :visible="!pullUpOn"
- :backgroundColor="'#ffffff'"
- :text="nomoreText"
- ></tui-nomore>
- <!--加载loadding-->
- </view>
- </view>
- </scroll-view>
- </swiper-item>
- </swiper>
- <!-- 分享弹窗 -->
- <share-alert
- v-if="isShareModal"
- :orderId="btnoRderID"
- :shareType="isShareType"
- @shareConfirm="onShareAppMessage"
- >
- </share-alert>
- <!-- 透明模态层 -->
- <modal-layer v-if="isModalLayer"></modal-layer>
- <view class="aganBj" v-show="showAgan">
- <view class="alertAgan">
- <text class="title">{{ promptitle }}</text>
- <view class="goods">
- <view class="list" v-for="(item, index) in failList" :key="index">
- <image class="image-left" :src="item.image"></image>
- <view class="name-right">{{ item.name }}</view>
- </view>
- </view>
- <view class="BtnAll">
- <view class="closebtn btn" @click="closeBtn">取消</view>
- <view class="cancel btn" @click="cancelBtn">确定</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { mapState, mapMutations } from 'vuex'
- import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义顶部导航
- import btSearch from '@/components/uni-search/bt-search.vue' //搜索
- import orderButton from './components/sellerOrderButton' //操作按钮
- import modalLayer from '@/components/modal-layer'
- import empty from './components/empty'
- import shareAlert from './components/sellerShareAlert.vue' //分享弹窗
- export default {
- components: {
- headerBack,
- empty,
- btSearch,
- orderButton,
- modalLayer,
- shareAlert
- },
- data() {
- return {
- orderTabBar: [
- { listType: 0, text: '全部订单', orderList: [] },
- { listType: 1, text: '待确认', orderList: [] },
- { listType: 2, text: '待付款', orderList: [] },
- { listType: 3, text: '待发货', orderList: [] },
- { listType: 4, text: '已发货', orderList: [] },
- { listType: 5, text: '退货/款', orderList: [] }
- ],
- screenTabBar: [
- { type: 0, text: '全部订单(我的)' },
- { type: 1, text: '自主订单(我的)' },
- { type: 2, text: '协销订单(我的)' }
- ],
- headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
- systeminfo: this.setSysteminfo(), //获取设备信息
- nvabarData: {
- //顶部自定义导航
- showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
- showSearch: 1,
- title: ' ' // 导航栏中间的标题
- },
- CustomBar: this.CustomBar, // 顶部导航栏高度
- winHeight: '', //窗口高度
- currentTab: 0, //预设当前项的值
- screenTab: 0, //筛选预设当前项的值
- scrollLeft: 0, //tab标题的滚动条位置
- serviceProviderId: 0, //协销用户ID
- orderData: [],
- btnClubUserID: 0,
- btnoRderID: 0, //点击按钮传入的的订单ID
- pageNum: 1, //页数
- pageSize: 10, //条数
- groupServiceId: 0,
- scrollTop: 0,
- deteleType: '',
- skeletonShow: true,
- isClickChange: false,
- isShareModal: false, //控制分享弹窗
- isShareType: 2,
- isSeller: false,
- isModalLayer: false,
- loadding: false,
- pullUpOn: true,
- hasNextPage: false,
- pullFlag: true,
- navbarHeight: '',
- nomoreText: '上拉显示更多',
- showAgan: false,
- failList: [], // 再来一单可购买商品
- promptitle: '',
- aganOrderId: 0, // 再来一单商品id
- userId: 0,
- manager: 0,
- rightDrawer: false //控制筛选抽屉
- }
- },
- onLoad(option) {
- let self = this
- if (option.type === 'detele') {
- self.isDelete = true
- }
- self.currentTab = option.listType
- self.getHeaderTopHeight() //设置自定义导航高度
- // 高度自适应
- uni.getSystemInfo({
- success: function(res) {
- let calc = res.windowHeight
- self.winHeight = calc - self.CustomBar - 82
- }
- })
- },
- filters: {
- NumFormat(value) {
- //处理金额
- return Number(value).toFixed(2)
- }
- },
- computed: {
- ...mapState(['isManage'])
- },
- methods: {
- async initGetStotage() {
- const userInfo = await this.$api.getStorage()
- this.userId = userInfo.userId ? userInfo.userId : 0
- this.manager = userInfo.manager ? userInfo.manager : 0
- this.getOrderDatainit(this.currentTab)
- },
- // 滚动切换标签样式
- onChange(e) {
- let index = e.target.current || e.detail.current
- if (this.isClickChange) {
- this.currentTab = index
- this.isClickChange = false
- return
- }
- this.isClickChange = false
- this.currentTab = index
- this.checkCor()
- this.pageNum = 1
- this.pullUpOn = true //切换时隐藏
- this.loadding = false //切换时隐藏
- this.nomoreText = ''
- this.getOrderDatainit(this.currentTab, 'tabChange')
- },
- // 点击标题切换当前页时改变样式
- onClickTab(e) {
- let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
- if (this.currentTab === tabIndex) {
- return false
- } else {
- this.isClickChange = true
- this.currentTab = tabIndex
- this.pageNum = 1
- this.pullUpOn = true //切换时隐藏
- this.loadding = false //切换时隐藏
- this.getOrderDatainit(this.currentTab)
- }
- },
- onClickScreenTab(index) {
- this.screenTab = index
- this.pageNum = 1
- this.pullUpOn = true //切换时隐藏
- this.loadding = false //切换时隐藏
- this.nomoreText = ''
- this.getOrderDatainit(this.currentTab)
- },
- //判断当前滚动超过一屏时,设置tab标题滚动条。
- checkCor: function() {
- if (this.currentTab > 3) {
- //这里距离按实际计算
- this.scrollLeft = 300
- } else {
- this.scrollLeft = 0
- }
- },
- getOrderDatainit(index, source) {
- setTimeout(() => {
- this.skeletonShow = false
- }, 1500)
- let orderItem = this.orderTabBar[index]
- let listType = orderItem.listType
- if (source === 'tabChange' && orderItem.loaded === true) {
- //tab切换只有第一次需要加载数据
- return
- }
- setTimeout(() => {
- this.$api.getStorage().then(resolve => {
- this.serviceProviderId = resolve.serviceProviderId
- this.SellerService.GetSellerOrderList({
- listType: index,
- orderSubmitType: this.screenTab,
- serviceProviderId: this.serviceProviderId,
- pageNum: 1,
- pageSize: this.pageSize,
- groupServiceId: this.groupServiceId
- })
- .then(response => {
- let data = response.data
- if (data.list && data.list.length > 0) {
- let orderList = data.list.filter(item => {
- //添加不同状态下订单的表现形式
- item = Object.assign(item, this.StateExpFormat(item.listType))
- return item
- })
- orderItem.orderList = []
- orderList.forEach(item => {
- orderItem.orderList.push(item)
- })
- //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
- this.$set(orderItem, 'loaded', true)
- this.hasNextPage = data.hasNextPage
- if (this.hasNextPage) {
- this.pullUpOn = false
- this.nomoreText = '上拉显示更多'
- } else {
- if (orderItem.orderList.length < 2) {
- this.pullUpOn = true
- } else {
- this.pullUpOn = false
- this.nomoreText = '已至底部'
- }
- }
- }else{
- orderItem.orderList = []
- }
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- })
- }, 600)
- },
- getOnReachBottomData(index) {
- //上拉加载
- this.SellerService.GetSellerOrderList({
- listType: index,
- orderSubmitType: this.screenTab,
- serviceProviderId: this.serviceProviderId,
- pageNum: (this.pageNum += 1),
- pageSize: this.pageSize,
- groupServiceId: this.groupServiceId
- })
- .then(response => {
- let orderItem = this.orderTabBar[index]
- let data = response.data
- this.hasNextPage = data.hasNextPage
- orderItem.orderList = orderItem.orderList.concat(data.list)
- this.pullFlag = false // 防上拉暴滑
- setTimeout(() => {
- this.pullFlag = true
- }, 500)
- if (this.hasNextPage) {
- this.pullUpOn = false
- this.nomoreText = '上拉显示更多'
- } else {
- this.loadding = false
- this.pullUpOn = false
- this.nomoreText = '已至底部'
- }
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- scrolltolower() {
- if (this.hasNextPage) {
- this.loadding = true
- this.pullUpOn = true
- this.getOnReachBottomData(this.currentTab)
- }
- },
- detail(order) {
- //订单详情跳转
- this.isModalLayer = true
- if(this.screenTab === 3){
- this.$api.navigateTo(
- `/pages/seller/order/order-club-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${
- order.userId
- }`
- )
- }else{
- this.$api.navigateTo(
- `/pages/seller/order/order-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${
- order.userId
- }`
- )
- }
- },
- handButtonConfirm(data) {
- //获取点击
- this.handShowAlert(data)
- this.btnoRderID = data.orderId
- },
- handShowAlert(data) {
- //执行
- console.log(data)
- switch (data.type) {
- case 'query':
- this.isModalLayer = true
- this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
- break
- case 'delete':
- this.handOrderDetele(data.orderId)
- break
- case 'cancel':
- this.handCenceConfirm(data.orderId)
- break
- case 'confirm':
- this.handOrderConfirm(data.orderId)
- break
- case 'again':
- this.handOrderAgain(data.orderId)
- break
- }
- },
- handOrderAgain(orderId) {
- this.aganOrderId = orderId
- this.SellerService.SellerCreateOrderAgain({
- confirmFlag: 0,
- orderId: this.aganOrderId,
- serviceProviderId: this.serviceProviderId
- })
- .then(res => {
- if (res.code == 0) {
- this.$api.setStorage('orderUserInfo', {
- clubId: res.data.clubId,
- againBuyProductIds: res.data.productIds,
- userId: res.data.userId
- })
- this.$api.navigateTo('/pages/seller/cart/cart')
- }
- })
- .catch(error => {
- if (error.code == -3) {
- this.showAgan = true
- this.promptitle = error.msg
- this.failList = error.data
- } else if (error.code == -2) {
- this.$util.modal('', error.msg, '确定', '', false, () => {})
- } else {
- this.$util.msg(error.msg, 2000)
- }
- })
- },
- closeBtn() {
- //
- this.showAgan = false
- },
- cancelBtn() {
- // 再来一单弹窗
- this.SellerService.SellerCreateOrderAgain({
- serviceProviderId: this.serviceProviderId,
- orderId: this.aganOrderId,
- confirmFlag: 1
- }).then(res => {
- if (res.code == 0) {
- this.$api.navigateTo('/pages/seller/cart/cart')
- this.showAgan = false
- }
- })
- },
- handOrderConfirm(orderId) {
- //确认订单
- this.$util.modal('提示', '确认此订单?', '确定', '取消', true, () => {
- this.OrderService.AffirmOrder({ orderId: orderId })
- .then(response => {
- this.$util.msg(response.msg, 2000, true, 'success')
- setTimeout(() => {
- this.getOrderDatainit(this.currentTab)
- }, 2000)
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- })
- },
- handOrderDetele(orderId) {
- //删除订单
- this.$util.modal('提示', '确认删除该订单吗?', '确定', '取消', true, () => {
- this.OrderService.DeleteOrder({ orderId: orderId })
- .then(response => {
- this.$util.msg(response.msg, 2000, true, 'success')
- setTimeout(() => {
- this.getOrderDatainit(this.currentTab)
- }, 2000)
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- })
- },
- handCenceConfirm(orderId) {
- //取消订单
- this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
- this.OrderService.CancelOrder({ orderId: orderId ,userIdentity : 1 })
- .then(response => {
- this.$util.msg(response.msg, 2000, true, 'success')
- setTimeout(() => {
- this.getOrderDatainit(this.currentTab)
- }, 2000)
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- })
- },
- handSearchConfirmData(data) {
- //确定筛选
- this.groupServiceId = data.serviceProviderId
- this.getOrderDatainit(this.currentTab)
- },
- handlSearchPath() {
- this.$api.navigateTo('/pages/seller/order/search-order')
- },
- onShareAppMessage(res) {
- //分享转发
- this.isShareModal = false
- if (res.from === 'button') {
- // 来自页面内转发按钮
- // console.log(res.target)
- }
- return {
- title: '您有新的订单,请点击查看~',
- path: `/pages/user/order/order-sharelogin?orderId=${this.btnoRderID}&userId=${
- this.btnClubUserID
- }&serviceProviderId=${this.serviceProviderId}`,
- imageUrl: 'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
- }
- },
- PromotionsFormat(promo) {
- //促销活动类型数据处理
- if (promo != null) {
- if (promo.type == 1 && promo.mode == 1) {
- return true
- } else {
- return false
- }
- }
- return false
- },
- //订单状态文字和颜色
- StateExpFormat(state) {
- let stateText = '',
- stateTextObject = {
- 0: '待确认',
- 4: '交易完成',
- 5: '订单完成',
- 6: '已关闭',
- 7: '交易全退',
- 77: '交易全退',
- 11: '待付款待发货',
- 12: '待付款部分发货',
- 13: '待付款已发货',
- 21: '部分付款待发货',
- 22: '部分付款部分发货',
- 23: '部分付款已发货',
- 31: '已付款待发货',
- 32: '已付款部分发货',
- 33: '已付款已发货',
- 111: '待付款待发货'
- }
- Object.keys(stateTextObject).forEach(key => {
- if (key == state) {
- stateText = stateTextObject[key]
- }
- })
- return stateText
- },
- orderPriceToFixed(n) {
- let price = ''
- price = n.toFixed(2)
- return price
- },
- getHeaderTopHeight() {
- // 状态栏高度
- let statusBarHeight = this.systeminfo.statusBarHeight
- let headerPosi = this.headerBtnPosi
- let btnPosi = {
- // 胶囊实际位置,坐标信息不是左上角原点
- height: headerPosi.height,
- width: headerPosi.width,
- // 胶囊top - 状态栏高度
- top: headerPosi.top - statusBarHeight,
- // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
- bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
- // 屏幕宽度 - 胶囊right
- right: this.systeminfo.screenWidth - headerPosi.right
- }
- this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
- },
- setHeaderBtnPosi() {
- // 获得胶囊按钮位置信息
- let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
- return headerBtnPosi
- },
- setSysteminfo() {
- let systeminfo
- uni.getSystemInfo({
- // 获取设备信息
- success: res => {
- systeminfo = res
- }
- })
- return systeminfo
- }
- },
- onPageScroll(e) {
- this.scrollTop = e.scrollTop
- },
- onShow() {
- this.isModalLayer = false
- this.initGetStotage()
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #ffffff;
- }
- /*tabbar start*/
- ::-webkit-scrollbar {
- width: 0;
- height: 0;
- color: transparent;
- }
- .order-section-top {
- width: 100%;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 99;
- background: #ffffff;
- .tab-screen {
- width: 100%;
- box-sizing: border-box;
- background: #fff;
- white-space: nowrap;
- height: 80rpx;
- padding: 10rpx 0;
- border-top: 1px solid #f7f7f7;
- border-bottom: 1px solid #f7f7f7;
- overflow: hidden;
- .tab-screen-item {
- min-width: 100rpx;
- height: 60rpx;
- border-radius: 10rpx;
- background: #f7f7f7;
- margin: 0 15rpx;
- padding: 0 15rpx;
- line-height: 60rpx;
- font-size: $font-size-28;
- color: #333333;
- text-align: center;
- display: inline-block;
- &.active {
- color: $color-system;
- }
- }
- }
- }
- .tab-view::before {
- content: '';
- position: absolute;
- border-bottom: 1rpx solid #eaeef1;
- -webkit-transform: scaleY(0.5);
- transform: scaleY(0.5);
- bottom: 0;
- right: 0;
- left: 0;
- }
- .tab-view {
- width: 100%;
- height: 80rpx;
- overflow: hidden;
- box-sizing: border-box;
- background: #fff;
- white-space: nowrap;
- border-top: 1px solid #f7f7f7;
- }
- .tab-bar-item {
- padding: 0;
- height: 80rpx;
- min-width: 80rpx;
- line-height: 80rpx;
- margin: 0 28rpx;
- display: inline-block;
- text-align: center;
- box-sizing: border-box;
- &.active {
- border-bottom: 6rpx solid $color-system;
- }
- .tab-bar-title {
- height: 80rpx;
- line-height: 80rpx;
- font-size: $font-size-28;
- color: $text-color;
- }
- &.active .tab-bar-title {
- color: $color-system !important;
- }
- }
- .container {
- padding-bottom: env(safe-area-inset-bottom);
- height: auto;
- position: relative;
- }
- .tui-order-content {
- width: 100%;
- height: auto;
- }
- .tui-order-list {
- width: 100%;
- position: relative;
- }
- .tui-order-item {
- display: flex;
- flex-direction: column;
- width: 702rpx;
- padding: 20rpx 24rpx 0 24rpx;
- background: #fff;
- border-bottom: 20rpx solid #f7f7f7;
- }
- .order-title {
- width: 100%;
- height: auto;
- .order-title-name {
- width: 100%;
- height: 72rpx;
- border-bottom: 1px solid #f7f7f7;
- line-height: 72rpx;
- text-align: left;
- font-size: $font-size-28;
- color: #333333;
- .tags {
- display: inline-block;
- width: 60rpx;
- height: 32rpx;
- border-radius: 8rpx;
- background: #f0cb72;
- font-size: $font-size-22;
- color: #4e4539;
- text-align: center;
- line-height: 32rpx;
- margin-left: 10rpx;
- &.sv {
- background: #333333;
- color: #f0cb72;
- }
- }
- .name {
- float: right;
- font-size: 26rpx;
- color: #999999;
- }
- }
- .order-title-t {
- width: 100%;
- height: 68rpx;
- float: left;
- line-height: 68rpx;
- position: relative;
- .bage-icon {
- width: 50rpx;
- height: 50rpx;
- display: block;
- position: absolute;
- right: 0;
- top: 9rpx;
- }
- .bage-buss {
- display: inline-block;
- width: 72rpx;
- height: 30rpx;
- background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
- border-radius: 4rpx;
- line-height: 30rpx;
- font-size: $font-size-22;
- text-align: center;
- color: #ffffff;
- }
- .bage-auto {
- display: inline-block;
- width: 72rpx;
- height: 30rpx;
- background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
- border-radius: 4rpx;
- line-height: 30rpx;
- font-size: $font-size-22;
- text-align: center;
- color: #ffffff;
- }
- .Rebate {
- display: inline-block;
- width: 72rpx;
- height: 32rpx;
- background: #ff7a51;
- border-radius: 6rpx;
- line-height: 32rpx;
- text-align: center;
- color: #ffffff;
- margin-top: 10rpx;
- font-size: $font-size-22;
- margin-right: 20rpx;
- }
- .bage-text {
- display: inline-block;
- font-size: $font-size-28;
- line-height: 68rpx;
- text-align: left;
- color: $text-color;
- margin-left: 10rpx;
- }
- }
- .order-title-b {
- width: 100%;
- height: 40rpx;
- float: left;
- margin-top: 8rpx;
- .order-title-btxt {
- float: left;
- font-size: $font-size-28;
- line-height: 40rpx;
- color: #999999;
- text-align: lef;
- }
- .order-title-tip {
- float: right;
- font-size: $font-size-28;
- line-height: 40rpx;
- text-align: right;
- color: #ff2a2a;
- }
- }
- }
- .goods-title {
- width: 100%;
- height: 56rpx;
- float: left;
- margin-top: 10rpx;
- .floor-item-act {
- height: 56rpx;
- text-align: center;
- box-sizing: border-box;
- float: left;
- padding: 10rpx 0;
- margin-right: 12rpx;
- }
- .title-text {
- width: 400rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- float: left;
- font-size: $font-size-28;
- color: $text-color;
- text-align: left;
- line-height: 56rpx;
- font-weight: bold;
- }
- }
- .goods-item {
- width: 100%;
- height: auto;
- }
- .goods-pros-t {
- width: 100%;
- height: auto;
- padding: 24rpx 0;
- .pros-img {
- float: left;
- width: 210rpx;
- height: 100%;
- border-radius: 10rpx;
- margin: 0 26rpx 0 0;
- position: relative;
- .tips {
- display: inline-block;
- width: 80rpx;
- height: 40rpx;
- background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
- line-height: 40rpx;
- text-align: center;
- font-size: $font-size-24;
- color: #ffffff;
- border-radius: 10rpx 0 10rpx 0;
- position: absolute;
- top: 0;
- left: 0;
- }
- image {
- width: 210rpx;
- height: 210rpx;
- border-radius: 10rpx;
- border: 1px solid #f3f3f3;
- }
- }
- }
- .pros-product {
- width: 460rpx;
- height: 100%;
- line-height: 36rpx;
- font-size: $font-size-26;
- position: relative;
- float: left;
- .producttitle {
- width: 100%;
- display: inline-block;
- height: auto;
- text-overflow: ellipsis;
- display: -webkit-box;
- word-break: break-all;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- margin-bottom: 8rpx;
- }
- .productspec {
- height: 36rpx;
- color: #999999;
- text-overflow: ellipsis;
- display: -webkit-box;
- word-break: break-all;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 1;
- overflow: hidden;
- }
- .productprice {
- height: 48rpx;
- width: 100%;
- float: left;
- .price {
- line-height: 48rpx;
- font-size: $font-size-28;
- width: 48%;
- color: #ff2a2a;
- float: left;
- font-weight: bold;
- &.none {
- text-decoration: line-through;
- color: #999999;
- }
- }
- .count {
- height: 100%;
- float: right;
- position: relative;
- .small {
- color: #666666;
- }
- }
- }
- .floor-item-act {
- width: 100%;
- height: 56rpx;
- text-align: center;
- box-sizing: border-box;
- float: left;
- padding: 0 0 10rpx 0;
- }
- }
- .order-footer {
- width: 100%;
- height: 78rpx;
- float: left;
- .order-footer-top {
- width: 100%;
- height: 34rpx;
- line-height: 34rpx;
- font-size: $font-size-24;
- color: #999999;
- text-align: right;
- }
- .order-footer-bot {
- width: 100%;
- float: left;
- height: 48rpx;
- line-height: 48rpx;
- font-size: $font-size-28;
- font-weight: bold;
- color: $text-color;
- .count {
- width: 50%;
- float: left;
- text-align: left;
- }
- .money {
- width: 50%;
- float: right;
- text-align: right;
- }
- }
- }
- .aganBj {
- position: fixed;
- left: 0;
- top: 0;
- bottom: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.5);
- z-index: 999999;
- .alertAgan {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 580rpx;
- background-color: #fff;
- border-radius: 16rpx;
- .title {
- font-size: 30rpx;
- color: #333333;
- line-height: 42rpx;
- padding: 30rpx;
- display: block;
- }
- .goods {
- padding: 0 30rpx;
- .list {
- padding: 10px 0;
- border-bottom: 1rpx solid #e1e1e1;
- margin: 10rpx 0;
- .image-left {
- width: 86rpx;
- height: 86rpx;
- border: 2rpx solid #e1e1e1;
- border-radius: 6rpx;
- display: inline-block;
- vertical-align: middle;
- }
- .name-right {
- display: inline-block;
- width: 416rpx;
- margin-left: 15rpx;
- font-size: 26rpx;
- color: #666666;
- vertical-align: middle;
- word-break: break-all;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-inline-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- }
- }
- }
- .BtnAll {
- margin-top: 30rpx;
- .btn {
- display: inline-block;
- width: 290rpx;
- height: 90rpx;
- line-height: 90rpx;
- text-align: center;
- &.closebtn {
- border-radius: 0px 0px 0px 10px;
- color: #999999;
- background: #efefef;
- }
- &.cancel {
- border-radius: 0px 0px 8px 0px;
- background: $btn-confirm;
- color: #fff;
- }
- }
- }
- }
- }
- </style>
|