s_grade.js 1.25 KB
//logs.js
var util = require('../../utils/util.js')
var uri=require('../../utils/uri.js')
import App from '../../utils/api.js'
Page({
    data: {
        toView:''
    },
    onLoad: function () {
        var that = this;
        util.setBarTitle('员工与职级管理')
		let headerHeight=util.cache('headerHeight');
        var fixedheight=240/(750/util.cache('system.info').windowWidth);
        var contentHeight=Math.round((util.cache('system.info').windowHeight)-fixedheight-headerHeight);
        this.setData({
            sellerid: util.cache("sellerid"),
            contentHeight:contentHeight,
			identity:util.cache('identity') ? util.cache('identity') : null,
			headerHeight:headerHeight,
			fixedheight:fixedheight
        })
    },
    onShow:function(){
        this.getstaff();
    },
    //获取员工别列表
    getstaff:function(){
		console.log('ppppp')
		App.Seller.GetAuthUserLists({sellerid:this.data.sellerid}).then((json)=>{
			console.log(json,'uuuuuuu')
			if(json.ret==200){
				this.setData({
					list:json.data
				})
			}
		})
    },
    editService:function(e){
        wx.navigateTo({
            url:'../store/s_staffadd?id='+e.currentTarget.dataset.id+'&type='+2
        })
    },
    netchange:function(){
        this.onShow();
    }

})