|
|
@ -2,6 +2,7 @@ |
|
|
import Scene from '../../index/scene' |
|
|
import Scene from '../../index/scene' |
|
|
import { getCheckList, auditEmploye, createQrcode } from "../../../api/user" |
|
|
import { getCheckList, auditEmploye, createQrcode } from "../../../api/user" |
|
|
import { getEmployeList } from "../../../api/saas" |
|
|
import { getEmployeList } from "../../../api/saas" |
|
|
|
|
|
const event = require('../../../utils/event') |
|
|
const util = require('../../../utils/util') |
|
|
const util = require('../../../utils/util') |
|
|
const app = getApp() |
|
|
const app = getApp() |
|
|
|
|
|
|
|
|
@ -25,6 +26,7 @@ Scene({ |
|
|
if(options.type){ |
|
|
if(options.type){ |
|
|
this.data.type = Number(options.type) |
|
|
this.data.type = Number(options.type) |
|
|
} |
|
|
} |
|
|
|
|
|
event.on('EventMessage', this, this.onEvent) |
|
|
this.setData({ height: app.globalData.fragmentHeight }) |
|
|
this.setData({ height: app.globalData.fragmentHeight }) |
|
|
this.fetchMemberList() |
|
|
this.fetchMemberList() |
|
|
if(this.data.type == 0){ |
|
|
if(this.data.type == 0){ |
|
|
@ -37,6 +39,11 @@ Scene({ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
onEvent: function(message){ |
|
|
|
|
|
if (message.what == 120) { |
|
|
|
|
|
this.fetchMemberList() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
fetchMemberList: function(){ |
|
|
fetchMemberList: function(){ |
|
|
wx.showLoading({ title: '加载中', mask: true }) |
|
|
wx.showLoading({ title: '加载中', mask: true }) |
|
|
if(this.data.type == 0){ |
|
|
if(this.data.type == 0){ |
|
|
@ -55,7 +62,6 @@ Scene({ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
lookItem: function(e){ |
|
|
lookItem: function(e){ |
|
|
var that = this |
|
|
|
|
|
this.data.nowIndex = e.currentTarget.dataset.index |
|
|
this.data.nowIndex = e.currentTarget.dataset.index |
|
|
var item = this.data.memberList[this.data.nowIndex] |
|
|
var item = this.data.memberList[this.data.nowIndex] |
|
|
if(this.data.type){ |
|
|
if(this.data.type){ |
|
|
@ -64,14 +70,7 @@ Scene({ |
|
|
wx.navigateBack() |
|
|
wx.navigateBack() |
|
|
} else { |
|
|
} else { |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: `/pages/home/employee-info/index?id=${item.enterpriseMemberId}`, |
|
|
|
|
|
events: { |
|
|
|
|
|
onCallback: (data) => { |
|
|
|
|
|
if (data.what == 120) { |
|
|
|
|
|
that.fetchMemberList() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
url: `/pages/home/employee-info/index?type=1&id=${item.enterpriseMemberId}`, |
|
|
success: function(res) { |
|
|
success: function(res) { |
|
|
res.eventChannel.emit('onParam', item) |
|
|
res.eventChannel.emit('onParam', item) |
|
|
} |
|
|
} |
|
|
@ -79,18 +78,10 @@ Scene({ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
agreeItem: function(e){ |
|
|
agreeItem: function(e){ |
|
|
var that = this |
|
|
|
|
|
this.data.nowIndex = e.currentTarget.dataset.index |
|
|
this.data.nowIndex = e.currentTarget.dataset.index |
|
|
var item = this.data.checkList[this.data.nowIndex] |
|
|
var item = this.data.checkList[this.data.nowIndex] |
|
|
wx.navigateTo({ |
|
|
wx.navigateTo({ |
|
|
url: `/pages/home/employee-info/index?id=${item.enterpriseMemberId}`, |
|
|
url: `/pages/home/employee-info/index?id=${item.enterpriseMemberId}`, |
|
|
events: { |
|
|
|
|
|
onCallback: (data) => { |
|
|
|
|
|
if (data.what == 120) { |
|
|
|
|
|
that.fetchMemberList() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
success: function(res) { |
|
|
success: function(res) { |
|
|
res.eventChannel.emit('onParam', item) |
|
|
res.eventChannel.emit('onParam', item) |
|
|
} |
|
|
} |
|
|
@ -113,5 +104,8 @@ Scene({ |
|
|
imageUrl: 'https://img.imgdb.cn/item/607660278322e6675ccd9960.png', |
|
|
imageUrl: 'https://img.imgdb.cn/item/607660278322e6675ccd9960.png', |
|
|
path: `pages/login/index?qrcode=${this.data.qrcode}` |
|
|
path: `pages/login/index?qrcode=${this.data.qrcode}` |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
onUnload: function(){ |
|
|
|
|
|
event.remove('EventMessage', this) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |