Pārlūkot izejas kodu

0627lhjgwxcscopxcd

liuhj 10 mēneši atpakaļ
vecāks
revīzija
ff670f8ac4

+ 105 - 32
src/components/MCR/DownloadOpitinerary.vue

@@ -1,30 +1,27 @@
 <template>
-    <div class="DownloadOpitinerary-all">
+    <div class="DownloadOpitinerary-all" element-loading-text="加载数据量过大,请稍等。" v-loading.fullscreen.lock="fullscreenLoading">
         <div class="DownloadOpitinerary-search-head">
             <el-form label-width="75px">
                 <el-form-item label="国家:">
-                    <el-select filterable v-model="countryData" placeholder="请选择国家">
-                        <el-option v-for="(item,index) in countryDatas" :key="index" :label="item" :value="item"></el-option>
+                    <el-select @change="SwitchingCountry" filterable clearable v-model="countryData" placeholder="请选择国家">
+                        <el-option v-for="(item,index) in countryDatas" :key="index" :label="item.name" :value="item.name"></el-option>
                     </el-select>
                 </el-form-item>
             </el-form>
             <el-form label-width="75px">
                 <el-form-item label="地区:">
-                    <el-select filterable v-model="companyname" placeholder="请选择地区">
-                        <el-option v-for="(item,index) in companynamearr" :key="index" :label="item.name" :value="item.id"></el-option>
+                    <el-select @change="switchingArea($event)" filterable clearable v-model="citiesData" placeholder="请选择地区">
+                        <el-option v-for="(item,index) in citiesDatas" :key="index" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
             </el-form>
             <el-form label-width="75px">
                 <el-form-item label="团组名:">
-                    <el-select filterable v-model="teamNameData" placeholder="请选择团组名">
+                    <el-select @change="SwitchingGroup" filterable clearable v-model="teamNameData" placeholder="请选择团组名">
                         <el-option v-for="(item,index) in teamNameDatas" :key="index" :label="item" :value="item"></el-option>
                     </el-select>
                 </el-form-item>
             </el-form>
-            <div style="margin-left: 20px;">
-                <el-button type="primary">查询</el-button>
-            </div>
         </div>
         <div class="DownloadOpitinerary-table">
             <el-table
@@ -32,12 +29,9 @@
                 border
                 style="width: 100%">
                     <!-- <el-table-column
-                        prop="num"
+                        prop="row_Number"
                         label="序 号"
                         width="55">
-                        <template slot-scope="scope">
-                            {{(currentPage - 1) * pageSize + scope.$index + 1}}
-                        </template>
                     </el-table-column> -->
                     <el-table-column
                         prop="teamLev"
@@ -99,19 +93,18 @@
                             size="mini"
                             title="下载OP行程单"
                             type="primary"
-                            @click="handleEdit(scope.$index, scope.row)">下载OP行程单</el-button>
+                            @click="PostMateOpGroupDownload(scope.row)">下载OP行程单</el-button>
                         </template>
                     </el-table-column>
             </el-table>
-            <div class="block">
+            <div class="block" style="margin-top: 10px;">
                 <el-pagination
                     @size-change="handleSizeChange"
                     @current-change="handleCurrentChange"
-                    :current-page="currentPage4"
-                    :page-sizes="[100, 200, 300, 400]"
-                    :page-size="100"
+                    :current-page="pageIndex"
+                    :page-sizes="[10, 12, 20, 50]"
                     layout="total, sizes, prev, pager, next, jumper"
-                    :total="400">
+                    :total="tabletotal">
                 </el-pagination>
             </div>
         </div>
@@ -122,22 +115,28 @@ export default {
     data () {
         return {
             userId:'',
-            companyname:'',
-            companynamearr:[],
+            citiesData:'',
+            citiesDatas:[],
             countryData:'',
             countryDatas:[],
             teamNameData:'',
             teamNameDatas:[],
-            currentPage4: 4,
+            currentPage4: 1,
             tableData: [],
+            tabletotal:0,
+            pageIndex:1,
+            pageSize:12,
+            fullscreenLoading:false,
         }
     },
     methods: {
         handleSizeChange(val) {
-            console.log(`每页 ${val} 条`);
+            this.pageSize=val;
+            this.PostMateOpGroupPageList();
         },
         handleCurrentChange(val) {
-            console.log(`当前页: ${val}`);
+            this.pageIndex=val;
+            this.PostMateOpGroupPageList();
         },
         filteryear(val){
             let gstime=val.visitDate.split(' ')[0]
@@ -145,6 +144,7 @@ export default {
         },
         //获取下拉框
         PostMateOpGroupInit() {
+            this.fullscreenLoading=true;
             var url = "/api/Groups/PostMateOpGroupInit"
             var that = this
             this.$axios({
@@ -152,24 +152,33 @@ export default {
                 url: url,
                 headers: {
                     Authorization: 'Bearer '
+                },
+                data:{
+                    currUserId:that.userId
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
-                    that.countryDatas=res.data.data.countryDatas;
-                    that.teamNameDatas=res.data.data.teamNameDatas;
+                    that.countryDatas=res.data.data.countriesDatas;
+                    that.teamNameDatas=res.data.data.teamNames;
+                    that.citiesDatas=res.data.data.citiesDatas;
+                    that.fullscreenLoading=false;
+                    that.PostMateOpGroupPageList();
                 }else{
                     that.$message({
                         message:res.data.msg,
                         duration:1000,
                         type:"error"
                     });
+                    that.fullscreenLoading=false;
                 }
             }).catch(function (error) {
+                that.fullscreenLoading=false;
                 that.$message.error('请联系信息部!');
             });
         },
         //获取表格
         PostMateOpGroupPageList() {
+            console.log(this.pageIndex);
             var url = "/api/Groups/PostMateOpGroupPageList"
             var that = this
             this.$axios({
@@ -182,15 +191,16 @@ export default {
                     portType:1,
                     userId:that.userId,
                     pageId:183,
-                    pageIndex:1,
-                    pageSize:10,
-                    country:'',
+                    pageIndex:that.pageIndex,
+                    pageSize:that.pageSize,
+                    country:that.countryData,
                     area:'',
-                    teamName:''
+                    teamName:that.teamNameData
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
-                    that.tableData=res.data.data
+                    that.tableData=res.data.data;
+                    that.tabletotal=res.data.count;
                 }else{
                     that.$message({
                         message:res.data.msg,
@@ -202,11 +212,73 @@ export default {
                 that.$message.error('请联系信息部!');
             });
         },
+        //切换地区
+        switchingArea(val){
+            this.pageIndex=1;
+            for (let i = 0; i < this.citiesDatas.length; i++) {
+                if(val==this.citiesDatas[i].id){
+                    for (let j = 0; j < this.countryDatas.length; j++) {
+                        if (this.citiesDatas[i].parentId==this.countryDatas[j].id) {
+                            this.countryData=this.countryDatas[j].name;
+                        }
+                    }
+                }
+            }
+            this.PostMateOpGroupPageList()
+        },
+        //切换国家
+        SwitchingCountry(val){
+            this.pageIndex=1;
+            this.PostMateOpGroupPageList();
+        },
+        //切换团组
+        SwitchingGroup(val){
+            this.pageIndex=1;
+            this.PostMateOpGroupPageList();
+        },
+        //下载op行程单
+        PostMateOpGroupDownload(roew) {
+            this.fullscreenLoading=true;
+            var url = "/api/Groups/PostMateOpGroupDownload"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data:{
+                    portType:1,
+                    userId:that.userId,
+                    pageId:183,
+                    diId:roew.id,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message: "导出成功!",
+                        type: 'success'
+                    });
+                    window.open(res.data.data)
+                    that.fullscreenLoading=false;
+                }else{
+                    that.$message({
+                        message:res.data.msg,
+                        duration:1000,
+                        type:"error"
+                    });
+                    that.fullscreenLoading=false;
+                }
+            }).catch(function (error) {
+                that.fullscreenLoading=false;
+                that.$message.error('请联系信息部!');
+            });
+        },
     },
     mounted(){
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
         this.PostMateOpGroupInit();
-        this.PostMateOpGroupPageList();
+        // this.PostMateOpGroupPageList();
     }
 }
 </script>
@@ -231,5 +303,6 @@ export default {
 }
 .DownloadOpitinerary-table .block{
     text-align: center;
+    
 }
 </style>

+ 2 - 2
src/components/MCR/Marketingamount.vue

@@ -179,7 +179,7 @@
                     <el-table-column
                     prop="visitDate"
                     label="出访日期"
-                    width="100">
+                    width="110">
                         <template slot-scope="scope">{{ scope.row.visitDate | getvisitDate}}</template>
                     </el-table-column>
                     <el-table-column
@@ -190,7 +190,7 @@
                     <el-table-column
                     prop="collectionDays"
                     label="收款日期"
-                    width="100">
+                    width="110">
                         <template slot-scope="scope">{{ scope.row.collectionDays | getvisitDate}}</template>
                     </el-table-column>
                     <el-table-column

+ 212 - 79
src/components/Resource/VisitSchedule.vue

@@ -1,72 +1,36 @@
 <template>
-    <div class="VisitSchedule-all">
+    <div class="VisitSchedule-all" v-loading.fullscreen.lock="fullscreenLoading">
         <div class="VisitSchedule-search-head">
             <el-form ref="form" label-width="75px">
                 <el-form-item style="width: 340px;" label="团组名称:">
-                    <el-select filterable v-model="companyname" placeholder="请选择团组名称">
-                        <el-option v-for="(item,index) in companynamearr" :key="index" :label="item.name" :value="item.id"></el-option>
+                    <el-select @change="ApprovalJourneyInit" filterable v-model="diid" placeholder="请选择团组名称">
+                        <el-option v-for="(item,index) in groupList" :key="index" :label="item.teamName" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
             </el-form>
             <div>
-                <el-button size="small" type="primary">删除</el-button>
-                <el-button size="small" type="primary">导入机票信息</el-button>
-                <el-button size="small" type="primary">导出word</el-button>
+                <el-button size="small" @click="SaveApprovalJourney" type="primary">保存</el-button>
+                <el-button size="small" @click="DeleteApprovalJourney" type="primary">删除</el-button>
+                <el-button size="small" @click="CreateApprovalJourney" type="primary">导入机票信息</el-button>
+                <el-button size="small" @click="ExportApprovalJourneyWord" type="primary">导出word</el-button>
             </div>
         </div>
         <div class="VisitSchedule-content">
             <div class="VisitSchedule-content-title">出访行程</div>
+            <div class="VisitSchedule-content-info">
+                团组名:{{groupInfo.teamName}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;团组号:{{groupInfo.tourCode}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;出访日期:{{visitStartDate+'~'+visitEndDate}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{groupInfo.visitDays+'天/'+groupInfo.visitPNumber+'人'}}
+            </div>
             <div class="VisitSchedule-content-table">
-                <div class="VisitSchedule-content-ul">
-                    <div class="content-ul-title">6月26日(星期三)第一天</div>
-                    <div class="VisitSchedule-content-li">
-                        <div class="VisitSchedule-content-time">
-                            <el-time-picker
-                                is-range
-                                v-model="value1"
-                                range-separator="至"
-                                start-placeholder="开始时间"
-                                end-placeholder="结束时间"
-                                placeholder="选择时间范围">
-                            </el-time-picker>
-                        </div>
-                        <div class="VisitSchedule-content-remark">
-                            <el-input
-                                type="textarea"
-                                :rows="2"
-                                placeholder="请输入内容"
-                                v-model="textarea">
-                            </el-input>
-                        </div>
-                    </div>
-                    <div class="VisitSchedule-content-li">
-                        <div class="VisitSchedule-content-time">
-                            <el-time-picker
-                                is-range
-                                v-model="value1"
-                                range-separator="至"
-                                start-placeholder="开始时间"
-                                end-placeholder="结束时间"
-                                placeholder="选择时间范围">
-                            </el-time-picker>
-                        </div>
-                        <div class="VisitSchedule-content-remark">
-                            <el-input
-                                type="textarea"
-                                :rows="2"
-                                placeholder="请输入内容"
-                                v-model="textarea">
-                            </el-input>
-                        </div>
-                    </div>
-                </div>
-                <div class="VisitSchedule-content-ul">
-                    <div class="content-ul-title">6月26日(星期三)第一天</div>
-                    <div class="VisitSchedule-content-li">
+                <div v-for="(item,index) in tablearr" :key="index" class="VisitSchedule-content-ul">
+                    <div class="content-ul-title">{{item.date}}</div>
+                    <div v-for="(items,index) in item.chiList" :key="index" class="VisitSchedule-content-li">
                         <div class="VisitSchedule-content-time">
                             <el-time-picker
                                 is-range
-                                v-model="value1"
+                                format='HH:mm'
+                                value-format='HH:mm'
+                                v-model="items.timeInterval"
+                                :default-value="value1"
                                 range-separator="至"
                                 start-placeholder="开始时间"
                                 end-placeholder="结束时间"
@@ -75,30 +39,10 @@
                         </div>
                         <div class="VisitSchedule-content-remark">
                             <el-input
-                                type="textarea"
+                                type="text"
                                 :rows="2"
                                 placeholder="请输入内容"
-                                v-model="textarea">
-                            </el-input>
-                        </div>
-                    </div>
-                    <div class="VisitSchedule-content-li">
-                        <div class="VisitSchedule-content-time">
-                            <el-time-picker
-                                is-range
-                                v-model="value1"
-                                range-separator="至"
-                                start-placeholder="开始时间"
-                                end-placeholder="结束时间"
-                                placeholder="选择时间范围">
-                            </el-time-picker>
-                        </div>
-                        <div class="VisitSchedule-content-remark">
-                            <el-input
-                                type="textarea"
-                                :rows="2"
-                                placeholder="请输入内容"
-                                v-model="textarea">
+                                v-model="items.details">
                             </el-input>
                         </div>
                     </div>
@@ -111,11 +55,195 @@
 export default {
     data () {
         return {
-            companyname:'',
-            companynamearr:[],
-            value1: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
+            diid:'',
+            groupList:[],
+            tablearr:[],
+            userId:'',
+            value1: ['', ''],
             textarea:'',
+            ss:[0,0],
+            groupInfo:{},
+            fullscreenLoading:false,
         }
+    },
+    methods:{
+        //报批行程初始化
+        ApprovalJourneyInit() {
+            this.groupInfo={};
+            this.tablearr=[];
+            this.fullscreenLoading=true;
+
+            var url = "/api/Groups/ApprovalJourneyInit"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data:{
+                    diid:that.diid==''?-1:that.diid,
+                    userId:that.userId,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.groupList=res.data.data.groupList;
+                    if(that.diid==''){
+                        that.diid=that.groupList[0].id;
+                    }
+                    that.tablearr=res.data.data.content;
+                    for(let i=0;i<that.tablearr.length;i++){
+                        for(let a=0;a<that.tablearr[i].chiList.length;a++){
+                            if(that.tablearr[i].chiList[a].timeInterval.length==1){
+                                that.tablearr[i].chiList[a].timeInterval=that.value1;
+                            }
+                        }
+                    }
+                    that.groupInfo=res.data.data.groupInfo;
+                    that.fullscreenLoading=false;
+                }else{
+                    that.$message({
+                        message:res.data.msg,
+                        duration:1000,
+                        type:"error"
+                    });
+                    that.fullscreenLoading=false;
+                }
+            }).catch(function (error) {
+                that.$message.error('请联系信息部!');
+            });
+        },
+        //报批行程保存
+        SaveApprovalJourney() {
+            var url = "/api/Groups/SaveApprovalJourney"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data:{
+                    userId:that.userId,
+                    arr:that.tablearr
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'success'
+                    });
+                    that.ApprovalJourneyInit();
+                }else{
+                    that.$message({
+                        message:res.data.msg,
+                        duration:1000,
+                        type:"error"
+                    });
+                }
+            }).catch(function (error) {
+                that.$message.error('请联系信息部!');
+            });
+        },
+        //报批行程删除
+        DeleteApprovalJourney() {
+            var url = "/api/Groups/DeleteApprovalJourney"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data:{
+                    diid:that.diid,
+                    userId:that.userId,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'success'
+                    });
+                    that.ApprovalJourneyInit();
+                }else{
+                    that.$message({
+                        message:res.data.msg,
+                        duration:1000,
+                        type:"error"
+                    });
+                }
+            }).catch(function (error) {
+                that.$message.error('请联系信息部!');
+            });
+        },
+        //报批行程导入机票信息
+        CreateApprovalJourney() {
+            var url = "/api/Groups/CreateApprovalJourney"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data:{
+                    diid:that.diid,
+                    userid:that.userId
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'success'
+                    });
+                    that.tablearr=res.data.data;
+                }else{
+                    that.$message({
+                        message:res.data.msg,
+                        duration:1000,
+                        type:"error"
+                    });
+                }
+            }).catch(function (error) {
+                that.$message.error('请联系信息部!');
+            });
+        },
+        //报批行程导出
+        ExportApprovalJourneyWord() {
+            var url = "/api/Groups/ExportApprovalJourneyWord"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data:{
+                    diid:that.diid,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message: "导出成功!",
+                        type: 'success'
+                    });
+                    window.open(res.data.data)
+                }else{
+                    that.$message({
+                        message:res.data.msg,
+                        duration:1000,
+                        type:"error"
+                    });
+                }
+            }).catch(function (error) {
+                that.$message.error('请联系信息部!');
+            });
+        },
+    },
+    mounted(){
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
+        this.ApprovalJourneyInit();
     }
 }
 </script>
@@ -130,7 +258,6 @@ export default {
 .VisitSchedule-search-head{
     display: flex;
     justify-content: space-between;
-    align-items: center;
 }
 .VisitSchedule-search-head .el-select{
     width: 100%;
@@ -168,4 +295,10 @@ export default {
     font-size: 17px;
     font-weight: 600;
 }
+.VisitSchedule-content-info{
+    text-align: center;
+    color: #555;
+    font-size:15px ;
+    margin-bottom: 20px;
+}
 </style>