Selaa lähdekoodia

新增公出出访界面

wangh 1 vuosi sitten
vanhempi
commit
e404fb3287

+ 1 - 2
src/components/OP/DecreasePayments.vue

@@ -166,8 +166,7 @@ export default {
                     }
                 }
             }).catch(function (error) {
-
-                that.$message.error("网络错误,请稍后重试");
+                //that.$message.error("网络错误,请稍后重试");
             });
         },
         upDate(index, row) {

+ 4 - 1
src/components/OP/OpAirTicketRes.vue

@@ -549,7 +549,10 @@ export default {
             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 = [] //用来接受返回结果的数组

+ 4 - 0
src/components/OP/OpDecreasePayments.vue

@@ -263,6 +263,10 @@ export default {
             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) {

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

@@ -367,6 +367,10 @@ export default {
             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) {

+ 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>

+ 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>

+ 13 - 2
src/router/index.js

@@ -61,6 +61,8 @@ import InvitationOfficialActivities from '@/components/OP/InvitationOfficialActi
 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)
 
 export default new Router({
@@ -352,8 +354,17 @@ export default new Router({
           path: '/home/OpInvitationOfficialActivityData',
           name: 'OpInvitationOfficialActivityData',
           component: OpInvitationOfficialActivityData
-        }
-
+        },
+        {
+          path: '/home/OfficialActivities',
+          name: 'OfficialActivities',
+          component: OfficialActivities
+        },
+        {
+          path: '/home/OpOfficialActivities',
+          name: 'OpOfficialActivities',
+          component: OpOfficialActivities
+        },
       ]
     },
     {