liuhj hace 2 años
padre
commit
6098d358fb
Se han modificado 3 ficheros con 461 adiciones y 48 borrados
  1. 441 48
      src/components/Finance/Cost.vue
  2. 14 0
      src/components/OP/OCRIdentify.vue
  3. 6 0
      src/router/index.js

+ 441 - 48
src/components/Finance/Cost.vue

@@ -81,7 +81,7 @@
                 </div>
             </div>
             <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
-            <el-checkbox-group v-model="checkList">
+            <el-checkbox-group class="form-ss" v-model="checkList">
                 <el-checkbox v-for="(item,index) in  checkOptions" :key="index" :title="item.tips" :label="item.label"></el-checkbox>
             </el-checkbox-group>
             <el-table 
@@ -102,32 +102,47 @@
                     :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">
+                        <!-- eslint-disable-next-line -->
+                        <template slot="header" slot-scope="scope">
+                            <el-tooltip effect="dark" :content="item.describe" placement="top">
+                                <span class="rapAddress">{{item.label}}</span>
+                            </el-tooltip>
+                        </template>
+                        <template slot-scope="scope">
                             <div v-if="item.prop === 'sales'">
-                            <el-input
+                                <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
+                                <el-input
                                 :ref="'el-input-' + index"
                                 v-model="scope.row[item.prop]"
                                 type="number"
                                 min="0"/>
                             </div>
+                            <div v-else-if="item.prop === 'sale'">
+                                <el-row class="figures-btn">
+                                    <el-button @click="handleEdit(scope.$index, scope.row)" size="mini" type="primary">司兼导</el-button>
+                                    <el-button size="mini" type="primary">导 游</el-button>
+                                    <el-button size="mini" type="primary">车数据</el-button>
+                                    <el-button size="mini" type="primary">景 点</el-button>
+                                </el-row>
+                            </div>
                             <span v-else :title="scope.row[item.prop]">{{ scope.row[item.prop] }}</span>
                         </template>
                     </el-table-column>
                 </template>
+                <el-table-column
+                label="操作">
+                    <!-- eslint-disable-next-line -->
+                    <template slot-scope="scope">
+                        <el-button size="mini" @click="handleDelete(scope.$index, scope.row,tableData)" type="danger"><i class="el-icon-delete"></i></el-button>
+                    </template>
+                </el-table-column>
             </el-table>
+            <div style="text-align: center;padding: 10px 0;"><el-button @click="addStrip" type="primary">添 加 <i class="el-icon-plus"></i></el-button></div>
             <div class="sheet-box">
                 <div class="sheet-li">
                     <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
@@ -145,6 +160,60 @@
                                 :key="index"
                                 :prop="itemsheetone.prop"
                                 :label="itemsheetone.childLabel">
+                                    <template slot-scope="scope">
+                                        <div v-if="itemsheetone.prop === 'costPerson'">
+                                            <el-input
+                                            :ref="'el-input-' + index"
+                                            v-model="scope.row[itemsheetone.prop]"
+                                            show-word-limit/>
+                                        </div>
+                                        <div v-else-if="itemsheetone.prop === 'toll'">
+                                            <el-input
+                                            :ref="'el-input-' + index"
+                                            v-model="scope.row[itemsheetone.prop]"
+                                            show-word-limit/>
+                                        </div>
+                                        <div v-else-if="itemsheetone.prop === 'coefficient'">
+                                            <el-input
+                                            :ref="'el-input-' + index"
+                                            v-model="scope.row[itemsheetone.prop]"
+                                            show-word-limit/>
+                                        </div>
+                                        <span v-else :title="scope.row[itemsheetone.prop]">{{ scope.row[itemsheetone.prop] }}</span>
+                                    </template>
+                                </el-table-column>
+                            </el-table>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="cabin-box">
+                <div class="cabin-li">
+                    <div style="color: #606266;font-size: 15px;font-weight: 600;">请选择要显示的项:</div>
+                    <el-checkbox-group v-model="cabinoneList">
+                        <el-checkbox v-for="(item,index) in cabinoneOptions" :key="index" :label="item"></el-checkbox>
+                    </el-checkbox-group>
+                    <div v-for="(cabinitem,index) in cabinDatal" :key="index">
+                        <div class="biaoge" v-if="cabinoneList.includes(cabinitem.label)">
+                            <div style="    color: rgb(96, 98, 102);font-size: 15px;font-weight: 600;">{{cabinitem.label}}</div>
+                            <el-table
+                            :data="cabinitem.sheetInfo"
+                            border
+                            style="width: 100%">
+                                <el-table-column
+                                v-for="(itemcabinone,index) in cabinitem.childList"
+                                :key="index"
+                                :prop="itemcabinone.prop"
+                                :label="itemcabinone.childLabel">
+                                    <template slot-scope="scope">
+                                        <div v-if="itemcabinone.prop === 'toll'">
+                                            <el-input
+                                            :ref="'el-input-' + index"
+                                            v-model="scope.row[itemcabinone.prop]"
+                                            show-word-limit/>
+                                        </div>
+                                        <span v-else :title="scope.row[itemcabinone.prop]">{{ scope.row[itemcabinone.prop] }}</span>
+                                    </template>
                                 </el-table-column>
                             </el-table>
                         </div>
@@ -152,12 +221,26 @@
                 </div>
             </div>
         </div>
+        <el-dialog title="外层 Dialog" :visible.sync="outerVisible">
+            <el-dialog
+              width="30%"
+              title="内层 Dialog"
+              :visible.sync="innerVisible"
+              append-to-body>
+            </el-dialog>
+            <div slot="footer" class="dialog-footer">
+              <el-button @click="outerVisible = false">取 消</el-button>
+              <el-button type="primary" @click="innerVisible = true">打开内层 Dialog</el-button>
+            </div>
+        </el-dialog>
     </div>
 </template>
 <script>
 export default {
     data () {
       return {
+        outerVisible: false,
+        innerVisible: false,
         checkList: ['DAY','ITIN','VA','VF','VRD','T/G S'],
         checkOptions:[
             {label:'DAY',tips:'时间(DATE)'},
@@ -199,21 +282,43 @@ export default {
             {label:'E/C T',tips:'会务费(EXPO/CONFERENCE TICKET)'}
         ],
         tableLabel: [
-            {label: 'DAY', width: '90', prop: 'id'},
-            {label: 'DATE', width: '', prop: 'date'},
-            {label: 'ITIN', width: '', prop: 'sales'},
-            {label: 'VA', width: '', prop: 'sale'},
-            {label: 'VT', width: '', prop: 'const'},
-            {label: 'VF', width: '', prop: 'profit'},
-            {label: 'VN', total: '', prop: 'profit'},
-            {label: 'VRD', width: '', prop: 'profit'},
-            {label: 'T/G S', width: '', prop: 'profit'},
-            {label: 'T/G N', width: '', prop: 'profit'},
-            {label: 'T/G WH', width: '', prop: 'profit'},
-            {label: 'T/G OF', width: '', prop: 'profit'},
-            {label: 'T/G M', width: '', prop: 'profit'},
-            {label: 'T/G A', width: '', prop: 'profit'},
-            {label: 'T/G TF', width: '', prop: 'profit'}
+            {label: 'DAY', width: '90', prop: 'id',describe:'时间(DATE)'},
+            {label: 'DATE', width: '', prop: 'date',describe:'行程描述(ITINERARY)'},
+            {label: 'ITIN', width: '', prop: 'sales',describe:'行程描述(ITINERARY)'},
+            {label: 'VA', width: '', prop: 'sale',describe:'车服务区域(Vehicle Area)'},
+            {label: 'VT', width: '', prop: 'const',describe:'车型(VEHICLE TYPE)'},
+            {label: 'VF', width: '', prop: 'profit',describe:'车费用(VEHICLE FEES)'},
+            {label: 'VN', total: '', prop: 'profit',describe:'车数量(VEHICLE Number)'},
+            {label: 'VRD', width: '', prop: 'profit',describe:'用车时间(VEHICLE RENTAL DURATION)'},
+            {label: 'T/G S', width: '', prop: 'profit',describe:'导游工资(TOUR GUIDE SALARY)'},
+            {label: 'T/G N', width: '', prop: 'profit',describe:'导游数量(TOUR GUIDE Number'},
+            {label: 'T/G WH', width: '', prop: 'profit',describe:'导游工作时间(导游工作时间)'},
+            {label: 'T/G OF', width: '', prop: 'profit',describe:'导游超时费用(TOUR GUIDE OVERTIME FEES)'},
+            {label: 'T/G M', width: '', prop: 'profit',describe:'导游餐补(TOUR GUIDE MEALS)'},
+            {label: 'T/G A', width: '', prop: 'profit',describe:'导游房补(TOUR GUIDE ACCOMMODATION)'},
+            {label: 'T/G TF', width: '', prop: 'profit',describe:'导游交通费(TOUR GUIDE TRANSPORATION FEES)'},
+            {label: 'T/G EF', width: '', prop: 'profit',describe:'导游景点费(TOUR GUIDE ENTRANCE FEES)'},
+            {label: 'C/F M', width: '', prop: 'profit',describe:'司机餐补(CHAUFFEUR MEALS)'},
+            {label: 'C/F OF', width: '', prop: 'profit',describe:'司机超时费用(CHAUFFEUR OVERTIME FEES)'},
+            {label: 'B', width: '', prop: 'profit',describe:'早餐(BREAKFAST) #个人成本'},
+            {label: 'L', width: '', prop: 'profit',describe:'午餐(LUNCH) #个人成本'},
+            {label: 'D', width: '', prop: 'profit',describe:'晚餐(DINNER) #个人成本'},
+            {label: 'TBR', width: '', prop: 'profit',describe:'双人间(TWIN BED ROOM) #个人成本'},
+            {label: 'SGR', width: '', prop: 'profit',describe:'单间(SINGLE ROOM) #个人成本'},
+            {label: 'JS/ES', width: '', prop: 'profit',describe:'小套房/豪华套房(JUNIOR SUITE/EXECUTIVE SUITE) #个人成本'},
+            {label: 'SUITE', width: '', prop: 'profit',describe:'套房(SUITE) #个人成本'},
+            {label: 'ACCO N', width: '', prop: 'profit',describe:'住宿地名称(ACCOMMODATION NAME)'},
+            {label: 'T/V', width: '', prop: 'profit',describe:'公务活动费用(T/V)'},
+            {label: '1/L', width: '', prop: 'profit',describe:'公务活动费用(1/L)'},
+            {label: 'I/F', width: '', prop: 'profit',describe:'公务翻译费用(INTERPRETER FEES)'},
+            {label: 'EF', width: '', prop: 'profit',describe:'景点门票(ENTRANCE FEE) #个人成本'},
+            {label: 'B/R/F', width: '', prop: 'profit',describe:'饮料零食水果(BEVERAGE/RRESHMENT/FRUIT)'},
+            {label: 'TE', width: '', prop: 'profit',describe:'出行物资(TRAVELLLING ESSENTIALS) #个人成本'},
+            {label: 'T/G T', width: '', prop: 'profit',describe:'导游小费(T/G TIPS) #个人成本'},
+            {label: 'DRV T', width: '', prop: 'profit',describe:'司机小费(DRIVER TIPS #个人成本)'},
+            {label: 'P/C', width: '', prop: 'profit',describe:'零用金(PETTY CASH) #个人成本'},
+            {label: 'T/L F', width: '', prop: 'profit',describe:'领队费(TOUR LEADER FEES)'},
+            {label: 'E/C T', width: '', prop: 'profit',describe:'会务费(EXPO/CONFERENCE TICKET)'}
         ],
         statisticsArr: [
             {label: 'DAY', total: '', individual: ''},
@@ -234,10 +339,8 @@ export default {
             
         ],
         tableData: [
-			{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: 1, date: '2018-07-24', sales: 23.34, sale: 'ass', const: 102203.71, profit: 35394.05,a:"12"},
+			{id: 2, date: '2018-07-24', sales: 23.34, sale: 'z', const: 102203.71, profit: 35394.05}
 		],
         options: [{
           value: '选项1',
@@ -575,19 +678,268 @@ export default {
                 ]
             }
         ],
-        
+        cabinoneList: ['经济舱 TBR','经济舱 SGR','核酸检测','团组预算明细'],
+        cabinoneOptions:['经济舱 TBR','经济舱 SGR','公务舱 SGR','公务舱 JS/ES','公务舱 SUITE'],
+        cabinDatal:[
+            {
+                label:'经济舱 TBR',
+                childList:[
+                    {
+                        childLabel:'单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        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, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            },
+            {
+                label:'经济舱 SGR',
+                childList:[
+                    {
+                        childLabel:'单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        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, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            },
+            {
+                label:'公务舱 SGR',
+                childList:[
+                    {
+                        childLabel:'单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        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, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            },
+            {
+                label:'公务舱 JS/ES',
+                childList:[
+                    {
+                        childLabel:'单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        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, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            },
+            {
+                label:'公务舱 SUITE',
+                childList:[
+                    {
+                        childLabel:'单人成本(CNY)',
+                        prop:'costPerson'
+                    },
+                    {
+                        childLabel:'人数',
+                        prop:'toll'
+                    },
+                    {
+                        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, 
+                        totalCost: 137597.76, 
+                        singleQuote: 102203.71, 
+                        totalQuote: 35394.05, 
+                        singleProfit: 35394.05, 
+                        totalProfit: 35394.05 
+                    },
+                ]
+            }
+            ,
+            {
+                label:'团组预算明细',
+                childList:[
+                    {
+                        childLabel:'团组成本(CNY)',
+                        prop:'groupCosts'
+                    },
+                    {
+                        childLabel:'团组报价(CNY)',
+                        prop:'gtroupQuotes'
+                    },
+                    {
+                        childLabel:'团组利润(CNY)',
+                        prop:'groupProfit'
+                    }
+                ],
+                sheetInfo:[
+                    { 
+                        groupCosts: 1, 
+                        gtroupQuotes: 11, 
+                        groupProfit: 137597.76, 
+                    },
+                ]
+            }
+        ]
       };
     },
     watch:{
 			// 此处监听variable变量,当期有变化时执行
             checkList(item1,item2){
-                console.log(item1)
+                // console.log(item1)
                 // console.log(item2)
                 // item1为新值,item2为旧值
             },
     },
     methods:{
         getSummaries(param) {
+            console.log(param)
             const { columns, data } = param;
             const sums = [];
             columns.forEach((column, index) => {
@@ -595,14 +947,14 @@ export default {
                 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 {
+            console.log(values)
+            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;
                     }
                     
@@ -613,11 +965,39 @@ export default {
             }
         });
         return sums;
-      }
+        },
+        handleEdit(index, row) {
+            console.log(index, row);
+            this.outerVisible=true;
+        },
+        handleDelete(index, row,rows) {
+            console.log(index, row,rows);
+            this.$confirm('此操作将删除该条信息, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+            }).then(() => {
+                this.$message({
+                    message:'已删除' ,
+                    type: 'success',
+                    offset:50
+                });
+                rows.splice(index, 1);
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消删除'
+                });          
+            });
+        },
+        addStrip(){
+            this.tableData.push(
+                {id: '', date: '', sales:'', sale: '', const: '', profit: ''}
+            )
+        }
     },
     mounted(){
-        console.log(this.checkList.includes("A"));
-        console.log(this.checkList.includes("1"));
+        
     }
 }
 </script>
@@ -662,18 +1042,15 @@ export default {
     .cost-box .el-checkbox-group{
         margin: 5px 0;
     }
-    .cost-box .el-checkbox{
+    .form-ss .el-checkbox{
         width: 100px;
         margin: 5px 0;
     }
     .sheet-box{
         margin-top: 30px;
     }
-    .sheet-head{
-        display: flex;
-    }
-    .sheet-head-li{
-        margin-right: 20px;
+    .cabin-box{
+        margin-top: 30px;
     }
     .biaoge{
         margin-bottom: 30px;
@@ -683,4 +1060,20 @@ export default {
         white-space: nowrap;
         text-overflow: ellipsis;
     }
+    .cost-box .cabin-box .cost-box .el-checkbox{
+        margin-right: 20px;
+    }
+    .cost-box .el-table .cell{
+        text-align: center;
+    }
+    .figures-btn{
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+    }
+    .figures-btn .el-button--mini{
+        width: 70px;
+        margin: 2px 0;
+        margin-left:0 ;
+    }
 </style>

+ 14 - 0
src/components/OP/OCRIdentify.vue

@@ -0,0 +1,14 @@
+<template>
+    <div>
+        
+    </div>
+</template>
+
+<script>
+export default {
+    
+}
+</script>
+<style>
+    
+</style>

+ 6 - 0
src/router/index.js

@@ -42,6 +42,7 @@ import SetData from '@/components/system/SetData';
 import CustomerCompany from '@/components/Crm/CustomerCompany';
 import DeleClient from '@/components/Crm/DeleClient';
 import Cost from '@/components/Finance/Cost';
+import OCRIdentify from '@/components/OP/OCRIdentify';
 Vue.use(Router)
 
 export default new Router({
@@ -239,6 +240,11 @@ export default new Router({
           name: 'Cost',
           component: Cost
         },
+        {
+          path: '/home/OCRIdentify',
+          name: 'Cost',
+          component: OCRIdentify
+        },
       ]
     },
     {