This commit is contained in:
GaoHao 2024-11-25 17:26:42 +08:00
commit bcb058e136
2 changed files with 17 additions and 15 deletions

View File

@ -100,7 +100,7 @@ export function updateStatus(data) {
// 编辑
export function tbPlussShopStaffDetail(id) {
return request({
url: `/api/tbPlussShopStaff/${id}`,
url: `/api/tbPlussShopStaff/` + id,
method: "get"
});
}

View File

@ -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)
}
})
}