All Downloads are FREE. Search and download functionalities are using the official Maven repository.

api.ms.organization.employee.js Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
/**
 *员工管理
 */
(function() {
    /**
     * 员工管理列表
     * @param data
     * @param func
     * @returns
     */
    function list(data,func) {
        ms.http.get(ms.base + "/people/organization/employee/list.do",data
        		).then(func, (err) => {
                console.log(err)
            })
    }
    
    /**
     * 保存员工管理
     * @param data
     * @param func
     * @returns
     */
    function save(data,func) {
        ms.http.employee(ms.base + "/people/organization/employee/save.do",data,{
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded'
			}
		}).then(func, (err) => {
                console.log(err)
            })
    }
    
    /**
     *  更新员工管理
     * @param data
     * @param func
     * @returns
     */
    function update(data,func) {
        ms.http.employee(ms.base + "/people/organization/employee/update.do",data,{
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded'
			}
		}).then(func, (err) => {
                console.log(err)
            })
    }
    
    
    /**
     * 通过employeeId查询员工管理实体
     * @param data
     * @param func
     * @returns
     */
    function get(data,func) {
        ms.http.get(ms.base + "/people/organization/employee/get.do",data
        		).then(func, (err) => {
                console.log(err)
            })
    }

 
    /**
     * 根据编号删除
     * @param data
     * @param func
     * @returns
     */
    function del(data,func) {
        ms.http.employee(ms.base + "/people/organization/employee/delete.do",data
        		).then(func, (err) => {
                console.log(err)
            })
    }
    /**
     * 保存或更新
     * @param data
     * @param func
     * @returns
     */
    function saveOrUpdate(data,func) {
        if(data.id > 0){
        	this.update(data,func);
        }else{
        	this.save(data,func);
        }
    }
    let employee = {
    	list:list,
    	saveOrUpdate:saveOrUpdate,
    	save:save,
    	update:update,
    	get:get,
    	del:del
	}
    window.ms.people.organization.employee = employee;
}());




© 2015 - 2024 Weber Informatics LLC | Privacy Policy