Commit 7b081961 by zhangxingmin

Merge remote-tracking branch 'origin/dev' into prod

parents a4c372da 7d27c357
......@@ -366,13 +366,7 @@ const loading = ref(false)
const selectedRow = ref(null)
const searchFormRef = ref(null)
const searchParams = ref({})
// 表格操作菜单
const dropdownItems = [
// { label: '设置本期出账金额', value: 'setPayRoll' }
{ label: '分期出账', value: 'billInstallments' },
{ label: '设置出账年月(实)', value: 'settingBillYearMonth' },
{ label: '修改结算汇率', value: 'editExchangeRate' }
]
// 动态生成操作菜单项(根据行数据)
const getOperateItems = row => {
const items = []
......@@ -709,7 +703,6 @@ const confirmRateExchange = async () => {
let formData = await rateExchangeFormRef.value.validate()
formData.fortuneBizId = selectedRow.value.fortuneBizId
try {
//等待后端接口
const res = await editExchangeRateApi(formData)
ElMessage.success('结算汇率修改成功')
rateExchangeFlag.value = false
......@@ -1427,13 +1420,14 @@ const handleSelect = (e, row) => {
settingBillYearMonthFlag.value = true
} else if (e == 'editExchangeRate') {
rateExchangeForm.value = {
...row,
originalAmount: row.originalAmount ? Number(row.originalAmount).toFixed(2) : '',
ruleCurrency: row.ruleCurrency,
originalCurrency: row.originalCurrency,
payoutCurrency: row.payoutCurrency,
hkdToPayoutRate: '',
// hkdToPayoutRate: '',
exchangeRate: row.exchangeRate ? row.exchangeRate : '',
originalToHkdRate: '',
// originalToHkdRate: '',
payoutAmount: row.payoutAmount ? Number(row.payoutAmount).toFixed(2) : '',
ruleAmount: row.ruleAmount ? Number(row.ruleAmount).toFixed(2) : '',
hkdAmount: row.hkdAmount ? Number(row.hkdAmount).toFixed(2) : ''
......
......@@ -368,6 +368,11 @@ const searchFormRef = ref(null)
const searchParams = ref({})
const searchConfig = ref([
{
type: 'input',
prop: 'businessNo',
label: '业务编号'
},
{
type: 'select',
prop: 'brokerBizIdList',
label: '转介人',
......
......@@ -450,17 +450,41 @@ const payableReportListTableColumns = ref([
{ prop: 'currentPaymentRuleAmount', label: '本次发放保单记账金额', sortable: true, width: '160' },
{ prop: 'currentPayoutAmount', label: '本次发放金额', sortable: true, width: '120' },
{ prop: 'currentPaymentHkdAmount', label: '本次发放折合港币金额', sortable: true, width: '160' },
{ prop: 'currentPaymentRatio', label: '本次发放比例', sortable: true, width: '120' },
{
prop: 'currentPaymentRatio',
label: '本次发放比例',
sortable: true,
width: '120',
formatter: row => (row.currentPaymentRatio ? row.currentPaymentRatio + '%' : '-')
},
{ prop: 'paidRuleAmount', label: '累积已发放保单记账金额', sortable: true, width: '180' },
{ prop: 'paidAmount', label: '累积已发放港币金额', sortable: true, width: '160' },
{ prop: 'paidRatio', label: '累积已发放比例%', sortable: true, width: '140' },
{ prop: 'unpaidRatio', label: '剩余发放比例%', sortable: true, width: '120' },
{
prop: 'paidRatio',
label: '累积已发放比例',
sortable: true,
width: '140',
formatter: row => (row.paidRatio ? row.paidRatio + '%' : '-')
},
{
prop: 'unpaidRatio',
label: '剩余发放比例',
sortable: true,
width: '120',
formatter: row => (row.unpaidRatio ? row.unpaidRatio + '%' : '-')
},
{ prop: 'unpaidRuleAmount', label: '剩余保单记账金额', sortable: true, width: '160' },
{ prop: 'unpaidRuleAmounthHkd', label: '剩余发放折合港币金额', sortable: true, width: '180' },
{ prop: 'premium', label: '期交保费', sortable: true, width: '120' },
{ prop: 'fortuneTotalPeriod', label: '供款期数', sortable: true, width: '100' },
{ prop: 'productName', label: '产品计划', sortable: true, width: '150' },
{ prop: 'brokerRatio', label: '持有比例%', sortable: true, width: '100' },
{
prop: 'brokerRatio',
label: '持有比例',
sortable: true,
width: '100',
formatter: row => (row.brokerRatio ? row.brokerRatio + '%' : '-')
},
{ prop: 'remark', label: '备注', sortable: false, width: '200' },
{ prop: 'creatorName', label: '创建人', sortable: true, width: '100' },
{ prop: 'createTime', label: '创建时间', sortable: true, width: '160' },
......@@ -1536,7 +1560,7 @@ const pageTotal = ref(0)
const loading = ref(false)
// 表格操作菜单
const dropdownItems = [
{ label: '出账记录', value: 'payRecord' },
// { label: '出账记录', value: 'payRecord' },
{ label: '设置状态', value: 'setStatus' },
{ label: '更新数据', value: 'updateData' }
]
......
......@@ -321,12 +321,7 @@ import { getToken } from '@/utils/auth'
import { getNowTime, formatToDate, formatToDateTime } from '@/utils/date'
const filePreviewRef = ref(null)
let tempPolicyNo = ref('')
const previewVisible = ref(false)
const currentFileUrl = ref('')
const currentFileName = ref('')
const currentOtherFile = ref({ fileUrl: '', fileName: '' })
const { proxy } = getCurrentInstance()
const userStore = useUserStore()
// 分页相关
const currentPage = ref(1)
const pageSize = ref(10)
......@@ -785,7 +780,7 @@ const remittanceConfig = [
// },
{
type: 'upload',
prop: 'paymentVoucherList',
prop: 'paymentVoucherDtoList',
label: '支付凭证',
uploadType: 'file',
multiple: true,
......@@ -804,7 +799,7 @@ const remittanceConfig = [
},
{
type: 'upload',
prop: 'accountVerificationList',
prop: 'accountVerificationDtoList',
label: '账户证明',
uploadType: 'file',
multiple: true,
......@@ -879,6 +874,9 @@ async function onSelectChange(type, prop, value, item) {
}
}
} else if (type == 'addCheckRecord') {
console.log('====================================')
console.log('保单号改变')
console.log('====================================')
//新增保费对账弹窗
if (prop === 'policyNo' && value) {
tempPolicyNo.value = value
......@@ -915,6 +913,13 @@ const addRemittance = async () => {
}
try {
const formData = await addCheckRecordFormRef.value.validate()
const res = await getCheckPolicyNoApi(formData.policyNo)
console.log('校验保单res', res)
if (!res.data) {
ElMessage.warning(res.msg)
return
}
// 汇款记录详情也需要回显保费对账得一些字段
remittanceFormModel.value = {
...formData
......@@ -922,6 +927,7 @@ const addRemittance = async () => {
remittanceFormModel.value.apiPremiumRemittanceFileDtoList = []
tempOtherFileList.value = []
remittanceDialogTitle.value = '新增汇款'
showRemittance.value = true
} catch (error) {
// ❌ 校验失败或提交异常都会进入这里
......@@ -998,11 +1004,16 @@ const confirmRemittance = async data => {
const formData = await remittanceFormRef.value.validate()
let newFormData = JSON.parse(JSON.stringify(formData))
// 因为汇款记录回显了保费对账的一些字段,但提交汇款记录的时候这些回显的字段是不能提交的,所以在这里做删除
console.log('确认汇款', newFormData)
// return
let objMap = {
apiPremiumRemittanceFileDtoList: 'apiPremiumRemittanceFileDtoList',
paymentVoucherDtoList: 'paymentVoucherDtoList',
accountVerificationDtoList: 'accountVerificationDtoList'
}
for (const key in newFormData) {
if (key == deleteObjkeys[key]) delete newFormData[key]
// 文件上传的数据格式在这里统一处理
if (key == 'apiPremiumRemittanceFileDtoList' && newFormData[key].length > 0) {
if (key == objMap[key] && newFormData[key] && newFormData[key].length > 0) {
newFormData[key] = newFormData[key].map(item => {
// 有response说明是新上传得,要处理返回格式和字段
if (item.response) {
......@@ -1012,22 +1023,19 @@ const confirmRemittance = async data => {
fileType: newObj.fileType, //文件类型
fileUrl: newObj.url, //文件URL,
url: newObj.url //文件URL
// name: newObj.originalName //文件名
}
} else {
return item
}
})
} else if (
(key == 'paymentVoucherList' || key == 'accountVerificationList') &&
newFormData[key].length > 0
) {
newFormData[key] = newFormData[key].map(item => item.url)
}
}
let res = {}
console.log('====================================')
console.log('newFormData', newFormData)
console.log('====================================')
// console.log('====================================')
// console.log('newFormData', newFormData)
// console.log('====================================')
// return
if (currentRow.value.premiumReconciliationBizId && !formData.premiumRemittanceBizId) {
//编辑保费对账状态下新增汇款记录
const params = {
......@@ -1093,18 +1101,18 @@ const editRemittance = async row => {
newObj.insuranceCompany = addCheckRecordFormModel.value.insuranceCompany
// 上传回显得格式是[{url:''}]所以要处理一下
for (const key in newObj) {
if (
key == 'accountVerificationDtoList' ||
(key == 'paymentVoucherDtoList' && newObj[key] && newObj[key].length > 0)
) {
console.log('key', key)
if (key == 'accountVerificationDtoList' || key == 'paymentVoucherDtoList') {
if (newObj[key] && newObj[key].length > 0) {
newObj[key] = newObj[key].map(item => {
return {
...item,
url: item.fileUrl,
name: item.fileName
}
})
} else {
newObj[key] = []
}
}
if (key == 'apiPremiumRemittanceFileDtoList' && newObj[key] && newObj[key].length > 0) {
newObj[key] = newObj[key].map(item => {
......@@ -1114,28 +1122,15 @@ const editRemittance = async row => {
url: item.fileUrl
}
}
// else {
// return {
// url: item.fileUrl,
// name: item.fileName
// }
// }
})
}
}
remittanceFormModel.value = newObj
console.log('remittanceFormModel.value', remittanceFormModel.value)
if (newObj.accountVerificationDtoList && newObj.accountVerificationDtoList.length > 0) {
remittanceFormModel.value.accountVerificationList = newObj.accountVerificationDtoList
}
if (newObj.paymentVoucherDtoList && newObj.paymentVoucherDtoList.length > 0) {
remittanceFormModel.value.paymentVoucherList = newObj.paymentVoucherDtoList
}
if (remittanceFormModel.value.apiPremiumRemittanceFileDtoList.length > 0) {
tempOtherFileList.value = remittanceFormModel.value.apiPremiumRemittanceFileDtoList
}
console.log('remittanceFormModel.value', remittanceFormModel.value)
showRemittance.value = true
}
// 删除汇款记录
......@@ -1246,7 +1241,7 @@ const getPremiumReconciliationDetail = async row => {
// 按钮事件处理
const handleAdd = () => {
console.log(addCheckRecordFormModel.value)
currentRow.value = {}
receiptsDialogTitle.value = '新增保单对账'
receiptsFlag.value = true
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment