salary
qsh 6 months ago
parent 4e104166af
commit 1e0ba3b619
  1. 5
      src/api/school/class/index.js
  2. 14
      src/api/system/dict/dict.data.ts
  3. 14
      src/api/system/dict/dict.type.ts
  4. 3
      src/styles/index.scss
  5. 2
      src/views/Basic/Role/RoleForm.vue
  6. 94
      src/views/Basic/User/UserAssignRoleForm.vue
  7. 11
      src/views/Basic/User/UserForm.vue
  8. 19
      src/views/MiniMall/Product/index.vue
  9. 46
      src/views/SchoolManagement/Class/Comp/DialogClass.vue
  10. 9
      src/views/SchoolManagement/Class/index.vue

@ -39,3 +39,8 @@ export const batchUpdateClassTypeStatus = async (data) => {
export const batchDeleteClassType = async (ids) => { export const batchDeleteClassType = async (ids) => {
return await request.delete({ url: '/admin-api/crm/sch-class-type/batch-delete?ids=' + ids }) return await request.delete({ url: '/admin-api/crm/sch-class-type/batch-delete?ids=' + ids })
} }
// 获取提成结算参数
export const getCommissionParams = async () => {
return await request.get({ url: '/admin-api/crm/sch-class-type/get-percentage-param' })
}

@ -15,35 +15,35 @@ export type DictDataVO = {
// 查询字典数据(精简)列表 // 查询字典数据(精简)列表
export const listSimpleDictData = () => { export const listSimpleDictData = () => {
return request.get({ url: '/admin-api/system/dict-data/list-all-simple' }) return request.get({ url: '/admin-api/system/dict-data/simple-list' })
} }
// 查询字典数据列表 // 查询字典数据列表
export const getDictDataPage = (params: PageParam) => { export const getDictDataPage = (params: PageParam) => {
return request.get({ url: '/admin-api/system/dict-data/page', params }) return request.get({ url: '/admin-api/crm/dict-data/page', params })
} }
// 查询字典数据详情 // 查询字典数据详情
export const getDictData = (id: number) => { export const getDictData = (id: number) => {
return request.get({ url: '/admin-api/system/dict-data/get?id=' + id }) return request.get({ url: '/admin-api/crm/dict-data/get?id=' + id })
} }
// 新增字典数据 // 新增字典数据
export const createDictData = (data: DictDataVO) => { export const createDictData = (data: DictDataVO) => {
return request.post({ url: '/admin-api/system/dict-data/create', data }) return request.post({ url: '/admin-api/crm/dict-data/create', data })
} }
// 修改字典数据 // 修改字典数据
export const updateDictData = (data: DictDataVO) => { export const updateDictData = (data: DictDataVO) => {
return request.put({ url: '/admin-api/system/dict-data/update', data }) return request.put({ url: '/admin-api/crm/dict-data/update', data })
} }
// 删除字典数据 // 删除字典数据
export const deleteDictData = (id: number) => { export const deleteDictData = (id: number) => {
return request.delete({ url: '/admin-api/system/dict-data/delete?id=' + id }) return request.delete({ url: '/admin-api/crm/dict-data/delete?id=' + id })
} }
// 导出字典类型数据 // 导出字典类型数据
export const exportDictData = (params) => { export const exportDictData = (params) => {
return request.get({ url: '/admin-api/system/dict-data/export', params }) return request.get({ url: '/admin-api/crm/dict-data/export', params })
} }

@ -11,34 +11,34 @@ export type DictTypeVO = {
// 查询字典(精简)列表 // 查询字典(精简)列表
export const getSimpleDictTypeList = () => { export const getSimpleDictTypeList = () => {
return request.get({ url: '/admin-api/system/dict-type/list-all-simple' }) return request.get({ url: '/admin-api/crm/dict-type/list-all-simple' })
} }
// 查询字典列表 // 查询字典列表
export const getDictTypePage = (params: PageParam) => { export const getDictTypePage = (params: PageParam) => {
return request.get({ url: '/admin-api/system/dict-type/page', params }) return request.get({ url: '/admin-api/crm/dict-type/page', params })
} }
// 查询字典详情 // 查询字典详情
export const getDictType = (id: number) => { export const getDictType = (id: number) => {
return request.get({ url: '/admin-api/system/dict-type/get?id=' + id }) return request.get({ url: '/admin-api/crm/dict-type/get?id=' + id })
} }
// 新增字典 // 新增字典
export const createDictType = (data: DictTypeVO) => { export const createDictType = (data: DictTypeVO) => {
return request.post({ url: '/admin-api/system/dict-type/create', data }) return request.post({ url: '/admin-api/crm/dict-type/create', data })
} }
// 修改字典 // 修改字典
export const updateDictType = (data: DictTypeVO) => { export const updateDictType = (data: DictTypeVO) => {
return request.put({ url: '/admin-api/system/dict-type/update', data }) return request.put({ url: '/admin-api/crm/dict-type/update', data })
} }
// 删除字典 // 删除字典
export const deleteDictType = (id: number) => { export const deleteDictType = (id: number) => {
return request.delete({ url: '/admin-api/system/dict-type/delete?id=' + id }) return request.delete({ url: '/admin-api/crm/dict-type/delete?id=' + id })
} }
// 导出字典类型 // 导出字典类型
export const exportDictType = (params) => { export const exportDictType = (params) => {
return request.get({ url: '/admin-api/system/dict-type/export', params }) return request.get({ url: '/admin-api/crm/dict-type/export', params })
} }

@ -64,7 +64,8 @@
.el-row .el-form-item { .el-row .el-form-item {
.el-input, .el-input,
.el-select, .el-select,
.el-input-number { .el-input-number,
.el-input__wrapper {
width: 100%; width: 100%;
} }
} }

@ -37,7 +37,7 @@ const formData = ref({
name: '' name: ''
}) })
const formRules = reactive({ const formRules = reactive({
name: [{ required: true, message: '岗位标题不能为空', trigger: 'blur' }] name: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }]
}) })
const formRef = ref() // Ref const formRef = ref() // Ref

@ -1,94 +0,0 @@
<template>
<Dialog v-model="dialogVisible" title="分配角色">
<el-form ref="formRef" v-loading="formLoading" :model="formData" label-width="80px">
<el-form-item label="用户名称">
<el-input v-model="formData.username" :disabled="true" />
</el-form-item>
<el-form-item label="用户昵称">
<el-input v-model="formData.nickname" :disabled="true" />
</el-form-item>
<el-form-item label="角色">
<el-select v-model="formData.roleIds" multiple placeholder="请选择角色">
<el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script lang="ts" name="SystemUserAssignRoleForm" setup>
import * as PermissionApi from '@/api/system/permission'
import * as UserApi from '@/api/system/user'
import * as RoleApi from '@/api/system/role'
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const formLoading = ref(false) // 12
const formData = ref({
id: undefined,
nickname: '',
username: '',
roleIds: []
})
const formRef = ref() // Ref
const roleList = ref<any>([]) //
/** 打开弹窗 */
const open = async (row: UserApi.UserVO) => {
dialogVisible.value = true
resetForm()
//
formData.value.id = row.id
formData.value.username = row.username
formData.value.nickname = row.nickname
//
formLoading.value = true
try {
formData.value.roleIds = await PermissionApi.getUserRoleList(row.id)
} finally {
formLoading.value = false
}
//
roleList.value = await RoleApi.getSimpleRoleList()
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!formRef.value) return
const valid = await formRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
await PermissionApi.assignUserRole({
userId: formData.value.id,
roleIds: formData.value.roleIds
})
message.success(t('common.updateSuccess'))
dialogVisible.value = false
//
emit('success', true)
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
nickname: '',
username: '',
roleIds: []
}
formRef.value?.resetFields()
}
</script>

@ -7,7 +7,7 @@
:rules="formRules" :rules="formRules"
label-width="80px" label-width="80px"
> >
<el-row> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="用户昵称" prop="nickname"> <el-form-item label="用户昵称" prop="nickname">
<el-input v-model="formData.nickname" placeholder="请输入用户昵称" /> <el-input v-model="formData.nickname" placeholder="请输入用户昵称" />
@ -22,7 +22,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="归属部门" prop="deptId"> <el-form-item label="归属部门" prop="deptId">
<el-tree-select <el-tree-select
@ -55,7 +55,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="手机号码" prop="mobile"> <el-form-item label="手机号码" prop="mobile">
<el-input v-model="formData.mobile" maxlength="11" placeholder="请输入手机号码" /> <el-input v-model="formData.mobile" maxlength="11" placeholder="请输入手机号码" />
@ -67,7 +67,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item v-if="formData.id === undefined" label="用户名称" prop="username"> <el-form-item v-if="formData.id === undefined" label="用户名称" prop="username">
<el-input v-model="formData.username" placeholder="请输入用户名称" /> <el-input v-model="formData.username" placeholder="请输入用户名称" />
@ -93,12 +93,11 @@
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
placeholder="选择日期时间" placeholder="选择日期时间"
style="width: 100%"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="formData.remark" placeholder="请输入内容" type="textarea" /> <el-input v-model="formData.remark" placeholder="请输入内容" type="textarea" />

@ -8,9 +8,9 @@
label-width="68px" label-width="68px"
> >
<!-- TODO @puhui999品牌应该是数据下拉哈 --> <!-- TODO @puhui999品牌应该是数据下拉哈 -->
<el-form-item label="品牌名称" prop="name"> <el-form-item label="品牌名称" prop="productBrandName">
<el-input <el-input
v-model="queryParams.name" v-model="queryParams.productBrandName"
class="!w-240px" class="!w-240px"
clearable clearable
placeholder="请输入品牌名称" placeholder="请输入品牌名称"
@ -29,18 +29,9 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="handleQuery"> <el-button @click="handleQuery"> 搜索 </el-button>
<!-- <Icon class="mr-5px" icon="ep:search" /> --> <el-button @click="resetQuery"> 重置 </el-button>
搜索 <el-button plain type="primary" @click="openForm"> 新增 </el-button>
</el-button>
<el-button @click="resetQuery">
<!-- <Icon class="mr-5px" icon="ep:refresh" /> -->
重置
</el-button>
<el-button plain type="primary" @click="openForm">
<!-- <Icon class="mr-5px" icon="ep:plus" /> -->
新增
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>

@ -157,12 +157,20 @@
:key="index" :key="index"
> >
<el-select v-model="item.ruleParam1" style="width: 100px"> <el-select v-model="item.ruleParam1" style="width: 100px">
<el-option label="单笔" :value="1" /> <el-option
<el-option label="月总" :value="2" /> v-for="it in opts.percentage_param1"
:key="Number(it.value)"
:label="it.label"
:value="Number(it.value)"
/>
</el-select> </el-select>
<el-select class="ml-5px" v-model="item.ruleParam2" style="width: 100px"> <el-select class="ml-5px" v-model="item.ruleParam2" style="width: 100px">
<el-option label="成交额" :value="1" /> <el-option
<el-option label="毛利" :value="2" /> v-for="it in opts.percentage_param2"
:key="Number(it.value)"
:label="it.label"
:value="Number(it.value)"
/>
</el-select> </el-select>
<span class="ml-5px"></span> <span class="ml-5px"></span>
<el-input <el-input
@ -175,8 +183,12 @@
/> />
<span class="ml-5px"></span> <span class="ml-5px"></span>
<el-select class="ml-5px" v-model="item.ruleParam4" style="width: 120px"> <el-select class="ml-5px" v-model="item.ruleParam4" style="width: 120px">
<el-option label="按比例" :value="1" /> <el-option
<el-option label="按固定金额" :value="2" /> v-for="it in opts.percentage_param4"
:key="Number(it.value)"
:label="it.label"
:value="Number(it.value)"
/>
</el-select> </el-select>
<div v-if="item.ruleParam4 == 2" class="inline-flex items-center"> <div v-if="item.ruleParam4 == 2" class="inline-flex items-center">
<el-input <el-input
@ -192,9 +204,12 @@
<div v-else class="inline-flex items-center"> <div v-else class="inline-flex items-center">
<span class="ml-5px"></span> <span class="ml-5px"></span>
<el-select class="ml-5px" v-model="item.ruleParam5" style="width: 100px"> <el-select class="ml-5px" v-model="item.ruleParam5" style="width: 100px">
<el-option label="按成交额" :value="1" /> <el-option
<el-option label="按底价" :value="2" /> v-for="it in opts.percentage_param5"
<el-option label="按毛利" :value="3" /> :key="Number(it.value)"
:label="it.label"
:value="Number(it.value)"
/>
</el-select> </el-select>
<span class="ml-5px">结算</span> <span class="ml-5px">结算</span>
<el-input <el-input
@ -271,12 +286,25 @@ const formRules = reactive({
const formRef = ref() // Ref const formRef = ref() // Ref
const currentTab = ref('base') const currentTab = ref('base')
const opts = ref({
percentage_param1: [],
percentage_param2: [],
percentage_param4: [],
percentage_param5: []
})
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (type, id) => { const open = async (type, id) => {
dialogVisible.value = true dialogVisible.value = true
dialogTitle.value = type == 'create' ? '新增班型' : '修改班型' dialogTitle.value = type == 'create' ? '新增班型' : '修改班型'
formType.value = type formType.value = type
resetForm() resetForm()
if (!opts.value.length) {
const arr = await ClassApi.getCommissionParams()
arr.map((item) => {
opts.value[item.dictType].push(item)
})
}
// //
if (id) { if (id) {
formLoading.value = true formLoading.value = true

@ -100,6 +100,11 @@
:width="col.width" :width="col.width"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column label="备注" width="260">
<template #default="{ row }">
<div v-dompurify-html="row.remark"></div>
</template>
</el-table-column>
<el-table-column label="状态" width="80"> <el-table-column label="状态" width="80">
<template #default="{ row }"> <template #default="{ row }">
<el-switch <el-switch
@ -231,8 +236,8 @@ const columns = [
{ props: 'typeName', label: '班型名称' }, { props: 'typeName', label: '班型名称' },
{ props: 'licenseType', label: '驾照类型', width: '100px' }, { props: 'licenseType', label: '驾照类型', width: '100px' },
{ props: 'guidingPrice', label: '最新报价', width: '100px' }, { props: 'guidingPrice', label: '最新报价', width: '100px' },
{ props: 'minPrice', label: '最新底价', width: '100px' }, { props: 'minPrice', label: '最新底价', width: '100px' }
{ props: 'remark', label: '备注', width: '100px' } // { props: 'remark', label: '', width: '100px' }
] ]
function handleQuery() { function handleQuery() {

Loading…
Cancel
Save