Selaa lähdekoodia

新增团组英文资料

wangh 1 vuosi sitten
vanhempi
commit
bcbf852777

+ 224 - 0
src/components/OP/DelegationEnData.vue

@@ -0,0 +1,224 @@
+<template>
+    <div>
+        <div class="communal-list">
+            <div>
+                <div class="communal-title">
+                    <div>团长英文资料</div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 70%;display: flex;">
+                        <div style="width: 35%;">
+                            <el-input clearable placeholder="区域" v-model="Area">
+                            </el-input>
+                        </div>
+                        <div style="width: 35%; margin-left: 2%;">
+                            <el-input clearable placeholder="职位" v-model="job">
+                            </el-input>
+                        </div>
+                        <div style="width: 30%;margin-left: 5%;">
+                            <el-button type="primary" @click="QueryDelegationEnData">查询</el-button>
+                        </div>
+                    </div>
+                    <div style="width: 30%;text-align: right;">
+                        <router-link to="/home/OpDelegationEnData">
+                            <el-button type="primary" style="margin-left: 10px;">新增</el-button>
+                        </router-link>
+                    </div>
+                </div>
+            </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="area" label="区域">
+                    </el-table-column>
+                    <el-table-column prop="job" label="职务">
+                    </el-table-column>
+                    <el-table-column prop="jobEn" label="职务(英文)">
+                    </el-table-column>
+                    <el-table-column prop="delegationSetting" label="团组背景">
+                    </el-table-column>
+                    <el-table-column prop="delegationSettingEn" 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: '',
+            job: '',
+            Area: '',
+
+        }
+    },
+    methods: {
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
+            this.currentPage = 1;
+            this.pageSize = val;
+        },
+        //当前页改变时触发 跳转其他页
+        handleCurrentChange(val) {
+            this.currentPage = val;
+        },
+        //页面初始化
+        QueryDelegationEnData() {
+            var url = "/api/Groups/QueryDelegationEnData"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    Area: that.Area,
+                    job: that.job
+                }
+            }).then(function (res) {
+                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/OpDelegationEnData",
+                query: {
+                    id: row.id
+                }
+            })
+
+        },
+        del(index, row) {
+            this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                var url = "/api/Op/DelDelegationEnData"
+                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.QueryOfficialActivitiesByDiId();
+                    } else {
+                        that.$message.error('删除失败!');
+                    }
+                    that.loading = false
+                }).catch(function (error) {
+                    that.loading = false
+                    that.$message.error("网络错误,请稍后重试");
+                });
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '操作已取消!'
+                });
+            });
+        },
+        handleSelectionChange(val) {
+            console.log(val)
+        },
+    },
+
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.QueryDelegationEnData();
+        //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;
+}
+
+.title {
+    width: 90%;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    cursor: pointer;
+}
+</style>

+ 286 - 0
src/components/OP/OpDelegationEnData.vue

@@ -0,0 +1,286 @@
+<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="OpDelegationEnData" ref="OpDelegationEnData" :rules="OpDelegationEnDataRules"
+                label-width="100px" class="demo-ruleForm">
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="区域:" prop="area" label-width="160px">
+                            <el-input clearable placeholder="区域" v-model="OpDelegationEnData.area">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+
+                </div>
+
+                <div style="display: flex;">
+                    <div style="width: 40%;">
+                        <div>
+                            <el-form-item label="职务(中文):" prop="job" label-width="160px">
+                                <el-input clearable placeholder="职务(中文)" v-model="OpDelegationEnData.job">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                        <div>
+                            <el-form-item label="团组背景(中文):" prop="delegationSetting" label-width="160px">
+                                <el-input type="textarea" :rows="3" placeholder="团组背景(中文)"
+                                    v-model="OpDelegationEnData.delegationSetting"></el-input>
+                            </el-form-item>
+                        </div>
+                    </div>
+                    <div style="width: 20%;text-align: center;align-self:center;">
+                        <el-button type="primary" @click="translation">一键翻译</el-button>
+                    </div>
+                    <div style="width: 40%;">
+                        <div>
+                            <el-form-item label="职务(英文):" prop="jobEn" label-width="160px">
+                                <el-input clearable placeholder="职务(英文)" v-model="OpDelegationEnData.jobEn">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+
+                        <div>
+                            <el-form-item label="团组背景(英文):" prop="delegationSettingEn" label-width="160px">
+                                <el-input type="textarea" :rows="3" placeholder="团组背景(英文)"
+                                    v-model="OpDelegationEnData.delegationSettingEn"></el-input>
+                            </el-form-item>
+                        </div>
+                    </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>
+import { el } from '@fullcalendar/core/internal-common'
+export default {
+    data() {
+        return {
+            title: "新增请示资料",
+            token: '',
+            OpDelegationEnData: {
+                status: 0,
+                id: 0,
+                createUserId: 0,
+                remark: '',
+                area: '',
+                job: '',
+                jobEn: '',
+                delegationSetting: '',
+                delegationSettingEn: ''
+            },
+            OpDelegationEnDataRules: {
+                area: [
+                    { required: true, message: '该信息为必填信息', trigger: 'blur' },
+                    { required: true, message: '该信息为必填信息', trigger: 'change' },
+                ],
+                job: [
+                    { required: true, message: '该信息为必填信息', trigger: 'blur' },
+                    { required: true, message: '该信息为必填信息', trigger: 'change' },
+                ],
+                jobEn: [
+                    { required: true, message: '该信息为必填信息', trigger: 'blur' },
+                    { required: true, message: '该信息为必填信息', trigger: 'change' },
+                ],
+                delegationSetting: [
+                    { required: true, message: '该信息为必填信息', trigger: 'blur' },
+                    { required: true, message: '该信息为必填信息', trigger: 'change' },
+                ],
+                delegationSettingEn: [
+                    { required: true, message: '该信息为必填信息', trigger: 'blur' },
+                    { required: true, message: '该信息为必填信息', trigger: 'change' },
+                ],
+            },
+        }
+    },
+
+    methods: {
+
+        QueryDelegationEnDataById() {
+            var url = "/api/Groups/QueryDelegationEnDataById"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    Id: that.OpDelegationEnData.id,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    var dataList = res.data.data
+                    that.OpDelegationEnData.id = dataList.id
+                    that.OpDelegationEnData.area = dataList.area
+                    that.OpDelegationEnData.job = dataList.job
+                    that.OpDelegationEnData.jobEn = dataList.jobEn
+                    that.OpDelegationEnData.delegationSetting = dataList.delegationSetting
+                    that.OpDelegationEnData.delegationSettingEn = dataList.delegationSettingEn
+                }
+
+            })
+        },
+        translation() {
+            const loading = this.$loading({
+                lock: true,
+                text: '翻译中,请稍后...',
+                spinner: 'el-icon-loading',
+                background: 'rgba(0, 0, 0, 0.7)'
+            });
+            const that = this;
+            var url = "/api/SmallFun/GetTranslate"
+            that.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.token
+                },
+                data: {
+                    portType: 0,
+                    pageIndex: 0,
+                    pageSize: 0,
+                    from: "zh-CHS",
+                    to: "en",
+                    txt: "(" + that.OpDelegationEnData.job + ")" + that.OpDelegationEnData.delegationSetting
+                }
+            }).then(function (res) {
+
+                if (res.data.code == 200) {
+                    var TransStr = res.data.data.translation.split(') ');
+                    that.OpDelegationEnData.jobEn = TransStr[0].substring(1);
+                    that.OpDelegationEnData.delegationSettingEn = TransStr[1]
+                    loading.close();
+
+                } else {
+                    that.OpDelegationEnData.jobEn = "翻译失败,请自行翻译"
+                    that.OpDelegationEnData.delegationSettingEn = "翻译失败,请自行翻译"
+                    loading.close();
+                }
+            })
+        },
+        addBtn() {
+            const that = this;
+            if (isNaN(that.OpDelegationEnData.id)) {
+                that.OpDelegationEnData.id = 0
+            }
+            that.$refs.OpDelegationEnData.validate((valid) => {
+                if (valid) {
+                    var url = "/api/Groups/OpDelegationEnData"
+                    this.$axios({
+                        method: 'post',
+                        url: url,
+                        headers: {
+                            Authorization: 'Bearer ' + that.token
+                        },
+                        data: that.OpDelegationEnData
+                    }).then(function (res) {
+
+                        if (res.data.code == 200) {
+                            that.$message({
+                                message: res.data.msg,
+                                type: 'success'
+                            });
+                            setTimeout(() => {
+                                that.$router.push('/home/DelegationEnData')
+                            }, 3000);
+                            that.loading = true;
+                        } else {
+                            that.$message.error(res.data.msg);
+                        }
+                    })
+                } else {
+                    this.$message.error('请完善信息在保存!');
+                    return false;
+                }
+            })
+        },
+    },
+
+    mounted() {
+        debugger
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.OpDelegationEnData.createUserId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.OpDelegationEnData.id = parseInt(this.$route.query.id)
+        if (this.OpDelegationEnData.id != null && this.OpDelegationEnData.id != undefined && this.OpDelegationEnData.id != 0 && !isNaN(this.OpDelegationEnData.id)) {
+            this.QueryDelegationEnDataById();
+            this.title = "修改请示资料";
+            this.OpDelegationEnData.status = 2
+        } else {
+            this.OpDelegationEnData.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>

+ 16 - 2
src/components/OP/visaEdit.vue

@@ -23,6 +23,9 @@
                         <el-form-item label="曾用姓名:" prop="oldName">
                             <el-input v-model="deleClient.oldName"></el-input>
                         </el-form-item>
+                        <el-form-item label="拼音:" prop="pinyin">
+                            <el-input v-model="deleClient.pinyin"></el-input>
+                        </el-form-item>
                         <el-form-item label="移动电话:" prop="phone">
                             <el-input v-model="deleClient.phone" placeholder="请输入11位手机号"></el-input>
                         </el-form-item>
@@ -733,6 +736,9 @@ export default {
                     { required: true, message: '请输入名', trigger: 'blur' },
                     { min: 1, max: 3, message: '长度在 1 到 3 个字符', trigger: 'change' }
                 ],
+                pinyin: [
+                    { required: true, message: '请输入英文名或拼音', trigger: 'blur' },
+                ],
                 oldName: [{ required: true, message: '请输入曾用名,没有则填写无', trigger: 'blur' },],
                 phone: [
                     { required: true, message: '请输入移动电话', trigger: 'change' },
@@ -808,6 +814,7 @@ export default {
             userId: 0,
             Status: 0,
             typeStr: '',
+            DiId: '',
             TypeVisible: false,
             OperationData: {
                 status: 0,
@@ -822,6 +829,7 @@ export default {
             //基础信息
             deleClient: {
                 id: 0,
+                diId: 0,
                 lastName: '',
                 firstName: '',
                 oldName: '',
@@ -1037,7 +1045,7 @@ export default {
                     Authorization: 'Bearer ' + this.token
                 },
                 data: {
-                    Id: this.Id,
+                    Id: that.Id,
                 }
             }).then(function (res) {
                 console.log(res)
@@ -1170,6 +1178,12 @@ export default {
             });
         },
         submitForm() {
+            debugger
+
+            this.deleClient.diId = parseInt(this.DiId)
+            if (isNaN(this.deleClient.diId)) {
+                this.deleClient.diId = 0
+            }
             this.$refs.deleClient.validate((valid) => {
                 if (valid) {
                     var that = this
@@ -1460,13 +1474,13 @@ export default {
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.Id = this.$route.query.id
+        this.DiId = this.$route.query.DiId
         if (this.Id == 0 || this.Id == undefined) {
             this.Status = 1;
             this.Id = 0;
             this.typeStr = "添加客户信息"
         } else {
             this.CustomerInfo();
-
             this.typeStr = "修改客户信息"
             this.Status = 2
         }

+ 197 - 231
src/components/OP/visaform.vue

@@ -3,11 +3,7 @@
         <div class="search-ul">
             <div class="search-li">
                 <el-select @change="changeOption()" v-model="gnamevalue" filterable placeholder="请输入团组名称">
-                    <el-option
-                    v-for="item in gnameoption"
-                    :key="item.id"
-                    :label="item.groupName"
-                    :value="item.id">
+                    <el-option v-for="item in gnameoption" :key="item.id" :label="item.groupName" :value="item.id">
                     </el-option>
                 </el-select>
             </div>
@@ -15,27 +11,22 @@
                 <div class="country-box">
                     <label>签证表国别: </label>
                     <el-select v-model="groupvalues" filterable placeholder="请选择">
-                        <el-option
-                        v-for="item in optionsgroup"
-                        :key="item.id"
-                        :label="item.name"
-                        :value="item.id">
+                        <el-option v-for="item in optionsgroup" :key="item.id" :label="item.name" :value="item.id">
                         </el-option>
                     </el-select>
                 </div>
                 <div class="interpret-box">
                     <label>翻译语种: </label>
                     <el-select v-model="value" filterable placeholder="请选择">
-                        <el-option
-                        v-for="item in options"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
+                        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                         </el-option>
                     </el-select>
                 </div>
-                <el-button type="primary">新增数据</el-button>
-                <el-button type="primary">新增简单数据</el-button>
+
+                <router-link :to="{ path: '/home/visaEdit', query: { DiId: gnamevalue } }">
+                    <el-button type="primary">新增数据</el-button>
+                </router-link>
+                <el-button type="primary" style="margin-left: 5px;">新增简单数据</el-button>
             </div>
         </div>
         <el-row>
@@ -46,51 +37,30 @@
             <el-button type="primary">照 会</el-button>
             <el-button type="primary">印度名单表</el-button>
             <el-button type="primary">马来西亚名单表</el-button>
-          </el-row>
+        </el-row>
         <div class="form-box">
             <template>
-                <el-table
-                :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)"
-                border
-                style="width: 100%">
-                    <el-table-column
-                        label="序 号"
-                        width="55">
+                <el-table :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
+                    style="width: 100%">
+                    <el-table-column label="序 号" width="55">
                         <template slot-scope="scope">
-                            {{(currentPage - 1) * pageSize + scope.$index + 1}}
+                            {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
                         </template>
                     </el-table-column>
-                    <el-table-column
-                        prop="clientName"
-                        width="200"
-                        label="姓 名">
+                    <el-table-column prop="clientName" width="200" label="姓 名">
                     </el-table-column>
-                    <el-table-column
-                        prop="tel"
-                        label="手 机"
-                        width="220">
+                    <el-table-column prop="tel" label="手 机" width="220">
                     </el-table-column>
-                    <el-table-column
-                        prop="cerdNo"
-                        label="身份证"
-                        width="200">
+                    <el-table-column prop="cerdNo" label="身份证" width="200">
                     </el-table-column>
-                    <el-table-column
-                        prop="ext"
-                        label="签证表"
-                        width="100">
+                    <el-table-column prop="ext" label="签证表" width="100">
                         <el-link type="primary">导 出</el-link>
                     </el-table-column>
-                    <el-table-column
-                        prop="phone"
-                        label="派遣函"
-                        width="200">
+                    <el-table-column prop="phone" label="派遣函" width="200">
                         <el-link type="primary">市外办</el-link>
                         <el-link type="primary">省外办</el-link>
                     </el-table-column>
-                    <el-table-column
-                        prop="urgentPhone"
-                        label="操 作">
+                    <el-table-column prop="urgentPhone" label="操 作">
                         <el-link type="primary">检索资料</el-link>
                         <el-link type="primary">美加表</el-link>
                         <el-link type="primary">非美加表</el-link>
@@ -99,14 +69,9 @@
                 </el-table>
             </template>
             <div class="block">
-                <el-pagination align='center' 
-                    @size-change="handleSizeChange" 
-                    @current-change="handleCurrentChange"
-                    :current-page="currentPage" 
-                    :page-sizes="[5,10,15,20]" 
-                    :page-size="pageSize" 
-                    layout="total, sizes, prev, pager, next" 
-                    :total="tableData.length">
+                <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[5, 10, 15, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next" :total="tableData.length">
                 </el-pagination>
             </div>
         </div>
@@ -114,73 +79,47 @@
             <div class="visas-title">
                 <div>历史用户信息处</div>
                 <div class="visas-box">
-                    <el-input
-                        @input="clickUsers()"
-                        placeholder="请输入内容"
-                        v-model="input"
-                        clearable>
+                    <el-input @input="clickUsers()" placeholder="请输入内容" v-model="input" clearable>
                     </el-input>
                     <el-button @click="Inquireclick()" type="primary">勾选项入团</el-button>
                 </div>
             </div>
             <template>
-                <el-table
-                :data="externalDatas.slice((currentPageUser-1)*pageSizeUser,currentPageUser*pageSizeUser)"
-                border
-                tooltip-effect="dark"
-                ref="multipleTable"
-                :row-key="getRowKeys"
-                @selection-change="handleSelectionChange"
-                style="width: 100%">
-                    <el-table-column
-                    :reserve-selection="true"
-                    type="selection"
-                    width="55">
+                <el-table :data="externalDatas.slice((currentPageUser - 1) * pageSizeUser, currentPageUser * pageSizeUser)"
+                    border tooltip-effect="dark" ref="multipleTable" :row-key="getRowKeys"
+                    @selection-change="handleSelectionChange" style="width: 100%">
+                    <el-table-column :reserve-selection="true" type="selection" width="55">
                     </el-table-column>
-                    <el-table-column
-                        label="序 号"
-                        width="55">
+                    <el-table-column label="序 号" width="55">
                         <template slot-scope="scope">
-                            {{(currentPage - 1) * pageSize + scope.$index + 1}}
+                            {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
                         </template>
                     </el-table-column>
-                    <el-table-column
-                        width="100" 
-                        prop="clientName"
-                        label="姓 名">
+                    <el-table-column width="100" prop="clientName" label="姓 名">
                     </el-table-column>
-                    <el-table-column
-                        prop="landlinePhone"
-                        label="手 机"
-                        width="180">
+                    <el-table-column prop="landlinePhone" label="手 机" width="180">
                     </el-table-column>
                     <!-- <el-table-column
                         prop="companyName"
                         label="地 址"
                         width="180">
                     </el-table-column> -->
-                    <el-table-column
-                        prop="idNo"
-                        label="身份证"
-                        width="250">
+                    <el-table-column prop="idNo" label="身份证" width="250">
                     </el-table-column>
-                    <el-table-column
-                        prop="urgentPhone"
-                        label="操 作">
-                        <el-link type="primary">增加入此团</el-link>
-                        <el-link type="danger">删除</el-link>
+                    <el-table-column label="操 作">
+                        <template slot-scope="scope">
+                            <el-link type="primary">增加入此团</el-link>
+                            <el-link type="primary" @click="upDate(scope.$index, scope.row)">编辑</el-link>
+                            <el-link type="danger">删除</el-link>
+                        </template>
+
                     </el-table-column>
                 </el-table>
             </template>
             <div class="block">
-                <el-pagination align='center' 
-                    @size-change="handleSizeChanges" 
-                    @current-change="handleCurrentChanges"
-                    :current-page="currentPageUser" 
-                    :page-sizes="[5,10,15,20]" 
-                    :page-size="pageSizeUser" 
-                    layout="total, sizes, prev, pager, next" 
-                    :total="externalDatas.length">
+                <el-pagination align='center' @size-change="handleSizeChanges" @current-change="handleCurrentChanges"
+                    :current-page="currentPageUser" :page-sizes="[5, 10, 15, 20]" :page-size="pageSizeUser"
+                    layout="total, sizes, prev, pager, next" :total="externalDatas.length">
                 </el-pagination>
             </div>
         </div>
@@ -192,33 +131,33 @@ export default {
     data() {
         return {
             input: '',
-            gnameoption:[],
-            gnamevalue:'',
-            externalData:[],
-            externalDatas:[],
-            optionsgroup:[],
+            gnameoption: [],
+            gnamevalue: '',
+            externalData: [],
+            externalDatas: [],
+            optionsgroup: [],
             options: [
                 {
                     value: '0',
                     label: '中文'
-                }, 
+                },
                 {
                     value: '1',
                     label: '英语'
                 }
             ],
-            groupvalues:'',
+            groupvalues: '',
             value: '0',
             tableData: [],
             currentPage: 1, // 当前页码
-            pageSize: 5 ,// 每页的数据条数
+            pageSize: 5,// 每页的数据条数
             currentPageUser: 1, // 当前页码
-            pageSizeUser: 5 ,// 每页的数据条数
-            multipleTable:[],
-            token:''
+            pageSizeUser: 5,// 每页的数据条数
+            multipleTable: [],
+            token: ''
         }
     },
-    methods:{
+    methods: {
         //每页条数改变时触发 选择一页显示多少行
         handleSizeChange(val) {
             this.currentPage = 1;
@@ -244,71 +183,71 @@ export default {
         getRowKeys(row) {
             return row.num
         },
-        getgroupsname(){
-            var url="/api/Groups/GetGroupNameAndVisaNationality"
-            var that=this
+        getgroupsname() {
+            var url = "/api/Groups/GetGroupNameAndVisaNationality"
+            var that = this
             this.$axios({
                 method: 'post',
-                url:url,
-                headers:{
-                    Authorization:'Bearer '+this.token
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
                 },
-                data:{
+                data: {
                     portType: 1,
                 }
-            }).then(function(res){
+            }).then(function (res) {
                 console.log(res)
-                if(res.data.code==200){
-                    that.gnameoption=res.data.data.groupNameData;
-                    that.gnamevalue=that.gnameoption[0].id;
-                    that.optionsgroup=res.data.data.visaNationalityData;
-                    that.groupvalues=that.optionsgroup[0].id;
+                if (res.data.code == 200) {
+                    that.gnameoption = res.data.data.groupNameData;
+                    that.gnamevalue = that.gnameoption[0].id;
+                    that.optionsgroup = res.data.data.visaNationalityData;
+                    that.groupvalues = that.optionsgroup[0].id;
                 }
                 that.getCrm()
             })
         },
-        getCrm(){
-            this.tableData=[];
-            var url="/api/Groups/GetCrmByGroupId"
-            var that=this
+        getCrm() {
+            this.tableData = [];
+            var url = "/api/Groups/GetCrmByGroupId"
+            var that = this
             this.$axios({
                 method: 'post',
-                url:url,
-                headers:{
-                    Authorization:'Bearer '+this.token
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
                 },
-                data:{
+                data: {
                     portType: 1,
-                    groupId:that.gnamevalue
+                    groupId: that.gnamevalue
                 }
-            }).then(function(res){
+            }).then(function (res) {
                 console.log(res)
-                if(res.data.code==200){
-                   that.tableData=res.data.data;
+                if (res.data.code == 200) {
+                    that.tableData = res.data.data;
                 }
             })
         },
-        changeOption(){
+        changeOption() {
             console.log(this.gnamevalue)
             this.getCrm()
         },
-        getExternalusers(){
-            var url="/api/CRM/GetClientList"
-            var that=this
+        getExternalusers() {
+            var url = "/api/CRM/GetClientList"
+            var that = this
             this.$axios({
                 method: 'post',
-                url:url,
-                headers:{
-                    Authorization:'Bearer '+this.token
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
                 },
-                data:{
+                data: {
                     portType: 1,
                 }
-            }).then(function(res){
+            }).then(function (res) {
                 console.log(res)
-                if(res.data.code==200){
-                   that.externalData=res.data.data;
-                   that.externalDatas = that.externalData;
+                if (res.data.code == 200) {
+                    that.externalData = res.data.data;
+                    that.externalDatas = that.externalData;
                 }
             })
         },
@@ -335,90 +274,117 @@ export default {
             this.externalDatas = newarr;
             this.currentPageUser = 1;
         },
+        upDate(index, row) {
+
+            this.$router.push({
+                path: "/home/visaEdit",
+                query: {
+                    DiId: this.gnamevalue,
+                    id: row.id
+                }
+            })
+        }
     },
-    mounted(){
-        this.token=JSON.parse(localStorage.getItem('userinif')).token;
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.getgroupsname();
         this.getExternalusers();
     }
 }
 </script>
 <style>
-    .visa-box{
-        background-color: #fff;
-        padding: 10px;
-        box-shadow: 0 0 5px #0005;
-        border-radius: 10px;
-    }
-    .search-li:nth-child(1){
-        width: 20%;
-    }
-    .search-li:nth-child(1) .el-select{
-        width: 100%;
-        margin: 0;
-    }
-    .search-li:nth-child(2){
-        width: 80%;
-        justify-content: end;
-    }
-    .search-ul{
-        display: flex;
-        justify-content: space-between;
-        margin-bottom: 10px;
-    }
-    .search-li label{
-        color: #606266;
-    }
-    .search-li{
-        display: flex;
-    }
-    .search-li>div{
-        margin-right: 10px;
-    }
-    .form-box .el-table th.el-table__cell>.cell{
-        text-align: center;
-    }
-    .form-box .el-table td.el-table__cell div{
-        text-align: center;
-    }
-    .form-box .block{
-        margin-top: 10px;
-    }
-    .visa-box .el-row{
-        text-align: right;
-        margin-bottom: 5px;
-    }
-    .visas-list{
-        background-color: #fff;
-        padding: 10px;
-        box-shadow: 0 0 5px #0005;
-        border-radius: 10px;
-    }
-    .visas-title{
-        display: flex;
-        font-size: 17px;
-        font-weight:600 ;
-        color: #555;
-        margin-top: 8px;
-        margin-bottom: 2px;
-        justify-content: space-between;
-        align-items: center;
-    }
-    .visas-box{
-        display: flex;
-    }
-    .visas-box>button{
-        margin-left: 10px;
-        padding: 8px 20px;
-    }
-    .country-box{
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-    }
-    .interpret-box{
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-    }
+.visa-box {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.search-li:nth-child(1) {
+    width: 20%;
+}
+
+.search-li:nth-child(1) .el-select {
+    width: 100%;
+    margin: 0;
+}
+
+.search-li:nth-child(2) {
+    width: 80%;
+    justify-content: end;
+}
+
+.search-ul {
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 10px;
+}
+
+.search-li label {
+    color: #606266;
+}
+
+.search-li {
+    display: flex;
+}
+
+.search-li>div {
+    margin-right: 10px;
+}
+
+.form-box .el-table th.el-table__cell>.cell {
+    text-align: center;
+}
+
+.form-box .el-table td.el-table__cell div {
+    text-align: center;
+}
+
+.form-box .block {
+    margin-top: 10px;
+}
+
+.visa-box .el-row {
+    text-align: right;
+    margin-bottom: 5px;
+}
+
+.visas-list {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.visas-title {
+    display: flex;
+    font-size: 17px;
+    font-weight: 600;
+    color: #555;
+    margin-top: 8px;
+    margin-bottom: 2px;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.visas-box {
+    display: flex;
+}
+
+.visas-box>button {
+    margin-left: 10px;
+    padding: 8px 20px;
+}
+
+.country-box {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.interpret-box {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
 </style>

+ 171 - 0
src/components/Resource/invitationLetter.vue

@@ -0,0 +1,171 @@
+<template>
+    <div>
+        <div class="communal-list">
+            <div class="communal-title">
+                <div>导出邀请函</div>
+            </div>
+            <div>
+                <el-select @change="changeOption()" v-model="DiId" filterable placeholder="请输入团组名称" style="width: 20%;">
+                    <el-option v-for="item in delegations" :key="item.id" :label="item.teamName" :value="item.id">
+                    </el-option>
+                </el-select>
+                <el-button type="primary" style="margin-left: 10px;" @click="btn">导出</el-button>
+            </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="city" label="所在城市" width="150">
+                    </el-table-column>
+                    <el-table-column prop="name" label="酒店名称" width="300">
+                    </el-table-column>
+                    <el-table-column prop="tel" label="酒店电话" width="200">
+                    </el-table-column>
+                    <el-table-column prop="fax" label="酒店传真" width="180">
+                    </el-table-column>
+                    <el-table-column prop="contact" label="联系人" width="180">
+                    </el-table-column>
+                    <el-table-column prop="contactPhone" label="联系电话" width="200">
+                    </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,
+            tableDatas: [],
+            tableData: [],
+            delegations: [],
+            currentPage: 1, // 当前页码
+            pageSize: 12,// 每页的数据条数
+            DiId: 0,
+            input: '',
+            token: '',
+            userId: 0
+        }
+    },
+    methods: {
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
+            this.currentPage = 1;
+            this.pageSize = val;
+        },
+        //当前页改变时触发 跳转其他页
+        handleCurrentChange(val) {
+            this.currentPage = val;
+        },
+        changeOption() {
+            this.QueryinvitationLetter();
+        },
+        QueryinvitationLetter() {
+            var url = "/api/Groups/QueryinvitationLetter"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    DiId: that.DiId
+                }
+            }).then(function (res) {
+                console.log(res)
+
+                if (res.data.code == 200) {
+                    debugger
+                    that.tableData = res.data.data.deleClient;
+                    that.tableDatas = that.tableData;
+                    that.delegations = res.data.data.delegations
+                    that.DiId = that.delegations[0].id
+                    if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
+                        if (that.currentPage > 1) {
+                            that.currentPage = that.currentPage - 1;
+                        }
+                    }
+                }
+                that.loading = false
+            }).catch(function (error) {
+                that.loading = false
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        btn() {
+            var url = "/api/Groups/invitationLetter"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    DiId: that.DiId
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    window.location.href = res.data.data
+                } else {
+                    that.$message.error(res.data.msg);
+                }
+
+            }).catch(function (error) {
+                that.$message.error("网络错误,请稍后重试");
+            });
+        }
+    },
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.QueryinvitationLetter();
+    }
+}
+</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>

+ 2 - 2
src/main.js

@@ -19,8 +19,8 @@ Vue.use(VueQuillEditor);
 
 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'//全局

+ 18 - 0
src/router/index.js

@@ -68,6 +68,9 @@ import OfficialActivities from '@/components/Resource/OfficialActivities'
 import OpOfficialActivities from '@/components/Resource/OpOfficialActivities'
 import AskData from '@/components/Resource/AskData'
 import OpAskData from '@/components/Resource/OpAskData'
+import DelegationEnData from '@/components/OP/DelegationEnData'
+import OpDelegationEnData from '@/components/OP/OpDelegationEnData'
+import invitationLetter from '@/components/Resource/invitationLetter'
 Vue.use(Router)
 
 export default new Router({
@@ -394,6 +397,21 @@ export default new Router({
           path: '/home/OpAskData',
           name: 'OpAskData',
           component: OpAskData
+        },
+        {
+          path: '/home/DelegationEnData',
+          name: 'DelegationEnData',
+          component: DelegationEnData
+        },
+        {
+          path: '/home/OpDelegationEnData',
+          name: 'OpDelegationEnData',
+          component: OpDelegationEnData
+        },
+        {
+          path: '/home/invitationLetter',
+          name: 'invitationLetter',
+          component: invitationLetter
         }
       ]
     },