liuhj 1 rok temu
rodzic
commit
7408af7228

+ 23 - 22
src/components/Finance/Sendack.vue

@@ -140,7 +140,14 @@
                             </el-select>
                         </el-form-item>
                         <el-form-item label="收款方" prop="payee" :label-width="formLabelWidth">
-                            <el-input v-model="form.payee" autocomplete="off"></el-input>
+                            <el-input type="text" v-model="form.payee"></el-input>
+                        </el-form-item>
+                        <el-form-item label="对方开户行" prop="payeebank" :label-width="formLabelWidth">
+                            <el-input v-model="form.payeebank" autocomplete="off"></el-input>
+                            <!-- <el-input type="text" v-model="form.payeebank" ></el-input> -->
+                        </el-form-item>
+                        <el-form-item label="对方账号" prop="payeenumber" :label-width="formLabelWidth">
+                            <el-input type="text" v-model="form.payeenumber" ></el-input>
                         </el-form-item>
                         <el-form-item label="支付方式" prop="payDId" :label-width="formLabelWidth">
                             <el-select v-model="form.payDId" placeholder="请选择活动区域">
@@ -195,6 +202,8 @@ export default {
                 currencyId:836,//币种Id
                 currencyCode:'',//币种Code
                 payee:'',//收款方
+                payeebank:'',//银行
+                payeenumber:'',//账号
                 payDId:72,//支付方式Id
                 orbitalPrivateTransfer:0,//费用标识
                 consumptionPatterns:'',//消费方式
@@ -211,6 +220,12 @@ export default {
                 payee: [
                     { required: true, message: '请填写完此项', trigger: 'blur' }
                 ],
+                payeebank: [
+                    { required: true, message: '请填写完此项', trigger: 'blur' }
+                ],
+                payeenumber: [
+                    { required: true, message: '请填写完此项', trigger: 'blur' }
+                ],
                 payDId: [
                     { required: true, message: '请选择', trigger: 'change' }
                 ],
@@ -447,26 +462,6 @@ export default {
         PostPaymentRefundAndOtherMoneyAddOrEdit(status){
             var url = "/api/Financial/PostPaymentRefundAndOtherMoneyAddOrEdit"
             var that = this
-            var data={
-                    portType:1,
-                    pageId:Number(that.pageId),
-                    userId:that.userid,
-                    status:status,//1 添加 2 修改
-                    diId:that.value,
-                    id:that.form.id,
-                    ccpId:that.form.ccpId,
-                    priceName:that.form.priceName,
-                    price:that.form.price,
-                    currencyId:that.form.currencyId,
-                    currencyCode:that.form.currencyCode,
-                    payee:that.form.payee,
-                    payDId:that.form.payDId,
-                    orbitalPrivateTransfer:that.form.orbitalPrivateTransfer,
-                    consumptionPatterns:that.form.consumptionPatterns,
-                    payType:that.form.payType,
-                    remark:that.form.remark,
-                }
-                console.log(JSON.stringify(data))
             this.$axios({
                 method: 'post',
                 url: url,
@@ -486,6 +481,8 @@ export default {
                     currencyId:that.form.currencyId,
                     currencyCode:that.form.currencyCode,
                     payee:that.form.payee,
+                    otherBankName:that.form.payeebank,
+                    otherSideNo:that.form.payeenumber,
                     payDId:that.form.payDId,
                     orbitalPrivateTransfer:that.form.orbitalPrivateTransfer,
                     consumptionPatterns:that.form.consumptionPatterns,
@@ -526,6 +523,8 @@ export default {
                 currencyId:836,//币种Id
                 currencyCode:'',//币种Code
                 payee:'',//收款方
+                payeebank:'',//
+                payeenumber:'',//
                 payDId:72,//支付方式Id
                 orbitalPrivateTransfer:0,//费用标识
                 consumptionPatterns:'',//消费方式
@@ -555,13 +554,15 @@ export default {
                     that.form.price=formobject.price;
                     that.form.currencyId=formobject.currencyId;
                     that.form.payee=formobject.payee;
+                    that.form.payeebank=formobject.otherBankName;
+                    that.form.payeenumber=formobject.otherSideNo;
                     that.form.payDId=formobject.payDId;
                     that.form.orbitalPrivateTransfer=formobject.orbitalPrivateTransfer;
                     that.form.consumptionPatterns=formobject.consumptionPatterns;
                     that.form.payType=formobject.payType;
                     that.form.remark=formobject.remark;
                 }else{
-                    that.$message.error('获取数据源失败!');
+                    that.$message.error(res.data.msg);
                 }
             })
         },

+ 339 - 19
src/components/statistics/Statistically.vue

@@ -28,10 +28,52 @@
                         </el-option>
                     </el-select>
                     <div class="canvas-box">
-                        <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 v-if="value==7" style="width: 100%;">
+                            <div id="teamCooperationbox" style="width: 100%;height:400px;"></div>
+                            <div style="display: flex;justify-content: space-between;">
+                                <div id="groupnumbox" style="width: 50%;height:400px;"></div>
+                                <div id="customersNumberbox" style="width: 50%;height:400px;"></div>
+                            </div>
+                            <div id="scaleDrawingbox" style="width: 50%;height:400px;"></div>
+                        </div>
+                        <div v-else-if="value==1" style="width: 100%;">
+                            <div id="grossmarginss" style="width: 100%;height:400px;"></div>
+                            <div id="Airticketcitybox" style="width: 100%;height:400px;"></div>
+                        </div>
+                        <div v-else-if="value==2" style="width: 100%;">
+                            <div id="hoteltopten" style="width: 100%;height:400px;"></div>
+                        </div>
+                        <div v-else-if="value==5" style="width: 100%;">
+                            <div id="invitationtopten" style="width: 100%;height:400px;"></div>
+                        </div>
+                        <div v-else-if="value==3" style="width: 100%;">
+                            <div class="yeartableul">
+                                <div class="yeartableli" v-for="(item,index) in tableData" :key="index">
+                                    <div>{{item.feeName}}</div>
+                                    <div>{{item.currPeriodFee}}</div>
+                                    <div>{{item.samePeriodFee}}</div>
+                                </div>
+                            </div>
+                            <!-- <el-table
+                            :data="tableData"
+                            border
+                            style="width: 100%">
+                                <el-table-column
+                                prop="date"
+                                label="日期"
+                                width="180">
+                                </el-table-column>
+                                <el-table-column
+                                prop="name"
+                                label="姓名"
+                                width="180">
+                                </el-table-column>
+                                <el-table-column
+                                prop="address"
+                                label="地址">
+                                </el-table-column>
+                            </el-table> -->
+                        </div>
                     </div>
                 </el-tab-pane>
                 <el-tab-pane label="会务数据统计" name="third">会务数据统计</el-tab-pane>
@@ -55,6 +97,10 @@ export default {
             Airticketcity:[],
             Hoteltop:[],
             invitationtop:[],
+            teamCooperation:[],
+            groupnum:[],
+            customersNumber:[],
+            scaleDrawing:[],
             aaa:[
                 ['product', '去年销售额', '今年销售额'],
                 ['1月', 43.3, 85.8],
@@ -101,13 +147,16 @@ export default {
             }, {
             value: 5,
             label: '商邀'
+            }, {
+            value: 7,
+            label: '团组数据'
             }],
-            value: 1
+            value: 3,
+            tableData:[]
         }
     }, 
     methods: {
         handleClick(tab, event) {
-            console.log(this.activeName);
             if(this.activeName=='first'){
                 this.StatisticsYOY()
             }
@@ -149,7 +198,7 @@ export default {
                 },
                 color:['#2e83d4'],
                 series: [{ type: 'bar' }]
-            });
+            },true);
             var Airticketcitybox = echarts.init(document.getElementById('Airticketcitybox'));
             Airticketcitybox.setOption({
                 title:{
@@ -175,7 +224,7 @@ export default {
                 },
                 color:['#2e83d4'],
                 series: [{ type: 'bar' }]
-            });
+            },true);
         },
         //团组酒店
         grouphotel(){
@@ -189,7 +238,6 @@ export default {
                     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 
@@ -205,17 +253,23 @@ export default {
                 },
                 color:['#2e83d4'],
                 series: [{ type: 'bar' }]
-            });
+            },true);
         },
         //团组商邀
         groupinvitation(){
             var invitationtopten = echarts.init(document.getElementById('invitationtopten'));
+            
             invitationtopten.setOption({
                 title:{
                     text: '邀请国家数量排行',
                 },
                 legend: {},
-                tooltip: {},
+                tooltip: {
+                    formatter:function(params){
+                        var html=params.data[0]+":"+params.data[1]+"次<br/>";
+                        return html 
+                    }
+                },
                 dataset: {
                     source: this.invitationtop
                 },
@@ -225,7 +279,99 @@ export default {
                 },
                 color:['#2e83d4'],
                 series: [{ type: 'bar' }]
-            });
+            },true);
+        },
+        //团组客户合作
+        teamhz(){
+            var teamCooperationbox = echarts.init(document.getElementById('teamCooperationbox'));
+            teamCooperationbox.setOption({
+                title:{
+                    text: '团组合作客户排行',
+                },
+                legend: {},
+                tooltip: {
+                    formatter:function(params){
+                        var html="客户单位:"+params.data[0]+"<br/>"+"客户负责人:"+params.data[2]+"<br/>"+"合作次数:"+params.data[1];
+                        return html 
+                    }
+                },
+                dataset: {
+                    source: this.teamCooperation
+                },
+                xAxis: { type: 'category' },
+                yAxis: {
+                    name: '次数',
+                },
+                color:['#2e83d4'],
+                series: [{ type: 'bar' }]
+            },true);
+        },
+        //团组数量
+        teamsl(){
+            var groupnumbox = echarts.init(document.getElementById('groupnumbox'));
+            groupnumbox.setOption({
+                title:{
+                    text: '团组数量统计',
+                },
+                legend: {},
+                tooltip: {},
+                dataset: {
+                    source: this.groupnum
+                },
+                xAxis: { type: 'category' },
+                yAxis: {
+                    name: '数量',
+                },
+                color:['#2e83d4'],
+                series: [{ type: 'bar' }]
+            },true);
+        },
+        //团组出访人数
+        teamrs(){
+            var customersNumberbox = echarts.init(document.getElementById('customersNumberbox'));
+            customersNumberbox.setOption({
+                title:{
+                    text: '团组出访人数统计',
+                },
+                legend: {},
+                tooltip: {},
+                dataset: {
+                    source: this.customersNumber
+                },
+                xAxis: { type: 'category' },
+                yAxis: {
+                    name: '人数',
+                },
+                color:['#2e83d4'],
+                series: [{ type: 'bar' }]
+            },true);
+        },
+        //比例图
+        teamblt(){
+            var scaleDrawingbox = echarts.init(document.getElementById('scaleDrawingbox'));
+            scaleDrawingbox.setOption({
+                title: {
+                    text: '客户类型分布表',
+                    left: 'center'
+                },
+                tooltip: {
+                    trigger: 'item'
+                },
+                series: [
+                    {
+                    type: 'pie',
+                    radius: '50%',
+                    data: this.scaleDrawing,
+                    emphasis: {
+                        itemStyle: {
+                        shadowBlur: this.scaleDrawing.length,
+                        shadowOffsetX: 0,
+                        shadowColor: 'rgba(0, 0, 0, 0.5)'
+                        }
+                    }
+                    }
+                ]
+            },true);
         },
         statisone(){
             var myChart = echarts.init(document.getElementById('statisticallyone'));
@@ -243,7 +389,7 @@ export default {
                     name: '营业额',
                 },
                 series: [{ type: 'bar' }, { type: 'bar' },]
-            });
+            },true);
             var grossmargins = echarts.init(document.getElementById('grossmargins'));
             grossmargins.setOption({
                 title:{
@@ -259,7 +405,7 @@ export default {
                     name: '成本额',
                 },
                 series: [{ type: 'bar' }, { type: 'bar' },]
-            });
+            },true);
             var grossmargin = echarts.init(document.getElementById('grossmargin'));
             grossmargin.setOption({
                 title:{
@@ -285,7 +431,7 @@ export default {
                 // Declare several bar series, each will be mapped
                 // to a column of dataset.source by default.
                 series: [{ type: 'bar' },{ type: 'bar' }]
-            });
+            },true);
         },
         //年change
         yearchange(){
@@ -302,7 +448,10 @@ export default {
         },
         //国交部分类型切换
         countrieschange(val){
-            console.log(val);
+            if(document.getElementById('grossmarginss')!=null){
+                echarts.init(document.getElementById('grossmarginss')).dispose();
+                echarts.init(document.getElementById('Airticketcitybox')).dispose();
+            }
             if(val==1){
                 this.StatisticsAirTicket();
             }
@@ -312,6 +461,12 @@ export default {
             if(val==5){
                 this.StatisticsInvitation();
             }
+            if (val==7) {
+                this.StatisticsCooperativeCustomer();
+                this.StatisticsCooperativeCustomerType();
+                this.StatisticsGroupNum();
+                this.StatisticsGroupPeopleNum();
+            }
         },
         //获取营业额、成本支出、毛利润数据
         StatisticsYOY(){
@@ -439,8 +594,7 @@ export default {
             }).then(function (res) {
                 if(res.data.code==200){
                     that.invitationtop=[];
-                    var datainfo=res.data.data;
-                    //酒店预订数
+                    let 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]);
@@ -454,10 +608,172 @@ export default {
                 }
             })
         },
+        //获取国交数据统计数据团组合作
+        StatisticsCooperativeCustomer(){
+            var url = "/api/Statistics/StatisticsCooperativeCustomer"
+            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.teamCooperation=[];
+                    let datainfo=res.data.data;
+                    that.teamCooperation.push(['product','团组合作前十的客户']);
+                    for(let i=0;i<datainfo.length;i++){
+                        that.teamCooperation.push([datainfo[i].clientUnit,datainfo[i].visitsNum,datainfo[i].clienName]);
+                    }
+                    that.teamhz()
+                }else{
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'warning'
+                    });
+                }
+            })
+        },
+        //获取国交数据统计数据团组数量
+        StatisticsGroupNum(){
+            var url = "/api/Statistics/StatisticsGroupNum"
+            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.groupnum=[];
+                    let datainfo=res.data.data;
+                    that.groupnum.push(['product',datainfo.yearData.yearName+'团组数量']);
+                    for(let i=0;i<datainfo.quarterData.length;i++){
+                        that.groupnum.push([datainfo.quarterData[i].quarterName,datainfo.quarterData[i].num]);
+                    }
+                    that.teamsl();
+                }else{
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'warning'
+                    });
+                }
+            })
+        },
+        //获取国交数据统计数据出访人数
+        StatisticsGroupPeopleNum(){
+            var url = "/api/Statistics/StatisticsGroupPeopleNum"
+            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.customersNumber=[];
+                    let datainfo=res.data.data;
+                    that.customersNumber.push(['product',datainfo.yearData.yearName+'出访人数']);
+                    for(let i=0;i<datainfo.quarterData.length;i++){
+                        that.customersNumber.push([datainfo.quarterData[i].quarterName,datainfo.quarterData[i].num]);
+                    }
+                    that.teamrs();
+                }else{
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'warning'
+                    });
+                }
+            })
+        },
+        //获取国交数据统计数据类型比例图
+        StatisticsCooperativeCustomerType(){
+            var url = "/api/Statistics/StatisticsCooperativeCustomerType"
+            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.scaleDrawing=[];
+                    var newArr = res.data.data.map(item => ({
+                        name: item.groupTypeName,
+                        value: item.groupNum
+                    }))
+                    that.scaleDrawing=newArr;
+                    that.teamblt();
+                }else{
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'warning'
+                    });
+                }
+            })
+        },
+        //获取国交数据统计数据OP
+        StatisticsOP(val){
+            var url = "/api/Statistics/StatisticsOP"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data:{
+                    year:that.getdate(that.year),
+                    type:val
+                }
+            }).then(function (res) {
+                if(res.data.code==200){
+                    that.tableData=res.data.data;
+                    console.log(that.tableData);
+                    // that.scaleDrawing=[];
+                    // var newArr = res.data.data.map(item => ({
+                    //     name: item.groupTypeName,
+                    //     value: item.groupNum
+                    // }))
+                    // that.scaleDrawing=newArr;
+                    // that.teamblt();
+                }else{
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'warning'
+                    });
+                }
+            })
+        },
+    },
+    watch:{
+        invitationtop:{
+            handler(val,oldval){
+                // this.groupinvitation()
+            },
+            deep:true
+        },
     },
     mounted(){
         // this.StatisticsYOY();
-        this.countrieschange(1)
+        this.countrieschange(this.value);
+        this.StatisticsOP(1);
         // this.StatisticsAirTicket();
         // this.StatisticsHotel();
         // this.StatisticsInvitation();
@@ -480,4 +796,8 @@ export default {
 .yeardate{
     margin-bottom: 10px;
 }
+.yeartableul{
+    display: flex;
+}
+
 </style>