140 lines
4.4 KiB
Vue
140 lines
4.4 KiB
Vue
<template>
|
|
<crud-layout bg="/static/page/blue-bg.png">
|
|
<z-paging
|
|
ref="pageRef"
|
|
:fixed="false"
|
|
v-model="list"
|
|
:default-page-size="10"
|
|
safe-area-inset-bottom
|
|
:loading-more-enabled="true"
|
|
:show-scrollbar="false"
|
|
@query="query"
|
|
:auto-clean-list-when-reload="false"
|
|
:auto-scroll-to-top-when-reload="false"
|
|
@scroll="scroll"
|
|
>
|
|
<template #top>
|
|
<view class="h-30rpx" />
|
|
<view class="bg-white rounded-16rpx px-20rpx">
|
|
<z-tabs :list="tabs" @change="tabChange" />
|
|
</view>
|
|
</template>
|
|
|
|
<view class="h-20rpx" />
|
|
|
|
<view class="flex-col justify-center card p-x-15rpx p-y-25rpx m-b-20rpx" v-for="(v, i) in list" :key="i">
|
|
<view class="flex-row items-center">
|
|
<image class="w-100rpx h-100rpx rounded-8rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
|
<view class="flex-1 flex-col m-l-20rpx">
|
|
<view class="flex-row items-center justify-between">
|
|
<view class="flex-row items-center">
|
|
<view class="main-text-28">{{ v.merchantName }}</view>
|
|
<view v-if="false" class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" />
|
|
</view>
|
|
<tm-tag v-if="v.orderStatus !== 1" color="success" size="xs">已支付</tm-tag>
|
|
<tm-tag v-if="v.orderStatus == 2" color="info" size="xs">售后</tm-tag>
|
|
</view>
|
|
<view class="flex justify-between items-end m-t-5rpx">
|
|
<view class="flex flex-col m-t-5rpx">
|
|
<view class="second-text-20">
|
|
<text>{{ "某个人" }}</text>
|
|
<text class="m-l-10rpx">{{ "13155555555" }}</text>
|
|
</view>
|
|
<view class="second-text-20">
|
|
<text>下单时间</text>
|
|
<text class="m-l-10rpx">
|
|
{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}
|
|
</text>
|
|
</view>
|
|
</view>
|
|
<view class="flex flex-row">
|
|
<view class="m-t-14rpx m-r-20rpx second-text-26">共 {{ v.carList.length }} 件</view>
|
|
<view class="m-t-10rpx main-text-30 color-red!">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="h-20rpx m-t-[-10rpx] flex justify-end items-center">
|
|
<!-- <view class="absolute top-0 right-0 bottom-0 left-0 h-180rpx">
|
|
<scroll-view scroll-x class="flex-row-center whitespace-nowrap">
|
|
<view class="flex-row items-center">
|
|
<view
|
|
class="inline-flex! flex-col justify-center h-180rpx m-r-20rpx"
|
|
v-for="(pV, pI) in v.carList"
|
|
:key="pI"
|
|
@tap.stop="
|
|
router.jump('/pages/merchant/product-detail', {
|
|
id: pV.productId,
|
|
})
|
|
"
|
|
>
|
|
<image class="w-160rpx h-120rpx rounded-8rpx" :src="filePath(pV.productPic)" mode="aspectFill" />
|
|
<view class="w-160rpx m-t-10rpx sub-text-24 show-line text-center">
|
|
{{ pV.productName }}
|
|
</view>
|
|
</view>
|
|
<view class="inline-flex! h-180rpx">
|
|
<view class="w-160rpx h-full" />
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view> -->
|
|
</view>
|
|
<view class="flex-row items-center justify-end">
|
|
<view class="botder_btn" @tap.stop="">退款</view>
|
|
</view>
|
|
</view>
|
|
</z-paging>
|
|
|
|
<!-- <tm-drawer ref="calendarView" placement="bottom" v-model:show="state.showDrawer">
|
|
<view style="height: 1800rpx"></view>
|
|
</tm-drawer> -->
|
|
</crud-layout>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref, reactive } from "vue"
|
|
import { onShow } from "@dcloudio/uni-app"
|
|
import { hooks } from "@@/index"
|
|
import { filePath } from "@@/utils/file"
|
|
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
|
|
import { orderApi } from "@@/api"
|
|
|
|
const pageRef = ref<any>(null)
|
|
// 选项卡
|
|
const tabs = [
|
|
{ id: null, name: "全部", disabled: false },
|
|
{ id: 1, name: "已支付", disabled: false },
|
|
{ id: 2, name: "售后", disabled: false },
|
|
]
|
|
const state = reactive<any>({
|
|
pa: {
|
|
orderStatus: tabs[0].id,
|
|
},
|
|
// showDrawer: false,
|
|
})
|
|
const { list, startPage, scroll } = hooks.usePage(pageRef, orderApi.page, null, "data.records")
|
|
|
|
onShow(() => {
|
|
// const isLogin = await hooks.useCheckLogin()
|
|
// if (!isLogin) return
|
|
})
|
|
|
|
// 切换选项卡
|
|
const tabChange = (e: number) => {
|
|
state.pa.orderStatus = tabs[e].id
|
|
pageRef.value.reload(true)
|
|
}
|
|
|
|
const query = (page: number, pagesize: number) => {
|
|
// const isLogin = hooks.useStaticCheckLogin()
|
|
// if (!isLogin) return
|
|
startPage(page, pagesize, false, state.pa)
|
|
}
|
|
|
|
// 点击退款
|
|
// const tabRefund = (v: any) => {
|
|
// state.showDrawer = true
|
|
// }
|
|
</script>
|