Jelajahi Sumber

feat: 恢复并完善产品管理表单中的关联经销商字段配置

laiqi 10 bulan lalu
induk
melakukan
1caa6d0526
1 mengubah file dengan 23 tambahan dan 23 penghapusan
  1. 23 23
      apps/web-ele/src/views/product-manage/form.vue

+ 23 - 23
apps/web-ele/src/views/product-manage/form.vue

@@ -213,29 +213,29 @@ const [BaseForm, baseFormApi] = useVbenForm({
     //   },
     //   rules: z.string().min(1, { message: '请输入品目' }),
     // },
-    // {
-    //   component: 'Select',
-    //   fieldName: 'productsmerchantid',
-    //   label: '关联经销商',
-    //   componentProps: {
-    //     placeholder: '请选择关联经销商',
-    //     options: channelOptions,
-    //     multiple: true,
-    //     collapseTags: true,
-    //     collapseTagsTooltip: true,
-    //     clearable: true,
-    //     filterable: true,
-    //     noDataText: '暂无经销商数据',
-    //     loading: false,
-    //     style: { width: '100%' },
-    //   },
-    //   rules: z.array(z.string()).min(1, { message: '请选择关联经销商' }),
-    //   // 使用dependencies控制字段显示
-    //   dependencies: {
-    //     triggerFields: ['productsname'], // 依赖产品名称字段来触发重新计算
-    //     show: () => !hasDefaultMerchantId.value, // 当没有默认值时才显示该字段
-    //   },
-    // },
+    {
+      component: 'Select',
+      fieldName: 'productsmerchantid',
+      label: '关联经销商',
+      componentProps: {
+        placeholder: '请选择关联经销商',
+        options: channelOptions,
+        multiple: true,
+        collapseTags: true,
+        collapseTagsTooltip: true,
+        clearable: true,
+        filterable: true,
+        noDataText: '暂无经销商数据',
+        loading: false,
+        style: { width: '100%' },
+      },
+      rules: z.array(z.string()).min(1, { message: '请选择关联经销商' }),
+      // 使用dependencies控制字段显示
+      dependencies: {
+        triggerFields: ['productsname'], // 依赖产品名称字段来触发重新计算
+        show: () => !hasDefaultMerchantId.value, // 当没有默认值时才显示该字段
+      },
+    },
     {
       component: 'Select',
       fieldName: 'productsscqyid',