zy 2025-05-14 14:36:22 +08:00
commit 7049674d1e
10 changed files with 1338 additions and 2 deletions

View File

@ -0,0 +1,42 @@
import request from '@/config/axios'
// 项目难度 VO
export interface ProjectDifficultyVO {
id: number // 主键ID
projectDifficulty: string // 项目难度
dockingMode: string // 说明
dockingHours: number // 对接工时(人天)
}
// 项目难度 API
export const ProjectDifficultyApi = {
// 查询项目难度分页
getProjectDifficultyPage: async (params: any) => {
return await request.get({ url: `/crm/project-difficulty/page`, params })
},
// 查询项目难度详情
getProjectDifficulty: async (id: number) => {
return await request.get({ url: `/crm/project-difficulty/get?id=` + id })
},
// 新增项目难度
createProjectDifficulty: async (data: ProjectDifficultyVO) => {
return await request.post({ url: `/crm/project-difficulty/create`, data })
},
// 修改项目难度
updateProjectDifficulty: async (data: ProjectDifficultyVO) => {
return await request.put({ url: `/crm/project-difficulty/update`, data })
},
// 删除项目难度
deleteProjectDifficulty: async (id: number) => {
return await request.delete({ url: `/crm/project-difficulty/delete?id=` + id })
},
// 导出项目难度 Excel
exportProjectDifficulty: async (params) => {
return await request.download({ url: `/crm/project-difficulty/export-excel`, params })
},
}

View File

@ -0,0 +1,46 @@
import request from '@/config/axios'
// 服务费收取方式 VO
export interface ServiceFeeCollectionMethodVO {
id: number // 主键
type: number // 类型
productDetail: string // 产品明细
customerPrice: number // 客单价
unit: number // 单位
procurementCost: number // 采购成本
profit: number // 客单价 - 采购成本
describe: string // 说明
}
// 服务费收取方式 API
export const ServiceFeeCollectionMethodApi = {
// 查询服务费收取方式分页
getServiceFeeCollectionMethodPage: async (params: any) => {
return await request.get({ url: `/crm/service-fee-collection-method/page`, params })
},
// 查询服务费收取方式详情
getServiceFeeCollectionMethod: async (id: number) => {
return await request.get({ url: `/crm/service-fee-collection-method/get?id=` + id })
},
// 新增服务费收取方式
createServiceFeeCollectionMethod: async (data: ServiceFeeCollectionMethodVO) => {
return await request.post({ url: `/crm/service-fee-collection-method/create`, data })
},
// 修改服务费收取方式
updateServiceFeeCollectionMethod: async (data: ServiceFeeCollectionMethodVO) => {
return await request.put({ url: `/crm/service-fee-collection-method/update`, data })
},
// 删除服务费收取方式
deleteServiceFeeCollectionMethod: async (id: number) => {
return await request.delete({ url: `/crm/service-fee-collection-method/delete?id=` + id })
},
// 导出服务费收取方式 Excel
exportServiceFeeCollectionMethod: async (params) => {
return await request.download({ url: `/crm/service-fee-collection-method/export-excel`, params })
},
}

View File

@ -0,0 +1,51 @@
import request from '@/config/axios'
// 技术对接清单 VO
export interface TechnicalDockingChecklistVO {
id: number // 主键ID
name: string // 平台名称
dockingMode: number // 对接模式
dockingHours: number // 技术对接人力(小时)
singleSignOn: number // 单点登录
architectureSynchronization: number // 架构同步
businessTripSynchronization: number // 出差单同步
orderSynchronization: number // 订单同步
billSynchronization: number // 账单同步
approvalMessageSynchronization: number // 审批/消息同步
dockingProductSynchronization: number // 对接产品类型
progress: number // 进度
notes: string // 备注
}
// 技术对接清单 API
export const TechnicalDockingChecklistApi = {
// 查询技术对接清单分页
getTechnicalDockingChecklistPage: async (params: any) => {
return await request.get({ url: `/crm/technical-docking-checklist/page`, params })
},
// 查询技术对接清单详情
getTechnicalDockingChecklist: async (id: number) => {
return await request.get({ url: `/crm/technical-docking-checklist/get?id=` + id })
},
// 新增技术对接清单
createTechnicalDockingChecklist: async (data: TechnicalDockingChecklistVO) => {
return await request.post({ url: `/crm/technical-docking-checklist/create`, data })
},
// 修改技术对接清单
updateTechnicalDockingChecklist: async (data: TechnicalDockingChecklistVO) => {
return await request.put({ url: `/crm/technical-docking-checklist/update`, data })
},
// 删除技术对接清单
deleteTechnicalDockingChecklist: async (id: number) => {
return await request.delete({ url: `/crm/technical-docking-checklist/delete?id=` + id })
},
// 导出技术对接清单 Excel
exportTechnicalDockingChecklist: async (params) => {
return await request.download({ url: `/crm/technical-docking-checklist/export-excel`, params })
},
}

View File

@ -232,12 +232,18 @@ export enum DICT_TYPE {
// 商机账期
PAYMENT_TERM = "payment_term", // 投诉级别
CREDIT_CALC_CYCLE = "credit_calc_cycle",//授信计算周期
DOCKING_MODE="docking_mode",
CRM_PROGRESS="crm_progess", //进度
SYNCHRONIZATION_STATUS="synchronization_status", //同步状态
MATCHING_PRODUCT_TYPES="matching_product_types", //对接产品类型
CRM_SERVICE_FEE_COLLECTION_METHOD_TYPE = 'crm_service_fee_collection_method_type', // 服务费收取方式类型
// ========== ERP - 企业资源计划模块 ==========
// ========== TTS - 项目模块 ==========
TTS_PROJECT_LEVEL="tts_project_level", //项目级别
TTS_PROJECT_TYPE="tts_project_type", //项目类型
TTS_TASK_LEVEL = 'tts_task_level',
TTS_TASK_LEVEL = 'tts_task_level', //对接模式
TTS_APPLY_STATUS = 'tts_apply_status',
@ -274,4 +280,5 @@ export enum DICT_TYPE {
IOT_PLUGIN_TYPE = 'iot_plugin_type', // IOT 插件类型
IOT_DATA_BRIDGE_DIRECTION_ENUM = 'iot_data_bridge_direction_enum', // 桥梁方向
IOT_DATA_BRIDGE_TYPE_ENUM = 'iot_data_bridge_type_enum' // 桥梁类型
}

View File

@ -0,0 +1,103 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="150px"
v-loading="formLoading"
>
<el-form-item label="项目难度" prop="projectDifficulty">
<el-input v-model="formData.projectDifficulty" placeholder="请输入项目难度" />
</el-form-item>
<el-form-item label="说明" prop="dockingMode">
<el-input v-model="formData.dockingMode" type="textarea" placeholder="请输入说明" />
</el-form-item>
<el-form-item label="对接工时(人天)" prop="dockingHours">
<el-input v-model="formData.dockingHours" placeholder="请输入对接工时(人天)" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { ProjectDifficultyApi, ProjectDifficultyVO } from '@/api/crm/projectdifficulty'
/** 项目难度 表单 */
defineOptions({ name: 'ProjectDifficultyForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
projectDifficulty: undefined,
dockingMode: undefined,
dockingHours: undefined,
})
const formRules = reactive({
projectDifficulty: [{ required: true, message: '项目难度不能为空', trigger: 'blur' }],
dockingMode: [{ required: true, message: '说明不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await ProjectDifficultyApi.getProjectDifficulty(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as ProjectDifficultyVO
if (formType.value === 'create') {
await ProjectDifficultyApi.createProjectDifficulty(data)
message.success(t('common.createSuccess'))
} else {
await ProjectDifficultyApi.updateProjectDifficulty(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
projectDifficulty: undefined,
dockingMode: undefined,
dockingHours: undefined,
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,192 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="80px"
>
<el-form-item label="项目难度" prop="projectDifficulty">
<el-input
v-model="queryParams.projectDifficulty"
placeholder="请输入项目难度"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-220px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['crm:project-difficulty:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['crm:project-difficulty:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="主键ID" align="center" prop="id" />
<el-table-column label="项目难度" align="center" prop="projectDifficulty" />
<el-table-column label="说明" align="center" prop="dockingMode" />
<el-table-column label="对接工时(人天)" align="center" prop="dockingHours" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center" min-width="120px">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['crm:project-difficulty:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['crm:project-difficulty:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ProjectDifficultyForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { ProjectDifficultyApi, ProjectDifficultyVO } from '@/api/crm/projectdifficulty'
import ProjectDifficultyForm from './ProjectDifficultyForm.vue'
/** 项目难度 列表 */
defineOptions({ name: 'ProjectDifficulty' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<ProjectDifficultyVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
projectDifficulty: undefined,
dockingMode: undefined,
dockingHours: undefined,
createTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await ProjectDifficultyApi.getProjectDifficultyPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ProjectDifficultyApi.deleteProjectDifficulty(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ProjectDifficultyApi.exportProjectDifficulty(queryParams)
download.excel(data, '项目难度.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

View File

@ -0,0 +1,143 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择类型">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.CRM_SERVICE_FEE_COLLECTION_METHOD_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="产品明细" prop="productDetail">
<el-input v-model="formData.productDetail" placeholder="请输入产品明细" />
</el-form-item>
<el-form-item label="客单价" prop="customerPrice">
<el-input v-model="formData.customerPrice" placeholder="请输入客单价" />
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-select v-model="formData.unit" placeholder="请选择单位">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.CRM_PRODUCT_UNIT)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="采购成本" prop="procurementCost">
<el-input v-model="formData.procurementCost" placeholder="请输入采购成本" />
</el-form-item>
<el-form-item label="客单价 - 采购成本" prop="profit">
<el-input v-model="formData.profit" placeholder="请输入客单价 - 采购成本" />
</el-form-item>
<el-form-item label="说明" prop="describe">
<el-input v-model="formData.describe" placeholder="请输入说明" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { ServiceFeeCollectionMethodApi, ServiceFeeCollectionMethodVO } from '@/api/crm/servicefeecollectionmethod'
/** 服务费收取方式 表单 */
defineOptions({ name: 'ServiceFeeCollectionMethodForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
type: undefined,
productDetail: undefined,
customerPrice: undefined,
unit: undefined,
procurementCost: undefined,
profit: undefined,
describe: undefined,
})
const formRules = reactive({
type: [{ required: true, message: '类型不能为空', trigger: 'change' }],
productDetail: [{ required: true, message: '产品明细不能为空', trigger: 'blur' }],
customerPrice: [{ required: true, message: '客单价不能为空', trigger: 'blur' }],
unit: [{ required: true, message: '单位不能为空', trigger: 'change' }],
procurementCost: [{ required: true, message: '采购成本不能为空', trigger: 'blur' }],
profit: [{ required: true, message: '客单价 - 采购成本不能为空', trigger: 'blur' }],
describe: [{ required: true, message: '说明不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await ServiceFeeCollectionMethodApi.getServiceFeeCollectionMethod(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as ServiceFeeCollectionMethodVO
if (formType.value === 'create') {
await ServiceFeeCollectionMethodApi.createServiceFeeCollectionMethod(data)
message.success(t('common.createSuccess'))
} else {
await ServiceFeeCollectionMethodApi.updateServiceFeeCollectionMethod(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
type: undefined,
productDetail: undefined,
customerPrice: undefined,
unit: undefined,
procurementCost: undefined,
profit: undefined,
describe: undefined,
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,274 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<el-form-item label="类型" prop="type">
<el-select
v-model="queryParams.type"
placeholder="请选择类型"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.CRM_SERVICE_FEE_COLLECTION_METHOD_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="产品明细" prop="productDetail">
<el-input
v-model="queryParams.productDetail"
placeholder="请输入产品明细"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="客单价" prop="customerPrice">
<el-input
v-model="queryParams.customerPrice"
placeholder="请输入客单价"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-select
v-model="queryParams.unit"
placeholder="请选择单位"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.CRM_PRODUCT_UNIT)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="采购成本" prop="procurementCost">
<el-input
v-model="queryParams.procurementCost"
placeholder="请输入采购成本"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="客单价 - 采购成本" prop="profit">
<el-input
v-model="queryParams.profit"
placeholder="请输入客单价 - 采购成本"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="说明" prop="describe">
<el-input
v-model="queryParams.describe"
placeholder="请输入说明"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-220px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['crm:service-fee-collection-method:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['crm:service-fee-collection-method:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="类型" align="center" prop="type">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_SERVICE_FEE_COLLECTION_METHOD_TYPE" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="产品明细" align="center" prop="productDetail" />
<el-table-column label="客单价" align="center" prop="customerPrice" />
<el-table-column label="单位" align="center" prop="unit">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_PRODUCT_UNIT" :value="scope.row.unit" />
</template>
</el-table-column>
<el-table-column label="采购成本" align="center" prop="procurementCost" />
<el-table-column label="客单价 - 采购成本" align="center" prop="profit" />
<el-table-column label="说明" align="center" prop="describe" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center" min-width="120px">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['crm:service-fee-collection-method:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['crm:service-fee-collection-method:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ServiceFeeCollectionMethodForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { ServiceFeeCollectionMethodApi, ServiceFeeCollectionMethodVO } from '@/api/crm/servicefeecollectionmethod'
import ServiceFeeCollectionMethodForm from './ServiceFeeCollectionMethodForm.vue'
/** 服务费收取方式 列表 */
defineOptions({ name: 'ServiceFeeCollectionMethod' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<ServiceFeeCollectionMethodVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
type: undefined,
productDetail: undefined,
customerPrice: undefined,
unit: undefined,
procurementCost: undefined,
profit: undefined,
describe: undefined,
createTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await ServiceFeeCollectionMethodApi.getServiceFeeCollectionMethodPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ServiceFeeCollectionMethodApi.deleteServiceFeeCollectionMethod(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ServiceFeeCollectionMethodApi.exportServiceFeeCollectionMethod(queryParams)
download.excel(data, '服务费收取方式.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

View File

@ -0,0 +1,227 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="180px"
v-loading="formLoading"
>
<el-form-item label="平台名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入平台名称" />
</el-form-item>
<el-form-item label="对接模式" prop="dockingMode">
<el-select v-model="formData.dockingMode" placeholder="请选择对接模式">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.DOCKING_MODE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="技术对接人力(人天)" prop="dockingHours">
<el-input v-model="formData.dockingHours" placeholder="请输入技术对接人力(人天)" />
</el-form-item>
<el-form-item label="单点登录" prop="singleSignOn">
<el-radio-group v-model="formData.singleSignOn">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.SYNCHRONIZATION_STATUS)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="架构同步" prop="architectureSynchronization">
<el-radio-group v-model="formData.architectureSynchronization">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.SYNCHRONIZATION_STATUS)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="出差单同步" prop="businessTripSynchronization">
<el-radio-group v-model="formData.businessTripSynchronization">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.SYNCHRONIZATION_STATUS)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="订单同步" prop="orderSynchronization">
<el-radio-group v-model="formData.orderSynchronization">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.SYNCHRONIZATION_STATUS)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="账单同步" prop="billSynchronization">
<el-radio-group v-model="formData.billSynchronization">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.SYNCHRONIZATION_STATUS)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审批/消息同步" prop="approvalMessageSynchronization">
<el-radio-group v-model="formData.approvalMessageSynchronization">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.SYNCHRONIZATION_STATUS)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="对接产品类型" prop="dockingProductSynchronization">
<el-select v-model="formData.dockingProductSynchronization" placeholder="请选择对接产品类型">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.MATCHING_PRODUCT_TYPES)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="进度" prop="progress">
<el-select v-model="formData.progress" placeholder="请选择进度">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.CRM_PROGRESS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="notes">
<el-input v-model="formData.notes" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { TechnicalDockingChecklistApi, TechnicalDockingChecklistVO } from '@/api/crm/technicaldockingchecklist'
/** 技术对接清单 表单 */
defineOptions({ name: 'TechnicalDockingChecklistForm' })
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
name: undefined,
dockingMode: undefined,
dockingHours: undefined,
singleSignOn: undefined,
architectureSynchronization: undefined,
businessTripSynchronization: undefined,
orderSynchronization: undefined,
billSynchronization: undefined,
approvalMessageSynchronization: undefined,
dockingProductSynchronization: undefined,
progress: undefined,
notes: undefined,
})
const formRules = reactive({
name: [{ required: true, message: '平台名称不能为空', trigger: 'blur' }],
dockingMode: [{ required: true, message: '对接模式不能为空', trigger: 'change' }],
dockingHours: [{ required: true, message: '技术对接人力(小时)不能为空', trigger: 'blur' }],
singleSignOn: [{ required: true, message: '单点登录不能为空', trigger: 'blur' }],
architectureSynchronization: [{ required: true, message: '架构同步不能为空', trigger: 'blur' }],
businessTripSynchronization: [{ required: true, message: '出差单同步不能为空', trigger: 'blur' }],
orderSynchronization: [{ required: true, message: '订单同步不能为空', trigger: 'blur' }],
billSynchronization: [{ required: true, message: '账单同步不能为空', trigger: 'blur' }],
approvalMessageSynchronization: [{ required: true, message: '审批/消息同步不能为空', trigger: 'blur' }],
dockingProductSynchronization: [{ required: true, message: '对接产品类型不能为空', trigger: 'change' }],
progress: [{ required: true, message: '进度不能为空', trigger: 'change' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await TechnicalDockingChecklistApi.getTechnicalDockingChecklist(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as TechnicalDockingChecklistVO
if (formType.value === 'create') {
await TechnicalDockingChecklistApi.createTechnicalDockingChecklist(data)
message.success(t('common.createSuccess'))
} else {
await TechnicalDockingChecklistApi.updateTechnicalDockingChecklist(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
name: undefined,
dockingMode: undefined,
dockingHours: undefined,
singleSignOn: undefined,
architectureSynchronization: undefined,
businessTripSynchronization: undefined,
orderSynchronization: undefined,
billSynchronization: undefined,
approvalMessageSynchronization: undefined,
dockingProductSynchronization: undefined,
progress: undefined,
notes: undefined,
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,251 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<el-form-item label="平台名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入平台名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="对接模式" prop="dockingMode">
<el-select
v-model="queryParams.dockingMode"
placeholder="请选择对接模式"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.DOCKING_MODE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-220px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['crm:technical-docking-checklist:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['crm:technical-docking-checklist:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="主键ID" align="center" prop="id" />
<el-table-column label="平台名称" align="center" prop="name" />
<el-table-column label="对接模式" align="center" prop="dockingMode">
<template #default="scope">
<dict-tag :type="DICT_TYPE.DOCKING_MODE" :value="scope.row.dockingMode" />
</template>
</el-table-column>
<el-table-column label="技术对接人力(人天)" align="center" prop="dockingHours" />
<el-table-column label="单点登录" align="center" prop="singleSignOn">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SYNCHRONIZATION_STATUS" :value="scope.row.singleSignOn" />
</template>
</el-table-column>
<el-table-column label="架构同步" align="center" prop="architectureSynchronization">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SYNCHRONIZATION_STATUS" :value="scope.row.architectureSynchronization" />
</template>
</el-table-column>
<el-table-column label="出差单同步" align="center" prop="businessTripSynchronization">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SYNCHRONIZATION_STATUS" :value="scope.row.businessTripSynchronization" />
</template>
</el-table-column>
<el-table-column label="订单同步" align="center" prop="orderSynchronization">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SYNCHRONIZATION_STATUS" :value="scope.row.orderSynchronization" />
</template>
</el-table-column>
<el-table-column label="账单同步" align="center" prop="billSynchronization">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SYNCHRONIZATION_STATUS" :value="scope.row.billSynchronization" />
</template>
</el-table-column>
<el-table-column label="审批/消息同步" align="center" prop="approvalMessageSynchronization">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SYNCHRONIZATION_STATUS" :value="scope.row.approvalMessageSynchronization" />
</template>
</el-table-column>
<el-table-column label="对接产品类型" align="center" prop="dockingProductSynchronization">
<template #default="scope">
<dict-tag :type="DICT_TYPE.MATCHING_PRODUCT_TYPES" :value="scope.row.dockingProductSynchronization" />
</template>
</el-table-column>
<el-table-column label="进度" align="center" prop="progress">
<template #default="scope">
<dict-tag :type="DICT_TYPE.CRM_PROGRESS" :value="scope.row.progress" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="notes" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center" min-width="120px">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['crm:technical-docking-checklist:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['crm:technical-docking-checklist:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<TechnicalDockingChecklistForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { TechnicalDockingChecklistApi, TechnicalDockingChecklistVO } from '@/api/crm/technicaldockingchecklist'
import TechnicalDockingChecklistForm from './TechnicalDockingChecklistForm.vue'
/** 技术对接清单 列表 */
defineOptions({ name: 'TechnicalDockingChecklist' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<TechnicalDockingChecklistVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
name: undefined,
dockingMode: undefined,
createTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await TechnicalDockingChecklistApi.getTechnicalDockingChecklistPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await TechnicalDockingChecklistApi.deleteTechnicalDockingChecklist(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await TechnicalDockingChecklistApi.exportTechnicalDockingChecklist(queryParams)
download.excel(data, '技术对接清单.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>