tangning 4 miesięcy temu
rodzic
commit
c3b07bdbb8

+ 15 - 6
src/components/Form/src/components/FormItem.vue

@@ -47,8 +47,10 @@
         type: Object as PropType<FormActionType>,
       },
       validateFields: {
-      type: Function as PropType<(nameList?: NamePath[], options?: ValidateOptions) => Promise<void> >,
-      default: null,
+        type: Function as PropType<
+          (nameList?: NamePath[], options?: ValidateOptions) => Promise<void>
+        >,
+        default: null,
       },
     },
     setup(props, { slots }) {
@@ -246,10 +248,10 @@
             props.setFormModel(field, value);
             // 这个也要添加
             props.validateFields([field], { triggerName: 'change' }).catch(() => {});
-            },
-            onBlur: () => {
+          },
+          onBlur: () => {
             props.validateFields([field], { triggerName: 'blur' }).catch(() => {});
-            },
+          },
         };
         const Comp = componentMap.get(component) as ReturnType<typeof defineComponent>;
 
@@ -316,7 +318,14 @@
       }
 
       function renderItem() {
-        const { itemProps, slot, render, field, suffix, component } = props.schema;
+        const {
+          itemProps = { autoLink: false },
+          slot,
+          render,
+          field,
+          suffix,
+          component,
+        } = props.schema;
         const { labelCol, wrapperCol } = unref(itemLabelWidthProp);
         const { colon } = props.formProps;
 

+ 1 - 1
src/views/empower/AddModal.vue

@@ -75,7 +75,7 @@
         {
           field: 'customerName',
           component: 'Input',
-          label: '客户名称',
+          label: '客户账号',
           required: true,
           colProps: { span: 20 },
         },

+ 1 - 1
src/views/empower/data.ts

@@ -146,7 +146,7 @@ export const Addschemas: FormSchema[] = [
   {
     field: 'customerName',
     component: 'Input',
-    label: '客户名称',
+    label: '客户账号',
     required: true,
     colProps: { span: 20 },
   },

+ 9 - 3
src/views/empower/index.vue

@@ -64,7 +64,7 @@
       const [register, { openModal }] = useModal();
       const columns: BasicColumn[] = [
         {
-          title: '客户名称',
+          title: '客户账号',
           dataIndex: 'customerName',
           ellipsis: true,
           width: 250,
@@ -122,9 +122,15 @@
           width: 120,
         },
         {
+          title: '经销商名称',
+          ellipsis: true,
+          dataIndex: 'agentName',
+          width: 120,
+        },
+        {
           title: '创建人',
           ellipsis: true,
-          dataIndex: 'sysUserName',
+          dataIndex: 'createAgentName',
           width: 120,
         },
         {
@@ -149,7 +155,7 @@
         schemas: [
           {
             field: 'customerName',
-            label: '客户名称',
+            label: '客户账号',
             component: 'Input',
             colProps: {
               xl: 8,