客户管理

master
lzq 2026-02-25 11:53:37 +08:00
parent 158b9a8cd7
commit 9d90a7682e
15 changed files with 122 additions and 33 deletions

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* 项目名称 再昇云 */
src: url('@/components/a-icon/iconfont.woff2?t=1770194183018') format('woff2'),
url('@/components/a-icon/iconfont.woff?t=1770194183018') format('woff'),
url('@/components/a-icon/iconfont.ttf?t=1770194183018') format('truetype');
src: url('@/components/a-icon/iconfont.woff2?t=1771989909326') format('woff2'),
url('@/components/a-icon/iconfont.woff?t=1771989909326') format('woff'),
url('@/components/a-icon/iconfont.ttf?t=1771989909326') format('truetype');
}
.iconfont {
@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-zhongzhimima:before {
content: "\e660";
}
.icon-yundanguiji:before {
content: "\e680";
}

View File

@ -5,6 +5,13 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "524416",
"name": "重置密码",
"font_class": "zhongzhimima",
"unicode": "e660",
"unicode_decimal": 58976
},
{
"icon_id": "8242394",
"name": "运单轨迹",

View File

@ -5,6 +5,13 @@ export const icons = {
'css_prefix_text': 'icon-',
'description': '',
'glyphs': [
{
'icon_id': '524416',
'name': '重置密码',
'font_class': 'zhongzhimima',
'unicode': 'e660',
'unicode_decimal': 58976,
},
{
'icon_id': '8242394',
'name': '运单轨迹',

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -5,7 +5,6 @@
// ------
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
import { GlobalComponents } from 'vue'
export {}
@ -49,7 +48,6 @@ declare module 'vue' {
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
@ -108,7 +106,6 @@ declare global {
const ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
const ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
const ElSelect: typeof import('element-plus/es')['ElSelect']
const ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
const ElSwitch: typeof import('element-plus/es')['ElSwitch']
const ElTable: typeof import('element-plus/es')['ElTable']
const ElTableColumn: typeof import('element-plus/es')['ElTableColumn']

View File

@ -52,7 +52,7 @@ const props = withDefaults(defineProps<{
const formPanelIns = useTemplateRef<AFormPanelInstance>('formPanel')
const status = ref<'add' | 'modify'>('add')
const formPanelProps = buildFormPanelProps<CustomerTypes.SearchCustomerResult>({
title: status.value === 'add' ? '新建客户' : '修改客户信息',
title: '',
detailsLoader(id?: string) {
if (Strings.isBlank(id)) {
status.value = 'add'
@ -85,6 +85,7 @@ const formPanelProps = buildFormPanelProps<CustomerTypes.SearchCustomerResult>({
defineExpose({
open(data?: CustomerTypes.SearchCustomerResult) {
formPanelIns.value?.open(data?.id)
formPanelProps.title = status.value === 'add' ? '新建客户' : '修改客户信息'
},
})
</script>

View File

@ -27,6 +27,10 @@ const orgCategoryList = [
] as const
const identityCategoryList = [
{
val: 'PingTai',
txt: '平台',
},
{
val: 'ChanFei',
txt: '产废方',

View File

@ -3,7 +3,8 @@ export {}
declare global {
namespace CustomerTypes {
interface SearchCustomerParam extends G.PageParam {
username: string
username?: string
keywords?: string
// 客户姓名
nickname?: string
// 客户联系电话
@ -13,7 +14,7 @@ declare global {
identityCategory?: string
// 结算方式YueJie-->月结、YuE-->余额、XianFu-->现付
settlementWay?: string
regdateTimes: [ string | undefined, string | undefined ]
regdateTimes?: [ string | undefined, string | undefined ]
regdateStart?: string
regdateEnd?: string
}

View File

@ -1,3 +0,0 @@
export default {
component: () => import('@/pages/cst/customer/Customer.vue'),
} as RouterTypes.RouteConfig

View File

@ -31,6 +31,9 @@
</template>
<template #simpleFormItem="formData">
<ElFormItem>
<ElInput v-model="formData.keywords" placeholder="姓名/电话/账号/企业名称"/>
</ElFormItem>
<!-- <ElFormItem>
<ElSelect v-model="formData.identityCategory" placeholder="主体类型">
<ElOption v-for="item in orgCategory" :key="item.val" :label="item.txt" :value="item.val"/>
</ElSelect>
@ -43,7 +46,7 @@
</ElFormItem>
<ElFormItem>
<ElInput v-model="formData.orgName" placeholder="企业名称"/>
</ElFormItem>
</ElFormItem> -->
</template>
<template #columns>
<ElTableColumn label="账号" prop="username"/>
@ -68,7 +71,7 @@
</ElTableColumn>
<ElTableColumn label="企业名称" prop="orgName">
<template #default="scope">
<span>{{ scope.row.orgName ?? '-' }}</span>
<span>{{ Strings.isBlank(scope.row.orgName) ? '-' : scope.row.orgName }}</span>
</template>
</ElTableColumn>
<ElTableColumn label="结算方式" prop="">
@ -106,6 +109,8 @@ import ATablePage, {
type ATablePageInstance,
buildTablePageProps,
} from '@/components/a-page/a-table-page/ATablePage.tsx'
import Strings from '@/common/utils/strings.ts'
import UserApi from '@/pages/sys/user/user-api.ts'
const customerFormIns = useTemplateRef<InstanceType<typeof CustomerForm>>('customerForm')
const tablePageIns = useTemplateRef<ATablePageInstance>('tablePage')
@ -118,6 +123,7 @@ const tablePageProps = buildTablePageProps<CustomerTypes.SearchCustomerParam, Cu
pageLayout: {
searchFormHeight: '165px',
dataListHeight: 1,
enableHighForm: false,
},
table: {
actionColumn: {
@ -129,6 +135,22 @@ const tablePageProps = buildTablePageProps<CustomerTypes.SearchCustomerParam, Cu
customerFormIns.value?.open(row)
},
},
{
tooltip: '重置密码',
icon: 'zhongzhimima',
type: 'danger',
confirm: {
title: '确定重置密码?',
},
action({row}) {
UserApi.resetPasswd(row.userId!)
.then(res => {
ElMessage.success({
message: res.msg,
})
})
},
},
],
},
},
@ -136,7 +158,12 @@ const tablePageProps = buildTablePageProps<CustomerTypes.SearchCustomerParam, Cu
highForm: {
contentWidth: 342,
},
paging: CustomerApi.paging,
paging(param) {
return CustomerApi.paging({
identityCategory: 'CaiGou',
keywords: param.keywords,
})
},
},
})

View File

@ -31,6 +31,9 @@
</template>
<template #simpleFormItem="formData">
<ElFormItem>
<ElInput v-model="formData.keywords" placeholder="姓名/电话/账号/企业名称"/>
</ElFormItem>
<!-- <ElFormItem>
<ElSelect v-model="formData.identityCategory" placeholder="主体类型">
<ElOption v-for="item in orgCategory" :key="item.val" :label="item.txt" :value="item.val"/>
</ElSelect>
@ -43,7 +46,7 @@
</ElFormItem>
<ElFormItem>
<ElInput v-model="formData.orgName" placeholder="企业名称"/>
</ElFormItem>
</ElFormItem> -->
</template>
<template #columns>
<ElTableColumn label="账号" prop="username"/>
@ -68,7 +71,7 @@
</ElTableColumn>
<ElTableColumn label="企业名称" prop="orgName">
<template #default="scope">
<span>{{ scope.row.orgName ?? '-' }}</span>
<span>{{ Strings.isBlank(scope.row.orgName) ? '-' : scope.row.orgName }}</span>
</template>
</ElTableColumn>
<ElTableColumn label="结算方式" prop="">
@ -106,6 +109,8 @@ import ATablePage, {
type ATablePageInstance,
buildTablePageProps,
} from '@/components/a-page/a-table-page/ATablePage.tsx'
import Strings from '@/common/utils/strings.ts'
import UserApi from '@/pages/sys/user/user-api.ts'
const customerFormIns = useTemplateRef<InstanceType<typeof CustomerForm>>('customerForm')
const tablePageIns = useTemplateRef<ATablePageInstance>('tablePage')
@ -118,6 +123,7 @@ const tablePageProps = buildTablePageProps<CustomerTypes.SearchCustomerParam, Cu
pageLayout: {
searchFormHeight: '165px',
dataListHeight: 1,
enableHighForm: false,
},
table: {
actionColumn: {
@ -129,6 +135,22 @@ const tablePageProps = buildTablePageProps<CustomerTypes.SearchCustomerParam, Cu
customerFormIns.value?.open(row)
},
},
{
tooltip: '重置密码',
icon: 'zhongzhimima',
type: 'danger',
confirm: {
title: '确定重置密码?',
},
action({row}) {
UserApi.resetPasswd(row.userId!)
.then(res => {
ElMessage.success({
message: res.msg,
})
})
},
},
],
},
},
@ -136,7 +158,13 @@ const tablePageProps = buildTablePageProps<CustomerTypes.SearchCustomerParam, Cu
highForm: {
contentWidth: 342,
},
paging: CustomerApi.paging,
simpleForm: {},
paging(param) {
return CustomerApi.paging({
identityCategory: 'YunShu',
keywords: param.keywords,
})
},
},
})
</script>

View File

@ -31,6 +31,9 @@
</template>
<template #simpleFormItem="formData">
<ElFormItem>
<ElInput v-model="formData.keywords" placeholder="姓名/电话/账号/企业名称"/>
</ElFormItem>
<!-- <ElFormItem>
<ElSelect v-model="formData.identityCategory" placeholder="主体类型">
<ElOption v-for="item in orgCategory" :key="item.val" :label="item.txt" :value="item.val"/>
</ElSelect>
@ -43,7 +46,7 @@
</ElFormItem>
<ElFormItem>
<ElInput v-model="formData.orgName" placeholder="企业名称"/>
</ElFormItem>
</ElFormItem> -->
</template>
<template #columns>
<ElTableColumn label="账号" prop="username"/>
@ -68,7 +71,7 @@
</ElTableColumn>
<ElTableColumn label="企业名称" prop="orgName">
<template #default="scope">
<span>{{ scope.row.orgName ?? '-' }}</span>
<span>{{ Strings.isBlank(scope.row.orgName) ? '-' : scope.row.orgName }}</span>
</template>
</ElTableColumn>
<ElTableColumn label="结算方式" prop="">
@ -106,6 +109,8 @@ import ATablePage, {
type ATablePageInstance,
buildTablePageProps,
} from '@/components/a-page/a-table-page/ATablePage.tsx'
import Strings from '@/common/utils/strings.ts'
import UserApi from '@/pages/sys/user/user-api.ts'
const customerFormIns = useTemplateRef<InstanceType<typeof CustomerForm>>('customerForm')
const tablePageIns = useTemplateRef<ATablePageInstance>('tablePage')
@ -118,6 +123,7 @@ const tablePageProps = buildTablePageProps<CustomerTypes.SearchCustomerParam, Cu
pageLayout: {
searchFormHeight: '165px',
dataListHeight: 1,
enableHighForm: false,
},
table: {
actionColumn: {
@ -129,6 +135,22 @@ const tablePageProps = buildTablePageProps<CustomerTypes.SearchCustomerParam, Cu
customerFormIns.value?.open(row)
},
},
{
tooltip: '重置密码',
icon: 'zhongzhimima',
type: 'danger',
confirm: {
title: '确定重置密码?',
},
action({row}) {
UserApi.resetPasswd(row.userId!)
.then(res => {
ElMessage.success({
message: res.msg,
})
})
},
},
],
},
},
@ -136,7 +158,12 @@ const tablePageProps = buildTablePageProps<CustomerTypes.SearchCustomerParam, Cu
highForm: {
contentWidth: 342,
},
paging: CustomerApi.paging,
paging(param) {
return CustomerApi.paging({
identityCategory: 'ChanFei',
keywords: param.keywords,
})
},
},
})

View File

@ -4,7 +4,6 @@ import DriverApi from '@/pages/cst/driver/driver-api.ts'
const props = defineProps<{
orgId?: string,
// modelValue: string,
}>()
const model = defineModel({type: String})
@ -20,7 +19,6 @@ const dropTableColumns = [
]
const dropTableLoader = (param: DriverTypes.SearchDriverParam) => {
console.log('props.orgId ==', props.orgId)
if (props.orgId == null) return Promise.resolve({
current: 1,
size: 10,
@ -31,15 +29,6 @@ const dropTableLoader = (param: DriverTypes.SearchDriverParam) => {
return DriverApi.paging(param).then(res => res.data)
}
/* const emits = defineEmits<{
'update:modelValue': [ value: string ]
}>() */
/* const driverId = computed({
get: () => model.value,
set: (val) => model.value = val,
}) */
</script>
<template>