【新增】负责人
【修改】规范命名:期数:indexNo-》period
This commit is contained in:
parent
5d760d5450
commit
2b84de7e09
@ -2,7 +2,7 @@ import request from '@/config/axios'
|
|||||||
|
|
||||||
export interface ReceivablePlanVO {
|
export interface ReceivablePlanVO {
|
||||||
id: number
|
id: number
|
||||||
indexNo: number
|
period: number
|
||||||
receivableId: number
|
receivableId: number
|
||||||
status: number
|
status: number
|
||||||
checkStatus: string
|
checkStatus: string
|
||||||
|
@ -54,15 +54,22 @@
|
|||||||
<el-input-number v-model="formData.price" placeholder="请输入回款金额" />
|
<el-input-number v-model="formData.price" placeholder="请输入回款金额" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="负责人" prop="ownerUserId">
|
<el-form-item label="负责人" prop="ownerUserId">
|
||||||
<el-input v-model="formData.ownerUserId" placeholder="请输入负责人" />
|
<el-select v-model="formData.ownerUserId" clearable placeholder="请输入负责人">
|
||||||
|
<el-option
|
||||||
|
v-for="item in userList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="批次" prop="batchId">
|
<el-form-item label="批次" prop="batchId">
|
||||||
<el-input v-model="formData.batchId" placeholder="请输入批次" />
|
<el-input-number v-model="formData.batchId" placeholder="请输入批次" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--<el-form-item label="显示顺序" prop="sort">
|
<el-form-item label="显示排序" prop="sort">
|
||||||
<el-input v-model="formData.sort" placeholder="请输入显示顺序" />
|
<el-input-number v-model="formData.sort" :min="0" controls-position="right" />
|
||||||
</el-form-item>-->
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<!--<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="formData.status" placeholder="请选择状态">
|
<el-select v-model="formData.status" placeholder="请选择状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
||||||
@ -71,7 +78,7 @@
|
|||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>-->
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input type="textarea" :rows="3" v-model="formData.remark" placeholder="请输入备注" />
|
<el-input type="textarea" :rows="3" v-model="formData.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -85,10 +92,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
|
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
|
||||||
import * as ReceivableApi from '@/api/crm/receivable'
|
import * as ReceivableApi from '@/api/crm/receivable'
|
||||||
|
import * as UserApi from '@/api/system/user'
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
@ -112,9 +120,9 @@ const formData = ref({
|
|||||||
status: undefined,
|
status: undefined,
|
||||||
remark: undefined
|
remark: undefined
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
// const formRules = reactive({
|
||||||
status: [{ required: true, message: '状态不能为空', trigger: 'change' }]
|
// status: [{ required: true, message: '状态不能为空', trigger: 'change' }]
|
||||||
})
|
// })
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
@ -132,6 +140,8 @@ const open = async (type: string, id?: number) => {
|
|||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 获得用户列表
|
||||||
|
userList.value = await UserApi.getSimpleUserList()
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
|
@ -26,19 +26,19 @@
|
|||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
<el-form-item label="客户" prop="customerId">
|
<el-form-item label="客户名称" prop="customerId">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.customerId"
|
v-model="queryParams.customerId"
|
||||||
placeholder="请输入客户"
|
placeholder="请输入客户名称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="合同" prop="contractId">
|
<el-form-item label="合同名称" prop="contractId">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.contractId"
|
v-model="queryParams.contractId"
|
||||||
placeholder="请输入合同"
|
placeholder="请输入合同名称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
@ -227,8 +227,11 @@
|
|||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
width="180px"
|
width="180px"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" align="center" width="130px">
|
<el-table-column label="操作" align="center" width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<router-link :to="'/crm/receivable-plan?receivableId=' + scope.row.receivableId">
|
||||||
|
<el-button link type="primary">详情</el-button>
|
||||||
|
</router-link>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -7,8 +7,24 @@
|
|||||||
label-width="100px"
|
label-width="100px"
|
||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
>
|
>
|
||||||
<el-form-item label="期数" prop="indexNo">
|
<el-form-item label="客户名称" prop="customerId">
|
||||||
<el-input-number v-model="formData.indexNo" placeholder="请输入期数" />
|
<el-input v-model="formData.customerId" placeholder="请输入客户名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="合同名称" prop="contractId">
|
||||||
|
<el-input v-model="formData.contractId" placeholder="请输入合同名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="负责人" prop="ownerUserId">
|
||||||
|
<el-select v-model="formData.ownerUserId" clearable placeholder="请输入负责人">
|
||||||
|
<el-option
|
||||||
|
v-for="item in userList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="期数" prop="period">
|
||||||
|
<el-input-number v-model="formData.period" placeholder="请输入期数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--<el-form-item label="回款ID" prop="receivableId">
|
<!--<el-form-item label="回款ID" prop="receivableId">
|
||||||
<el-input v-model="formData.receivableId" placeholder="请输入回款ID" />
|
<el-input v-model="formData.receivableId" placeholder="请输入回款ID" />
|
||||||
@ -58,18 +74,9 @@
|
|||||||
placeholder="选择提醒日期"
|
placeholder="选择提醒日期"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="客户ID" prop="customerId">
|
<el-form-item label="显示排序" prop="sort">
|
||||||
<el-input v-model="formData.customerId" placeholder="请输入客户ID" />
|
<el-input-number v-model="formData.sort" :min="0" controls-position="right" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="合同ID" prop="contractId">
|
|
||||||
<el-input v-model="formData.contractId" placeholder="请输入合同ID" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="负责人" prop="ownerUserId">
|
|
||||||
<el-input v-model="formData.ownerUserId" placeholder="请输入负责人" />
|
|
||||||
</el-form-item>
|
|
||||||
<!--<el-form-item label="显示顺序" prop="sort">
|
|
||||||
<el-input v-model="formData.sort" placeholder="请输入显示顺序" />
|
|
||||||
</el-form-item>-->
|
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input type="textarea" :rows="3" v-model="formData.remark" placeholder="请输入备注" />
|
<el-input type="textarea" :rows="3" v-model="formData.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -81,19 +88,18 @@
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
|
|
||||||
import * as ReceivablePlanApi from '@/api/crm/receivablePlan'
|
import * as ReceivablePlanApi from '@/api/crm/receivablePlan'
|
||||||
|
import * as UserApi from '@/api/system/user'
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: undefined,
|
id: undefined,
|
||||||
indexNo: undefined,
|
period: undefined,
|
||||||
receivableId: undefined,
|
receivableId: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
checkStatus: undefined,
|
checkStatus: undefined,
|
||||||
@ -128,6 +134,9 @@ const open = async (type: string, id?: number) => {
|
|||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得用户列表
|
||||||
|
userList.value = await UserApi.getSimpleUserList()
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
@ -161,7 +170,7 @@ const submitForm = async () => {
|
|||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
indexNo: undefined,
|
period: undefined,
|
||||||
receivableId: undefined,
|
receivableId: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
checkStatus: undefined,
|
checkStatus: undefined,
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<el-form-item label="期数" prop="indexNo">
|
<el-form-item label="期数" prop="period">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.indexNo"
|
v-model="queryParams.period"
|
||||||
placeholder="请输入期数"
|
placeholder="请输入期数"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter="handleQuery"
|
@keyup.enter="handleQuery"
|
||||||
@ -152,23 +152,13 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<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="ID" align="center" prop="id" />-->
|
||||||
<el-table-column label="期数" align="center" prop="indexNo" />
|
<el-table-column label="客户名称" align="center" prop="customerId" width="150px" />
|
||||||
<!--<el-table-column label="回款ID" align="center" prop="receivableId" />-->
|
<el-table-column label="合同名称" align="center" prop="contractId" width="150px" />
|
||||||
<el-table-column label="完成状态" align="center" prop="status">
|
<el-table-column label="期数" align="center" prop="period" />
|
||||||
<template #default="scope">
|
<el-table-column label="计划回款" align="center" prop="price" />
|
||||||
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="审批状态" align="center" prop="checkStatus" width="130px">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :type="DICT_TYPE.CRM_RECEIVABLE_CHECK_STATUS" :value="scope.row.checkStatus" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!--<el-table-column label="工作流编号" align="center" prop="processInstanceId" />-->
|
|
||||||
<el-table-column label="回款金额" align="center" prop="price" />
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="回款日期"
|
label="计划回款日期"
|
||||||
align="center"
|
align="center"
|
||||||
prop="returnTime"
|
prop="returnTime"
|
||||||
:formatter="dateFormatter2"
|
:formatter="dateFormatter2"
|
||||||
@ -182,10 +172,24 @@
|
|||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
width="180px"
|
width="180px"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="客户ID" align="center" prop="customerId" />
|
<!--<el-table-column label="回款ID" align="center" prop="receivableId" />-->
|
||||||
<el-table-column label="合同ID" align="center" prop="contractId" />
|
<el-table-column label="完成状态" align="center" prop="status">
|
||||||
<el-table-column label="负责人" align="center" prop="ownerUserId" />
|
<template #default="scope">
|
||||||
<!--<el-table-column label="显示顺序" align="center" prop="sort" />-->
|
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审批状态" align="center" prop="checkStatus" width="130px">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.CRM_RECEIVABLE_CHECK_STATUS" :value="scope.row.checkStatus" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!--<el-table-column label="工作流编号" align="center" prop="processInstanceId" />-->
|
||||||
|
<el-table-column prop="ownerUserId" label="负责人" width="120">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ userList.find((user) => user.id === scope.row.ownerUserId)?.nickname }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="显示顺序" align="center" prop="sort" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
@ -234,6 +238,7 @@ import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
|
|||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import * as ReceivablePlanApi from '@/api/crm/receivablePlan'
|
import * as ReceivablePlanApi from '@/api/crm/receivablePlan'
|
||||||
import ReceivablePlanForm from './ReceivablePlanForm.vue'
|
import ReceivablePlanForm from './ReceivablePlanForm.vue'
|
||||||
|
import * as UserApi from '@/api/system/user'
|
||||||
|
|
||||||
defineOptions({ name: 'ReceivablePlan' })
|
defineOptions({ name: 'ReceivablePlan' })
|
||||||
|
|
||||||
@ -243,10 +248,11 @@ const { t } = useI18n() // 国际化
|
|||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
const list = ref([]) // 列表的数据
|
const list = ref([]) // 列表的数据
|
||||||
|
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
indexNo: null,
|
period: null,
|
||||||
status: null,
|
status: null,
|
||||||
checkStatus: null,
|
checkStatus: null,
|
||||||
returnTime: [],
|
returnTime: [],
|
||||||
@ -320,7 +326,9 @@ const handleExport = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getList()
|
await getList()
|
||||||
|
// 获取用户列表
|
||||||
|
userList.value = await UserApi.getSimpleUserList()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user