题库维护。刷题软件数据后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ss-tiku-manage-web/src/views/Customer/AppletUser/index.vue

110 lines
3.0 KiB

1 month ago
<template>
<div>
<el-form :model="searchForm" inline @submit.prevent>
<el-form-item>
<el-input
v-model="searchForm.phone"
placeholder="请输入手机号"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-select
1 month ago
v-model="searchForm.distributionld"
1 month ago
placeholder="选择分销人"
clearable
filterable
@change="handleQuery"
>
<el-option
v-for="item in resellOptions"
:key="item.distributionId"
:label="item.name"
:value="item.distributionId"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="searchForm.createDate"
type="daterange"
range-separator="-"
start-placeholder="注册日期"
end-placeholder="注册日期"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery">搜索</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList" border stripe>
<el-table-column type="index" width="50" />
<el-table-column label="手机号码" prop="phone" width="120" />
<el-table-column label="分销人" prop="distributionName" min-width="120" />
1 month ago
<el-table-column label="注册日期" prop="createTime" min-width="120" />
<el-table-column label="最近登陆日期" prop="rencentlyLoginTime" min-width="120" />
1 month ago
</el-table>
<Pagination
:total="total"
v-model:page="searchForm.pageNo"
v-model:limit="searchForm.pageSize"
@pagination="getList"
/>
</div>
</template>
<script name="AppletUser" setup>
1 month ago
import { removeNullField } from '@/utils'
import * as CustomerApi from '@/api/customer/customer.js'
import { getResellSimpleList } from '@/api/xjapplet/resell'
1 month ago
const searchForm = ref({
1 month ago
distributionld: undefined,
1 month ago
phone: '',
createDate: [],
pageNo: 1,
pageSize: 20
})
const resellOptions = ref([])
onMounted(() => {
1 month ago
getResellSimpleList().then((res) => {
resellOptions.value = res
})
1 month ago
handleQuery()
})
/** 搜索按钮操作 */
const handleQuery = () => {
searchForm.value.pageNo = 1
getList()
}
const loading = ref(false)
const tableList = ref([])
const total = ref(0)
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
1 month ago
if (searchForm.value.createDate && searchForm.value.createDate.length > 0) {
searchForm.value.createTimeBegin = searchForm.value.createDate[0] + '00:00:00'
searchForm.value.createTimeEnd = searchForm.value.createDate[1] + '23:59:59'
} else {
searchForm.value.createTimeBegin = undefined
searchForm.value.createTimeEnd = undefined
1 month ago
}
1 month ago
const data = await CustomerApi.getAppletUserList(removeNullField(searchForm.value))
1 month ago
tableList.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
</script>
<style lang="scss" scoped></style>