Просмотр исходного кода

客户档案-折扣/佣金按百分比显示

jingbb 5 месяцев назад
Родитель
Сommit
6cf55970fb
1 измененных файлов с 51 добавлено и 3 удалено
  1. 51 3
      src/views/cuspCode/CustomerProfile/CuspCustomerProfile.data.ts

+ 51 - 3
src/views/cuspCode/CustomerProfile/CuspCustomerProfile.data.ts

@@ -61,18 +61,39 @@ export const columns: BasicColumn[] = [
    {
     title: '折扣(discount)',
     align:"center",
-    dataIndex: 'discount'
+    dataIndex: 'discount',
+    customRender:function (t, r, index) {
+      if(t.text&&t.text!==''){
+        return t.text+'%'
+      }else{
+        return ''
+      }
+    }
    },
    {
     title: '佣金(commission)',
     align:"center",
-    dataIndex: 'commission'
+    dataIndex: 'commission',
+    customRender:function (t, r, index) {
+      if(t.text&&t.text!==''){
+        return t.text+'%'
+      }else{
+        return ''
+      }
+    }
    },
   
    {
     title: '中间人佣金(intermediator commission)',
     align:"center",
-    dataIndex: 'intermediatorCommission'
+    dataIndex: 'intermediatorCommission',
+    customRender:function (t, r, index) {
+      if(t.text&&t.text!==''){
+        return t.text+'%'
+      }else{
+        return ''
+      }
+    }
    },
    {
     title: '信用额度(credit limit)',
@@ -330,6 +351,15 @@ export const formSchema: FormSchema[] = [
     colProps: {span: 12},
     labelWidth: 200,
     component: 'InputNumber',
+    componentProps: {
+      formatter: (value) => {
+        if(value&&value!==''){
+          return value + '%';
+        }else{
+          return value
+        }
+      },
+    },
   },
   {
     label: '佣金(commission)',
@@ -337,6 +367,15 @@ export const formSchema: FormSchema[] = [
     colProps: {span: 12},
     labelWidth: 250,
     component: 'InputNumber',
+    componentProps: {
+      formatter: (value) => {
+        if(value&&value!==''){
+          return value + '%';
+        }else{
+          return value
+        }
+      },
+    },
   },
   {
     label: '中间人(intermediator)',
@@ -354,6 +393,15 @@ export const formSchema: FormSchema[] = [
     colProps: {span: 12},
     labelWidth: 250,
     component: 'InputNumber',
+    componentProps: {
+      formatter: (value) => {
+        if(value&&value!==''){
+          return value + '%';
+        }else{
+          return value
+        }
+      },
+    },
   },
   {
     label: '优先级(priority)',