Explorar el Código

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

liuhj hace 1 año
padre
commit
4e2bbebb8d

+ 7 - 3
src/components/MCR/MarketCustomerResourcesHome.vue

@@ -204,7 +204,9 @@ export default {
             groupNumber: {
                 preDeleAll: '',
                 finlishedDeleAll: ''
-            }
+            },
+            userId: 0,
+            token: '',
         }
     },
     methods: {
@@ -288,11 +290,11 @@ export default {
             var that = this;
             var delData = {
                 "id": row.id,
-                "deleteUserId": JSON.parse(localStorage.getItem("userinif")).userInfo.userId
+                "deleteUserId": this.userId
             }
             this.$axios.post('/api/MarketCustomerResources/NewClientDel', delData, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 if (resp.data.code == 200) {
@@ -311,6 +313,8 @@ export default {
         }
     },
     mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.pageload();
     },
     computed: {

+ 7 - 3
src/components/OP/AirTicketRes.vue

@@ -48,7 +48,7 @@
                     </el-table-column>
                     <el-table-column prop="flightDescription" label="航班简述" width="500">
                     </el-table-column>
-                    <el-table-column prop="clientName" label="客人名单" width="280">
+                    <el-table-column prop="clientNameStr" label="客人名单" width="280">
                     </el-table-column>
                     <el-table-column prop="clientNum" label="客人人数" width="100">
                     </el-table-column>
@@ -131,8 +131,11 @@ export default {
                 if (res.data.code == 200) {
                     that.AirTicketResSelectData = res.data.data.groupName;
                     debugger
-                    that.DiId = that.AirTicketResSelectData[0].id;
-                    that.AirTicketResList()
+                    if (that.AirTicketResSelectData.length != 0) {
+                        that.DiId = that.AirTicketResSelectData[0].id;
+                        that.AirTicketResList()
+                    }
+
                 }
             }).catch(function (error) {
                 that.$message.error("网络错误,请稍后重试");
@@ -156,6 +159,7 @@ export default {
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
+                    debugger
                     that.tableDatas = res.data.data.airTicketReservations;
                     that.tableData = that.tableDatas
                     if (that.tableDatas.length != 0) {

+ 388 - 92
src/components/OP/OpAirTicketRes.vue

@@ -25,7 +25,7 @@
         <div>
             <el-form :model="delegationInfo" label-width="100px" class="demo-ruleForm">
                 <div style="display: flex;">
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="团组名称:" label-width="160px">
                             <el-select v-model="DiIdSelect" clearable filterable placeholder="团组选择"
                                 @change="AirTicketResChange" :disabled="isShow" style="width: 100%;">
@@ -35,13 +35,13 @@
                             </el-select>
                         </el-form-item>
                     </div>
-                    <div style="width: 33%;">
+                    <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: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="客户:" prop="clientName" label-width="160px">
                             <el-input placeholder="客户" v-model="delegationInfo.clientName" :disabled="true">
                             </el-input>
@@ -50,7 +50,7 @@
 
                 </div>
                 <div style="display: flex;">
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="出访国家:" prop="visitCountry" label-width="160px">
                             <el-input placeholder="出访国家" v-model="delegationInfo.visitCountry" :disabled="true">
                             </el-input>
@@ -61,15 +61,16 @@
             <el-form :model="airTicketResOpData" :rules="airTicketResRules" ref="airTicketResOpData" label-width="100px"
                 class="demo-ruleForm">
                 <div style="display: flex;">
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="舱类型:" label-width="160px" prop="cType">
-                            <el-select v-model="airTicketResOpData.cType" placeholder="舱类型" style="width: 100%;">
+                            <el-select v-model="airTicketResOpData.cType" placeholder="舱类型" style="width: 100%;"
+                                @change="tankTypeChange">
                                 <el-option v-for="item in ticketClass" :key="item.id" :label="item.name" :value="item.id">
                                 </el-option>
                             </el-select>
                         </el-form-item>
                     </div>
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="机票单价:" prop="prePrice" label-width="160px">
                             <el-input placeholder="机票单价" v-model="airTicketResOpData.prePrice" style="width: 58%;"
                                 @input="peiceinput">
@@ -82,7 +83,7 @@
                             </el-select>
                         </el-form-item>
                     </div>
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="机票总价:" prop="price" label-width="160px">
                             <el-input placeholder="机票总价" v-model="airTicketResOpData.price" style="width: 58%;"
                                 :disabled="true">
@@ -98,13 +99,75 @@
 
                 </div>
                 <div style="display: flex;">
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
+                        <el-form-item label="机票编号:" label-width="160px" prop="ticketNumber">
+                            <el-input placeholder="机票编号" v-model="airTicketResOpData.ticketNumber">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="机票票号:" label-width="160px" prop="ticketCode">
+                            <el-input placeholder="机票票号" v-model="airTicketResOpData.ticketCode">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 100%;">
+                        <el-form-item label="航班描述:" prop="flightsDescription" label-width="160px">
+                            <el-input type="textarea" :rows="5"
+                                placeholder="请严格遵守此格式!!! 1. EK363 R1 WE08MAR CANDXB HK7 0015 0515 SEAME 2 3 (注意空格以及多条数据换行)"
+                                v-model="airTicketResOpData.flightsDescription" @change="flightsCodeChange"></el-input>
+
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="航班简述:" label-width="160px" prop="flightsCode">
+                            <el-input placeholder="航班简述" v-model="airTicketResOpData.flightsCode">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="城 市:" prop="flightsCity" label-width="160px">
+                            <el-input placeholder="城市" v-model="airTicketResOpData.flightsCity">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="航班日期:" prop="flightsDate" label-width="160px">
+                            <el-date-picker v-model="airTicketResOpData.flightsDate" type="date" placeholder="航班日期">
+                            </el-date-picker>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="航班时间:" prop="flightsTime" label-width="160px">
+
+                            <el-time-select v-model="airTicketResOpData.flightsTime" placeholder="航班时间">
+                            </el-time-select>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="此舱位客人名称:" prop="clientName" label-width="160px">
+                            <el-select v-model="airTicketResOpData.clientName" placeholder="此舱位客人名称" multiple clearable
+                                filterable @change="clientNamechange">
+                                <el-option v-for="item in clientNameId" :key="item.id"
+                                    :label="item.pinyin + '(' + item.name + ')'" :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
                         <el-form-item label="此舱位人数:" prop="clientNum" label-width="160px">
                             <el-input placeholder="此舱位人数" v-model="airTicketResOpData.clientNum" @input="peiceinput">
                             </el-input>
                         </el-form-item>
                     </div>
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="是否值机: " label-width="160px">
                             <el-radio-group v-model="airTicketResOpData.isCheckIn">
                                 <el-radio :label=1>是</el-radio>
@@ -112,7 +175,7 @@
                             </el-radio-group>
                         </el-form-item>
                     </div>
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="是否选座:" label-width="160px">
                             <el-radio-group v-model="airTicketResOpData.isSetSeat">
                                 <el-radio :label=1>是</el-radio>
@@ -123,7 +186,7 @@
 
                 </div>
                 <div style="display: flex;">
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="是否购买行李:" label-width="160px">
                             <el-radio-group v-model="airTicketResOpData.isPackage">
                                 <el-radio :label=1>是</el-radio>
@@ -131,7 +194,7 @@
                             </el-radio-group>
                         </el-form-item>
                     </div>
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="是否行李直挂:" label-width="160px">
                             <el-radio-group v-model="airTicketResOpData.isBagHandle">
                                 <el-radio :label=1>是</el-radio>
@@ -139,7 +202,7 @@
                             </el-radio-group>
                         </el-form-item>
                     </div>
-                    <div style="width: 33%;">
+                    <div style="width: 25%;">
                         <el-form-item label="是否火车票出票选座:" label-width="160px">
                             <el-radio-group v-model="airTicketResOpData.isTrain">
                                 <el-radio :label=1>是</el-radio>
@@ -148,41 +211,9 @@
                         </el-form-item>
                     </div>
                 </div>
+
                 <div style="display: flex;">
-                    <div style="width: 50%;">
-                        <el-form-item label="航班简述:" label-width="160px" prop="flightsCode">
-                            <el-input placeholder="航班简述" v-model="airTicketResOpData.flightsCode">
-                            </el-input>
-                        </el-form-item>
-                    </div>
-                    <div style="width: 50%;">
-                        <el-form-item label="城 市:" prop="flightsCity" label-width="160px">
-                            <el-input placeholder="城市" v-model="airTicketResOpData.flightsCity">
-                            </el-input>
-                        </el-form-item>
-                    </div>
-                </div>
-                <div style="display: flex;">
-                    <div style="width: 100%;">
-                        <el-form-item label="此舱位客人名称:" prop="clientName" label-width="160px">
-                            <el-input placeholder="此舱位客人名称" v-model="airTicketResOpData.clientName">
-                            </el-input>
-                        </el-form-item>
-                    </div>
-                </div>
-                <!-- <div>
-                    <span style="color: red; padding-left: 100px;">
-                        请严格遵守此格式!!! 1. EK363 R1 WE08MAR CANDXB HK7 0015 0515 SEAME 2 3 (注意空格以及多条数据换行)
-                    </span>
-                </div> -->
-                <div style="display: flex;">
-                    <div style="width: 100%;">
-                        <el-form-item label="航班描述:" prop="flightsDescription" label-width="160px">
-                            <el-input type="textarea" :rows="5"
-                                placeholder="请严格遵守此格式!!! 1. EK363 R1 WE08MAR CANDXB HK7 0015 0515 SEAME 2 3 (注意空格以及多条数据换行)"
-                                v-model="airTicketResOpData.flightsDescription"></el-input>
-                        </el-form-item>
-                    </div>
+
                 </div>
                 <div style="display: flex;">
                     <div style="width: 100%;">
@@ -376,43 +407,43 @@ export default {
         return {
             airTicketResRules: {
                 cType: [
-                    { required: true, message: '请选择舱位类型', trigger: 'change' }
+                    { required: true, message: '请选择舱位类型', trigger: ['blur', 'change'] }
                 ],
                 prePrice: [
-                    { required: true, message: '请输入机票单价', trigger: 'change' },
+                    { required: true, message: '请输入机票单价', trigger: ['blur', 'change'] },
                     { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
                 ],
                 clientNum: [
-                    { required: true, message: '请输入舱位人数', trigger: 'change' },
+                    { required: true, message: '请输入舱位人数', trigger: ['blur', 'change'] },
                 ],
                 flightsCode: [
-                    { required: true, message: '请输入航班描述', trigger: 'change' },
+                    { required: true, message: '请输入航班描述', trigger: ['blur', 'change'] },
                 ],
                 flightsCity: [
-                    { required: true, message: '请输入城市', trigger: 'change' },
+                    { required: true, message: '请输入城市', trigger: ['blur', 'change'] },
                 ],
                 clientName: [
-                    { required: true, message: '请输入客人姓名', trigger: 'change' },
+                    { type: "array", required: true, message: '请选择责任人', trigger: ['blur', ['blur', 'change']] }
                 ],
                 flightsDescription: [
-                    { required: true, message: '请严格遵守格式,正确填写', trigger: 'change' },
+                    { required: true, message: '请严格遵守格式,正确填写', trigger: ['blur', 'change'] },
                 ],
             },
             cardPaymentRules: {
                 payDId: [
-                    { required: true, message: '请选择支付方式', trigger: 'blur' },
+                    { required: true, message: '请选择支付方式', trigger: ['blur', 'change'] },
                 ],
                 consumptionPatterns: [
-                    { required: true, message: '请输入消费方式', trigger: 'blur' },
+                    { required: true, message: '请输入消费方式', trigger: ['blur', 'change'] },
                 ],
                 payee: [
-                    { required: true, message: '请输入收款方', trigger: 'blur' },
+                    { required: true, message: '请输入收款方', trigger: ['blur', 'change'] },
                 ],
                 orbitalPrivateTransfer: [
-                    { required: true, message: '请选择费用表示', trigger: 'blur' },
+                    { required: true, message: '请选择费用表示', trigger: ['blur', 'change'] },
                 ],
                 // ctdId: [
-                //     { required: true, message: '请选择卡类型', trigger: 'blur' },
+                //     { required: true, message: '请选择卡类型', trigger: ['blur', 'change'] },
                 // ]
             },
             title: "新增机票费用录入",
@@ -429,33 +460,33 @@ export default {
             cardType: [],//卡类型下拉框
             airTicketAgents: [],//合作的代理资料
             airTicketAgentsId: '',
+            clientNameId: [],//客人姓名
+            clientNameList: [],
             airGroupCostParameter: {},//机票成本预算
-            jjccb: 0,
-            jjcrs: 0,
-            jjczj: 0,
-            gwccb: 0,
-            gwcrs: 0,
-            gwczj: 0,
             status: 0,
             airTicketResOpData: {
                 id: 0,
                 diId: 0,
-                cType: '',
+                cType: 460,
                 prePrice: 0,
                 preCurrency: 48,
                 price: 0,
                 currency: 48,
                 clientNum: 0,
-                clientName: '',
+                clientName: [],
                 isCheckIn: 0,
                 isSetSeat: 0,
                 isPackage: 0,
                 isBagHandle: 0,
                 isTrain: 0,
                 flightsCode: '',
+                flightsDate: '',
+                flightsTime: '',
                 flightsCity: '',
                 flightsDescription: '',
                 priceDescription: '',
+                ticketNumber: '',
+                ticketCode: '',
                 createUserId: 0,
                 remark: ''
             },
@@ -486,6 +517,13 @@ export default {
         }
     },
     methods: {
+        clientNamechange(val) {
+            console.log(val.length)
+            this.airTicketResOpData.clientNum = val.length;
+            this.cardPaymentOpData.payMoney = parseFloat(parseFloat(this.airTicketResOpData.prePrice) * parseFloat(this.airTicketResOpData.clientNum)).toFixed(2)
+            this.cardPaymentOpData.payThenMoney = this.cardPaymentOpData.payMoney
+            this.airTicketResOpData.price = parseFloat(parseFloat(this.airTicketResOpData.prePrice) * parseFloat(this.airTicketResOpData.clientNum)).toFixed(2)
+        },
         //团组下拉框
         AirTicketResSelect() {
             var url = "/api/Groups/AirTicketResSelect"
@@ -507,7 +545,7 @@ export default {
                     that.cardType = res.data.data.cardType;//卡类型下拉框
                     that.airTicketAgents = res.data.data.airTicketAgents//合作方资料下拉框
                     that.DiIdSelect = parseInt(that.DiId)
-                    that.AirTicketResList()
+                    that.QueryTankType();
                 }
 
             })
@@ -515,6 +553,7 @@ export default {
         AirTicketResChange() {
             this.AirTicketResList();
         },
+
         AirTicketResList() {
             var url = "/api/Groups/AirTicketResList"
             var that = this
@@ -528,31 +567,58 @@ export default {
                     diId: that.DiIdSelect
                 }
             }).then(function (res) {
-
                 if (res.data.code == 200) {
 
                     that.delegationInfo = res.data.data.delegationInfo
                     that.airGroupCostParameter = res.data.data.airGroupCostParameter
                 }
             })
-            if (that.DiId != undefined && that.id != undefined) {
-                that.status = 2;
-                that.isShow = true
-                that.AirTicketResById();
-            } else {
-                that.isShow = false
-                that.status = 1;
-            }
+
+        },
+        QueryTankType() {
+            var url = "/api/Groups/tankType"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.token
+                },
+                data: {
+                    id: that.airTicketResOpData.cType
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+
+                    that.clientNameId = res.data.data
+                    that.AirTicketResList()
+                }
+            })
+        },
+        tankTypeChange() {
+            this.QueryTankType();
         },
         //点击保存事件
         addBtn() {
-            if (this.IsAuditGM = 1) {
+
+            if (this.IsAuditGM == 1) {
+                var ss = this.airTicketResOpData.clientName.split(',')
+                this.airTicketResOpData.clientName = [];
+                ss.forEach(function (item) {
+                    that.airTicketResOpData.clientName.push(parseInt(item))
+                });
                 this.$message.error('审核已通过,不可修改!');
             } else {
                 if (this.DiId == null && this.DiId == undefined && this.DiId == "") {
                     this.$message.error("请选择团组名称");
+                    var ss = this.airTicketResOpData.clientName.split(',')
+                    this.airTicketResOpData.clientName = [];
+                    ss.forEach(function (item) {
+                        that.airTicketResOpData.clientName.push(parseInt(item))
+                    });
                     return;
                 }
+
                 const that = this;
                 let formArr = ['airTicketResOpData', 'cardPaymentOpData']//三个form表单的ref
                 var resultArr = [] //用来接受返回结果的数组
@@ -570,11 +636,17 @@ export default {
                     checkForm(item)
                 })
                 Promise.all(resultArr).then(values => {
-                    that.airTicketResOpData.diId = that.DiId;
-                    that.airTicketResOpData.createUserId = that.userId;
+                    debugger
 
+                    that.airTicketResOpData.diId = parseInt(that.DiId);
+                    that.airTicketResOpData.createUserId = that.userId;
+                    var clientNameStr = ''
+                    that.airTicketResOpData.clientName.forEach(function (item) {
+                        clientNameStr += item + ","
+                    });
+                    that.airTicketResOpData.clientName = clientNameStr.substring(0, clientNameStr.length - 1)
                     that.cardPaymentOpData.createUserId = that.userId;
-                    that.cardPaymentOpData.diId = that.DiId;
+                    that.cardPaymentOpData.diId = parseInt(that.DiId);
                     if (that.cardPaymentOpData.ctdId == '') {
                         that.cardPaymentOpData.ctdId = 0;
                     }
@@ -597,14 +669,32 @@ export default {
                                 type: 'success'
                             });
                             that.loading = true;
+                            var ss = that.airTicketResOpData.clientName.split(',')
+                            that.airTicketResOpData.clientName = [];
+                            ss.forEach(function (item) {
+                                that.airTicketResOpData.clientName.push(parseInt(item))
+                            });
                             setTimeout(() => {
                                 that.$router.push('/home/AirTicketRes')
                             }, 3000);
                         } else {
+                            var ss = that.airTicketResOpData.clientName.split(',')
+                            that.airTicketResOpData.clientName = [];
+                            ss.forEach(function (item) {
+                                that.airTicketResOpData.clientName.push(parseInt(item))
+                            });
                             that.$message.error(res.data.msg);
                         }
+                    }).catch(function (error) {
+                        console.log(error)
                     })// 此时必填完成,做保存后的业务操作
+
                 }).catch(_ => {
+                    var ss = this.airTicketResOpData.clientName.split(',')
+                    this.airTicketResOpData.clientName = [];
+                    ss.forEach(function (item) {
+                        that.airTicketResOpData.clientName.push(parseInt(item))
+                    });
                     this.$message.error('请完善信息在保存!');
                     return false;
                 })
@@ -625,19 +715,71 @@ export default {
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
+                    var airData = res.data.data.airTicket
 
-                    that.airTicketResOpData = res.data.data.airTicket;
+                    that.airTicketResOpData.id = airData.id
+                    that.airTicketResOpData.diId = airData.diId
+                    that.airTicketResOpData.cType = airData.cType
+                    that.airTicketResOpData.prePrice = airData.prePrice
+                    that.airTicketResOpData.preCurrency = airData.preCurrency
+                    that.airTicketResOpData.price = airData.price
+                    that.airTicketResOpData.currency = airData.currency
+                    that.airTicketResOpData.clientNum = airData.clientNum
+                    that.airTicketResOpData.isCheckIn = airData.isCheckIn
+                    that.airTicketResOpData.isSetSeat = airData.isSetSeat
+                    that.airTicketResOpData.isPackage = airData.isPackage
+                    that.airTicketResOpData.isBagHandle = airData.isBagHandle
+                    that.airTicketResOpData.isTrain = airData.isTrain
+                    that.airTicketResOpData.flightsCode = airData.flightsCode
+                    that.airTicketResOpData.flightsDate = airData.flightsDate
+                    that.airTicketResOpData.flightsTime = airData.flightsTime
+                    that.airTicketResOpData.flightsCity = airData.flightsCity
+                    that.airTicketResOpData.flightsDescription = airData.flightsDescription
+                    that.airTicketResOpData.priceDescription = airData.priceDescription
+                    that.airTicketResOpData.ticketNumber = airData.ticketNumber
+                    that.airTicketResOpData.ticketCode = airData.ticketCode
+                    that.airTicketResOpData.createUserId = airData.createUserId
+                    that.airTicketResOpData.remark = airData.remark
+
+                    debugger
+                    var ss = airData.clientName.split(',')
+                    that.airTicketResOpData.clientName = [];
+                    ss.forEach(function (item) {
+                        that.airTicketResOpData.clientName.push(parseInt(item))
+                    });
                     that.prePrice = res.data.data.airTicket.prePrice
                     that.currencyId = res.data.data.airTicket.preCurrency
                     that.clientNum = res.data.data.airTicket.clientNum
-                    that.cardPaymentOpData = res.data.data.creditCard;
-                    that.IsAuditGM = that.cardPaymentOpData.isAuditGM
-                    debugger
-                    if (that.cardPaymentOpData.ctdId == 0) {
+                    var creData = res.data.data.creditCard;
+                    that.cardPaymentOpData.id = creData.id
+                    that.cardPaymentOpData.payDId = creData.payDId
+                    that.cardPaymentOpData.consumptionPatterns = creData.consumptionPatterns
+                    that.cardPaymentOpData.consumptionDate = creData.consumptionDate
+                    that.cardPaymentOpData.bankNo = creData.bankNo
+                    that.cardPaymentOpData.cardholderName = creData.cardholderName
+                    that.cardPaymentOpData.payMoney = creData.payMoney
+                    that.cardPaymentOpData.paymentCurrency = creData.paymentCurrency
+                    that.cardPaymentOpData.companyBankNo = creData.companyBankNo
+                    that.cardPaymentOpData.otherBankName = creData.otherBankName
+                    that.cardPaymentOpData.otherSideNo = creData.otherSideNo
+                    that.cardPaymentOpData.otherSideName = creData.otherSideName
+                    that.cardPaymentOpData.mfOperator = creData.mfOperator
+                    that.cardPaymentOpData.mfOperatorDate = creData.mfOperatorDate
+                    that.cardPaymentOpData.diId = creData.diId
+                    that.cardPaymentOpData.payThenMoney = creData.payThenMoney
+                    that.cardPaymentOpData.payee = creData.payee
+                    that.cardPaymentOpData.createUserId = creData.createUserId
+                    that.cardPaymentOpData.orbitalPrivateTransfer = creData.orbitalPrivateTransfer
+                    that.cardPaymentOpData.remark = creData.remark
+
+                    that.IsAuditGM = creData.isAuditGM
+
+                    if (creData.ctdId == 0) {
                         that.cardPaymentOpData.ctdId = ""
+                    } else {
+                        that.cardPaymentOpData.ctdId = parseInt(creData.ctdId)
                     }
-
-                    that.cardPaymentOpData.orbitalPrivateTransfer = parseInt(that.cardPaymentOpData.orbitalPrivateTransfer)
+                    that.cardPaymentOpData.orbitalPrivateTransfer = parseInt(creData.orbitalPrivateTransfer)
                 }
             })
         },
@@ -670,13 +812,13 @@ export default {
             this.airTicketAgentsId = '';
             for (var i = 0; i < this.cardType.length; i++) {
                 if (this.cardType[i].id == parseInt(id)) {
-                    console.log(this.cardType[i].remark)
                     this.cardPaymentOpData.bankNo = this.cardType[i].remark
                 }
             }
         },
         //单价值改变事件
         peiceinput() {
+            debugger
             this.cardPaymentOpData.payMoney = parseFloat(parseFloat(this.airTicketResOpData.prePrice) * parseFloat(this.airTicketResOpData.clientNum)).toFixed(2)
             this.cardPaymentOpData.payThenMoney = this.cardPaymentOpData.payMoney
             this.airTicketResOpData.price = parseFloat(parseFloat(this.airTicketResOpData.prePrice) * parseFloat(this.airTicketResOpData.clientNum)).toFixed(2)
@@ -685,16 +827,170 @@ export default {
             this.cardPaymentOpData.paymentCurrency = Id;
             this.airTicketResOpData.preCurrency = Id;
             this.airTicketResOpData.currency = Id;
-        }
+        },
+        //航班描述值改变事件
+        flightsCodeChange(val) {
+            var reg = /[\r\n]+/g;
+            var that = this;
+            that.airTicketResOpData.flightsCode = ''
+            that.airTicketResOpData.flightsCity = ''
+            var dateTime = [];
+            if (reg.test(val)) {
+                debugger
+                var attrsList = val.split(reg)
+                attrsList.forEach(function (item, index) {
+                    debugger
+                    var ss = item.split(' ')
+                    for (var i = 0; i < ss.length; i++) {
+                        ss[i] = ss[i].trim();
+                        if (!ss[i]) {
+                            ss.splice(i, 1);
+                            i--;
+                        }
+                    }
+                    ss = ss;
+                    debugger
+                    that.airTicketResOpData.flightsCode += ss[1] + '/'//航班号
+                    that.airTicketResOpData.flightsCity += ss[4].substring(0, 3) + '-' + ss[4].substring(3) + '/'//城市
+                    var dateStr = ss[3].substring(4)
+                    switch (dateStr) {
+                        case "JAN":
+                            dateStr = "01";
+                            break;
+                        case "FEB":
+                            dateStr = "02";
+                            break;
+                        case "MAR":
+                            dateStr = "03";
+                            break;
+                        case "APR":
+                            dateStr = "04";
+                            break;
+                        case "MAY":
+                            dateStr = "05";
+                            break;
+                        case "JUN":
+                            dateStr = "06";
+                            break;
+                        case "JUL":
+                            dateStr = "07";
+                            break;
+                        case "AUG":
+                            dateStr = "08";
+                            break;
+                        case "SEP":
+                            dateStr = "09";
+                            break;
+                        case "OCT":
+                            dateStr = "10";
+                            break;
+                        case "NOV":
+                            dateStr = "11";
+                            break;
+                        case "DEC":
+                            dateStr = "12";
+                            break;
+                    }
+
+                    dateTime.push({
+                        date: new Date(new Date().getFullYear() + '-' + dateStr + '-' + ss[3].substring(2, 4)),
+                        time: ss[6].substring(0, 2) + ':' + ss[6].substring(2)
+                    })//日期
+                });
+                that.airTicketResOpData.flightsCode = that.airTicketResOpData.flightsCode.substring(0, that.airTicketResOpData.flightsCode.length - 1)//航班号
+                that.airTicketResOpData.flightsCity = that.airTicketResOpData.flightsCity.substring(0, that.airTicketResOpData.flightsCity.length - 1)//城市
+
+                var compare = function (obj1, obj2) {
+                    var val1 = obj1.date;
+                    var val2 = obj2.date;
+                    if (val1 < val2) {
+                        return -1;
+                    } else if (val1 > val2) {
+                        return 1;
+                    } else {
+                        return 0;
+                    }
+                }
+                dateTime = dateTime.sort(compare);
+                that.airTicketResOpData.flightsTime = dateTime[dateTime.length - 1].time
+                that.airTicketResOpData.flightsDate = dateTime[dateTime.length - 1].date
+            } else {
+                var ss = val.split(' ')
+                for (var i = 0; i < ss.length; i++) {
+                    ss[i] = ss[i].trim();
+                    if (!ss[i]) {
+                        ss.splice(i, 1);
+                        i--;
+                    }
+                }
+                ss = ss;
+                that.airTicketResOpData.flightsCode = ss[1]//航班号
+                that.airTicketResOpData.flightsCity += ss[4].substring(0, 3) + '-' + ss[4].substring(3)//城市
+                that.airTicketResOpData.flightsTime = ss[6].substring(0, 2) + ':' + ss[6].substring(2)//时间
+                debugger
+                var dateStr = ss[3].substring(4)
+                switch (dateStr) {
+                    case "JAN":
+                        dateStr = "01";
+                        break;
+                    case "FEB":
+                        dateStr = "02";
+                        break;
+                    case "MAR":
+                        dateStr = "03";
+                        break;
+                    case "APR":
+                        dateStr = "04";
+                        break;
+                    case "MAY":
+                        dateStr = "05";
+                        break;
+                    case "JUN":
+                        dateStr = "06";
+                        break;
+                    case "JUL":
+                        dateStr = "07";
+                        break;
+                    case "AUG":
+                        dateStr = "08";
+                        break;
+                    case "SEP":
+                        dateStr = "09";
+                        break;
+                    case "OCT":
+                        dateStr = "10";
+                        break;
+                    case "NOV":
+                        dateStr = "11";
+                        break;
+                    case "DEC":
+                        dateStr = "12";
+                        break;
+                }
+                that.airTicketResOpData.flightsDate = new Date().getFullYear() + '-' + dateStr + '-' + ss[3].substring(2, 4)
+            }
+
+        },
+
     },
 
     mounted() {
 
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
-        this.AirTicketResSelect();
+
         this.id = this.$route.query.id
         this.DiId = this.$route.query.DiId
+        this.AirTicketResSelect()
+        var that = this
+        if (that.DiId != undefined && that.id != undefined) {
+            that.status = 2;
+            that.isShow = true
+            that.AirTicketResById();
+        } else {
+            that.isShow = false
+            that.status = 1;
+        }
     }
 }
 </script>

+ 64 - 32
src/components/Resource/OpInvitationOfficialActivityData.vue

@@ -182,7 +182,7 @@ export default {
                 weChat: '',
                 faceBook: '',
                 ins: '',
-                delegation: '',
+                delegation: [],
                 filePath: '',
                 sndFilePath: '',
                 fax: '',
@@ -219,8 +219,8 @@ export default {
                     { required: true, message: '请输入联系方式', trigger: 'change' }
                 ],
                 delegation: [
-                    { required: true, message: '请输入费用金额', trigger: 'blur' },
-                    { required: true, message: '请输入费用金额', trigger: 'change' }
+                    { type: "array", required: true, message: '请选择关联团组', trigger: ['blur', 'change'] },
+
                 ],
             },
             DelegationList: [],
@@ -319,15 +319,16 @@ export default {
 
             const that = this;
             that.OpInvitationOfficialActivityData.createUserId = that.userId
-            var delegationStr = '';
-            that.OpInvitationOfficialActivityData.delegation.forEach(function (item, index) {
-                delegationStr += item + ','
-            });
-            that.OpInvitationOfficialActivityData.delegation = delegationStr.substring(0, delegationStr.length - 1)
+
             that.$refs.OpInvitationOfficialActivityData.validate((valid) => {
                 if (valid) {
                     debugger
                     if (that.uploadFiles.length == 0 || that.uploadFiles[0].name == that.OpInvitationOfficialActivityData.sndFilePath) {
+                        var delegationStr = '';
+                        that.OpInvitationOfficialActivityData.delegation.forEach(function (item, index) {
+                            delegationStr += item + ','
+                        });
+                        that.OpInvitationOfficialActivityData.delegation = delegationStr.substring(0, delegationStr.length - 1)
                         var url = "/api/Resource/OpInvitationOfficialActivity"
                         that.$axios({
                             method: 'post',
@@ -339,11 +340,20 @@ export default {
                         }).then(function (res) {
                             debugger
                             if (res.data.code == 200) {
+                                var delList = that.OpInvitationOfficialActivityData.delegation.split(',')
+                                var delegaLOist = [];
+                                delList.forEach(function (item, index) {
+                                    delegaLOist.push(
+                                        parseInt(item)
+                                    )
+                                });
+                                that.OpInvitationOfficialActivityData.delegation = delegaLOist
                                 that.$message({
                                     message: res.data.msg,
                                     type: 'success'
                                 });
                                 that.loading = true;
+
                                 setTimeout(() => {
                                     that.$router.push('/home/InvitationOfficialActivityData')
                                 }, 3000);
@@ -353,9 +363,16 @@ export default {
                         })
                     } else {
                         that.$refs.upload.submit();//上传文件到服务器
-
                     }
                 } else {
+                    var delList = this.OpInvitationOfficialActivityData.delegation.split(',')
+                    var delegaLOist = [];
+                    delList.forEach(function (item, index) {
+                        delegaLOist.push(
+                            parseInt(item)
+                        )
+                    });
+                    this.OpInvitationOfficialActivityData.delegation = delegaLOist
                     this.$message.error('请完善信息在保存!');
                     return false;
                 }
@@ -375,30 +392,45 @@ export default {
             if (response.code == 200) {
                 debugger
                 console.log("上传成功");
-                const that = this;
-                that.OpInvitationOfficialActivityData.filePath = that.OldFile;
-                that.OpInvitationOfficialActivityData.sndFilePath = response.data;
-                that.OpInvitationOfficialActivityData.createUserId = that.userId
-                var url = "/api/Resource/OpInvitationOfficialActivity"
-                that.$axios({
-                    method: 'post',
-                    url: url,
-                    headers: {
-                        Authorization: 'Bearer ' + that.token
-                    },
-                    data: that.OpInvitationOfficialActivityData
-                }).then(function (res) {
-                    if (res.data.code == 200) {
-                        that.$message({
-                            message: res.data.msg,
-                            type: 'success'
-                        });
-                        that.loading = true;
-                        setTimeout(() => {
-                            that.$router.push('/home/InvitationOfficialActivityData')
-                        }, 3000);
+                that.$refs.OpInvitationOfficialActivityData.validate((valid) => {
+                    if (valid) {
+                        const that = this;
+                        that.OpInvitationOfficialActivityData.filePath = that.OldFile;
+                        that.OpInvitationOfficialActivityData.sndFilePath = response.data;
+                        that.OpInvitationOfficialActivityData.createUserId = that.userId
+                        var url = "/api/Resource/OpInvitationOfficialActivity"
+                        that.$axios({
+                            method: 'post',
+                            url: url,
+                            headers: {
+                                Authorization: 'Bearer ' + that.token
+                            },
+                            data: that.OpInvitationOfficialActivityData
+                        }).then(function (res) {
+                            if (res.data.code == 200) {
+                                that.$message({
+                                    message: res.data.msg,
+                                    type: 'success'
+                                });
+                                that.loading = true;
+                                setTimeout(() => {
+                                    that.$router.push('/home/InvitationOfficialActivityData')
+                                }, 3000);
+                            } else {
+                                that.$message.error(res.data.msg);
+                            }
+                        })
                     } else {
-                        that.$message.error(res.data.msg);
+                        var delList = this.OpInvitationOfficialActivityData.delegation.split(',')
+                        var delegaLOist = [];
+                        delList.forEach(function (item, index) {
+                            delegaLOist.push(
+                                parseInt(item)
+                            )
+                        });
+                        this.OpInvitationOfficialActivityData.delegation = delegaLOist
+                        this.$message.error('请完善信息在保存!');
+                        return false;
                     }
                 })
             } else {

+ 347 - 0
src/components/Resource/OpTicketBlackCode.vue

@@ -0,0 +1,347 @@
+<template>
+    <div class="car_add">
+        <div>
+            <div class="communal-title">
+                <div>{{ title }}</div>
+            </div>
+        </div>
+        <div style="display: flex;">
+            <div style="text-align:left;font-size: 17px;font-weight: 600;color: #555;">
+                团组成本预算 - 机票的预算:
+            </div>
+            <div style="margin-left:20px;color: #555;" v-if="airGroupCostParameter != null">
+                经济舱: {{ airGroupCostParameter.jjccb }}元/人 {{ airGroupCostParameter.jjcrs }}人
+                共:{{ airGroupCostParameter.jjccb * airGroupCostParameter.jjcrs
+                }}元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                公务舱: {{ airGroupCostParameter.gwccb }}元/人 {{ airGroupCostParameter.gwcrs }}人
+                共:{{ airGroupCostParameter.gwccb * airGroupCostParameter.gwcrs
+                }}元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            </div>
+            <div style="margin-left:20px;" v-else>
+                团组成本暂未开放此团数据!
+            </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="AirTicketResChange"
+                                :disabled="isShow" style="width: 100%;">
+                                <el-option v-for="item in DelegationSelect" :key="item.id" :label="item.groupName"
+                                    :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="OpTicketBlackCodeData" :rules="OpTicketBlackCodeRules" ref="OpTicketBlackCodeData"
+                label-width="100px" class="demo-ruleForm">
+                <div>
+                    <span style="color: red; padding-left: 100px;">
+                        请严格遵守此格式!!! 1. EK363 R1 WE08MAR CANDXB HK7 0015 0515 SEAME 2 3 (注意空格以及多条数据换行)
+                    </span>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 60%;">
+                        <el-form-item label="黑屏代码:" prop="blackCode" label-width="160px">
+                            <el-input type="textarea" :rows="14"
+                                placeholder="请严格遵守此格式!!! 1. EK363 R1 WE08MAR CANDXB HK7 0015 0515 SEAME 2 3 (注意空格以及多条数据换行)"
+                                v-model="OpTicketBlackCodeData.blackCode"></el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 40%;">
+                        <el-form-item label="全价说明:" prop="price" label-width="160px">
+                            <el-input type="textarea" :rows="3" placeholder="全价说明"
+                                v-model="OpTicketBlackCodeData.price"></el-input>
+                        </el-form-item>
+                        <el-form-item label="现价说明:" prop="nowPrice" label-width="160px">
+                            <el-input type="textarea" :rows="3" placeholder="现价说明"
+                                v-model="OpTicketBlackCodeData.nowPrice"></el-input>
+                        </el-form-item>
+                        <el-form-item label="公务舱单价:" prop="bcPrice" label-width="160px">
+                            <el-input placeholder="公务舱单价" v-model="OpTicketBlackCodeData.bcPrice">
+                            </el-input>
+                        </el-form-item>
+                        <el-form-item label="经济舱单价:" prop="ecPrice" label-width="160px">
+                            <el-input placeholder="经济舱单价" v-model="OpTicketBlackCodeData.ecPrice">
+                            </el-input>
+                        </el-form-item>
+                        <el-form-item>
+
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 60%;">
+                        <el-form-item label="备注:" prop="remark" label-width="160px">
+                            <el-input type="textarea" :rows="3" placeholder="备注"
+                                v-model="OpTicketBlackCodeData.remark"></el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 40%;text-align:right;margin-top: 2%;">
+                        <div>
+                            <el-button type="primary" @click="addBtn">保存</el-button>
+                            <router-link :to="{ path: '/home/TicketBlackCode', query: { DiId } }">
+                                <el-button>取消</el-button>
+                            </router-link>
+                        </div>
+
+                    </div>
+                </div>
+            </el-form>
+
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            title: "新增机票行程代码录入",
+            token: '',
+            userId: 0,
+            id: '',
+            DiId: '',
+            isShow: false,
+            delegationInfo: {},
+            DelegationSelect: [],//团组下拉框
+            airGroupCostParameter: {},//机票成本预算
+            OpTicketBlackCodeData: {
+                status: 0,
+                id: 0,
+                diId: 0,
+                blackCode: '',
+                price: '',
+                nowPrice: '',
+                bcPrice: '',
+                ecPrice: '',
+                createUserId: 0,
+                remark: ''
+            },
+            OpTicketBlackCodeRules: {
+                blackCode: [
+                    { required: true, message: '该信息为必填信息', trigger: ['blur', 'change'] },
+                ],
+                price: [
+                    { required: true, message: '该信息为必填信息', trigger: ['blur', 'change'] },
+                ],
+                nowPrice: [
+                    { required: true, message: '该信息为必填信息', trigger: ['blur', 'change'] },
+                ],
+                bcPrice: [
+                    { required: true, message: '请输入机票单价', trigger: ['blur', 'change'] },
+                    { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
+                ],
+                ecPrice: [
+                    { required: true, message: '请输入机票单价', trigger: ['blur', 'change'] },
+                    { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
+                ],
+            }
+        }
+    },
+    methods: {
+        //团组下拉框
+        DelegationSelectFun() {
+            var url = "/api/Groups/GetGroupNameList"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    "portType": 1,
+                    "pageIndex": 0,
+                    "pageSize": 0
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.DelegationSelect = res.data.data;
+                    that.QueryTicketBlackCodeById()
+                }
+
+            }).catch(function (error) {
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        QueryTicketBlackCodeById() {
+            debugger
+            var url = "/api/Resource/QueryTicketBlackCodeById"
+            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) {
+                    debugger
+                    that.delegationInfo = res.data.data.delegationInfo
+                    that.airGroupCostParameter = res.data.data.groupCostParameter
+                    if (res.data.data.ticketBlackCode != null) {
+                        debugger
+                        var TicketBlackCode = res.data.data.ticketBlackCode
+                        that.OpTicketBlackCodeData.id = TicketBlackCode.id
+                        that.OpTicketBlackCodeData.diId = TicketBlackCode.diId
+                        that.OpTicketBlackCodeData.blackCode = TicketBlackCode.blackCode
+                        that.OpTicketBlackCodeData.price = TicketBlackCode.price
+                        that.OpTicketBlackCodeData.nowPrice = TicketBlackCode.nowPrice
+                        that.OpTicketBlackCodeData.bcPrice = TicketBlackCode.bcPrice
+                        that.OpTicketBlackCodeData.ecPrice = TicketBlackCode.ecPrice
+                        that.OpTicketBlackCodeData.remark = TicketBlackCode.remark
+                    }
+                }
+
+            }).catch(function (error) {
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        //团组下拉框选择事件
+        AirTicketResChange() {
+            this.QueryTicketBlackCodeById()
+        },
+        //点击保存事件
+        addBtn() {
+            if (this.DiId == null && this.DiId == undefined && this.DiId == "") {
+                this.$message.error("请选择团组名称");
+                return;
+            }
+            const that = this;
+            that.$refs.OpTicketBlackCodeData.validate((valid) => {
+                if (valid) {
+                    var url = "/api/Resource/OpTicketBlackCode"
+                    that.OpTicketBlackCodeData.createUserId = that.userId;
+                    that.OpTicketBlackCodeData.diId = that.DiId
+                    that.$axios({
+                        method: 'post',
+                        url: url,
+                        headers: {
+                            Authorization: 'Bearer ' + that.token
+                        },
+                        data: that.OpTicketBlackCodeData
+                    }).then(function (res) {
+
+                        if (res.data.code == 200) {
+                            that.$message({
+                                message: res.data.msg,
+                                type: 'success'
+                            });
+                            setTimeout(() => {
+                                that.$router.push('/home/TicketBlackCode')
+                            }, 3000);
+                            that.loading = true;
+                        } else {
+                            that.$message.error(res.data.msg);
+                        }
+                    })
+                } else {
+                    this.$message.error('请完善信息在保存!');
+                    return false;
+                }
+            })
+        }
+    },
+
+    mounted() {
+
+        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 = parseInt(this.$route.query.DiId)
+        this.DelegationSelectFun()
+        var that = this
+        if (that.DiId != undefined && that.id != undefined) {
+            that.OpTicketBlackCodeData.status = 2;
+            that.isShow = true
+        } else {
+            that.isShow = false
+            that.OpTicketBlackCodeData.status = 1;
+        }
+        that.QueryTicketBlackCodeById();
+    }
+}
+</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>

+ 264 - 0
src/components/Resource/TicketBlackCode.vue

@@ -0,0 +1,264 @@
+<template>
+    <div>
+        <div class="communal-list">
+            <div>
+
+                <div class="communal-title">
+                    <div>机票行程代码录入</div>
+                </div>
+                <div style="display: flex;justify-content: space-between;">
+                    <div style="width: 60%;">
+                        <el-select v-model="DiId" placeholder="团组选择" clearable filterable
+                            @change="AirTicketResSelectChange">
+                            <el-option v-for="item in DelegationSelect" :key="item.id" :label="item.groupName"
+                                :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </div>
+                    <div style="width: 20%;">
+                        <el-button type="primary" style="margin-left: 10px;" @click="addIf">新增</el-button>
+                    </div>
+                </div>
+                <div style="margin:10px 0;color:#606266;">
+                    <span style="font-weight: bold;font-size:17px;">团队名称:</span>
+                    <span style="color:#606266;">{{ DelegationInfo.teamName }}&nbsp;&nbsp;&nbsp;</span>
+                    <span style="font-weight: bold;font-size:17px;">客户:</span>
+                    <span style="color:#606266;">{{ DelegationInfo.clientName }}&nbsp;&nbsp;&nbsp;</span>
+                    <span style="font-weight: bold;font-size:17px;">出访国家:</span>
+                    <span style="color:#606266;">{{ DelegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;</span>
+                    <span style="font-weight: bold;font-size:17px;">起止日期:</span>
+                    <span style="color:#606266;">{{ DelegationInfo.visitStartDate }}—{{ DelegationInfo.visitEndDate
+                    }}&nbsp;&nbsp;&nbsp;</span>
+                    <span style="font-weight: bold;font-size:17px;">天数/人数:</span>
+                    <span style="color:#606266;">{{ DelegationInfo.visitDays }}天/{{ DelegationInfo.visitPNumber }}人</span>
+                </div>
+            </div>
+            <template>
+                <el-table :data="tableDatas.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
+                    style="width: 100%" v-loading="loading" element-loading-text="拼命加载中...">
+                    <el-table-column prop="num" label="序 号" width="55">
+                        <template slot-scope="scope">
+                            {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="blackCode" label="黑屏代码">
+                    </el-table-column>
+                    <el-table-column prop="price" label="全价费用">
+                    </el-table-column>
+                    <el-table-column prop="nowPrice" label="现价费用">
+                    </el-table-column>
+                    <el-table-column prop="createName" label="录入人">
+                    </el-table-column>
+                    <el-table-column label="操作">
+                        <template slot-scope="scope">
+                            <el-button size="mini" @click="upDate(scope.$index, scope.row)">编辑</el-button>
+                            <el-button size="mini" type="danger" @click="del(scope.$index, scope.row)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </template>
+            <div class="block">
+                <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[10, 12, 15, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next" :total="tableDatas.length">
+                </el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            loading: false,
+            tableDatas: [],
+            tableData: [],
+            currentPage: 1, // 当前页码
+            pageSize: 12,// 每页的数据条数
+            token: '',
+            userId: 0,
+            DiId: '',
+            DelegationSelect: [],
+            DelegationInfo: {}
+        }
+    },
+    methods: {
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
+            this.currentPage = 1;
+            this.pageSize = val;
+        },
+        //当前页改变时触发 跳转其他页
+        handleCurrentChange(val) {
+            this.currentPage = val;
+        },
+        //下拉框数据绑定
+        DelegationSelectFun() {
+            var url = "/api/Groups/GetGroupNameList"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    "portType": 1,
+                    "pageIndex": 0,
+                    "pageSize": 0
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    debugger
+                    that.DelegationSelect = res.data.data;
+                    that.DiId = that.DelegationSelect[0].id
+                    that.QueryTicketBlackCodeByDiId();
+                }
+
+            }).catch(function (error) {
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        //团组下拉框值改变事件
+        AirTicketResSelectChange() {
+            this.QueryTicketBlackCodeByDiId();
+        },
+        QueryTicketBlackCodeByDiId() {
+            var url = "/api/Resource/QueryTicketBlackCodeByDiId"
+            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.ticketBlackCodes;
+                    that.DelegationInfo = res.data.data.delegationInfo
+                    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("网络错误,请稍后重试");
+            });
+        },
+        upDate(index, row) {
+
+            this.$router.push({
+                path: "/home/OpTicketBlackCode",
+                query: {
+                    DiId: this.DiId,
+                    id: row.id
+                }
+            })
+        },
+        addIf() {
+            debugger
+            if (this.DiId != 0 && this.DiId != '' && this.DiId != undefined) {
+                this.$router.push({
+                    path: "/home/OpTicketBlackCode",
+                    query: {
+                        DiId: this.DiId,
+                    }
+                })
+
+            } else {
+                this.$message('请选择团组在进行添加');
+            }
+        },
+        del(index, row) {
+            this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                var url = "/api/Resource/DelTicketBlackCode"
+                var that = this
+                this.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + this.token
+                    },
+                    data: {
+                        Id: row.id,
+                        DeleteUserId: that.userId
+                    }
+                }).then(function (res) {
+                    console.log(res)
+
+                    if (res.data.code == 200) {
+                        that.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        });
+                        that.QueryTicketBlackCodeByDiId();
+                    } 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.DelegationSelectFun()
+        // var did = parseInt(this.$route.query.DiId)
+        // if (did != null && did != undefined && did != '' && !isNaN(did)) {
+        //     this.DiId = did
+        // }
+    }
+}
+</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>

+ 58 - 52
src/components/child/AuthorityJob.vue

@@ -1,7 +1,5 @@
 <template>
-    <div  v-loading="loading"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading">
+    <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading">
         <div class="job-box">
             <div class="job-head">
                 <div>
@@ -24,7 +22,7 @@
                         </el-option>
                     </el-select>
                     <el-button type="primary" @click="saveAuth()">保 存</el-button>
-                </div> 
+                </div>
             </div>
             <div class="job-table">
                 <el-table :data="authorityLists.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
@@ -33,18 +31,20 @@
                     </el-table-column>
                     <el-table-column prop="name" label="权限页面" width="180">
                     </el-table-column>
-                   
-                    <el-table-column width="55" :label="op.functionName"  :key="op.id" v-for="op in opList">
+
+                    <el-table-column width="55" :label="op.functionName" :key="op.id" v-for="op in opList">
                         <template slot-scope="scope">
                             <div>
-                                <el-checkbox @change='checkchange(scope.row.id,op.id)'  v-if=" scope.row.opList.indexOf(op.id) != -1" :value="scope.row.selList.indexOf(op.id) != -1" >
-                                </el-checkbox >
-                                <el-checkbox  v-else :disabled="true"  :value="false" >
+                                <el-checkbox @change='checkchange(scope.row.id, op.id)'
+                                    v-if="scope.row.opList.indexOf(op.id) != -1"
+                                    :value="scope.row.selList.indexOf(op.id) != -1">
+                                </el-checkbox>
+                                <el-checkbox v-else :disabled="true" :value="false">
                                 </el-checkbox>
                             </div>
                         </template>
                     </el-table-column>
-                   
+
                     <el-table-column prop="address" label="备注">
                     </el-table-column>
                 </el-table>
@@ -82,9 +82,11 @@ export default {
             pageSize: 14,// 每页的数据条数
             stateArr: [],
             selectedAccount: [],
-            PathUrl:'',
-            opList :[],//操作方式
-            loading:true,
+            PathUrl: '',
+            opList: [],//操作方式
+            loading: true,
+            userId: 0,
+            token: '',
         }
     },
     methods: {
@@ -104,10 +106,10 @@ export default {
         },
         //多选框选中方法
         handleSelect(selection, row) {
-            console.log(selection,row)
+            console.log(selection, row)
             if (selection.length > 0) {
                 row.selList = this.opList.map(x => x.id);
-            }else{
+            } else {
                 row.selList = [];
             }
         },
@@ -127,16 +129,16 @@ export default {
         selectRadioup(index, row) {
             console.log(index, row)
         },
-        pageload(moduleId){
+        pageload(moduleId) {
             var that = this;
             //初始化界面数据
             this.$axios.post(this.PathUrl + '/api/System/GetAuth', {
                 "pageSize": this.pageSize,
                 "currentPage": this.currentPage,
-                "moduleId":moduleId,
+                "moduleId": moduleId,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 if (resp.data.code == 200) {
@@ -145,22 +147,22 @@ export default {
                     that.authorityList = resp.data.data.systemMenuPermissionData; //页面数据(默认权限页面)
                     that.authorityLists = that.authorityList;
                     that.opList = resp.data.data.pageOperation; //操作方式
-                    that.loading =false;
+                    that.loading = false;
                 }
-            }).then(suc=>{
-                if(this.valueposition != ''){
+            }).then(suc => {
+                if (this.valueposition != '') {
                     this.JobChange();
                 }
             })
         },
         //公司下拉框
-        companyChange(){
+        companyChange() {
             this.valuedepartmental = ''; //清空数据
             this.valueposition = '';
             this.position = [];
             this.departmental = [];
- 
-            if(this.valuecorporation == ''){
+
+            if (this.valuecorporation == '') {
                 return;
             }
 
@@ -171,7 +173,7 @@ export default {
                 "PortType": 1,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp);
@@ -182,45 +184,45 @@ export default {
 
         },
         //部门下拉框
-        depaChange(){
+        depaChange() {
             var that = this;
             this.position = []; //职位数据
             this.valueposition = '';//职位val
 
-            if(this.valuecorporation == '' || this.valuedepartmental == ''){
+            if (this.valuecorporation == '' || this.valuedepartmental == '') {
                 return;
             }
 
             //初始化界面数据
             this.$axios.post(this.PathUrl + '/api/System/QueryJobPost', {
                 "CompanyId": this.valuecorporation,
-                "DepId":this.valuedepartmental,
+                "DepId": this.valuedepartmental,
                 "PortType": 1,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp);
                 if (resp.data.code == 200) {
-                    that.position =  resp.data.data;
+                    that.position = resp.data.data;
                 }
             })
         },
         //保存权限
-        saveAuth(){
+        saveAuth() {
             var that = this;
 
-            if(this.valueposition == ''){
+            if (this.valueposition == '') {
                 this.$message.error('请选择职位!');
-                return;  
+                return;
             }
 
             var savejob = [];
-            this.authorityLists.forEach(item=>{
+            this.authorityLists.forEach(item => {
                 savejob.push({
-                    SmId:item.id,
-                    FIds:item.selList,
+                    SmId: item.id,
+                    FIds: item.selList,
                 });
             })
             console.log(savejob);
@@ -228,10 +230,10 @@ export default {
             this.$axios.post(this.PathUrl + '/api/System/SaveJobAuth', {
                 "Jpid": this.valueposition,
                 "Savejobs": savejob,
-                "modulId":this.value == '' ? '13':this.value,
+                "modulId": this.value == '' ? '13' : this.value,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp);
@@ -240,20 +242,20 @@ export default {
                         message: '保存成功!',
                         type: 'success'
                     });
-                }else{
-                    this.$message.error('保存失败!'+ resp.data.msg);
+                } else {
+                    this.$message.error('保存失败!' + resp.data.msg);
                 }
             })
         },
         //职位下拉获取权限
-        JobChange(){
-            let val = this.value == '' ? 13 :this.value;
+        JobChange() {
+            let val = this.value == '' ? 13 : this.value;
             var that = this;
 
-            if(this.valueposition == ''){
+            if (this.valueposition == '') {
 
                 var arr = this.authorityList;
-                arr.forEach(item=>{
+                arr.forEach(item => {
                     item.selList = [];
                 })
                 this.authorityList = arr;
@@ -265,10 +267,10 @@ export default {
             //初始化界面数据
             this.$axios.post(this.PathUrl + '/api/System/QueryJobAuth', {
                 "jobid": this.valueposition,
-                "moduleId":val,
+                "moduleId": val,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp);
@@ -279,7 +281,7 @@ export default {
             })
         },
         //全选
-        allchange(selection){
+        allchange(selection) {
             let that = this;
 
             if (selection.length > 0) {
@@ -287,7 +289,7 @@ export default {
                     item.selList = that.opList.map(x => x.id);
                 });
 
-            }else{
+            } else {
                 this.authorityLists.forEach(item => {
                     item.selList = [];
                 });
@@ -296,9 +298,9 @@ export default {
         checkchange(rowid, linid) {
             this.authorityLists.forEach(item => {
                 if (item.id == rowid) {
-                    if(item.selList.indexOf(linid) == -1){
+                    if (item.selList.indexOf(linid) == -1) {
                         item.selList.push(linid);
-                    }else{
+                    } else {
                         item.selList.splice(item.selList.indexOf(linid), 1)
                     }
                 }
@@ -307,6 +309,8 @@ export default {
         }
     },
     mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.pageload(13);
     }
 }
@@ -343,10 +347,12 @@ body {
 .job-table .el-table--border .el-table__cell:first-child .cell {
     text-align: center;
 }
-.job-input{
+
+.job-input {
     display: flex;
 }
-.job-input .el-select{
+
+.job-input .el-select {
     margin-right: 5px;
 }
 </style>

+ 10 - 6
src/components/child/AuthorityUser.vue

@@ -90,6 +90,8 @@ export default {
             loading: true,
             Users: [],
             Valueuesr: '',//员工val
+            userId: 0,
+            token: '',
         }
     },
     methods: {
@@ -141,7 +143,7 @@ export default {
                 "moduleId": moduleId,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 if (resp.data.code == 200) {
@@ -180,7 +182,7 @@ export default {
                 "PortType": 1,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp);
@@ -210,7 +212,7 @@ export default {
                 "PortType": 1,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp);
@@ -243,7 +245,7 @@ export default {
                 "Modulid": this.value == '' ? '13' : this.value,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp);
@@ -277,7 +279,7 @@ export default {
 
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp);
@@ -337,7 +339,7 @@ export default {
 
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp);
@@ -353,6 +355,8 @@ export default {
         }
     },
     mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.pageload(13);
     }
 }

+ 217 - 215
src/components/child/PageConfig.vue

@@ -1,8 +1,6 @@
 <template>
-
-    <div class="pageConfig-box"  v-loading="isload" element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)" >
+    <div class="pageConfig-box" v-loading="isload" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)">
         <div class="pageConfig-head">
             <div style="display: flex;">
                 <div>
@@ -15,96 +13,94 @@
                 <div style="display: flex;">
                     <el-input placeholder="请输入页面名称" v-model="SearchInput" clearable></el-input>
                     &nbsp;&nbsp;
-                    <el-button type="primary" @click="btnSearch" >搜 索</el-button>
+                    <el-button type="primary" @click="btnSearch">搜 索</el-button>
                 </div>
             </div>
-           <div>
-                <el-button type="primary" @click="isload=true;  pageload()"  >刷 新</el-button>
-                <el-button type="primary" @click="addPage"  >添 加</el-button>
-           </div>
+            <div>
+                <el-button type="primary" @click="isload = true; pageload()">刷 新</el-button>
+                <el-button type="primary" @click="addPage">添 加</el-button>
+            </div>
         </div>
         <div class="pageConfig-table">
-                <el-table :data="pageList.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border style="width: 100%">
-                    <el-table-column prop="pageName" label="页面名称" width="130" >
-                    </el-table-column>
-                    <el-table-column prop="systemMenuCode" label="页面Code" width="130">
-                    </el-table-column>
-                    <el-table-column prop="webUrl" label="WebUrl" width="100" >
-                    </el-table-column>
-                    <el-table-column prop="androidUrl" label="AndroidUrl" width="100">
-                    </el-table-column>
-                    <el-table-column prop="iosUrl" label="IosUrl" width="100">
-                    </el-table-column>
-                    <el-table-column label="手机端图标" prop="icon" width="130" >
-                    </el-table-column>
-                    <el-table-column prop="pageIsEnable" label="web端启用"  width="130">
-                        <template slot-scope="scope">
-                            <el-checkbox  :true-label="1"  disabled :false-label="0"  v-model="scope.row.pageIsEnable" ></el-checkbox>
-                        </template>
-                    </el-table-column>
-                    <el-table-column prop="pagePhoneIsEnable" label="手机端启用" width="130">
-                        <template slot-scope="scope">
-                            <el-checkbox  :true-label="1" disabled :false-label="0"  v-model="scope.row.pagePhoneIsEnable" ></el-checkbox>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="操作" >
-                        <template slot-scope="scope">
-                            <el-button type="primary" size="small" icon="el-icon-s-tools" @click="Edit(scope.row)" >编 辑</el-button>
-                            <el-button type="danger" size="small" icon="el-icon-delete-solid"  @click="Del(scope.row)" >删 除</el-button>
-                        </template>
-                    </el-table-column>
-                </el-table>
-                <div class="block">
-                    <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                        :current-page="currentPage" :page-sizes="[5,10,14,20]" :page-size="pageSize"
-                        layout="total, sizes, prev, pager, next" :total="pageList.length">
-                    </el-pagination>
-                </div>
+            <el-table :data="pageList.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
+                style="width: 100%">
+                <el-table-column prop="pageName" label="页面名称" width="130">
+                </el-table-column>
+                <el-table-column prop="systemMenuCode" label="页面Code" width="130">
+                </el-table-column>
+                <el-table-column prop="webUrl" label="WebUrl" width="100">
+                </el-table-column>
+                <el-table-column prop="androidUrl" label="AndroidUrl" width="100">
+                </el-table-column>
+                <el-table-column prop="iosUrl" label="IosUrl" width="100">
+                </el-table-column>
+                <el-table-column label="手机端图标" prop="icon" width="130">
+                </el-table-column>
+                <el-table-column prop="pageIsEnable" label="web端启用" width="130">
+                    <template slot-scope="scope">
+                        <el-checkbox :true-label="1" disabled :false-label="0"
+                            v-model="scope.row.pageIsEnable"></el-checkbox>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="pagePhoneIsEnable" label="手机端启用" width="130">
+                    <template slot-scope="scope">
+                        <el-checkbox :true-label="1" disabled :false-label="0"
+                            v-model="scope.row.pagePhoneIsEnable"></el-checkbox>
+                    </template>
+                </el-table-column>
+                <el-table-column label="操作">
+                    <template slot-scope="scope">
+                        <el-button type="primary" size="small" icon="el-icon-s-tools" @click="Edit(scope.row)">编
+                            辑</el-button>
+                        <el-button type="danger" size="small" icon="el-icon-delete-solid" @click="Del(scope.row)">删
+                            除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <div class="block">
+                <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[5, 10, 14, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next" :total="pageList.length">
+                </el-pagination>
+            </div>
         </div>
 
-        <el-dialog
-        title="提示"
-        width="30%"
-        :visible.sync="dialogVisible"
-        :modal-append-to-body='false'
-        :append-to-body="false"
-        >
+        <el-dialog title="提示" width="30%" :visible.sync="dialogVisible" :modal-append-to-body='false'
+            :append-to-body="false">
             <span>这是一段信息</span>
             <span slot="footer" class="dialog-footer">
             </span>
         </el-dialog>
 
-        <Modal :title="dialogTitle" :height="500" :width="700" :show.sync="showModal" restrict-to=".is-vertical" @close="showModal = false" >
+        <Modal :title="dialogTitle" :height="500" :width="700" :show.sync="showModal" restrict-to=".is-vertical"
+            @close="showModal = false">
             <template v-slot:content>
                 <div style="    padding: 10px;">
                     <el-form label-position="left" label-width="80px" :model="pageBind" :rules="rules" ref="pageBind">
                         <el-row :gutter="20">
                             <el-col :span="8">
-                                <el-form-item label="页面模块"  prop="modulid">  <!--style="width: 48%;" -->
+                                <el-form-item label="页面模块" prop="modulid"> <!--style="width: 48%;" -->
                                     <el-select v-model="pageBind.modulid" placeholder="请选择">
-                                        <el-option 
-                                        v-for="item in Modulfiltr"
-                                        :key="item.id"
-                                        :label="item.name"
-                                        :value="item.id">
+                                        <el-option v-for="item in Modulfiltr" :key="item.id" :label="item.name"
+                                            :value="item.id">
                                         </el-option>
                                     </el-select>
                                 </el-form-item>
                             </el-col>
                             <el-col :span="8">
-                                <el-form-item label="页面名称"  prop="pageName">  <!--style="width: 48%;" -->
+                                <el-form-item label="页面名称" prop="pageName"> <!--style="width: 48%;" -->
                                     <el-input v-model="pageBind.pageName"></el-input>
                                 </el-form-item>
                             </el-col>
                             <el-col :span="8">
-                                <el-form-item label="页面代码"  prop="systemMenuCode" > 
+                                <el-form-item label="页面代码" prop="systemMenuCode">
                                     <el-input v-model="pageBind.systemMenuCode"></el-input>
                                 </el-form-item>
                             </el-col>
                         </el-row>
                         <el-row :gutter="20">
                             <el-col :span="8">
-                                <el-form-item label="webUrl" prop="webUrl" >
+                                <el-form-item label="webUrl" prop="webUrl">
                                     <el-input v-model="pageBind.webUrl"></el-input>
                                 </el-form-item>
                             </el-col>
@@ -130,25 +126,28 @@
                                     <el-input v-model="pageBind.pageRemark"></el-input>
                                 </el-form-item>
                             </el-col>
-                            
+
                         </el-row>
                         <el-row :gutter="20">
                             <el-col :span="16">
-                                <el-checkbox label="Web" :true-label="1"  :false-label="0" v-model="pageBind.pageIsEnable"></el-checkbox>
-                                <el-checkbox label="Android是否启用" :true-label="1"  :false-label="0" v-model="pageBind.pagePhoneIsEnable" ></el-checkbox>
+                                <el-checkbox label="Web" :true-label="1" :false-label="0"
+                                    v-model="pageBind.pageIsEnable"></el-checkbox>
+                                <el-checkbox label="Android是否启用" :true-label="1" :false-label="0"
+                                    v-model="pageBind.pagePhoneIsEnable"></el-checkbox>
                             </el-col>
                         </el-row>
-                        <br/>
-                        <br/>
+                        <br />
+                        <br />
                         <el-row>
                             <el-col :span="24">
                                 <div class="=titleSpan">页面功能</div>
                             </el-col>
                         </el-row>
-                        <br/>
+                        <br />
                         <el-row :gutter="20">
                             <el-col :span="4" v-for="item in pageBindFun" :key="item.id" style="text-align: center;">
-                                <el-checkbox  :label="item.name" :true-label="1"  :false-label="0" v-model="item.value"></el-checkbox>
+                                <el-checkbox :label="item.name" :true-label="1" :false-label="0"
+                                    v-model="item.value"></el-checkbox>
                             </el-col>
                         </el-row>
                     </el-form>
@@ -171,60 +170,62 @@ import Modal from '../template/dialog.vue';
 
 export default {
     data() {
-      return {
-        bufferData:{},//暂存数据
-        pageList:[], //页面数据
-        SearchInput:'', //查询的值
-        currentPage : 1 , //页码
-        pageSize: 10,// 每页的数据条数
-        ModulValue:'', //模块val 
-        ModulList:[],//模块数据
-        PathUrl:'',
-        dialogVisible: false,
-        showModal: false, //测试弹层
-        dialogTitle:'测试标题',
-        pageBind:{
-            androidUrl:'',
-            iosUrl:'',
-            pageIsEnable:0,
-            pageName:'',
-            pagePhoneIsEnable:0,
-            pageid:-1,
-            systemMenuCode:'',
-            webUrl:'',
-            modulName:'',
-            modulid:'',
-            icon:'',
-            modulRemark:'',
-            sTid:5,
-            pageRemark:'',
-        },//数据绑定对象
-        rules: {
-            pageName: [
-                { required: true, message: '请输入页面名称', trigger: 'blur' },
-            ],
-            modulid:[
-            { required: true, message: '请选中模块', trigger: 'blur' },
-            ],
-            systemMenuCode:[
-            { required: true, message: '请输入页面代码', trigger: 'blur' },
-            ]
-            ,webUrl:[
-            { required: true, message: '请输入WebUrl', trigger: 'blur' },
-            ]
-        },
-        pageBindFun:[],
-        isload:true,
-      };
+        return {
+            bufferData: {},//暂存数据
+            pageList: [], //页面数据
+            SearchInput: '', //查询的值
+            currentPage: 1, //页码
+            pageSize: 10,// 每页的数据条数
+            ModulValue: '', //模块val 
+            ModulList: [],//模块数据
+            PathUrl: '',
+            dialogVisible: false,
+            showModal: false, //测试弹层
+            dialogTitle: '测试标题',
+            pageBind: {
+                androidUrl: '',
+                iosUrl: '',
+                pageIsEnable: 0,
+                pageName: '',
+                pagePhoneIsEnable: 0,
+                pageid: -1,
+                systemMenuCode: '',
+                webUrl: '',
+                modulName: '',
+                modulid: '',
+                icon: '',
+                modulRemark: '',
+                sTid: 5,
+                pageRemark: '',
+            },//数据绑定对象
+            rules: {
+                pageName: [
+                    { required: true, message: '请输入页面名称', trigger: 'blur' },
+                ],
+                modulid: [
+                    { required: true, message: '请选中模块', trigger: 'blur' },
+                ],
+                systemMenuCode: [
+                    { required: true, message: '请输入页面代码', trigger: 'blur' },
+                ]
+                , webUrl: [
+                    { required: true, message: '请输入WebUrl', trigger: 'blur' },
+                ]
+            },
+            pageBindFun: [],
+            isload: true,
+            userId: 0,
+            token: '',
+        };
     },
     methods: {
-        pageload(){
-            var that =  this;
+        pageload() {
+            var that = this;
             this.$axios.post('/api/System/PageConfigInit', {
-                
+
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp.data.data);
@@ -232,9 +233,9 @@ export default {
                     that.bufferData = resp.data.data;
                     that.ModulList = resp.data.data.modList.data;
                     that.ModulList.unshift({
-                        'id':-1,
-                        'name':"全部模块",
-                        'sTid':-1
+                        'id': -1,
+                        'name': "全部模块",
+                        'sTid': -1
                     });
                     that.pageList = resp.data.data.viewList.data;
                 }
@@ -252,14 +253,14 @@ export default {
         Inquirechange(Pindex) {
             var that = this;
 
-            if(this.ModulValue == ''){
-                this.ModulValue = -1 ;
+            if (this.ModulValue == '') {
+                this.ModulValue = -1;
             }
 
-            if(this.ModulValue == -1){
+            if (this.ModulValue == -1) {
                 this.pageList = this.bufferData.viewList.data;
-            }else{
-                this.pageList = this.bufferData.viewList.data.filter(function(item, i, arr) {
+            } else {
+                this.pageList = this.bufferData.viewList.data.filter(function (item, i, arr) {
                     return item.modulid == that.ModulValue;
                 });
             }
@@ -275,84 +276,84 @@ export default {
             this.currentPage = val;
         },
         //搜索按钮
-        btnSearch(){
+        btnSearch() {
             this.ModulValue = -1;
             var that = this;
-            this.pageList = this.bufferData.viewList.data.filter(function(item, i, arr) {
+            this.pageList = this.bufferData.viewList.data.filter(function (item, i, arr) {
                 return item.pageName.indexOf(that.SearchInput) != -1;
             });
         },
-        addPage(){
+        addPage() {
             this.showModal = true;
-            this.dialogTitle='添加页面';
+            this.dialogTitle = '添加页面';
             this.pageBind = {
-                androidUrl:'',
-                iosUrl:'',
-                pageIsEnable:0,
-                pageName:'',
-                pagePhoneIsEnable:0,
-                pageid:-1,
-                systemMenuCode:'',
-                webUrl:'',
-                modulName:'',
-                modulid:'',
-                icon:'',
-                modulRemark:'',
-                sTid:5,
-                pageRemark:'',
+                androidUrl: '',
+                iosUrl: '',
+                pageIsEnable: 0,
+                pageName: '',
+                pagePhoneIsEnable: 0,
+                pageid: -1,
+                systemMenuCode: '',
+                webUrl: '',
+                modulName: '',
+                modulid: '',
+                icon: '',
+                modulRemark: '',
+                sTid: 5,
+                pageRemark: '',
             };
             this.PageQueryFun(-1);
         },
-        Edit(page){
+        Edit(page) {
             //this.dialogVisible = true;
             this.showModal = true;
-            this.dialogTitle='编辑页面';
-            console.log(page);  
+            this.dialogTitle = '编辑页面';
+            console.log(page);
             this.pageBind = {
-                androidUrl:page.androidUrl,
-                iosUrl:page.iosUrl,
-                pageIsEnable:page.pageIsEnable,
-                pageName:page.pageName,
-                pagePhoneIsEnable:page.pagePhoneIsEnable,
-                pageid:page.pageid,
-                systemMenuCode:page.systemMenuCode,
-                webUrl:page.webUrl,
-                modulName:page.modulName,
-                modulid:page.modulid,
-                icon:page.icon,
-                modulRemark:page.modulRemark,
-                sTid:page.sTid,
-                pageRemark:page.pageRemark,
+                androidUrl: page.androidUrl,
+                iosUrl: page.iosUrl,
+                pageIsEnable: page.pageIsEnable,
+                pageName: page.pageName,
+                pagePhoneIsEnable: page.pagePhoneIsEnable,
+                pageid: page.pageid,
+                systemMenuCode: page.systemMenuCode,
+                webUrl: page.webUrl,
+                modulName: page.modulName,
+                modulid: page.modulid,
+                icon: page.icon,
+                modulRemark: page.modulRemark,
+                sTid: page.sTid,
+                pageRemark: page.pageRemark,
             };
             this.PageQueryFun(page.pageid);
         },
-        PageSave(){
-            var that =  this;
-            if(this.pageBind.pageid == -1){
+        PageSave() {
+            var that = this;
+            if (this.pageBind.pageid == -1) {
 
-                var p = new Promise((resolve,reject)=>{
+                var p = new Promise((resolve, reject) => {
                     this.$refs.pageBind.validate((valid) => {
-                        if(valid){
+                        if (valid) {
                             resolve(true);
-                        }else{  
+                        } else {
                             reject(false);
                         }
                     });
                 })
 
-                p.then(resolve=>{
+                p.then(resolve => {
 
                     this.pageBind.FunArr = [];
                     this.pageBindFun.forEach(item => {
-                        if(item.value){
+                        if (item.value) {
                             this.pageBind.FunArr.push(item.id)
                         }
-                    });    
+                    });
 
                     //新增
                     this.$axios.post(this.PathUrl + '/api/System/AddPageInfo', this.pageBind, {
                         headers: {
-                            'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                            'Authorization': that.token,
                         }
                     }).then(resp => {
                         that.showModal = false;
@@ -362,41 +363,41 @@ export default {
                                 message: '添加成功',
                                 type: 'success'
                             });
-                        }else{
+                        } else {
                             this.$message.error(resp.data.msg);
                         }
                         that.pageload();
-                       
+
                     })
-                }).catch(err=>{
+                }).catch(err => {
                     console.log("表单验证未通过");
                 })
 
-            }else{
+            } else {
                 //修改
-                var p = new Promise((resolve,reject)=>{
+                var p = new Promise((resolve, reject) => {
                     this.$refs.pageBind.validate((valid) => {
-                        if(valid){
+                        if (valid) {
                             resolve(true);
-                        }else{
+                        } else {
                             reject(false);
                         }
                     });
                 })
 
-                p.then(resolve=>{
+                p.then(resolve => {
 
                     this.pageBind.FunArr = [];
                     this.pageBindFun.forEach(item => {
-                        if(item.value){
+                        if (item.value) {
                             this.pageBind.FunArr.push(item.id)
                         }
-                    });    
+                    });
 
                     //编辑
                     this.$axios.post(this.PathUrl + '/api/System/EditPageInfo', this.pageBind, {
                         headers: {
-                            'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                            'Authorization': that.token,
                         }
                     }).then(resp => {
                         that.showModal = false;
@@ -406,29 +407,29 @@ export default {
                                 message: '保存成功!',
                                 type: 'success'
                             });
-                        }else{
+                        } else {
                             this.$message.error(resp.data.msg);
                         }
                         that.pageload();
-                        
+
                     })
-                }).catch(err=>{
+                }).catch(err => {
                     console.log("表单验证未通过");
                 })
             }
-        
+
         },
-        Del(page){
+        Del(page) {
             let that = this;
             var dellist = [];
             dellist.push({
-                'Pageid':page.pageid,
-                'Userid':235,
+                'Pageid': page.pageid,
+                'Userid': this.userId,
             })
-            
-            this.$axios.post(this.PathUrl + '/api/System/DelPageInfo',dellist, {
+
+            this.$axios.post(this.PathUrl + '/api/System/DelPageInfo', dellist, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 if (resp.data.code == 200) {
@@ -441,47 +442,49 @@ export default {
                 }
                 that.pageload();
 
-            }).catch(err=>{
+            }).catch(err => {
                 this.$message.error('网络错误!');
             })
         },
-        PageQueryFun(pageid){
-            
+        PageQueryFun(pageid) {
+
             let that = this;
             var bindFun = [];
-            
-            this.$axios.post(this.PathUrl + '/api/System/QueryPageFunById',{
-                pageid:pageid,
-                bindFunArr:bindFun,
-                uid:235,
+
+            this.$axios.post(this.PathUrl + '/api/System/QueryPageFunById', {
+                pageid: pageid,
+                bindFunArr: bindFun,
+                uid: this.userId,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp);
                 if (resp.data.code == 200) {
                     that.pageBindFun = resp.data.data;
-                } 
+                }
 
-            }).catch(err=>{
+            }).catch(err => {
                 this.$message.error('网络错误!');
             })
         }
 
 
     },
-    mounted(){
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.pageload();
     },
     components: {
         Modal
     },
-    computed:{
-        Modulfiltr(){
-            return this.bufferData.modList.data.filter((item,i,arr)=>{
+    computed: {
+        Modulfiltr() {
+            return this.bufferData.modList.data.filter((item, i, arr) => {
                 return item.id != -1;
-            }); 
+            });
         }
     }
 }
@@ -519,17 +522,16 @@ body {
     text-align: center;
 }
 
-.el-checkbox__input.is-disabled + .el-checkbox__label {
-  color: #808080 !important;
+.el-checkbox__input.is-disabled+.el-checkbox__label {
+    color: #808080 !important;
 }
 
-.el-checkbox__input.is-disabled.is-checked + .el-checkbox__label {
-  color: #1890ff !important;
+.el-checkbox__input.is-disabled.is-checked+.el-checkbox__label {
+    color: #1890ff !important;
 }
 
 .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
-  background-color: #1890ff !important;
-  border-color: #1890ff !important;
+    background-color: #1890ff !important;
+    border-color: #1890ff !important;
 }
-
 </style>

+ 132 - 125
src/components/child/PageFunction.vue

@@ -1,7 +1,6 @@
 <template>
-    <div class="pageConfig-box"  v-loading="isload" element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)" >
+    <div class="pageConfig-box" v-loading="isload" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)">
         <div class="pageConfig-head">
             <div style="display: flex;">
                 <!-- <div>
@@ -17,61 +16,66 @@
                     <el-button type="primary" @click="btnSearch" >搜 索</el-button>
                 </div> -->
             </div>
-           <div>
-                <el-button type="primary" @click="isload=true;  pageload()"  >刷 新</el-button>
-                <el-button type="primary" @click="addPage"  >添 加</el-button>
-           </div>
+            <div>
+                <el-button type="primary" @click="isload = true; pageload()">刷 新</el-button>
+                <el-button type="primary" @click="addPage">添 加</el-button>
+            </div>
         </div>
         <div class="pageConfig-table">
-                <el-table :data="pageList.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border style="width: 100%">
-                    <el-table-column prop="functionName" label="功能名称" >
-                    </el-table-column>
-                    <el-table-column prop="functionCode" label="功能权限Code" >
-                    </el-table-column>
-                    <el-table-column prop="isEnable" label="是否启用" >
-                        <template slot-scope="scope">
-                            <el-checkbox  :true-label="1" disabled :false-label="0"  v-model="scope.row.isEnable" ></el-checkbox>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="操作" >
-                        <template slot-scope="scope">
-                            <el-button type="primary" size="small" icon="el-icon-s-tools" @click="Edit(scope.row)" >编 辑</el-button>
-                            <el-button type="danger" size="small" icon="el-icon-delete-solid"  @click="Del(scope.row)" >删 除</el-button>
-                        </template>
-                    </el-table-column>
-                </el-table>
-                <div class="block">
-                    <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                        :current-page="currentPage" :page-sizes="[5,10,14,20]" :page-size="pageSize"
-                        layout="total, sizes, prev, pager, next" :total="pageList.length">
-                    </el-pagination>
-                </div>
+            <el-table :data="pageList.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
+                style="width: 100%">
+                <el-table-column prop="functionName" label="功能名称">
+                </el-table-column>
+                <el-table-column prop="functionCode" label="功能权限Code">
+                </el-table-column>
+                <el-table-column prop="isEnable" label="是否启用">
+                    <template slot-scope="scope">
+                        <el-checkbox :true-label="1" disabled :false-label="0" v-model="scope.row.isEnable"></el-checkbox>
+                    </template>
+                </el-table-column>
+                <el-table-column label="操作">
+                    <template slot-scope="scope">
+                        <el-button type="primary" size="small" icon="el-icon-s-tools" @click="Edit(scope.row)">编
+                            辑</el-button>
+                        <el-button type="danger" size="small" icon="el-icon-delete-solid" @click="Del(scope.row)">删
+                            除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <div class="block">
+                <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[5, 10, 14, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next" :total="pageList.length">
+                </el-pagination>
+            </div>
         </div>
 
-        <Modal :title="dialogTitle" :height="300" :width="400" :show.sync="showModal" restrict-to=".is-vertical" @close="showModal = false" >
+        <Modal :title="dialogTitle" :height="300" :width="400" :show.sync="showModal" restrict-to=".is-vertical"
+            @close="showModal = false">
             <template v-slot:content>
                 <div style="    padding: 10px;">
                     <el-form label-position="left" label-width="100px" :model="pageBind" :rules="rules" ref="pageBind">
                         <el-row :gutter="20">
                             <el-col :span="24">
-                                <el-form-item label="功能名称" prop="functionName" >
+                                <el-form-item label="功能名称" prop="functionName">
                                     <el-input v-model="pageBind.functionName"></el-input>
                                 </el-form-item>
                             </el-col>
                         </el-row>
                         <el-row :gutter="20">
                             <el-col :span="24">
-                                <el-form-item label="功能Code" prop="functionCode" >
+                                <el-form-item label="功能Code" prop="functionCode">
                                     <el-input v-model="pageBind.functionCode"></el-input>
                                 </el-form-item>
                             </el-col>
                         </el-row>
-                        <br/>
+                        <br />
                         <el-row :gutter="20">
                             <el-col :span="24">
-                                <el-checkbox label="是否启用" :true-label="1"  :false-label="0" v-model="pageBind.isEnable"></el-checkbox>
+                                <el-checkbox label="是否启用" :true-label="1" :false-label="0"
+                                    v-model="pageBind.isEnable"></el-checkbox>
                             </el-col>
-                        </el-row>                     
+                        </el-row>
                     </el-form>
                 </div>
             </template>
@@ -92,53 +96,55 @@ import Modal from '../template/dialog.vue';
 
 export default {
     data() {
-      return {
-        bufferData:{},//暂存数据
-        pageList:[], //页面数据
-        SearchInput:'', //查询的值
-        currentPage : 1 , //页码
-        pageSize: 5,// 每页的数据条数
-        PathUrl:'',
-        showModal: false, //测试弹层
-        dialogTitle:'测试标题',
-        pageBind:{
-            id:-1,
-            functionCode:'',
-            functionName:'',
-            isEnable:0,
-        },//数据绑定对象
-        rules: {
-            functionName: [
-                { required: true, message: '请输入操作名称', trigger: 'blur' },
-            ],
-            functionCode:[
-            { required: true, message: '请输入操作code', trigger: 'blur' },
-            ],
-        },
-        isload:true,
-      };
+        return {
+            bufferData: {},//暂存数据
+            pageList: [], //页面数据
+            SearchInput: '', //查询的值
+            currentPage: 1, //页码
+            pageSize: 5,// 每页的数据条数
+            PathUrl: '',
+            showModal: false, //测试弹层
+            dialogTitle: '测试标题',
+            pageBind: {
+                id: -1,
+                functionCode: '',
+                functionName: '',
+                isEnable: 0,
+            },//数据绑定对象
+            rules: {
+                functionName: [
+                    { required: true, message: '请输入操作名称', trigger: 'blur' },
+                ],
+                functionCode: [
+                    { required: true, message: '请输入操作code', trigger: 'blur' },
+                ],
+            },
+            isload: true,
+            userId: 0,
+            token: '',
+        };
     },
     methods: {
-        pageload(){
-            var that =  this;
+        pageload() {
+            var that = this;
             this.$axios.post(this.PathUrl + '/api/System/PageFunInit', {
-                
+
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 console.log(resp.data.data);
                 if (resp.data.code == 200) {
-                   that.pageList = resp.data.data;
+                    that.pageList = resp.data.data;
                 }
 
-                if(that.pageList.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0){
-                    if(that.currentPage > 1){
+                if (that.pageList.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
+                    if (that.currentPage > 1) {
                         that.currentPage = that.currentPage - 1;
                     }
                 }
-                
+
                 that.isload = false;
             })
 
@@ -152,52 +158,52 @@ export default {
         handleCurrentChange(val) {
             this.currentPage = val;
         },
-        addPage(){
+        addPage() {
             this.showModal = true;
-            this.dialogTitle='添加页面';
+            this.dialogTitle = '添加页面';
             this.pageBind = {
-                id:-1,
-                functionCode:'',
-                functionName:'',
-                isEnable:0,
+                id: -1,
+                functionCode: '',
+                functionName: '',
+                isEnable: 0,
             };
         },
-        Edit(page){
+        Edit(page) {
             //this.dialogVisible = true;
             this.showModal = true;
-            this.dialogTitle='编辑页面';
-            console.log(page);  
+            this.dialogTitle = '编辑页面';
+            console.log(page);
             this.pageBind = {
-                id:page.id,
-                functionCode:page.functionCode,
-                functionName:page.functionName,
-                isEnable:page.isEnable,
+                id: page.id,
+                functionCode: page.functionCode,
+                functionName: page.functionName,
+                isEnable: page.isEnable,
             };
         },
-        PageSave(){
-            var that =  this;
+        PageSave() {
+            var that = this;
             //添加
-            if(this.pageBind.id == -1){
+            if (this.pageBind.id == -1) {
 
-                var p = new Promise((resolve,reject)=>{
+                var p = new Promise((resolve, reject) => {
                     this.$refs.pageBind.validate((valid) => {
-                        if(valid){
+                        if (valid) {
                             resolve(true);
-                        }else{  
+                        } else {
                             reject(false);
                         }
                     });
                 })
 
-                p.then(resolve=>{
+                p.then(resolve => {
 
                     this.pageBind.Status = 1;
-                    this.pageBind.CreateUserId = 235;
+                    this.pageBind.CreateUserId = this.userId;
                     this.pageBind.Remark = '';
                     //新增
                     this.$axios.post(this.PathUrl + '/api/System/OperationFun', this.pageBind, {
                         headers: {
-                            'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                            'Authorization': that.token,
                         }
                     }).then(resp => {
                         that.showModal = false;
@@ -207,38 +213,38 @@ export default {
                                 message: '添加成功',
                                 type: 'success'
                             });
-                        }else{
+                        } else {
                             this.$message.error(resp.data.msg);
                         }
                         that.pageload();
-                       
+
                     })
-                }).catch(err=>{
+                }).catch(err => {
                     console.log("表单验证未通过");
                 })
 
-            }else{
+            } else {
                 //修改
-                var p = new Promise((resolve,reject)=>{
+                var p = new Promise((resolve, reject) => {
                     this.$refs.pageBind.validate((valid) => {
-                        if(valid){
+                        if (valid) {
                             resolve(true);
-                        }else{
+                        } else {
                             reject(false);
                         }
                     });
                 })
 
-                p.then(resolve=>{
+                p.then(resolve => {
 
                     this.pageBind.Status = 2;
-                    this.pageBind.CreateUserId = 235;
+                    this.pageBind.CreateUserId = this.userId;
                     this.pageBind.Remark = '';
 
                     //编辑
                     this.$axios.post(this.PathUrl + '/api/System/OperationFun', this.pageBind, {
                         headers: {
-                            'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                            'Authorization': that.token,
                         }
                     }).then(resp => {
                         that.showModal = false;
@@ -248,27 +254,27 @@ export default {
                                 message: '保存成功!',
                                 type: 'success'
                             });
-                        }else{
+                        } else {
                             this.$message.error(resp.data.msg);
                         }
                         that.pageload();
-                        
+
                     })
-                }).catch(err=>{
+                }).catch(err => {
                     console.log("表单验证未通过");
                 })
             }
-        
+
         },
-        Del(page){
+        Del(page) {
             let that = this;
-            
-            this.$axios.post(this.PathUrl + '/api/System/DelFun',{
-                'Id':page.id,
-                'DeleteUserId':235,
+
+            this.$axios.post(this.PathUrl + '/api/System/DelFun', {
+                'Id': page.id,
+                'DeleteUserId': that.userId,
             }, {
                 headers: {
-                    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IkZ1dHVyZSIsImV4cCI6MTY3OTU0MjgwNSwiaXNzIjoiT0FTeXN0ZW0uY29tIiwiYXVkIjoiT0FTeXN0ZW0uY29tIn0.iy5SUInq1p3yjZultRPyzCa2ekLeepSdMLxvPwXY6MI',
+                    'Authorization': that.token,
                 }
             }).then(resp => {
                 if (resp.data.code == 200) {
@@ -279,25 +285,27 @@ export default {
                 } else {
                     this.$message.error('删除失败!' + resp.data.msg);
                 }
-                
+
                 that.pageload();
 
-            }).catch(err=>{
+            }).catch(err => {
                 this.$message.error('网络错误!');
             })
         },
     },
-    mounted(){
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
         this.pageload();
     },
     components: {
         Modal
     },
-    computed:{
-        Modulfiltr(){
-            return this.bufferData.modList.data.filter((item,i,arr)=>{
+    computed: {
+        Modulfiltr() {
+            return this.bufferData.modList.data.filter((item, i, arr) => {
                 return item.id != -1;
-            }); 
+            });
         }
     }
 }
@@ -335,17 +343,16 @@ body {
     text-align: center;
 }
 
-.el-checkbox__input.is-disabled + .el-checkbox__label {
-  color: #808080 !important;
+.el-checkbox__input.is-disabled+.el-checkbox__label {
+    color: #808080 !important;
 }
 
-.el-checkbox__input.is-disabled.is-checked + .el-checkbox__label {
-  color: #1890ff !important;
+.el-checkbox__input.is-disabled.is-checked+.el-checkbox__label {
+    color: #1890ff !important;
 }
 
 .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
-  background-color: #1890ff !important;
-  border-color: #1890ff !important;
+    background-color: #1890ff !important;
+    border-color: #1890ff !important;
 }
-
 </style>

+ 20 - 4
src/router/index.js

@@ -73,6 +73,9 @@ import DelegationEnData from '@/components/OP/DelegationEnData'
 import OpDelegationEnData from '@/components/OP/OpDelegationEnData'
 import invitationLetter from '@/components/Resource/invitationLetter'
 import EntryDetails from '@/components/OP/EntryDetails'
+import TicketBlackCode from '@/components/Resource/TicketBlackCode'
+import OpTicketBlackCode from '@/components/Resource/OpTicketBlackCode'
+
 Vue.use(Router)
 
 export default new Router({
@@ -416,18 +419,31 @@ export default new Router({
           component: invitationLetter
         },
         {
-          path: '/home/EntryDetails',
-          name: 'EntryDetails',
-          component: EntryDetails
+          path: '/home/TicketBlackCode',
+          name: 'TicketBlackCode',
+          component: TicketBlackCode
+        },
+        {
+          path: '/home/OpTicketBlackCode',
+          name: 'OpTicketBlackCode',
+          component: OpTicketBlackCode
         },
         {
           path: '/home/HotelReservations',
           name: 'HotelReservations',
           component: HotelReservations
-        }
+        },
+        {
+          path: '/home/EntryDetails',
+          name: 'EntryDetails',
+          component: EntryDetails
+        },
       ]
     },
     {
+
+
+
       path: '/Enroll',
       name: 'Enroll',
       component: Enroll