提交 994bf35c authored 作者: matian's avatar matian

日期搜索加change事件

上级 539e2a19
......@@ -12,7 +12,7 @@ export function getChannelList(params: {
tags?: string
company_short_name?: string
['per-page']: string
page: string
page?: string
}) {
return httpRequest.get('/api/customer/v1/channel/index/index', { params })
}
......
<script setup lang="ts">
import shortcuts from '@/utils/shortcut'
import { getConditionList, getChannelList } from '../api'
const appList = ref()
const tagsList = ref([])
getConditionList({ channel: true }).then(res => {
tagsList.value = res.data.channel.tags.reduce((t: any, cur: any) => {
......@@ -14,8 +15,11 @@ const listOptions = $computed(() => {
return {
remote: {
beforeRequest(params: any) {
params.created_time_start = params.createTime[0]
params.created_time_end = params.createTime[1]
if (params.createTime) {
params.created_time_start = params.createTime[0]
params.created_time_end = params.createTime[1]
delete params.createTime
}
return params
},
httpRequest: getChannelList,
......@@ -77,6 +81,9 @@ const listOptions = $computed(() => {
]
}
})
const handleChange = () => {
appList.value.refetch()
}
</script>
<template>
<AppCard title="BP渠道信息">
......@@ -90,6 +97,7 @@ const listOptions = $computed(() => {
start-placeholder="创建开始时间"
end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/>
</template>
......
......@@ -8,7 +8,7 @@ export function getContactList(params: {
school_name?: string
college?: string
['per-page']?: string
page: string
page?: string
}) {
return httpRequest.get('/api/customer/v1/school/user/index', { params })
}
......
......@@ -13,6 +13,8 @@ export function getAllUserList(params: {
name?: string
email?: string
mobile?: string
['per-page']?: string
page?: string
}) {
return httpRequest.get('/api/customer/v1/customer/all/index', { params })
}
......@@ -5,7 +5,7 @@ import { getConditionList, getAllUserList } from '../api'
const router = useRouter()
const projectList = ref([])
const systemList = ref([])
const appList = ref()
getConditionList({ all: true }).then(res => {
projectList.value = res.data.all.projects
systemList.value = res.data.all.system_id
......@@ -16,8 +16,11 @@ const listOptions = $computed(() => {
return {
remote: {
beforeRequest(params: any) {
params.created_time_start = params.timeRange[0]
params.created_time_end = params.timeRange[1]
if (params.timeRange) {
params.created_time_start = params.timeRange[0]
params.created_time_end = params.timeRange[1]
delete params.timeRange
}
return params
},
httpRequest: getAllUserList,
......@@ -106,6 +109,9 @@ const handleDetail = (row: any) => {
router.push(`/user/xiaoetong/detail/?id=${row.id}`)
}
}
const handleChange = () => {
appList.value.refetch()
}
</script>
<template>
<AppCard title="全部学员信息">
......@@ -119,6 +125,7 @@ const handleDetail = (row: any) => {
start-placeholder="创建开始时间"
end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/>
</template>
<template #table-x="{ row }">
......
......@@ -17,6 +17,8 @@ export function getGooseList(params: {
wx_email?: string
from?: string
sales?: string
['per-page']?: string
page: string
}) {
return httpRequest.get('/api/customer/v1/customer/xiaoe/index', { params })
}
......
<script setup lang="ts">
import shortcuts from '@/utils/shortcut'
import { getConditionList, getGooseList } from '../api'
const appList = ref()
const fromMapList = ref([])
const provinceMapList = ref([])
const salesList = ref([])
......@@ -22,8 +23,11 @@ const listOptions = $computed(() => {
remote: {
httpRequest: getGooseList,
beforeRequest(params: any) {
params.created_at_start = params.timeRange[0]
params.created_at_end = params.timeRange[1]
if (params.timeRange) {
params.created_at_start = params.timeRange[0]
params.created_at_end = params.timeRange[1]
delete params.timeRange
}
return params
},
params: {
......@@ -116,6 +120,9 @@ const listOptions = $computed(() => {
]
}
})
const handleChange = () => {
appList.value.refetch()
}
</script>
<template>
<AppCard title="小鹅通客户">
......@@ -129,6 +136,7 @@ const listOptions = $computed(() => {
start-placeholder="创建开始时间"
end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/>
</template>
......
......@@ -15,6 +15,8 @@ export function getPeakUserList(params: {
source?: string
createuser_name?: string
owner?: string
['per-page']?: string
page?: string
}) {
return httpRequest.get('/api/customer/v1/customer/dustess/index', { params })
}
......
<script setup lang="ts">
import shortcuts from '@/utils/shortcut'
import { getConditionList, getPeakUserList } from '../api'
const appList = ref()
const staffList = ref([])
const sourceMapList = ref([])
getConditionList({ dustess: true }).then((res: any) => {
......@@ -13,8 +14,11 @@ const listOptions = $computed(() => {
return {
remote: {
beforeRequest(params: any) {
params.createtime_start = params.timeRange[0]
params.createtime_end = params.timeRange[1]
if (params.timeRange) {
params.createtime_start = params.timeRange[0]
params.createtime_end = params.timeRange[1]
delete params.timeRange
}
return params
},
httpRequest: getPeakUserList,
......@@ -96,6 +100,9 @@ const listOptions = $computed(() => {
]
}
})
const handleChange = () => {
appList.value.refetch()
}
</script>
<template>
<AppCard title="尘峰客户">
......@@ -109,6 +116,7 @@ const listOptions = $computed(() => {
start-placeholder="创建开始时间"
end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/>
</template>
......
<script setup lang="ts">
import shortcuts from '@/utils/shortcut'
import { getConditionList, getWechatUserList } from '../api'
const appList = ref()
const departmentsList: any = ref([])
const addWayList: any = ref([])
const tagsList: any = ref([])
......@@ -22,8 +23,11 @@ const listOptions = $computed(() => {
return {
remote: {
beforeRequest(params: any) {
params.create_time_start = params.timeRange[0]
params.create_time_start = params.timeRange[1]
if (params.timeRange) {
params.create_time_start = params.timeRange[0]
params.create_time_end = params.timeRange[1]
delete params.timeRange
}
return params
},
httpRequest: getWechatUserList,
......@@ -105,6 +109,9 @@ const listOptions = $computed(() => {
]
}
})
const handleChange = () => {
appList.value.refetch()
}
</script>
<template>
<AppCard title="企微客户">
......@@ -126,6 +133,7 @@ const listOptions = $computed(() => {
start-placeholder="创建开始时间"
end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/>
</template>
<template #remark_mobiles="{ row }">
......
......@@ -19,6 +19,8 @@ export function getZwsUserList(params: {
phone_number?: string
sales_rep?: string
channel?: string
['per-page']?: string
page?: string
}) {
return httpRequest.get('/api/customer/v1/customer/zws/index', { params })
}
......
<script setup lang="ts">
import shortcuts from '@/utils/shortcut'
import { getConditionList, getZwsUserList } from '../api'
const appList = ref()
const agentsList = ref([])
const projectsList = ref([])
const applicationList = ref([])
......@@ -20,15 +21,16 @@ const listOptions = $computed(() => {
if (params.createTime) {
params.create_time_start = params.createTime[0]
params.create_time_end = params.createTime[1]
delete params.createTime
}
if (params.updatedTime) {
params.updated_time_start = params.updatedTime[0]
params.updated_time_end = params.updatedTime[1]
delete params.updatedTime
}
return params
},
httpRequest: getZwsUserList,
params: {
createTime: [],
create_time_start: '',
......@@ -117,6 +119,9 @@ const listOptions = $computed(() => {
]
}
})
const handleChange = () => {
appList.value.refetch()
}
</script>
<template>
<AppCard title="ZWS学员信息">
......@@ -130,6 +135,7 @@ const listOptions = $computed(() => {
start-placeholder="创建开始时间"
end-placeholder="创建结束时间"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/>
</template>
<template v-slot:updatedTime="{ params }">
......@@ -141,6 +147,7 @@ const listOptions = $computed(() => {
start-placeholder="更新开始时间"
end-placeholder="更新结束时间"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleChange"
/>
</template>
<template #table-x="{ row }">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论