Browse Source

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

liuhj 1 year ago
parent
commit
4b5d40c277

+ 20 - 11
src/components/OP/AirTicketRes.vue

@@ -19,9 +19,7 @@
                         <el-button type="primary" @click="download" style="margin-left: 10px;">导出报表</el-button>
                         <el-button type="primary" @click="downloadCN" style="margin-left: 10px;">中文行程单</el-button>
                         <el-button type="primary" @click="downloadEN" style="margin-left: 10px;">英文行程单</el-button>
-                        <router-link :to="{ path: '/home/OpAirTicketRes', query: { DiId } }">
-                            <el-button type="primary" style="margin-left: 10px;">新增</el-button>
-                        </router-link>
+                        <el-button type="primary" style="margin-left: 10px;" @click="addIf">新增</el-button>
                     </div>
                 </div>
                 <div style="margin:10px 0;color:#606266;">
@@ -32,7 +30,8 @@
                     <span style="font-weight: bold;font-size:17px;">出访国家:</span>
                     <span style="color:#606266;">{{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;</span>
                     <span style="font-weight: bold;font-size:17px;">起止日期:</span>
-                    <span style="color:#606266;">{{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate }}&nbsp;&nbsp;&nbsp;</span>
+                    <span style="color:#606266;">{{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate
+                    }}&nbsp;&nbsp;&nbsp;</span>
                     <span style="font-weight: bold;font-size:17px;">天数/人数:</span>
                     <span style="color:#606266;">{{ delegationInfo.visitDays }}天/{{ delegationInfo.visitPNumber }}人</span>
                 </div>
@@ -47,7 +46,7 @@
                     </el-table-column>
                     <el-table-column prop="cTypeName" label="舱位类型" width="100">
                     </el-table-column>
-                    <el-table-column prop="flightDescription" label="航班行程" width="220">
+                    <el-table-column prop="flightDescription" label="航班简述" width="500">
                     </el-table-column>
                     <el-table-column prop="clientName" label="客人名单" width="280">
                     </el-table-column>
@@ -175,19 +174,29 @@ export default {
             });
         },
         upDate(index, row) {
-            if (row.isAuditGM == 3 || row.isAuditGM == 0 || row.isAuditGM == 2) {
+
+            this.$router.push({
+                path: "/home/OpAirTicketRes",
+                query: {
+                    DiId: this.DiId,
+                    id: row.id
+                }
+            })
+
+        },
+        addIf() {
+            debugger
+            if (this.DiId != 0 && this.DiId != '' && this.DiId != undefined) {
                 this.$router.push({
                     path: "/home/OpAirTicketRes",
                     query: {
                         DiId: this.DiId,
-                        id: row.id
                     }
                 })
-            } else if (row.isAuditGM == 1) {
-                this.$message('审核已通过,不可编辑!');
-            }
-
 
+            } else {
+                this.$message('请选择团组在进行添加');
+            }
         },
         del(index, row) {
             this.$confirm('此操作将删除该数据, 是否继续?', '提示', {

+ 10 - 14
src/components/OP/DecreasePayments.vue

@@ -166,22 +166,18 @@ export default {
                     }
                 }
             }).catch(function (error) {
-
-                that.$message.error("网络错误,请稍后重试");
+                //that.$message.error("网络错误,请稍后重试");
             });
         },
         upDate(index, row) {
-            if (row.isAudit == 3 || row.isAudit == 0 || row.isAudit == 2) {
-                this.$router.push({
-                    path: "/home/OpDecreasePayments",
-                    query: {
-                        DiId: this.DiId,
-                        id: row.id
-                    }
-                })
-            } else if (row.isAudit == 1) {
-                this.$message('审核已通过,不可编辑!');
-            }
+
+            this.$router.push({
+                path: "/home/OpDecreasePayments",
+                query: {
+                    DiId: this.DiId,
+                    id: row.id
+                }
+            })
 
         },
         del(index, row) {
@@ -229,7 +225,7 @@ export default {
         },
         download(index, row) {
             if (row.filePath != "") {
-                window.location.href = "http://132.232.92.186:24/Office/GrpFile/" + row.filePath
+                window.location.href = "http://132.232.92.186:24/Office/GrpFile/团组增减款项相关文件/" + row.filePath
             } else {
                 this.$message.error("暂未上传附件");
             }

+ 350 - 0
src/components/OP/InvitationOfficialActivities.vue

@@ -0,0 +1,350 @@
+<template>
+    <div>
+        <div class="communal-list">
+            <div>
+
+                <div class="communal-title">
+                    <div>邀请公务费用</div>
+                </div>
+                <div style="display: flex;justify-content: space-between;">
+                    <div style="width: 70%;display: flex;">
+                        <div style="width: 25%;">
+                            <el-select v-model="DiId" placeholder="团组选择" clearable filterable
+                                @change="AirTicketResSelectChange">
+                                <el-option v-for="item in AirTicketResSelectData" :key="item.id" :label="item.teamName"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </div>
+                        <div style="width: 25%;"><el-input v-model="inviter" placeholder="请输入邀请方名称" clearable></el-input>
+                        </div>
+                        <div style="width: 50%;"><el-date-picker v-model="InviteTime" type="daterange" align="right"
+                                unlink-panels format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至"
+                                start-placeholder="邀请开始日期" end-placeholder="邀请结束日期" :picker-options="pickerOptions">
+                            </el-date-picker>
+                            <el-button type="primary" @click="ConditionsQuery">查询</el-button>
+                        </div>
+                    </div>
+                    <div style="widows: 30%;">
+                        <el-button type="primary" style="margin-left: 10px;" @click="addIf">新增</el-button>
+                    </div>
+                </div>
+                <div style="margin:10px 0;color:#606266;">
+                    <span style="font-weight: bold;font-size:17px;">团队名称:</span>
+                    <span style="color:#606266;">{{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;</span>
+                    <span style="font-weight: bold;font-size:17px;">客户:</span>
+                    <span style="color:#606266;">{{ delegationInfo.clientName }}&nbsp;&nbsp;&nbsp; {{
+}}&nbsp;&nbsp;&nbsp;</span>
+                    <span style="font-weight: bold;font-size:17px;">出访国家:</span>
+                    <span style="color:#606266;">{{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;</span>
+                    <span style="font-weight: bold;font-size:17px;">起止日期:</span>
+                    <span style="color:#606266;">{{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate
+                    }}&nbsp;&nbsp;&nbsp;</span>
+                    <span style="font-weight: bold;font-size:17px;">天数/人数:</span>
+                    <span style="color:#606266;">{{ delegationInfo.visitDays }}天/{{ delegationInfo.visitPNumber }}人</span>
+                </div>
+            </div>
+            <template>
+                <el-table :data="tableDatas.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
+                    style="width: 100%" v-loading="loading" element-loading-text="拼命加载中...">
+                    <el-table-column prop="num" label="序 号" width="55">
+                        <template slot-scope="scope">
+                            {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="inviterArea" label="邀请方地区" width="200">
+                    </el-table-column>
+                    <el-table-column prop="inviter" label="邀请方" width="335">
+                    </el-table-column>
+                    <el-table-column prop="inviteTime" label="邀请时间" width="200">
+                    </el-table-column>
+                    <el-table-column prop="inviteCosts,currency" label="邀请费用" width="150" sortable>
+                        <template slot-scope="scope">
+                            {{ scope.row.inviteCosts }}({{ scope.row.currency }})
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="isGoOfficaiaBussiness" label="是否到场" width="150">
+                        <template slot-scope="isGoOfficaiaBussiness">
+                            <span v-if="isGoOfficaiaBussiness.row.isGoOfficaiaBussiness == 1">是</span>
+                            <span v-else>否</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="isAudit" label="是否审核" width="120">
+                        <template slot-scope="isAudit">
+                            <span v-if="isAudit.row.isAudit == 1">已通过</span>
+                            <span v-else-if="isAudit.row.isAudit == 0">未审核</span>
+                            <span v-else-if="isAudit.row.isAudit == 2">未通过</span>
+                            <span v-else>自动审核通过</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="attachment" label="附件" width="280">
+                    </el-table-column>
+                    <el-table-column label="操作">
+                        <template slot-scope="scope">
+                            <el-button size="mini" @click="download(scope.$index, scope.row)">下载附件</el-button>
+                            <el-button size="mini" @click="upDate(scope.$index, scope.row)">编辑</el-button>
+                            <el-button size="mini" type="danger" @click="del(scope.$index, scope.row)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </template>
+            <div class="block">
+                <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[10, 12, 15, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next" :total="tableDatas.length">
+                </el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            loading: false,
+            tableDatas: [],
+            tableData: [],
+            currentPage: 1, // 当前页码
+            pageSize: 12,// 每页的数据条数
+            input: '',
+            token: '',
+            userId: 0,
+            DiId: '',
+            inviter: "",
+            pickerOptions: {
+                shortcuts: [{
+                    text: '最近一周',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近一个月',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近三个月',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }]
+            },
+            InviteTime: '',
+            startInviteTime: "",
+            endInviteTime: "",
+            AirTicketResSelectData: [],
+            delegationInfo: {},
+        }
+    },
+    methods: {
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
+            this.currentPage = 1;
+            this.pageSize = val;
+        },
+        //当前页改变时触发 跳转其他页
+        handleCurrentChange(val) {
+            this.currentPage = val;
+        },
+        //团组下拉框
+        AirTicketResSelect() {
+            var url = "/api/Groups/DecreasePaymentsSelect"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    userId: that.userId,
+                    ctId: 81
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.AirTicketResSelectData = res.data.data.groupName;
+
+                    that.DiId = parseInt(that.AirTicketResSelectData[0].id);
+                    that.delegationInfo = that.AirTicketResSelectData[0];
+                    that.InvitationOfficialActivities()
+                }
+            }).catch(function (error) {
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        ConditionsQuery() {
+            if (this.InviteTime != "" && this.InviteTime != undefined && this.InviteTime != null) {
+                this.startInviteTime = this.InviteTime[0]
+                this.endInviteTime = this.InviteTime[1]
+            } else {
+                this.startInviteTime = ""
+                this.endInviteTime = ""
+            }
+            this.InvitationOfficialActivities();
+        },
+        AirTicketResSelectChange() {
+            for (let index = 0; index < this.AirTicketResSelectData.length; index++) {
+                if (this.AirTicketResSelectData[index].id == parseInt(this.diId)) {
+                    this.delegationInfo = this.AirTicketResSelectData[index];
+                    break;
+                }
+            }
+            this.AirTicketResList();
+        },
+        //商邀费用信息绑定
+        InvitationOfficialActivities() {
+            var url = "/api/Groups/InvitationOfficialActivitiesList"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    diId: that.DiId,
+                    inviter: that.inviter,
+                    startInviteTime: that.startInviteTime,
+                    endInviteTime: that.endInviteTime,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.tableDatas = res.data.data;
+                    that.tableData = that.tableDatas
+                    if (that.tableDatas.length != 0) {
+                        if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
+                            if (that.currentPage > 1) {
+                                that.currentPage = that.currentPage - 1;
+                            }
+                        }
+                    }
+                }
+
+            }).catch(function (error) {
+
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        upDate(index, row) {
+            this.$router.push({
+                path: "/home/OpInvitationOfficialActivities",
+                query: {
+                    DiId: this.DiId,
+                    id: row.id
+                }
+            })
+        },
+        addIf() {
+            debugger
+            if (this.DiId != 0 && this.DiId != '' && this.DiId != undefined) {
+                this.$router.push({
+                    path: "/home/OpInvitationOfficialActivities",
+                    query: {
+                        DiId: this.DiId,
+                    }
+                })
+
+            } else {
+                this.$message('请选择团组在进行添加');
+            }
+        },
+        del(index, row) {
+            this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                var that = this
+                this.$axios({
+                    method: 'post',
+                    url: "/api/Groups/DelInvitationOfficialActivities",
+                    headers: {
+                        Authorization: 'Bearer ' + this.token
+                    },
+                    data: {
+                        Id: row.id,
+                        DeleteUserId: this.userId
+                    }
+                }).then(function (res) {
+                    console.log(res)
+
+                    if (res.data.code == 200) {
+
+                        that.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        });
+                        that.AirTicketResSelect();
+                    } else {
+                        that.$message.error('删除失败!');
+                    }
+                    that.loading = false
+                }).catch(function (error) {
+                    that.loading = false
+                    that.$message.error("网络错误,请稍后重试");
+                });
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '操作已取消!'
+                });
+            });
+        },
+        download(index, row) {
+            if (row.filePath != "") {
+                window.location.href = "http://132.232.92.186:24/Office/GrpFile/商邀相关文件/" + row.attachment
+            } else {
+                this.$message.error("暂未上传附件");
+            }
+
+        }
+    },
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.AirTicketResSelect();
+        //this.AirTicketResList()
+    }
+}
+</script>
+<style>
+.communal-list {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.communal-title {
+    display: flex;
+    font-size: 17px;
+    font-weight: 600;
+    color: #555;
+    margin-top: 8px;
+    margin-bottom: 10px;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.el-input {
+    width: 80%;
+}
+
+.communal-box {
+    display: flex;
+}
+
+.communal-box>button {
+    margin-left: 10px;
+    padding: 8px 20px;
+}
+</style>

+ 71 - 55
src/components/OP/OpAirTicketRes.vue

@@ -178,7 +178,8 @@
                 <div style="display: flex;">
                     <div style="width: 100%;">
                         <el-form-item label="航班描述:" prop="flightsDescription" label-width="160px">
-                            <el-input type="textarea" :rows="5" placeholder="请严格遵守此格式!!! 1. EK363 R1 WE08MAR CANDXB HK7 0015 0515 SEAME 2 3 (注意空格以及多条数据换行)"
+                            <el-input type="textarea" :rows="5"
+                                placeholder="请严格遵守此格式!!! 1. EK363 R1 WE08MAR CANDXB HK7 0015 0515 SEAME 2 3 (注意空格以及多条数据换行)"
                                 v-model="airTicketResOpData.flightsDescription"></el-input>
                         </el-form-item>
                     </div>
@@ -480,8 +481,8 @@ export default {
                 createUserId: 0,
                 orbitalPrivateTransfer: '',
                 remark: ''
-            }
-
+            },
+            IsAuditGM: 0,
         }
     },
     methods: {
@@ -529,7 +530,7 @@ export default {
             }).then(function (res) {
 
                 if (res.data.code == 200) {
-                    debugger
+
                     that.delegationInfo = res.data.data.delegationInfo
                     that.airGroupCostParameter = res.data.data.airGroupCostParameter
                 }
@@ -545,61 +546,69 @@ export default {
         },
         //点击保存事件
         addBtn() {
-            const that = this;
-            let formArr = ['airTicketResOpData', 'cardPaymentOpData']//三个form表单的ref
-            var resultArr = [] //用来接受返回结果的数组
-            function checkForm(formName) { //封装验证表单的函数
-                var result = new Promise(function (resolve, reject) {
-                    that.$refs[formName].validate((valid) => {
-                        if (valid) {
-                            resolve();
-                        } else { reject() }
+            if (this.IsAuditGM = 1) {
+                this.$message.error('审核已通过,不可修改!');
+            } else {
+                if (this.DiId == null && this.DiId == undefined && this.DiId == "") {
+                    this.$message.error("请选择团组名称");
+                    return;
+                }
+                const that = this;
+                let formArr = ['airTicketResOpData', 'cardPaymentOpData']//三个form表单的ref
+                var resultArr = [] //用来接受返回结果的数组
+                function checkForm(formName) { //封装验证表单的函数
+                    var result = new Promise(function (resolve, reject) {
+                        that.$refs[formName].validate((valid) => {
+                            if (valid) {
+                                resolve();
+                            } else { reject() }
+                        })
                     })
+                    resultArr.push(result) //push 得到promise的结果
+                }
+                formArr.forEach(item => { //根据表单的ref校验
+                    checkForm(item)
                 })
-                resultArr.push(result) //push 得到promise的结果
-            }
-            formArr.forEach(item => { //根据表单的ref校验
-                checkForm(item)
-            })
-            Promise.all(resultArr).then(values => {
-                that.airTicketResOpData.diId = that.DiId;
-                that.airTicketResOpData.createUserId = that.userId;
+                Promise.all(resultArr).then(values => {
+                    that.airTicketResOpData.diId = that.DiId;
+                    that.airTicketResOpData.createUserId = that.userId;
 
-                that.cardPaymentOpData.createUserId = that.userId;
-                that.cardPaymentOpData.diId = that.DiId;
-                if (that.cardPaymentOpData.ctdId == '') {
-                    that.cardPaymentOpData.ctdId = 0;
-                }
-                var url = "/api/Groups/OpAirTicketRes"
-                that.$axios({
-                    method: 'post',
-                    url: url,
-                    headers: {
-                        Authorization: 'Bearer ' + that.token
-                    },
-                    data: {
-                        status: that.status,
-                        airTicketResOpData: that.airTicketResOpData,
-                        cardPaymentOpData: that.cardPaymentOpData
-                    }
-                }).then(function (res) {
-                    if (res.data.code == 200) {
-                        that.$message({
-                            message: res.data.msg,
-                            type: 'success'
-                        });
-                        that.loading = true;
-                        setTimeout(() => {
-                            that.$router.push('/home/AirTicketRes')
-                        }, 3000);
-                    } else {
-                        that.$message.error(res.data.msg);
+                    that.cardPaymentOpData.createUserId = that.userId;
+                    that.cardPaymentOpData.diId = that.DiId;
+                    if (that.cardPaymentOpData.ctdId == '') {
+                        that.cardPaymentOpData.ctdId = 0;
                     }
-                })// 此时必填完成,做保存后的业务操作
-            }).catch(_ => {
-                this.$message.error('请完善信息在保存!');
-                return false;
-            })
+                    var url = "/api/Groups/OpAirTicketRes"
+                    that.$axios({
+                        method: 'post',
+                        url: url,
+                        headers: {
+                            Authorization: 'Bearer ' + that.token
+                        },
+                        data: {
+                            status: that.status,
+                            airTicketResOpData: that.airTicketResOpData,
+                            cardPaymentOpData: that.cardPaymentOpData
+                        }
+                    }).then(function (res) {
+                        if (res.data.code == 200) {
+                            that.$message({
+                                message: res.data.msg,
+                                type: 'success'
+                            });
+                            that.loading = true;
+                            setTimeout(() => {
+                                that.$router.push('/home/AirTicketRes')
+                            }, 3000);
+                        } else {
+                            that.$message.error(res.data.msg);
+                        }
+                    })// 此时必填完成,做保存后的业务操作
+                }).catch(_ => {
+                    this.$message.error('请完善信息在保存!');
+                    return false;
+                })
+            }
         },
         //根据机票费用录入Id查询c表和机票费用信息
         AirTicketResById() {
@@ -616,11 +625,18 @@ export default {
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
+
                     that.airTicketResOpData = res.data.data.airTicket;
                     that.prePrice = res.data.data.airTicket.prePrice
                     that.currencyId = res.data.data.airTicket.preCurrency
                     that.clientNum = res.data.data.airTicket.clientNum
                     that.cardPaymentOpData = res.data.data.creditCard;
+                    that.IsAuditGM = that.cardPaymentOpData.isAuditGM
+                    debugger
+                    if (that.cardPaymentOpData.ctdId == 0) {
+                        that.cardPaymentOpData.ctdId = ""
+                    }
+
                     that.cardPaymentOpData.orbitalPrivateTransfer = parseInt(that.cardPaymentOpData.orbitalPrivateTransfer)
                 }
             })

+ 118 - 61
src/components/OP/OpDecreasePayments.vue

@@ -128,7 +128,7 @@ export default {
     data() {
         return {
             projectName: "",
-            //uploadURL: "/project/upload?a=1",
+            uploadURL: "http://132.232.92.186:8888/api/Groups/UploadProject",
             uploadFiles: [],//上传的文件列表
             DelfileName: "",
             title: "新增团组增减款项费用",
@@ -155,10 +155,12 @@ export default {
                 createUserId: 0,
                 remark: ""
             },
+            IsAuditGM: 0,
             Decrease: {},
             CreditCard: {},
             headers: {
-                Authorization: JSON.parse(localStorage.getItem('userinif')).token
+                Authorization: JSON.parse(localStorage.getItem('userinif')).token,
+                TypeName: "A"
             },
             DecreasePaymentsRules: {
                 price: [
@@ -181,13 +183,6 @@ export default {
 
         }
     },
-    computed: {
-        //文件的上传路径
-        uploadURL: function () {
-            //var userId = this.$store.state.userId;
-            return "http://132.232.92.186:8888/api/Groups/UploadProject";
-        }
-    },
 
     methods: {
         //团组下拉框
@@ -201,7 +196,8 @@ export default {
                     Authorization: 'Bearer ' + this.token
                 },
                 data: {
-                    userId: that.userId
+                    userId: that.userId,
+                    CTId: 98
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
@@ -235,6 +231,7 @@ export default {
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
+
                     that.Decrease = res.data.data._Decrease
                     that.CreditCard = res.data.data._CreditCard
                     that.DecreasePaymentsData.payDId = that.CreditCard.payDId
@@ -246,11 +243,13 @@ export default {
                     that.DecreasePaymentsData.price = that.Decrease.price
                     that.DecreasePaymentsData.currency = that.Decrease.currency
                     that.DecreasePaymentsData.filePath = that.Decrease.filePath
+                    that.projectName = that.Decrease.filePath
                     that.DecreasePaymentsData.remark = that.Decrease.remark
+                    that.IsAuditGM = that.CreditCard.isAuditGM
                     if (that.Decrease.filePath != null && that.Decrease.filePath != undefined && that.Decrease.filePath != "") {
                         that.uploadFiles.push({
                             name: that.Decrease.filePath,
-                            url: 'C:\\Server\\File\\OA2023\\Office\\GrpFile\\',
+                            url: 'http://132.232.92.186:24/Office/GrpFile/团组增减款项相关文件/',
                         })
                     }
 
@@ -261,60 +260,117 @@ export default {
 
         //点击保存事件
         addBtn() {
-            const that = this;
-            that.$refs.DecreasePaymentsData.validate((valid) => {
-                if (valid) {
-                    debugger
-                    if (that.projectName == "") {
-                        that.$axios({
-                            method: 'post',
-                            url: "/api/Groups/DelFile",
-                            headers: {
-                                Authorization: 'Bearer ' + that.token
-                            },
-                            data: {
-                                fileName: that.DelfileName,
-                                id: that.id
-                            }
-                        }).then(function (res) {
-                            if (res.data.code == 200) {
+            if (this.IsAuditGM == 1) {
+                this.$message.error('已通过审核,不可修改!');
+            } else {
+                if (this.DiId == null && this.DiId == undefined && this.DiId == "") {
+                    this.$message.error("请选择团组名称");
+                    return;
+                }
+                const that = this;
+                that.$refs.DecreasePaymentsData.validate((valid) => {
+                    if (valid) {
+                        if (that.DecreasePaymentsData.filePath == that.projectName) {
+                            if (that.DelfileName != null && that.DelfileName != "" && that.DelfileName != undefined) {
+                                that.$axios({
+                                    method: 'post',
+                                    url: "/api/Groups/DelFile",
+                                    headers: {
+                                        Authorization: 'Bearer ' + that.token
+                                    },
+                                    data: {
+                                        fileName: that.DelfileName,
+                                        id: that.id
+                                    }
+                                }).then(function (res) {
+                                    if (res.data.code == 200) {
 
+                                    }
+                                })
                             }
-                        })
+                            that.DecreasePaymentsData.filePath = that.projectName
+                            that.DecreasePaymentsData.diId = that.DiIdSelect;
+                            that.DecreasePaymentsData.createUserId = that.userId;
+                            var url = "/api/Groups/OpDecreasePayments"
+                            that.$axios({
+                                method: 'post',
+                                url: url,
+                                headers: {
+                                    Authorization: 'Bearer ' + that.token
+                                },
+                                data: that.DecreasePaymentsData
+                            }).then(function (res) {
+                                if (res.data.code == 200) {
+                                    that.$message({
+                                        message: res.data.msg,
+                                        type: 'success'
+                                    });
+                                    that.loading = true;
+                                    setTimeout(() => {
+                                        that.$router.push('/home/DecreasePayments')
+                                    }, 3000);
+                                } else {
+                                    that.$message.error(res.data.msg);
+                                }
+                            })
+
+                        } else {
+                            if (that.DelfileName != null && that.DelfileName != "" && that.DelfileName != undefined) {
+                                that.$axios({
+                                    method: 'post',
+                                    url: "/api/Groups/DelFile",
+                                    headers: {
+                                        Authorization: 'Bearer ' + that.token
+                                    },
+                                    data: {
+                                        fileName: that.DelfileName,
+                                        id: that.id
+                                    }
+                                }).then(function (res) {
+                                    if (res.data.code == 200) {
 
-                        this.DecreasePaymentsData.filePath = ""
-                        that.DecreasePaymentsData.diId = that.DiIdSelect;
-                        that.DecreasePaymentsData.createUserId = that.userId;
-                        var url = "/api/Groups/OpDecreasePayments"
-                        that.$axios({
-                            method: 'post',
-                            url: url,
-                            headers: {
-                                Authorization: 'Bearer ' + that.token
-                            },
-                            data: that.DecreasePaymentsData
-                        }).then(function (res) {
-                            if (res.data.code == 200) {
-                                that.$message({
-                                    message: res.data.msg,
-                                    type: 'success'
-                                });
-                                that.loading = true;
-                                setTimeout(() => {
-                                    that.$router.push('/home/DecreasePayments')
-                                }, 3000);
+                                    }
+                                })
+                            }
+                            if (that.projectName != "" && that.projectName != null && that.projectName != undefined) {
+                                that.$refs.upload.submit();//上传文件到服务器
                             } else {
-                                that.$message.error(res.data.msg);
+                                that.DecreasePaymentsData.filePath = that.projectName
+                                that.DecreasePaymentsData.diId = that.DiIdSelect;
+                                that.DecreasePaymentsData.createUserId = that.userId;
+                                var url = "/api/Groups/OpDecreasePayments"
+                                that.$axios({
+                                    method: 'post',
+                                    url: url,
+                                    headers: {
+                                        Authorization: 'Bearer ' + that.token
+                                    },
+                                    data: that.DecreasePaymentsData
+                                }).then(function (res) {
+                                    if (res.data.code == 200) {
+                                        that.$message({
+                                            message: res.data.msg,
+                                            type: 'success'
+                                        });
+                                        that.loading = true;
+                                        setTimeout(() => {
+                                            that.$router.push('/home/DecreasePayments')
+                                        }, 3000);
+                                    } else {
+                                        that.$message.error(res.data.msg);
+                                    }
+                                })
                             }
-                        })
+
+                        }
+
                     } else {
-                        that.$refs.upload.submit();//上传文件到服务器
+                        this.$message.error('请完善信息在保存!');
+                        return false;
                     }
-                } else {
-                    this.$message.error('请完善信息在保存!');
-                    return false;
-                }
-            })
+                })
+
+            }
             // 此时必填完成,做保存后的业务操作
         },
         DecreasePaymentsChange() {
@@ -346,7 +402,8 @@ export default {
                     method: 'post',
                     url: "/api/Groups/DelFile",
                     headers: {
-                        Authorization: 'Bearer ' + that.token
+                        Authorization: 'Bearer ' + that.token,
+                        TypeName: "A"
                     },
                     data: {
                         fileName: that.DelfileName,
@@ -358,7 +415,7 @@ export default {
                     }
                 })
 
-                this.DecreasePaymentsData.filePath = response.data
+                that.DecreasePaymentsData.filePath = response.data
                 that.DecreasePaymentsData.diId = that.DiIdSelect;
                 that.DecreasePaymentsData.createUserId = that.userId;
                 var url = "/api/Groups/OpDecreasePayments"
@@ -406,7 +463,7 @@ export default {
         },
         onChange(file, fileList) {
             this.projectName = file.name
-        }
+        },
 
     },
 

+ 643 - 0
src/components/OP/OpInvitationOfficialActivities.vue

@@ -0,0 +1,643 @@
+<template>
+    <div class="car_add">
+        <div>
+            <div class="communal-title">
+                <div>{{ title }}</div>
+            </div>
+        </div>
+        <hr style='background-color:#5555; height:1px; border:none;' />
+        <div>
+            <el-form :model="delegationInfo" label-width="100px" class="demo-ruleForm">
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="团组名称:" label-width="160px">
+                            <el-select v-model="DiIdSelect" clearable filterable placeholder="团组选择"
+                                @change="DecreasePaymentsChange" :disabled="isShow" style="width: 220px;">
+                                <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="团 号:" prop="tourCode" label-width="160px">
+                            <el-input placeholder="团号" v-model="delegationInfo.tourCode" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="客户:" prop="clientName" label-width="160px">
+                            <el-input placeholder="客户" v-model="delegationInfo.clientName" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="出访国家:" prop="visitCountry" label-width="160px">
+                            <el-input placeholder="出访国家" v-model="delegationInfo.visitCountry" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+            </el-form>
+            <el-form :model="InvitationOfficialActivities" ref="InvitationOfficialActivities"
+                :rules="InvitationOfficialActivitiesRules" label-width="100px" class="demo-ruleForm">
+                <div style="display:flex ;">
+                    <div style="width: 25%;">
+                        <el-form-item label="邀请方地区:" prop="inviterArea" label-width="160px">
+                            <el-input placeholder="邀请方地区" v-model="InvitationOfficialActivities.inviterArea">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="邀请方:" prop="inviter" label-width="160px">
+                            <el-input placeholder="邀请方" v-model="InvitationOfficialActivities.inviter">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="邀请时间:" prop="inviteTime" label-width="160px">
+                            <el-date-picker v-model="InvitationOfficialActivities.inviteTime" type="date"
+                                placeholder="选择日期">
+                            </el-date-picker>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="是否到场:" prop="isGoOfficaiaBussiness" label-width="160px">
+                            <el-radio-group v-model="InvitationOfficialActivities.isGoOfficaiaBussiness">
+                                <el-radio :label=1>是</el-radio>
+                                <el-radio :label=0>否</el-radio>
+                            </el-radio-group>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display:flex ;">
+                    <div style="width: 25%;">
+                        <el-form-item label="联系人:" prop="contact" label-width="160px">
+                            <el-input placeholder="联系人" v-model="InvitationOfficialActivities.contact">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="联系电话:" prop="tel" label-width="160px">
+                            <el-input placeholder="联系电话" v-model="InvitationOfficialActivities.tel">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="电子邮箱:" prop="email" label-width="160px">
+                            <el-input placeholder="电子邮箱" v-model="InvitationOfficialActivities.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="传真号码:" prop="fax" label-width="160px">
+                            <el-input placeholder="传真号码" v-model="InvitationOfficialActivities.fax">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 50%;">
+                        <el-form-item label="邀请方地址:" prop="address" label-width="160px">
+                            <el-input type="textarea" :rows="5" placeholder="邀请方地址"
+                                v-model="InvitationOfficialActivities.address"></el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 50%;">
+                        <el-form-item label="其他信息:" prop="otherInformation" label-width="160px">
+                            <el-input type="textarea" :rows="5" placeholder="其他信息"
+                                v-model="InvitationOfficialActivities.otherInformation"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display:flex ;">
+                    <div style="width: 25%;">
+                        <el-form-item label="邀请费用:" prop="inviteCosts" label-width="160px">
+                            <el-input placeholder="邀请费用" v-model="InvitationOfficialActivities.inviteCosts"
+                                style="width: 58%;">
+                            </el-input>
+                            <el-select v-model="InvitationOfficialActivities.currency" style="width: 40%;">
+                                <el-option key="48" label="CNY" :value="48"></el-option>
+                                <el-option key="49" label="USD" :value="49"></el-option>
+                                <el-option key="51" label="EUR" :value="51"></el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="收款方:" prop="payee" label-width="160px">
+                            <el-input placeholder="收款方" v-model="InvitationOfficialActivities.payee">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="费用标识:" prop="orbitalPrivateTransfer">
+                            <el-select v-model="InvitationOfficialActivities.orbitalPrivateTransfer" placeholder="费用标识"
+                                style="width: 100%;">
+                                <el-option key="0" label="公转" :value=0>
+                                </el-option>
+                                <el-option key="1" label="私转" :value=1>
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="支付方式:" prop="payDId">
+                            <el-select v-model="InvitationOfficialActivities.payDId" placeholder="支付方式">
+                                <el-option v-for="item in payment" :key="item.id" :label="item.name" :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                </div>
+
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="快递费:" prop="sendCost" label-width="160px">
+                            <el-input placeholder="快递费" v-model="InvitationOfficialActivities.sendCost">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="附件:" prop="fileUrl" label-width="160px">
+                            <el-upload :file-list="uploadFiles" ref="upload" :on-success="upLoadSuccess"
+                                :on-error="upLoadError" :before-remove="beforeRemove" :on-change="onChange" :limit="1"
+                                :on-exceed="exceed" :action="uploadURL" :headers="headers" :auto-upload="false">
+                                <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+                                <!-- <el-button style="margin-left: 10px;" size="small" type="success"
+                                    @click="submitUpload">上传到服务器</el-button> -->
+                            </el-upload>
+
+
+                        </el-form-item>
+                    </div>
+
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 90%;">
+                        <el-form-item label="备 注:" prop="remark" label-width="160px">
+                            <el-input type="textarea" :rows="5" placeholder="备注"
+                                v-model="InvitationOfficialActivities.remark"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <el-form-item>
+                    <div style="margin-left: 60%;">
+                        <el-button type="primary" @click="addBtn">保存</el-button>
+                        <router-link to='/home/InvitationOfficialActivities'>
+                            <el-button>取消</el-button>
+                        </router-link>
+                    </div>
+                </el-form-item>
+            </el-form>
+
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            uploadURL: "http://132.232.92.186:8888/api/Groups/UploadProject",
+            projectName: "",
+            uploadFiles: [],//上传的文件列表
+            DelfileName: "",
+            title: "新增商邀费用",
+            token: '',
+            userId: 0,
+            id: '',
+            DiId: '',
+            isShow: false,
+            DiIdSelect: '',
+            delegationInfo: {},
+            IsAuditGM: 0,
+            delegationInfoList: [],//团组下拉框
+            payment: [],//支付方式下拉框
+            InvitationOfficialActivities: {
+                status: 0,
+                payDId: 73,
+                orbitalPrivateTransfer: 0,
+                payee: '',
+                id: 0,
+                diId: '',
+                inviterArea: '',
+                inviter: '',
+                inviteTime: this.dateFormat(new Date()),
+                attachment: '',
+                inviteCosts: 0,
+                currency: 48,
+                sendCost: 0,
+                isGoOfficaiaBussiness: 0,
+                createUserId: 0,
+                remark: '',
+                address: '',
+                contact: '',
+                job: '',
+                tel: '',
+                email: '',
+                fax: '',
+                otherInformation: ''
+            },
+            headers: {
+                Authorization: JSON.parse(localStorage.getItem('userinif')).token,
+                TypeName: "B"
+            },
+            InvitationOfficialActivitiesRules: {
+                inviteCosts: [
+                    { required: true, message: '请输入费用金额', trigger: 'blur' },
+                    { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
+                ],
+                inviterArea: [
+                    { required: true, message: '请输入邀请方地区', trigger: 'change' },
+                    { required: true, message: '请输入邀请方地区', trigger: 'blur' },
+                ],
+                inviter: [
+                    { required: true, message: '请输入邀请方', trigger: 'change' },
+                    { required: true, message: '请输入邀请方', trigger: 'blur' },
+                ],
+                inviteTime: [
+                    { required: true, message: '请选择邀请时间', trigger: 'change' },
+                    { required: true, message: '请选择邀请时间', trigger: 'blur' },
+                ],
+                contact: [
+                    { required: true, message: '请输入联系人', trigger: 'change' },
+                    { required: true, message: '请输入联系人', trigger: 'blur' },
+                ],
+                tel: [
+                    { required: true, message: '请输入联系方式', trigger: 'change' },
+                    { required: true, message: '请输入联系方式', trigger: 'blur' },
+                ],
+                address: [
+                    { required: true, message: '请输入邀请方地址', trigger: 'change' },
+                    { required: true, message: '请输入邀请方地址', trigger: 'blur' },
+                ],
+                payee: [
+                    { required: true, message: '请输入收款方', trigger: 'change' },
+                    { required: true, message: '请输入收款方', trigger: 'blur' },
+                ],
+
+            }
+
+        }
+    },
+    methods: {
+        //团组下拉框
+        AirTicketResSelect() {
+            var url = "/api/Groups/DecreasePaymentsSelect"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    userId: that.userId,
+                    ctId: 81
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.delegationInfoList = res.data.data.groupName;
+                    that.DiIdSelect = parseInt(that.DiId)
+                    for (let index = 0; index < that.delegationInfoList.length; index++) {
+                        if (that.delegationInfoList[index].id == that.DiIdSelect) {
+                            that.delegationInfo = that.delegationInfoList[index];
+                            break;
+                        }
+                    }
+                    that.payment = res.data.data.payment
+                }
+
+            })
+
+
+        },
+        InvitationOfficialActivitiesById() {
+            var url = "/api/Groups/InvitationOfficialActivitiesById"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    Id: that.id
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    console.log(res.data.data)
+                    that.InvitationOfficialActivities.payDId = res.data.data._CreditCard.payDId
+                    that.InvitationOfficialActivities.orbitalPrivateTransfer = res.data.data._CreditCard.orbitalPrivateTransfer
+                    that.InvitationOfficialActivities.payee = res.data.data._CreditCard.payee
+                    that.InvitationOfficialActivities.id = res.data.data._Invitation.id
+                    that.InvitationOfficialActivities.diId = res.data.data._Invitation.diId
+                    that.InvitationOfficialActivities.inviterArea = res.data.data._Invitation.inviterArea
+                    that.InvitationOfficialActivities.inviter = res.data.data._Invitation.inviter
+                    that.InvitationOfficialActivities.inviteTime = res.data.data._Invitation.inviteTime
+                    that.InvitationOfficialActivities.attachment = res.data.data._Invitation.attachment
+                    that.projectName = res.data.data._Invitation.attachment
+                    that.InvitationOfficialActivities.inviteCosts = res.data.data._Invitation.inviteCosts
+                    that.InvitationOfficialActivities.currency = res.data.data._Invitation.currency
+                    that.InvitationOfficialActivities.sendCost = res.data.data._Invitation.sendCost
+                    that.InvitationOfficialActivities.isGoOfficaiaBussiness = res.data.data._Invitation.isGoOfficaiaBussiness
+                    that.InvitationOfficialActivities.remark = res.data.data._Invitation.remark
+                    that.InvitationOfficialActivities.address = res.data.data._InvitationData.address
+                    that.InvitationOfficialActivities.contact = res.data.data._InvitationData.contact
+                    that.InvitationOfficialActivities.job = res.data.data._InvitationData.job
+                    that.InvitationOfficialActivities.tel = res.data.data._InvitationData.tel
+                    debugger
+                    that.IsAuditGM = res.data.data._CreditCard.isAuditGM;
+                    that.InvitationOfficialActivities.email = res.data.data._InvitationData.email
+                    that.InvitationOfficialActivities.fax = res.data.data._InvitationData.fax
+                    that.InvitationOfficialActivities.otherInformation = res.data.data._InvitationData.remark
+                    if (that.InvitationOfficialActivities.attachment != null && that.InvitationOfficialActivities.attachment != undefined && that.InvitationOfficialActivities.attachment != "") {
+                        that.uploadFiles.push({
+                            name: that.InvitationOfficialActivities.attachment,
+                            url: 'http://132.232.92.186:24/Office/GrpFile/商邀相关文件/',
+                        })
+                    }
+
+                }
+
+            })
+        },
+
+        //点击保存事件
+        addBtn() {
+            if (this.IsAuditGM == 1) {
+                this.$message.error('已通过审核,不可修改!');
+            } else {
+                if (this.DiId == null && this.DiId == undefined && this.DiId == "") {
+                    this.$message.error("请选择团组名称");
+                    return;
+                }
+                const that = this;
+                that.$refs.InvitationOfficialActivities.validate((valid) => {
+                    if (valid) {
+                        if (that.InvitationOfficialActivities.attachment == that.projectName) {
+                            if (that.DelfileName != null && that.DelfileName != "" && that.DelfileName != undefined) {
+                                that.$axios({
+                                    method: 'post',
+                                    url: "/api/Groups/DelFile",
+                                    headers: {
+                                        Authorization: 'Bearer ' + that.token
+                                    },
+                                    data: {
+                                        fileName: that.DelfileName,
+                                        id: that.id
+                                    }
+                                }).then(function (res) {
+                                    if (res.data.code == 200) {
+
+                                    }
+                                })
+                            }
+                            that.InvitationOfficialActivities.attachment = that.projectName
+                            that.InvitationOfficialActivities.diId = that.DiIdSelect;
+                            that.InvitationOfficialActivities.createUserId = that.userId;
+                            var url = "/api/Groups/OpInvitationOfficialActivities"
+                            that.$axios({
+                                method: 'post',
+                                url: url,
+                                headers: {
+                                    Authorization: 'Bearer ' + that.token
+                                },
+                                data: that.InvitationOfficialActivities
+                            }).then(function (res) {
+                                if (res.data.code == 200) {
+                                    that.$message({
+                                        message: res.data.msg,
+                                        type: 'success'
+                                    });
+                                    that.loading = true;
+                                    setTimeout(() => {
+                                        that.$router.push('/home/InvitationOfficialActivities')
+                                    }, 3000);
+                                } else {
+                                    that.$message.error(res.data.msg);
+                                }
+                            })
+                        } else {
+                            if (that.DelfileName != null && that.DelfileName != "" && that.DelfileName != undefined) {
+                                that.$axios({
+                                    method: 'post',
+                                    url: "/api/Groups/DelFile",
+                                    headers: {
+                                        Authorization: 'Bearer ' + that.token
+                                    },
+                                    data: {
+                                        fileName: that.DelfileName,
+                                        id: that.id
+                                    }
+                                }).then(function (res) {
+                                    if (res.data.code == 200) {
+
+                                    }
+                                })
+                            }
+                            if (that.projectName != "" && that.projectName != null && that.projectName != undefined) {
+                                that.$refs.upload.submit();//上传文件到服务器
+                            } else {
+                                that.InvitationOfficialActivities.attachment = that.projectName
+                                that.InvitationOfficialActivities.diId = that.DiIdSelect;
+                                that.InvitationOfficialActivities.createUserId = that.userId;
+                                var url = "/api/Groups/OpInvitationOfficialActivities"
+                                that.$axios({
+                                    method: 'post',
+                                    url: url,
+                                    headers: {
+                                        Authorization: 'Bearer ' + that.token
+                                    },
+                                    data: that.InvitationOfficialActivities
+                                }).then(function (res) {
+                                    if (res.data.code == 200) {
+                                        that.$message({
+                                            message: res.data.msg,
+                                            type: 'success'
+                                        });
+                                        that.loading = true;
+                                        setTimeout(() => {
+                                            that.$router.push('/home/InvitationOfficialActivities')
+                                        }, 3000);
+                                    } else {
+                                        that.$message.error(res.data.msg);
+                                    }
+                                })
+                            }
+
+                        }
+                    } else {
+                        this.$message.error('请完善信息在保存!');
+                        return false;
+                    }
+                })
+            }
+            // 此时必填完成,做保存后的业务操作
+        },
+        DecreasePaymentsChange() {
+            for (let index = 0; index < this.delegationInfoList.length; index++) {
+                if (this.delegationInfoList[index].id == parseInt(this.DiIdSelect)) {
+                    this.delegationInfo = this.delegationInfoList[index];
+                    break;
+                }
+            }
+        },
+
+        //上传
+        // 文件超出限制
+        exceed(files, fileList) {
+            this.$message.warning(
+                `当前限制选择 1个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
+                } 个文件,请取消要替换的文件`
+            );
+        },
+        //文件上传成功时的钩子
+        upLoadSuccess(response, file, fileList) {
+            if (response.code == 200) {
+                debugger
+                var that = this;
+                that.$axios({
+                    method: 'post',
+                    url: "/api/Groups/DelFile",
+                    headers: {
+                        Authorization: 'Bearer ' + that.token
+                    },
+                    data: {
+                        fileName: that.DelfileName,
+                        id: that.id
+                    }
+                }).then(function (res) {
+                    if (res.data.code == 200) {
+
+                    }
+                })
+                debugger
+                that.InvitationOfficialActivities.attachment = response.data
+                that.InvitationOfficialActivities.diId = that.DiIdSelect;
+                that.InvitationOfficialActivities.createUserId = that.userId;
+                var url = "/api/Groups/OpInvitationOfficialActivities"
+                that.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + that.token
+                    },
+                    data: that.InvitationOfficialActivities
+                }).then(function (res) {
+                    if (res.data.code == 200) {
+                        that.$message({
+                            message: res.data.msg,
+                            type: 'success'
+                        });
+                        that.loading = true;
+                        setTimeout(() => {
+                            that.$router.push('/home/InvitationOfficialActivities')
+                        }, 3000);
+                    } else {
+                        that.$message.error(res.data.msg);
+                    }
+                })
+                console.log("上传成功");
+            } else {
+                console.log("保存失败");
+            }
+
+        },
+        //文件上传失败时的钩子
+        upLoadError(response, file, fileList) {
+            console.log("项目添加失败");
+        },
+        beforeRemove(file, fileList) {
+            debugger
+            console.log(file.name)
+            let id1 = this.uploadFiles.findIndex(item => {
+                if (item.name == file.name) {
+                    return true
+                }
+            })
+            this.uploadFiles.splice(id1, 1)
+            this.projectName = ""
+            this.DelfileName = file.name
+        },
+        onChange(file, fileList) {
+            debugger
+            this.projectName = file.name
+        }
+
+    },
+
+    mounted() {
+
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.AirTicketResSelect();
+        this.id = this.$route.query.id
+        if (this.id != null && this.id != undefined && this.id != 0) {
+            this.InvitationOfficialActivitiesById();
+            this.title = "修改商邀费用";
+            this.InvitationOfficialActivities.status = 2
+            this.isShow = true
+        } else {
+            this.InvitationOfficialActivities.status = 1
+            this.title = "新增商邀费用"
+            this.isShow = false
+        }
+        this.DiId = this.$route.query.DiId
+    }
+}
+</script>
+<style>
+.communal-list {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.car_add .communal-title {
+    display: flex;
+    font-size: 17px;
+    font-weight: 600;
+    color: #555;
+    margin-bottom: 20px;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.appraise-box {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    margin: 50px 0;
+}
+
+.appraise-box>div {
+    width: 30%;
+}
+
+.communal-box {
+    display: flex;
+}
+
+.communal-box>button {
+    margin-left: 10px;
+    padding: 8px 20px;
+}
+
+.car_add {
+    background-color: #fff;
+    padding: 20px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+@media screen and (max-width: 1700px) {
+    .appraise-box>div {
+        width: 48%;
+    }
+
+    .appraise-box>div el-form-item__content {
+        width: 260px !important;
+    }
+}
+</style>

+ 1 - 1
src/components/Resource/CountryFeeCostOperation.vue

@@ -281,7 +281,7 @@ export default {
             })
         },
         upData() {
-
+            debugger
             for (var i = 0; i < this.tableData.length; i++) {
                 if (this.tableData[i].id == parseInt(this.addData.Id)) {
 

+ 526 - 0
src/components/Resource/InvitationOfficialActivityData.vue

@@ -0,0 +1,526 @@
+<template>
+    <div>
+        <div class="communal-list">
+            <div class="communal-title">
+                <div>邀请/公务活动资料</div>
+            </div>
+            <div>
+                <div class="communal-box" style="margin-top: 10px;">
+                    <el-autocomplete class="inline-input" v-model="Country" :fetch-suggestions="querySearchCountry"
+                        placeholder="请输入国家" clearable></el-autocomplete>
+                    <el-autocomplete class="inline-input" v-model="UnitName" :fetch-suggestions="querySearchUnitName"
+                        placeholder="请输入邀请方" clearable></el-autocomplete>
+                    <el-autocomplete class="inline-input" v-model="Contact" :fetch-suggestions="querySearchContact"
+                        placeholder="联系人" clearable></el-autocomplete>
+                    <el-select v-model="Delegation" clearable filterable placeholder="团组名称" style="width: 20%;">
+                        <el-option v-for="item in restaurantDelegation" :key="item.id" :label="item.groupName"
+                            :value="item.id">
+                        </el-option>
+                    </el-select>
+                    <el-autocomplete class="inline-input" v-model="Field" :fetch-suggestions="querySearchField"
+                        placeholder="领域" clearable></el-autocomplete>
+                    <el-button type="primary" @click="QueryData" style="margin-left: 10px;">查询</el-button>
+                    <div>
+                        <router-link to='/home/OpInvitationOfficialActivityData'>
+                            <el-button type="primary" style="margin-left: 10px;">新增</el-button>
+                        </router-link>
+                    </div>
+                </div>
+                <div class="communal-box" style="margin-top: 10px;">
+                    <el-select v-model="CreateUserId" placeholder="录入者" filterable clearable>
+                        <el-option v-for="item in CreateUserList" :key="item.id" :label="item.cnName" :value="item.id">
+                        </el-option>
+                    </el-select>
+                    <el-date-picker v-model="InviteTime" type="daterange" align="right" unlink-panels format="yyyy-MM-dd"
+                        value-format="yyyy-MM-dd" range-separator="至" start-placeholder="邀请开始日期" end-placeholder="邀请结束日期"
+                        :picker-options="pickerOptions">
+                    </el-date-picker>
+                    <el-button type="primary" @click="QueryCount" style="margin-left: 10px;">查询录入数量</el-button>
+                    <div style="display: flex;align-items: center;justify-content: center">
+                        查询结果:该人员在以上条件共录入<span style="color: red;">{{ dataCount }}</span>条数据
+                    </div>
+                </div>
+            </div>
+            <template>
+                <el-table :data="tableDatas.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
+                    style="width: 100%;margin-top: 10px;" v-loading="loading" element-loading-text="拼命加载中...">
+                    <el-table-column prop="num" label="序 号" width="55">
+                        <template slot-scope="scope">
+                            {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="country" label="国家">
+                    </el-table-column>
+                    <el-table-column prop="city" label="城市">
+                    </el-table-column>
+                    <el-table-column prop="unitName" label="邀请方名称">
+                    </el-table-column>
+                    <el-table-column prop="field" label="涉及领域">
+                    </el-table-column>
+                    <el-table-column prop="contact" label="联系人">
+                    </el-table-column>
+                    <el-table-column prop="job" label="职务">
+                    </el-table-column>
+                    <el-table-column prop="tel" label="手机">
+                    </el-table-column>
+                    <el-table-column prop="delegationStr" label="关联团组">
+                        <template slot-scope="Str">
+                            <div :title="Str.row.delegationStr" class="title">{{ Str.row.delegationStr }}</div>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="createUserName" label="录入者">
+                    </el-table-column>
+                    <el-table-column prop="createTime" label="录入时间">
+                    </el-table-column>
+                    <el-table-column label="操作">
+                        <template slot-scope="scope">
+                            <el-button size="mini" @click="upDate(scope.$index, scope.row)">编辑</el-button>
+                            <el-button size="mini" type="danger" @click="del(scope.$index, scope.row)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </template>
+            <div class="block">
+                <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[10, 12, 15, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next" :total="tableDatas.length">
+                </el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            loading: false,
+            tableData: [],
+            tableDatas: [],
+            currentPage: 1, // 当前页码
+            pageSize: 8,// 每页的数据条数
+            dataCount: 0,//总条数
+            Country: "",
+            restaurantsCountry: [],
+            UnitName: "",
+            restaurantsUnitName: [],
+            Contact: "",
+            restaurantContact: [],
+            Delegation: "",
+            restaurantDelegation: [],
+            Field: "",
+            restaurantField: [],
+            CreateUserId: "",
+            CreateUserList: [],
+            InviteTime: "",
+            StartCreateTime: "",
+            EndCreateTime: "",
+            input: '',
+            token: '',
+            pickerOptions: {
+                shortcuts: [{
+                    text: '最近一周',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近一个月',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }, {
+                    text: '最近三个月',
+                    onClick(picker) {
+                        const end = new Date();
+                        const start = new Date();
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+                        picker.$emit('pick', [start, end]);
+                    }
+                }]
+            },
+        }
+    },
+    methods: {
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
+            this.currentPage = 1;
+            this.pageSize = val;
+        },
+        //当前页改变时触发 跳转其他页
+        handleCurrentChange(val) {
+            this.currentPage = val;
+        },
+
+        //国家搜索框处理
+        querySearchCountry(queryString, cb) {
+            //数据去重处理
+            var arr = this.restaurantsCountry;
+            for (var i = 0; i < arr.length - 1; i++) {
+                for (var j = i + 1; j < arr.length; j++) {
+                    if (arr[i].value == arr[j].value) {
+                        arr.splice(j, 1);
+                        //因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j--
+                        j--;
+                    }
+                }
+            }
+            var restaurantsCountry = arr;
+            var results = queryString ? restaurantsCountry.filter(this.createFilter(queryString)) : restaurantsCountry;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+        },
+        //邀请方搜索框处理
+        querySearchUnitName(queryString, cb) {
+            var arr = this.restaurantsUnitName;
+            for (var i = 0; i < arr.length - 1; i++) {
+                for (var j = i + 1; j < arr.length; j++) {
+                    if (arr[i].value == arr[j].value) {
+                        arr.splice(j, 1);
+                        //因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j--
+                        j--;
+                    }
+                }
+            }
+            var restaurantsUnitName = arr;
+            var results = queryString ? restaurantsUnitName.filter(this.createFilter(queryString)) : restaurantsUnitName;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+        },
+        //联系人搜索框处理
+        querySearchContact(queryString, cb) {
+            var arr = this.restaurantContact;
+            for (var i = 0; i < arr.length - 1; i++) {
+                for (var j = i + 1; j < arr.length; j++) {
+                    if (arr[i].value == arr[j].value) {
+                        arr.splice(j, 1);
+                        //因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j--
+                        j--;
+                    }
+                }
+            }
+            var restaurantContact = arr;
+            var results = queryString ? restaurantContact.filter(this.createFilter(queryString)) : restaurantContact;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+        },
+        //领域搜索框处理
+        querySearchField(queryString, cb) {
+            var arr = this.restaurantField;
+            for (var i = 0; i < arr.length - 1; i++) {
+                for (var j = i + 1; j < arr.length; j++) {
+                    if (arr[i].value == arr[j].value) {
+                        arr.splice(j, 1);
+                        //因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j--
+                        j--;
+                    }
+                }
+            }
+            var restaurantField = arr;
+            var results = queryString ? restaurantField.filter(this.createFilter(queryString)) : restaurantField;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+        },
+        createFilter(queryString) {
+            return (restaurant) => {
+                return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+            };
+        },
+
+        QueryData() {
+            this.QueryInvitationOfficialActivityData()
+        },
+        QueryInvitationOfficialActivityData() {
+            debugger
+            console.log(this.Delegation)
+            var CreateUser = 0;
+            if (this.CreateUserId == "" || this.CreateUserId == undefined || this.CreateUserId == null) {
+                CreateUser = 0
+            } else {
+                CreateUser = this.CreateUserId
+            }
+            if (this.InviteTime != "" && this.InviteTime != undefined && this.InviteTime != null) {
+                this.StartCreateTime = this.InviteTime[0]
+                this.EndCreateTime = this.InviteTime[1]
+            } else {
+                this.StartCreateTime = ""
+                this.EndCreateTime = ""
+            }
+            this.loading = true
+            var url = "/api/Resource/QueryInvitationOfficialActivityData"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    portType: 1,
+                    pageIndex: 0,
+                    pageSize: 0,
+                    Country: that.Country,
+                    UnitName: that.UnitName,
+                    Contact: that.Contact,
+                    Delegation: that.Delegation.toString(),
+                    Field: that.Field,
+                    CreateUserId: CreateUser,
+                    StartCreateTime: that.StartCreateTime,
+                    EndCreateTime: that.EndCreateTime
+                }
+            }).then(function (res) {
+                console.log(res)
+                if (res.data.code == 200) {
+                    that.tableData = res.data.data;
+                    //#region 国家输入推荐数据
+                    that.tableData.forEach(function (item, index) {
+                        that.restaurantsCountry.push({
+                            value: item.country,
+                        });
+                    });
+                    //#endregion
+                    //#region 邀请方输入推荐数据
+                    that.tableData.forEach(function (item, index) {
+                        that.restaurantsUnitName.push({
+                            value: item.unitName,
+                        });
+                    });
+                    //#endregion
+                    //#region 联系人输入推荐数据
+                    that.tableData.forEach(function (item, index) {
+                        that.restaurantContact.push({
+                            value: item.contact,
+                        });
+                    });
+                    //#endregion
+                    //#region 领域输入推荐数据
+                    that.tableData.forEach(function (item, index) {
+                        that.restaurantField.push({
+                            value: item.field,
+                        });
+                    });
+                    //#endregion
+                    that.tableDatas = that.tableData
+                    if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
+                        if (that.currentPage > 1) {
+                            that.currentPage = that.currentPage - 1;
+                        }
+                    }
+                    if (that.CreateUserId != 0 && that.CreateUserId != "") {
+                        that.dataCount = that.tableDatas.length
+                    }
+                } else {
+                    that.tableDatas = [];
+                }
+                that.loading = false
+            }).catch(function (error) {
+                that.loading = false
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        QueryCount() {
+            var CreateUser = 0;
+            if (this.CreateUserId == "" || this.CreateUserId == undefined || this.CreateUserId == null) {
+                CreateUser = 0
+            } else {
+                CreateUser = this.CreateUserId
+            }
+            if (this.InviteTime != "" && this.InviteTime != undefined && this.InviteTime != null) {
+                this.StartCreateTime = this.InviteTime[0]
+                this.EndCreateTime = this.InviteTime[1]
+            } else {
+                this.StartCreateTime = ""
+                this.EndCreateTime = ""
+            }
+            this.loading = true
+            var url = "/api/Resource/QueryInvitationOfficialActivityData"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    portType: 1,
+                    pageIndex: 0,
+                    pageSize: 0,
+                    Country: '',
+                    UnitName: '',
+                    Contact: '',
+                    Delegation: '',
+                    Field: '',
+                    CreateUserId: CreateUser,
+                    StartCreateTime: that.StartCreateTime,
+                    EndCreateTime: that.EndCreateTime
+                }
+            }).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) {
+                        if (that.currentPage > 1) {
+                            that.currentPage = that.currentPage - 1;
+                        }
+                    }
+                    if (that.CreateUserId != 0 && that.CreateUserId != "") {
+                        that.dataCount = that.tableDatas.length
+                    }
+                } else {
+                    that.tableDatas = [];
+                }
+                that.loading = false
+            }).catch(function (error) {
+                that.loading = false
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        //录入者数据
+        GetUserNameList() {
+            var url = "/api/System/GetUserNameList"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    PortType: 1
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.CreateUserList = res.data.data;
+
+                }
+            }).catch(function (error) {
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        //团组数据
+        GetGroupNameList() {
+
+            var url = "/api/Groups/GetGroupNameList"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    PortType: 1
+                }
+            }).then(function (res) {
+                console.log(res)
+                if (res.data.code == 200) {
+                    debugger
+                    that.restaurantDelegation = res.data.data;
+
+                }
+            }).catch(function (error) {
+                that.loading = false
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        del(index, row) {
+            this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                var url = "/api/Resource/DelInvitationOfficialActivity"
+                var that = this
+                this.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + this.token
+                    },
+                    data: {
+                        Id: row.id,
+                        DeleteUserId: this.userId
+                    }
+                }).then(function (res) {
+                    console.log(res)
+
+                    if (res.data.code == 200) {
+
+                        that.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        });
+                        that.QueryInvitationOfficialActivityData();
+                    } else {
+                        that.$message.error('删除失败!');
+                    }
+                    that.loading = false
+                }).catch(function (error) {
+                    that.loading = false
+                    that.$message.error("网络错误,请稍后重试");
+                });
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '操作已取消!'
+                });
+            });
+        },
+        upDate(index, row) {
+            this.$router.push({
+                path: "/home/OpInvitationOfficialActivityData",
+                query: { id: row.id }
+            })
+        },
+    },
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.QueryInvitationOfficialActivityData();
+        this.GetUserNameList();
+        this.GetGroupNameList();
+
+    }
+}
+</script>
+<style>
+.communal-list {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.communal-title {
+    display: flex;
+    font-size: 17px;
+    font-weight: 600;
+    color: #555;
+    margin-top: 8px;
+    margin-bottom: 10px;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.communal-box {
+    display: flex;
+}
+
+.communal-box>button {
+    margin-left: 10px;
+    padding: 8px 20px;
+}
+
+.title {
+    width: 80px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    cursor: pointer;
+}
+</style>

+ 1 - 24
src/components/Resource/LocalGuide.vue

@@ -140,36 +140,13 @@ export default {
             this.tableDatas = newarr;
             this.currentPage = 1;
         },
-        querySearch(queryString, cb) {
-            var arr = this.unitAreas;
-            for (var i = 0; i < arr.length - 1; i++) {
-                for (var j = i + 1; j < arr.length; j++) {
-                    if (arr[i].value == arr[j].value) {
-                        arr.splice(j, 1);
-                        //因为数组长度减小1,所以直接 j++ 会漏掉一个元素,所以要 j--
-                        j--;
-                    }
-                }
-            }
-            var restaurants = arr;
-            var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
-            // 调用 callback 返回建议列表的数据
-            cb(results);
-        },
-        createFilter(queryString) {
-            return (restaurant) => {
-                return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
-            };
-        },
+
         upDate(index, row) {
             this.$router.push({
                 path: "/home/LocalGuideOperation",
                 query: { id: row.id }
             })
         },
-        handleSelect(item) {
-            console.log(item);
-        },
         del(index, row) {
             this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
                 confirmButtonText: '确定',

+ 255 - 0
src/components/Resource/OfficialActivities.vue

@@ -0,0 +1,255 @@
+<template>
+    <div>
+        <div class="communal-list">
+            <div>
+                <div class="communal-title">
+                    <div>公务出访</div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 90%;">
+                        <el-select v-model="DiId" placeholder="团组选择" clearable filterable @change="delegationSelectChange">
+                            <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
+                                :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </div>
+                    <div>
+                        <router-link :to="{ path: '/home/OpOfficialActivities', query: { DiId } }">
+                            <el-button type="primary" style="margin-left: 10px;">新增</el-button>
+                        </router-link>
+                    </div>
+                </div>
+                <span style="font-weight: bold;">团队名称:</span>
+                {{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;
+                <span style="font-weight: bold;">客户:</span>
+                {{ delegationInfo.clientName }}&nbsp;&nbsp;&nbsp;
+                <span style="font-weight: bold;">出访国家:</span>
+                {{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;
+                <span style="font-weight: bold;">起止日期:</span>
+                {{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate }}&nbsp;&nbsp;&nbsp;
+                <span style="font-weight: bold;">天数/人数:</span>
+                {{ delegationInfo.visitDays }}天/{{ delegationInfo.visitPNumber }}人
+            </div>
+            <hr style='background-color:#5555; height:1px; border:none;' />
+            <template>
+                <el-table :data="tableDatas.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
+                    style="width: 100%" v-loading="loading" element-loading-text="拼命加载中...">
+                    <el-table-column prop="num" label="序 号" width="55">
+                        <template slot-scope="scope">
+                            {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="client" label="公务单位">
+                    </el-table-column>
+                    <el-table-column prop="date" label="公务时间">
+                    </el-table-column>
+                    <el-table-column prop="address" label="公务地址">
+                    </el-table-column>
+                    <el-table-column prop="contact" label="联系人">
+                    </el-table-column>
+                    <el-table-column prop="createUserName" label="记录者">
+                    </el-table-column>
+                    <el-table-column prop="createTime" label="记录时间">
+                    </el-table-column>
+                    <el-table-column label="操作" width="280">
+                        <template slot-scope="scope">
+                            <el-button size="mini" @click="upDate(scope.$index, scope.row)">编辑</el-button>
+                            <el-button size="mini" type="danger" @click="del(scope.$index, scope.row)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </template>
+            <div class="block">
+                <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[10, 12, 15, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next" :total="tableDatas.length">
+                </el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            loading: false,
+            tableDatas: [],
+            tableData: [],
+            currentPage: 1, // 当前页码
+            pageSize: 12,// 每页的数据条数
+            input: '',
+            token: '',
+            userId: 0,
+            DiId: '',
+            delegationInfoList: [],
+            delegationInfo: {},
+
+        }
+    },
+    methods: {
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
+            this.currentPage = 1;
+            this.pageSize = val;
+        },
+        //当前页改变时触发 跳转其他页
+        handleCurrentChange(val) {
+            this.currentPage = val;
+        },
+        //团组下拉框
+        GetGroupAllList() {
+            var url = "/api/Groups/GetGroupAllList"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.delegationInfoList = res.data.data;
+                    that.DiId = that.delegationInfoList[0].id;
+                    that.delegationInfo = that.delegationInfoList[0];
+                    that.QueryOfficialActivitiesByDiId()
+                }
+            }).catch(function (error) {
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        delegationSelectChange() {
+            for (let index = 0; index < this.delegationInfoList.length; index++) {
+                if (this.delegationInfoList[index].id == this.DiId) {
+                    this.delegationInfo = this.delegationInfoList[index];
+                    break;
+                }
+            }
+            this.QueryOfficialActivitiesByDiId();
+        },
+        //团组信息绑定
+        QueryOfficialActivitiesByDiId() {
+            var url = "/api/Resource/QueryOfficialActivitiesByDiId"
+            var that = this
+            debugger
+            if (that.DiId == "" && that.DiId == null && that.DiId == undefined) { that.DiId = 0 }
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    portType: 1,
+                    pageIndex: 0,
+                    pageSize: 0,
+                    diId: that.DiId
+                }
+            }).then(function (res) {
+                debugger
+                if (res.data.code == 200) {
+                    debugger
+                    that.tableDatas = res.data.data;
+                    that.tableData = that.tableDatas
+                    if (that.tableDatas.length != 0) {
+                        if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
+                            if (that.currentPage > 1) {
+                                that.currentPage = that.currentPage - 1;
+                            }
+                        }
+                    }
+                }
+            }).catch(function (error) {
+                //that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        upDate(index, row) {
+
+            this.$router.push({
+                path: "/home/OpOfficialActivities",
+                query: {
+                    DiId: this.DiId,
+                    id: row.id
+                }
+            })
+
+        },
+        del(index, row) {
+            this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                var url = "/api/Groups/DelDecreasePayments"
+                var that = this
+                this.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + this.token
+                    },
+                    data: {
+                        Id: row.id,
+                        DeleteUserId: this.userId
+                    }
+                }).then(function (res) {
+                    console.log(res)
+
+                    if (res.data.code == 200) {
+
+                        that.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        });
+                        that.DecreasePaymentsSelect();
+                    } else {
+                        that.$message.error('删除失败!');
+                    }
+                    that.loading = false
+                }).catch(function (error) {
+                    that.loading = false
+                    that.$message.error("网络错误,请稍后重试");
+                });
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '操作已取消!'
+                });
+            });
+        },
+    },
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.GetGroupAllList();
+        //this.AirTicketResList()
+    }
+}
+</script>
+<style>
+.communal-list {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.communal-title {
+    display: flex;
+    font-size: 17px;
+    font-weight: 600;
+    color: #555;
+    margin-top: 8px;
+    margin-bottom: 10px;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.communal-box {
+    display: flex;
+}
+
+.communal-box>button {
+    margin-left: 10px;
+    padding: 8px 20px;
+}
+</style>

+ 507 - 0
src/components/Resource/OpInvitationOfficialActivityData.vue

@@ -0,0 +1,507 @@
+<template>
+    <div class="car_add">
+        <div>
+            <div class="communal-title">
+                <div>{{ title }}</div>
+            </div>
+        </div>
+        <hr style='background-color:#5555; height:1px; border:none;' />
+        <div>
+            <el-form :model="OpInvitationOfficialActivityData" ref="OpInvitationOfficialActivityData"
+                :rules="OpInvitationOfficialActivityDataRules" label-width="100px" class="demo-ruleForm">
+                <div style="display:flex ;">
+                    <div style="width: 25%;">
+                        <el-form-item label="国家:" prop="country" label-width="160px">
+                            <el-input clearable placeholder="国家" v-model="OpInvitationOfficialActivityData.country">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="城市:" prop="city" label-width="160px">
+                            <el-input clearable placeholder="城市" v-model="OpInvitationOfficialActivityData.city">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="邀请方名称:" prop="unitName" label-width="160px">
+                            <el-input clearable placeholder="邀请方名称" v-model="OpInvitationOfficialActivityData.unitName">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="邀请方官网:" prop="unitWeb" label-width="160px">
+                            <el-input clearable placeholder="邀请方官网" v-model="OpInvitationOfficialActivityData.unitWeb">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display:flex ;">
+                    <div style="width: 25%;">
+                        <el-form-item label="涉及领域:" prop="field" label-width="160px">
+                            <el-input clearable placeholder="涉及领域" v-model="OpInvitationOfficialActivityData.field">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="邀请方地址:" prop="address" label-width="160px">
+                            <el-input clearable placeholder="邀请方地址" v-model="OpInvitationOfficialActivityData.address">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="邀请方信息:" prop="unitInfo" label-width="160px">
+                            <el-input clearable placeholder="邀请方信息" v-model="OpInvitationOfficialActivityData.unitInfo">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="联系人:" prop="contact" label-width="160px">
+                            <el-input clearable placeholder="联系人" v-model="OpInvitationOfficialActivityData.contact">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display:flex ;">
+                    <div style="width: 25%;">
+                        <el-form-item label="联系人职务:" prop="job" label-width="160px">
+                            <el-input clearable placeholder="联系人职务" v-model="OpInvitationOfficialActivityData.job">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="联系电话:" prop="tel" label-width="160px">
+                            <el-input clearable placeholder="联系电话" v-model="OpInvitationOfficialActivityData.tel">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="电子邮箱:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="电子邮箱" v-model="OpInvitationOfficialActivityData.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="微信:" prop="weChat" label-width="160px">
+                            <el-input clearable placeholder="微信" v-model="OpInvitationOfficialActivityData.weChat">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display:flex ;">
+                    <div style="width: 25%;">
+                        <el-form-item label="FaceBook:" prop="faceBook" label-width="160px">
+                            <el-input clearable placeholder="faceBook" v-model="OpInvitationOfficialActivityData.faceBook">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="Ins:" prop="ins" label-width="160px">
+                            <el-input clearable placeholder="ins" v-model="OpInvitationOfficialActivityData.ins">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="传真号码:" prop="fax" label-width="160px">
+                            <el-input clearable placeholder="传真号码" v-model="OpInvitationOfficialActivityData.fax">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="团组名称:" prop="delegation" label-width="160px">
+                            <el-select v-model="OpInvitationOfficialActivityData.delegation" clearable filterable multiple
+                                placeholder="团组名称">
+                                <el-option v-for="item in DelegationList" :key="item.id" :label="item.groupName"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display:flex ;">
+                    <div style="width: 50%;">
+                        <el-form-item label="邀请函文件(原版):" prop="fileUrl" label-width="160px">
+                            <div>
+                                {{ OpInvitationOfficialActivityData.filePath }} <el-link
+                                    @click="DownloadOdl">下载原版文件</el-link>
+                            </div>
+
+                        </el-form-item>
+                        <el-form-item label="邀请函文件(修改版):" prop="fileUrl" label-width="160px">
+                            <el-upload :file-list="uploadFiles" ref="upload" :on-success="upLoadSuccess"
+                                :on-error="upLoadError" :before-remove="beforeRemove" :on-change="onChange" :limit="1"
+                                :on-exceed="exceed" :action="uploadURL" :headers="headers" :auto-upload="false">
+                                <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+                                <!-- <el-button style="margin-left: 10px;" size="small" type="success"
+                                    @click="submitUpload">上传到服务器</el-button> -->
+                            </el-upload>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 50%;">
+                        <el-form-item label="其他信息:" prop="remark" label-width="160px">
+                            <el-input type="textarea" :rows="5" placeholder="其他信息"
+                                v-model="OpInvitationOfficialActivityData.remark"></el-input>
+                        </el-form-item>
+                    </div>
+
+                </div>
+                <el-form-item>
+                    <div style="margin-left: 60%;">
+                        <el-button type="primary" @click="addBtn">保存</el-button>
+                        <router-link to='/home/InvitationOfficialActivityData'>
+                            <el-button>取消</el-button>
+                        </router-link>
+                    </div>
+                </el-form-item>
+            </el-form>
+
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            title: "新增商邀资料",
+            token: '',
+            userId: 0,
+            OpInvitationByIdData: {},
+            OpInvitationOfficialActivityData: {
+                status: 0,
+                id: 0,
+                country: '',
+                city: '',
+                unitName: '',
+                unitWeb: '',
+                field: '',
+                address: '',
+                unitInfo: '',
+                contact: '',
+                job: '',
+                tel: '',
+                email: '',
+                weChat: '',
+                faceBook: '',
+                ins: '',
+                delegation: '',
+                filePath: '',
+                sndFilePath: '',
+                fax: '',
+                createUserId: 0,
+                remark: ''
+            },
+            OpInvitationOfficialActivityDataRules: {
+                country: [
+                    { required: true, message: '请输入国家', trigger: 'blur' },
+                    { required: true, message: '请输入国家', trigger: 'change' }
+                ],
+                city: [
+                    { required: true, message: '请输入城市', trigger: 'blur' },
+                    { required: true, message: '请输入城市', trigger: 'change' }
+                ],
+                unitName: [
+                    { required: true, message: '请输入邀请方名称', trigger: 'blur' },
+                    { required: true, message: '请输入邀请方名称', trigger: 'change' }
+                ],
+                field: [
+                    { required: true, message: '请输入涉及领域', trigger: 'blur' },
+                    { required: true, message: '请输入涉及领域', trigger: 'change' }
+                ],
+                address: [
+                    { required: true, message: '请输入邀请方地址', trigger: 'blur' },
+                    { required: true, message: '请输入邀请方地址', trigger: 'change' }
+                ],
+                contact: [
+                    { required: true, message: '请输入联系人', trigger: 'blur' },
+                    { required: true, message: '请输入联系人', trigger: 'change' }
+                ],
+                tel: [
+                    { required: true, message: '请输入联系方式', trigger: 'blur' },
+                    { required: true, message: '请输入联系方式', trigger: 'change' }
+                ],
+                delegation: [
+                    { required: true, message: '请输入费用金额', trigger: 'blur' },
+                    { required: true, message: '请输入费用金额', trigger: 'change' }
+                ],
+            },
+            DelegationList: [],
+            uploadFiles: [],//上传的文件列表
+            uploadURL: "http://132.232.92.186:8888/api/Groups/UploadProject",
+            headers: {
+                Authorization: JSON.parse(localStorage.getItem('userinif')).token,
+                TypeName: "B"
+            },
+            OldFile: '',
+            NewFile: '',
+            oldploadFiles: [{ name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' }],//旧版文件列表
+        }
+    },
+
+    methods: {
+        //团组数据
+        GetGroupNameList() {
+            var url = "/api/Groups/GetGroupNameList"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    PortType: 1
+                }
+            }).then(function (res) {
+                console.log(res)
+                if (res.data.code == 200) {
+                    that.DelegationList = res.data.data;
+                }
+            }).catch(function (error) {
+                that.loading = false
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        QueryInvitationOfficialActivityById() {
+            var url = "/api/Resource/QueryInvitationOfficialActivityById"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    Id: that.OpInvitationOfficialActivityData.id
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.OpInvitationOfficialActivityData.id = res.data.data.id
+                    that.OpInvitationOfficialActivityData.country = res.data.data.country
+                    that.OpInvitationOfficialActivityData.city = res.data.data.city
+                    that.OpInvitationOfficialActivityData.unitName = res.data.data.unitName
+                    that.OpInvitationOfficialActivityData.unitWeb = res.data.data.unitWeb
+                    that.OpInvitationOfficialActivityData.field = res.data.data.field
+                    that.OpInvitationOfficialActivityData.address = res.data.data.address
+                    that.OpInvitationOfficialActivityData.unitInfo = res.data.data.unitInfo
+                    that.OpInvitationOfficialActivityData.contact = res.data.data.contact
+                    that.OpInvitationOfficialActivityData.job = res.data.data.job
+                    that.OpInvitationOfficialActivityData.tel = res.data.data.tel
+                    that.OpInvitationOfficialActivityData.email = res.data.data.email
+                    that.OpInvitationOfficialActivityData.weChat = res.data.data.weChat
+                    that.OpInvitationOfficialActivityData.faceBook = res.data.data.faceBook
+                    that.OpInvitationOfficialActivityData.ins = res.data.data.ins
+                    var delList = res.data.data.delegation.split(',')
+                    var delegaLOist = [];
+                    delList.forEach(function (item, index) {
+                        delegaLOist.push(
+                            parseInt(item)
+                        )
+                    });
+                    that.OpInvitationOfficialActivityData.delegation = delegaLOist
+                    that.OpInvitationOfficialActivityData.filePath = res.data.data.filePath
+                    that.OpInvitationOfficialActivityData.sndFilePath = res.data.data.sndFilePath
+                    that.OpInvitationOfficialActivityData.fax = res.data.data.fax
+                    that.OpInvitationOfficialActivityData.createUserId = res.data.data.createUserId
+                    that.OpInvitationOfficialActivityData.remark = res.data.data.remark
+                    if (that.OpInvitationOfficialActivityData.filePath != null && that.OpInvitationOfficialActivityData.filePath != undefined && that.OpInvitationOfficialActivityData.filePath != "") {
+                        that.uploadFiles.push({
+                            name: that.OpInvitationOfficialActivityData.sndFilePath,
+                            url: 'http://132.232.92.186:24/Office/GrpFile/团组增减款项相关文件/',
+                        })
+                    }
+
+                }
+
+            })
+        },
+
+        //点击保存事件
+        addBtn() {
+            debugger
+
+            const that = this;
+            that.OpInvitationOfficialActivityData.createUserId = that.userId
+            var delegationStr = '';
+            that.OpInvitationOfficialActivityData.delegation.forEach(function (item, index) {
+                delegationStr += item + ','
+            });
+            that.OpInvitationOfficialActivityData.delegation = delegationStr.substring(0, delegationStr.length - 1)
+            that.$refs.OpInvitationOfficialActivityData.validate((valid) => {
+                if (valid) {
+                    debugger
+                    if (that.uploadFiles.length == 0 || that.uploadFiles[0].name == that.OpInvitationOfficialActivityData.sndFilePath) {
+                        var url = "/api/Resource/OpInvitationOfficialActivity"
+                        that.$axios({
+                            method: 'post',
+                            url: url,
+                            headers: {
+                                Authorization: 'Bearer ' + that.token
+                            },
+                            data: that.OpInvitationOfficialActivityData
+                        }).then(function (res) {
+                            debugger
+                            if (res.data.code == 200) {
+                                that.$message({
+                                    message: res.data.msg,
+                                    type: 'success'
+                                });
+                                that.loading = true;
+                                setTimeout(() => {
+                                    that.$router.push('/home/InvitationOfficialActivityData')
+                                }, 3000);
+                            } else {
+                                that.$message.error(res.data.msg);
+                            }
+                        })
+                    } else {
+                        that.$refs.upload.submit();//上传文件到服务器
+
+                    }
+                } else {
+                    this.$message.error('请完善信息在保存!');
+                    return false;
+                }
+            })
+        },
+        //上传
+        // 文件超出限制
+        exceed(files, fileList) {
+            this.$message.warning(
+                `当前限制选择 1个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
+                } 个文件,请取消要替换的文件`
+            );
+        },
+        //文件上传成功时的钩子
+        upLoadSuccess(response, file, fileList) {
+            debugger
+            if (response.code == 200) {
+                debugger
+                console.log("上传成功");
+                const that = this;
+                that.OpInvitationOfficialActivityData.filePath = that.OldFile;
+                that.OpInvitationOfficialActivityData.sndFilePath = response.data;
+                that.OpInvitationOfficialActivityData.createUserId = that.userId
+                var url = "/api/Resource/OpInvitationOfficialActivity"
+                that.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + that.token
+                    },
+                    data: that.OpInvitationOfficialActivityData
+                }).then(function (res) {
+                    if (res.data.code == 200) {
+                        that.$message({
+                            message: res.data.msg,
+                            type: 'success'
+                        });
+                        that.loading = true;
+                        setTimeout(() => {
+                            that.$router.push('/home/InvitationOfficialActivityData')
+                        }, 3000);
+                    } else {
+                        that.$message.error(res.data.msg);
+                    }
+                })
+            } else {
+                console.log("保存失败");
+            }
+        },
+        //文件上传失败时的钩子
+        upLoadError(response, file, fileList) {
+            console.log("项目添加失败");
+        },
+        //删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。
+        beforeRemove(file, fileList) {
+            this.uploadFiles = fileList;
+            this.OldFile = this.OpInvitationOfficialActivityData.filePath
+            this.NewFile = file.name
+        },
+        //文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用
+        onChange(file, fileList) {
+            this.uploadFiles = fileList
+            this.OldFile = this.OpInvitationOfficialActivityData.sndFilePath
+            this.OpInvitationOfficialActivityData.filePath = this.OldFile
+            this.NewFile = file.name
+        },
+        DownloadOdl() {
+            if (this.OpInvitationOfficialActivityData.filePath != "") {
+                window.location.href = "http://132.232.92.186:24/Office/GrpFile/商邀相关文件/" + this.OpInvitationOfficialActivityData.filePath
+            } else {
+                this.$message.error("暂未上传附件");
+            }
+        }
+    },
+
+    mounted() {
+
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.GetGroupNameList();
+        this.id = this.$route.query.id
+        if (this.id != null && this.id != undefined && this.id != 0) {
+            this.title = "修改团组增减款项费用";
+            this.OpInvitationOfficialActivityData.status = 2
+            this.OpInvitationOfficialActivityData.id = this.id
+            this.QueryInvitationOfficialActivityById();
+        } else {
+            this.OpInvitationOfficialActivityData.status = 1
+            this.title = "新增团组增减款项费用"
+        }
+    }
+}
+</script>
+<style>
+.communal-list {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.car_add .communal-title {
+    display: flex;
+    font-size: 17px;
+    font-weight: 600;
+    color: #555;
+    margin-bottom: 20px;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.appraise-box {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    margin: 50px 0;
+}
+
+.appraise-box>div {
+    width: 30%;
+}
+
+.communal-box {
+    display: flex;
+}
+
+.communal-box>button {
+    margin-left: 10px;
+    padding: 8px 20px;
+}
+
+.car_add {
+    background-color: #fff;
+    padding: 20px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+@media screen and (max-width: 1700px) {
+    .appraise-box>div {
+        width: 48%;
+    }
+
+    .appraise-box>div el-form-item__content {
+        width: 260px !important;
+    }
+}
+</style>

+ 343 - 0
src/components/Resource/OpOfficialActivities.vue

@@ -0,0 +1,343 @@
+<template>
+    <div class="car_add">
+        <div>
+            <div class="communal-title">
+                <div>{{ title }}</div>
+            </div>
+        </div>
+        <hr style='background-color:#5555; height:1px; border:none;' />
+        <div>
+            <el-form :model="delegationInfo" label-width="100px" class="demo-ruleForm">
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="团组名称:" label-width="160px">
+                            <el-select v-model="DiId" clearable filterable placeholder="团组选择" @change="DiIdChang"
+                                :disabled="isShow" style="width: 220px;">
+                                <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="团 号:" prop="tourCode" label-width="160px">
+                            <el-input placeholder="团号" v-model="delegationInfo.tourCode" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="客户:" prop="clientName" label-width="160px">
+                            <el-input placeholder="客户" v-model="delegationInfo.clientName" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="出访国家:" prop="visitCountry" label-width="160px">
+                            <el-input placeholder="出访国家" v-model="delegationInfo.visitCountry" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+            </el-form>
+            <el-form :model="OpOfficialActivitiesDto" ref="OpOfficialActivitiesDto" :rules="OpOfficialActivitiesRules"
+                label-width="100px" class="demo-ruleForm">
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="公务单位:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="公务单位" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="公务日期:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="公务日期" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="公务时刻:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="公务时刻" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="邀请方:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="电子邮箱" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+
+                    <div style="width: 25%;">
+                        <el-form-item label="公务方联系人职务:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="公务方联系人职务" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="公务方联系人:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="公务方联系人" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="联系方式:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="联系方式" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="公务形式:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="公务形式" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <div style="width: 25%;">
+                            <el-form-item label="公务地址:" prop="email" label-width="160px">
+                                <el-input clearable placeholder="公务地址" v-model="OpOfficialActivitiesDto.email">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                        <el-form-item label="公务方背景:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="公务方背景" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="参会人员:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="参会人员" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="着装要求:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="着装要求" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="需要翻译:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="需要翻译" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="翻译人员:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="翻译人员" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="翻译语种:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="翻译语种" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="暂定议程:" prop="email" label-width="160px">
+                            <el-input clearable placeholder="暂定议程" v-model="OpOfficialActivitiesDto.email">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <el-form-item>
+                    <div style="margin-left: 60%;">
+                        <el-button type="primary" @click="addBtn">保存</el-button>
+                        <router-link to='/home/OfficialActivities'>
+                            <el-button>取消</el-button>
+                        </router-link>
+                    </div>
+                </el-form-item>
+            </el-form>
+
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            title: "新增公务出访客户资料",
+            token: '',
+            userId: 0,
+            id: '',
+            DiId: '',
+            isShow: false,
+            delegationInfo: {},
+            delegationInfoList: [],//团组下拉框
+            headers: {
+                Authorization: JSON.parse(localStorage.getItem('userinif')).token,
+                TypeName: "A"
+            },
+            OpOfficialActivitiesDto: {
+                status: 0,
+                id: 0,
+                diid: "",
+                type: "",
+                client: "",
+                date: "",
+                time: "",
+                address: "",
+                contact: "",
+                job: "",
+                tel: "",
+                officialForm: 0,
+                setting: "",
+                dresscode: "",
+                attendees: "",
+                isNeedTrans: "",
+                translators: "",
+                language: "",
+                trip: "",
+                createUserId: 0,
+                remark: ""
+            },
+            OpOfficialActivitiesRules: {
+
+            },
+
+        }
+    },
+
+    methods: {
+        //团组下拉框
+        GetGroupAllList() {
+            var url = "/api/Groups/GetGroupAllList"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+            }).then(function (res) {
+                if (res.data.code == 200) {
+
+                    that.delegationInfoList = res.data.data;
+                }
+            }).catch(function (error) {
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+
+        DiIdChang() {
+            for (let index = 0; index < this.delegationInfoList.length; index++) {
+                if (this.delegationInfoList[index].id == parseInt(this.DiId)) {
+                    this.delegationInfo = this.delegationInfoList[index];
+                    break;
+                }
+            }
+        },
+        QueryOfficialActivitiesById() {
+            var url = "/api/Resource/QueryOfficialActivitiesById"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    Id: that.id,
+                    DiId: that.DiId,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+
+                }
+
+            })
+        },
+        addBtn() {
+            if (this.DiId == null && this.DiId == undefined && this.DiId == "") {
+                this.$message.error("请选择团组名称");
+                return;
+            }
+        }
+    },
+
+    mounted() {
+
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.GetGroupAllList();
+        this.id = this.$route.query.id
+        this.DiId = parseInt(this.$route.query.DiId)
+        if (this.DiId == null && this.DiId == undefined && this.DiId == 0) {
+            this.DiId = '';
+        }
+        if (this.id != null && this.id != undefined && this.id != 0) {
+            this.QueryOfficialActivitiesById();
+            this.title = "修改公务出访客户资料";
+            this.OpOfficialActivitiesDto.status = 2
+            this.isShow = true
+        } else {
+            this.OpOfficialActivitiesDto.status = 1
+            this.title = "新增公务出访客户资料"
+            this.isShow = false
+        }
+
+    }
+}
+</script>
+<style>
+.communal-list {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.car_add .communal-title {
+    display: flex;
+    font-size: 17px;
+    font-weight: 600;
+    color: #555;
+    margin-bottom: 20px;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.appraise-box {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    margin: 50px 0;
+}
+
+.appraise-box>div {
+    width: 30%;
+}
+
+.communal-box {
+    display: flex;
+}
+
+.communal-box>button {
+    margin-left: 10px;
+    padding: 8px 20px;
+}
+
+.car_add {
+    background-color: #fff;
+    padding: 20px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+@media screen and (max-width: 1700px) {
+    .appraise-box>div {
+        width: 48%;
+    }
+
+    .appraise-box>div el-form-item__content {
+        width: 260px !important;
+    }
+}
+</style>

File diff suppressed because it is too large
+ 547 - 501
src/components/home.vue


+ 3 - 3
src/main.js

@@ -13,14 +13,14 @@ import VueQuillEditor from 'vue-quill-editor'
 import 'quill/dist/quill.core.css'
 import 'quill/dist/quill.snow.css'
 import 'quill/dist/quill.bubble.css'
-  Vue.use(VueQuillEditor);
+Vue.use(VueQuillEditor);
 // import CKEditor from '@ckeditor/ckeditor5-vue2'
 // Vue.use( CKEditor );
 
 Vue.use(VueTypedJs)
 import axios from 'axios';
-axios.defaults.baseURL = 'http://132.232.92.186:8888';
-//axios.defaults.baseURL = 'http://localhost:5256/';
+//axios.defaults.baseURL = 'http://132.232.92.186:8888';
+axios.defaults.baseURL = 'http://localhost:5256/';
 import { Message } from "element-ui";
 
 import common from './assets/js/common'//全局

+ 37 - 1
src/router/index.js

@@ -60,6 +60,12 @@ import Richtext from '@/components/GPT/Richtext';
 import Currency from '@/components/Finance/Currency';
 import PaymentFiled from '@/components/Finance/PaymentFiled';
 import Collection from '@/components/Finance/Collection';
+import InvitationOfficialActivities from '@/components/OP/InvitationOfficialActivities'
+import OpInvitationOfficialActivities from '@/components/OP/OpInvitationOfficialActivities';
+import InvitationOfficialActivityData from '@/components/Resource/InvitationOfficialActivityData';
+import OpInvitationOfficialActivityData from '@/components/Resource/OpInvitationOfficialActivityData';
+import OfficialActivities from '@/components/Resource/OfficialActivities'
+import OpOfficialActivities from '@/components/Resource/OpOfficialActivities'
 
 Vue.use(Router)
 
@@ -347,7 +353,37 @@ export default new Router({
           path: '/home/Collection',
           name: 'Collection',
           component: Collection
-        }
+        },
+        {
+          path: '/home/InvitationOfficialActivities',
+          name: 'InvitationOfficialActivities',
+          component: InvitationOfficialActivities
+        },
+        {
+          path: '/home/OpInvitationOfficialActivities',
+          name: 'OpInvitationOfficialActivities',
+          component: OpInvitationOfficialActivities
+        },
+        {
+          path: '/home/InvitationOfficialActivityData',
+          name: 'InvitationOfficialActivityData',
+          component: InvitationOfficialActivityData
+        },
+        {
+          path: '/home/OpInvitationOfficialActivityData',
+          name: 'OpInvitationOfficialActivityData',
+          component: OpInvitationOfficialActivityData
+        },
+        {
+          path: '/home/OfficialActivities',
+          name: 'OfficialActivities',
+          component: OfficialActivities
+        },
+        {
+          path: '/home/OpOfficialActivities',
+          name: 'OpOfficialActivities',
+          component: OpOfficialActivities
+        },
       ]
     },
     {