This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<div class="voucher-upload__text">将{{ voucherName }}拖到此处,或<em>点击上传</em></div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">
|
||||
支持多张图片或附件,最多上传 {{ maxCount }} 个文件;点击上传区域后可粘贴文件
|
||||
支持多张图片或附件,最多上传 {{ maxCount }} 个文件;可粘贴文件。
|
||||
</div>
|
||||
</template>
|
||||
<template #file="{ file }">
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
<ArtSearchBar
|
||||
v-model:filter="searchForm"
|
||||
:items="searchFormItems"
|
||||
:show-expand="false"
|
||||
label-width="90"
|
||||
:show-expand="true"
|
||||
@reset="handleReset"
|
||||
@search="handleSearch"
|
||||
></ArtSearchBar>
|
||||
@@ -216,6 +215,7 @@
|
||||
import { generateEnterpriseCode } from '@/utils/codeGenerator'
|
||||
import { formatDateTime } from '@/utils/business/format'
|
||||
import { regionData } from '@/utils/constants/regionData'
|
||||
import { STATUS_SELECT_OPTIONS } from '@/config/constants'
|
||||
|
||||
defineOptions({ name: 'EnterpriseCustomer' })
|
||||
|
||||
@@ -236,6 +236,7 @@
|
||||
const shopLoading = ref(false)
|
||||
const tableRef = ref()
|
||||
const currentEnterpriseId = ref<number>(0)
|
||||
const shopList = ref<any[]>([])
|
||||
// 店铺级联选择相关
|
||||
const shopCascadeOptions = ref<any[]>([])
|
||||
const shopCascadeProps = {
|
||||
@@ -272,20 +273,15 @@
|
||||
enterprise_name: '',
|
||||
login_phone: '',
|
||||
contact_phone: '',
|
||||
owner_shop_id: undefined as number | undefined,
|
||||
status: undefined as number | undefined
|
||||
}
|
||||
|
||||
// 搜索表单
|
||||
const searchForm = reactive({ ...initialSearchState })
|
||||
|
||||
// 状态选项
|
||||
const statusOptions = [
|
||||
{ label: '启用', value: 1 },
|
||||
{ label: '禁用', value: 0 }
|
||||
]
|
||||
|
||||
// 搜索表单配置
|
||||
const searchFormItems: SearchFormItem[] = [
|
||||
const searchFormItems = computed<SearchFormItem[]>(() => [
|
||||
{
|
||||
label: '企业名称',
|
||||
prop: 'enterprise_name',
|
||||
@@ -296,7 +292,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '登录手机号',
|
||||
label: '登录手机',
|
||||
prop: 'login_phone',
|
||||
type: 'input',
|
||||
config: {
|
||||
@@ -305,7 +301,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '联系人电话',
|
||||
label: '联系电话',
|
||||
prop: 'contact_phone',
|
||||
type: 'input',
|
||||
config: {
|
||||
@@ -313,17 +309,34 @@
|
||||
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: '状态',
|
||||
prop: 'status',
|
||||
type: 'select',
|
||||
options: STATUS_SELECT_OPTIONS,
|
||||
config: {
|
||||
clearable: true,
|
||||
placeholder: '请选择状态',
|
||||
options: statusOptions
|
||||
placeholder: '请选择状态'
|
||||
}
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
// 分页
|
||||
const pagination = reactive({
|
||||
@@ -517,6 +530,7 @@
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
handleSearchOwnerShop('')
|
||||
getTableData()
|
||||
})
|
||||
|
||||
@@ -555,6 +569,22 @@
|
||||
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) => {
|
||||
if (Array.isArray(value) && value.length > 0) {
|
||||
@@ -574,6 +604,7 @@
|
||||
enterprise_name: searchForm.enterprise_name || undefined,
|
||||
login_phone: searchForm.login_phone || undefined,
|
||||
contact_phone: searchForm.contact_phone || undefined,
|
||||
owner_shop_id: searchForm.owner_shop_id ?? undefined,
|
||||
status: searchForm.status
|
||||
}
|
||||
const res = await EnterpriseService.getEnterprises(params)
|
||||
|
||||
@@ -1796,19 +1796,6 @@
|
||||
{ label: '否', value: false }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '是否绑设备',
|
||||
prop: 'is_standalone',
|
||||
type: 'select',
|
||||
config: {
|
||||
clearable: true,
|
||||
placeholder: '全部'
|
||||
},
|
||||
options: () => [
|
||||
{ label: '未绑定设备', value: true },
|
||||
{ label: '已绑定设备', value: false }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '有无换卡',
|
||||
prop: 'is_replaced',
|
||||
@@ -1839,6 +1826,19 @@
|
||||
clearable: true,
|
||||
placeholder: '请输入ICCID结束号'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '是否绑设备',
|
||||
prop: 'is_standalone',
|
||||
type: 'select',
|
||||
config: {
|
||||
clearable: true,
|
||||
placeholder: '全部'
|
||||
},
|
||||
options: () => [
|
||||
{ label: '未绑定设备', value: true },
|
||||
{ label: '已绑定设备', value: false }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
:items="searchFormItems"
|
||||
:gutter="16"
|
||||
:el-col-span="6"
|
||||
label-width="100"
|
||||
:show-expand="false"
|
||||
@reset="handleReset"
|
||||
@search="handleSearch"
|
||||
@@ -569,7 +568,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '主账号用户名',
|
||||
label: '用户名',
|
||||
prop: 'username',
|
||||
type: 'input',
|
||||
config: {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<ArtSearchBar
|
||||
v-model:filter="commissionSearchForm"
|
||||
:items="commissionSearchItems"
|
||||
:show-expand="false"
|
||||
show-expand
|
||||
@reset="handleCommissionReset"
|
||||
@search="handleCommissionSearch"
|
||||
/>
|
||||
@@ -273,7 +273,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
label: '结算状态',
|
||||
prop: 'status',
|
||||
type: 'select',
|
||||
options: [
|
||||
@@ -315,7 +315,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '时间范围',
|
||||
label: '起止时间',
|
||||
prop: 'dateRange',
|
||||
type: 'date',
|
||||
config: {
|
||||
@@ -518,7 +518,7 @@
|
||||
// 搜索表单配置
|
||||
const withdrawalSearchItems = computed<SearchFormItem[]>(() => [
|
||||
{
|
||||
label: '状态',
|
||||
label: '审核状态',
|
||||
prop: 'status',
|
||||
type: 'select',
|
||||
options: [
|
||||
@@ -533,7 +533,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '时间范围',
|
||||
label: '起止时间',
|
||||
prop: 'dateRange',
|
||||
type: 'date',
|
||||
config: {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
v-model:filter="searchForm"
|
||||
:items="searchFormItems"
|
||||
show-expand
|
||||
label-width="100"
|
||||
@reset="handleReset"
|
||||
@search="handleSearch"
|
||||
></ArtSearchBar>
|
||||
@@ -152,17 +151,17 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
label: '审核状态',
|
||||
prop: 'status',
|
||||
type: 'select',
|
||||
options: withdrawalStatusOptions,
|
||||
config: {
|
||||
clearable: true,
|
||||
placeholder: '请选择状态'
|
||||
placeholder: '请选择审核状态'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '开始至结束',
|
||||
label: '起止时间',
|
||||
prop: 'dateRange',
|
||||
type: 'date',
|
||||
config: {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
v-model:filter="searchForm"
|
||||
:items="searchFormItems"
|
||||
:show-expand="false"
|
||||
label-width="100"
|
||||
@reset="handleReset"
|
||||
@search="handleSearch"
|
||||
></ArtSearchBar>
|
||||
@@ -260,7 +259,7 @@
|
||||
// 搜索表单配置
|
||||
const searchFormItems: SearchFormItem[] = [
|
||||
{
|
||||
label: '店铺',
|
||||
label: '店铺名称',
|
||||
prop: 'shop_id',
|
||||
type: 'select',
|
||||
placeholder: '请选择店铺',
|
||||
@@ -277,7 +276,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
label: '支付状态',
|
||||
prop: 'status',
|
||||
type: 'select',
|
||||
placeholder: '请选择状态',
|
||||
@@ -291,7 +290,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '开始至结束',
|
||||
label: '起止时间',
|
||||
prop: 'dateRange',
|
||||
type: 'date',
|
||||
config: {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
v-model:filter="searchForm"
|
||||
:items="searchFormItems"
|
||||
:show-expand="false"
|
||||
label-width="85"
|
||||
@reset="handleReset"
|
||||
@search="handleSearch"
|
||||
></ArtSearchBar>
|
||||
@@ -113,7 +112,7 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
<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
|
||||
>
|
||||
</ElFormItem>
|
||||
@@ -138,7 +137,7 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
<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
|
||||
>
|
||||
</ElFormItem>
|
||||
@@ -156,7 +155,7 @@
|
||||
>
|
||||
<ElCard shadow="hover">
|
||||
<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="flex: 1">
|
||||
@@ -308,7 +307,7 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
<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
|
||||
>
|
||||
</ElFormItem>
|
||||
@@ -362,7 +361,7 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
<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
|
||||
>
|
||||
</ElFormItem>
|
||||
@@ -438,6 +437,16 @@
|
||||
placeholder: '请输入系列名称'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '是否启用',
|
||||
prop: 'enable_one_time_commission',
|
||||
type: 'select',
|
||||
config: {
|
||||
clearable: true,
|
||||
placeholder: '是否启用一次性佣金'
|
||||
},
|
||||
options: ENABLE_STATUS_OPTIONS
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
prop: 'status',
|
||||
@@ -447,16 +456,6 @@
|
||||
placeholder: '请选择状态'
|
||||
},
|
||||
options: STATUS_SELECT_OPTIONS
|
||||
},
|
||||
{
|
||||
label: '一次性佣金',
|
||||
prop: 'enable_one_time_commission',
|
||||
type: 'select',
|
||||
config: {
|
||||
clearable: true,
|
||||
placeholder: '请选择'
|
||||
},
|
||||
options: ENABLE_STATUS_OPTIONS
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user