Browse Source

保险页面编写及api接口对接

wangh 1 year ago
parent
commit
4ad8267823

+ 313 - 0
src/components/OP/Customers.vue

@@ -0,0 +1,313 @@
+<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: 80%;display: flex;">
+                        <div style="width: 25%;">
+                            <el-select v-model="DiId" placeholder="团组选择" clearable filterable @change="VisaSelectChange"
+                                style="width: 100%;">
+                                <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-input v-model="VisaClient" placeholder="请输入客户名称" clearable></el-input>
+                        </div>
+                        <div style="width: 25%;margin-left: 10px;"><el-button type="primary"
+                                @click="QueryByVisaClient">查询</el-button>
+                        </div>
+                    </div>
+                    <div style="width: 20%">
+                        <el-button type="primary" style="" @click="addIf">新增</el-button>
+                    </div>
+                </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; {{
+}}&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>
+
+            <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="clientName" label="客户名称">
+                    </el-table-column>
+                    <el-table-column prop="insuranceCosts,currencyStr" label="保险费用">
+                        <template slot-scope="scope">
+                            {{ scope.row.insuranceCosts }}({{ scope.row.currencyStr }})
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="isAuditGMStr" label="是否审核">
+                    </el-table-column>
+                    <el-table-column prop="attachment" label="附 件">
+                        <template slot-scope="scope">
+
+                            <a @click="download(scope.$index, scope.row)">{{ scope.row.attachment }}</a>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="操作">
+                        <template slot-scope="scope">
+                            <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>
+            </template>
+            <div class="block">
+                <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[5, 10, 12, 15, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next" :total="tableDatas.length">
+                </el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+import { el } from '@fullcalendar/core/internal-common';
+export default {
+    data() {
+        return {
+            loading: false,
+            tableDatas: [],
+            tableData: [],
+            currentPage: 1, // 当前页码
+            pageSize: 12,// 每页的数据条数
+            input: '',
+            token: '',
+            userId: 0,
+            DiId: '',
+            VisaSelectList: [],
+            VisaClient: '',
+            delegationInfoList: [],
+            delegationInfo: {},
+        }
+    },
+    methods: {
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
+            this.currentPage = 1;
+            this.pageSize = val;
+        },
+        //当前页改变时触发 跳转其他页
+        handleCurrentChange(val) {
+            this.currentPage = val;
+        },
+        //团组下拉框
+        visaSelect() {
+            var url = "/api/Groups/DecreasePaymentsSelect"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    UserId: that.userId,
+                    CTId: 82,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    debugger
+                    that.delegationInfoList = res.data.data.groupName;
+                    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()
+                }
+            })
+        },
+        VisaSelectChange() {
+            if (this.DiId != "") {
+                this.PostVisaByDiId();
+            } else {
+                this.tableDatas = [];
+                this.tableData = [];
+            }
+        },
+        //团组信息绑定
+        PostVisaByDiId() {
+            var url = "/api/Groups/CustomersByDiId"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    pageIndex: 0,
+                    pageSize: 0,
+                    portType: 1,
+                    diID: that.DiId,
+                    ClientName: that.VisaClient
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    debugger
+                    that.tableDatas = res.data.data;
+                    that.tableData = that.tableDatas
+                    if (that.tableDatas.length != 0) {
+                        if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
+                            if (that.currentPage > 1) {
+                                that.currentPage = that.currentPage - 1;
+                            }
+                        }
+                    }
+
+                }
+
+            })
+        },
+        QueryByVisaClient() {
+            this.PostVisaByDiId()
+        },
+        upDate(index, row) {
+            this.$router.push({
+                path: "/home/OpCustomers",
+                query: {
+                    DiId: this.DiId,
+                    id: row.id
+                }
+            })
+
+        },
+        addIf() {
+            debugger
+            if (this.DiId != 0 && this.DiId != '' && this.DiId != undefined) {
+                this.$router.push({
+                    path: "/home/OpCustomers",
+                    query: {
+                        DiId: this.DiId,
+                    }
+                })
+
+            } else {
+                this.$message('请选择团组在进行添加');
+            }
+        },
+        del(index, row) {
+            this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                var url = "/api/Groups/DelCustomers"
+                var that = this
+                this.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + this.token
+                    },
+                    data: {
+                        Id: row.id,
+                        DeleteUserId: this.userId
+                    }
+                }).then(function (res) {
+                    console.log(res)
+
+                    if (res.data.code == 200) {
+
+                        that.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        });
+                        that.PostVisaByDiId();
+                    } else {
+                        that.$message.error('删除失败!');
+                    }
+                    that.loading = false
+                }).catch(function (error) {
+                    that.loading = false
+                    that.$message.error("网络错误,请稍后重试");
+                });
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '操作已取消!'
+                });
+            });
+        },
+        download(index, row) {
+            if (row.attachment != "") {
+                window.location.href = "http://132.232.92.186:24/Office/GrpFile/保险费用文件上传/" + row.attachment
+            } else {
+                this.$message.error("暂未上传附件");
+            }
+
+        },
+    },
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.visaSelect();
+        //this.AirTicketResList()
+    }
+}
+</script>
+<style>
+.communal-list {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+}
+
+.communal-title {
+    display: flex;
+    font-size: 17px;
+    font-weight: 600;
+    color: #555;
+    margin-top: 8px;
+    margin-bottom: 10px;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.communal-box {
+    display: flex;
+}
+
+.communal-box>button {
+    margin-left: 10px;
+    padding: 8px 20px;
+}
+</style>

+ 8 - 4
src/components/OP/HotelReservations.vue

@@ -501,10 +501,10 @@ export default {
             DelfileName: "",
             headers: {
                 Authorization: JSON.parse(localStorage.getItem('userinif')).token,
-                TypeName: "B"
             },
             Rate: '1',
             loading: false,
+            isAuditGM: 0,
             delegationInfoList: [],
             delegationInfo: {},
             guestType: [],//客人类型
@@ -709,7 +709,8 @@ export default {
                 },
                 data: {
                     UserId: that.userId,
-                    PortType: 1
+                    PortType: 1,
+                    diid: 0
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
@@ -948,7 +949,7 @@ export default {
                     //     that.CardCurrency = that.currencySingle.name + '(' + that.currencySingle.remark + ')'
                     // }
                     debugger
-
+                    that.isAuditGM = creditCardPayment.isAuditGM;
                     that.OpHotelReservationsData.cardPriceCurrency = hotelReservations.cardPriceCurrency
                     if (that.OpHotelReservationsData.cardPriceCurrency == '74') {
                         that.CardCurrency = "USD(美元)"
@@ -1188,7 +1189,10 @@ export default {
         },
         AddBtn() {
             var that = this
-            debugger
+            if (that.IsAuditGM == 1) {
+                that.$message.error('已通过审核,不可修改!');
+                return;
+            }
             that.$refs.OpHotelReservationsData.validate((valid) => {
                 if (valid) {
                     if (that.OpHotelReservationsData.paymentCurrency == '') {

+ 881 - 0
src/components/OP/OpCustomers.vue

@@ -0,0 +1,881 @@
+<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="OpCustomersData.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="OpCustomersData" ref="OpCustomersData" :rules="OpCustomersDataRules" label-width="100px"
+                class="demo-ruleForm">
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="保险名称:" prop="iid" label-width="160px">
+                            <el-select v-model="OpCustomersData.iid" filterable placeholder="保险名称" @change="iidChane">
+                                <el-option v-for="item in insuranceCostList" :key="item.id" :label="item.gName"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="保险余额:" label-width="160px">
+                            <el-input placeholder="保险余额" v-model="Balance" :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="OpCustomersData.clientName">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="保险费用:" prop="insuranceCosts" label-width="160px">
+                            <el-input placeholder="保险费用" v-model="OpCustomersData.insuranceCosts" style="width: 50%;">
+                            </el-input>
+                            <el-select v-model="OpCustomersData.currency" filterable placeholder="币种" style="width: 40%;">
+                                <el-option v-for="item in currencyList" :key="item.currencyId" :label="item.currencyCode"
+                                    :value="item.currencyId">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="附件" prop="attachment" label-width="160px">
+
+                            <el-upload :file-list="uploadFiles" ref="upload" :on-success="upLoadSuccess"
+                                style="width: 200px;" :before-remove="beforeRemove" :limit="1" :on-exceed="exceed"
+                                :action="uploadURL" :headers="headers" :auto-upload="false" :on-change="onChange">
+                                <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+                                <!-- <el-button style="margin-left: 10px;" size="small" type="success"
+                                    @click="submitUpload">上传到服务器</el-button> -->
+                            </el-upload>
+
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 81%;">
+                        <el-form-item label="备 注:" prop="Remark" label-width="160px">
+                            <el-input type="textarea" :rows="5" placeholder="备注"
+                                v-model="OpCustomersData.remark"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <hr style='background-color:#5555; height:1px; border:none;margin-top: 10px;' />
+                <div style="display: flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="支付方式:" prop="payDId" label-width="160px">
+                            <el-select v-model="OpCustomersData.payDId" placeholder="支付方式" style="width: 100%;"
+                                @change="payChange">
+                                <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 style="width: 25%;">
+                        <el-form-item label="消费方式:" prop="consumptionPatterns" label-width="160px">
+                            <el-input placeholder="消费方式" v-model="OpCustomersData.consumptionPatterns">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="消费日期:" prop="consumptionDate" label-width="160px">
+                            <el-date-picker v-model="OpCustomersData.consumptionDate" placeholder="消费日期" type="date">
+                            </el-date-picker>
+
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="付款金额:" prop="payMoney" label-width="160px">
+                            <el-input placeholder="付款金额" v-model="OpCustomersData.insuranceCosts" style="width: 52%;"
+                                :disabled="true">
+                            </el-input>
+                            <el-select v-model="OpCustomersData.currency" style="width: 45%;" :disabled="true">
+                                <el-option v-for="item in currencyList" :key="item.currencyId" :label="item.currencyCode"
+                                    :value="item.currencyId">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div v-if="OpCustomersData.payDId == 72">
+                    <div style="display: flex;">
+                        <div style="width: 25%;">
+                            <el-form-item label="卡类型:" prop="ctdId" label-width="160px">
+                                <el-select v-model="OpCustomersData.ctdId" placeholder="卡类型" style="width: 100%;"
+                                    @change="ctdChange">
+                                    <el-option v-for="item in bankCard" :key="item.id" :label="item.name" :value="item.id">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <div style="width: 25%;">
+                            <el-form-item label="银行卡号:" prop="bankNo" label-width="160px">
+                                <el-input placeholder="银行卡号" v-model="OpCustomersData.bankNo" :disabled="true">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                        <div style="width: 25%;">
+                            <el-form-item label="持卡人姓名:" prop="cardholderName" label-width="160px">
+                                <el-input placeholder="持卡人姓名" v-model="OpCustomersData.cardholderName" :disabled="true">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                    </div>
+                </div>
+                <div v-else-if="OpCustomersData.payDId == 73">
+                    <div style="display: flex;">
+                        <div style="width: 25%;">
+                            <el-form-item label="公司银行账号:" label-width="160px" prop="companyBankNo">
+                                <el-input placeholder="公司银行账号" v-model="OpCustomersData.companyBankNo">
+                                </el-input>
+
+                            </el-form-item>
+                        </div>
+                        <div style="width: 25%;">
+                            <el-form-item label="对方开户行:" prop="otherBankName" label-width="160px">
+                                <el-input placeholder="对方开户行:" v-model="OpCustomersData.otherBankName">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                        <div style="width: 25%;">
+                            <el-form-item label="对方银行卡号:" prop="otherSideNo" label-width="160px">
+                                <el-input placeholder="对方银行卡号" v-model="OpCustomersData.otherSideNo">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                        <div style="width: 25%;">
+                            <el-form-item label="对方姓名:" prop="otherSideName" label-width="160px">
+                                <el-input placeholder="对方姓名" v-model="OpCustomersData.otherSideName">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                    </div>
+                </div>
+                <div v-else-if="OpCustomersData.payDId == 83">
+                    <div style="display: flex;">
+                        <div style="width: 25%;">
+                            <el-form-item label="对方开户行:" prop="otherBankName" label-width="160px">
+                                <el-input placeholder="对方开户行" v-model="OpCustomersData.otherBankName">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                        <div style="width: 25%;">
+                            <el-form-item label="对方银行卡号:" prop="otherSideNo" label-width="160px">
+                                <el-input placeholder="对方银行卡号" v-model="OpCustomersData.otherSideNo">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                        <div style="width: 25%;">
+                            <el-form-item label="对方姓名:" prop="otherSideName" label-width="160px">
+                                <el-input placeholder="对方姓名" v-model="OpCustomersData.otherSideName">
+                                </el-input>
+                            </el-form-item>
+                        </div>
+                    </div>
+                </div>
+                <div v-else></div>
+                <div style="display:flex;">
+                    <div style="width: 25%;">
+                        <el-form-item label="收款方:" prop="payee" label-width="160px">
+                            <el-input placeholder="对方姓名:" v-model="OpCustomersData.payee">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="费用标识:" prop="orbitalPrivateTransfer" label-width="160px">
+                            <el-select v-model="OpCustomersData.orbitalPrivateTransfer" placeholder="费用标识"
+                                style="width: 100%;">
+                                <el-option key="0" label="公转" :value=0>
+                                </el-option>
+                                <el-option key="1" label="私转" :value=1>
+                                </el-option>
+                            </el-select>
+                        </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="OpCustomersData.cRemark"></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: "新增保险费用",
+            token: '',
+            userId: 0,
+            id: '',
+            isShow: false,
+            uploadURL: "http://132.232.92.186:8888/api/Groups/UploadCus",
+            headers: {
+                Authorization: JSON.parse(localStorage.getItem('userinif')).token,
+            },
+            projectName: "",
+            uploadFiles: [],//上传的文件列表
+            DelfileName: "",
+            delegationInfo: {},
+            delegationInfoList: [],//团组下拉框
+            insuranceCostList: [],//保险类型下拉框
+            Balance: 0,//保险余额
+            currencyList: [],//币种下拉框
+            bankCard: [],//卡类型下拉框
+            payment: [],//支付方式下拉框
+            OpCustomersData: {
+                status: 0,
+                id: 0,
+                diId: 0,
+                iid: 2,
+                clientName: '',
+                insuranceCosts: 0,
+                currency: '',
+                attachment: '',
+                createUserId: 0,
+                remark: '',
+                payDId: 72,
+                consumptionPatterns: '',
+                consumptionDate: '',
+                ctdId: '',
+                companyBankNo: '',
+                otherBankName: '',
+                otherSideNo: '',
+                otherSideName: '',
+                bankNo: '',
+                cardholderName: '',
+                payee: '',
+                orbitalPrivateTransfer: 0,
+                cRemark: '',
+            },
+            IsAuditGM: 0,
+            VisitDate: '',
+            passengerTypeSelect: [],
+            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;
+            },
+            OpCustomersDataRules: {
+                iid: [
+                    { required: true, message: '请选择保险名称', trigger: ['blur', 'change'] },
+                ],
+                clientName: [
+                    { required: true, message: '请输入客户名称', trigger: ['blur', 'change'] },
+                ],
+                insuranceCosts: [
+                    { required: true, message: '请输入费用金额', trigger: ['blur', 'change'] },
+                    { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
+                ],
+                currency: [
+                    { required: true, message: '请选择支付币种', trigger: ['blur', 'change'] },
+                ],
+                payDId: [
+                    { required: true, message: '请选择支付方式', trigger: ['blur', 'change'] },
+                ],
+                consumptionPatterns: [
+                    { required: true, message: '请输入消费方式', trigger: ['blur', 'change'] },
+                ],
+                consumptionDate: [
+                    { required: true, message: '请选择消费日期', trigger: ['blur', 'change'] },
+                ],
+                payee: [
+                    { required: true, message: '请输入收款方', trigger: ['blur', 'change'] },
+                ],
+                ctdId: [
+                    { required: true, message: '请选择卡类型', trigger: ['blur', 'change'] },
+                ],
+                companyBankNo: [{ required: true, message: '公司银行账号', trigger: ['blur', 'change'] },],
+                otherBankName: [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },],
+                otherSideNo: [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },],
+                totherSideName: [{ 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: 82
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    debugger
+                    that.delegationInfoList = res.data.data.groupName
+                    that.payment = res.data.data.payment
+                    for (let index = 0; index < that.delegationInfoList.length; index++) {
+
+                        if (that.delegationInfoList[index].id == that.OpCustomersData.diId) {
+                            that.delegationInfo = that.delegationInfoList[index];
+                            that.OpCustomersData.diId = that.delegationInfo.id
+                            that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                            var url = "/api/Groups/CustomersInitialize"
+                            that.$axios({
+                                method: 'post',
+                                url: url,
+                                headers: {
+                                    Authorization: 'Bearer ' + that.token
+                                },
+                                data: {
+                                    portType: 1,
+                                    diId: that.OpCustomersData.diId
+                                }
+                            }).then(function (res) {
+                                if (res.data.code == 200) {
+                                    that.insuranceCostList = res.data.data.insuranceCost;//保险类型下拉框
+                                    that.OpCustomersData.iid = that.insuranceCostList[0].id;
+                                    that.Balance = that.insuranceCostList[0].balance;
+                                    that.currencyList = res.data.data.currencyList;//币种下拉框
+                                    if (that.currencyList.length != 0) {
+                                        that.OpCustomersData.currency = that.currencyList[0].currencyId
+                                    }
+
+                                    that.bankCard = res.data.data.bankCard;//卡类型下拉框
+                                    that.payment = res.data.data.payment;//支付方式下拉框
+                                }
+                            })
+                            break;
+                        }
+                    }
+
+                }
+            })
+
+        },
+        DiIdSelectChange() {
+            var that = this;
+            for (let index = 0; index < that.delegationInfoList.length; index++) {
+                if (that.delegationInfoList[index].id == that.OpCustomersData.diId) {
+                    that.delegationInfo = that.delegationInfoList[index];
+
+                    that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                    var url = "/api/Groups/CustomersInitialize"
+                    that.$axios({
+                        method: 'post',
+                        url: url,
+                        headers: {
+                            Authorization: 'Bearer ' + that.token
+                        },
+                        data: {
+                            portType: 1,
+                            diId: that.OpCustomersData.diId
+                        }
+                    }).then(function (res) {
+                        debugger
+                        if (res.data.code == 200) {
+                            that.insuranceCostList = res.data.data.insuranceCost;//保险类型下拉框
+                            that.OpCustomersData.iid = that.insuranceCostList[0].id;
+                            that.Balance = that.insuranceCostList[0].balance;
+                            that.currencyList = res.data.data.currencyList;//币种下拉框
+                            if (that.currencyList.length != 0) {
+                                debugger
+                                that.OpCustomersData.currency = that.currencyList[0].currencyId
+                            }
+                            that.bankCard = res.data.data.bankCard;//卡类型下拉框
+                            that.payment = res.data.data.payment;//支付方式下拉框
+                        }
+                    })
+                    break;
+                }
+            }
+            that.$nextTick(() => {
+                that.$refs.OpCustomersData.clearValidate();
+            })
+        },
+        iidChane(row) {
+            debugger
+            for (let index = 0; index < this.insuranceCostList.length; index++) {
+                if (this.insuranceCostList[index].id == row) {
+                    this.Balance = this.insuranceCostList[index].balance;
+                    break;
+                }
+            }
+
+        },
+        payChange() {
+            this.OpCustomersData.ctdId = '';
+            this.OpCustomersData.bankNo = '';
+            this.OpCustomersData.cardholderName = '';
+            this.OpCustomersData.companyBankNo = '';
+            this.OpCustomersData.otherBankName = '';
+            this.OpCustomersData.otherSideNo = '';
+            this.OpCustomersData.otherSideName = '';
+            this.OpCustomersData.cRemark = '';
+            if (this.OpCustomersData.payDId == 73) {
+                this.OpCustomersDataRules.companyBankNo = [{ required: true, message: '公司银行账号', trigger: ['blur', 'change'] },]
+                this.OpCustomersDataRules.otherBankName = [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },]
+                this.OpCustomersDataRules.otherSideNo = [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },]
+                this.OpCustomersDataRules.otherSideName = [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },]
+                this.OpCustomersDataRules.ctdId = []
+            } else if (this.OpCustomersData.payDId == 72) {
+                this.OpCustomersDataRules.ctdId = [{ required: true, message: '请选择卡类型', trigger: ['blur', 'change'] },]
+                this.OpCustomersDataRules.companyBankNo = []
+                this.OpCustomersDataRules.otherBankName = []
+                this.OpCustomersDataRules.otherSideNo = []
+                this.OpCustomersDataRules.otherSideName = []
+            } else if (this.OpCustomersData.payDId == 83) {
+                this.OpCustomersDataRules.companyBankNo = []
+                this.OpCustomersDataRules.otherBankName = [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },]
+                this.OpCustomersDataRules.otherSideNo = [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },]
+                this.OpCustomersDataRules.otherSideName = [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },]
+                this.OpCustomersDataRules.ctdId = []
+            } else {
+                this.OpCustomersDataRules.companyBankNo = []
+                this.OpCustomersDataRules.otherBankName = []
+                this.OpCustomersDataRules.otherSideNo = []
+                this.OpCustomersDataRules.otherSideName = []
+                this.OpCustomersDataRules.ctdId = []
+            }
+            this.$nextTick(() => {
+                this.$refs.OpCustomersData.clearValidate();
+            })
+        },
+        ctdChange(id) {
+            this.OpCustomersData.cardholderName = 'Zhang Hailin';
+            for (var i = 0; i < this.bankCard.length; i++) {
+                if (this.bankCard[i].id == parseInt(id)) {
+                    this.OpCustomersData.bankNo = this.bankCard[i].remark
+                }
+            }
+        },
+        //根据Id获取单挑数据及C表数据
+        QueryCustomersById() {
+            var url = "/api/Groups/CustomersById"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    id: that.OpCustomersData.id
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    debugger
+                    var CreditCardPayment = res.data.data.creditCard;
+                    var Customers = res.data.data.customers;
+                    that.IsAuditGM = CreditCardPayment.isAuditGM;
+                    that.OpCustomersData.iid = Customers.iid
+                    for (let index = 0; index < that.insuranceCostList.length; index++) {
+                        if (that.insuranceCostList[index].id == that.OpCustomersData.iid) {
+                            that.Balance = that.insuranceCostList[index].balance;
+                            break;
+                        }
+                    }
+                    that.OpCustomersData.clientName = Customers.clientName
+                    that.OpCustomersData.insuranceCosts = Customers.insuranceCosts
+                    that.OpCustomersData.currency = Customers.currency
+                    that.OpCustomersData.attachment = Customers.attachment
+                    that.uploadFiles = []
+                    if (that.OpCustomersData.attachment != null && that.OpCustomersData.attachment != undefined && that.OpCustomersData.attachment != "") {
+                        that.uploadFiles.push({
+                            name: that.OpCustomersData.attachment,
+                            url: 'http://132.232.92.186:24/Office/GrpFile/保险费用文件上传/',
+                        })
+                    }
+                    that.OpCustomersData.remark = Customers.remark
+                    that.OpCustomersData.payDId = CreditCardPayment.payDId;
+                    that.OpCustomersData.consumptionPatterns = CreditCardPayment.consumptionPatterns;
+                    that.OpCustomersData.consumptionDate = CreditCardPayment.consumptionDate;
+                    that.OpCustomersData.ctdId = CreditCardPayment.ctdId;
+                    that.OpCustomersData.bankNo = CreditCardPayment.bankNo;
+                    that.OpCustomersData.cardholderName = CreditCardPayment.cardholderName;
+                    that.OpCustomersData.companyBankNo = CreditCardPayment.companyBankNo
+                    that.OpCustomersData.otherBankName = CreditCardPayment.otherBankName
+                    that.OpCustomersData.otherSideNo = CreditCardPayment.otherSideNo
+                    that.OpCustomersData.otherSideName = CreditCardPayment.otherSideName
+                    that.OpCustomersData.payee = CreditCardPayment.payee;
+                    that.OpCustomersData.orbitalPrivateTransfer = CreditCardPayment.orbitalPrivateTransfer;
+                    that.OpCustomersData.cRemark = CreditCardPayment.remark;
+                }
+            })
+        },
+        addBtn() {
+            if (this.IsAuditGM == 1) {
+                this.$message.error('已通过审核,不可修改!');
+            } else {
+                if (this.OpCustomersData.diId == null && this.OpCustomersData.diId == undefined && this.OpCustomersData.diId == "") {
+                    this.$message.error("请选择团组名称");
+                    return;
+                } else {
+                    const that = this;
+                    that.$refs.OpCustomersData.validate((valid) => {
+                        if (valid) {
+                            if (that.projectName != "" && that.projectName != null && that.projectName != undefined) {
+                                that.$refs.upload.submit();//上传文件到服务器
+                            } else {
+                                if (that.DelfileName != null && that.DelfileName != "" && that.DelfileName != undefined) {
+                                    that.$axios({
+                                        method: 'post',
+                                        url: "/api/Groups/DelFileCus",
+                                        headers: {
+                                            Authorization: 'Bearer ' + that.token
+                                        },
+                                        data: {
+                                            fileName: that.DelfileName,
+                                            id: that.OpCustomersData.id
+                                        }
+                                    }).then(function (res) {
+                                    })
+                                }
+
+                                debugger
+                                that.OpCustomersData.createUserId = that.userId;
+                                if (that.OpCustomersData.ctdId == '') {
+                                    that.OpCustomersData.ctdId = 0
+                                }
+
+                                var url = "/api/Groups/OpCustomers"
+                                that.$axios({
+                                    method: 'post',
+                                    url: url,
+                                    headers: {
+                                        Authorization: 'Bearer ' + that.token
+                                    },
+                                    data: that.OpCustomersData
+                                }).then(function (res) {
+                                    if (res.data.code == 200) {
+                                        that.$message({
+                                            message: res.data.msg,
+                                            type: 'success'
+                                        });
+                                        that.loading = true;
+                                        setTimeout(() => {
+                                            that.$router.push({
+                                                path: "/home/Customers",
+                                                query: {
+                                                    diId: that.OpCustomersData.diId
+                                                }
+                                            })
+                                        }, 3000);
+                                    } else {
+                                        that.$message.error(res.data.msg);
+                                    }
+                                })
+                            }
+
+                        } else {
+                            this.$message.error('请完善信息在保存!');
+                            return false;
+                        }
+                    })
+                }
+            }
+        },
+        //上传
+        // 文件超出限制
+        exceed(files, fileList) {
+            this.$message.warning(
+                `当前限制选择 1个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
+                } 个文件,请取消要替换的文件`
+            );
+        },
+        //文件上传成功时的钩子
+        upLoadSuccess(response, file, fileList) {
+            var that = this;
+            if (response.code == 200) {
+                if (that.DelfileName != null && that.DelfileName != "" && that.DelfileName != undefined) {
+                    that.$axios({
+                        method: 'post',
+                        url: "/api/Groups/DelFileCus",
+                        headers: {
+                            Authorization: 'Bearer ' + that.token
+                        },
+                        data: {
+                            fileName: that.DelfileName,
+                            id: that.id
+                        }
+                    }).then(function (res) {
+                        if (res.data.code == 200) {
+
+                        }
+                    })
+                }
+                //that.ctdId = that.ctdIdPay;
+                that.OpCustomersData.createUserId = that.userId;
+                that.OpCustomersData.attachment = that.projectName;
+                if (that.OpCustomersData.ctdId == '') {
+                    that.OpCustomersData.ctdId = 0
+                }
+
+                var url = "/api/Groups/OpCustomers"
+                that.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + that.token
+                    },
+                    data: that.OpCustomersData
+                }).then(function (res) {
+                    if (res.data.code == 200) {
+                        that.$message({
+                            message: res.data.msg,
+                            type: 'success'
+                        });
+                        that.loading = true;
+                        setTimeout(() => {
+                            that.$router.push({
+                                path: "/home/Customers",
+                                query: {
+                                    diId: that.OpCustomersData.diId
+                                }
+                            })
+                        }, 3000);
+                    } else {
+                        that.$message.error(res.data.msg);
+                    }
+                })
+
+            } else {
+                if (that.DelfileName != null && that.DelfileName != "" && that.DelfileName != undefined) {
+                    that.$axios({
+                        method: 'post',
+                        url: "/api/Groups/DelFile",
+                        headers: {
+                            Authorization: 'Bearer ' + that.token
+                        },
+                        data: {
+                            fileName: that.DelfileName,
+                            id: that.OpCustomersData.id
+                        }
+                    }).then(function (res) {
+                        if (res.data.code == 200) {
+
+                        }
+                    })
+                }
+                that.OpCustomersData.createUserId = that.userId;
+                if (that.OpCustomersData.ctdId == '') {
+                    that.OpCustomersData.ctdId = 0
+                }
+
+                var url = "/api/Groups/OpCustomers"
+                that.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + that.token
+                    },
+                    data: that.OpCustomersData
+                }).then(function (res) {
+                    if (res.data.code == 200) {
+                        that.$message({
+                            message: res.data.msg,
+                            type: 'success'
+                        });
+                        that.loading = true;
+                        setTimeout(() => {
+                            that.$router.push({
+                                path: "/home/Customers",
+                                query: {
+                                    diId: that.OpCustomersData.diId
+                                }
+                            })
+                        }, 3000);
+                    } else {
+                        that.$message.error(res.data.msg);
+                    }
+                })
+            }
+
+        },
+
+        beforeRemove(file, fileList) {
+
+            console.log(file.name)
+            let id1 = this.uploadFiles.findIndex(item => {
+                if (item.name == file.name) {
+                    return true
+                }
+            })
+            this.uploadFiles.splice(id1, 1)
+            this.projectName = ""
+            this.DelfileName = file.name
+        },
+        onChange(file, fileList) {
+
+            this.projectName = file.name
+        },
+        EscAdd() {
+            this.$router.push({
+                path: "/home/Customers",
+                query: {
+                    diId: this.OpCustomersData.diId
+                }
+            })
+        }
+    },
+
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.initializeSelect();
+        this.OpCustomersData.diId = parseInt(this.$route.query.DiId)
+        this.OpCustomersData.id = this.$route.query.id
+        debugger
+        if (this.OpCustomersData.id != null && this.OpCustomersData.id != undefined && this.OpCustomersData.id != 0) {
+            this.QueryCustomersById();
+            this.title = "修改保险费用";
+            this.OpCustomersData.status = 2
+            this.isShow = true
+        } else {
+            this.OpCustomersData.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>

+ 2 - 2
src/components/OP/OpVisaPriec.vue

@@ -500,8 +500,8 @@ export default {
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
-                    var CreditCardPayment = res.data.data._CreditCardPayment;
-                    var VisaInfo = res.data.data._VisaInfo;
+                    var CreditCardPayment = res.data.data.creditCardPayment;
+                    var VisaInfo = res.data.data.visaInfo;
                     that.IsAuditGM = CreditCardPayment.isAuditGM;
                     that.OpVisaPriceData.visaClient = VisaInfo.visaClient;
                     that.OpVisaPriceData.visaPrice = VisaInfo.visaPrice;

+ 1 - 1
src/main.js

@@ -20,7 +20,7 @@ Vue.use(VueQuillEditor);
 Vue.use(VueTypedJs)
 import axios from 'axios';
 axios.defaults.baseURL = 'http://132.232.92.186:8888';
-// axios.defaults.baseURL = 'http://localhost:5256/';
+//axios.defaults.baseURL = 'http://localhost:5256/';
 import { Message } from "element-ui";
 
 import common from './assets/js/common'//全局

+ 14 - 1
src/router/index.js

@@ -89,6 +89,8 @@ import PayReceived from '@/components/Finance/PayReceived';
 import LncomingBills from '@/components/Finance/LncomingBills';
 import GroupStatus from '@/components/Finance/GroupStatus';
 import Sendack from '@/components/Finance/Sendack';
+import Customers from '@/components/OP/Customers';
+import OpCustomers from '@/components/OP/OpCustomers';
 
 
 Vue.use(Router)
@@ -522,7 +524,18 @@ export default new Router({
           path: '/home/Sendack',
           name: 'Sendack',
           component: Sendack
-        }
+        },
+        {
+          path: '/home/Customers',
+          name: 'Customers',
+          component: Customers
+        },
+        {
+          path: '/home/OpCustomers',
+          name: 'OpCustomers',
+          component: OpCustomers
+        },
+
       ]
     },
     {