Explorar o código

产品分类-在毛利率和税率后增加'%'

jingbb hai 4 meses
pai
achega
cfc009ef51

+ 4 - 2
src/views/BasicData/components/productCassificationModel.vue

@@ -103,7 +103,8 @@
       field: 'grossMargin',
       component: 'Input',
       componentProps:{
-        AutoComplete:'off'
+        AutoComplete:'off',
+        addonAfter:"%",
       },
     },
     {
@@ -111,7 +112,8 @@
       field: 'taxRate',
       component: 'Input',
       componentProps:{
-        AutoComplete:'off'
+        AutoComplete:'off',
+        addonAfter:"%",
       },
     },
     {

+ 14 - 0
src/views/BasicData/productCassification.vue

@@ -56,11 +56,25 @@
       title: '毛利率(gross margin)',
       dataIndex: 'grossMargin',
       key: 'grossMargin',
+      customRender:function (t, r, index) {
+        if(t.text&&t.text!==''){
+          return t.text+'%'
+        }else{
+          return ''
+        }
+      }
     },
     {
       title: '税率(tax rate)',
       dataIndex: 'taxRate',
       key: 'taxRate',
+      customRender:function (t, r, index) {
+        if(t.text&&t.text!==''){
+          return t.text+'%'
+        }else{
+          return ''
+        }
+      }
     },
   ];
   //表单搜索字段