瀏覽代碼

08121157tj

liuhj 10 月之前
父節點
當前提交
9137bcb78e

+ 75 - 84
src/components/OP/EntryDetails.vue

@@ -666,7 +666,6 @@ export default {
                     portType: 1
                 }
             }).then(function (res) {           
-                console.log(res)
                 if(res.data.code==200){
                     that.options=res.data.data.groupNameData;
                     that.currencys=res.data.data.currencyInit;
@@ -1316,17 +1315,14 @@ export default {
                 return i.id ===item
             });
             //在change中获取到整条对象数据
-            console.log(obj);
             val.currencyName=obj.currencyName;
             val.currency=obj.currency;
             val.cost=obj.roomCost;
-            console.log(this.currencys)
             for(let j=0;j<this.currencys.length;j++){
                 if(this.currencys[j].currencyCode==obj.currencyCode){
                     rate=this.currencys[j].rate;
                 }
             }
-            console.log(val.cost,rate)
             val.subTotal=Number(val.cost)*Number(rate);
             this.TotalAccommodationFee=0;
             for(let a=0;a<this.quarterageData.length;a++){
@@ -1336,17 +1332,12 @@ export default {
         },
         //伙食地区选择
         mealschangeSelect(val,item,index){
-            console.log(val);
-            console.log(index);
             var rate=0
             var obj={}
             obj= this.placeinif.find(function(i){
                 return i.id ===item
             });
             //在change中获取到整条对象数据
-            console.log(obj);
-            console.log(this.currencys);
-            console.log(this.boardWagesData);
             // if(index!=undefined){
             //     val[index].currencyName=obj.currencyName;
             //     val[index].currency=obj.currency;
@@ -1380,16 +1371,12 @@ export default {
         },
         //公杂费地区选择
         MiscellaneouschangeSelect(val,item,index){
-            console.log(index);
             var rate=0
             var obj={}
             obj= this.placeinif.find(function(i){
                 return i.id ===item
             });
             //在change中获取到整条对象数据
-            console.log(obj);
-            console.log(this.currencys);
-            console.log(val);
             if(index!=undefined){
                 val[index].currencyName=obj.currencyName;
                 val[index].currency=obj.currency;
@@ -1537,82 +1524,83 @@ export default {
         },
         //保存
         storage:debounce(function(){
-            //住宿费
-            this.fullscreenLoading=true
-            var quarterageDatas=[];
-            for(let m=0;m<this.quarterageData.length;m++){
-                if(this.quarterageData[m].nationalTravelFeeId!=''){
-                    quarterageDatas.push({
-                        id:this.quarterageData[m].id,
-                        diId:this.quarterageData[m].diId,
-                        type:this.quarterageData[m].type,
-                        days:this.quarterageData[m].days,
-                        nationalTravelFeeId:this.quarterageData[m].nationalTravelFeeId,
-                        cost:this.quarterageData[m].cost,
-                        currency:this.quarterageData[m].currency,
-                        subTotal:this.quarterageData[m].subTotal,
-                        remark:this.quarterageData[m].remark,
-                    })
+            return new Promise((resolve, reject) => {
+                //住宿费
+                this.fullscreenLoading=true
+                var quarterageDatas=[];
+                for(let m=0;m<this.quarterageData.length;m++){
+                    if(this.quarterageData[m].nationalTravelFeeId!=''){
+                        quarterageDatas.push({
+                            id:this.quarterageData[m].id,
+                            diId:this.quarterageData[m].diId,
+                            type:this.quarterageData[m].type,
+                            days:this.quarterageData[m].days,
+                            nationalTravelFeeId:this.quarterageData[m].nationalTravelFeeId,
+                            cost:this.quarterageData[m].cost,
+                            currency:this.quarterageData[m].currency,
+                            subTotal:this.quarterageData[m].subTotal,
+                            remark:this.quarterageData[m].remark,
+                        })
+                    }
                 }
-            }
-            //伙食费
-            var boardWagesDatas=[];
-            for(let n=0;n<this.boardWagesData.length;n++){
-                if(this.boardWagesData[n].nationalTravelFeeId!=''){
-                    boardWagesDatas.push({
-                        id:this.boardWagesData[n].id,
-                        diId:this.boardWagesData[n].diId,
-                        type:this.boardWagesData[n].type,
-                        days:this.boardWagesData[n].days,
-                        nationalTravelFeeId:this.boardWagesData[n].nationalTravelFeeId,
-                        cost:this.boardWagesData[n].cost,
-                        currency:this.boardWagesData[n].currency,
-                        subTotal:this.boardWagesData[n].subTotal,
-                        remark:this.boardWagesData[n].remark,
-                    })
+                //伙食费
+                var boardWagesDatas=[];
+                for(let n=0;n<this.boardWagesData.length;n++){
+                    if(this.boardWagesData[n].nationalTravelFeeId!=''){
+                        boardWagesDatas.push({
+                            id:this.boardWagesData[n].id,
+                            diId:this.boardWagesData[n].diId,
+                            type:this.boardWagesData[n].type,
+                            days:this.boardWagesData[n].days,
+                            nationalTravelFeeId:this.boardWagesData[n].nationalTravelFeeId,
+                            cost:this.boardWagesData[n].cost,
+                            currency:this.boardWagesData[n].currency,
+                            subTotal:this.boardWagesData[n].subTotal,
+                            remark:this.boardWagesData[n].remark,
+                        })
+                    }
                 }
-            }
-            //公杂费miscellaneousFeeData
-            var miscellaneousFeeDatas=[];
-            for(let b=0;b<this.miscellaneousFeeData.length;b++){
-                if(this.miscellaneousFeeData[b].nationalTravelFeeId!=''){
-                    miscellaneousFeeDatas.push({
-                        id:this.miscellaneousFeeData[b].id,
-                        diId:this.miscellaneousFeeData[b].diId,
-                        type:this.miscellaneousFeeData[b].type,
-                        days:this.miscellaneousFeeData[b].days,
-                        nationalTravelFeeId:this.miscellaneousFeeData[b].nationalTravelFeeId,
-                        cost:this.miscellaneousFeeData[b].cost,
-                        currency:this.miscellaneousFeeData[b].currency,
-                        subTotal:this.miscellaneousFeeData[b].subTotal,
-                        remark:this.miscellaneousFeeData[b].remark,
-                    })
+                //公杂费miscellaneousFeeData
+                var miscellaneousFeeDatas=[];
+                for(let b=0;b<this.miscellaneousFeeData.length;b++){
+                    if(this.miscellaneousFeeData[b].nationalTravelFeeId!=''){
+                        miscellaneousFeeDatas.push({
+                            id:this.miscellaneousFeeData[b].id,
+                            diId:this.miscellaneousFeeData[b].diId,
+                            type:this.miscellaneousFeeData[b].type,
+                            days:this.miscellaneousFeeData[b].days,
+                            nationalTravelFeeId:this.miscellaneousFeeData[b].nationalTravelFeeId,
+                            cost:this.miscellaneousFeeData[b].cost,
+                            currency:this.miscellaneousFeeData[b].currency,
+                            subTotal:this.miscellaneousFeeData[b].subTotal,
+                            remark:this.miscellaneousFeeData[b].remark,
+                        })
+                    }
                 }
-            }
-            //培训费
-            var trainingExpenseDatas=[];
-            for(let p=0;p<this.trainingExpenseData.length;p++){
-                if(this.trainingExpenseData[p].nationalTravelFeeId!=''){
-                    trainingExpenseDatas.push({
-                        id:this.trainingExpenseData[p].id,
-                        diId:this.trainingExpenseData[p].diId,
-                        type:this.trainingExpenseData[p].type,
-                        days:this.trainingExpenseData[p].days,
-                        nationalTravelFeeId:this.trainingExpenseData[p].nationalTravelFeeId,
-                        cost:this.trainingExpenseData[p].cost,
-                        currency:this.trainingExpenseData[p].currency,
-                        subTotal:this.trainingExpenseData[p].subTotal,
-                        remark:this.trainingExpenseData[p].remark,
-                    })
+                //培训费
+                var trainingExpenseDatas=[];
+                for(let p=0;p<this.trainingExpenseData.length;p++){
+                    if(this.trainingExpenseData[p].nationalTravelFeeId!=''){
+                        trainingExpenseDatas.push({
+                            id:this.trainingExpenseData[p].id,
+                            diId:this.trainingExpenseData[p].diId,
+                            type:this.trainingExpenseData[p].type,
+                            days:this.trainingExpenseData[p].days,
+                            nationalTravelFeeId:this.trainingExpenseData[p].nationalTravelFeeId,
+                            cost:this.trainingExpenseData[p].cost,
+                            currency:this.trainingExpenseData[p].currency,
+                            subTotal:this.trainingExpenseData[p].subTotal,
+                            remark:this.trainingExpenseData[p].remark,
+                        })
+                    }
                 }
-            }
-            this.storageAPI(quarterageDatas,boardWagesDatas,miscellaneousFeeDatas,trainingExpenseDatas)
+                this.storageAPI(quarterageDatas,boardWagesDatas,miscellaneousFeeDatas,trainingExpenseDatas)
+            })
         },1000,true),
         //保存API
         storageAPI(arrthre,arrfour,arrfive,arrsix){
             var url = "/api/Groups/PostEnterExitCostOperate"
             var that = this
-            console.log(that.value)
             this.$axios({
                 method: 'post',
                 url: url,
@@ -1659,7 +1647,6 @@ export default {
                 }
             }).then(function (res) {
                 if(res.data.code==200){
-                    console.log(res)
                     that.$message({
                         type: 'success',
                         message: res.data.msg
@@ -1672,6 +1659,8 @@ export default {
             }).catch(function (error) {
                 that.$message.error(error.message);
             });
+            
+
         },
         //选择团组名称调用
         chengvalue(){
@@ -1679,7 +1668,7 @@ export default {
             this.fullscreenLoading=true;
             this.GetEnterExitCostInfobyDiId()
         },
-        eptschedule(val){
+        eptschedule:debounce(function(val){
             var subTypeId=0
             if(val==1){
                 subTypeId=this.listvalue
@@ -1707,7 +1696,6 @@ export default {
                     subTypeId:subTypeId
                 }
             }).then(function (res) {
-                console.log(res)
                 if(res.data.code==200){
                     that.$message({
                         type: 'success',
@@ -1718,7 +1706,10 @@ export default {
                     that.$message.error(res.data.msg);
                 }
             })
-        },
+            // this.storage().then(function () {
+            // });
+        },500,true),
+        //
         calculation(){
             var jnfy
             var jjcxj

+ 7 - 7
src/components/OP/OpCustomers.vue

@@ -304,7 +304,7 @@ export default {
                 iid: 2,
                 clientName: [],
                 insuranceCosts: 0,
-                currency: '',
+                currency: 836,
                 attachment: '',
                 createUserId: 0,
                 remark: '',
@@ -424,9 +424,9 @@ export default {
                                     that.OpCustomersData.iid = that.insuranceCostList[0].id;
                                     that.Balance = that.insuranceCostList[0].balance;
                                     that.currencyList = res.data.data.currencyList;//币种下拉框
-                                    if (that.currencyList.length != 0) {
-                                        that.OpCustomersData.currency = that.currencyList[0].currencyId
-                                    }
+                                    // if (that.currencyList.length != 0) {
+                                    //     that.OpCustomersData.currency = that.currencyList[0].currencyId
+                                    // }
 
                                     that.bankCard = res.data.data.bankCard;//卡类型下拉框
                                     that.payment = res.data.data.payment;//支付方式下拉框
@@ -476,9 +476,9 @@ export default {
                             that.OpCustomersData.iid = that.insuranceCostList[0].id;
                             that.Balance = that.insuranceCostList[0].balance;
                             that.currencyList = res.data.data.currencyList;//币种下拉框
-                            if (that.currencyList.length != 0) {
-                                that.OpCustomersData.currency = that.currencyList[0].currencyId
-                            }
+                            // if (that.currencyList.length != 0) {
+                            //     that.OpCustomersData.currency = that.currencyList[0].currencyId
+                            // }
                             that.bankCard = res.data.data.bankCard;//卡类型下拉框
                             that.payment = res.data.data.payment;//支付方式下拉框
                         }

+ 1 - 1
src/components/OP/OpVisaPriec.vue

@@ -316,7 +316,7 @@ export default {
                 diId: '',
                 visaClient: '',
                 visaPrice: 0,
-                visaCurrency: '',
+                visaCurrency: 836,
                 isThird: '',
                 passengerType: '',
                 visaNumber: 0,

+ 123 - 14
src/components/statistics/Statistically.vue

@@ -19,7 +19,7 @@
                     </div>
                 </el-tab-pane>
                 <el-tab-pane label="国交数据统计" name="second">
-                    <el-select style="width:200px; margin-bottom: 10px;" v-model="value" filterable placeholder="请选择">
+                    <el-select style="width:200px; margin-bottom: 10px;" @change="countrieschange" v-model="value" filterable placeholder="请选择">
                         <el-option
                             v-for="item in options"
                             :key="item.value"
@@ -28,8 +28,10 @@
                         </el-option>
                     </el-select>
                     <div class="canvas-box">
-                        <div id="grossmarginss" style="width: 100%;height:400px;"></div>
-                        <div id="Airticketcitybox" style="width: 100%;height:400px;"></div>
+                        <div v-if="value==1" id="grossmarginss" style="width: 100%;height:400px;"></div>
+                        <div v-if="value==1" id="Airticketcitybox" style="width: 100%;height:400px;"></div>
+                        <div v-if="value==2" id="hoteltopten" style="width: 100%;height:400px;"></div>
+                        <div v-if="value==5" id="invitationtopten" style="width: 100%;height:400px;"></div>
                     </div>
                 </el-tab-pane>
                 <el-tab-pane label="会务数据统计" name="third">会务数据统计</el-tab-pane>
@@ -52,6 +54,7 @@ export default {
             Airticketnum:[],
             Airticketcity:[],
             Hoteltop:[],
+            invitationtop:[],
             aaa:[
                 ['product', '去年销售额', '今年销售额'],
                 ['1月', 43.3, 85.8],
@@ -84,7 +87,7 @@ export default {
             ],
             activeName: 'second',
             options: [{
-            value: 1,
+            value: 1,   
             label: '机票'
             }, {
             value: 2,
@@ -110,7 +113,7 @@ export default {
             }
             if(this.activeName=='second'){
                 this.StatisticsAirTicket()
-            }
+            } 
             // console.log(tab, event);
         },
         //处理时间
@@ -119,6 +122,7 @@ export default {
             var y=date.getFullYear();
             return y
         },
+        //团组机票
         groupstatisone(){
             var grossmarginss = echarts.init(document.getElementById('grossmarginss'));
             grossmarginss.setOption({
@@ -144,8 +148,6 @@ export default {
                     name: '机票数量',
                 },
                 color:['#2e83d4'],
-                // Declare several bar series, each will be mapped
-                // to a column of dataset.source by default.
                 series: [{ type: 'bar' }]
             });
             var Airticketcitybox = echarts.init(document.getElementById('Airticketcitybox'));
@@ -158,7 +160,7 @@ export default {
                     formatter:function(params){
                         var html="该月总次数:"+params.data[1]+"次<br/>";
                         for(let i=0;i<params.data[2].length;i++){
-                            html += '城市:'+params.data[2][i].city+'&nbsp;&nbsp;&nbsp;'+'到此城市次数:' +params.data[2][i].quantity+"<br/>";
+                            html += '城市:'+params.data[2][i].city+'&nbsp;&nbsp;&nbsp;'+'到此城市次数:' +params.data[2][i].quantity+"<br/>";
                         }
                         return html 
                     }
@@ -172,8 +174,56 @@ export default {
                     name: '到达次数',
                 },
                 color:['#2e83d4'],
-                // Declare several bar series, each will be mapped
-                // to a column of dataset.source by default.
+                series: [{ type: 'bar' }]
+            });
+        },
+        //团组酒店
+        grouphotel(){
+            var hoteltopten = echarts.init(document.getElementById('hoteltopten'));
+            hoteltopten.setOption({
+                title:{
+                    text: '预订酒店前十排行',
+                },
+                legend: {},
+                tooltip: {
+                    formatter:function(params){
+                        var html="该城市酒店预订总次数:"+params.data[1]+"次<br/>"
+                        for(let i=0;i<params.data[2].length;i++){
+                            console.log(params.data[2][i]);
+                            html += '酒店名称:'+params.data[2][i].hotelName+',&nbsp;&nbsp;&nbsp;'+'单人间:' +params.data[2][i].singleRoomCount+',&nbsp;&nbsp;&nbsp;'+'双人间:' +params.data[2][i].doubleRoomCount+',&nbsp;&nbsp;&nbsp;'+'套房:' +params.data[2][i].suiteRoomCount+',&nbsp;&nbsp;&nbsp;'+'其他房型:' +params.data[2][i].otherRoomCount+',&nbsp;&nbsp;&nbsp;'+'总房数:' +params.data[2][i].roomTotal+",<br/>";
+                        }
+                        return html 
+                    }
+
+                },
+                dataset: {
+                    source: this.Hoteltop
+                },
+                xAxis: { type: 'category' },
+                yAxis: {
+                    name: '预订次数',
+                },
+                color:['#2e83d4'],
+                series: [{ type: 'bar' }]
+            });
+        },
+        //团组商邀
+        groupinvitation(){
+            var invitationtopten = echarts.init(document.getElementById('invitationtopten'));
+            invitationtopten.setOption({
+                title:{
+                    text: '邀请国家数量排行',
+                },
+                legend: {},
+                tooltip: {},
+                dataset: {
+                    source: this.invitationtop
+                },
+                xAxis: { type: 'category' },
+                yAxis: {
+                    name: '数量',
+                },
+                color:['#2e83d4'],
                 series: [{ type: 'bar' }]
             });
         },
@@ -239,10 +289,29 @@ export default {
         },
         //年change
         yearchange(){
+            if(this.activeName=='first'){
+                this.StatisticsYOY();
+            }
+            if(this.activeName=='second'){
+                this.countrieschange(this.value);
+            }
             // this.businessincome=[];
             // this.Grossprofit=[];
             // this.costing=[];
-            this.StatisticsYOY()
+            
+        },
+        //国交部分类型切换
+        countrieschange(val){
+            console.log(val);
+            if(val==1){
+                this.StatisticsAirTicket();
+            }
+            if(val==2){
+                this.StatisticsHotel();
+            }
+            if(val==5){
+                this.StatisticsInvitation();
+            }
         },
         //获取营业额、成本支出、毛利润数据
         StatisticsYOY(){
@@ -338,7 +407,45 @@ export default {
                 }
             }).then(function (res) {
                 if(res.data.code==200){
-                    
+                    that.Hoteltop=[];
+                    var datainfo=res.data.data;
+                    //酒店预订数
+                    that.Hoteltop.push(['product','城市酒店预订排行榜']);
+                    for(let i=0;i<datainfo.length;i++){
+                        that.Hoteltop.push([datainfo[i].city,datainfo[i].bookingRoomNum,datainfo[i].hotelData]);
+                    }
+                    that.grouphotel()
+                }else{
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'warning'
+                    });
+                }
+            })
+        },
+        //获取国交数据统计数据商邀
+        StatisticsInvitation(){
+            var url = "/api/Statistics/StatisticsInvitation"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data:{
+                    year:that.getdate(that.year),
+                }
+            }).then(function (res) {
+                if(res.data.code==200){
+                    that.invitationtop=[];
+                    var datainfo=res.data.data;
+                    //酒店预订数
+                    that.invitationtop.push(['product','商邀邀请国家数量']);
+                    for(let i=0;i<datainfo.length;i++){
+                        that.invitationtop.push([datainfo[i].country,datainfo[i].timeNum]);
+                    }
+                    that.groupinvitation()
                 }else{
                     that.$message({
                         message: res.data.msg,
@@ -350,8 +457,10 @@ export default {
     },
     mounted(){
         // this.StatisticsYOY();
-        this.StatisticsAirTicket();
-        this.StatisticsHotel();
+        this.countrieschange(1)
+        // this.StatisticsAirTicket();
+        // this.StatisticsHotel();
+        // this.StatisticsInvitation();
     }
 }
 </script>