流水统计
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>
|
||||
Reference in new issue
Block a user