Browse Source

修改css

Qukatie 11 months ago
parent
commit
873ec39f6e

+ 91 - 62
src/views/iosBasicData/costcenter/soc/detailsPage.vue

@@ -136,8 +136,9 @@
             </trade-card>
             <trade-card title="基础明细">
                 <avue-crud :option="option" :data="form.costItemList" id="out-table" ref="crud"
-                    @selection-change="selectionChange" @select="selectHandle" @row-update="rowUpdate"
-                    @resetColumn="resetColumn('crud', 'option', 'optionBack', 447)"
+                    :header-cell-class-name="headerClassName" :row-style="{ height: '20px', padding: '0px' }"
+                    :cell-style="{ height: '20px',padding: '0px' }" @selection-change="selectionChange" @select="selectHandle"
+                    @row-update="rowUpdate" @resetColumn="resetColumn('crud', 'option', 'optionBack', 447)"
                     @saveColumn="saveColumn('crud', 'option', 'optionBack', 447)">
                     <template slot="menuLeft">
                         <el-button type="info" plain size="small" :disabled="editDisabled"
@@ -196,7 +197,8 @@
             </trade-card>
             <trade-card title="POL杂费">
                 <avue-crud :option="polOption" :data="polFeeList" id="out-table" ref="crud2"
-                    @selection-change="selectionChange" @select="selectHandle" @row-update="rowUpdate"
+                :header-cell-class-name="headerClassName" :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }" @selection-change="selectionChange"
+                    @select="selectHandle" @row-update="rowUpdate"
                     @resetColumn="resetColumn('crud2', 'polOption', 'polOptionBack', 448)"
                     @saveColumn="saveColumn('crud2', 'polOption', 'polOptionBack', 448)">
                     <template slot="menuLeft">
@@ -274,7 +276,8 @@
             </trade-card>
             <trade-card title="POD杂费">
                 <avue-crud :option="podOption" :data="podFeeList" id="out-table" ref="crud3"
-                    @selection-change="selectionChange" @select="selectHandle" @row-update="rowUpdate"
+                :header-cell-class-name="headerClassName" :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }" @selection-change="selectionChange"
+                    @select="selectHandle" @row-update="rowUpdate"
                     @resetColumn="resetColumn('crud3', 'podOption', 'podOptionBack', 449)"
                     @saveColumn="saveColumn('crud3', 'podOption', 'podOptionBack', 449)">
                     <template slot="menuLeft">
@@ -352,7 +355,8 @@
             </trade-card>
             <trade-card title="POT杂费">
                 <avue-crud :option="potOption" :data="potFeeList" id="out-table" ref="crud4"
-                    @selection-change="selectionChange" @select="selectHandle" @row-update="rowUpdate"
+                :header-cell-class-name="headerClassName" :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }" @selection-change="selectionChange"
+                    @select="selectHandle" @row-update="rowUpdate"
                     @resetColumn="resetColumn('crud4', 'potOption', 'potOptionBack', 450)"
                     @saveColumn="saveColumn('crud4', 'potOption', 'potOptionBack', 450)">
                     <template slot="menuLeft">
@@ -691,7 +695,7 @@ export default {
             },
             option: {},
             optionBack: {
-                height: 'auto',
+                // height: 'auto',
                 calcHeight: 30,
                 menuWidth: 60,
                 tip: false,
@@ -703,6 +707,7 @@ export default {
                 refreshBtn: false,
                 selection: true,
                 align: 'center',
+                menu:false,
                 column: [
                     {
                         label: "index",
@@ -713,7 +718,7 @@ export default {
                     {
                         label: "箱型",
                         prop: "boxType",
-                        width: "100",
+                        width: "80",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -729,7 +734,7 @@ export default {
                     {
                         label: "币别",
                         prop: "curCode",
-                        width: "120",
+                        width: "80",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -745,7 +750,7 @@ export default {
                     {
                         label: "汇率",
                         prop: "exrate",
-                        width: "120",
+                        width: "80",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -754,7 +759,7 @@ export default {
                     {
                         label: "销售价",
                         prop: "salesPrice",
-                        width: "120",
+                        width: "80",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -770,19 +775,19 @@ export default {
                     {
                         label: "成本价",
                         prop: "costPrice",
-                        width: "120",
+                        width: "80",
                         overHidden: true
                     },
                     {
                         label: "合计利润",
                         prop: "totalProfit",
-                        width: "120",
+                        width: "80",
                         overHidden: true
                     },
                     {
                         label: "海运费",
                         prop: "oceanFreight",
-                        width: "120",
+                        width: "80",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -791,7 +796,7 @@ export default {
                     {
                         label: "箱成本/天",
                         prop: "boxCost",
-                        width: "120",
+                        width: "90",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -800,31 +805,31 @@ export default {
                     {
                         label: "用箱成本",
                         prop: "useBoxCost",
-                        width: "120",
+                        width: "90",
                         overHidden: true
                     },
                     {
                         label: "POL杂费成本",
                         prop: "polCost",
-                        width: "120",
+                        width: "90",
                         overHidden: true
                     },
                     {
                         label: "POD杂费成本",
                         prop: "podCost",
-                        width: "120",
+                        width: "90",
                         overHidden: true
                     },
                     {
                         label: "POT费用",
                         prop: "potCost",
-                        width: "120",
+                        width: "80",
                         overHidden: true
                     },
                     {
                         label: "制单人",
                         prop: "createUserName",
-                        width: "120",
+                        width: "80",
                         overHidden: true
                     },
                     {
@@ -836,7 +841,7 @@ export default {
                     {
                         label: "修改人",
                         prop: "updateUserName",
-                        width: "120",
+                        width: "80",
                         overHidden: true
                     },
                     {
@@ -848,7 +853,6 @@ export default {
                     {
                         label: "备注",
                         prop: "remarks",
-                        width: "120",
                         cell: true,
                         overHidden: true
                     }
@@ -856,7 +860,7 @@ export default {
             },
             polOption: {},
             polOptionBack: {
-                height: 'auto',
+                // height: 'auto',
                 calcHeight: 30,
                 menuWidth: 60,
                 tip: false,
@@ -868,6 +872,7 @@ export default {
                 refreshBtn: false,
                 selection: true,
                 align: 'center',
+                menu:false,
                 column: [
                     {
                         label: "index",
@@ -878,7 +883,7 @@ export default {
                     {
                         label: "类别",
                         prop: "type",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -910,7 +915,7 @@ export default {
                     {
                         label: "费用名称",
                         prop: "feeName",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -926,7 +931,7 @@ export default {
                     {
                         label: "币别",
                         prop: "curCode",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -942,7 +947,7 @@ export default {
                     {
                         label: "汇率",
                         prop: "exrate",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -951,7 +956,7 @@ export default {
                     {
                         label: "当地币别",
                         prop: "localCurCode",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -960,7 +965,7 @@ export default {
                     {
                         label: "当地汇率",
                         prop: "localExrate",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -969,7 +974,7 @@ export default {
                     {
                         label: "计量单票",
                         prop: "measurementTicket",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -978,7 +983,7 @@ export default {
                     {
                         label: "销售价",
                         prop: "salesPrice",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         type: 'number',
                         controls: false,
@@ -996,7 +1001,7 @@ export default {
                     {
                         label: "成本价",
                         prop: "costPrice",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1012,7 +1017,7 @@ export default {
                     {
                         label: "制单人",
                         prop: "createUserName",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
@@ -1024,7 +1029,7 @@ export default {
                     {
                         label: "修改人",
                         prop: "updateUserName",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
@@ -1036,7 +1041,6 @@ export default {
                     {
                         label: "备注",
                         prop: "remarks",
-                        width: "120",
                         cell: true,
                         overHidden: true
                     }
@@ -1044,7 +1048,7 @@ export default {
             },
             podOption: {},
             podOptionBack: {
-                height: 'auto',
+                // height: 'auto',
                 calcHeight: 30,
                 menuWidth: 60,
                 tip: false,
@@ -1056,6 +1060,7 @@ export default {
                 refreshBtn: false,
                 selection: true,
                 align: 'center',
+                menu:false,
                 column: [
                     {
                         label: "index",
@@ -1066,7 +1071,7 @@ export default {
                     {
                         label: "类别",
                         prop: "type",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1098,7 +1103,7 @@ export default {
                     {
                         label: "费用名称",
                         prop: "feeName",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1114,7 +1119,7 @@ export default {
                     {
                         label: "币别",
                         prop: "curCode",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1130,7 +1135,7 @@ export default {
                     {
                         label: "汇率",
                         prop: "exrate",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1139,7 +1144,7 @@ export default {
                     {
                         label: "当地币别",
                         prop: "localCurCode",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1148,7 +1153,7 @@ export default {
                     {
                         label: "当地汇率",
                         prop: "localExrate",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1157,7 +1162,7 @@ export default {
                     {
                         label: "计量单票",
                         prop: "measurementTicket",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1166,7 +1171,7 @@ export default {
                     {
                         label: "销售价",
                         prop: "salesPrice",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         type: 'number',
                         controls: false,
@@ -1184,7 +1189,7 @@ export default {
                     {
                         label: "成本价",
                         prop: "costPrice",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1200,7 +1205,7 @@ export default {
                     {
                         label: "制单人",
                         prop: "createUserName",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
@@ -1212,7 +1217,7 @@ export default {
                     {
                         label: "修改人",
                         prop: "updateUserName",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
@@ -1224,7 +1229,6 @@ export default {
                     {
                         label: "备注",
                         prop: "remarks",
-                        width: "120",
                         cell: true,
                         overHidden: true
                     }
@@ -1244,6 +1248,7 @@ export default {
                 refreshBtn: false,
                 selection: true,
                 align: 'center',
+                menu:false,
                 column: [
                     {
                         label: "index",
@@ -1254,7 +1259,7 @@ export default {
                     {
                         label: "类别",
                         prop: "type",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1286,7 +1291,7 @@ export default {
                     {
                         label: "费用名称",
                         prop: "feeName",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1302,7 +1307,7 @@ export default {
                     {
                         label: "币别",
                         prop: "curCode",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1318,7 +1323,7 @@ export default {
                     {
                         label: "汇率",
                         prop: "exrate",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1327,7 +1332,7 @@ export default {
                     {
                         label: "当地币别",
                         prop: "localCurCode",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1336,7 +1341,7 @@ export default {
                     {
                         label: "当地汇率",
                         prop: "localExrate",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1345,7 +1350,7 @@ export default {
                     {
                         label: "计量单票",
                         prop: "measurementTicket",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1354,7 +1359,7 @@ export default {
                     {
                         label: "销售价",
                         prop: "salesPrice",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         type: 'number',
                         controls: false,
@@ -1372,7 +1377,7 @@ export default {
                     {
                         label: "成本价",
                         prop: "costPrice",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -1388,7 +1393,7 @@ export default {
                     {
                         label: "制单人",
                         prop: "createUserName",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
@@ -1400,7 +1405,7 @@ export default {
                     {
                         label: "修改人",
                         prop: "updateUserName",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
@@ -1412,7 +1417,6 @@ export default {
                     {
                         label: "备注",
                         prop: "remarks",
-                        width: "120",
                         cell: true,
                         overHidden: true
                     }
@@ -2046,6 +2050,19 @@ export default {
                 this.$refs[ref].$refs.dialogColumn.columnBox = false;
             }
         },
+        // 更改表格颜色
+        headerClassName(tab) {
+            //颜色间隔
+            let back = ""
+            if (tab.columnIndex >= 0 && tab.column.level === 1) {
+                if (tab.columnIndex % 2 === 0) {
+                    back = "back-one"
+                } else if (tab.columnIndex % 2 === 1) {
+                    back = "back-two"
+                }
+            }
+            return back;
+        },
         goBack(type) {
             this.$emit("goBack");
         },
@@ -2060,7 +2077,6 @@ export default {
 
 ::v-deep .el-table .cell {
     padding: 0 2px !important;
-
     .el-form-item {
         margin-bottom: 0px !important;
     }
@@ -2071,14 +2087,27 @@ export default {
     left: -1px;
 }
 
-::v-deep#out-table .back-one {
+// ::v-deep#out-table .back-one {
+//     background: #ecf5ff !important;
+// }
+
+// ::v-deep#out-table .back-two {
+//     background: #ecf5ff !important;
+// }
+
+::v-deep #out-table .back-one {
     background: #ecf5ff !important;
+    text-align: center;
+    padding: 4px 0;
 }
 
-::v-deep#out-table .back-two {
+::v-deep #out-table .back-two {
     background: #ecf5ff !important;
+    text-align: center;
+    padding: 4px 0;
 }
 
+
 ::v-deep .el-table--small td,
 .el-table--small th {
     padding: 2px !important;

+ 3 - 3
src/views/iosBasicData/costcenter/soc/index.vue

@@ -446,13 +446,13 @@ export default {
 
 </script>
 
-<style scoped>
-::v-deep#out-table .back-one {
+<style lang="scss" scoped>
+::v-deep #out-table .back-one {
     background: #ecf5ff !important;
     text-align: center;
 }
 
-::v-deep#out-table .back-two {
+::v-deep #out-table .back-two {
     background: #ecf5ff !important;
     text-align: center;
 }