Merge branch 'test' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into gh
This commit is contained in:
commit
bcb058e136
|
|
@ -100,7 +100,7 @@ export function updateStatus(data) {
|
|||
// 编辑
|
||||
export function tbPlussShopStaffDetail(id) {
|
||||
return request({
|
||||
url: `/api/tbPlussShopStaff/${id}`,
|
||||
url: `/api/tbPlussShopStaff/` + id,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,24 +129,17 @@
|
|||
onShow(() => {
|
||||
// 获取角色信息
|
||||
getrolesEvent()
|
||||
if (props.type == 'add') {
|
||||
getList()
|
||||
} else {
|
||||
// 调用id查询接口和编辑接口
|
||||
gettbPlussShopStaffDetail(props.id)
|
||||
uni.setNavigationBarTitle({
|
||||
title: '编辑员工'
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
function gettbPlussShopStaffDetail(id) {
|
||||
tbPlussShopStaffDetail(id).then(res => {
|
||||
console.log(res,'编辑员工后的提示')
|
||||
datas.formData = res
|
||||
if (datas.rolesList) {
|
||||
let rolefilter = datas.rolesList.filter(ele => ele.id == res.roleId)
|
||||
datas.rolesdata = rolefilter[0].name
|
||||
|
||||
console.log(res, '编辑员工后的提示')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -203,6 +196,15 @@
|
|||
res.content.forEach(ele => {
|
||||
columns[0].push(ele.name)
|
||||
})
|
||||
if (props.type == 'add') {
|
||||
getList()
|
||||
} else {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '编辑员工'
|
||||
})
|
||||
// 调用id查询接口和编辑接口
|
||||
gettbPlussShopStaffDetail(props.id)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue