yuanrf 9 місяців тому
батько
коміт
d417c5498d
1 змінених файлів з 166 додано та 5 видалено
  1. 166 5
      src/components/Finance/Cost.vue

+ 166 - 5
src/components/Finance/Cost.vue

@@ -1266,6 +1266,47 @@ export default {
                         },
                     ],
 
+                },
+                {
+                    label: '机票',
+                    EnLabel: 'tdc',
+                    childList: [
+                        {
+                            childLabel: '头等舱单人成本(CNY)',
+                            prop: 'tdccb',
+                            title: '头等舱报批费用:',
+                            tips: '这是一个tips',
+                        },
+                        {
+                            childLabel: '人数',
+                            prop: 'tdcrs'
+                        },
+                        {
+                            childLabel: '头等舱系数',
+                            prop: 'tdcxs'
+                        },
+                        {
+                            childLabel: '头等舱总成本(CNY)',
+                            prop: 'ZCB'
+                        },
+                        {
+                            childLabel: '头等舱单人报价(CNY)',
+                            prop: 'DRBJ'
+                        },
+                        {
+                            childLabel: '头等舱总报价(CNY)',
+                            prop: 'ZBJ'
+                        },
+                        {
+                            childLabel: '头等舱单人利润(CNY)',
+                            prop: 'DRLR'
+                        },
+                        {
+                            childLabel: '头等舱总利润(CNY)',
+                            prop: 'ZLR'
+                        },
+                    ],
+
                 },
                 {
                     label: '船票',
@@ -1623,7 +1664,7 @@ export default {
 
             ],
             //cabinoneList: ['经济舱 TBR', '经济舱 SGR', '核酸检测', '团组预算明细'],
-            cabinoneOptions: ['经济舱 TBR', '经济舱 SGR', '公务舱 SGR', '公务舱 JS/ES', '公务舱 SUITE', '经济舱 SUITE'],
+            cabinoneOptions: ['经济舱 TBR', '经济舱 SGR', '公务舱 SGR', '公务舱 JS/ES', '公务舱 SUITE', '经济舱 SUITE', '头等舱 JS/ES', '头等舱 SUITE'],
             cabinDatal: [
                 {
                     label: '经济舱 TBR',
@@ -1902,6 +1943,98 @@ export default {
                         },
                     ]
                 },
+                {
+                    label: '头等舱 JS/ES',
+                    childList: [
+                        {
+                            childLabel: '单人成本(CNY)',
+                            prop: 'costPerson'
+                        },
+                        {
+                            childLabel: '人数',
+                            prop: 'toll'
+                        },
+                        {
+                            childLabel: '总成本(CNY)',
+                            prop: 'totalCost'
+                        },
+                        {
+                            childLabel: '单人报价(CNY)',
+                            prop: 'singleQuote',
+                            title: '报批(单人经济舱总报价):',
+                            tips: '这是一个tips',
+                        },
+                        {
+                            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',
+                            title: '报批(单人经济舱总报价):',
+                            tips: '这是一个tips',
+                        },
+                        {
+                            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: [
@@ -4340,15 +4473,18 @@ export default {
 
             let flights = {
                 "经济舱": this.AGroupCostParameter.jjcrs,
-                "公务舱": this.AGroupCostParameter.gwcrs
+                "公务舱": this.AGroupCostParameter.gwcrs,
+                "头等舱": this.AGroupCostParameter.tdcrs,
             };
 
             let result = {};
-            for (let flight of ["经济舱", "公务舱"]) {
+            for (let flight of ["经济舱", "公务舱", "头等舱"]) {
                 if (flight === "经济舱") {
                     this.matchRooms(hotelRooms, flights, ["TBR", "SGR", "JSES", "SUITE"], flight, result);
                 } else if (flight === "公务舱") {
                     this.matchRooms(hotelRooms, flights, ["SUITE", "JSES", "SGR", "TBR"], flight, result);
+                } else if (flight === "头等舱") {
+                    this.matchRooms(hotelRooms, flights, ["JSES", "SUITE", "SGR", "TBR"], flight, result);
                 }
             }
 
@@ -4463,7 +4599,11 @@ export default {
             var JJCSUITERS = (result.hasOwnProperty("经济舱SUITE") ? result["经济舱SUITE"] : 0)
             var txtGWCSUITERS = (result.hasOwnProperty("公务舱SUITE") ? result["公务舱SUITE"] : 0)
 
-            console.log(txtJJCSGRRS, lblGWCSGRRS, txtJJCTBRRS, txtGWCJSESRS, JJCSUITERS, txtGWCSUITERS, 'test');
+            //头等舱人数判断
+            var txtTDCJSESRS = (result.hasOwnProperty("头等舱JSES") ? result["头等舱JSES"] : 0)
+            var txtTDCSUITERS = (result.hasOwnProperty("头等舱SUITE") ? result["头等舱SUITE"] : 0)
+
+            //console.log(txtJJCSGRRS, lblGWCSGRRS, txtJJCTBRRS, txtGWCJSESRS, JJCSUITERS, txtGWCSUITERS, 'test');
 
             if (txtJJCSGRRS > 0) {
                 rightCheckArr.push('经济舱 SGR');
@@ -4484,6 +4624,14 @@ export default {
                 rightCheckArr.push('公务舱 SUITE');
             }
 
+            //头等舱人数判断
+            if (txtTDCJSESRS > 0) {
+                rightCheckArr.push('头等舱 JSES');
+            }
+            if (txtTDCSUITERS > 0) {
+                rightCheckArr.push('头等舱 SUITE');
+            }
+
             rightCheckArr.push('团组预算明细');
             rightCheckArr = [...new Set(rightCheckArr)];
 
@@ -4498,6 +4646,9 @@ export default {
             this.cabinDatal[3].sheetInfo[0].toll = txtGWCJSESRS;
             this.cabinDatal[4].sheetInfo[0].toll = txtGWCSUITERS;
             this.cabinDatal[5].sheetInfo[0].toll = JJCSUITERS;
+            //头等舱人数
+            this.cabinDatal[6].sheetInfo[0].toll = txtTDCJSESRS;
+            this.cabinDatal[7].sheetInfo[0].toll = txtTDCSUITERS;
 
             this.AGroupCostParameter.djcb = Djsum;
             this.AGroupCostParameter.gwcb = GWsum;
@@ -4514,6 +4665,9 @@ export default {
             let GWCSUITE = (leftSum + Number(this.AGroupCostParameter.suitecb) + Number(this.AGroupCostParameter.gwccb)).toFixed(2);
             let GWCSGR = (leftSum + Number(this.AGroupCostParameter.sgrcb) + Number(this.AGroupCostParameter.gwccb)).toFixed(2);
             let GWCJSES = (leftSum + Number(this.AGroupCostParameter.jsescb) + Number(this.AGroupCostParameter.gwccb)).toFixed(2);
+            //头等舱金额计算
+            let TDCJSES = (leftSum + Number(this.AGroupCostParameter.jsescb) + Number(this.AGroupCostParameter.tdccb)).toFixed(2);
+            let TDCSUITES = (leftSum + Number(this.AGroupCostParameter.suitecb) + Number(this.AGroupCostParameter.tdccb)).toFixed(2);
             ////////console.log(JJCSGR, JJCTBR, JJCSUITE, GWCSUITE, GWCSGR, GWCJSES, '666--------------------------');
 
             var rightSum = 0;
@@ -4527,7 +4681,9 @@ export default {
             let GWCSUITEDRBJ = (rightSum + Number(that.calculateDRBJ('suite')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
             let GWCSGRDRBJ = (rightSum + Number(that.calculateDRBJ('sgr')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
             let GWCJSESDRBJ = (rightSum + Number(that.calculateDRBJ('jses')) + Number(that.calculateDRBJ('gwc'))).toFixed(2);
-
+            //头等舱单人报价
+            let TDCJSESDRBJ = (rightSum + Number(that.calculateDRBJ('jses')) + Number(that.calculateDRBJ('tdc'))).toFixed(2);
+            let TDCSUITEDRBJ = (rightSum + Number(that.calculateDRBJ('suite')) + Number(that.calculateDRBJ('tdc'))).toFixed(2);
 
             this.cabinDatal[0].sheetInfo[0].costPerson = JJCTBR;
             this.cabinDatal[0].sheetInfo[0].singleQuote = JJCTBRDRBJ;
@@ -4541,6 +4697,11 @@ export default {
             this.cabinDatal[4].sheetInfo[0].singleQuote = GWCSUITEDRBJ;
             this.cabinDatal[5].sheetInfo[0].costPerson = JJCSUITE;
             this.cabinDatal[5].sheetInfo[0].singleQuote = JJCSUITEDRBJ;
+            //头等舱费用信息
+            this.cabinDatal[6].sheetInfo[0].costPerson = TDCJSES;
+            this.cabinDatal[6].sheetInfo[0].singleQuote = TDCJSESDRBJ;
+            this.cabinDatal[7].sheetInfo[0].costPerson = TDCSUITES;
+            this.cabinDatal[7].sheetInfo[0].singleQuote = TDCSUITEDRBJ;
 
             let groupCosts = 0;
             let gtroupQuotes = 0;