!309 完善回款管理和回款计划功能

Merge pull request !309 from souvc/master
This commit is contained in:
芋道源码 2023-11-05 12:20:46 +00:00 committed by Gitee
commit f0c45103e1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 115 additions and 94 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

@ -10,14 +10,14 @@
<el-form-item label="回款编号" prop="no">
<el-input v-model="formData.no" placeholder="请输入回款编号" />
</el-form-item>
<!--<el-form-item label="回款计划ID" prop="planId">
<el-input v-model="formData.planId" placeholder="请输入回款计划ID" />
</el-form-item>-->
<el-form-item label="客户ID" prop="customerId">
<el-input v-model="formData.customerId" placeholder="请输入客户ID" />
<el-form-item label="回款计划" prop="planId">
<el-input v-model="formData.planId" placeholder="请输入回款计划" />
</el-form-item>
<el-form-item label="合同ID" prop="contractId">
<el-input v-model="formData.contractId" placeholder="请输入合同ID" />
<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="checkStatus">
<el-select v-model="formData.checkStatus" placeholder="请选择审批状态">
@ -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"
@ -103,7 +103,7 @@
class="!w-240px"
/>
</el-form-item>-->
<el-form-item label="负责人" prop="ownerUserId">
<!--<el-form-item label="负责人" prop="ownerUserId">
<el-input
v-model="queryParams.ownerUserId"
placeholder="请输入负责人"
@ -112,7 +112,7 @@
class="!w-240px"
/>
</el-form-item>
<!--<el-form-item label="批次" prop="batchId">
<el-form-item label="批次" prop="batchId">
<el-input
v-model="queryParams.batchId"
placeholder="请输入批次"
@ -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,10 +8,19 @@
:inline="true"
label-width="68px"
>
<el-form-item label="期数" prop="indexNo">
<el-form-item label="客户" prop="customerId">
<el-input
v-model="queryParams.indexNo"
placeholder="请输入期数"
v-model="queryParams.customerId"
placeholder="请输入客户"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="合同" prop="contractId">
<el-input
v-model="queryParams.contractId"
placeholder="请输入合同"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
@ -67,7 +76,7 @@
class="!w-240px"
/>
</el-form-item>-->
<el-form-item label="提醒日期" prop="remindTime">
<!--<el-form-item label="提醒日期" prop="remindTime">
<el-date-picker
v-model="queryParams.remindTime"
value-format="YYYY-MM-DD HH:mm:ss"
@ -77,26 +86,8 @@
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="客户" prop="customerId">
<el-input
v-model="queryParams.customerId"
placeholder="请输入客户"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="合同" prop="contractId">
<el-input
v-model="queryParams.contractId"
placeholder="请输入合同"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="负责人" prop="ownerUserId">
</el-form-item>-->
<!--<el-form-item label="负责人" prop="ownerUserId">
<el-input
v-model="queryParams.ownerUserId"
placeholder="请输入负责人"
@ -105,7 +96,7 @@
class="!w-240px"
/>
</el-form-item>
<!--<el-form-item label="备注" prop="remark">
<el-form-item label="备注" prop="remark">
<el-input
v-model="queryParams.remark"
placeholder="请输入备注"
@ -152,8 +143,26 @@
<!-- 列表 -->
<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="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="计划回款日期"
align="center"
prop="returnTime"
:formatter="dateFormatter2"
width="180px"
/>
<el-table-column label="提前几天提醒" align="center" prop="remindDays" />
<!--<el-table-column
label="提醒日期"
align="center"
prop="remindTime"
:formatter="dateFormatter"
width="180px"
/>-->
<!--<el-table-column label="回款ID" align="center" prop="receivableId" />-->
<el-table-column label="完成状态" align="center" prop="status">
<template #default="scope">
@ -166,26 +175,12 @@
</template>
</el-table-column>
<!--<el-table-column label="工作流编号" align="center" prop="processInstanceId" />-->
<el-table-column label="回款金额" align="center" prop="price" />
<el-table-column
label="回款日期"
align="center"
prop="returnTime"
:formatter="dateFormatter2"
width="180px"
/>
<el-table-column label="提前几天提醒" align="center" prop="remindDays" />
<el-table-column
label="提醒日期"
align="center"
prop="remindTime"
: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 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 +229,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 +239,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 +317,9 @@ const handleExport = async () => {
}
/** 初始化 **/
onMounted(() => {
getList()
onMounted(async () => {
await getList()
//
userList.value = await UserApi.getSimpleUserList()
})
</script>