Browse Source

04-28修改成本lhj

liuhj 1 year ago
parent
commit
1d1ec0314c
1 changed files with 34 additions and 28 deletions
  1. 34 28
      src/components/Finance/Cost.vue

+ 34 - 28
src/components/Finance/Cost.vue

@@ -252,7 +252,7 @@
 
                 <template v-for="(  item, index  ) in      tableLabel     ">
                     <el-table-column :key="index" :prop="item.prop"
-                        :width="item.width == 140 ? columnWidth : item.width" :label="item.label"
+                        :width="item.width != '100' ? columnWidth : item.width" :label="item.label"
                         v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
                         <!-- eslint-disable-next-line -->
                         <template slot="header" slot-scope="scope">
@@ -351,21 +351,19 @@
                         </template>
                     </el-table-column>
                 </template>
-                <el-table-column class="czbtn" label="操作" :width="100">
+                <el-table-column class="czbtn" label="操作">
                     <!-- eslint-disable-next-line -->
                     <template slot-scope="scope">
-                        <el-button class="czbtn" size="mini" @click="insertRow(scope.$index, scope.row, 'UP')"
-                            type="primary">插入行
-                        </el-button>
+                        <el-button class="czbtn" size="mini" @click="insertRow(scope.$index, scope.row, 'UP')" type="primary">
+                            插入行
+                        </el-button>
                         <br />
-                        <el-button class="czbtn" style="margin: 10px 0;" size="mini"
-                            @click="handleDelete(scope.$index, scope.row, tableData)" type="danger">删除<i
-                                class="el-icon-delete"></i></el-button>
+                        <el-button class="czbtn" style="margin: 10px 0;" size="mini" @click="handleDelete(scope.$index, scope.row, tableData)" type="danger">
+                            删除<i class="el-icon-delete"></i>
+                        </el-button>
                         <br />
-                        <el-button class="czbtn" size="mini" @click="insertRow(scope.$index, scope.row, 'DOWN')"
-                            type="primary">插入行
-                            ↓</el-button>
-
+                        <el-button class="czbtn" size="mini" @click="insertRow(scope.$index, scope.row, 'DOWN')" type="primary">插入行↓
+                        </el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -373,26 +371,28 @@
                         class="el-icon-plus"></i></el-button></div>
             <div>
                 <el-table :data="[{ a: 1 }]" border style="width: 100%;font-size:12px">
-                    <el-table-column v-for="item in columnTotalData" :key="item.label"
-                        :width="item.width ? item.width : columnWidth"
+                    <el-table-column 
+                        v-for="item in columnTotalData" :key="item.label"
+                        :width="item.width != '100' ? columnWidth : item.width"
                         :label="item.tips ? item.tips + '(' + getCurr + ')' : ''"
                         v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
                         {{ item.totalPrice }}
                     </el-table-column>
-                    <!-- <el-table-column class="czbtn" :width="100">
-                    </el-table-column> -->
+                    <el-table-column class="czbtn">
+                    </el-table-column>
                 </el-table>
             </div>
             <div>
                 <el-table :data="[{ a: 1 }]" border style="width: 100%;font-size:12px">
-                    <el-table-column v-for="item in columnTotalData" :key="item.label"
-                        :width="item.width ? item.width : columnWidth"
+                    <el-table-column 
+                        v-for="item in columnTotalData" :key="item.label"
+                        :width="item.width != '100' ? columnWidth : item.width"
                         :label="item.singleTips ? item.singleTips + '(' + getCurr + ')' : ''"
                         v-if="CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.includes(item.label)">
                         {{ item.singlePrice }}
                     </el-table-column>
-                    <!-- <el-table-column class="czbtn" :width="100">
-                    </el-table-column> -->
+                    <el-table-column class="czbtn">
+                    </el-table-column>
                 </el-table>
             </div>
 
@@ -737,6 +737,7 @@
     </div>
 </template>
 <script>
+import { co } from '@fullcalendar/core/internal-common';
 
 export default {
     data() {
@@ -786,9 +787,9 @@ export default {
             ],
             tableLabel: [
                 { label: 'DAY', width: '50', prop: 'day', describe: '天数(DAY)' },
-                { label: 'DATE', width: '85', prop: 'date', describe: '时间(DATE)' },
+                { label: 'DATE', width: '100', prop: 'date', describe: '时间(DATE)' },
                 { label: 'ITIN', width: '100', prop: 'itin', describe: '行程描述(ITINERARY)' },
-                { label: 'VA', width: '77', prop: 'sale', describe: '车服务区域(Vehicle Area)' }, // ??????????????
+                { label: 'VA', width: '100', prop: 'sale', describe: '车服务区域(Vehicle Area)' }, // ??????????????
                 { label: 'VT', width: '100', prop: 'carType', describe: '车型(VEHICLE TYPE)' },
                 { label: 'VF', width: '60', prop: 'carCost', describe: '车费用(VEHICLE FEES)' },
                 { label: 'VN', width: '60', prop: 'carNumber', describe: '车数量(VEHICLE Number)' },
@@ -2308,7 +2309,7 @@ export default {
                     "totalPrice": 0,
                     "singlePrice": 0,
                     "singleTips": "",
-                    "width": 85,
+                    "width": 100,
                 },
                 {
                     "label": "ITIN",
@@ -2324,7 +2325,7 @@ export default {
                     "totalPrice": 0,
                     "singlePrice": 0,
                     "singleTips": "",
-                    "width": 77,
+                    "width": 100,
                 },
                 {
                     "label": "VT",
@@ -5245,10 +5246,15 @@ export default {
             })
         },
         columnWidth() {
-            if (this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 20) {
-                return ''
-            } else {
-                return 75
+            console.log(this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length);
+            if (this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 22) {
+                return 74
+            }
+            else if(22<=this.CheckBoxListSelect.filter(item => item.cbType == 'Top')[0].cbValues.length < 26){
+                return 59
+            } 
+            else{
+                return 55
             }
         },
         ShowMeals() {