供应商管理数据同步, tms系统产品,服务渠道,产品渠道关系数据同步

This commit is contained in:
wuweihua
2026-10-12 10:28:06 +08:00
parent d08485d738
commit 2a9825c498
29 changed files with 1646 additions and 127 deletions
@@ -167,7 +167,14 @@
<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 v-if="isColVisible('channelIds')" label="绑定渠道ID" align="center" prop="channelIds" />
<el-table-column v-if="isColVisible('channelIds')" label="绑定渠道" align="center" prop="channelIds" min-width="200">
<template #default="scope">
<span v-if="channelNames(scope.row.channelIds)" :title="channelNames(scope.row.channelIds)">
{{ channelNames(scope.row.channelIds) }}
</span>
<span v-else>-</span>
</template>
</el-table-column>
<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">
@@ -189,10 +196,18 @@
<script setup name="Supplier">
import { listSupplier, delSupplier } from "@/api/customersuppliermanagement/supplierinfo/supplier.js"
import { useChannels, parseChannelCodes } from '@/components/ChannelSelect/useChannels'
import { useColumnSettings } from '@/utils/columnSettings'
const { proxy } = getCurrentInstance()
/** 绑定渠道编码串 -> 渠道编码+名称展示(查不到的渠道回显原编码) */
const { ensureChannels, getChannelLabel } = useChannels()
function channelNames(channelIds) {
return parseChannelCodes(channelIds).map(code => getChannelLabel(code)).join(',')
}
ensureChannels()
/** 可自定义列(默认全部可见;选择列固定、操作列固定右侧不参与设置) */
const columnDefs = [
{ key: 'supplierCode', label: '供应商编码' },
@@ -217,7 +232,7 @@ const columnDefs = [
{ key: 'throwRatio', label: '抛比' },
{ key: 'cooperationStartDate', label: '合作开始日期' },
{ key: 'cooperationStatus', label: '合作状态' },
{ key: 'channelIds', label: '绑定渠道ID' },
{ key: 'channelIds', label: '绑定渠道' },
{ key: 'remark', label: '备注说明' }
]
const { colVisible, isColVisible, toggleColumn, resetColumns } = useColumnSettings('supplier-info-list', columnDefs)