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) {
|
export function tbPlussShopStaffDetail(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/tbPlussShopStaff/${id}`,
|
url: `/api/tbPlussShopStaff/` + id,
|
||||||
method: "get"
|
method: "get"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import {
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
|
|
||||||
reactive,
|
reactive,
|
||||||
ref
|
ref
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
|
@ -116,7 +116,7 @@
|
||||||
formData: {
|
formData: {
|
||||||
permissions: [],
|
permissions: [],
|
||||||
maxDiscountAmount: 0,
|
maxDiscountAmount: 0,
|
||||||
discountType:0
|
discountType: 0
|
||||||
},
|
},
|
||||||
rolesList: [],
|
rolesList: [],
|
||||||
columns: [],
|
columns: [],
|
||||||
|
|
@ -129,24 +129,17 @@
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
// 获取角色信息
|
// 获取角色信息
|
||||||
getrolesEvent()
|
getrolesEvent()
|
||||||
if (props.type == 'add') {
|
|
||||||
getList()
|
|
||||||
} else {
|
|
||||||
// 调用id查询接口和编辑接口
|
|
||||||
gettbPlussShopStaffDetail(props.id)
|
|
||||||
uni.setNavigationBarTitle({
|
|
||||||
title: '编辑员工'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function gettbPlussShopStaffDetail(id) {
|
function gettbPlussShopStaffDetail(id) {
|
||||||
tbPlussShopStaffDetail(id).then(res => {
|
tbPlussShopStaffDetail(id).then(res => {
|
||||||
console.log(res,'编辑员工后的提示')
|
|
||||||
datas.formData = res
|
datas.formData = res
|
||||||
if (datas.rolesList) {
|
if (datas.rolesList) {
|
||||||
let rolefilter = datas.rolesList.filter(ele => ele.id == res.roleId)
|
let rolefilter = datas.rolesList.filter(ele => ele.id == res.roleId)
|
||||||
datas.rolesdata = rolefilter[0].name
|
datas.rolesdata = rolefilter[0].name
|
||||||
|
|
||||||
|
console.log(res, '编辑员工后的提示')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -192,8 +185,8 @@
|
||||||
let num = d.detail.value * 1
|
let num = d.detail.value * 1
|
||||||
if (num >= 1) {
|
if (num >= 1) {
|
||||||
datas.formData.maxDiscountAmount = 0.99
|
datas.formData.maxDiscountAmount = 0.99
|
||||||
}else{
|
} else {
|
||||||
datas.formData.maxDiscountAmount = d.detail.value.substring(0,4)
|
datas.formData.maxDiscountAmount = d.detail.value.substring(0, 4)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -203,6 +196,15 @@
|
||||||
res.content.forEach(ele => {
|
res.content.forEach(ele => {
|
||||||
columns[0].push(ele.name)
|
columns[0].push(ele.name)
|
||||||
})
|
})
|
||||||
|
if (props.type == 'add') {
|
||||||
|
getList()
|
||||||
|
} else {
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: '编辑员工'
|
||||||
|
})
|
||||||
|
// 调用id查询接口和编辑接口
|
||||||
|
gettbPlussShopStaffDetail(props.id)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue