✨ 新增未关联业务员客户列表

This commit is contained in:
caojia
2026-10-29 10:35:24 +08:00
parent d02d3dd881
commit eafc8af89a
9 changed files with 172 additions and 1 deletions
@@ -0,0 +1,86 @@
<template>
<el-dialog
:model-value="modelValue"
@update:model-value="$emit('update:modelValue', $event)"
title="未关联业务员客户"
width="min(1100px, 96vw)"
append-to-body
destroy-on-close
@open="handleOpen"
>
<el-table v-loading="loading" :data="customerList" border row-key="customerId" empty-text="暂无未关联业务员的客户">
<el-table-column label="客户编码" prop="customerCode" min-width="120" align="center" />
<el-table-column label="客户名称" prop="customerName" min-width="240" show-overflow-tooltip />
<el-table-column label="对外代码" prop="customerCodeDw" min-width="140" align="center" />
<el-table-column label="源业务员工号" prop="sourceSalesCode" min-width="150" align="center" />
<el-table-column label="业务类型" prop="customerType" width="110" align="center">
<template #default="scope">
<dict-tag :options="customer_type" :value="scope.row.customerType" />
</template>
</el-table-column>
<el-table-column label="启用状态" prop="isEnable" width="110" align="center">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.isEnable" />
</template>
</el-table-column>
<el-table-column label="业务员" width="120" align="center">
<template #default>
<span class="unlinked-label">未关联</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="pageNum"
v-model:limit="pageSize"
@pagination="getList"
/>
<template #footer>
<el-button @click="$emit('update:modelValue', false)">关闭</el-button>
</template>
</el-dialog>
</template>
<script setup>
import { ref } from 'vue'
import { listUnlinkedSalesUserCustomers } from '@/api/customersuppliermanagement/customerinfo/customer'
defineProps({
modelValue: { type: Boolean, default: false }
})
defineEmits(['update:modelValue'])
const { sys_normal_disable, customer_type } = useDict('sys_normal_disable', 'customer_type')
const loading = ref(false)
const customerList = ref([])
const total = ref(0)
const pageNum = ref(1)
const pageSize = ref(10)
function handleOpen() {
pageNum.value = 1
getList()
}
function getList() {
loading.value = true
listUnlinkedSalesUserCustomers({
pageNum: pageNum.value,
pageSize: pageSize.value
}).then(response => {
customerList.value = response.rows || []
total.value = response.total || 0
}).finally(() => {
loading.value = false
})
}
</script>
<style scoped>
.unlinked-label {
color: var(--el-color-warning);
}
</style>
@@ -114,6 +114,15 @@
v-hasPermi="['customersupplier:customerinfo:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="User"
@click="unlinkedSalesDialogVisible = true"
v-hasPermi="['customersupplier:customerinfo:list']"
>未关联业务员</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
@@ -302,6 +311,8 @@
:customer-name="billCustomer.customerName"
/>
<customer-unlinked-sales-dialog v-model="unlinkedSalesDialogVisible" />
<!-- 右键复制列值 -->
<table-copy-menu
ref="copyMenuRef"
@@ -319,6 +330,7 @@ import { useProducts, parseProductCodes } from '@/components/ProductSelect/usePr
import { useUsers } from '@/components/UserSelect/useUsers'
import CustomerLogDialog from './components/CustomerLogDialog.vue'
import CustomerBillListDialog from './customermoney/CustomerBillListDialog.vue'
import CustomerUnlinkedSalesDialog from './components/CustomerUnlinkedSalesDialog.vue'
import { useColumnSettings } from '@/utils/columnSettings'
const { proxy } = getCurrentInstance()
@@ -531,6 +543,7 @@ function handleCustomerMoney(row) {
/** 在客户信息列表内打开只读账单弹窗 */
const billDialogVisible = ref(false)
const billCustomer = ref({})
const unlinkedSalesDialogVisible = ref(false)
function handleViewBills(row) {
if (!row || !row.customerId) {
proxy.$modal.msgWarning('客户信息无效,无法查看账单')