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

api.ms.organization.post.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/post/list.do",data
        		).then(func, (err) => {
                console.log(err)
            })
    }
    
    /**
     * 保存岗位管理
     * @param data
     * @param func
     * @returns
     */
    function save(data,func) {
        ms.http.post(ms.base + "/people/organization/post/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.post(ms.base + "/people/organization/post/update.do",data,{
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded'
			}
		}).then(func, (err) => {
                console.log(err)
            })
    }
    
    
    /**
     * 通过postId查询岗位管理实体
     * @param data
     * @param func
     * @returns
     */
    function get(data,func) {
        ms.http.get(ms.base + "/people/organization/post/get.do",data
        		).then(func, (err) => {
                console.log(err)
            })
    }

 
    /**
     * 根据编号删除
     * @param data
     * @param func
     * @returns
     */
    function del(data,func) {
        ms.http.post(ms.base + "/people/organization/post/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 post = {
    	list:list,
    	saveOrUpdate:saveOrUpdate,
    	save:save,
    	update:update,
    	get:get,
    	del:del
	}
    window.ms.people.organization.post = post;
}());




© 2015 - 2024 Weber Informatics LLC | Privacy Policy