|
|
@@ -30,7 +30,7 @@ const scqyOptions = ref<{ label: string; value: string }[]>([]);
|
|
|
const jjlxOptions = ref<{ label: string; value: string }[]>([]);
|
|
|
const cplbOptions = ref<{ label: string; value: string }[]>([]);
|
|
|
|
|
|
-// 获取渠道商列表
|
|
|
+// 获取经销商列表
|
|
|
const fetchChannelOptions = async () => {
|
|
|
try {
|
|
|
// 确保清空之前的选项
|
|
|
@@ -45,12 +45,12 @@ const fetchChannelOptions = async () => {
|
|
|
// 从response.Data中获取数据
|
|
|
if (response && response.Data && Array.isArray(response.Data)) {
|
|
|
channelOptions.value = response.Data.map((item: any) => ({
|
|
|
- label: item.usersname || '未命名渠道商',
|
|
|
+ label: item.usersname || '未命名经销商',
|
|
|
value: item.usersid || '',
|
|
|
})).filter((item: any) => item.value);
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- console.error('获取渠道商列表失败', error);
|
|
|
+ console.error('获取经销商列表失败', error);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -105,7 +105,7 @@ const titleMap = {
|
|
|
|
|
|
const getTitle = computed(() => titleMap[formType.value]);
|
|
|
|
|
|
-// 判断是否有默认的渠道商ID
|
|
|
+// 判断是否有默认的经销商ID
|
|
|
const hasDefaultMerchantId = computed(() => {
|
|
|
return (
|
|
|
props.defaultMerchantId &&
|
|
|
@@ -216,20 +216,20 @@ const [BaseForm, baseFormApi] = useVbenForm({
|
|
|
{
|
|
|
component: 'Select',
|
|
|
fieldName: 'productsmerchantid',
|
|
|
- label: '关联渠道商',
|
|
|
+ label: '关联经销商',
|
|
|
componentProps: {
|
|
|
- placeholder: '请选择关联渠道商',
|
|
|
+ placeholder: '请选择关联经销商',
|
|
|
options: channelOptions,
|
|
|
multiple: true,
|
|
|
collapseTags: true,
|
|
|
collapseTagsTooltip: true,
|
|
|
clearable: true,
|
|
|
filterable: true,
|
|
|
- noDataText: '暂无渠道商数据',
|
|
|
+ noDataText: '暂无经销商数据',
|
|
|
loading: false,
|
|
|
style: { width: '100%' },
|
|
|
},
|
|
|
- rules: z.array(z.string()).min(1, { message: '请选择关联渠道商' }),
|
|
|
+ rules: z.array(z.string()).min(1, { message: '请选择关联经销商' }),
|
|
|
// 使用dependencies控制字段显示
|
|
|
dependencies: {
|
|
|
triggerFields: ['productsname'], // 依赖产品名称字段来触发重新计算
|
|
|
@@ -367,14 +367,14 @@ const [Modal, modalApi] = useVbenModal({
|
|
|
commonConfig: { disabled: formType.value === 'detail' },
|
|
|
});
|
|
|
|
|
|
- // 获取渠道商列表和生产企业列表
|
|
|
+ // 获取经销商列表和生产企业列表
|
|
|
await Promise.all([
|
|
|
fetchChannelOptions(),
|
|
|
fetchScqyOptions(),
|
|
|
fetchDictOptions(),
|
|
|
]);
|
|
|
|
|
|
- // 如果有默认的渠道商ID,设置默认值
|
|
|
+ // 如果有默认的经销商ID,设置默认值
|
|
|
if (hasDefaultMerchantId.value && data.value.formType === 'create') {
|
|
|
// 设置默认值
|
|
|
baseFormApi.setValues({
|