Selaa lähdekoodia

表格样式调整

chenrui 3 vuotta sitten
vanhempi
commit
c80e6be4ec

+ 4 - 4
src/views/basicData/bulkPartsTypeManagement/list.vue

@@ -59,10 +59,10 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '散件类型名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '创建时间', dataIndex: 'createDate', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
+        { title: '散件类型名称', dataIndex: 'name', width: '35%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '创建时间', dataIndex: 'createDate', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '25%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 4 - 4
src/views/basicData/customerTypeManagement/list.vue

@@ -74,10 +74,10 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '客户类型名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '创建时间', dataIndex: 'createDate', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
+        { title: '客户类型名称', dataIndex: 'name', width: '35%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '创建时间', dataIndex: 'createDate', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '25%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 3 - 3
src/views/basicData/expenseType/list.vue

@@ -70,9 +70,9 @@ export default {
         wrapperCol: { span: 16 }
       },
       columns: [
-        { title: '费用类型名称', dataIndex: 'name', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '创建时间', dataIndex: 'createDate', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, align: 'center' }
+        { title: '费用类型名称', dataIndex: 'name', width: '50%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '25%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 6 - 6
src/views/basicData/storeTransferOutTypeManagement/list.vue

@@ -20,7 +20,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
-		:defaultLoadData="false"
+        :defaultLoadData="false"
         bordered>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -62,10 +62,10 @@ export default {
         name: '' //  店内调出类型名称
       },
       columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '店内调出类型名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '创建时间', dataIndex: 'createDate', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
+        { title: '店内调出类型名称', dataIndex: 'name', width: '35%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '创建时间', dataIndex: 'createDate', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '25%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -147,6 +147,6 @@ export default {
       this.pageInit()
       this.resetSearchForm()
     }
-  },
+  }
 }
 </script>

+ 9 - 9
src/views/power/role/roleList.vue

@@ -2,8 +2,8 @@
   <a-card size="small" :bordered="false">
     <a-spin :spinning="spinning" tip="Loading...">
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline">
-          <a-row :gutter="48">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="角色名称">
                 <a-input
@@ -110,12 +110,12 @@ export default {
       menuData: {},
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 150, align: 'center' },
-        { title: '角色名称', dataIndex: 'name', width: 150, align: 'center' },
-        { title: '角色描述', dataIndex: 'remarks', width: 200, align: 'center', scopedSlots: { customRender: 'remarks' } },
-        { title: '状态', width: 150, align: 'center', scopedSlots: { customRender: 'status' } },
-        { title: '操作', width: 150, align: 'center', scopedSlots: { customRender: 'action' } }
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center' },
+        { title: '角色名称', dataIndex: 'name', width: '25%', align: 'center' },
+        { title: '角色描述', dataIndex: 'remarks', width: '25%', align: 'center', scopedSlots: { customRender: 'remarks' } },
+        { title: '状态', width: '15%', align: 'center', scopedSlots: { customRender: 'status' } },
+        { title: '操作', width: '15%', align: 'center', scopedSlots: { customRender: 'action' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -225,7 +225,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 255
     }
   },
   mounted () {

+ 10 - 10
src/views/power/user/userList.vue

@@ -37,7 +37,7 @@
         rowKey="id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1200, y: tableHeight }"
+        :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
         <span slot="status" slot-scope="text, record">
@@ -98,15 +98,15 @@ export default {
       itemData: null, // 编辑行数据
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '来源', dataIndex: 'org.name', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '用户名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '手机号码', dataIndex: 'phone', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '用户账号', dataIndex: 'loginName', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '角色', width: 180, align: 'center', dataIndex: 'roleNames', customRender: function (text) { return text || '--' } },
-        { title: '状态', width: 80, align: 'center', scopedSlots: { customRender: 'status' }, fixed: 'right' },
-        { title: '操作', width: 100, align: 'center', scopedSlots: { customRender: 'action' }, fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '来源', dataIndex: 'org.name', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '用户名称', dataIndex: 'name', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '手机号码', dataIndex: 'phone', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '用户账号', dataIndex: 'loginName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '角色', width: '13%', align: 'center', dataIndex: 'roleNames', customRender: function (text) { return text || '--' } },
+        { title: '状态', width: '9%', align: 'center', scopedSlots: { customRender: 'status' } },
+        { title: '操作', width: '10%', align: 'center', scopedSlots: { customRender: 'action' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 10 - 10
src/views/productManagement/newProduct/list.vue

@@ -76,7 +76,7 @@
         :columns="columns"
         :data="loadData"
         :defaultLoadData="false"
-        :scroll="{ x: 1090, y: tableHeight }"
+        :scroll="{ y: tableHeight }"
         bordered>
         <!-- 上/下线时间 表头 -->
         <template slot="auditTimeTit">
@@ -135,15 +135,15 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       columns: [
-        { title: '序号', dataIndex: 'no', width: 50, align: 'center' },
-        { slots: { title: 'auditTimeTit' }, scopedSlots: { customRender: 'auditTime' }, width: 140, align: 'center' },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
-        { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单位', dataIndex: 'unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { slots: { title: 'auditTimeTit' }, scopedSlots: { customRender: 'auditTime' }, width: '12%', align: 'center' },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '13%', align: 'center' },
+        { title: '产品名称', dataIndex: 'name', width: '16%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 22 - 22
src/views/productManagement/priceChangeRecord/list.vue

@@ -76,7 +76,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1760, y: tableHeight }"
+      :scroll="{ y: tableHeight }"
       :defaultLoadData="false"
       bordered>
       <!-- 产品分类 -->
@@ -175,13 +175,13 @@ export default {
     // 设置表头
     getColumns () {
       this.columns = [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center', fixed: 'left' },
-        { title: '变更时间', dataIndex: 'updateDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 120, align: 'center' },
-        { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '变更时间', dataIndex: 'updateDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '11%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '8%', align: 'center' },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       const cArr = [
         {
@@ -189,8 +189,8 @@ export default {
           dataIndex: 'hterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 80, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeTerminalPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: '4%', align: 'center' }
           ]
         },
         {
@@ -198,11 +198,11 @@ export default {
           dataIndex: 'sterminaldsdPrice',
           align: 'center',
           children: [
-            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-            { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 80, align: 'center' }
+            { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: '4%', align: 'center' }
           ]
         },
-        { title: '变更原因', dataIndex: 'changeReason', width: 150, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '变更原因', dataIndex: 'changeReason', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ]
       getCurrentDealer().then(res => {
         if (res.status == 200) {
@@ -212,8 +212,8 @@ export default {
               dataIndex: 'sdtermindfaldsdPrice',
               align: 'center',
               children: [
-                { title: '变更前', dataIndex: 'beforeProvincePrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-                { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 80, align: 'center' }
+                { title: '变更前', dataIndex: 'beforeProvincePrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+                { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: '4%', align: 'center' }
               ]
             },
             {
@@ -221,8 +221,8 @@ export default {
               dataIndex: 'sdterminaldsdPrice',
               align: 'center',
               children: [
-                { title: '变更前', dataIndex: 'beforeCityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-                { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 80, align: 'center' }
+                { title: '变更前', dataIndex: 'beforeCityPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+                { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: '4%', align: 'center' }
               ]
             })
           } else if (res.data.dealerLevel && res.data.dealerLevel == 'CITY') { //  市级
@@ -231,8 +231,8 @@ export default {
               dataIndex: 'sdterminaldsdPrice',
               align: 'center',
               children: [
-                { title: '变更前', dataIndex: 'beforeCityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-                { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 80, align: 'center' }
+                { title: '变更前', dataIndex: 'beforeCityPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+                { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: '4%', align: 'center' }
               ]
             })
           }
@@ -242,8 +242,8 @@ export default {
               dataIndex: 'gterminaldsdPrice',
               align: 'center',
               children: [
-                { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-                { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 80, align: 'center' }
+                { title: '变更前', dataIndex: 'beforeSpecialPrice', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+                { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: '4%', align: 'center' }
               ]
             })
           }
@@ -328,7 +328,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 233
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   watch: {

+ 7 - 7
src/views/productManagement/productBrand/list.vue

@@ -36,7 +36,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
-		:defaultLoadData="false"
+        :defaultLoadData="false"
         bordered>
         <!-- 状态 -->
         <template slot="enabledFlag" slot-scope="text, record">
@@ -83,12 +83,12 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0,
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品品牌名称', dataIndex: 'brandName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '首字母', dataIndex: 'firstChar', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '创建时间', dataIndex: 'createDate', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 160, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 120, align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
+        { title: '产品品牌名称', dataIndex: 'brandName', width: '30%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '首字母', dataIndex: 'firstChar', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: '15%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 3 - 3
src/views/productManagement/productCategory/list.vue

@@ -68,9 +68,9 @@ export default {
         wrapperCol: { span: 16 }
       },
       columns: [
-        { title: '分类名称', dataIndex: 'productTypeName', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '创建时间', dataIndex: 'createDate', width: 320, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 300, align: 'center' }
+        { title: '分类名称', dataIndex: 'productTypeName', width: '50%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '25%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 13 - 13
src/views/productManagement/productInfo/list.vue

@@ -87,7 +87,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1300, y: tableHeight }"
+        :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
         <!-- 产品分类 -->
@@ -161,18 +161,18 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'code', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 120, align: 'center' },
-        { title: '经销批发价', dataIndex: 'specialPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 90, align: 'center', fixed: 'right' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'code', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'name', width: '13%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '9%', align: 'center' },
+        { title: '经销批发价', dataIndex: 'specialPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '终端价', dataIndex: 'terminalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: '7%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 13 - 13
src/views/productManagement/productInfoJg/list.vue

@@ -82,7 +82,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1540, y: tableHeight }"
+      :scroll="{ y: tableHeight }"
       :defaultLoadData="false"
       bordered>
       <!-- 产品图片 -->
@@ -191,35 +191,35 @@ export default {
     // 设置表头
     getColumns () {
       this.columns = [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'code', align: 'center', width: 250, customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', align: 'center', width: 120, customRender: function (text) { return (!text || text == ' ') ? '--' : text } },
-        { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: 80, align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'code', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'name', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: '17%', align: 'center', customRender: function (text) { return (!text || text == ' ') ? '--' : text } },
+        { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' }
         // { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 120, align: 'center' }
       ]
       const cArr = [
-        { title: '终端价', dataIndex: 'terminalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '终端价', dataIndex: 'terminalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '状态', dataIndex: 'onlineFalgDictValue', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
       getCurrentDealer().then(res => {
         if (res.status == 200) {
           if (res.data.dealerLevel && res.data.dealerLevel == 'PROVINCE') { //  省级
             this.columns.push(
-              { title: '省级价', dataIndex: 'provincePrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-              { title: '市级价', dataIndex: 'cityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+              { title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+              { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
             )
           } else if (res.data.dealerLevel && res.data.dealerLevel == 'CITY') { //  市级
             this.columns.push(
-              { title: '市级价', dataIndex: 'cityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+              { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
             )
           }
           if (res.data.isShowSpecialPrice && res.data.isShowSpecialPrice == '1') { //  是否展示特约价
-            this.columns.push({ title: '特约价', dataIndex: 'specialPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+            this.columns.push({ title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
           }
           this.columns = [...this.columns, ...cArr]
         }