feat(custom): 增加核销人员权限

This commit is contained in:
2024-03-07 18:58:15 +08:00
parent 893649afdd
commit d619dcb268

View File

@@ -28,7 +28,6 @@ const columns = ref([
slot: 'action',
align: 'center',
render: (row) => {
console.log(row)
return [
h(
NButton,
@@ -112,6 +111,7 @@ const addUser = (type, row = {}) => {
id: row.uid,
url: row.avatarUrl,
name: row.nickName,
pres: JSON.parse(row.permission),
}
}
showModal.value = true
@@ -124,6 +124,12 @@ const model = ref({
url: '',
id: null,
name: '',
pres: {
dd: false,
tj: false,
hx: false,
tx: false,
},
})
const search = async () => {
@@ -135,6 +141,12 @@ const search = async () => {
id: res.data.data.uid,
url: res.data.data.avatarUrl,
name: res.data.data.nickName,
pres: {
dd: false,
tj: false,
hx: false,
tx: false,
},
}
}
@@ -142,6 +154,7 @@ const submit = async () => {
if (!model.value.id) return $message.error('请绑定核销人员')
const res = await api.bindUser({
uid: model.value.id,
permission: JSON.stringify(model.value.pres),
})
$message.success(res.msg)
clear()
@@ -153,6 +166,12 @@ const clear = () => {
url: '',
id: null,
name: '',
pres: {
dd: false,
tj: false,
hx: false,
tx: false,
},
}
showModal.value = false
get_list()
@@ -206,9 +225,20 @@ const delVerifyUser = async (row) => {
<img class="h-100 w-100 border rounded-5" :src="model.url || ''" />
<div>{{ model.name }}</div>
</div>
<div v-else class="checkBox">+</div>
</n-form-item-gi>
<n-form-item-gi label="开启点单" :span="12">
<n-switch v-model:value="model.pres.dd" />
</n-form-item-gi>
<n-form-item-gi label="开启核销" :span="12">
<n-switch v-model:value="model.pres.hx" />
</n-form-item-gi>
<n-form-item-gi label="开启统计" :span="12">
<n-switch v-model:value="model.pres.tj" />
</n-form-item-gi>
<n-form-item-gi label="开启提现" :span="12">
<n-switch v-model:value="model.pres.tx" />
</n-form-item-gi>
<n-form-item-gi>
<div m-auto>
<n-button type="primary" @click="submit">提交</n-button>