fix:sort
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m0s

This commit is contained in:
luo
2026-06-22 11:09:50 +08:00
parent d3b5f55c64
commit ebf9739f06
8 changed files with 86 additions and 59 deletions

View File

@@ -20,7 +20,7 @@
<div class="voucher-upload__text">{{ voucherName }}拖到此处<em>点击上传</em></div> <div class="voucher-upload__text">{{ voucherName }}拖到此处<em>点击上传</em></div>
<template #tip> <template #tip>
<div class="el-upload__tip"> <div class="el-upload__tip">
支持多张图片或附件最多上传 {{ maxCount }} 个文件点击上传区域后可粘贴文件 支持多张图片或附件最多上传 {{ maxCount }} 个文件可粘贴文件
</div> </div>
</template> </template>
<template #file="{ file }"> <template #file="{ file }">

View File

@@ -5,8 +5,7 @@
<ArtSearchBar <ArtSearchBar
v-model:filter="searchForm" v-model:filter="searchForm"
:items="searchFormItems" :items="searchFormItems"
:show-expand="false" :show-expand="true"
label-width="90"
@reset="handleReset" @reset="handleReset"
@search="handleSearch" @search="handleSearch"
></ArtSearchBar> ></ArtSearchBar>
@@ -216,6 +215,7 @@
import { generateEnterpriseCode } from '@/utils/codeGenerator' import { generateEnterpriseCode } from '@/utils/codeGenerator'
import { formatDateTime } from '@/utils/business/format' import { formatDateTime } from '@/utils/business/format'
import { regionData } from '@/utils/constants/regionData' import { regionData } from '@/utils/constants/regionData'
import { STATUS_SELECT_OPTIONS } from '@/config/constants'
defineOptions({ name: 'EnterpriseCustomer' }) defineOptions({ name: 'EnterpriseCustomer' })
@@ -236,6 +236,7 @@
const shopLoading = ref(false) const shopLoading = ref(false)
const tableRef = ref() const tableRef = ref()
const currentEnterpriseId = ref<number>(0) const currentEnterpriseId = ref<number>(0)
const shopList = ref<any[]>([])
// 店铺级联选择相关 // 店铺级联选择相关
const shopCascadeOptions = ref<any[]>([]) const shopCascadeOptions = ref<any[]>([])
const shopCascadeProps = { const shopCascadeProps = {
@@ -272,20 +273,15 @@
enterprise_name: '', enterprise_name: '',
login_phone: '', login_phone: '',
contact_phone: '', contact_phone: '',
owner_shop_id: undefined as number | undefined,
status: undefined as number | undefined status: undefined as number | undefined
} }
// 搜索表单 // 搜索表单
const searchForm = reactive({ ...initialSearchState }) const searchForm = reactive({ ...initialSearchState })
// 状态选项
const statusOptions = [
{ label: '启用', value: 1 },
{ label: '禁用', value: 0 }
]
// 搜索表单配置 // 搜索表单配置
const searchFormItems: SearchFormItem[] = [ const searchFormItems = computed<SearchFormItem[]>(() => [
{ {
label: '企业名称', label: '企业名称',
prop: 'enterprise_name', prop: 'enterprise_name',
@@ -296,7 +292,7 @@
} }
}, },
{ {
label: '登录手机', label: '登录手机',
prop: 'login_phone', prop: 'login_phone',
type: 'input', type: 'input',
config: { config: {
@@ -305,7 +301,7 @@
} }
}, },
{ {
label: '联系电话', label: '联系电话',
prop: 'contact_phone', prop: 'contact_phone',
type: 'input', type: 'input',
config: { config: {
@@ -313,17 +309,34 @@
placeholder: '请输入联系人电话' placeholder: '请输入联系人电话'
} }
}, },
{
label: '归属店铺',
prop: 'owner_shop_id',
type: 'select',
options: shopList.value.map((shop) => ({
label: shop.shop_name,
value: shop.id
})),
config: {
clearable: true,
filterable: true,
remote: true,
remoteMethod: handleSearchOwnerShop,
placeholder: '请输入店铺名称搜索',
reserveKeyword: true
}
},
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
type: 'select', type: 'select',
options: STATUS_SELECT_OPTIONS,
config: { config: {
clearable: true, clearable: true,
placeholder: '请选择状态', placeholder: '请选择状态'
options: statusOptions
} }
} }
] ])
// 分页 // 分页
const pagination = reactive({ const pagination = reactive({
@@ -517,6 +530,7 @@
} }
onMounted(() => { onMounted(() => {
handleSearchOwnerShop('')
getTableData() getTableData()
}) })
@@ -555,6 +569,22 @@
await handleOwnerShopFocus() await handleOwnerShopFocus()
} }
const handleSearchOwnerShop = async (query: string = '') => {
try {
const res = await ShopService.getShops({
page: 1,
page_size: 20,
shop_name: query || undefined,
status: 1
})
if (res.code === 0) {
shopList.value = res.data.items || []
}
} catch (error) {
console.error('搜索归属店铺失败:', error)
}
}
// 处理店铺选择变化 // 处理店铺选择变化
const handleShopChange = (value: any) => { const handleShopChange = (value: any) => {
if (Array.isArray(value) && value.length > 0) { if (Array.isArray(value) && value.length > 0) {
@@ -574,6 +604,7 @@
enterprise_name: searchForm.enterprise_name || undefined, enterprise_name: searchForm.enterprise_name || undefined,
login_phone: searchForm.login_phone || undefined, login_phone: searchForm.login_phone || undefined,
contact_phone: searchForm.contact_phone || undefined, contact_phone: searchForm.contact_phone || undefined,
owner_shop_id: searchForm.owner_shop_id ?? undefined,
status: searchForm.status status: searchForm.status
} }
const res = await EnterpriseService.getEnterprises(params) const res = await EnterpriseService.getEnterprises(params)

View File

@@ -1796,19 +1796,6 @@
{ label: '否', value: false } { label: '否', value: false }
] ]
}, },
{
label: '是否绑设备',
prop: 'is_standalone',
type: 'select',
config: {
clearable: true,
placeholder: '全部'
},
options: () => [
{ label: '未绑定设备', value: true },
{ label: '已绑定设备', value: false }
]
},
{ {
label: '有无换卡', label: '有无换卡',
prop: 'is_replaced', prop: 'is_replaced',
@@ -1839,6 +1826,19 @@
clearable: true, clearable: true,
placeholder: '请输入ICCID结束号' placeholder: '请输入ICCID结束号'
} }
},
{
label: '是否绑设备',
prop: 'is_standalone',
type: 'select',
config: {
clearable: true,
placeholder: '全部'
},
options: () => [
{ label: '未绑定设备', value: true },
{ label: '已绑定设备', value: false }
]
} }
] ]

View File

@@ -8,7 +8,6 @@
:items="searchFormItems" :items="searchFormItems"
:gutter="16" :gutter="16"
:el-col-span="6" :el-col-span="6"
label-width="100"
:show-expand="false" :show-expand="false"
@reset="handleReset" @reset="handleReset"
@search="handleSearch" @search="handleSearch"
@@ -569,7 +568,7 @@
} }
}, },
{ {
label: '主账号用户名', label: '用户名',
prop: 'username', prop: 'username',
type: 'input', type: 'input',
config: { config: {

View File

@@ -9,7 +9,7 @@
<ArtSearchBar <ArtSearchBar
v-model:filter="commissionSearchForm" v-model:filter="commissionSearchForm"
:items="commissionSearchItems" :items="commissionSearchItems"
:show-expand="false" show-expand
@reset="handleCommissionReset" @reset="handleCommissionReset"
@search="handleCommissionSearch" @search="handleCommissionSearch"
/> />
@@ -273,7 +273,7 @@
} }
}, },
{ {
label: '状态', label: '结算状态',
prop: 'status', prop: 'status',
type: 'select', type: 'select',
options: [ options: [
@@ -315,7 +315,7 @@
} }
}, },
{ {
label: '时间范围', label: '起止时间',
prop: 'dateRange', prop: 'dateRange',
type: 'date', type: 'date',
config: { config: {
@@ -518,7 +518,7 @@
// 搜索表单配置 // 搜索表单配置
const withdrawalSearchItems = computed<SearchFormItem[]>(() => [ const withdrawalSearchItems = computed<SearchFormItem[]>(() => [
{ {
label: '状态', label: '审核状态',
prop: 'status', prop: 'status',
type: 'select', type: 'select',
options: [ options: [
@@ -533,7 +533,7 @@
} }
}, },
{ {
label: '时间范围', label: '起止时间',
prop: 'dateRange', prop: 'dateRange',
type: 'date', type: 'date',
config: { config: {

View File

@@ -6,7 +6,6 @@
v-model:filter="searchForm" v-model:filter="searchForm"
:items="searchFormItems" :items="searchFormItems"
show-expand show-expand
label-width="100"
@reset="handleReset" @reset="handleReset"
@search="handleSearch" @search="handleSearch"
></ArtSearchBar> ></ArtSearchBar>
@@ -152,17 +151,17 @@
} }
}, },
{ {
label: '状态', label: '审核状态',
prop: 'status', prop: 'status',
type: 'select', type: 'select',
options: withdrawalStatusOptions, options: withdrawalStatusOptions,
config: { config: {
clearable: true, clearable: true,
placeholder: '请选择状态' placeholder: '请选择审核状态'
} }
}, },
{ {
label: '开始至结束', label: '起止时间',
prop: 'dateRange', prop: 'dateRange',
type: 'date', type: 'date',
config: { config: {

View File

@@ -6,7 +6,6 @@
v-model:filter="searchForm" v-model:filter="searchForm"
:items="searchFormItems" :items="searchFormItems"
:show-expand="false" :show-expand="false"
label-width="100"
@reset="handleReset" @reset="handleReset"
@search="handleSearch" @search="handleSearch"
></ArtSearchBar> ></ArtSearchBar>
@@ -260,7 +259,7 @@
// 搜索表单配置 // 搜索表单配置
const searchFormItems: SearchFormItem[] = [ const searchFormItems: SearchFormItem[] = [
{ {
label: '店铺', label: '店铺名称',
prop: 'shop_id', prop: 'shop_id',
type: 'select', type: 'select',
placeholder: '请选择店铺', placeholder: '请选择店铺',
@@ -277,7 +276,7 @@
} }
}, },
{ {
label: '状态', label: '支付状态',
prop: 'status', prop: 'status',
type: 'select', type: 'select',
placeholder: '请选择状态', placeholder: '请选择状态',
@@ -291,7 +290,7 @@
} }
}, },
{ {
label: '开始至结束', label: '起止时间',
prop: 'dateRange', prop: 'dateRange',
type: 'date', type: 'date',
config: { config: {

View File

@@ -6,7 +6,6 @@
v-model:filter="searchForm" v-model:filter="searchForm"
:items="searchFormItems" :items="searchFormItems"
:show-expand="false" :show-expand="false"
label-width="85"
@reset="handleReset" @reset="handleReset"
@search="handleSearch" @search="handleSearch"
></ArtSearchBar> ></ArtSearchBar>
@@ -113,7 +112,7 @@
style="width: 100%" style="width: 100%"
/> />
<span <span
style=" margin-left: 8px; font-size: 12px;color: var(--el-text-color-secondary)" style="margin-left: 8px; font-size: 12px; color: var(--el-text-color-secondary)"
>单位</span >单位</span
> >
</ElFormItem> </ElFormItem>
@@ -138,7 +137,7 @@
style="width: 100%" style="width: 100%"
/> />
<span <span
style=" margin-left: 8px; font-size: 12px;color: var(--el-text-color-secondary)" style="margin-left: 8px; font-size: 12px; color: var(--el-text-color-secondary)"
>单位</span >单位</span
> >
</ElFormItem> </ElFormItem>
@@ -156,7 +155,7 @@
> >
<ElCard shadow="hover"> <ElCard shadow="hover">
<div style="display: flex; gap: 12px; align-items: flex-start"> <div style="display: flex; gap: 12px; align-items: flex-start">
<div style=" display: flex;flex: 1; flex-direction: column; gap: 12px"> <div style="display: flex; flex: 1; flex-direction: column; gap: 12px">
<!-- 第一行比较运算符和阈值 --> <!-- 第一行比较运算符和阈值 -->
<div style="display: flex; gap: 12px"> <div style="display: flex; gap: 12px">
<div style="flex: 1"> <div style="flex: 1">
@@ -308,7 +307,7 @@
style="width: 100%" style="width: 100%"
/> />
<span <span
style=" margin-left: 8px; font-size: 12px;color: var(--el-text-color-secondary)" style="margin-left: 8px; font-size: 12px; color: var(--el-text-color-secondary)"
>单位</span >单位</span
> >
</ElFormItem> </ElFormItem>
@@ -362,7 +361,7 @@
style="width: 100%" style="width: 100%"
/> />
<span <span
style=" margin-left: 8px; font-size: 12px;color: var(--el-text-color-secondary)" style="margin-left: 8px; font-size: 12px; color: var(--el-text-color-secondary)"
>单位</span >单位</span
> >
</ElFormItem> </ElFormItem>
@@ -438,6 +437,16 @@
placeholder: '请输入系列名称' placeholder: '请输入系列名称'
} }
}, },
{
label: '是否启用',
prop: 'enable_one_time_commission',
type: 'select',
config: {
clearable: true,
placeholder: '是否启用一次性佣金'
},
options: ENABLE_STATUS_OPTIONS
},
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
@@ -447,16 +456,6 @@
placeholder: '请选择状态' placeholder: '请选择状态'
}, },
options: STATUS_SELECT_OPTIONS options: STATUS_SELECT_OPTIONS
},
{
label: '一次性佣金',
prop: 'enable_one_time_commission',
type: 'select',
config: {
clearable: true,
placeholder: '请选择'
},
options: ENABLE_STATUS_OPTIONS
} }
] ]