CRM:完善合同的待回款金额

(cherry picked from commit 154f84a89e)
This commit is contained in:
YunaiV 2024-02-25 20:50:30 +08:00 committed by shizhong
parent 4e6c8e46df
commit 2d78afcb66
7 changed files with 62 additions and 11 deletions

View File

@ -21,6 +21,7 @@ export interface ContractVO {
totalProductPrice: number
discountPercent: number
totalPrice: number
totalReceivablePrice: number
signContactId: number
signContactName?: string
signUserId: number

View File

@ -101,7 +101,24 @@
</el-table-column>
<el-table-column align="center" label="公司签约人" prop="signUserName" width="130" />
<el-table-column align="center" label="备注" prop="remark" width="200" />
<!-- TODO @puhui999后续可加 已收款金额未收款金额 -->
<el-table-column
align="center"
label="已回款金额(元)"
prop="totalReceivablePrice"
width="140"
:formatter="erpPriceTableColumnFormatter"
/>
<el-table-column
align="center"
label="未回款金额(元)"
prop="totalReceivablePrice"
width="140"
:formatter="erpPriceTableColumnFormatter"
>
<template #default="scope">
{{ erpPriceInputFormatter(scope.row.totalPrice - scope.row.totalReceivablePrice) }}
</template>
</el-table-column>
<el-table-column
:formatter="dateFormatter"
align="center"
@ -159,7 +176,7 @@ import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as ContractApi from '@/api/crm/contract'
import { DICT_TYPE } from '@/utils/dict'
import { AUDIT_STATUS } from './common'
import { erpPriceTableColumnFormatter } from '@/utils'
import { erpPriceInputFormatter, erpPriceTableColumnFormatter } from '@/utils'
const loading = ref(true) //
const total = ref(0) //

View File

@ -101,7 +101,24 @@
</el-table-column>
<el-table-column align="center" label="公司签约人" prop="signUserName" width="130" />
<el-table-column align="center" label="备注" prop="remark" width="200" />
<!-- TODO @puhui999后续可加 已收款金额未收款金额 -->
<el-table-column
align="center"
label="已回款金额(元)"
prop="totalReceivablePrice"
width="140"
:formatter="erpPriceTableColumnFormatter"
/>
<el-table-column
align="center"
label="未回款金额(元)"
prop="totalReceivablePrice"
width="140"
:formatter="erpPriceTableColumnFormatter"
>
<template #default="scope">
{{ erpPriceInputFormatter(scope.row.totalPrice - scope.row.totalReceivablePrice) }}
</template>
</el-table-column>
<el-table-column
:formatter="dateFormatter"
align="center"
@ -160,7 +177,7 @@ import * as ContractApi from '@/api/crm/contract'
import { fenToYuanFormat } from '@/utils/formatter'
import { DICT_TYPE } from '@/utils/dict'
import { CONTRACT_EXPIRY_TYPE } from './common'
import { erpPriceTableColumnFormatter } from '@/utils'
import { erpPriceInputFormatter, erpPriceTableColumnFormatter } from '@/utils'
const loading = ref(true) //
const total = ref(0) //

View File

@ -26,8 +26,9 @@
<el-descriptions-item label="下单时间">
{{ formatDate(contract.orderDate) }}
</el-descriptions-item>
<!-- TODO 芋艿回款金额 -->
<el-descriptions-item label="回款金额(元)"> 待实现 </el-descriptions-item>
<el-descriptions-item label="回款金额(元)">
{{ erpPriceInputFormatter(contract.totalReceivablePrice) }}
</el-descriptions-item>
<el-descriptions-item label="负责人">
{{ contract.ownerUserName }}
</el-descriptions-item>

View File

@ -150,7 +150,24 @@
</el-table-column>
<el-table-column align="center" label="公司签约人" prop="signUserName" width="130" />
<el-table-column align="center" label="备注" prop="remark" width="200" />
<!-- TODO @puhui999后续可加 已收款金额未收款金额 -->
<el-table-column
align="center"
label="已回款金额(元)"
prop="totalReceivablePrice"
width="140"
:formatter="erpPriceTableColumnFormatter"
/>
<el-table-column
align="center"
label="未回款金额(元)"
prop="totalReceivablePrice"
width="140"
:formatter="erpPriceTableColumnFormatter"
>
<template #default="scope">
{{ erpPriceInputFormatter(scope.row.totalPrice - scope.row.totalReceivablePrice) }}
</template>
</el-table-column>
<el-table-column
:formatter="dateFormatter"
align="center"
@ -246,7 +263,7 @@ import download from '@/utils/download'
import * as ContractApi from '@/api/crm/contract'
import ContractForm from './ContractForm.vue'
import { DICT_TYPE } from '@/utils/dict'
import { erpPriceTableColumnFormatter } from '@/utils'
import { erpPriceInputFormatter, erpPriceTableColumnFormatter } from '@/utils'
import * as CustomerApi from '@/api/crm/customer'
import { TabsPaneContext } from 'element-plus'

View File

@ -270,8 +270,7 @@ const handleContractChange = async (contractId: number) => {
//
const contract = contractList.value.find((item) => item.id === contractId)
if (contract) {
// TODO @
formData.value.price = contract.totalPrice
formData.value.price = contract.totalPrice - contract.totalReceivablePrice
}
}
}

View File

@ -308,7 +308,6 @@ const handleProcessDetail = (row: ReceivableApi.ReceivableVO) => {
push({ name: 'BpmProcessInstanceDetail', query: { id: row.processInstanceId } })
}
// TODO puhui999:
/** 导出按钮操作 */
const handleExport = async () => {
try {