CRM:完善回款的新增/修改

This commit is contained in:
YunaiV
2024-02-25 18:44:19 +08:00
parent 70bf234133
commit 5369328b37
5 changed files with 123 additions and 109 deletions

View File

@ -152,17 +152,6 @@
<el-text v-else>{{ erpPriceInputFormatter(scope.row.price) }}</el-text>
</template>
</el-table-column>
<el-table-column
align="center"
fixed="right"
label="完成状态"
prop="finishStatus"
width="130px"
>
<template #default="scope">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.finishStatus" />
</template>
</el-table-column>
<el-table-column
:formatter="dateFormatter"
align="center"
@ -178,9 +167,17 @@
width="180px"
/>
<el-table-column align="center" label="创建人" prop="creatorName" width="100px" />
<el-table-column align="center" fixed="right" label="操作" width="130px">
<!-- TODO @puhui999新建回款 -->
<el-table-column align="center" fixed="right" label="操作" width="180px">
<template #default="scope">
<el-button
v-hasPermi="['crm:receivable:create']"
link
type="success"
@click="openReceivableForm(scope.row)"
:disabled="scope.row.receivableId"
>
创建回款
</el-button>
<el-button
v-hasPermi="['crm:receivable-plan:update']"
link
@ -211,6 +208,7 @@
<!-- 表单弹窗添加/修改 -->
<ReceivablePlanForm ref="formRef" @success="getList" />
<ReceivableForm ref="receivableFormRef" @success="getList" />
</template>
<script lang="ts" setup>
@ -222,6 +220,7 @@ import ReceivablePlanForm from './ReceivablePlanForm.vue'
import * as CustomerApi from '@/api/crm/customer'
import { erpPriceInputFormatter, erpPriceTableColumnFormatter } from '@/utils'
import { TabsPaneContext } from 'element-plus'
import ReceivableForm from '@/views/crm/receivable/ReceivableForm.vue'
defineOptions({ name: 'ReceivablePlan' })
@ -279,6 +278,12 @@ const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 创建回款操作 */
const receivableFormRef = ref()
const openReceivableForm = (row: ReceivablePlanApi.ReceivablePlanVO) => {
receivableFormRef.value.open('create', undefined, row)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {