【新增】负责人

【修改】规范命名:期数:indexNo-》period
This commit is contained in:
liuhongfeng 2023-10-30 21:32:50 +08:00
parent 5d760d5450
commit 2b84de7e09
5 changed files with 90 additions and 60 deletions

View File

@ -2,7 +2,7 @@ import request from '@/config/axios'
export interface ReceivablePlanVO {
id: number
indexNo: number
period: number
receivableId: number
status: number
checkStatus: string

View File

@ -54,15 +54,22 @@
<el-input-number v-model="formData.price" placeholder="请输入回款金额" />
</el-form-item>
<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 label="批次" prop="batchId">
<el-input v-model="formData.batchId" placeholder="请输入批次" />
<el-input-number v-model="formData.batchId" 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="status">
<el-form-item label="显示序" prop="sort">
<el-input-number v-model="formData.sort" :min="0" controls-position="right" />
</el-form-item>
<!--<el-form-item label="状态" prop="status">
<el-select v-model="formData.status" placeholder="请选择状态">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
@ -71,7 +78,7 @@
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="3" v-model="formData.remark" placeholder="请输入备注" />
</el-form-item>
@ -85,10 +92,11 @@
<script setup lang="ts">
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
import * as ReceivableApi from '@/api/crm/receivable'
import * as UserApi from '@/api/system/user'
const { t } = useI18n() //
const message = useMessage() //
const userList = ref<UserApi.UserVO[]>([]) //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
@ -112,9 +120,9 @@ const formData = ref({
status: undefined,
remark: undefined
})
const formRules = reactive({
status: [{ required: true, message: '状态不能为空', trigger: 'change' }]
})
// const formRules = reactive({
// status: [{ required: true, message: '', trigger: 'change' }]
// })
const formRef = ref() // Ref
/** 打开弹窗 */
@ -132,6 +140,8 @@ const open = async (type: string, id?: number) => {
formLoading.value = false
}
}
//
userList.value = await UserApi.getSimpleUserList()
}
defineExpose({ open }) // open

View File

@ -26,19 +26,19 @@
class="!w-240px"
/>
</el-form-item>-->
<el-form-item label="客户" prop="customerId">
<el-form-item label="客户名称" prop="customerId">
<el-input
v-model="queryParams.customerId"
placeholder="请输入客户"
placeholder="请输入客户名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="合同" prop="contractId">
<el-form-item label="合同名称" prop="contractId">
<el-input
v-model="queryParams.contractId"
placeholder="请输入合同"
placeholder="请输入合同名称"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
@ -227,8 +227,11 @@
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center" width="130px">
<el-table-column label="操作" align="center" width="180px">
<template #default="scope">
<router-link :to="'/crm/receivable-plan?receivableId=' + scope.row.receivableId">
<el-button link type="primary">详情</el-button>
</router-link>
<el-button
link
type="primary"

View File

@ -7,8 +7,24 @@
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="期数" prop="indexNo">
<el-input-number v-model="formData.indexNo" placeholder="请输入期数" />
<el-form-item label="客户名称" prop="customerId">
<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 label="回款ID" prop="receivableId">
<el-input v-model="formData.receivableId" placeholder="请输入回款ID" />
@ -58,18 +74,9 @@
placeholder="选择提醒日期"
/>
</el-form-item>
<el-form-item label="客户ID" prop="customerId">
<el-input v-model="formData.customerId" placeholder="请输入客户ID" />
<el-form-item label="显示排序" prop="sort">
<el-input-number v-model="formData.sort" :min="0" controls-position="right" />
</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-input type="textarea" :rows="3" v-model="formData.remark" placeholder="请输入备注" />
</el-form-item>
@ -81,19 +88,18 @@
</Dialog>
</template>
<script setup lang="ts">
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
import * as ReceivablePlanApi from '@/api/crm/receivablePlan'
import * as UserApi from '@/api/system/user'
const { t } = useI18n() //
const message = useMessage() //
const userList = ref<UserApi.UserVO[]>([]) //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
indexNo: undefined,
period: undefined,
receivableId: undefined,
status: undefined,
checkStatus: undefined,
@ -128,6 +134,9 @@ const open = async (type: string, id?: number) => {
formLoading.value = false
}
}
//
userList.value = await UserApi.getSimpleUserList()
}
defineExpose({ open }) // open
@ -161,7 +170,7 @@ const submitForm = async () => {
const resetForm = () => {
formData.value = {
id: undefined,
indexNo: undefined,
period: undefined,
receivableId: undefined,
status: undefined,
checkStatus: undefined,

View File

@ -8,9 +8,9 @@
:inline="true"
label-width="68px"
>
<el-form-item label="期数" prop="indexNo">
<el-form-item label="期数" prop="period">
<el-input
v-model="queryParams.indexNo"
v-model="queryParams.period"
placeholder="请输入期数"
clearable
@keyup.enter="handleQuery"
@ -152,23 +152,13 @@
<!-- 列表 -->
<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="indexNo" />
<!--<el-table-column label="回款ID" align="center" prop="receivableId" />-->
<el-table-column label="完成状态" align="center" prop="status">
<template #default="scope">
<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 label="ID" align="center" prop="id" />-->
<el-table-column label="客户名称" align="center" prop="customerId" width="150px" />
<el-table-column label="合同名称" align="center" prop="contractId" width="150px" />
<el-table-column label="期数" align="center" prop="period" />
<el-table-column label="计划回款" align="center" prop="price" />
<el-table-column
label="回款日期"
label="计划回款日期"
align="center"
prop="returnTime"
:formatter="dateFormatter2"
@ -182,10 +172,24 @@
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="客户ID" align="center" prop="customerId" />
<el-table-column label="合同ID" align="center" prop="contractId" />
<el-table-column label="负责人" align="center" prop="ownerUserId" />
<!--<el-table-column label="显示顺序" align="center" prop="sort" />-->
<!--<el-table-column label="回款ID" align="center" prop="receivableId" />-->
<el-table-column label="完成状态" align="center" prop="status">
<template #default="scope">
<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="创建时间"
@ -234,6 +238,7 @@ import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import download from '@/utils/download'
import * as ReceivablePlanApi from '@/api/crm/receivablePlan'
import ReceivablePlanForm from './ReceivablePlanForm.vue'
import * as UserApi from '@/api/system/user'
defineOptions({ name: 'ReceivablePlan' })
@ -243,10 +248,11 @@ const { t } = useI18n() // 国际化
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
const userList = ref<UserApi.UserVO[]>([]) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
indexNo: null,
period: null,
status: null,
checkStatus: null,
returnTime: [],
@ -320,7 +326,9 @@ const handleExport = async () => {
}
/** 初始化 **/
onMounted(() => {
getList()
onMounted(async () => {
await getList()
//
userList.value = await UserApi.getSimpleUserList()
})
</script>