Pārlūkot izejas kodu

新增op费用详细填写相关页面及接口调用

wangh 1 gadu atpakaļ
vecāks
revīzija
e170ae691f

+ 416 - 0
src/components/OP/CarTouristGuideGrounContent.vue

@@ -0,0 +1,416 @@
+<template>
+    <div class="car_add">
+        <div>
+            <div class="communal-title">
+                <div>OP费用填写明细</div>
+            </div>
+        </div>
+        <el-skeleton :rows="28" animated :loading="loading">
+            <div style="display: flex;justify-content: space-between;">
+                <div style="width: 80%;display: flex;">
+                    <div style="width: 25%;">
+                        <el-select v-model="diId" placeholder="团组选择" clearable filterable style="width: 100%;"
+                            :disabled="true">
+                            <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
+                                :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-select v-model="currency" placeholder="币种选择" clearable filterable style="width: 80%;">
+                            <el-option v-for="item in currencyList" :key="item.id"
+                                :label="item.name + '(' + item.remark + ')'" :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </div>
+                </div>
+            </div>
+            <div style="margin:10px 0;color:#606266;font-size:12px;">
+                <span style="font-weight: bold;font-size:12px;">团队名称:</span>
+                <span style="color:#606266;">{{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;</span>
+                <span style="font-weight: bold;font-size:12px;">客户:</span>
+                <span style="color:#606266;font-size:12px;">{{ delegationInfo.clientName }}&nbsp;&nbsp;&nbsp; </span>
+                <span style="font-weight: bold;font-size:12px;">出访国家:</span>
+                <span style="color:#606266;font-size:12px;">{{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;</span>
+                <span style="font-weight: bold;font-size:12px;">起止日期:</span>
+                <span style="color:#606266;font-size:12px;">{{ VisitDate }}&nbsp;&nbsp;&nbsp;</span>
+                <span style="font-weight: bold;font-size:12px;">天数/人数:</span>
+                <span style="color:#606266;font-size:12px;">{{ delegationInfo.visitDays }}天/{{
+                    delegationInfo.visitPNumber }}人</span>
+            </div>
+            <hr style='background-color:#5555; height:1px; border:none;' />
+            <div>
+                <template>
+                    <el-table :data="ContenList" border style="width: 100%">
+                        <el-table-column prop="num" label="序 号" width="55">
+                            <template slot-scope="scope">
+                                {{ scope.$index + 1 }}
+
+                            </template>
+                        </el-table-column>
+                        <el-table-column prop="SIdName" label="费用项目" width="100">
+                            <template slot-scope="scope">
+                                <span style="display: none;">{{ scope.row.sId }}</span>{{ scope.row.sIdName }}
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="金额币种">
+                            <template slot-scope="scope">
+                                <el-input placeholder="请输入金额" v-model="scope.row.price" clearable style="width:180px;" />
+                                <el-select v-model="currency" placeholder="币种选择" clearable filterable style="width:120px"
+                                    :disabled="true">
+                                    <el-option v-for="item in currencyList" :key="item.id" :label="item.name"
+                                        :value="item.id">
+                                    </el-option>
+                                </el-select>
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="费用明细">
+                            <template slot-scope="scope">
+                                <el-input type="textarea" :rows="1" placeholder="费用明细"
+                                    v-model="scope.row.priceContent"></el-input>
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="备注">
+                            <template slot-scope="scope">
+                                <el-input type="textarea" :rows="1" placeholder="备注" v-model="scope.row.remark"></el-input>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                    <hr style='background-color:#5555; height:1px; border:none;' />
+                    <el-form :model="OPContenData" ref="OPContenData" :rules="OPContenDataRules" label-width="100px"
+                        class="demo-ruleForm">
+                        <div style="display: flex;">
+
+                            <div style="width: 25%;">
+                                <el-form-item label="此次付款百分百:" prop="payPercentage" label-width="160px">
+                                    <el-input placeholder="此次付款百分百" v-model="OPContenData.payPercentage">
+                                        <template slot="append">%</template>
+                                    </el-input>
+                                </el-form-item>
+                            </div>
+                            <div style="width: 25%;">
+                                <el-form-item label="收款方:" prop="payee" label-width="160px">
+                                    <el-input placeholder="联系电话" v-model="OPContenData.payee">
+                                    </el-input>
+                                </el-form-item>
+                            </div>
+                            <div style="width: 25%;">
+                                <el-form-item label="费用表示:" prop="orbitalPrivateTransfer" label-width="160px">
+                                    <el-select v-model="OPContenData.orbitalPrivateTransfer" clearable filterable
+                                        placeholder="费用标识" style="width: 220px;">
+                                        <el-option :key=0 :value="0" label="公转"></el-option>
+                                        <el-option :key=1 :value="1" label="私转"></el-option>
+                                    </el-select>
+                                </el-form-item>
+                            </div>
+                            <div style="width: 25%;">
+                                <el-form-item label="支付方式:" prop="payDId" label-width="160px">
+                                    <el-select v-model="OPContenData.payDId" placeholder="支付方式" clearable filterable
+                                        style="width:120px">
+                                        <el-option v-for="item in payment" :key="item.id" :label="item.name"
+                                            :value="item.id">
+                                        </el-option>
+                                    </el-select>
+                                </el-form-item>
+                            </div>
+                        </div>
+                        <el-form-item>
+                            <el-form-item>
+                                <div style="margin-left: 80%;">
+                                    <el-button type="primary" @click="addBtn">保存</el-button>
+                                    <el-button @click="EscAdd">取消</el-button>
+                                </div>
+                            </el-form-item>
+                        </el-form-item>
+                    </el-form>
+
+                </template>
+
+            </div>
+        </el-skeleton>
+    </div>
+</template>
+<script>
+import { dE } from '@fullcalendar/core/internal-common'
+export default {
+    data() {
+        return {
+            token: '',
+            userId: 0,
+            id: '',
+            diId: '',
+            loading: true,
+            currency: 836,
+            delegationInfo: {},
+            delegationInfoList: [],//团组下拉框
+            currencyList: [],
+            tableInitialization: [],
+            payment: [],
+            IsAuditGM: 0,
+            ContenList: [],
+            OPContenData: {
+                diId: '',
+                cTGGRId: '',
+                orbitalPrivateTransfer: 0,
+                payPercentage: '80',
+                payee: '',
+                payDId: '',
+                currency: '',
+                OPContenList: [],
+                CreateUserId: 0
+            },
+            OPContenDataRules: {
+                payPercentage: [
+                    { required: true, message: '请输入付款百分百', trigger: ['blur', 'change'] },
+                ],
+                orbitalPrivateTransfer: [
+                    { required: true, message: '请选择费用标识', trigger: ['blur', 'change'] },
+                ],
+                payee: [
+                    { required: true, message: '请输入收款方', trigger: ['blur', 'change'] },
+                ],
+                payDId: [
+                    { required: true, message: '请选择付款方式', trigger: ['blur', 'change'] },
+                ]
+            },
+            VisitDate: '',
+            dateFormat: function (value) {
+
+                // 将value转换为Date对象
+                var date = new Date(value);
+                // 获取年、月、日
+                var year = date.getFullYear();
+                var month = date.getMonth() + 1;
+                var day = date.getDate();
+                // 将月份和日期转换为两位数的格式
+
+                if (month < 10) {
+                    month = '0' + month;
+                }
+                if (day < 10) {
+                    day = '0' + day;
+                }
+                // 返回格式化后的日期字符串
+                return year + '-' + month + '-' + day;
+            },
+        }
+    },
+    methods: {
+        //初始化下拉框
+        initializeSelect() {
+            //团组下拉框绑定
+            var url = "/api/Groups/CarTouristGuideGroundContenInitialize"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    userId: that.userId,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    debugger
+                    that.delegationInfoList = res.data.data.delegations;
+                    for (let index = 0; index < that.delegationInfoList.length; index++) {
+                        debugger
+                        if (that.delegationInfoList[index].id == that.diId) {
+                            that.delegationInfo = that.delegationInfoList[index];
+                            that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                            break;
+                        }
+                    }
+                    that.currencyList = res.data.data.currencyList;
+                    debugger
+                    that.tableInitialization = res.data.data.tableInitialization;
+                    that.tableInitialization.forEach(function (item) {
+                        that.ContenList.push({
+                            id: 0,
+                            sId: item.id,
+                            sIdName: item.name,
+                            price: '0.00',
+                            priceContent: '',
+                            remark: '',
+                        })
+                    });
+                    that.payment = res.data.data.payment;
+                    that.OpCarTouristGuideGroundContenById()
+                }
+
+            })
+
+        },
+        OpCarTouristGuideGroundContenById() {
+            var url = "/api/Groups/OpCarTouristGuideGroundContenById"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    id: that.id
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    debugger
+                    var CreditCardPayment = res.data.data.creditCardPayment;
+                    if (CreditCardPayment != null) {
+                        that.OPContenData.payDId = CreditCardPayment.payDId
+                        that.OPContenData.payee = CreditCardPayment.payee
+                        that.currency = CreditCardPayment.paymentCurrency
+                        that.OPContenData.payPercentage = CreditCardPayment.payPercentage
+                    }
+                    var CarTouristsConten = res.data.data.carTouristsConten;
+                    if (CarTouristsConten.length != 0) {
+                        CarTouristsConten.forEach(function (item) {
+                            that.ContenList.forEach(function (item1) {
+                                if (item.sId == item1.sId) {
+                                    item1.id = item.id
+                                    item1.price = item.price
+                                    item1.priceContent = item.priceContent
+                                    item1.remark = item.remark
+                                }
+
+                            })
+                        })
+                    }
+                    var CarTourists = res.data.data.carTourists
+                    if (CarTourists != null) {
+                        that.OPContenData.orbitalPrivateTransfer = CarTourists.orbitalPrivateTransfer
+                    }
+                    that.loading = false
+                }
+            })
+        },
+        addBtn() {
+            if (this.IsAuditGM == 1) {
+                this.$message.error('已通过审核,不可修改!');
+            } else {
+                debugger
+                if (this.diId == null && this.diId == undefined && this.diId == "") {
+                    this.$message.error("请选择团组名称");
+                    return;
+                } else {
+                    var that = this
+                    that.$refs.OPContenData.validate((valid) => {
+                        if (valid) {
+                            that.OPContenData.diId = that.diId
+                            that.OPContenData.cTGGRId = that.id
+                            that.OPContenData.currency = that.currency
+                            that.OPContenData.CreateUserId = that.userId
+                            that.ContenList.forEach(function (item) {
+                                that.OPContenData.OPContenList.push({
+                                    id: item.id,
+                                    sId: item.sId,
+                                    price: item.price,
+                                    priceContent: item.priceContent,
+                                    remark: item.remark,
+                                })
+                            })
+
+                            var url = "/api/Groups/OpCarTouristGuideGroundConten"
+                            that.$axios({
+                                method: 'post',
+                                url: url,
+                                headers: {
+                                    Authorization: 'Bearer ' + that.token
+                                },
+                                data: that.OPContenData
+                            }).then(function (res) {
+                                if (res.data.code == 200) {
+                                    that.$message({
+                                        message: res.data.msg,
+                                        type: 'success'
+                                    });
+                                } else {
+                                    that.$message.error(res.data.msg);
+                                }
+                            })
+                        } else {
+                            this.$message.error('请完善信息在保存!');
+                            return false;
+                        }
+                    })
+                }
+            }
+        },
+        EscAdd() {
+            this.$router.push({
+                path: "/home/CarTouristGuideGroundId",
+                query: {
+                    diId: this.diId
+                }
+            })
+        }
+    },
+
+    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.initializeSelect();
+        //this.OpCarTouristGuideGroundContenById();
+
+    }
+}
+</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>

+ 52 - 14
src/components/OP/CarTouristGuideGroundId.vue

@@ -41,12 +41,12 @@
             <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">
+                    <el-table-column prop="num" label="序 号">
                         <template slot-scope="scope">
                             {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
                         </template>
                     </el-table-column>
-                    <el-table-column prop="area" label="地区	">
+                    <el-table-column prop="area" label="地区">
                     </el-table-column>
                     <el-table-column prop="serviceGuide" label="服务导游">
                     </el-table-column>
@@ -56,17 +56,30 @@
                     </el-table-column>
                     <el-table-column prop="busTel" label="Bus联系电话">
                     </el-table-column>
-                    <el-table-column prop="serviceStartTime" label="服务时间起">
-                    </el-table-column>
-                    <el-table-column prop="serviceEndTime" label="服务时间止">
+                    <el-table-column prop="serviceStartTime" label="服务时间起止">
+                        <template slot-scope="scope">
+                            {{ scope.row.serviceStartTime }}至{{ scope.row.serviceEndTime }}
+                        </template>
                     </el-table-column>
                     <el-table-column prop="serviceQuotedPrice" label="服务报价">
+                        <template slot-scope="scope">
+                            {{ scope.row.serviceQuotedPrice }} {{ scope.row.currencyStr }}
+                        </template>
                     </el-table-column>
                     <el-table-column prop="payPercentage" label="付款百分比">
+                        <template slot-scope="scope">
+                            {{ scope.row.payPercentage }}%
+                        </template>
                     </el-table-column>
                     <el-table-column prop="payThenMoney" label="此次付款金额">
+                        <template slot-scope="scope">
+                            {{ scope.row.payThenMoney }} {{ scope.row.currencyStr }}
+                        </template>
                     </el-table-column>
                     <el-table-column prop="remainingBalance" label="尾款金额">
+                        <template slot-scope="scope">
+                            {{ scope.row.remainingBalance }} {{ scope.row.currencyStr }}
+                        </template>
                     </el-table-column>
                     <el-table-column prop="isAuditGM" label="是否审核">
                         <template slot-scope="isAuditGM">
@@ -78,14 +91,18 @@
                     </el-table-column>
                     <el-table-column prop="id" label="详细费用">
                         <template slot-scope="scope">
-                            <a @click="AddDetails(scope.row.id)">填写</a>
+                            <a @click="AddDetails(scope.row.id)">点击填写</a>
                         </template>
 
                     </el-table-column>
                     <el-table-column label="操作">
                         <template slot-scope="scope">
-                            <el-button size="mini" @click="upDate(scope.$index, scope.row)">编辑</el-button>
-                            <el-button size="mini" type="danger" @click="del(scope.$index, scope.row)">删除</el-button>
+                            <el-button-group>
+                                <el-button type="primary" size="mini" icon="el-icon-edit"
+                                    @click="upDate(scope.$index, scope.row)"></el-button>
+                                <el-button type="danger" size="mini" icon="el-icon-delete"
+                                    @click="del(scope.$index, scope.row)"></el-button>
+                            </el-button-group>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -145,11 +162,24 @@ export default {
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
+                    debugger
                     debugger
                     that.delegationInfoList = res.data.data.groupName;
-                    that.delegationInfo = that.delegationInfoList[0]
-                    that.DiId = that.delegationInfoList[0].id;
-                    that.delegationInfo = that.delegationInfoList[0];
+                    that.DiId = that.$route.query.diId
+                    if (that.DiId == undefined) {
+                        that.delegationInfo = that.delegationInfoList[0]
+                        that.DiId = that.delegationInfoList[0].id;
+                    } else {
+                        for (let index = 0; index < that.delegationInfoList.length; index++) {
+                            debugger
+                            if (that.delegationInfoList[index].id == that.DiId) {
+                                that.delegationInfo = that.delegationInfoList[index];
+                                that.DiId = that.delegationInfoList[index].id;
+                                break;
+                            }
+                        }
+                    }
+
                     that.QueryCarTouristGuideGroundByDiId()
                 }
             }).catch(function (error) {
@@ -201,12 +231,19 @@ export default {
             });
         },
         //填写详细费用
-        deleSelect(id) {
+        AddDetails(id) {
+            this.$router.push({
+                path: "/home/CarTouristGuideGrounContent",
+                query: {
+                    id: id,
+                    diId: this.DiId,
+                }
+            })
 
         },
         upDate(index, row) {
             this.$router.push({
-                path: "/home/OpVisaPriec",
+                path: "/home/OpCarTouristGuideGroundId",
                 query: {
                     DiId: this.DiId,
                     id: row.id
@@ -218,7 +255,7 @@ export default {
             debugger
             if (this.DiId != 0 && this.DiId != '' && this.DiId != undefined) {
                 this.$router.push({
-                    path: "/home/OpVisaPriec",
+                    path: "/home/OpCarTouristGuideGroundId",
                     query: {
                         DiId: this.DiId,
                     }
@@ -275,6 +312,7 @@ export default {
     mounted() {
         this.token = JSON.parse(localStorage.getItem('userinif')).token;
         this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+
         this.deleSelect();
         //this.AirTicketResList()
     }

+ 435 - 0
src/components/OP/OpCarTouristGuideGroundId.vue

@@ -0,0 +1,435 @@
+<template>
+    <div class="car_add">
+        <div>
+            <div class="communal-title">
+                <div>{{ title }}</div>
+            </div>
+        </div>
+        <hr style='background-color:#5555; height:1px; border:none;' />
+        <div>
+            <el-form :model="delegationInfo" label-width="100px" class="demo-ruleForm">
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="团组名称:" label-width="160px">
+                            <el-select v-model="OpCarTouristGuideGroundData.diId" clearable filterable placeholder="团组选择"
+                                :disabled="isShow" style="width: 220px;" @change="DiIdSelectChange">
+                                <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="团 号:" prop="tourCode" label-width="160px">
+                            <el-input placeholder="团号" v-model="delegationInfo.tourCode" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="客户:" prop="clientName" label-width="160px">
+                            <el-input placeholder="客户" v-model="delegationInfo.clientName" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="出访国家:" prop="visitCountry" label-width="160px">
+                            <el-input placeholder="出访国家" v-model="delegationInfo.visitCountry" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="出访时间:" label-width="160px">
+                            <el-input placeholder="出访时间" v-model="VisitDate" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="出访人数:" label-width="160px">
+                            <el-input placeholder="出访人数" v-model="delegationInfo.visitPNumber" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="出访天数:" label-width="160px">
+                            <el-input placeholder="出访天数" v-model="delegationInfo.visitDays" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+            </el-form>
+            <el-form :model="OpCarTouristGuideGroundData" ref="OpCarTouristGuideGroundData"
+                :rules="OpCarTouristGuideGroundDataRules" label-width="100px" class="demo-ruleForm">
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="地区:" prop="area" label-width="160px">
+                            <el-input placeholder="地区" v-model="OpCarTouristGuideGroundData.area">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="服务时间起:" prop="serviceStartTime" label-width="160px">
+                            <el-date-picker v-model="OpCarTouristGuideGroundData.serviceStartTime" type="date"
+                                value-format="yyyy-MM-dd" placeholder="服务时间起">
+                            </el-date-picker>
+
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="服务时间止:" prop="serviceEndTime" label-width="160px">
+                            <el-date-picker v-model="OpCarTouristGuideGroundData.serviceEndTime" type="date"
+                                value-format="yyyy-MM-dd" placeholder="服务时间止">
+                            </el-date-picker>
+
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="服务公司:" prop="serviceCompany" label-width="160px">
+                            <el-input placeholder="服务公司" v-model="OpCarTouristGuideGroundData.serviceCompany">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="地接导游:" prop="serviceGuide" label-width="160px">
+                            <el-input placeholder="地接导游" v-model="OpCarTouristGuideGroundData.serviceGuide">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="联系电话:" prop="serviceTel" label-width="160px">
+                            <el-input placeholder="联系电话" v-model="OpCarTouristGuideGroundData.serviceTel">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="Bus名称:" prop="busName" label-width="160px">
+                            <el-input placeholder="Bus名称" v-model="OpCarTouristGuideGroundData.busName">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="联系电话:" prop="busTel" label-width="160px">
+                            <el-input placeholder="联系电话" v-model="OpCarTouristGuideGroundData.busTel">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="费用表示:" prop="orbitalPrivateTransfer" label-width="160px">
+                            <el-select v-model="OpCarTouristGuideGroundData.orbitalPrivateTransfer" clearable filterable
+                                placeholder="费用标识" style="width: 220px;">
+                                <el-option :key=0 :value="0" label="公转"></el-option>
+                                <el-option :key=1 :value="1" label="私转"></el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 100%;">
+                        <el-form-item label="Bus描述:" prop="busDescription" label-width="160px">
+                            <el-input type="textarea" :rows="2" placeholder="Bus描述"
+                                v-model="OpCarTouristGuideGroundData.busDescription"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 100%;">
+                        <el-form-item label="服务描述:" prop="serviceDescription" label-width="160px">
+                            <el-input type="textarea" :rows="2" placeholder="服务描述"
+                                v-model="OpCarTouristGuideGroundData.serviceDescription"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 100%;">
+                        <el-form-item label="备 注:" prop="remark" label-width="160px">
+                            <el-input type="textarea" :rows="5" placeholder="备注"
+                                v-model="OpCarTouristGuideGroundData.remark"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <el-form-item>
+                    <div style="margin-left: 60%;">
+                        <el-button type="primary" @click="addBtn">保存</el-button>
+                        <el-button @click="EscAdd">取消</el-button>
+                    </div>
+                </el-form-item>
+            </el-form>
+        </div>
+    </div>
+</template>
+<script>
+import { dE } from '@fullcalendar/core/internal-common';
+export default {
+    data() {
+        return {
+            title: "新增Op费用",
+            token: '',
+            userId: 0,
+            isShow: false,
+            delegationInfo: {},
+            delegationInfoList: [],//团组下拉框
+            OpCarTouristGuideGroundData: {
+                status: 0,
+                id: 0,
+                diId: 0,
+                area: '',
+                serviceCompany: '',
+                serviceGuide: '',
+                serviceTel: '',
+                busName: '',
+                busDescription: '',
+                busTel: '',
+                serviceStartTime: '',
+                serviceEndTime: '',
+                serviceDescription: '',
+                orbitalPrivateTransfer: 0,
+                createUserId: 0,
+                remark: ''
+            },
+            IsAuditGM: 0,
+            VisitDate: '',
+            dateFormat: function (value) {
+
+                // 将value转换为Date对象
+                var date = new Date(value);
+                // 获取年、月、日
+                var year = date.getFullYear();
+                var month = date.getMonth() + 1;
+                var day = date.getDate();
+                // 将月份和日期转换为两位数的格式
+
+                if (month < 10) {
+                    month = '0' + month;
+                }
+                if (day < 10) {
+                    day = '0' + day;
+                }
+                // 返回格式化后的日期字符串
+                return year + '-' + month + '-' + day;
+            },
+            OpCarTouristGuideGroundDataRules: {
+                area: [
+                    { required: true, message: '请输入地区', trigger: ['blur', 'change'] },
+                ],
+                serviceCompany: { required: true, message: '请输入服务公司', trigger: ['blur', 'change'] },
+                serviceGuide: { required: true, message: '请输入服务导游', trigger: ['blur', 'change'] },
+                serviceTel: { required: true, message: '请输入导游地接联系电话', trigger: ['blur', 'change'] },
+                busName: { required: true, message: '请输入Bus名称', trigger: ['blur', 'change'] },
+                busTel: { required: true, message: '请输入车公司联系电话', trigger: ['blur', 'change'] },
+                serviceStartTime: { required: true, message: '请输入服务时间起', trigger: ['blur', 'change'] },
+                serviceEndTime: { required: true, message: '请输入服务时间止', trigger: ['blur', 'change'] },
+                orbitalPrivateTransfer: { required: true, message: '请输选择费用表示', trigger: ['blur', 'change'] },
+            }
+        }
+    },
+    methods: {
+        //初始化下拉框
+        initializeSelect() {
+            //团组下拉框绑定
+            var url = "/api/Groups/DecreasePaymentsSelect"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    userId: that.userId,
+                    ctId: 79
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    debugger
+                    that.delegationInfoList = res.data.data.groupName;
+                    for (let index = 0; index < that.delegationInfoList.length; index++) {
+                        debugger
+                        if (that.delegationInfoList[index].id == that.OpCarTouristGuideGroundData.diId) {
+                            that.delegationInfo = that.delegationInfoList[index];
+                            that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                            break;
+                        }
+                    }
+                }
+            })
+        },
+        DiIdSelectChange() {
+            var that = this;
+            for (let index = 0; index < that.delegationInfoList.length; index++) {
+                if (that.delegationInfoList[index].id == that.OpCarTouristGuideGroundData.diId) {
+                    that.delegationInfo = that.delegationInfoList[index];
+
+                    that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                    break;
+                }
+            }
+        },
+        //根据Id获取单挑数据及C表数据
+        QueryCarTouristGuideGroundById() {
+            var url = "/api/Groups/QueryCarTouristGuideGroundById"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    id: that.OpCarTouristGuideGroundData.id
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    debugger
+                    var CreditCardPayment = res.data.data.creditCardPayment;
+                    var carTouristGuideGround = res.data.data.carTouristGuideGround;
+                    if (CreditCardPayment != null) {
+                        that.IsAuditGM = CreditCardPayment.isAuditGM;
+                    }
+
+                    that.OpCarTouristGuideGroundData.area = carTouristGuideGround.area
+                    that.OpCarTouristGuideGroundData.serviceCompany = carTouristGuideGround.serviceCompany
+                    that.OpCarTouristGuideGroundData.serviceGuide = carTouristGuideGround.serviceGuide
+                    that.OpCarTouristGuideGroundData.serviceTel = carTouristGuideGround.serviceTel
+                    that.OpCarTouristGuideGroundData.busName = carTouristGuideGround.busName
+                    that.OpCarTouristGuideGroundData.busDescription = carTouristGuideGround.busDescription
+                    that.OpCarTouristGuideGroundData.busTel = carTouristGuideGround.busTel
+                    that.OpCarTouristGuideGroundData.serviceStartTime = carTouristGuideGround.serviceStartTime
+                    that.OpCarTouristGuideGroundData.serviceEndTime = carTouristGuideGround.serviceEndTime
+                    that.OpCarTouristGuideGroundData.serviceDescription = carTouristGuideGround.serviceDescription
+                    that.OpCarTouristGuideGroundData.orbitalPrivateTransfer = carTouristGuideGround.orbitalPrivateTransfer
+                    that.OpCarTouristGuideGroundData.remark = carTouristGuideGround.remark
+                }
+            })
+        },
+        addBtn() {
+            if (this.IsAuditGM == 1) {
+                this.$message.error('已通过审核,不可修改!');
+            } else {
+                if (this.OpCarTouristGuideGroundData.diId == null && this.OpCarTouristGuideGroundData.diId == undefined && this.OpCarTouristGuideGroundData.diId == "") {
+                    this.$message.error("请选择团组名称");
+                    return;
+                } else {
+                    const that = this;
+                    that.$refs.OpCarTouristGuideGroundData.validate((valid) => {
+                        if (valid) {
+                            var url = "/api/Groups/OpCarTouristGuideGround"
+                            that.$axios({
+                                method: 'post',
+                                url: url,
+                                headers: {
+                                    Authorization: 'Bearer ' + that.token
+                                },
+                                data: that.OpCarTouristGuideGroundData
+                            }).then(function (res) {
+                                if (res.data.code == 200) {
+                                    that.$message({
+                                        message: res.data.msg,
+                                        type: 'success'
+                                    });
+                                    setTimeout(() => {
+                                        that.$router.push('/home/CarTouristGuideGroundId')
+                                    }, 3000);
+                                } else {
+                                    that.$message.error(res.data.msg);
+                                }
+                            })
+                        } else {
+                            this.$message.error('请完善信息在保存!');
+                            return false;
+                        }
+                    })
+                }
+            }
+        },
+        EscAdd() {
+            this.$router.push({
+                path: "/home/CarTouristGuideGroundId",
+                query: {
+                    diId: this.OpCarTouristGuideGroundData.diId
+                }
+            })
+        }
+    },
+
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.initializeSelect();
+        this.OpCarTouristGuideGroundData.diId = parseInt(this.$route.query.DiId)
+        this.OpCarTouristGuideGroundData.id = this.$route.query.id
+        this.OpCarTouristGuideGroundData.createUserId = this.userId
+        debugger
+        if (this.OpCarTouristGuideGroundData.id != null && this.OpCarTouristGuideGroundData.id != undefined && this.OpCarTouristGuideGroundData.id != 0) {
+            this.QueryCarTouristGuideGroundById();
+            this.title = "修改签证费用";
+            this.OpCarTouristGuideGroundData.status = 2
+            this.isShow = true
+        } else {
+            this.OpCarTouristGuideGroundData.status = 1
+            this.title = "新增签证费用"
+            this.isShow = false
+        }
+
+    }
+}
+</script>
+<style>
+.communal-list {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.car_add .communal-title {
+    display: flex;
+    font-size: 17px;
+    font-weight: 600;
+    color: #555;
+    margin-bottom: 20px;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.appraise-box {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    margin: 50px 0;
+}
+
+.appraise-box>div {
+    width: 30%;
+}
+
+.communal-box {
+    display: flex;
+}
+
+.communal-box>button {
+    margin-left: 10px;
+    padding: 8px 20px;
+}
+
+.car_add {
+    background-color: #fff;
+    padding: 20px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+@media screen and (max-width: 1700px) {
+    .appraise-box>div {
+        width: 48%;
+    }
+
+    .appraise-box>div el-form-item__content {
+        width: 260px !important;
+    }
+}
+</style>

+ 23 - 46
src/components/OP/OpVisaPriec.vue

@@ -72,7 +72,7 @@
                         <el-form-item label="签证费用:" prop="visaPrice" label-width="160px">
                             <el-input placeholder="签证费用" v-model="OpVisaPriceData.visaPrice" style="width: 58%;">
                             </el-input>
-                            <el-select v-model="OpVisaPriceData.visaCurrency" filterable placeholder="币种选择"
+                            <el-select v-model="OpVisaPriceData.visaCurrency" filterable placeholder="币种"
                                 style="width: 35%;">
                                 <el-option v-for="item in currencyList" :key="item.id" :label="item.name" :value="item.id">
                                 </el-option>
@@ -262,9 +262,8 @@
                 <el-form-item>
                     <div style="margin-left: 60%;">
                         <el-button type="primary" @click="addBtn">保存</el-button>
-                        <router-link to='/home/VisaPriec'>
-                            <el-button>取消</el-button>
-                        </router-link>
+
+                        <el-button @click="EscAdd">取消</el-button>
                     </div>
                 </el-form-item>
             </el-form>
@@ -292,7 +291,7 @@ export default {
                 diId: '',
                 visaClient: '',
                 visaPrice: 0,
-                visaCurrency: 48,
+                visaCurrency: '',
                 isThird: '',
                 passengerType: '',
                 visaNumber: 0,
@@ -415,55 +414,20 @@ export default {
                 }
             })
 
-            var url = "/api/System/QuerySetData"
+            var url = "/api/Groups/VisaPriceAddSelect"
             this.$axios({
                 method: 'post',
                 url: url,
                 headers: {
                     Authorization: 'Bearer ' + this.token
                 },
-                data: {
-                    //userId: that.userId,
-                    DataType: 15
-                }
             }).then(function (res) {
                 if (res.data.code == 200) {
 
-                    that.bankCard = res.data.data;
-                }
-            })
-
-            this.$axios({
-                method: 'post',
-                url: url,
-                headers: {
-                    Authorization: 'Bearer ' + this.token
-                },
-                data: {
-                    //userId: that.userId,
-                    DataType: 66
-                }
-            }).then(function (res) {
-                if (res.data.code == 200) {
-                    debugger
-                    that.currencyList = res.data.data;
-                }
-            })
-
-            this.$axios({
-                method: 'post',
-                url: url,
-                headers: {
-                    Authorization: 'Bearer ' + this.token
-                },
-                data: {
-                    //userId: that.userId,
-                    DataType: 69
-                }
-            }).then(function (res) {
-                if (res.data.code == 200) {
-
-                    that.passengerTypeSelect = res.data.data;
+                    that.bankCard = res.data.data.bankCard;
+                    that.payment = res.data.data.payment;
+                    that.currencyList = res.data.data.currencyList;
+                    that.passengerTypeSelect = res.data.data.passengerType;
                 }
             })
         },
@@ -597,7 +561,12 @@ export default {
                                     });
                                     that.loading = true;
                                     setTimeout(() => {
-                                        that.$router.push('/home/VisaPriec')
+                                        that.$router.push({
+                                            path: "/home/VisaPriec",
+                                            query: {
+                                                diId: that.OpVisaPriceData.diId
+                                            }
+                                        })
                                     }, 3000);
                                 } else {
                                     that.$message.error(res.data.msg);
@@ -610,6 +579,14 @@ export default {
                     })
                 }
             }
+        },
+        EscAdd() {
+            this.$router.push({
+                path: "/home/VisaPriec",
+                query: {
+                    diId: this.OpVisaPriceData.diId
+                }
+            })
         }
     },
 

+ 21 - 5
src/components/OP/VisaPriec.vue

@@ -68,8 +68,12 @@
                     </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>
+                            <el-button-group>
+                                <el-button type="primary" size="mini" icon="el-icon-edit"
+                                    @click="upDate(scope.$index, scope.row)"></el-button>
+                                <el-button type="danger" size="mini" icon="el-icon-delete"
+                                    @click="del(scope.$index, scope.row)"></el-button>
+                            </el-button-group>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -131,9 +135,21 @@ export default {
                 if (res.data.code == 200) {
                     debugger
                     that.delegationInfoList = res.data.data.groupName;
-                    that.delegationInfo = that.delegationInfoList[0]
-                    that.DiId = that.delegationInfoList[0].id;
-                    that.delegationInfo = that.delegationInfoList[0];
+                    that.DiId = that.$route.query.diId
+                    if (that.DiId == undefined) {
+                        that.delegationInfo = that.delegationInfoList[0]
+                        that.DiId = that.delegationInfoList[0].id;
+                    } else {
+                        for (let index = 0; index < that.delegationInfoList.length; index++) {
+                            debugger
+                            if (that.delegationInfoList[index].id == that.DiId) {
+                                that.delegationInfo = that.delegationInfoList[index];
+                                that.DiId = that.delegationInfoList[index].id;
+                                break;
+                            }
+                        }
+                    }
+
                     that.PostVisaByDiId()
                 }
             }).catch(function (error) {

+ 13 - 0
src/router/index.js

@@ -82,6 +82,8 @@ import GroundDetailedfees from '@/components/Resource/GroundDetailedfees';
 import SetWorking from '@/components/system/SetWorking';
 import ThreeStandards from '@/components/OP/ThreeStandards'
 import CarTouristGuideGroundId from '@/components/OP/CarTouristGuideGroundId'
+import OpCarTouristGuideGroundId from '@/components/OP/OpCarTouristGuideGroundId'
+import CarTouristGuideGrounContent from '@/components/OP/CarTouristGuideGrounContent'
 Vue.use(Router)
 
 export default new Router({
@@ -478,7 +480,18 @@ export default new Router({
           path: '/home/CarTouristGuideGroundId',
           name: 'CarTouristGuideGroundId',
           component: CarTouristGuideGroundId
+        },
+        {
+          path: '/home/OpCarTouristGuideGroundId',
+          name: 'OpCarTouristGuideGroundId',
+          component: OpCarTouristGuideGroundId
+        },
+        {
+          path: '/home/CarTouristGuideGrounContent',
+          name: 'CarTouristGuideGrounContent',
+          component: CarTouristGuideGrounContent
         }
+
       ]
     },
     {