Browse Source

Merge branch 'master' of http://132.232.92.186:3000/XinXiBu/oa-system

wangh 2 years ago
parent
commit
3065e55a2e
3 changed files with 459 additions and 60 deletions
  1. 455 58
      src/components/Finance/Cost.vue
  2. 2 0
      src/components/child/Controltree.vue
  3. 2 2
      src/main.js

+ 455 - 58
src/components/Finance/Cost.vue

@@ -29,7 +29,14 @@
                             <el-input v-model="formInline.user" placeholder="税率"></el-input>
                         </el-form-item>
                         <el-form-item label="货币:">
-                            <el-input v-model="formInline.user" placeholder="货币"></el-input>
+                            <el-select v-model="currencyValueL" placeholder="请选择">
+                                <el-option
+                                v-for="item in currencyOption"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value">
+                                </el-option>
+                            </el-select>
                         </el-form-item>
                         <el-form-item label="汇率:">
                             <el-input v-model="formInline.user" placeholder="汇率"></el-input>
@@ -75,7 +82,7 @@
             </div>
             <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
             <el-checkbox-group v-model="checkList">
-                <el-checkbox v-for="(item,index) in checkOptions" :key="index" :label="item"></el-checkbox>
+                <el-checkbox v-for="(item,index) in  checkOptions" :key="index" :title="item.tips" :label="item.label"></el-checkbox>
             </el-checkbox-group>
             <el-table 
             :summary-method="getSummaries"
@@ -88,33 +95,62 @@
             :highlight-current-row="true"
             fit
             >
-            <template v-for="(item, index) in tableLabel"  >
-                <el-table-column
+                <template v-for="(item, index) in tableLabel"  >
+                    <el-table-column
                     :key="index"
                     :prop="item.prop" 
                     :width="item.width" 
                     :label="item.label"
                     v-if="checkList.includes(item.label)">
+                    <!-- eslint-disable-next-line -->
+                    <template slot="header" slot-scope="scope">
+                        <el-tooltip effect="dark" :content="item.label" placement="top">
+                            <span class="rapAddress">{{item.label}}</span>
+                        </el-tooltip>
+                    </template>
                     <template slot-scope="scope">
-                        <div v-if="item.prop === 'sales'">
-                          <el-input
-                            :ref="'el-input-' + index"
-                            v-model="scope.row[item.prop]"
-                            maxlength="100"
-                            show-word-limit/>
-                        </div>
-                        <div v-else-if="item.prop === 'id'">
-                          <el-input
-                            :ref="'el-input-' + index"
-                            v-model="scope.row[item.prop]"
-                            type="number"
-                            min="0"/>
+                            <div v-if="item.prop === 'sales'">
+                            <el-input
+                                :ref="'el-input-' + index"
+                                v-model="scope.row[item.prop]"
+                                maxlength="100"
+                                show-word-limit/>
+                            </div>
+                            <div v-else-if="item.prop === 'id'">
+                            <el-input
+                                :ref="'el-input-' + index"
+                                v-model="scope.row[item.prop]"
+                                type="number"
+                                min="0"/>
+                            </div>
+                            <span v-else :title="scope.row[item.prop]">{{ scope.row[item.prop] }}</span>
+                        </template>
+                    </el-table-column>
+                </template>
+            </el-table>
+            <div class="sheet-box">
+                <div class="sheet-li">
+                    <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
+                    <el-checkbox-group v-model="sheetoneList">
+                        <el-checkbox v-for="(item,index) in sheetoneOptions" :key="index" :label="item"></el-checkbox>
+                    </el-checkbox-group>
+                    <div v-for="(sheetitem,index) in sheetDatal" :key="index">
+                        <div class="biaoge" v-if="sheetoneList.includes(sheetitem.label)">
+                            <el-table
+                            :data="sheetitem.sheetInfo"
+                            border
+                            style="width: 100%">
+                                <el-table-column
+                                v-for="(itemsheetone,index) in sheetitem.childList"
+                                :key="index"
+                                :prop="itemsheetone.prop"
+                                :label="itemsheetone.childLabel">
+                                </el-table-column>
+                            </el-table>
                         </div>
-                        <span v-else :title="scope.row[item.prop]">{{ scope.row[item.prop] }}</span>
-                    </template>
-                </el-table-column>
-            </template>
-        </el-table>
+                    </div>
+                </div>
+            </div>
         </div>
     </div>
 </template>
@@ -123,7 +159,45 @@ export default {
     data () {
       return {
         checkList: ['DAY','ITIN','VA','VF','VRD','T/G S'],
-        checkOptions:['DAY','DATE','ITIN','VA','VT','VF','VN','VRD','T/G S','T/G N','T/G WH','T/G OF','T/G M','T/G A','T/G TF','T/G EF','C/F M','C/F OF','B','L','D','TBR','SGR','JS/ES','SUITE','ACCO N','T/V','1/L','I/F','EF','B/R/F','TE','T/G T','DRV T','P/C','T/L F','E/C T'],
+        checkOptions:[
+            {label:'DAY',tips:'时间(DATE)'},
+            {label:'DATE',tips:'行程描述(ITINERARY)'},
+            {label:'ITIN',tips:'行程描述(ITINERARY)'},
+            {label:'VA',tips:'车服务区域(Vehicle Area)'},
+            {label:'VT',tips:'车型(VEHICLE TYPE)'},
+            {label:'VF',tips:'车费用(VEHICLE FEES)'},
+            {label:'VN',tips:'车数量(VEHICLE Number)'},
+            {label:'VRD',tips:'用车时间(VEHICLE RENTAL DURATION)'},
+            {label:'T/G S',tips:'导游工资(TOUR GUIDE SALARY)'},
+            {label:'T/G N',tips:'导游数量(TOUR GUIDE Number)'},
+            {label:'T/G WH',tips:'导游工作时间(导游工作时间)'},
+            {label:'T/G OF',tips:'导游超时费用(TOUR GUIDE OVERTIME FEES)'},
+            {label:'T/G M',tips:'导游餐补(TOUR GUIDE MEALS)'},
+            {label:'T/G A',tips:'导游房补(TOUR GUIDE ACCOMMODATION)'},
+            {label:'T/G TF',tips:'导游交通费(TOUR GUIDE TRANSPORATION FEES)'},
+            {label:'T/G EF',tips:'导游景点费(TOUR GUIDE ENTRANCE FEES)'},
+            {label:'C/F M',tips:'司机餐补(CHAUFFEUR MEALS)'},
+            {label:'C/F OF',tips:'司机超时费用(CHAUFFEUR OVERTIME FEES)'},
+            {label:'B',tips:'早餐(BREAKFAST) #个人成本'},
+            {label:'L',tips:'午餐(LUNCH) #个人成本'},
+            {label:'D',tips:'晚餐(DINNER) #个人成本'},
+            {label:'TBR',tips:'双人间(TWIN BED ROOM) #个人成本'},
+            {label:'SGR',tips:'单间(SINGLE ROOM) #个人成本'},
+            {label:'JS/ES',tips:'小套房/豪华套房(JUNIOR SUITE/EXECUTIVE SUITE) #个人成本'},
+            {label:'SUITE',tips:'套房(SUITE) #个人成本'},
+            {label:'ACCO N',tips:'住宿地名称(ACCOMMODATION NAME)'},
+            {label:'T/V',tips:'公务活动费用(T/V)'},
+            {label:'1/L',tips:'公务活动费用(1/L)'},
+            {label:'I/F',tips:'公务翻译费用(INTERPRETER FEES)'},
+            {label:'EF',tips:'景点门票(ENTRANCE FEE) #个人成本'},
+            {label:'B/R/F',tips:'饮料零食水果(BEVERAGE/RRESHMENT/FRUIT)'},
+            {label:'TE',tips:'出行物资(TRAVELLLING ESSENTIALS) #个人成本'},
+            {label:'T/G T',tips:'导游小费(T/G TIPS) #个人成本'},
+            {label:'DRV T',tips:'司机小费(DRIVER TIPS #个人成本)'},
+            {label:'P/C',tips:'零用金(PETTY CASH) #个人成本'},
+            {label:'T/L F',tips:'领队费(TOUR LEADER FEES)'},
+            {label:'E/C T',tips:'会务费(EXPO/CONFERENCE TICKET)'}
+        ],
         tableLabel: [
             {label: 'DAY', width: '90', prop: 'id'},
             {label: 'DATE', width: '', prop: 'date'},
@@ -163,15 +237,7 @@ export default {
 			{id: 1, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
 			{id: 2, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
 			{id: 3, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
-			{id: 4, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
-			// {id: 5, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
-			// {id: 6, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
-			// {id: 7, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
-			// {id: 8, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
-			// {id: 9, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
-			// {id: 10, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
-			// {id: 11, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05},
-			// {id: 12, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05}
+			{id: 4, date: '2018-07-24', sales: 23.34, sale: 137597.76, const: 102203.71, profit: 35394.05}
 		],
         options: [{
           value: '选项1',
@@ -190,10 +256,326 @@ export default {
           label: '北京烤鸭'
         }],
         value: '',
+        currencyOption: [{
+          value: 'CNY',
+          label: 'CNY'
+        }, {
+          value: 'CAD',
+          label: 'CAD'
+        }, {
+          value: 'EGP',
+          label: 'EGP'
+        }, {
+          value: 'EUR',
+          label: 'EUR'
+        }, {
+          value: 'USD',
+          label: 'USD'
+        }],
+        currencyValueL:'CNY',
         formInline: {
           user: '',
           region: ''
-        }
+        },
+        sheetoneList: ['签证','机票','核酸检测',],
+        sheetoneOptions:['签证','机票','火车票','船票','保险','核酸检测','酒店TBR','酒店SGR','酒店JSES','酒店SUITE','地接','公务','零用金'],
+        sheetDatal:[
+            {
+                label:'签证',
+                childList:[
+                    {
+                        childLabel:'签证单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        childLabel:'签证系数',
+                        prop:'coefficient'
+                    },
+                    {
+                        childLabel:'签证总成本(CNY)',
+                        prop:'totalCost'
+                    },
+                    {
+                        childLabel:'签证单人报价(CNY)',
+                        prop:'singleQuote'
+                    },
+                    {
+                        childLabel:'签证总报价(CNY)',
+                        prop:'totalQuote'
+                    },
+                    {
+                        childLabel:'签证单人利润(CNY)',
+                        prop:'singleProfit'
+                    },
+                    {
+                        childLabel:'签证总利润(CNY)',
+                        prop:'totalProfit'
+                    },
+                ],
+                sheetInfo:[
+                    { 
+                        costPerson: 1, 
+                        toll: 11, 
+                        coefficient: 23.34, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            },
+            {
+                label:'火车票',
+                childList:[
+                    {
+                        childLabel:'签证单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        childLabel:'签证系数',
+                        prop:'coefficient'
+                    },
+                    {
+                        childLabel:'签证总成本(CNY)',
+                        prop:'totalCost'
+                    },
+                    {
+                        childLabel:'签证单人报价(CNY)',
+                        prop:'singleQuote'
+                    },
+                    {
+                        childLabel:'签证总报价(CNY)',
+                        prop:'totalQuote'
+                    },
+                    {
+                        childLabel:'签证单人利润(CNY)',
+                        prop:'singleProfit'
+                    },
+                    {
+                        childLabel:'签证总利润(CNY)',
+                        prop:'totalProfit'
+                    },
+                ],
+                sheetInfo:[
+                    { 
+                        costPerson: 133, 
+                        toll: 11, 
+                        coefficient: 23.34, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            },
+            {
+                label:'机票',
+                childList:[
+                    {
+                        childLabel:'签证单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        childLabel:'签证系数',
+                        prop:'coefficient'
+                    },
+                    {
+                        childLabel:'签证总成本(CNY)',
+                        prop:'totalCost'
+                    },
+                    {
+                        childLabel:'签证单人报价(CNY)',
+                        prop:'singleQuote'
+                    },
+                    {
+                        childLabel:'签证总报价(CNY)',
+                        prop:'totalQuote'
+                    },
+                    {
+                        childLabel:'签证单人利润(CNY)',
+                        prop:'singleProfit'
+                    },
+                    {
+                        childLabel:'签证总利润(CNY)',
+                        prop:'totalProfit'
+                    },
+                ],
+                sheetInfo:[
+                    { 
+                        costPerson: 133, 
+                        toll: 11, 
+                        coefficient: 23.34, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            },
+            {
+                label:'船票',
+                childList:[
+                    {
+                        childLabel:'签证单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        childLabel:'签证系数',
+                        prop:'coefficient'
+                    },
+                    {
+                        childLabel:'签证总成本(CNY)',
+                        prop:'totalCost'
+                    },
+                    {
+                        childLabel:'签证单人报价(CNY)',
+                        prop:'singleQuote'
+                    },
+                    {
+                        childLabel:'签证总报价(CNY)',
+                        prop:'totalQuote'
+                    },
+                    {
+                        childLabel:'签证单人利润(CNY)',
+                        prop:'singleProfit'
+                    },
+                    {
+                        childLabel:'签证总利润(CNY)',
+                        prop:'totalProfit'
+                    },
+                ],
+                sheetInfo:[
+                    { 
+                        costPerson: 133, 
+                        toll: 11, 
+                        coefficient: 23.34, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            },
+            {
+                label:'保险',
+                childList:[
+                    {
+                        childLabel:'签证单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        childLabel:'签证系数',
+                        prop:'coefficient'
+                    },
+                    {
+                        childLabel:'签证总成本(CNY)',
+                        prop:'totalCost'
+                    },
+                    {
+                        childLabel:'签证单人报价(CNY)',
+                        prop:'singleQuote'
+                    },
+                    {
+                        childLabel:'签证总报价(CNY)',
+                        prop:'totalQuote'
+                    },
+                    {
+                        childLabel:'签证单人利润(CNY)',
+                        prop:'singleProfit'
+                    },
+                    {
+                        childLabel:'签证总利润(CNY)',
+                        prop:'totalProfit'
+                    },
+                ],
+                sheetInfo:[
+                    { 
+                        costPerson: 133, 
+                        toll: 11, 
+                        coefficient: 23.34, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            },
+            {
+                label:'核酸检测',
+                childList:[
+                    {
+                        childLabel:'签证单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        childLabel:'签证系数',
+                        prop:'coefficient'
+                    },
+                    {
+                        childLabel:'签证总成本(CNY)',
+                        prop:'totalCost'
+                    },
+                    {
+                        childLabel:'签证单人报价(CNY)',
+                        prop:'singleQuote'
+                    },
+                    {
+                        childLabel:'签证总报价(CNY)',
+                        prop:'totalQuote'
+                    },
+                    {
+                        childLabel:'签证单人利润(CNY)',
+                        prop:'singleProfit'
+                    },
+                    {
+                        childLabel:'签证总利润(CNY)',
+                        prop:'totalProfit'
+                    },
+                ],
+                sheetInfo:[
+                    { 
+                        costPerson: 133, 
+                        toll: 11, 
+                        coefficient: 23.34, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            }
+        ],
+        
       };
     },
     watch:{
@@ -206,32 +588,30 @@ export default {
     },
     methods:{
         getSummaries(param) {
-        const { columns, data } = param;
-        const sums = [];
-        columns.forEach((column, index) => {
-          if (index === 0) {
-            sums[index] = "总计:";
-            return;
-          }
-         
-        const values = data.map(item => Number(item[column.property]));
-            if (!values.every(value => isNaN(value))) {
-                sums[index] = values.reduce((prev, curr) => {
-                    const value = Number(curr);
-                    if (!isNaN(value)) {
-                        return prev + curr;
-                    } else {
-                    return prev;
-                }
-                
-            }, 0);
-            sums[index] += ' 元';
-          } else {
-            sums[index] = 'N/A';
-          }
+            const { columns, data } = param;
+            const sums = [];
+            columns.forEach((column, index) => {
+            if (index === 0) {
+                sums[index] = "总计:";
+                return;
+            }
+            
+            const values = data.map(item => Number(item[column.property]));
+                if (!values.every(value => isNaN(value))) {
+                    sums[index] = values.reduce((prev, curr) => {
+                        const value = Number(curr);
+                        if (!isNaN(value)) {
+                            return prev + curr;
+                        } else {
+                        return prev;
+                    }
+                    
+                }, 0);
+                sums[index] = sums[index] + '(' + this.currencyValueL + ')' + '  人均(' +sums[index]+')';
+            } else {
+                sums[index] = 'N/A';
+            }
         });
-        
-
         return sums;
       }
     },
@@ -286,4 +666,21 @@ export default {
         width: 100px;
         margin: 5px 0;
     }
+    .sheet-box{
+        margin-top: 30px;
+    }
+    .sheet-head{
+        display: flex;
+    }
+    .sheet-head-li{
+        margin-right: 20px;
+    }
+    .biaoge{
+        margin-bottom: 30px;
+    }
+    .rapAddress{
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+    }
 </style>

+ 2 - 0
src/components/child/Controltree.vue

@@ -957,6 +957,7 @@ export default {
         padding: 5px 10px;
         box-shadow: 0 0 5px #0005;
         border-radius:5px ;
+        cursor: pointer;
     }
     .level-title{
         display: flex;
@@ -968,6 +969,7 @@ export default {
         padding: 5px 10px;
         box-shadow: 0 0 5px #0005;
         border-radius:5px ;
+        cursor: pointer;
     }
     .controltree-box .el-dialog{
         border-radius:5px;

+ 2 - 2
src/main.js

@@ -9,8 +9,8 @@ import './assets/icon/iconfont.css'
 import store from './store/index.js';
 
 import axios from 'axios';
-//axios.defaults.baseURL = 'http://132.232.92.186:8888';
-axios.defaults.baseURL = 'http://localhost:5256/';
+axios.defaults.baseURL = 'http://132.232.92.186:8888';
+// axios.defaults.baseURL = 'http://localhost:5256/';
 import { Message } from "element-ui";
 Vue.prototype.$message = Message
 Vue.prototype.$axios = axios;