流水统计
This commit is contained in:
1 parent
7819d15326
commit
2aef1e445d
7 files changed
+96
-61
No files matched your search
@@ -17,14 +17,15 @@
|
||||
<view class="h-30rpx" />
|
||||
<view class="bg-white rounded-12rpx p-20rpx flex justify-between items-center">
|
||||
<text class="text-30 font-600">流水统计</text>
|
||||
<tm-text color="#999999">{{ state.nowVal }}</tm-text>
|
||||
<tm-text color="#999999">{{ state.formatVal }}</tm-text>
|
||||
<view class="flex items-center cursor-pointer">
|
||||
<tm-between-time
|
||||
start="2020-1-1"
|
||||
end="2040-1-1"
|
||||
v-model="state.newdata"
|
||||
v-model:model-str="state.nowVal"
|
||||
v-model="state.date"
|
||||
v-model:model-str="state.formatVal"
|
||||
@confirm="datePickerConfirm"
|
||||
format="YYYY-MM-DD"
|
||||
>
|
||||
<svg
|
||||
t="1742280333491"
|
||||
@@ -94,32 +95,34 @@
|
||||
import { ref, reactive } from "vue"
|
||||
import { onShow } from "@dcloudio/uni-app"
|
||||
import { hooks } from "@@/index"
|
||||
import { orderApi } from "@@/api"
|
||||
import { flowStatisticsApi } from "@@/api"
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
payTimeList: [],
|
||||
createTimeList: [],
|
||||
},
|
||||
nowVal: "",
|
||||
newdata: "",
|
||||
formatVal: "",
|
||||
date: "",
|
||||
})
|
||||
const { list, startPage, scroll } = hooks.usePage(pageRef, orderApi.page, null, "data.records")
|
||||
const { list, startPage, scroll } = hooks.usePage(pageRef, flowStatisticsApi.page, null, "data.records")
|
||||
|
||||
onShow(() => {
|
||||
// const isLogin = await hooks.useCheckLogin()
|
||||
// if (!isLogin) return
|
||||
const isLogin = hooks.useCheckLogin()
|
||||
if (!isLogin) return
|
||||
})
|
||||
|
||||
const query = (page: number, pagesize: number) => {
|
||||
// const isLogin = hooks.useStaticCheckLogin()
|
||||
// if (!isLogin) return
|
||||
const isLogin = hooks.useStaticCheckLogin()
|
||||
if (!isLogin) return
|
||||
startPage(page, pagesize, false, state.pa)
|
||||
}
|
||||
|
||||
// 时间范围选择器确认
|
||||
const datePickerConfirm = (date: any) => {
|
||||
state.pa.payTimeList = state.newdata
|
||||
state.pa.createTimeList = date.map((v: any) => hooks.useTime(v, "{y}-{m}-{d}"))
|
||||
console.log("xx", state.pa.createTimeList)
|
||||
|
||||
pageRef.value.reload(false)
|
||||
}
|
||||
</script>
|
||||
@@ -31,8 +31,10 @@
|
||||
<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>
|
||||
<tm-tag v-if="v.orderStatus == 1" color="info" size="xs">未支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 5" color="success" size="xs">已支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 10" color="error" size="xs">售后</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 20" size="xs">已核销</tm-tag>
|
||||
</view>
|
||||
<view class="flex justify-between items-end m-t-5rpx">
|
||||
<view class="flex flex-col m-t-5rpx">
|
||||
@@ -48,7 +50,7 @@
|
||||
</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-14rpx m-r-20rpx second-text-26">共 {{ v.carList?.length || "null" }} 件</view>
|
||||
<view class="m-t-10rpx main-text-30 color-red!">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -98,14 +100,14 @@ 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"
|
||||
import { individualOrderApi } from "@@/api"
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
// 选项卡
|
||||
const tabs = [
|
||||
{ id: null, name: "全部", disabled: false },
|
||||
{ id: 1, name: "已支付", disabled: false },
|
||||
{ id: 2, name: "售后", disabled: false },
|
||||
{ id: 5, name: "已支付", disabled: false },
|
||||
{ id: 10, name: "售后", disabled: false },
|
||||
]
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
@@ -113,7 +115,7 @@ const state = reactive<any>({
|
||||
},
|
||||
// showDrawer: false,
|
||||
})
|
||||
const { list, startPage, scroll } = hooks.usePage(pageRef, orderApi.page, null, "data.records")
|
||||
const { list, startPage, scroll } = hooks.usePage(pageRef, individualOrderApi.page, null, "data.records")
|
||||
|
||||
onShow(() => {
|
||||
// const isLogin = await hooks.useCheckLogin()
|
||||
|
||||
Reference in new issue
Block a user