Browse Source

编写签证资料的新增修改和删除,修改酒店、三字码查询接口传参

wangh 2 years ago
parent
commit
c3bf88526c

+ 243 - 0
src/components/Resource/CountryFeeCost.vue

@@ -0,0 +1,243 @@
+<template>
+    <div>
+        <div class="communal-list">
+            <div class="communal-title">
+                <div>签证费用</div>
+                <div class="communal-box">
+                    <el-input @input="Inquireclick()" placeholder="国家" v-model="input" clearable style="width: 350px;">
+                    </el-input>
+                    <router-link to="/home/CountryFeeCostOperation">
+                        <el-button type="primary" style="margin-left: 10px;">新增</el-button>
+                    </router-link>
+
+                </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="visaContinent" label="洲" width="80">
+                    </el-table-column>
+                    <el-table-column prop="visaCountry" label="国家" width="150">
+                    </el-table-column>
+                    <el-table-column prop="isVisaExemption" label="是否对美免签" width="50">
+                        <template slot-scope="is">
+                            <span v-if="is.row.isVisaExemption == 1">否</span>
+                            <span v-else>是</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="isVisaOnArrival" label="是否落地签" width="50">
+                        <template slot-scope="is">
+                            <span v-if="is.row.isVisaOnArrival == 1">否</span>
+                            <span v-else>是</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="isElectronicSignature" label="是否电子签" width="50">
+                        <template slot-scope="is">
+                            <span v-if="is.row.isElectronicSignature == 1">否</span>
+                            <span v-else>是</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="visaTime" label="一般签证时间(天)" width="50">
+                    </el-table-column>
+                    <el-table-column prop="visaPrice" label="费用" width="80">
+                    </el-table-column>
+                    <el-table-column prop="visaPriceDesc" label="费用描述" width="180">
+                        <template slot-scope="visaPriceDesc">
+                            <el-popover placement="top-start" title="费用描述" width="200" trigger="hover"
+                                :content="visaPriceDesc.row.visaPriceDesc">
+                                <el-button slot="reference">移上查看</el-button>
+                            </el-popover>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="urgentTime" label="加急签证时间" width="50">
+                    </el-table-column>
+                    <el-table-column prop="urgentPrice" label="加急费用" width="80">
+                    </el-table-column>
+                    <el-table-column prop="urgentPriceDesc" label="加急费用描述" width="180">
+                        <template slot-scope="urgentPriceDesc">
+                            <el-popover placement="top-start" title="加急费用描述" width="200" trigger="hover"
+                                :content="urgentPriceDesc.row.UrgentPrice">
+                                <el-button slot="reference">移上查看</el-button>
+                            </el-popover>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="remark" label="签证描述" width="180">
+                        <template slot-scope="remark">
+                            <el-popover placement="top-start" title="加急费用描述" width="200" trigger="hover"
+                                :content="remark.row.remark">
+                                <el-button slot="reference">移上查看</el-button>
+                            </el-popover>
+                        </template>
+                    </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: [],
+            currentPage: 1, // 当前页码
+            pageSize: 12,// 每页的数据条数
+            input: '',
+            token: '',
+            userId: 0
+        }
+    },
+    methods: {
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
+            this.currentPage = 1;
+            this.pageSize = val;
+        },
+        //当前页改变时触发 跳转其他页
+        handleCurrentChange(val) {
+            this.currentPage = val;
+        },
+        HotelData() {
+            this.loading = true
+            var url = "/api/Resource/QueryCountryFeeCost"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    portType: 1,
+                }
+            }).then(function (res) {
+                console.log(res)
+                debugger
+                if (res.data.code == 200) {
+                    debugger
+                    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;
+                        }
+                    }
+                }
+                that.loading = false
+            }).catch(function (error) {
+                that.loading = false
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        //搜索框处理
+        Inquireclick() {
+            var newarr = [];
+            if (this.input == "") {
+                newarr = this.tableData;
+            } else {
+                debugger
+                for (var i = 0; i < this.tableData.length; i++) {
+                    if (this.tableData[i].visaCountry.indexOf(this.input) != -1) {
+                        newarr.push(this.tableData[i]);
+                    }
+                }
+            }
+            debugger
+            this.tableDatas = newarr;
+            this.currentPage = 1;
+        },
+
+        upDate(index, row) {
+            this.$router.push({
+                path: "/home/CountryFeeCostOperation",
+                query: { id: row.id }
+            })
+        },
+
+        del(index, row) {
+            debugger
+            var url = "/api/Resource/DelCountryFeeCost"
+            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)
+                debugger
+                if (res.data.code == 200) {
+                    debugger
+                    that.$message({
+                        message: '删除成功',
+                        type: 'success'
+                    });
+                    that.HotelData();
+                } else {
+                    that.$message.error('删除失败!');
+                }
+                that.loading = false
+            }).catch(function (error) {
+                that.loading = false
+                that.$message.error("网络错误,请稍后重试");
+            });
+        }
+    },
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.HotelData();
+    }
+}
+</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>

+ 392 - 0
src/components/Resource/CountryFeeCostOperation.vue

@@ -0,0 +1,392 @@
+<template>
+    <div v-loading="loading" element-loading-text="跳转中..." class="car_add">
+        <div class="communal-title">
+            <div>签证费用资料</div>
+        </div>
+        <div>
+            <el-form :model="addData" :rules="rules" ref="addData" label-width="100px" class="demo-ruleForm">
+                <div style="display: flex;">
+                    <div style="width: 49%;">
+                        <el-form-item label="所在州" label-width="125px" prop="VisaContinent">
+                            <el-input placeholder="所在州" v-model="addData.VisaContinent">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 49%;">
+                        <el-form-item label="国家名称" label-width="125px" prop="VisaCountry">
+                            <el-input placeholder="国家名称" v-model="addData.VisaCountry">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 98%;">
+                        <el-form-item label="签证地址" label-width="125px" prop="VisaAddress">
+                            <el-input placeholder="签证地址" v-model="addData.VisaAddress">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="签证类型" label-width="125px">
+                            <el-select v-model="addData.VisaType" placeholder="请选择签证类型">
+                                <el-option key="暂无" label="暂无" value="暂无">
+                                </el-option>
+                                <el-option key="大公务" label="大公务" value="大公务">
+                                </el-option>
+                                <el-option key="小公务" label="小公务" value="小公务">
+                                </el-option>
+                                <el-option key="大小公务同时" label="大小公务同时" value="大小公务同时">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="是否免签" label-width="125px">
+                            <el-radio-group v-model="addData.IsVisaExemption">
+                                <el-radio :label="0">是</el-radio>
+                                <el-radio :label="1">否</el-radio>
+                            </el-radio-group>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="是否落地签" label-width="125px">
+                            <el-radio-group v-model="addData.IsVisaOnArrival">
+                                <el-radio :label="0">是</el-radio>
+                                <el-radio :label="1">否</el-radio>
+                            </el-radio-group>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="是否电子签" label-width="125px">
+                            <el-radio-group v-model="addData.IsElectronicSignature">
+                                <el-radio :label="0">是</el-radio>
+                                <el-radio :label="1">否</el-radio>
+                            </el-radio-group>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 49%;">
+                        <el-form-item label="普通签证时间" label-width="125px" prop="VisaTime">
+                            <el-input placeholder="普通签证时间" v-model="addData.VisaTime">
+                                <template slot="append">天</template>
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 49%;">
+                        <el-form-item label="签证费用" label-width="125px" prop="VisaPrice">
+                            <el-input placeholder="签证费用" v-model="addData.VisaPrice">
+                                <template slot="append">元</template>
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 98%;">
+                        <el-form-item label="签证价格描述" label-width="125px" prop="VisaPriceDesc">
+                            <el-input type="textarea" :rows="3" placeholder="签证价格描述"
+                                v-model="addData.VisaPriceDesc"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+
+                <div style="display: flex;">
+                    <div style="width: 49%;">
+                        <el-form-item label="加急签证时间" label-width="125px" prop="UrgentTime">
+                            <el-input placeholder="加急签证时间" v-model="addData.UrgentTime">
+                                <template slot="append">天</template>
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 49%;">
+                        <el-form-item label="加急签证费用" label-width="125px" prop="UrgentPrice">
+                            <el-input placeholder="加急签证费用" v-model="addData.UrgentPrice">
+                                <template slot="append">元</template>
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 98%;">
+                        <el-form-item label="加急签证价格描述" label-width="125px" prop="UrgentPriceDesc">
+                            <el-input type="textarea" :rows="3" placeholder="加急签证价格描述"
+                                v-model="addData.UrgentPriceDesc"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 98%;">
+                        <el-form-item label="签证备注" label-width="125px" prop="Remark">
+                            <el-input type="textarea" :rows="3" placeholder="签证备注" v-model="addData.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/CountryFeeCost'>
+                            <el-button>取消</el-button>
+                        </router-link>
+                    </div>
+                </el-form-item>
+            </el-form>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            rules: {
+                VisaContinent: [
+                    { required: true, message: '请输入所属州', trigger: 'blur' },
+                ],
+                VisaCountry: [
+                    { required: true, message: '请输入国家', trigger: 'blur' },
+                ],
+
+                VisaPrice: [
+                    { required: true, message: '签证金额不能为空', trigger: 'blur' },
+                    {
+                        pattern: '^([1-9][0-9]*)+(.[0-9]{1,2})?$',
+                        message: "小数部分为0到2位",
+                        trigger: "blur"
+                    }
+                ],
+                VisaTime: [
+                    { required: true, message: '签证时间不能为空', trigger: 'blur' },
+                    {
+                        pattern: '^([1-9][0-9]*)?$',
+                        message: "请正确的输入天数",
+                        trigger: "blur"
+                    }
+                ],
+                UrgentPrice: [
+                    { required: true, message: '加急签证金额不能为空', trigger: 'blur' },
+                    {
+                        pattern: '^([1-9][0-9]*)+(.[0-9]{1,2})?$',
+                        message: "小数部分为0到2位",
+                        trigger: "blur"
+                    }
+                ],
+                UrgentTime: [
+                    { required: true, message: '加急签证时间不能为空', trigger: 'blur' },
+                    {
+                        pattern: '^([1-9][0-9]*)?$',
+                        message: "请正确的输入天数",
+                        trigger: "blur"
+                    }
+                ],
+            },
+            loading: false,
+            tableData: [],
+            currentPage: 1, // 当前页码
+            pageSize: 15,// 每页的数据条数
+            input: '',
+            token: '',
+            userId: 0,
+            addData: {
+                Status: 0,
+                Id: 0,
+                VisaContinent: '',
+                VisaCountry: '',
+                IsVisaExemption: 1,
+                IsVisaOnArrival: 1,
+                IsElectronicSignature: 1,
+                VisaPrice: 0,
+                VisaPriceDesc: '',
+                VisaType: '',
+                VisaTime: '0',
+                IsUrgent: 1,
+                UrgentTime: '0',
+                UrgentPrice: 0,
+                UrgentPriceDesc: '',
+                VisaAddress: '',
+                CreateUserId: 0,
+                Remark: ''
+            },
+            CountryFeeCostData: {}
+
+        }
+    },
+    methods: {
+        CountryFeeCost() {
+            this.loading = true
+            var url = "/api/Resource/QueryCountryFeeCost"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    portType: 1,
+                }
+            }).then(function (res) {
+                console.log(res)
+                debugger
+                if (res.data.code == 200) {
+                    that.tableData = res.data.data;
+                    that.addData.Id = that.$route.query.id;
+                    if (that.addData.Id == undefined || that.addData.Id == null) {
+                        //添加
+                        that.addData.Status = 1
+                    } else {
+                        //编辑
+                        that.upData();
+                    }
+                }
+                that.loading = false
+            }).catch(function (error) {
+                that.loading = false
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+
+        addBtn() {
+            const that = this;
+            debugger
+            that.addData.CreateUserId = that.userId
+            that.$refs.addData.validate((valid) => {
+                if (valid) {
+                    debugger
+                    console.log(that.addData)
+                    var url = "/api/Resource/OperationCountryFeeCost"
+                    that.$axios({
+                        method: 'post',
+                        url: url,
+                        headers: {
+                            Authorization: 'Bearer ' + that.token
+                        },
+                        data: that.addData
+                    }).then(function (res) {
+                        console.log(res)
+                        debugger
+                        if (res.data.code == 200) {
+                            that.$message({
+                                message: res.data.msg,
+                                type: 'success'
+                            });
+                            that.loading = true;
+                            setTimeout(() => {
+                                that.$router.push('/home/CountryFeeCost')
+                            }, 3000);
+                        } else {
+                            that.$message.error(res.data.msg);
+                        }
+                    })
+                } else {
+                    this.$message.error('请完善信息在保存!');
+                    return false;
+                }
+            })
+        },
+        upData() {
+            debugger
+            for (var i = 0; i < this.tableData.length; i++) {
+                if (this.tableData[i].id == parseInt(this.addData.Id)) {
+                    debugger
+                    this.CountryFeeCostData = this.tableData[i];
+                    break;
+                }
+            }
+            this.addData.Status = 2;
+            this.addData.Id = this.CountryFeeCostData.id;
+            this.addData.VisaContinent = this.CountryFeeCostData.visaContinent;
+            this.addData.VisaCountry = this.CountryFeeCostData.visaCountry;
+            this.addData.IsVisaExemption = this.CountryFeeCostData.isVisaExemption;
+            this.addData.IsVisaOnArrival = this.CountryFeeCostData.isVisaOnArrival;
+            this.addData.IsElectronicSignature = this.CountryFeeCostData.isElectronicSignature;
+            this.addData.VisaPrice = this.CountryFeeCostData.visaPrice;
+            this.addData.VisaPriceDesc = this.CountryFeeCostData.visaPriceDesc;
+            this.addData.VisaType = this.CountryFeeCostData.visaType;
+            this.addData.VisaTime = this.CountryFeeCostData.visaTime;
+            this.addData.UrgentTime = this.CountryFeeCostData.urgentTime;
+            if (this.addData.UrgentTime != "" && this.addData.UrgentTime != 0 && this.addData.UrgentTime != null) {
+                this.addData.IsUrgent = "0";
+            }
+            this.addData.UrgentPrice = this.CountryFeeCostData.urgentPrice;
+            this.addData.UrgentPriceDesc = this.CountryFeeCostData.urgentPriceDesc;
+            this.addData.VisaAddress = this.CountryFeeCostData.visaAddress;
+            this.addData.CreateUserId = this.CountryFeeCostData.createUserId;
+            this.addData.Remark = this.CountryFeeCostData.remark;
+        },
+    },
+
+    mounted() {
+        debugger
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.CountryFeeCost();
+
+    }
+}
+</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;
+}
+
+.el-input-group {
+    line-height: normal;
+    display: inline-table;
+    width: 90%;
+    border-collapse: separate;
+    border-spacing: 0;
+}
+
+
+@media screen and (max-width: 1700px) {
+    .appraise-box>div {
+        width: 48%;
+    }
+
+    .appraise-box>div el-form-item__content {
+        width: 260px !important;
+    }
+}
+</style>

+ 6 - 0
src/components/Resource/HotelData.vue

@@ -86,6 +86,12 @@ export default {
                 },
                 data: {
                     portType: 1,
+                    PageIndex: 0,
+                    PageSize: 0,
+                    City: '',
+                    Name: '',
+                    Contact: '',
+                    ContactPhone: '',
                 }
             }).then(function (res) {
                 console.log(res)

+ 6 - 0
src/components/Resource/HotelDataOperation.vue

@@ -160,6 +160,12 @@ export default {
                 },
                 data: {
                     portType: 1,
+                    PageIndex: 0,
+                    PageSize: 0,
+                    City: '',
+                    Name: '',
+                    Contact: '',
+                    ContactPhone: '',
                 }
             }).then(function (res) {
                 console.log(res)

+ 5 - 0
src/components/Resource/ThreeCode.vue

@@ -86,6 +86,10 @@ export default {
                 },
                 data: {
                     portType: 1,
+                    Three: '',
+                    City: '',
+                    PageIndex: '0',
+                    PageSize: '0'
                 }
             }).then(function (res) {
                 console.log(res)
@@ -94,6 +98,7 @@ export default {
                     debugger
                     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;

+ 4 - 1
src/components/Resource/ThreeCodeOperation.vue

@@ -1,7 +1,7 @@
 <template>
     <div v-loading="loading" element-loading-text="跳转中..." class="car_add">
         <div class="communal-title">
-            <div>添加导游地接资料资料</div>
+            <div>机场三字码操作</div>
         </div>
         <div>
             <el-form :model="addData" :rules="rules" ref="addData" label-width="100px" class="demo-ruleForm">
@@ -124,6 +124,9 @@ export default {
                 },
                 data: {
                     portType: 1,
+
+                    Three: '',
+                    City: '',
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {

+ 12 - 0
src/router/index.js

@@ -35,6 +35,8 @@ import HotelData from '@/components/Resource/HotelData'
 import visaform from '@/components/OP/visaform'
 import HotelDataOperation from '@/components/Resource/HotelDataOperation'
 import visaEdit from '@/components/OP/visaEdit'
+import CountryFeeCost from '@/components/Resource/CountryFeeCost'
+import CountryFeeCostOperation from '@/components/Resource/CountryFeeCostOperation'
 Vue.use(Router)
 
 export default new Router({
@@ -195,6 +197,16 @@ export default new Router({
           path: '/home/visaEdit',
           name: 'visaEdit',
           component: visaEdit
+        },
+        {
+          path: '/home/CountryFeeCost',
+          name: 'CountryFeeCost',
+          component: CountryFeeCost
+        },
+        {
+          path: '/home/CountryFeeCostOperation',
+          name: 'CountryFeeCostOperation',
+          component: CountryFeeCostOperation
         }
       ]
     },