liuhj 7 mesi fa
parent
commit
0bc120d78f

+ 1 - 1
src/components/Finance/GroupUnreviewed.vue

@@ -252,12 +252,12 @@ export default {
     padding: 10px;
     max-height: 740px;
     overflow-y: auto;
-    font-size: 15px;
 }
 .groupunreviewed-all .custom-tree-node{
     line-height: 25px;
     display: flex;
     flex-wrap: wrap;
+    font-size: 15px;
 }
 .groupunreviewed-all .el-tree-node__content {
     height: 50px;

+ 218 - 0
src/components/OP/VisaCommission.vue

@@ -0,0 +1,218 @@
+<template>
+    <div class="VisaCommission-all">
+        <div class="VisaCommission-hand">
+            <el-select v-model="DiId" placeholder="团组选择" clearable filterable @change="groupchange"
+                style="width: 250px;">
+                <el-option v-for="item in groupInfoList" :key="item.id" :label="item.groupName"
+                    :value="item.id">
+                </el-option>
+            </el-select>
+            <el-button @click="preserve" type="primary">保存</el-button>
+        </div>
+        <!-- <div class="VisaCommission-tjyh">
+            <el-button @click="vctjyh" type="primary">添加一行</el-button>
+        </div> -->
+        <div class="VisaCommission-table">
+            <el-table
+                :data="tableData"
+                border
+                style="width: 100%">
+                <el-table-column
+                label="国家"
+                width="200">
+                <template slot-scope="scope">
+                    <el-autocomplete
+                    class="inline-input"
+                    v-model="scope.row.country"
+                    :fetch-suggestions="querySearch"
+                    @select="handleSelect(scope.row,$event,scope.$index)"
+                    ></el-autocomplete>
+                </template>
+                </el-table-column>
+                <el-table-column
+                label="签证办理数量"
+                width="180">
+                <template slot-scope="scope">
+                    <el-input-number style="width:100px" v-model="scope.row.quantity" :controls='false'>
+                    </el-input-number>
+                </template>
+                </el-table-column>
+                <el-table-column
+                label="备注">
+                <template slot-scope="scope">
+                    <el-input
+                    type="text"
+                    placeholder="请输入内容"
+                    v-model="scope.row.remark"
+                    
+                    show-word-limit
+                    >
+                    </el-input>
+                </template>
+                </el-table-column>
+                <!-- <el-table-column
+                label="操作"
+                width="200">
+                </el-table-column> -->
+            </el-table>
+            
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            userId:'',
+            DiId:'',
+            groupInfoList:[],
+            tableData: [],
+            restaurants: [],
+        }
+    },
+    methods:{
+        //获取分类
+        VisaCommissionInit() {
+            var url = "/api/Groups/VisaCommissionInit"
+            var that = this
+            this.$axios({
+                method: 'get',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.groupInfoList=res.data.data.groupData;
+                    if (that.DiId=="") {
+                        that.DiId=that.groupInfoList[0].id;
+                    }
+                    that.VisaCommissionItem();
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            })
+        },
+        //查询提成list
+        VisaCommissionItem() {
+            var url = "/api/Groups/VisaCommissionItem"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data:{
+                    portType:1,
+                    currUserId:that.userId,
+                    diId:that.DiId,
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    var dataarr=res.data.data;
+                    that.tableData=dataarr;
+                    that.restaurants = dataarr.map((terminal) => {
+                        return {
+                            value: terminal.country,
+                            id: terminal.id,
+                            quantity: terminal.quantity,
+                            remark: terminal.remark,
+                        };
+                    });
+                    console.log(that.restaurants);
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            })
+        },
+        //团组切换
+        groupchange(){
+            this.VisaCommissionItem()
+        },
+        //添加一行
+        vctjyh(){
+            var newtblist={
+                country: "",
+                id: 0,
+                quantity: 0,
+                remark: ""
+            }
+            this.tableData.push(newtblist)
+        },
+        //保存
+        preserve(){
+            for(let j=0;j<this.tableData.length;j++){
+                this.tableData[j].currUserId=this.userId;
+                this.tableData[j].diId=this.DiId;
+            }
+            // console.log(this.tableData);
+            this.VisaCommissionSave(this.tableData)
+        },
+        //保存api
+        VisaCommissionSave(val) {
+            var url = "/api/Groups/VisaCommissionSave"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer '
+                },
+                data:{
+                    items:val
+                }
+            }).then(function (res) {
+                if (res.data.code == 200) {
+                    that.$message({
+                        message: res.data.msg,
+                        type: 'success',
+                        offset: 50
+                    });
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            })
+        },
+        querySearch(queryString, cb) {
+            var restaurants = this.restaurants;
+            var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+        },
+        createFilter(queryString) {
+            return (restaurant) => {
+                return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+            };
+        },
+        handleSelect(row,evet,index) {
+            row.quantity=evet.quantity;
+            row.remark=evet.remark;
+        }
+    },
+    mounted(){
+        this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
+        this.VisaCommissionInit()
+    }
+}
+</script>
+<style>
+.VisaCommission-all {
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+    min-height: 830px;
+}
+.VisaCommission-hand{
+    display: flex;
+    justify-content: space-between;
+}
+.VisaCommission-tjyh{
+    text-align: right;
+    margin-top: 10px;
+}
+.VisaCommission-table{
+    margin-top: 10px;
+}
+</style>

+ 6 - 0
src/router/index.js

@@ -121,6 +121,7 @@ import TellerStatement from '@/components/statistics/TellerStatement';
 import TellerStatementTB from '@/components/statistics/TellerStatementTB';
 import RoyaltyRecogn from '@/components/OP/RoyaltyRecogn';
 import GroupUnreviewed from '@/components/Finance/GroupUnreviewed';
+import VisaCommission from '@/components/OP/VisaCommission';
 
 Vue.use(Router)
 
@@ -732,6 +733,11 @@ export default new Router({
           name: 'GroupUnreviewed',
           component: GroupUnreviewed
         },
+        {
+          path: '/home/VisaCommission',
+          name: 'VisaCommission',
+          component: VisaCommission
+        },
       ]
     },
     {