余额额度流水加导出
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<el-popover :width="240" placement="bottom-end" trigger="click">
|
||||
<template #reference>
|
||||
<el-button circle plain icon="Operation" title="列设置" aria-label="列设置" />
|
||||
</template>
|
||||
<div class="column-settings">
|
||||
<div class="column-settings__header">
|
||||
<span class="column-settings__title">列展示设置</span>
|
||||
<el-button link type="primary" size="small" @click="emit('reset')">恢复默认</el-button>
|
||||
</div>
|
||||
<el-checkbox-group v-model="checkedKeys" class="column-settings__body">
|
||||
<el-checkbox
|
||||
v-for="c in columns"
|
||||
:key="c.key"
|
||||
:value="c.key"
|
||||
:disabled="c.fixed"
|
||||
>{{ c.label }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
|
||||
<script setup name="ColumnSettings">
|
||||
/**
|
||||
* 表格列设置弹窗(与 useColumnSettings 配合):
|
||||
* <column-settings :columns="columnDefs" :visible-map="colVisible" @reset="resetColumns" />
|
||||
*/
|
||||
const props = defineProps({
|
||||
columns: { type: Array, default: () => [] },
|
||||
visibleMap: { type: Object, required: true }
|
||||
})
|
||||
const emit = defineEmits(['reset'])
|
||||
|
||||
const checkedKeys = computed({
|
||||
get() {
|
||||
return props.columns.filter(c => props.visibleMap[c.key] !== false).map(c => c.key)
|
||||
},
|
||||
set(keys) {
|
||||
props.columns.forEach(c => {
|
||||
if (c.fixed) return
|
||||
props.visibleMap[c.key] = keys.includes(c.key)
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.column-settings__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid var(--el-border-color-lighter);
|
||||
}
|
||||
.column-settings__title {
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
}
|
||||
.column-settings__body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 320px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.column-settings__body :deep(.el-checkbox) {
|
||||
margin-right: 0;
|
||||
height: 28px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,9 +1,11 @@
|
||||
import hasRole from './permission/hasRole'
|
||||
import hasPermi from './permission/hasPermi'
|
||||
import copyText from './common/copyText'
|
||||
import resizableColumn from './resizableColumn'
|
||||
|
||||
export default function directive(app){
|
||||
app.directive('hasRole', hasRole)
|
||||
app.directive('hasPermi', hasPermi)
|
||||
app.directive('copyText', copyText)
|
||||
app.directive('resizable', resizableColumn)
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* v-resizable —— 让 el-table 表头右边界可拖拽调整列宽。
|
||||
*
|
||||
* 原理:在表格根元素上做事件委托。当鼠标点按落在表头某个 th 右边界(约 8px 内)时,进入拖拽;
|
||||
* 拖拽过程中动态改写该列对应 <col> 与 th 的 width,从而整列变宽/变窄(跨表头与数据区)。
|
||||
* 不依赖 el-table 原生的 .el-table__column-resizer(当前运行环境未渲染,故自实现)。
|
||||
*
|
||||
* 用法:<el-table v-resizable border :data="..."> ... </el-table>
|
||||
*/
|
||||
const EDGE = 8 // 判定"右边界"的像素容差
|
||||
|
||||
function colIndex(th) {
|
||||
const row = th.parentNode
|
||||
return Array.prototype.indexOf.call(row.children, th)
|
||||
}
|
||||
|
||||
/**
|
||||
* 同时改写表头与表体的列宽。
|
||||
* el-table 将表头和表体渲染为两张独立的 <table>(各自带 colgroup),
|
||||
* 仅改一张会导致表头与数据行错位,因此须对主结构(.el-table__inner-wrapper)里的所有 table 一并更新。
|
||||
*/
|
||||
function applyWidth(scopeEl, idx, w) {
|
||||
scopeEl.querySelectorAll('table').forEach(tbl => {
|
||||
// 跳过固定附表(fixed 列独立渲染,索引语义不同,避免误改)
|
||||
if (tbl.closest('.el-table__fixed, .el-table-fixed-column')) return
|
||||
const col = tbl.querySelector('colgroup') && tbl.querySelector('colgroup').children[idx]
|
||||
if (col) col.style.width = w + 'px'
|
||||
tbl.querySelectorAll('tr').forEach(tr => {
|
||||
const cell = tr.children[idx]
|
||||
if (!cell) return
|
||||
cell.style.width = w + 'px'
|
||||
if (cell.tagName === 'TH') {
|
||||
cell.style.minWidth = ''
|
||||
cell.style.maxWidth = ''
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function bindDrag(tableEl) {
|
||||
let dragging = null
|
||||
|
||||
function onMouseMove(e) {
|
||||
if (!dragging) return
|
||||
const dx = e.clientX - dragging.startX
|
||||
const w = Math.max(dragging.minWidth || 60, dragging.startWidth + dx)
|
||||
applyWidth(tableEl, dragging.idx, w)
|
||||
dragging.lastWidth = w
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
function onMouseUp() {
|
||||
if (dragging) {
|
||||
document.removeEventListener('mousemove', onMouseMove)
|
||||
document.removeEventListener('mouseup', onMouseUp)
|
||||
document.body.style.cursor = ''
|
||||
document.body.style.userSelect = ''
|
||||
dragging = null
|
||||
}
|
||||
}
|
||||
|
||||
tableEl.addEventListener('mousedown', (e) => {
|
||||
const target = e.target
|
||||
const th = target.closest('th')
|
||||
if (!th || !tableEl.contains(th)) return
|
||||
// 固定列(fixed left/right)不参与拖拽
|
||||
if (th.classList.contains('el-table-fixed-column') || th.className.indexOf('fixed') > -1) return
|
||||
|
||||
const rect = th.getBoundingClientRect()
|
||||
if (e.clientX < rect.right - EDGE) return // 只有贴近右边界才触发
|
||||
|
||||
const idx = colIndex(th)
|
||||
|
||||
dragging = {
|
||||
startX: e.clientX,
|
||||
startWidth: rect.width,
|
||||
minWidth: Number(th.dataset.resizableMin) || 40,
|
||||
idx,
|
||||
th
|
||||
}
|
||||
document.body.style.cursor = 'col-resize'
|
||||
document.body.style.userSelect = 'none'
|
||||
document.addEventListener('mousemove', onMouseMove)
|
||||
document.addEventListener('mouseup', onMouseUp)
|
||||
e.preventDefault()
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
mounted(el) {
|
||||
bindDrag(el)
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,8 @@ import UserName from '@/components/UserName'
|
||||
import ProductSelect from '@/components/ProductSelect'
|
||||
// 多值输入组件(一个字段搜索多个值,如订单号批量搜索)
|
||||
import MultiValueInput from '@/components/MultiValueInput'
|
||||
// 表格列设置组件(自定义列显隐)
|
||||
import ColumnSettings from '@/components/ColumnSettings'
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
@@ -87,6 +89,7 @@ app.component('UserSelect', UserSelect)
|
||||
app.component('UserName', UserName)
|
||||
app.component('ProductSelect', ProductSelect)
|
||||
app.component('MultiValueInput', MultiValueInput)
|
||||
app.component('ColumnSettings', ColumnSettings)
|
||||
|
||||
app.use(router)
|
||||
app.use(store)
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* 表格列显隐偏好(localStorage 持久化)。
|
||||
*
|
||||
* @param {string} storageKey 存储键(页面级唯一,如 'customer-list')
|
||||
* @param {Array<{key:string,label:string,fixed?:boolean,defaultVisible?:boolean}>} columns 列定义
|
||||
* @returns {{colVisible: object, isColVisible: Function, resetColumns: Function}}
|
||||
* colVisible 响应式显隐映射,模板中 v-if="isColVisible('xxx')"
|
||||
* resetColumns 恢复默认(供列设置弹窗调用)
|
||||
*/
|
||||
const PREFIX = 'bms:columnSettings:'
|
||||
|
||||
export function useColumnSettings(storageKey, columns) {
|
||||
const defaults = {}
|
||||
columns.forEach(c => {
|
||||
defaults[c.key] = c.defaultVisible !== false
|
||||
})
|
||||
|
||||
let saved = {}
|
||||
try {
|
||||
saved = JSON.parse(localStorage.getItem(PREFIX + storageKey) || '{}') || {}
|
||||
} catch (e) {
|
||||
saved = {}
|
||||
}
|
||||
|
||||
// 仅接受当前列定义中存在的 key(兼容历史存储与列增减)
|
||||
const colVisible = reactive({ ...defaults })
|
||||
columns.forEach(c => {
|
||||
if (Object.prototype.hasOwnProperty.call(saved, c.key)) {
|
||||
colVisible[c.key] = !!saved[c.key]
|
||||
}
|
||||
// 固定列强制可见
|
||||
if (c.fixed) colVisible[c.key] = true
|
||||
})
|
||||
|
||||
watch(colVisible, val => {
|
||||
localStorage.setItem(PREFIX + storageKey, JSON.stringify(val))
|
||||
}, { deep: true })
|
||||
|
||||
function isColVisible(key) {
|
||||
return colVisible[key] !== false
|
||||
}
|
||||
|
||||
function resetColumns() {
|
||||
columns.forEach(c => {
|
||||
colVisible[c.key] = c.fixed ? true : c.defaultVisible !== false
|
||||
})
|
||||
}
|
||||
|
||||
return { colVisible, isColVisible, resetColumns }
|
||||
}
|
||||
@@ -110,6 +110,8 @@
|
||||
<el-button icon="Refresh" @click="resetReceiptQuery">重置</el-button>
|
||||
<el-button type="success" icon="Plus" @click="handleAddReceipt"
|
||||
v-hasPermi="['customersupplier:customerinfo:add']">登记收款</el-button>
|
||||
<el-button type="warning" icon="Download" @click="handleExportReceipt"
|
||||
v-hasPermi="['customersupplier:customerinfo:export']">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -220,6 +222,8 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getFlowList">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetFlowQuery">重置</el-button>
|
||||
<el-button type="warning" icon="Download" @click="handleExportFlow"
|
||||
v-hasPermi="['customersupplier:customerinfo:export']">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -296,6 +300,8 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="getCreditFlowList">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetCreditFlowQuery">重置</el-button>
|
||||
<el-button type="warning" icon="Download" @click="handleExportCreditFlow"
|
||||
v-hasPermi="['customersupplier:customerinfo:export']">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -1356,6 +1362,39 @@ function resetReceiptQuery() {
|
||||
getReceiptList()
|
||||
}
|
||||
|
||||
/** 导出收款记录(按当前筛选,全量导出) */
|
||||
function handleExportReceipt() {
|
||||
const cid = route.query.customerId
|
||||
if (!cid) return
|
||||
const params = proxy.addDateRange({ ...receiptQuery }, receiptDateRange.value)
|
||||
delete params.pageNum
|
||||
delete params.pageSize
|
||||
proxy.download('customersupplier/customermoney/receipt/export', params,
|
||||
`收款记录_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
/** 导出余额流水(按当前筛选,全量导出) */
|
||||
function handleExportFlow() {
|
||||
const cid = route.query.customerId
|
||||
if (!cid) return
|
||||
const params = proxy.addDateRange({ ...flowQuery }, flowDateRange.value)
|
||||
delete params.pageNum
|
||||
delete params.pageSize
|
||||
proxy.download('customersupplier/customermoney/flow/export', params,
|
||||
`余额流水_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
/** 导出额度流水(按当前筛选,全量导出) */
|
||||
function handleExportCreditFlow() {
|
||||
const cid = route.query.customerId
|
||||
if (!cid) return
|
||||
const params = proxy.addDateRange({ ...creditFlowQuery }, creditFlowDateRange.value)
|
||||
delete params.pageNum
|
||||
delete params.pageSize
|
||||
proxy.download('customersupplier/customermoney/credit/flow/export', params,
|
||||
`额度流水_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
/** 审核通过 */
|
||||
function handleConfirmReceipt(row) {
|
||||
proxy.$modal.confirm(`是否确认审核通过收款单「${row.receiptNo}」?审核通过后金额将计入客户余额。`).then(() => {
|
||||
|
||||
@@ -115,49 +115,50 @@
|
||||
</el-col>
|
||||
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<column-settings :columns="columnDefs" :visible-map="colVisible" @reset="resetColumns" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table v-loading="loading" v-resizable border :data="customerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" fixed="left" />
|
||||
<!-- <el-table-column label="客户ID" align="center" prop="customerId" />-->
|
||||
<el-table-column label="客户编码" align="center" prop="customerCode" />
|
||||
<el-table-column label="客户名称" align="center" prop="customerName" />
|
||||
<el-table-column label="对外代码" align="center" prop="customerCodeDw" />
|
||||
<el-table-column label="统一社会信用代码" align="center" prop="creditCode" />
|
||||
<el-table-column label="业务类型" align="center" prop="customerType">
|
||||
<el-table-column v-if="isColVisible('customerCode')" label="客户编码" align="center" prop="customerCode" />
|
||||
<el-table-column v-if="isColVisible('customerName')" label="客户名称" align="center" prop="customerName" :show-overflow-tooltip="true" />
|
||||
<el-table-column v-if="isColVisible('customerCodeDw')" label="对外代码" align="center" prop="customerCodeDw" />
|
||||
<el-table-column v-if="isColVisible('creditCode')" label="统一社会信用代码" align="center" prop="creditCode" />
|
||||
<el-table-column v-if="isColVisible('customerType')" label="业务类型" align="center" prop="customerType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="customer_type" :value="scope.row.customerType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="启用状态" align="center" prop="isEnable">
|
||||
<el-table-column v-if="isColVisible('isEnable')" label="启用状态" align="center" prop="isEnable">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.isEnable" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="业务员" align="center" prop="salesUserId">
|
||||
<el-table-column v-if="isColVisible('salesUserId')" label="业务员" align="center" prop="salesUserId">
|
||||
<template #default="scope"><user-name :user-id="scope.row.salesUserId" /></template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="资金额度" align="center" prop="ed" />
|
||||
<el-table-column label="回款账期" align="center" prop="zq" />
|
||||
<el-table-column label="结算员" align="center" prop="settlementUserId">
|
||||
<el-table-column v-if="isColVisible('ed')" label="资金额度" align="center" prop="ed" />
|
||||
<el-table-column v-if="isColVisible('zq')" label="回款账期" align="center" prop="zq" />
|
||||
<el-table-column v-if="isColVisible('settlementUserId')" label="结算员" align="center" prop="settlementUserId">
|
||||
<template #default="scope"><user-name :user-id="scope.row.settlementUserId" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客服" align="center" prop="serviceUserId">
|
||||
<el-table-column v-if="isColVisible('serviceUserId')" label="客服" align="center" prop="serviceUserId">
|
||||
<template #default="scope"><user-name :user-id="scope.row.serviceUserId" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算方式" align="center" prop="settlementType">
|
||||
<el-table-column v-if="isColVisible('settlementType')" label="结算方式" align="center" prop="settlementType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="settlement_type" :value="scope.row.settlementType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="临时额度" align="center" prop="tempEd" />
|
||||
<el-table-column label="账户余额(CNY)" align="center" prop="accountBalance" width="130">
|
||||
<el-table-column v-if="isColVisible('tempEd')" label="临时额度" align="center" prop="tempEd" />
|
||||
<el-table-column v-if="isColVisible('accountBalance')" label="账户余额(CNY)" align="center" prop="accountBalance" width="130">
|
||||
<template #default="scope">{{ formatBalance(scope.row.accountBalance) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量阈值" align="center" prop="weightThreshold" />
|
||||
<el-table-column label="抛比" align="center" prop="throwRatio" />
|
||||
<el-table-column label="信用额度" align="center" prop="creditEd">
|
||||
<el-table-column v-if="isColVisible('weightThreshold')" label="重量阈值" align="center" prop="weightThreshold" />
|
||||
<el-table-column v-if="isColVisible('throwRatio')" label="抛比" align="center" prop="throwRatio" />
|
||||
<el-table-column v-if="isColVisible('creditEd')" label="信用额度" align="center" prop="creditEd">
|
||||
<template #default="scope">
|
||||
<span v-if="Number(scope.row.creditEd) < 0" style="color: var(--el-color-danger); font-weight: 600;"
|
||||
title="已用额度超过授信总额(如临时额度已到期),客户回款核销后恢复">
|
||||
@@ -166,7 +167,7 @@
|
||||
<span v-else>{{ scope.row.creditEd }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="绑定产品" align="center" prop="productIds" min-width="180">
|
||||
<el-table-column v-if="isColVisible('productIds')" label="绑定产品" align="center" prop="productIds" min-width="180">
|
||||
<template #default="scope">
|
||||
<span v-if="productNames(scope.row.productIds)" :title="productNames(scope.row.productIds)">
|
||||
{{ productNames(scope.row.productIds) }}
|
||||
@@ -174,8 +175,8 @@
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注说明" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="240">
|
||||
<el-table-column v-if="isColVisible('remark')" label="备注说明" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="240" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['customersupplier:customerinfo:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['customersupplier:customerinfo:remove']">删除</el-button>
|
||||
@@ -198,9 +199,34 @@
|
||||
<script setup name="Customer">
|
||||
import { listCustomer, delCustomer } from "@/api/customersuppliermanagement/customerinfo/customer.js"
|
||||
import { useProducts, parseProductIds } from '@/components/ProductSelect/useProducts'
|
||||
import { useColumnSettings } from '@/utils/columnSettings'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
/** 可自定义列(默认全部可见;选择列固定、操作列固定右侧不参与设置) */
|
||||
const columnDefs = [
|
||||
{ key: 'customerCode', label: '客户编码' },
|
||||
{ key: 'customerName', label: '客户名称' },
|
||||
{ key: 'customerCodeDw', label: '对外代码' },
|
||||
{ key: 'creditCode', label: '统一社会信用代码' },
|
||||
{ key: 'customerType', label: '业务类型' },
|
||||
{ key: 'isEnable', label: '启用状态' },
|
||||
{ key: 'salesUserId', label: '业务员' },
|
||||
{ key: 'ed', label: '资金额度' },
|
||||
{ key: 'zq', label: '回款账期' },
|
||||
{ key: 'settlementUserId', label: '结算员' },
|
||||
{ key: 'serviceUserId', label: '客服' },
|
||||
{ key: 'settlementType', label: '结算方式' },
|
||||
{ key: 'tempEd', label: '临时额度' },
|
||||
{ key: 'accountBalance', label: '账户余额(CNY)' },
|
||||
{ key: 'weightThreshold', label: '重量阈值' },
|
||||
{ key: 'throwRatio', label: '抛比' },
|
||||
{ key: 'creditEd', label: '信用额度' },
|
||||
{ key: 'productIds', label: '绑定产品' },
|
||||
{ key: 'remark', label: '备注说明' }
|
||||
]
|
||||
const { colVisible, isColVisible, resetColumns } = useColumnSettings('customer-info-list', columnDefs)
|
||||
|
||||
const customerList = ref([])
|
||||
const loading = ref(true)
|
||||
const showSearch = ref(true)
|
||||
|
||||
@@ -96,53 +96,54 @@
|
||||
</el-col>
|
||||
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<column-settings :columns="columnDefs" :visible-map="colVisible" @reset="resetColumns" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="supplierList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="供应商编码" align="center" prop="supplierCode" />
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName" />
|
||||
<el-table-column label="对外代码" align="center" prop="supplierCodeDw" />
|
||||
<el-table-column label="统一社会信用代码" align="center" prop="creditCode" />
|
||||
<el-table-column label="供应商类型" align="center" prop="supplierType">
|
||||
<el-table v-loading="loading" v-resizable border :data="supplierList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" fixed="left" />
|
||||
<el-table-column v-if="isColVisible('supplierCode')" label="供应商编码" align="center" prop="supplierCode" />
|
||||
<el-table-column v-if="isColVisible('supplierName')" label="供应商名称" align="center" prop="supplierName" :show-overflow-tooltip="true" />
|
||||
<el-table-column v-if="isColVisible('supplierCodeDw')" label="对外代码" align="center" prop="supplierCodeDw" />
|
||||
<el-table-column v-if="isColVisible('creditCode')" label="统一社会信用代码" align="center" prop="creditCode" />
|
||||
<el-table-column v-if="isColVisible('supplierType')" label="供应商类型" align="center" prop="supplierType">
|
||||
<template #default="scope">{{ formatOption(supplierTypeOptions, scope.row.supplierType) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="启用状态" align="center" prop="isEnable">
|
||||
<el-table-column v-if="isColVisible('isEnable')" label="启用状态" align="center" prop="isEnable">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.isEnable" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" prop="purchaserUserId">
|
||||
<el-table-column v-if="isColVisible('purchaserUserId')" label="采购员" align="center" prop="purchaserUserId">
|
||||
<template #default="scope"><user-name :user-id="scope.row.purchaserUserId" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="应付额度" align="center" prop="ed" />
|
||||
<el-table-column label="应付账期" align="center" prop="zq" />
|
||||
<el-table-column label="结算员" align="center" prop="settlementUserId">
|
||||
<el-table-column v-if="isColVisible('ed')" label="应付额度" align="center" prop="ed" />
|
||||
<el-table-column v-if="isColVisible('zq')" label="应付账期" align="center" prop="zq" />
|
||||
<el-table-column v-if="isColVisible('settlementUserId')" label="结算员" align="center" prop="settlementUserId">
|
||||
<template #default="scope"><user-name :user-id="scope.row.settlementUserId" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="跟单员" align="center" prop="serviceUserId">
|
||||
<el-table-column v-if="isColVisible('serviceUserId')" label="跟单员" align="center" prop="serviceUserId">
|
||||
<template #default="scope"><user-name :user-id="scope.row.serviceUserId" /></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算方式" align="center" prop="settlementType">
|
||||
<el-table-column v-if="isColVisible('settlementType')" label="结算方式" align="center" prop="settlementType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="settlement_type" :value="scope.row.settlementType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="临时额度" align="center" prop="tempEd" />
|
||||
<el-table-column label="应付余额" align="center" prop="accountBalance" />
|
||||
<el-table-column label="外币应付余额" align="center" prop="foreignCurrencyBalance" />
|
||||
<el-table-column label="信用额度" align="center" prop="creditEd" />
|
||||
<el-table-column label="重量阈值" align="center" prop="weightThreshold" />
|
||||
<el-table-column label="抛比" align="center" prop="throwRatio" />
|
||||
<el-table-column label="合作开始日期" align="center" prop="cooperationStartDate">
|
||||
<el-table-column v-if="isColVisible('tempEd')" label="临时额度" align="center" prop="tempEd" />
|
||||
<el-table-column v-if="isColVisible('accountBalance')" label="应付余额" align="center" prop="accountBalance" />
|
||||
<el-table-column v-if="isColVisible('foreignCurrencyBalance')" label="外币应付余额" align="center" prop="foreignCurrencyBalance" />
|
||||
<el-table-column v-if="isColVisible('creditEd')" label="信用额度" align="center" prop="creditEd" />
|
||||
<el-table-column v-if="isColVisible('weightThreshold')" label="重量阈值" align="center" prop="weightThreshold" />
|
||||
<el-table-column v-if="isColVisible('throwRatio')" label="抛比" align="center" prop="throwRatio" />
|
||||
<el-table-column v-if="isColVisible('cooperationStartDate')" label="合作开始日期" align="center" prop="cooperationStartDate">
|
||||
<template #default="scope">{{ formatDateOnly(scope.row.cooperationStartDate) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合作状态" align="center" prop="cooperationStatus">
|
||||
<el-table-column v-if="isColVisible('cooperationStatus')" label="合作状态" align="center" prop="cooperationStatus">
|
||||
<template #default="scope">{{ formatOption(cooperationStatusOptions, scope.row.cooperationStatus) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="绑定渠道ID" align="center" prop="channelIds" />
|
||||
<el-table-column label="备注说明" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
|
||||
<el-table-column v-if="isColVisible('channelIds')" label="绑定渠道ID" align="center" prop="channelIds" />
|
||||
<el-table-column v-if="isColVisible('remark')" label="备注说明" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['customersupplier:supplierinfo:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['customersupplier:supplierinfo:remove']">删除</el-button>
|
||||
@@ -162,9 +163,37 @@
|
||||
|
||||
<script setup name="Supplier">
|
||||
import { listSupplier, delSupplier } from "@/api/customersuppliermanagement/supplierinfo/supplier.js"
|
||||
import { useColumnSettings } from '@/utils/columnSettings'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
/** 可自定义列(默认全部可见;选择列固定、操作列固定右侧不参与设置) */
|
||||
const columnDefs = [
|
||||
{ key: 'supplierCode', label: '供应商编码' },
|
||||
{ key: 'supplierName', label: '供应商名称' },
|
||||
{ key: 'supplierCodeDw', label: '对外代码' },
|
||||
{ key: 'creditCode', label: '统一社会信用代码' },
|
||||
{ key: 'supplierType', label: '供应商类型' },
|
||||
{ key: 'isEnable', label: '启用状态' },
|
||||
{ key: 'purchaserUserId', label: '采购员' },
|
||||
{ key: 'ed', label: '应付额度' },
|
||||
{ key: 'zq', label: '应付账期' },
|
||||
{ key: 'settlementUserId', label: '结算员' },
|
||||
{ key: 'serviceUserId', label: '跟单员' },
|
||||
{ key: 'settlementType', label: '结算方式' },
|
||||
{ key: 'tempEd', label: '临时额度' },
|
||||
{ key: 'accountBalance', label: '应付余额' },
|
||||
{ key: 'foreignCurrencyBalance', label: '外币应付余额' },
|
||||
{ key: 'creditEd', label: '信用额度' },
|
||||
{ key: 'weightThreshold', label: '重量阈值' },
|
||||
{ key: 'throwRatio', label: '抛比' },
|
||||
{ key: 'cooperationStartDate', label: '合作开始日期' },
|
||||
{ key: 'cooperationStatus', label: '合作状态' },
|
||||
{ key: 'channelIds', label: '绑定渠道ID' },
|
||||
{ key: 'remark', label: '备注说明' }
|
||||
]
|
||||
const { colVisible, isColVisible, resetColumns } = useColumnSettings('supplier-info-list', columnDefs)
|
||||
|
||||
const supplierList = ref([])
|
||||
const loading = ref(true)
|
||||
const showSearch = ref(true)
|
||||
|
||||
Reference in New Issue
Block a user