Browse Source

Merge branch 'master' of http://132.232.92.186:3000/XinXiBu/oa-system

yuanrf 3 weeks ago
parent
commit
d5253b4c02

+ 4 - 8
src/components/Crm/DeleClient.vue

@@ -110,10 +110,7 @@ export default {
                     ContactPhone: '',
                 }
             }).then(function (res) {
-                console.log(res)
-
                 if (res.data.code == 200) {
-
                     that.tableData = res.data.data;
                     that.tableDatas = that.tableData;
                     if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
@@ -134,11 +131,10 @@ export default {
             if (this.input == "") {
                 newarr = this.tableData;
             } else {
-
-                for (var i = 0; i < this.tableData.length; i++) {
-                    if (this.tableData[i].clientName.indexOf(this.input) != -1) {
+                for (var i = 0; i < this.tableData.length; i++) { 
+                    if ((this.tableData[i].clientName).indexOf(this.input) != -1) {
                         newarr.push(this.tableData[i]);
-                    } else if (this.tableData[i].companyName.indexOf(this.input) != -1) {
+                    } else if ((this.tableData[i].companyFullName).indexOf(this.input) != -1) {
                         newarr.push(this.tableData[i]);
                     }
                 }
@@ -196,7 +192,7 @@ export default {
                     type: 'info',
                     message: '操作已取消!'
                 });
-            });
+            wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww});
         }
     },
     mounted() {

+ 0 - 1
src/components/OP/OpCustomers.vue

@@ -387,7 +387,6 @@ export default {
                 ],
                 insuranceCosts: [
                     { required: true, message: '请输入费用金额', trigger: ['blur', 'change'] },
-                    { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
                 ],
                 currency: [
                     { required: true, message: '请选择支付币种', trigger: ['blur', 'change'] },

+ 29 - 5
src/components/OP/SuppliesInventory.vue

@@ -6,7 +6,7 @@
                     <label style="margin-left: 0px;">关联团组:</label>
                     <el-select multiple collapse-tags filterable style="width: 300px;" size="small" v-model="groupID" placeholder="请选择">
                         <el-option
-                            :style="item.id==0?'color:#67c23a;':''"
+                            :style="item.id==0||item.id==-1?'color:#67c23a;':''"
                             v-for="item in groupNameData"
                             :key="item.id"
                             :label="item.groupName"
@@ -440,6 +440,15 @@
                     clearable>
                     </el-input>
                 </div>
+                <div class="additems-li">
+                    <label>单位:</label>
+                    <el-input
+                    style="width:250px"
+                    placeholder="请输入单位"
+                    v-model="unit"
+                    clearable>
+                    </el-input>
+                </div>
             </div>
             <div>
                 <label>备注:</label>
@@ -463,7 +472,7 @@
                     <el-form-item label="关联团组" prop="groupId">
                         <el-select size="small" v-model="ClaimsruleForm.groupId" clearable filterable
                             placeholder="请选择">
-                            <el-option :style="item.id==0?'color:#67c23a;':''" v-for="item in groupNameData" :key="item.id" :label="item.groupName"
+                            <el-option :style="item.id==0||item.id==-1?'color:#67c23a;':''" v-for="item in groupNameData" :key="item.id" :label="item.groupName"
                                 :value="item.id">
                             </el-option>
                         </el-select>
@@ -624,13 +633,18 @@
                 width="100">
                 </el-table-column>
                 <el-table-column
+                prop="unit"
+                label="单位"
+                width="100">
+                </el-table-column>
+                <el-table-column
                 prop="lastUpdateUserName"
-                label="录入人"
+                label="最后录入人"
                 width="100">
                 </el-table-column>
                 <el-table-column
                 prop="lastUpdateTime"
-                label="录入时间"
+                label="最后录入时间"
                 width="180">
                 </el-table-column>
                 <el-table-column
@@ -743,6 +757,7 @@ export default {
             AddMaterialinfoType:"",
             AddMaterialinfoTypearr:[],
             AdditemsName:"",
+            unit:"",
             Additemstextarea:"",
             ID:0,
             groupNameData:[],
@@ -912,6 +927,10 @@ export default {
                         {
                             id:0,
                             groupName:"其他物资(公司内部物资)"
+                        },
+                        {
+                            id:-1,
+                            groupName:"拜访客户所使用的物资"
                         }
                     )
                     // that.MaterialType=that.MaterialTypearr[0].id;
@@ -1038,6 +1057,7 @@ export default {
             this.AddMaterialType="";
             this.AddMaterialinfoType="";
             this.Additemstextarea="";
+            this.unit="";
             this.AddItemsVisible=true;
         },
         //编辑
@@ -1058,6 +1078,7 @@ export default {
                     that.Additemstextarea=datainfo.remark;
                     that.AdditemsName=datainfo.name;
                     that.AddMaterialType=datainfo.parentType;
+                    that.unit=datainfo.unit;
                     that.AddMaterialinfoType=datainfo.type;
                     that.AddItemsVisible=true;
                     that.AddMaterialTypechange(2);
@@ -1113,7 +1134,9 @@ export default {
         GoodsOP() {
             var url = "/api/PersonnelModule/GoodsOP"
             var that = this
-            if (that.AdditemsName==""||that.AddMaterialinfoType==""||that.Additemstextarea=="") {
+            console.log(that.AdditemsName,that.AddMaterialinfoType,that.AddMaterialTypearr,that.unit);
+            
+            if (that.AdditemsName==""||that.AddMaterialinfoType==""||that.AddMaterialType==""||that.unit=="") {
                 that.$message.error("检查是否填写完全!");
                 return
             }
@@ -1128,6 +1151,7 @@ export default {
                     id:that.ID,
                     name:that.AdditemsName,
                     type:that.AddMaterialinfoType,
+                    unit:that.unit,
                     remark:that.Additemstextarea,
                 }
             }).then(function (res) {

+ 34 - 0
src/components/statistics/Groupreports.vue

@@ -108,6 +108,11 @@
                             size="mini"
                             title="详 细"
                             @click="handleView(scope.$index, scope.row)">详 细</el-button>
+                            <el-button Inquireclick
+                            type="primary"
+                            size="mini"
+                            title="详 细"
+                            @click="generate(scope.$index, scope.row)">生 成</el-button>
                         </template>
                       </el-table-column>
                 </el-table>
@@ -218,6 +223,35 @@ export default {
             this.currentPage=1;
             this.PostGroupPageList()
         },
+        //生成
+        generate(index,val){
+            var url = "/api/Statistics/PostGroupStatementExportExcel"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data: {
+                    portType: 1,
+                    userId:that.userid,
+                    pageId:38,
+                    diId:val.id,
+                    isAudit: true
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    window.open(res.data.data)
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'success'
+                    });
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            })
+        },
         //处理时间
         filteryear(val){
             let gstime=val.visitDate.split(' ')[0]

+ 82 - 3
src/components/statistics/Statistically.vue

@@ -169,9 +169,11 @@
                         <div v-else-if="value==2" style="width: 100%;">
                             <div id="hoteltopten" style="width: 100%;height:400px;"></div>
                             <div id="hotelPredeterminedPlatform" style="width: 100%;height:400px;"></div>
+                            <!-- <div id="hotelcountry" 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 id="unitcooperation" style="width: 100%;height:400px;"></div>
                         </div>
                         <div v-else-if="value==3" style="width: 100%;text-align: center;">
                             <div class="tabletitle">年记录</div>
@@ -378,7 +380,9 @@ export default {
             AirticketPredetermined:[],
             Hoteltop:[],
             hotelPredetermined:[],
+            hotelcountry:[],
             invitationtop:[],
+            unitcooperationtop:[],
             teamCooperation:[],
             groupnum:[],
             customersNumber:[],
@@ -637,7 +641,7 @@ export default {
                 center: new mapkit.Coordinate(104.096488, 30.635261),
                 showsMapTypeControl: true,
                 showsZoomControl: true,
-                zoomEnabled: true,
+                zoomEnabled: true
             });
             // let overlay = new mapkit.MapOverlay(map.region, {
             //     urlTemplate: "https://example.com/overlay/{x}/{y}/{z}.png"
@@ -655,7 +659,7 @@ export default {
                 legend: {},
                 tooltip: {
                     formatter:function(params){
-                        var html="该城市酒店预订总次数:"+params.data[1]+"次<br/>"
+                        var html="该酒店预订总房数:"+params.data[1]+"次<br/>"
                         for(let i=0;i<params.data[2].length;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/>";
                         }
@@ -705,6 +709,33 @@ export default {
                 color:['#2e83d4'],
                 series: [{ type: 'bar' }]
             },true);
+            //预定国家
+            var hotelcountry = echarts.init(document.getElementById('hotelcountry'));
+            hotelcountry.setOption({
+                title:{
+                    text: '预订酒店国家排行',
+                },
+                legend: {},
+                tooltip: {
+                    formatter:function(params){
+                        var html="该国家预订总次数:"+params.data[1]+"次<br/>"
+                        for(let i=0;i<params.data[2].length;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.hotelcountry
+                },
+                xAxis: { type: 'category' },
+                yAxis: {
+                    name: '该国家预订次数',
+                },
+                color:['#2e83d4'],
+                series: [{ type: 'bar' }]
+            },true);
         },
         //团组商邀
         groupinvitation(){
@@ -735,6 +766,39 @@ export default {
                 color:['#2e83d4'],
                 series: [{ type: 'bar' }]
             },true);
+            //单位合作次数前十
+            var unitcooperation = echarts.init(document.getElementById('unitcooperation'));
+            unitcooperation.setOption({
+                title:{
+                    text: '邀请单位合作次数前十',
+                },
+                legend: {},
+                tooltip: {
+                    formatter:function(params){
+                        var html=params.data[0]+":"+params.data[1]+"次<br/>关联团组:<br/>";
+                        console.log(params);
+                        
+                        for(let i=0;i<params.data[2].length;i++){
+                            html += params.data[2][i]+"<br/>";
+                        }
+                        return html 
+                    }
+                },
+                dataset: {
+                    source: this.unitcooperationtop
+                },
+                xAxis: { 
+                    type: 'category',
+                    axisLabel:{
+                        rotate:25
+                    }, 
+                },
+                yAxis: {
+                    name: '次数',
+                },
+                color:['#2e83d4'],
+                series: [{ type: 'bar' }]
+            },true);
         },
         //团组客户合作
         teamhz(){
@@ -958,9 +1022,11 @@ export default {
             if(document.getElementById('hoteltopten')!=null){
                 echarts.init(document.getElementById('hoteltopten')).dispose();
                 echarts.init(document.getElementById('hotelPredeterminedPlatform')).dispose();
+                echarts.init(document.getElementById('hotelcountry')).dispose();
             }
             if(document.getElementById('invitationtopten')!=null){
                 echarts.init(document.getElementById('invitationtopten')).dispose();
+                echarts.init(document.getElementById('unitcooperation')).dispose();
             }
             if(val==1){
                 this.StatisticsAirTicket();
@@ -1083,10 +1149,12 @@ export default {
                 if(res.data.code==200){
                     that.Hoteltop=[];
                     that.hotelPredetermined=[];
+                    that.hotelcountry=[];
                     var datainfo=res.data.data.hotelCityData;
                     var hotelpred=res.data.data.hotelPlatformData
+                    var hotelcountrydata=res.data.data.hotelCountryGroupByData
                     //酒店预订数
-                    that.Hoteltop.push(['product','城市酒店预订排行榜']);
+                    that.Hoteltop.push(['product','酒店房间预订排行榜']);
                     for(let i=0;i<datainfo.length;i++){
                         that.Hoteltop.push([datainfo[i].city,datainfo[i].bookingRoomNum,datainfo[i].hotelData]);
                     }
@@ -1095,6 +1163,11 @@ export default {
                     for(let k=0;k<hotelpred.length;k++){
                         that.hotelPredetermined.push([hotelpred[k].platform,hotelpred[k].bookingRoomNum,hotelpred[k].hotelData]);
                     }
+                    //酒店预订城市
+                    that.hotelcountry.push(['product','酒店预订城市排行榜']);
+                    for(let l=0;l<hotelcountrydata.length;l++){
+                        that.hotelcountry.push([hotelcountrydata[l].country,hotelcountrydata[l].bookingRoomNum,hotelcountrydata[l].hotelData]);
+                    }
                     that.grouphotel()
                 }else{
                     that.$message({
@@ -1120,11 +1193,17 @@ export default {
             }).then(function (res) {
                 if(res.data.code==200){
                     that.invitationtop=[];
+                    that.unitcooperationtop=[];
                     let datainfo=res.data.data.groupByCountry;
+                    let datainfos=res.data.data.groupByClient;
                     that.invitationtop.push(['product','商邀邀请国家数量']);
                     for(let i=0;i<datainfo.length;i++){
                         that.invitationtop.push([datainfo[i].country,datainfo[i].timeNum]);
                     }
+                    that.unitcooperationtop.push(['product','商邀单位合作次数']);
+                    for(let p=0;p<datainfos.length;p++){
+                        that.unitcooperationtop.push([datainfos[p].country,datainfos[p].timeNum,datainfos[p].linkGroupIds]);
+                    }
                     that.groupinvitation()
                 }else{
                     that.$message({