Bladeren bron

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

liuhj 1 jaar geleden
bovenliggende
commit
bfe230f745

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

@@ -8,7 +8,8 @@
                 </div>
                 <div style="display: flex;justify-content: space-between;">
                     <div style="width: 60%;">
-                        <el-select v-model="DiId" placeholder="团组选择" @change="AirTicketResSelectChange">
+                        <el-select v-model="DiId" placeholder="团组选择" clearable filterable
+                            @change="AirTicketResSelectChange">
                             <el-option v-for="item in AirTicketResSelectData" :key="item.id" :label="item.groupName"
                                 :value="item.id">
                             </el-option>
@@ -158,9 +159,11 @@ export default {
                 if (res.data.code == 200) {
                     that.tableDatas = res.data.data.airTicketReservations;
                     that.tableData = that.tableDatas
-                    if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
-                        if (that.currentPage > 1) {
-                            that.currentPage = that.currentPage - 1;
+                    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;
+                            }
                         }
                     }
                     that.delegationInfo = res.data.data.delegationInfo

+ 275 - 0
src/components/OP/DecreasePayments.vue

@@ -0,0 +1,275 @@
+<template>
+    <div>
+        <div class="communal-list">
+            <div>
+
+                <div class="communal-title">
+                    <div>团组增减款项</div>
+                </div>
+                <div style="display: flex;">
+                    <div style="width: 90%;">
+                        <el-select v-model="DiId" placeholder="团组选择" clearable filterable @change="DecreasePaymentsChange">
+                            <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
+                                :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </div>
+                    <div>
+                        <router-link :to="{ path: '/home/OpDecreasePayments', query: { DiId } }">
+                            <el-button type="primary" style="margin-left: 10px;">新增</el-button>
+                        </router-link>
+                    </div>
+                </div>
+                <span style="font-weight: bold;">团队名称:</span>
+                {{ delegationInfo.teamName }}&nbsp;&nbsp;&nbsp;
+                <span style="font-weight: bold;">客户:</span>
+                {{ delegationInfo.clientName }}&nbsp;&nbsp;&nbsp;
+                <span style="font-weight: bold;">出访国家:</span>
+                {{ delegationInfo.visitCountry }}&nbsp;&nbsp;&nbsp;
+                <span style="font-weight: bold;">起止日期:</span>
+                {{ delegationInfo.visitStartDate }}—{{ delegationInfo.visitEndDate }}&nbsp;&nbsp;&nbsp;
+                <span style="font-weight: bold;">天数/人数:</span>
+                {{ delegationInfo.visitDays }}天/{{ delegationInfo.visitPNumber }}人
+            </div>
+            <hr style='background-color:#5555; height:1px; border:none;' />
+            <template>
+                <el-table :data="tableDatas.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
+                    style="width: 100%" v-loading="loading" element-loading-text="拼命加载中...">
+                    <el-table-column prop="num" label="序 号" width="55">
+                        <template slot-scope="scope">
+                            {{ (currentPage - 1) * pageSize + scope.$index + 1 }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="priceName" label="费用名称" width="260">
+                    </el-table-column>
+                    <el-table-column prop="price,currency" label="费用" sortable>
+                        <template slot-scope="scope">
+                            {{ scope.row.price }}({{ scope.row.currency }})
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="filePath" label="附件">
+                    </el-table-column>
+                    <el-table-column prop="createUserName" label="操作人" width="120">
+                    </el-table-column>
+                    <el-table-column prop="createTime" label="操作时间">
+                    </el-table-column>
+                    <el-table-column prop="isAudit" label="是否审核" width="120">
+                        <template slot-scope="isAudit">
+                            <span v-if="isAudit.row.isAudit == 1">已通过</span>
+                            <span v-else-if="isAudit.row.isAudit == 0">未审核</span>
+                            <span v-else-if="isAudit.row.isAudit == 2">未通过</span>
+                            <span v-else>自动审核通过</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="操作" width="280">
+                        <template slot-scope="scope">
+                            <el-button size="mini" @click="download(scope.$index, scope.row)">下载</el-button>
+                            <el-button size="mini" @click="upDate(scope.$index, scope.row)">编辑</el-button>
+                            <el-button size="mini" type="danger" @click="del(scope.$index, scope.row)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </template>
+            <div class="block">
+                <el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="currentPage" :page-sizes="[10, 12, 15, 20]" :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next" :total="tableDatas.length">
+                </el-pagination>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            loading: false,
+            tableDatas: [],
+            tableData: [],
+            currentPage: 1, // 当前页码
+            pageSize: 12,// 每页的数据条数
+            input: '',
+            token: '',
+            userId: 0,
+            DiId: '',
+            delegationInfoList: [],
+            delegationInfo: {}
+        }
+    },
+    methods: {
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
+            this.currentPage = 1;
+            this.pageSize = val;
+        },
+        //当前页改变时触发 跳转其他页
+        handleCurrentChange(val) {
+            this.currentPage = val;
+        },
+        //团组下拉框
+        DecreasePaymentsSelect() {
+            var url = "/api/Groups/DecreasePaymentsSelect"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    UserId: that.userId,
+                    CTId: 98
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.delegationInfoList = res.data.data.groupName;
+                    that.DiId = that.delegationInfoList[0].id;
+                    that.delegationInfo = that.delegationInfoList[0];
+                    that.DecreasePaymentsList()
+                }
+            }).catch(function (error) {
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        DecreasePaymentsChange() {
+            for (let index = 0; index < this.delegationInfoList.length; index++) {
+                if (this.delegationInfoList[index].id == this.DiId) {
+                    this.delegationInfo = this.delegationInfoList[index];
+                    break;
+                }
+            }
+            this.DecreasePaymentsList();
+        },
+        //团组信息绑定
+        DecreasePaymentsList() {
+            var url = "/api/Groups/DecreasePaymentsList"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + this.token
+                },
+                data: {
+                    diId: that.DiId
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.tableDatas = res.data.data;
+                    that.tableData = that.tableDatas
+                    if (that.tableDatas.length != 0) {
+                        if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
+                            if (that.currentPage > 1) {
+                                that.currentPage = that.currentPage - 1;
+                            }
+                        }
+                    }
+                }
+            }).catch(function (error) {
+
+                that.$message.error("网络错误,请稍后重试");
+            });
+        },
+        upDate(index, row) {
+            if (row.isAudit == 3 || row.isAudit == 0 || row.isAudit == 2) {
+                this.$router.push({
+                    path: "/home/OpDecreasePayments",
+                    query: {
+                        DiId: this.DiId,
+                        id: row.id
+                    }
+                })
+            } else if (row.isAudit == 1) {
+                this.$message('审核已通过,不可编辑!');
+            }
+
+        },
+        del(index, row) {
+            this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                var url = "/api/Groups/DelDecreasePayments"
+                var that = this
+                this.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + this.token
+                    },
+                    data: {
+                        Id: row.id,
+                        DeleteUserId: this.userId
+                    }
+                }).then(function (res) {
+                    console.log(res)
+
+                    if (res.data.code == 200) {
+
+                        that.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        });
+                        that.DecreasePaymentsSelect();
+                    } else {
+                        that.$message.error('删除失败!');
+                    }
+                    that.loading = false
+                }).catch(function (error) {
+                    that.loading = false
+                    that.$message.error("网络错误,请稍后重试");
+                });
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '操作已取消!'
+                });
+            });
+        },
+        download(index, row) {
+            if (row.filePath != "") {
+                window.location.href = "http://132.232.92.186:24/Office/GrpFile/" + row.filePath
+            } else {
+                this.$message.error("暂未上传附件");
+            }
+
+        }
+
+    },
+    mounted() {
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.DecreasePaymentsSelect();
+        //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>

+ 5 - 2
src/components/OP/OpAirTicketRes.vue

@@ -27,8 +27,8 @@
                 <div style="display: flex;">
                     <div style="width: 33%;">
                         <el-form-item label="团组名称:" label-width="160px">
-                            <el-select v-model="DiIdSelect" placeholder="团组选择" @change="AirTicketResChange"
-                                style="width: 100%;">
+                            <el-select v-model="DiIdSelect" clearable filterable placeholder="团组选择"
+                                @change="AirTicketResChange" :disabled="isShow" style="width: 100%;">
                                 <el-option v-for="item in AirTicketResSelectData" :key="item.id" :label="item.groupName"
                                     :value="item.id">
                                 </el-option>
@@ -419,6 +419,7 @@ export default {
             userId: 0,
             id: '',
             DiId: '',
+            isShow: false,
             DiIdSelect: '',
             delegationInfo: {},
             AirTicketResSelectData: [],//团组下拉框
@@ -535,8 +536,10 @@ export default {
             })
             if (that.DiId != undefined && that.id != undefined) {
                 that.status = 2;
+                that.isShow = true
                 that.AirTicketResById();
             } else {
+                that.isShow = false
                 that.status = 1;
             }
         },

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

@@ -0,0 +1,487 @@
+<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="DiIdSelect" clearable filterable placeholder="团组选择"
+                                @change="DecreasePaymentsChange" :disabled="isShow" style="width: 220px;">
+                                <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="团 号:" prop="tourCode" label-width="160px">
+                            <el-input placeholder="团号" v-model="delegationInfo.tourCode" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="客户:" prop="clientName" label-width="160px">
+                            <el-input placeholder="客户" v-model="delegationInfo.clientName" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 25%;">
+                        <el-form-item label="出访国家:" prop="visitCountry" label-width="160px">
+                            <el-input placeholder="出访国家" v-model="delegationInfo.visitCountry" :disabled="true">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+            </el-form>
+            <el-form :model="DecreasePaymentsData" ref="DecreasePaymentsData" :rules="DecreasePaymentsRules"
+                label-width="100px" class="demo-ruleForm">
+                <div style="display:flex ;">
+                    <div style="width: 33%;">
+                        <el-form-item label="费用名称:" prop="priceName" label-width="160px">
+                            <el-input placeholder="费用名称" v-model="DecreasePaymentsData.priceName">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 33%;">
+                        <el-form-item label="费用金额:" prop="price" label-width="160px">
+                            <el-input placeholder="费用金额" v-model="DecreasePaymentsData.price" style="width: 58%;">
+                            </el-input>
+                            <el-select v-model="DecreasePaymentsData.currency" style="width: 35%;">
+                                <el-option key="48" label="CNY" :value="48"></el-option>
+                                <el-option key="49" label="USD" :value="49"></el-option>
+                                <el-option key="51" label="EUR" :value="51"></el-option>
+                            </el-select>
+                        </el-form-item>
+                    </div>
+                    <div style="width: 33%;">
+                        <el-form-item label="收款方:" prop="payee" label-width="160px">
+                            <el-input placeholder="收款方" v-model="DecreasePaymentsData.payee">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <div style="display:flex ;">
+                    <div style="width: 33%;">
+                        <el-form-item label="费用标识:" prop="orbitalPrivateTransfer" label-width="160px">
+                            <el-select v-model="DecreasePaymentsData.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 style="width: 33%;">
+                        <el-form-item label="支付方式:" prop="payDId" label-width="160px">
+                            <el-select v-model="DecreasePaymentsData.payDId" placeholder="支付方式" style="width: 100%;">
+                                <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>
+                <div style="display: flex;">
+                    <div style="50;">
+                        <el-form-item label="附件:" prop="fileUrl" label-width="160px">
+                            <el-upload :file-list="uploadFiles" ref="upload" :on-success="upLoadSuccess"
+                                :on-error="upLoadError" :before-remove="beforeRemove" :on-change="onChange" :limit="1"
+                                :on-exceed="exceed" :action="uploadURL" :headers="headers" :auto-upload="false">
+                                <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: 90%;">
+                        <el-form-item label="备 注:" prop="remark" label-width="160px">
+                            <el-input type="textarea" :rows="5" placeholder="备注"
+                                v-model="DecreasePaymentsData.remark"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+                <el-form-item>
+                    <div style="margin-left: 60%;">
+                        <el-button type="primary" @click="addBtn">保存</el-button>
+                        <router-link to='/home/DecreasePayments'>
+                            <el-button>取消</el-button>
+                        </router-link>
+                    </div>
+                </el-form-item>
+            </el-form>
+
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            projectName: "",
+            //uploadURL: "/project/upload?a=1",
+            uploadFiles: [],//上传的文件列表
+            DelfileName: "",
+            title: "新增团组增减款项费用",
+            token: '',
+            userId: 0,
+            id: '',
+            DiId: '',
+            isShow: false,
+            DiIdSelect: '',
+            delegationInfo: {},
+            delegationInfoList: [],//团组下拉框
+            payment: [],//支付方式下拉框
+            DecreasePaymentsData: {
+                status: 0,
+                payDId: 72,
+                orbitalPrivateTransfer: 0,
+                payee: "",
+                id: 0,
+                diId: 0,
+                priceName: "",
+                price: 0,
+                currency: 48,
+                filePath: "",
+                createUserId: 0,
+                remark: ""
+            },
+            Decrease: {},
+            CreditCard: {},
+            headers: {
+                Authorization: JSON.parse(localStorage.getItem('userinif')).token
+            },
+            DecreasePaymentsRules: {
+                price: [
+                    { required: true, message: '请输入费用金额', trigger: 'change' },
+                    { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
+                ],
+                priceName: [
+                    { required: true, message: '请输入费用名称', trigger: 'change' },
+                ],
+                payee: [
+                    { required: true, message: '请输入收款方姓名', trigger: 'change' },
+                ],
+                orbitalPrivateTransfer: [
+                    { required: true, message: '请选择费用标识', trigger: 'change' },
+                ],
+                payDId: [
+                    { required: true, message: '请选择支付方式', trigger: 'change' }
+                ],
+            }
+
+        }
+    },
+    computed: {
+        //文件的上传路径
+        uploadURL: function () {
+            //var userId = this.$store.state.userId;
+            return "http://132.232.92.186:8888/api/Groups/UploadProject";
+        }
+    },
+
+    methods: {
+        //团组下拉框
+        AirTicketResSelect() {
+            var url = "/api/Groups/DecreasePaymentsSelect"
+            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) {
+                    that.delegationInfoList = res.data.data.groupName;
+                    that.DiIdSelect = parseInt(that.DiId)
+                    for (let index = 0; index < that.delegationInfoList.length; index++) {
+                        if (that.delegationInfoList[index].id == that.DiIdSelect) {
+                            that.delegationInfo = that.delegationInfoList[index];
+                            break;
+                        }
+                    }
+
+                    that.payment = res.data.data.payment
+                }
+
+            })
+
+
+        },
+        QueryDecreasePaymentsById() {
+            var url = "/api/Groups/QueryDecreasePaymentsById"
+            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) {
+                    that.Decrease = res.data.data._Decrease
+                    that.CreditCard = res.data.data._CreditCard
+                    that.DecreasePaymentsData.payDId = that.CreditCard.payDId
+                    that.DecreasePaymentsData.orbitalPrivateTransfer = that.CreditCard.orbitalPrivateTransfer
+                    that.DecreasePaymentsData.payee = that.CreditCard.payee
+                    that.DecreasePaymentsData.id = that.Decrease.id
+                    that.DecreasePaymentsData.diId = that.Decrease.diId
+                    that.DecreasePaymentsData.priceName = that.Decrease.priceName
+                    that.DecreasePaymentsData.price = that.Decrease.price
+                    that.DecreasePaymentsData.currency = that.Decrease.currency
+                    that.DecreasePaymentsData.filePath = that.Decrease.filePath
+                    that.DecreasePaymentsData.remark = that.Decrease.remark
+                    if (that.Decrease.filePath != null && that.Decrease.filePath != undefined && that.Decrease.filePath != "") {
+                        that.uploadFiles.push({
+                            name: that.Decrease.filePath,
+                            url: 'C:\\Server\\File\\OA2023\\Office\\GrpFile\\',
+                        })
+                    }
+
+                }
+
+            })
+        },
+
+        //点击保存事件
+        addBtn() {
+            const that = this;
+            that.$refs.DecreasePaymentsData.validate((valid) => {
+                if (valid) {
+                    debugger
+                    if (that.projectName == "") {
+                        that.$axios({
+                            method: 'post',
+                            url: "/api/Groups/DelFile",
+                            headers: {
+                                Authorization: 'Bearer ' + that.token
+                            },
+                            data: {
+                                fileName: that.DelfileName,
+                                id: that.id
+                            }
+                        }).then(function (res) {
+                            if (res.data.code == 200) {
+
+                            }
+                        })
+
+                        this.DecreasePaymentsData.filePath = ""
+                        that.DecreasePaymentsData.diId = that.DiIdSelect;
+                        that.DecreasePaymentsData.createUserId = that.userId;
+                        var url = "/api/Groups/OpDecreasePayments"
+                        that.$axios({
+                            method: 'post',
+                            url: url,
+                            headers: {
+                                Authorization: 'Bearer ' + that.token
+                            },
+                            data: that.DecreasePaymentsData
+                        }).then(function (res) {
+                            if (res.data.code == 200) {
+                                that.$message({
+                                    message: res.data.msg,
+                                    type: 'success'
+                                });
+                                that.loading = true;
+                                setTimeout(() => {
+                                    that.$router.push('/home/DecreasePayments')
+                                }, 3000);
+                            } else {
+                                that.$message.error(res.data.msg);
+                            }
+                        })
+                    } else {
+                        that.$refs.upload.submit();//上传文件到服务器
+                    }
+                } else {
+                    this.$message.error('请完善信息在保存!');
+                    return false;
+                }
+            })
+            // 此时必填完成,做保存后的业务操作
+        },
+        DecreasePaymentsChange() {
+            for (let index = 0; index < this.delegationInfoList.length; index++) {
+                if (this.delegationInfoList[index].id == parseInt(this.DiIdSelect)) {
+                    this.delegationInfo = this.delegationInfoList[index];
+                    break;
+                }
+            }
+        },
+
+        //上传
+        // 文件超出限制
+        exceed(files, fileList) {
+            this.$message.warning(
+                `当前限制选择 1个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
+                } 个文件,请取消要替换的文件`
+            );
+        },
+        //文件上传
+        // submitUpload() {
+
+        // },
+        //文件上传成功时的钩子
+        upLoadSuccess(response, file, fileList) {
+            if (response.code == 200) {
+                var that = this;
+                that.$axios({
+                    method: 'post',
+                    url: "/api/Groups/DelFile",
+                    headers: {
+                        Authorization: 'Bearer ' + that.token
+                    },
+                    data: {
+                        fileName: that.DelfileName,
+                        id: that.id
+                    }
+                }).then(function (res) {
+                    if (res.data.code == 200) {
+
+                    }
+                })
+
+                this.DecreasePaymentsData.filePath = response.data
+                that.DecreasePaymentsData.diId = that.DiIdSelect;
+                that.DecreasePaymentsData.createUserId = that.userId;
+                var url = "/api/Groups/OpDecreasePayments"
+                that.$axios({
+                    method: 'post',
+                    url: url,
+                    headers: {
+                        Authorization: 'Bearer ' + that.token
+                    },
+                    data: that.DecreasePaymentsData
+                }).then(function (res) {
+                    if (res.data.code == 200) {
+                        that.$message({
+                            message: res.data.msg,
+                            type: 'success'
+                        });
+                        that.loading = true;
+                        setTimeout(() => {
+                            that.$router.push('/home/DecreasePayments')
+                        }, 3000);
+                    } else {
+                        that.$message.error(res.data.msg);
+                    }
+                })
+                console.log("上传成功");
+            } else {
+                console.log("保存失败");
+            }
+
+        },
+        //文件上传失败时的钩子
+        upLoadError(response, file, fileList) {
+            console.log("项目添加失败");
+        },
+        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
+        }
+
+    },
+
+    mounted() {
+
+        this.token = JSON.parse(localStorage.getItem('userinif')).token;
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
+        this.AirTicketResSelect();
+        this.id = this.$route.query.id
+        if (this.id != null && this.id != undefined && this.id != 0) {
+            this.QueryDecreasePaymentsById();
+            this.title = "修改团组增减款项费用";
+            this.DecreasePaymentsData.status = 2
+            this.isShow = true
+        } else {
+            this.DecreasePaymentsData.status = 1
+            this.title = "新增团组增减款项费用"
+            this.isShow = false
+        }
+        this.DiId = this.$route.query.DiId
+    }
+}
+</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>

+ 1 - 1
src/main.js

@@ -11,7 +11,7 @@ import VueTypedJs from 'vue-typed-js'
 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'
 Vue.use(common);

+ 13 - 0
src/router/index.js

@@ -54,6 +54,8 @@ import FeesPage from '@/components/Finance/FeesPage';
 import AirTicketAgent from '@/components/Resource/AirTicketAgent';
 import AirTicketRes from '@/components/OP/AirTicketRes';
 import OpAirTicketRes from '@/components/OP/OpAirTicketRes';
+import DecreasePayments from '@/components/OP/DecreasePayments';
+import OpDecreasePayments from '@/components/OP/OpDecreasePayments';
 
 Vue.use(Router)
 
@@ -312,6 +314,17 @@ export default new Router({
           name: 'OpAirTicketRes',
           component: OpAirTicketRes
         },
+        {
+          path: '/home/DecreasePayments',
+          name: 'DecreasePayments',
+          component: DecreasePayments
+        },
+        {
+          path: '/home/OpDecreasePayments',
+          name: 'OpDecreasePayments',
+          component: OpDecreasePayments
+        }
+
       ]
     },
     {