salary
parent
2468a0c8a5
commit
1ec084debe
@ -0,0 +1,68 @@ |
||||
|
||||
**「工具栏key」** |
||||
[ |
||||
"headerSelect",// 标题 |
||||
"blockquote", // 引用 |
||||
"bold", // 加粗 |
||||
"underline", // 下划线 |
||||
"italic", // 斜体 |
||||
// 删除线、清除格式等 |
||||
"group-more-style", |
||||
{ |
||||
key: "group-more-style", |
||||
title: "更多", |
||||
iconSvg: |
||||
'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6…0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>', |
||||
menuKeys: Array(5) |
||||
}, |
||||
"color", // 文字颜色 |
||||
"bgColor", // 背景色 |
||||
"fontSize", // 字号 |
||||
"fontFamily", // 字体 |
||||
"lineHeight", // 行高 |
||||
"bulletedList", // 无序列表 |
||||
"numberedList", // 有序列表 |
||||
"todo", // 代办 |
||||
// 对齐 |
||||
"group-justify", |
||||
{ |
||||
key: "group-justify", |
||||
title: "对齐", |
||||
iconSvg: |
||||
'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v1…72.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>', |
||||
menuKeys: Array(4) |
||||
}, |
||||
// 缩进 |
||||
"group-indent", |
||||
{ |
||||
key: "group-indent", |
||||
title: "缩进", |
||||
iconSvg: |
||||
'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v1…32h1024v128H0z m0-128V320l256 192z"></path></svg>', |
||||
menuKeys: Array(2) |
||||
}, |
||||
"emotion",// 表情 |
||||
"insertLink",// 插入链接 |
||||
"group-image",// 上传图片 |
||||
{ |
||||
key: "group-image", |
||||
title: "图片", |
||||
iconSvg: |
||||
'<svg viewBox="0 0 1024 1024"><path d="M959.877 128…l224.01-384 256 320h64l224.01-192z"></path></svg>', |
||||
menuKeys: Array(2) |
||||
}, |
||||
"group-video",// 上传视频 |
||||
{ |
||||
key: "group-video", |
||||
title: "视频", |
||||
iconSvg: |
||||
'<svg viewBox="0 0 1024 1024"><path d="M981.184 160….904zM384 704V320l320 192-320 192z"></path></svg>', |
||||
menuKeys: Array(2) |
||||
}, |
||||
"insertTable",// 插入表格 |
||||
"codeBlock", // 代码块 |
||||
"divider", // 分割线 |
||||
"undo", // 撤销 |
||||
"redo", // 重做 |
||||
"fullScreen" // 全屏 |
||||
] |
@ -0,0 +1,45 @@ |
||||
<template> |
||||
<el-form :model="form" ref="formRef" label-width="auto"> |
||||
<el-form-item> |
||||
<template #label> |
||||
<Tooltip message="请联系客服开通或关闭,客服电话:15955599959" />使用外呼 |
||||
</template> |
||||
<el-radio-group v-model="form.callEnable" disabled> |
||||
<el-radio :label="1"> 使用 </el-radio> |
||||
<el-radio :label="0"> 不使用 </el-radio> |
||||
</el-radio-group> |
||||
</el-form-item> |
||||
<el-form-item label="跟进信息"> |
||||
<el-radio-group v-model="form.followType"> |
||||
<el-radio :label="1"> 展示所有 </el-radio> |
||||
<el-radio :label="2"> 仅展示本人 </el-radio> |
||||
</el-radio-group> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-button type="primary" @click="onSubmit">保存</el-button> |
||||
<el-button @click="getData">刷新</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
</template> |
||||
|
||||
<script setup name="BasicSettingClue"> |
||||
const message = useMessage() |
||||
|
||||
const form = ref({ |
||||
followType: 1, |
||||
callEnable: 1 |
||||
}) |
||||
|
||||
function getData() { |
||||
form.value = { |
||||
followType: 1, |
||||
callEnable: 1 |
||||
} |
||||
} |
||||
|
||||
function onSubmit() { |
||||
message.success('保存成功') |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -0,0 +1,69 @@ |
||||
<template> |
||||
<el-form :model="form" ref="formRef" label-width="auto"> |
||||
<el-form-item label="是否关联成交率"> |
||||
<el-radio-group v-model="form.withSuccess"> |
||||
<el-radio :label="1"> 是 </el-radio> |
||||
<el-radio :label="0"> 否 </el-radio> |
||||
</el-radio-group> |
||||
</el-form-item> |
||||
<el-form-item label="关联规则"> |
||||
<div> |
||||
<el-button @click="form.rules.push({})">新增规则</el-button> |
||||
<div |
||||
v-for="(item, index) in form.rules" |
||||
:key="index" |
||||
class="mt-10px flex justify-center items-center" |
||||
> |
||||
<span>成交率达</span> |
||||
<el-input |
||||
class="ml-10px" |
||||
v-model="item.successRate" |
||||
placeholder="成交率" |
||||
style="width: 100px" |
||||
type="number" |
||||
:min="0" |
||||
> |
||||
<template #suffix>%</template> |
||||
</el-input> |
||||
<span>,可结算</span> |
||||
<el-input |
||||
class="ml-10px" |
||||
v-model="item.comissionRate" |
||||
placeholder="提成率" |
||||
style="width: 100px" |
||||
type="number" |
||||
:min="0" |
||||
> |
||||
<template #suffix>%</template> |
||||
</el-input> |
||||
<span>提成</span> |
||||
</div> |
||||
</div> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-button type="primary" @click="onSubmit">保存</el-button> |
||||
<el-button @click="getData">刷新</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
</template> |
||||
|
||||
<script setup name="BasicSettingClue"> |
||||
const message = useMessage() |
||||
|
||||
const form = ref({ |
||||
withSuccess: 1, |
||||
rules: [] |
||||
}) |
||||
|
||||
function getData() { |
||||
form.value = { |
||||
withSuccess: 1 |
||||
} |
||||
} |
||||
|
||||
function onSubmit() { |
||||
message.success('保存成功') |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -0,0 +1,21 @@ |
||||
<template> |
||||
<div> |
||||
<el-tabs v-model="tabIndex" type="border-card"> |
||||
<el-tab-pane label="线索管理" :name="0"> |
||||
<BSClue v-if="tabIndex == 0" /> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="销售提成" :name="10"> |
||||
<BSSalerComission v-if="tabIndex == 10" /> |
||||
</el-tab-pane> |
||||
</el-tabs> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup name="GeneralSetting"> |
||||
import BSClue from './Comp/BSClue.vue' |
||||
import BSSalerComission from './Comp/BSSalerComission.vue' |
||||
|
||||
const tabIndex = ref(0) |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -0,0 +1,105 @@ |
||||
<template> |
||||
<div> |
||||
<el-form ref="queryForm" :model="searchForm" label-width="0" inline> |
||||
<el-form-item> |
||||
<el-input |
||||
v-model="searchForm.name" |
||||
placeholder="请输入名称" |
||||
clearable |
||||
@keyup.enter="handleQuery" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-button @click="handleQuery">搜索</el-button> |
||||
<el-button @click="resetQuery">重置</el-button> |
||||
<el-button type="primary" @click="openForm('create', null)">新增</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
<el-table |
||||
v-loading="loading" |
||||
:data="tableList" |
||||
row-key="sourceId" |
||||
:tree-props="{ children: 'children' }" |
||||
> |
||||
<el-table-column prop="sourceName" label="来源名称" /> |
||||
<el-table-column prop="orderNum" label="排序" width="100px" /> |
||||
<el-table-column prop="remark" label="备注" /> |
||||
<el-table-column label="创建时间" prop="createTime" width="180px" /> |
||||
<el-table-column label="创建人" prop="createUser" width="150px" /> |
||||
<el-table-column label="操作"> |
||||
<template #default="scope"> |
||||
<el-button type="primary" text @click="openForm('update', scope.row)">修改</el-button> |
||||
<el-button type="primary" text @click="openForm('createChildren', scope.row)" |
||||
>新增</el-button |
||||
> |
||||
<el-button type="danger" text @click="handleDelete(scope.row)">删除</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<Pagination |
||||
v-model:limit="searchForm.pageSize" |
||||
v-model:page="searchForm.pageNum" |
||||
:total="total" |
||||
@pagination="handleQuery" |
||||
/> |
||||
|
||||
<DialogSource ref="sourceDialog" @success="handleQuery" /> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup name="ClueSource"> |
||||
import DialogSource from './DialogSource.vue' |
||||
|
||||
const searchForm = ref({ |
||||
pageNum: 1, |
||||
pageSize: 20 |
||||
}) |
||||
|
||||
const total = ref(0) |
||||
const sourceDialog = ref() |
||||
const tableList = ref([]) |
||||
const loading = ref(false) |
||||
|
||||
function handleQuery() { |
||||
searchForm.value.pageNum = 1 |
||||
getList() |
||||
} |
||||
function resetQuery() { |
||||
searchForm.value = { |
||||
question: '', |
||||
pageSize: 20, |
||||
pageNum: 1 |
||||
} |
||||
getList() |
||||
} |
||||
|
||||
function getList() { |
||||
tableList.value = [ |
||||
{ |
||||
sourceId: 1, |
||||
sourceName: '测试', |
||||
level: 1, |
||||
children: [{ sourceId: 1001, sourceName: '二级来源', level: 2, parentSource: '测试' }] |
||||
} |
||||
] |
||||
} |
||||
|
||||
function openForm(type, info) { |
||||
sourceDialog.value.open(type, info) |
||||
} |
||||
|
||||
async function handleDelete(row) { |
||||
try { |
||||
console.log(row) |
||||
// 删除的二次确认 |
||||
await message.delConfirm() |
||||
// 发起删除 |
||||
// await UserApi.deleteUser(row.id) |
||||
message.success(t('common.delSuccess')) |
||||
// 刷新列表 |
||||
await getList() |
||||
} catch {} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
@ -0,0 +1,111 @@ |
||||
<template> |
||||
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px"> |
||||
<el-form |
||||
ref="formRef" |
||||
v-loading="formLoading" |
||||
:model="formData" |
||||
:rules="formRules" |
||||
label-width="80px" |
||||
> |
||||
<el-form-item v-if="formData.level > 1" label="上级来源"> |
||||
<el-input v-model="formData.parentSource" disabled /> |
||||
</el-form-item> |
||||
<el-form-item label="来源名称" prop="sourceName"> |
||||
<el-input v-model="formData.sourceName" placeholder="请输入来源名称" /> |
||||
</el-form-item> |
||||
<el-form-item label="排序" prop="orderNum"> |
||||
<el-input v-model="formData.orderNum" placeholder="请输入排序" type="number" :min="0" /> |
||||
</el-form-item> |
||||
<el-form-item label="备注" prop="remark"> |
||||
<el-input |
||||
type="textarea" |
||||
v-model="formData.remark" |
||||
placeholder="请输入备注" |
||||
:autosize="{ minRows: 4, maxRows: 8 }" |
||||
/> |
||||
</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> |
||||
</el-dialog> |
||||
</template> |
||||
<script name="DialogSource" setup> |
||||
const { t } = useI18n() // 国际化 |
||||
const message = useMessage() // 消息弹窗 |
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示 |
||||
const dialogTitle = ref('') // 弹窗的标题 |
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改 |
||||
const formData = ref({ |
||||
sourceName: '', |
||||
orderNum: 1, |
||||
remark: '' |
||||
}) |
||||
const formRules = reactive({ |
||||
sourceName: [{ required: true, message: '名称不能为空', trigger: 'blur' }] |
||||
}) |
||||
const formRef = ref() // 表单 Ref |
||||
|
||||
/** 打开弹窗 */ |
||||
const open = async (type, info) => { |
||||
dialogVisible.value = true |
||||
dialogTitle.value = type == 'update' ? '修改来源' : '新增来源' |
||||
formType.value = type |
||||
resetForm() |
||||
// 修改时,设置数据 |
||||
if (info.sourceId) { |
||||
formLoading.value = true |
||||
try { |
||||
if (type == 'update') { |
||||
formData.value = { ...info } |
||||
} else { |
||||
formData.value.level = info.level + 1 |
||||
formData.value.parentSource = info.sourceName |
||||
} |
||||
// formData.value = await UserApi.getUser(id) |
||||
} finally { |
||||
formLoading.value = false |
||||
} |
||||
} |
||||
} |
||||
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 { |
||||
// const data = formData.value as unknown as UserApi.UserVO |
||||
if (formType.value === 'create') { |
||||
// await UserApi.createUser(data) |
||||
message.success(t('common.createSuccess')) |
||||
} else { |
||||
// await UserApi.updateUser(data) |
||||
message.success(t('common.updateSuccess')) |
||||
} |
||||
dialogVisible.value = false |
||||
// 发送操作成功的事件 |
||||
emit('success') |
||||
} finally { |
||||
formLoading.value = false |
||||
} |
||||
} |
||||
|
||||
/** 重置表单 */ |
||||
const resetForm = () => { |
||||
formData.value = { |
||||
sourceName: '', |
||||
orderNum: 1, |
||||
remark: '' |
||||
} |
||||
formRef.value?.resetFields() |
||||
} |
||||
</script> |
Loading…
Reference in new issue