Browse Source

增加功能

Lijy 2 năm trước cách đây
mục cha
commit
0ef862e6b7

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -88,7 +88,7 @@ const StringUtil = {
         importAudit: false, // 查看导审记录 //
         
     }
-    console.log(arr);
+    // console.log(arr);
     for(var i in arr) {
         arr[i] == '导入工时' ? obj.importReport = true : ''
         arr[i] == '查看导审记录' ? obj.importAudit = true : ''

+ 13 - 0
fhKeeper/formulahousekeeper/timesheet/src/routes.js

@@ -77,6 +77,9 @@ import quanx from './views/quanx/quanx'
 // 研究中心管理
 import centerManage from './views/centerManage/centerManage'
 
+// 供应商模块
+import provider from './views/provider/provider'
+
 Vue.use(Router)
 
 export const fixedRouter = [
@@ -324,6 +327,16 @@ export const allRouters = [//组织架构
             { path: '/centerManage', component: centerManage, name: '研究中心管理' },
         ]
     },
+    {
+        path: '/',
+        component: Home,
+        name: '供应商管理',
+        iconCls: 'iconfont firerock-iconzuzhijiagou1',
+        leaf: true,//只有一个节点
+        children: [
+            { path: '/provider', component: provider, name: '供应商管理' },
+        ]
+    },
     {
         path: '/',
         component: Home,

+ 89 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -184,6 +184,10 @@
                 </div>
             </template>
             </el-table-column>
+            <!-- 供应商 -->
+            <el-table-column prop="providerNames" label="供应商" min-width="190" v-if="user.company.packageProvider">
+            </el-table-column>
+
             <el-table-column prop="status" label="状态" min-width="100" >
                 <template slot-scope="scope">
                     {{scope.row.status == null?"-":statusTxt[scope.row.status]}}
@@ -279,6 +283,21 @@
                         </el-select>
                     </div>
                 </el-form-item>
+                <!-- 供应商 -->
+                <!-- <el-form-item label="供应商" v-if="user.company.packageProvider">
+                    <el-select v-model="addForm.supplierId" multiple collapse-tags style="width:32%;" placeholder="请选择供应商">
+                        <el-option v-for="item in supplierList" :key="item.id" :label="item.providerName" :value="item.id">
+                        </el-option>
+                    </el-select>
+                </el-form-item> -->
+                <el-form-item label="供应商" v-if="user.company.packageProvider">
+                    <el-select v-model="auseList" multiple placeholder="请选择" filterable="true" style="width: 100%">
+                        <span v-for="(item, index) in supplierList" :key="index">
+                            <el-option :label="item.providerName" :value="item.id"></el-option>
+                        </span> 
+                    </el-select>
+                </el-form-item>
+
                 <el-form-item :label="yonghuUser.customDegreeName" v-if="yonghuUser.customDegreeActive == 1">
                     <el-select v-model="auseList" multiple placeholder="请选择" filterable="true" style="width: 100%">
                         <span v-for="(item, index) in ause" :key="index">
@@ -885,8 +904,8 @@ a {
                 showColumnWidth: '300',
                 deleteVif: null,
                 isAddGroupPerson: true,
-                projectMainId: ''
-                
+                projectMainId: '',
+                supplierList: ''
             };
         },
         // 过滤器
@@ -919,6 +938,30 @@ a {
             }
         },
         methods: {
+            //获取项目列表
+            getSupplierList() {
+                this.http.post('/provider-info/list', {
+                    pageIndex: 1,
+                    pageSize: 999,
+                    keyword: ''
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.supplierList = res.data.records;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
             addManPro(row) {
                 this.addFlgmainProjectDialog = true
                 if(!row) {
@@ -2377,6 +2420,26 @@ a {
                         projectMainId: item.projectMainId,
                         creatorId: item.creatorId
                     }
+
+                    // 判断是否有供应商
+                    if(this.user.company.packageProvider) {
+                        // this.addForm.supplierId = item.providerIds.split(',')
+                        if(item.providerIds) {
+                            let arr = [] 
+                            let zhhi = item.providerIds.split(',')
+                            for(let i in zhhi) {
+                                arr.push(+zhhi[i] + 0)
+                            }
+                            this.$set(this.addForm, 'supplierId', arr)
+                            console.log( this.addForm.supplierId)
+                        } else {
+                            this.$set(this.addForm, 'supplierId', [])
+                        }
+                       
+                    }
+                    // 判断是否有供应商结尾
+
+
                     this.deleteVif = item.creatorId
                     console.log("handleadd",this.deleteVif,this.addForm.id)
                     if(item.associateDegrees != null && item.associateDegrees != 'null' && item.associateDegrees != '') {
@@ -2603,6 +2666,22 @@ a {
                         if(this.user.timeType.mainProjectState == '1') {
                             formData.append("projectMainId", this.addForm.projectMainId);
                         }
+
+                        // 提交供应商
+                        // 线判断是否有供应商
+                        if(this.user.company.packageProvider) {
+                            let suppStrName = []
+                            for(let is in this.addForm.supplierId) {
+                                for(let js in this.supplierList) {
+                                    if(this.addForm.supplierId[is] == this.supplierList[js].id) {
+                                        suppStrName.push(this.supplierList[js].providerName)
+                                    }
+                                }
+                            }
+                            formData.append("providerNames", suppStrName.toString());
+                            formData.append("providerIds", this.addForm.supplierId.toString());
+                        }
+
                         // formData.append("associateDegreeNames", listName)
                         // console.log("addform",this.addForm);
                         // return
@@ -2740,7 +2819,14 @@ a {
             this.getProjectBaseConfigList();
             this.getClfConfigList()
             this.yanjiuzx()
-            if(this.user,timeType.mainProjectState == 1){
+
+            // 判断是否有供应商字段
+            if(this.user.company.packageProvider == 1){
+                this.getSupplierList()
+            }
+            // this.getSupplierList()
+
+            if(this.user.timeType.mainProjectState == 1){
                 this.getMainProject()
             }
             

+ 587 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/provider/provider.vue

@@ -0,0 +1,587 @@
+<template>
+    <section>
+        <!--工具条-->
+        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+            <el-form :inline="true">
+                <el-form-item label="供应商列表">
+                    
+                </el-form-item>
+                <el-form-item >
+                    <div>
+                    <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入供应商名称关键字" clearable="true" @clear="getList()">
+                        <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
+                    </el-input>
+                    </div>
+                </el-form-item>
+                <el-form-item style="float:right;">
+                    <el-link type="primary" :underline="false" @click="handleAdd(-1,null)">新增供应商</el-link>
+                    <el-link type="primary" :underline="false" @click="intocustomerRatio">批量导入供应商</el-link>
+                </el-form-item>
+            </el-form>
+        </el-col>
+
+        <!--列表-->
+        <el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="selectionChange">
+            <el-table-column type="selection" width="60">
+                <!-- <template slot-scope="scope" >
+                        {{scope.$index+1+(page-1)*size}}
+                    </template> -->
+            </el-table-column>
+            <el-table-column prop="providerCode" label="供应商编码"  width="200"></el-table-column>
+            <el-table-column prop="providerName" label="供应商名称" width="200">
+            </el-table-column>
+            <el-table-column prop="contactName" label="联系人"  width="120">
+            </el-table-column>
+            <el-table-column prop="contactPhone" label="联系电话"  width="150">
+            </el-table-column>
+            <el-table-column prop="email" label="邮箱"  width="180">
+            </el-table-column>
+            <el-table-column prop="address" label="地址" width="200">
+            </el-table-column>
+            <el-table-column prop="remark" label="备注" width="300">
+            </el-table-column>
+            
+            <el-table-column label="操作" width="150" fixed="right">
+                <template slot-scope="scope">
+                    <el-button size="mini" type="primary" @click="handleAdd(scope.$index, scope.row)">编辑</el-button>
+                    <el-button size="mini"  @click="deletePro(scope.$index, scope.row)">删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+
+        <!--工具条-->
+        <el-col :span="24" class="toolbar">
+            <el-button type="primary" size="small" @click="batchDelete" :loading="delLoading">批量删除</el-button>
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :page-sizes="[20 , 50 , 80 , 100]"
+                :page-size="20"
+                layout="total, sizes, prev, pager, next"
+                :total="total"
+                style="float:right;"
+            ></el-pagination>
+        </el-col>
+
+        <!--新增界面-->
+        <el-dialog :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth" width="800px">
+            <el-form ref="form1" :model="addForm" :rules="rules" label-width="120px">
+                <el-form-item label="供应商编号" >
+                    <el-input v-model="addForm.providerCode" :max="20" placeholder="请输入供应商编号" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="供应商名称" prop="providerName">
+                    <el-input v-model="addForm.providerName" :max="20" placeholder="请输入供应商名称" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="联系人" prop="contactName">
+                    <el-input v-model="addForm.contactName" :max="20" placeholder="请输入供应商联系人" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="联系电话" prop="contactPhone">
+                    <el-input v-model="addForm.contactPhone" :max="20" placeholder="请输入供应商联系电话" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="邮箱" prop="email">
+                    <el-input v-model="addForm.email" :max="25" placeholder="请输入供应商邮箱" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="地址" prop="address">
+                    <el-input v-model="addForm.address" :max="50"  placeholder="请输入供应商联系地址" clearable></el-input>
+                </el-form-item>
+                <el-form-item label="备注" prop="remark ">
+                    <el-input type="textarea" :rows="4" v-model="addForm.remark " maxlength="100" show-word-limit placeholder="请输入备注" clearable></el-input>
+                </el-form-item>
+
+            </el-form>
+            <div slot="footer" class="dialog-footer;">
+                <el-button @click.native="addFormVisible = false">取消</el-button>
+                <el-button type="primary" @click="submitInsert" :loading="addLoading">提交</el-button>
+            </div>
+        </el-dialog>
+         <!-- 导入结果说明 -->
+        <el-dialog title="分摊比例导入结果" v-if="showImportResult" :visible.sync="showImportResult" customClass="customWidth" width="500px">
+            <div>
+                <span>{{importResultMsg}}</span>
+                
+            </div>
+            <span slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="showImportResult=false">确定</el-button>
+            </span>
+        </el-dialog>
+         <el-dialog title="导入供应商数据" v-if="intocustomerDialog" :visible.sync="intocustomerDialog" customClass="customWidth" width="500px">
+            <p>1. 下载
+            <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/新增供应商导入模板.xlsx" download="新增供应商导入模板.xlsx">新增供应商导入模板.xlsx</el-link>
+            </p>
+            <!-- <p>2. 填写excel模板,请确保模板中的项目和人员已添加到系统中。</p> -->
+            <p style="display: flex;justify-content: center;padding:1em 0">
+                <el-upload ref="upload"  action="#" :limit="1" :http-request="batchImportData" :show-file-list="false">
+                <el-button type="primary" :underline="false" :loading="importingData">开始导入</el-button>
+            </el-upload>
+            </p>
+        </el-dialog>
+    </section>
+</template>
+<style scoped>
+.input-with-select .el-input-group__prepend {
+    background-color: #fff;
+  }
+.line {
+    padding:10px;
+}
+.line span{
+    font-size:15px;
+}
+.line span:nth-child(even){
+    float:right;
+}
+</style>
+<script>
+    import util from "../../common/js/util";
+    export default {
+        data() {
+            return {
+                roleArray:["普通员工","超级管理员", "系统管理员", "公司高层","财务管理员", "项目管理员"],
+                status:null,
+                statusTxt:["-","进行中","已完成","已撤销"],
+                importanceList:[{id:1,label:'正常'},{id:2,label:'紧急'},{id:3,label:'重要'},{id:4,label:'重要且紧急'}],
+                searchField:null,
+                keyword:null,
+                user: JSON.parse(sessionStorage.getItem("user")),
+                userDetailVisible: false,
+                userDetail:{},
+                date: new Date(),
+                users: [],
+                participator:[],
+                tableHeight: 0,
+                listLoading: false,
+                total: 0,
+                page: 1,
+                size: 20,
+                list: [],
+                subProjectVisible: false,
+                subProjectList: [],//子项目列表
+                currentProject:{},
+                addSubProject: false,
+                addFormVisible: false,
+                addLoading: false,
+                addUp: 0, // 合计
+                title: "",
+                addForm: {
+                    name: '',
+                    userId: [],
+                    level:1,
+                },
+                rules: {
+                    providerName: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
+                },
+                intocustomerDialog:false,
+                importingData: false,
+                importResultMsg:null,
+                showImportResult:false,
+                selectArr: [],
+                delLoading: false
+            };
+        },
+        // 过滤器
+        filters: {
+            numberToCurrency(value) {
+                if (!value) return '0.00'
+                // 将数值截取,保留两位小数
+                value = value.toFixed(2)
+                // 获取整数部分
+                const intPart = Math.trunc(value)
+                // 整数部分处理,增加,
+                const intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
+                // 预定义小数部分
+                let floatPart = '.00'
+                // 将数值截取为小数部分和整数部分
+                const valueArray = value.toString().split('.')
+                if (valueArray.length === 2) { // 有小数部分
+                floatPart = valueArray[1].toString() // 取得小数部分
+                return intPartFormat + '.' + floatPart
+                }
+                return intPartFormat + floatPart
+            }
+        },
+        methods: {
+            // 批量删除
+            selectionChange(selection){
+                console.log('sel',selection);
+                this.selectArr = selection
+            },
+            batchDelete(){
+                if(this.selectArr.length == 0){
+                    this.$message('请选择要删除的供应商数据')
+                    return
+                }else{
+                    let nametext = ''
+                    for(let i in this.selectArr){
+                        nametext += this.selectArr[i].providerName + '、'
+                    }
+                    nametext = nametext.substring(0,nametext.length - 1)
+                    this.$confirm("确定要批量删除供应商:" + nametext + "\u3000吗?","删除供应商", {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning"
+                    }).then(()=>{
+                        this.delLoading = true
+                        let batchIds = ''
+                        for(let m in this.selectArr){
+                            batchIds += this.selectArr[m].id + ','
+                        }
+                        batchIds = batchIds.substring(0,batchIds.length - 1)
+                        this.http.post('/provider-info/batchDelete',{
+                            batchIds
+                        },res => {
+                            this.delLoading = false
+                            if(res.code == 'ok'){
+                                this.$message({
+                                    message: '删除成功',
+                                    type: 'success'
+                                })
+                                this.getList()
+                            }else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: 'error'
+                                })
+                            }
+                        },err => {
+                            this.delLoading = false
+                            this.$message({
+                                message: res.msg,
+                                type: 'error'
+                            })
+                        })
+                    })
+                    
+                }
+            },
+            intocustomerRatio(){
+                this.intocustomerDialog=true;
+            },
+            batchImportData(item) {
+                //首先判断文件类型
+                let str = item.file.name.split(".");
+                let format = str[str.length - 1];
+                if (format != "xls" && format != "xlsx") {
+                    this.$message({
+                        message: "请选择.xls或.xlsx文件",
+                        type: "error"
+                    });
+                } else {
+                    this.importingData = true;
+                    let formData = new FormData();
+                    formData.append("file", item.file);
+                    this.http.uploadFile('/provider-info/importData', formData,
+                    res => {
+                        this.$refs.upload.clearFiles();
+                        this.importingData = false;
+                        this.showImportResult = true;
+                        if (res.code == "ok") {
+                            //换成弹出框,以免有人等了半天回来啥也没看到
+                            this.importResultMsg = "成功导入/更新"+res.data+"条供应商数据。"+(res.msg?res.msg:"");
+                            this.getList();
+                        } else {
+                            this.importResultMsg = "导入失败:"+res.msg;
+                        }
+                    },
+                    error => {
+                        this.$refs.upload.clearFiles();
+                        this.importingData = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                }
+            },
+            importProject(item) {
+                //首先判断文件类型
+                let str = item.file.name.split(".");
+                let format = str[str.length - 1];
+                if (format != "xls" && format != "xlsx") {
+                    this.$message({
+                        message: "请选择.xls或.xlsx文件",
+                        type: "error"
+                    });
+                } else {
+                    this.listLoading = true;
+                    let formData = new FormData();
+                    formData.append("file", item.file);
+                    formData.append("userId", this.user.id);
+                    this.http.uploadFile('/project/importData', formData,
+                    res => {
+                        this.$refs.upload.clearFiles();
+                        this.listLoading = false;
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: "导入成功",
+                                type: "success"
+                            });
+                            this.getList();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.$refs.upload.clearFiles();
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                }
+            },
+            number(){  
+        //      this.addForm.budget = this.addForm.budget.replace(/[^\.\d]/g,'');
+        //         this.addForm.budget = this.addForm.budget.replace('.','');
+          },
+            deleteSubPro(subProject) {
+                this.$confirm("确定要删除子项目" + subProject.name + "吗?","删除子项目", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                })
+                .then(() => {
+                    this.listLoading = true;
+                    this.http.post('/sub-project/deleteProject',{ 
+                        id: subProject.id 
+                    },
+                    res => {
+                        this.listLoading = false;
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: "删除成功",
+                                type: "success"
+                            });
+                            this.subProject(this.currentProject);
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+                })
+                .catch(() => {});
+            },
+            searchList() {
+                this.page = 1;
+                this.getList();
+            },
+            addNewSubProject(subProject) {
+                console.log(123);
+                if (subProject == null) {
+                    this.addForm = {projectId: this.currentProject.id, level:1}
+                } else {
+                    this.addForm = subProject;
+                }
+                this.addSubProject = true;
+            },
+            //显示子项目
+            subProject(item) {
+                this.subProjectVisible = true;
+                this.currentProject = item;
+                this.http.post('/sub-project/list', {
+                    projectId: item.id
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.subProjectList = res.data;
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            //显示用户详情
+            showUser(userId) {
+                this.userDetailVisible = true;
+                this.http.post(this.port.manage.userDetail, {
+                    userId: userId
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.userDetail = res.data;
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            
+            
+            //分页
+            handleCurrentChange(val) {
+                this.page = val;
+                this.getList();
+            },
+
+            handleSizeChange(val) {
+                this.size = val;
+                this.getList();
+            },
+
+            //获取项目列表
+            getList() {
+                this.listLoading = true;
+                this.http.post('/provider-info/list', {
+                    pageIndex: this.page,
+                    pageSize: this.size,
+                    keyword:this.keyword
+                },
+                res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        var list = res.data.records;
+                        this.list = list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //显示新增界面
+            handleAdd(i, item) {
+                if(i == -1) {
+                    this.title = "新增供应商";
+                    this.addForm = {
+                    }
+                } else {
+                    this.title = "修改供应商";
+                    this.addForm = JSON.parse(JSON.stringify(item));
+                }
+                this.addFormVisible = true;
+            },
+
+            submitInsert() {
+                this.$refs.form1.validate(valid => {
+                    if (valid) {
+                        this.addLoading = true;
+                        this.http.post('/provider-info/addOrMod', this.addForm,
+                        res => {
+                            this.addLoading = false;
+                            if (res.code == "ok") {
+                                this.addFormVisible = false;
+                                this.getList();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: "error"
+                                });
+                            }
+                        },
+                        error => {
+                            this.addLoading = false;
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                        });
+                        }
+                });
+            },
+
+            // 删除
+            deletePro(i, item) {
+                this.$confirm("确定要删除供应商" + item.providerName + "吗?","删除供应商", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                })
+                .then(() => {
+                    this.listLoading = true;
+                    this.http.post('/provider-info/delete',{ 
+                        id: item.id 
+                    },
+                    res => {
+                        this.listLoading = false;
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: "删除成功",
+                                type: "success"
+                            });
+                            this.getList();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+                })
+                .catch(() => {});
+            },
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 195;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 195;
+            };
+        },
+        mounted() {
+            this.getList();
+        }
+    };
+</script>
+
+<style lang="scss" scoped>
+.rg_span{
+    display: inline-block;
+}
+.rg_span span {
+    text-align: right;
+    box-sizing: border-box;
+    padding-right: 10px;
+}
+.el-dialog__title {
+    display: inline-table;
+    margin-top: 20px;
+}
+</style>

+ 12 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -84,7 +84,7 @@
                     </el-form-item> -->
                     <el-form-item style="float:right;">
                         <span style="color: #666666">角色</span>
-                        <el-select v-model="roleId" placeholder="请选择" @change="getUser()" style="width: 120px" clearable>
+                        <el-select v-model="roleId" placeholder="请选择" @change="getUser()" style="width: 120px" clearable size="small">
                             <!-- <el-option
                             v-for="item in rolesa"
                             :key="item.value"
@@ -96,7 +96,7 @@
                     </el-form-item>
                     <el-form-item style="float:right;">
                         <span style="color: #666666">状态</span>
-                        <el-select v-model="status" placeholder="请选择" @change="getUser()" style="width: 120px">
+                        <el-select v-model="status" placeholder="请选择" @change="getUser()" style="width: 120px" size="small">
                             <el-option
                             v-for="item in states"
                             :key="item.value"
@@ -106,12 +106,16 @@
                         </el-select>
                     </el-form-item>
                     <el-form-item style="float:right;">
-                        <div style="width: 250px;display: inline-block;">
-                            <el-input v-model="keyword" class="input-with-select" placeholder="请输入人员名字搜索" clearable="true">
+                        <div style="width: 200px;display: inline-block;margin-top: 4px">
+                            <el-input v-model="keyword" class="input-with-select" placeholder="请输入人员名字" clearable="true" size="small">
                                 <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button>
                             </el-input>
                         </div>
                     </el-form-item>
+                     <el-form-item style="float:right;" v-if="depData != null && depData.id != '-1'">
+                        <el-checkbox v-model="onlyDirect" @change="getUser()">直属员工</el-checkbox>
+                    </el-form-item>
+                     
                 </el-form>
             </el-col>
 
@@ -738,7 +742,8 @@
 
                 suoying: ['plate1','plate2','plate3','plate4','plate5'],
                 insertFormPlates: [],
-                saveBtnLoading: false
+                saveBtnLoading: false,
+                onlyDirect: false
             };
         },
         filters: {
@@ -1568,7 +1573,8 @@
                     keyword: this.keyword,
                     status: this.status,
                     // role: this.role
-                    roleId: this.roleId
+                    roleId: this.roleId,
+                    onlyDirect: this.onlyDirect ? '1' : '0'
                 },
                 res => {
                     this.listLoading = false;