liuhj 11 kuukautta sitten
vanhempi
commit
a0793aff4c

+ 29 - 2
src/components/Finance/Overspend.vue

@@ -12,7 +12,8 @@
                         </el-select>
                     </div>
                     <div class="preserve-btn">
-                        <el-button class="preserve" @click="PostGroupExtraCost_OutputExcel" type="primary">导出超支明细</el-button>
+                        <el-button class="preserve" @click="ExportOverspendExcel" type="primary">超支明细表</el-button>
+                        <!-- <el-button class="preserve" @click="PostGroupExtraCost_OutputExcel" type="primary">导出超支明细</el-button> -->
                         <el-button class="preserve" @click="addlist()" type="primary">新增数据</el-button>
                     </div>
                 </div>
@@ -266,7 +267,33 @@ export default {
                 },
                 data:{
                     portType: 1,
-                    diId:this.diId
+                    diId:that.diId
+                }
+            }).then(function (res) {
+                console.log(res)
+                if(res.data.code==200){
+                   window.open(res.data.data.url)
+                }else{
+                    that.$message({
+                        message:res.data.msg ,
+                        type: 'warning',
+                    });
+                }
+            })
+        },
+        //生成2
+        ExportOverspendExcel(){
+            var url = "/api/Financial/ExportOverspendExcel"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.token
+                },
+                data:{
+                    portType: 1,
+                    diId:that.diId
                 }
             }).then(function (res) {
                 console.log(res)

+ 36 - 8
src/components/Finance/Overspendedit.vue

@@ -4,7 +4,7 @@
             <div class="overspendedit-form">
                 <el-form ref="form" :rules="rules" :model="form" label-width="100px">
                     <el-form-item label="团队名称">
-                        <el-select @change="getheadtitle" :disabled="disableds" v-model="DiId" placeholder="请选择团队名称">
+                        <el-select filterable  @change="getheadtitle" :disabled="disableds" v-model="DiId" placeholder="请选择团队名称">
                             <el-option v-for="(item,index) in cTablelist" :key="index" :label="item.teamName" :value="item.id"></el-option>
                         </el-select>
                     </el-form-item>
@@ -20,6 +20,11 @@
                     <el-form-item prop="priceName"  label="费用名称">
                         <el-input v-model="form.priceName"></el-input>
                     </el-form-item>
+                    <el-form-item label="地区">
+                        <el-select filterable v-model="form.nation" placeholder="请选择地区">
+                            <el-option v-for="(item,index) in nationarr" :key="index" :label="item.country+'-'+item.city" :value="item.id"></el-option>
+                        </el-select>
+                    </el-form-item>
                     <el-form-item prop="currency" label="费用金额">
                         <div style="display: flex;justify-content: space-between;">
                             <el-input-number style="width:60%" :precision="2" placeholder="费用金额" v-model="form.price" :controls='false'>
@@ -30,7 +35,7 @@
                         </div>
                     </el-form-item>
                     <el-form-item prop="priceCount" label="数量">
-                        <el-input-number style="width:100%" :min="1" :precision="0" placeholder="数量" v-model="form.priceCount" :controls='false'>
+                        <el-input-number style="width:100%" :precision="0" placeholder="数量" v-model="form.priceCount" :controls='false'>
                         </el-input-number>
                     </el-form-item>
                     <el-form-item prop="priceDt" label="产生日期">
@@ -44,12 +49,6 @@
                     <el-form-item prop="payee" label="收款方">
                         <el-input v-model="form.payee"></el-input>
                     </el-form-item>
-                    <!-- <el-form-item label="团队名称">
-                        <el-select v-model="form.region" placeholder="请选择活动区域">
-                            <el-option label="区域一" value="shanghai"></el-option>
-                            <el-option label="区域二" value="beijing"></el-option>
-                        </el-select>
-                    </el-form-item> -->
                     <el-form-item prop="costSign" label="费用标识">
                         <el-select v-model="form.costSign" placeholder="请选择费用标识">
                             <el-option label="公转" value='0'></el-option>
@@ -121,7 +120,9 @@ export default {
                 createUser:'',//操作人员
                 priceCount:1,//数量
                 priceDt:'',//产生日期
+                nation:''//国家
             },
+            nationarr:[],
             payment:[],
             priceType:[],
             priceDetailType:[],
@@ -164,6 +165,9 @@ export default {
                 ,
                 priceDt: [
                     { required: true, message: '请选择日期费', trigger: 'change' }
+                ],
+                nation:[
+                    {required: true, message: '国家', trigger: 'change'}
                 ]
             }
         }
@@ -180,6 +184,27 @@ export default {
             var d=date.getDate()>=10?date.getDate():'0'+(date.getDate()).toString();
             return y+'-'+m+'-'+d
         },
+        //获取国家基础数据
+        OpCarCityResult(){
+            var url = "/api/Groups/OpCarCityResult"
+            var that = this
+            this.$axios({
+                method: 'get',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+            }).then(function (res) {
+                if(res.data.code==200){
+                   that.nationarr=res.data.data;
+                }else{
+                    that.$message({
+                        message:res.data.msg ,
+                        type: 'warning',
+                    });
+                }
+            })
+        },
         //获取超支基础数据
         PostGroupExtraCost_ListDataInit(){
             var url = "/api/Financial/PostGroupExtraCost_ListDataInit"
@@ -199,6 +224,7 @@ export default {
                     that.priceDetailType=res.data.data.priceDetailType;
                     that.priceType=res.data.data.priceType;
                     that.cardType=res.data.data.card;
+                    that.OpCarCityResult()
                 }else{
                     that.$message({
                         message:res.data.msg ,
@@ -332,6 +358,7 @@ export default {
                     that.form.priceCount=res.data.data.priceCount;
                     that.form.remark=res.data.data.remark;
                     that.form.priceDt=res.data.data.priceDt;
+                    that.form.nation=res.data.data.area;
                     that.priceTypechange(that.form.priceType)
 
                     
@@ -405,6 +432,7 @@ export default {
                     remark:that.form.remark,
                     createUser:that.userId,
                     priceCount:that.form.priceCount,
+                    area :that.form.nation,
                     priceDt:that.datetime(that.form.priceDt),
                 }
             }).then(function (res) {

+ 52 - 2
src/components/statistics/Statistically.vue

@@ -19,6 +19,14 @@
                     </div>
                 </el-tab-pane>
                 <el-tab-pane label="国交数据统计" name="second">
+                    <el-select style="width:200px; margin-bottom: 10px;" v-model="value" filterable placeholder="请选择">
+                        <el-option
+                            v-for="item in options"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value">
+                        </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>
@@ -43,6 +51,7 @@ export default {
             costing:[],
             Airticketnum:[],
             Airticketcity:[],
+            Hoteltop:[],
             aaa:[
                 ['product', '去年销售额', '今年销售额'],
                 ['1月', 43.3, 85.8],
@@ -74,6 +83,23 @@ export default {
                 ['12月', 72.4,],
             ],
             activeName: 'second',
+            options: [{
+            value: 1,
+            label: '机票'
+            }, {
+            value: 2,
+            label: '酒店'
+            }, {
+            value: 3,
+            label: 'OP'
+            }, {
+            value: 4,
+            label: '签证'
+            }, {
+            value: 5,
+            label: '商邀'
+            }],
+            value: 1
         }
     }, 
     methods: {
@@ -130,7 +156,6 @@ export default {
                 legend: {},
                 tooltip: {
                     formatter:function(params){
-                        console.log(params.data);
                         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/>";
@@ -261,7 +286,7 @@ export default {
                 }
             })
         },
-        //获取国交数据统计数据
+        //获取国交数据统计数据机票
         StatisticsAirTicket(){
             var url = "/api/Statistics/StatisticsAirTicket"
             var that = this
@@ -298,10 +323,35 @@ export default {
                 }
             })
         },
+        //获取国交数据统计数据酒店
+        StatisticsHotel(){
+            var url = "/api/Statistics/StatisticsHotel"
+            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){
+                    
+                }else{
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'warning'
+                    });
+                }
+            })
+        },
     },
     mounted(){
         // this.StatisticsYOY();
         this.StatisticsAirTicket();
+        this.StatisticsHotel();
     }
 }
 </script>