Commit 10d9b14a by yuzhenWang

Merge branch 'feature-20250827wyz-写业务' into 'test'

发布测试合并代码

See merge request !37
parents b29dcd31 92304c31
...@@ -313,6 +313,21 @@ const customer = [ ...@@ -313,6 +313,21 @@ const customer = [
labelWidth: '120px', //标签宽度 labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数 sm: 12, //栅格布局份数
lg: 8 //栅格布局份数 lg: 8 //栅格布局份数
},
{
label: '受供养人数目',
key: 'dependentsNum',
domType: 'Input',
inputType: 'number',
required: false,
maxLength: 300,
disabled: false,
placeholder: '请输入',
show: false,
labelPosition: 'top', //标签的位置
labelWidth: '120px', //标签宽度
sm: 12, //栅格布局份数
lg: 8 //栅格布局份数
} }
] ]
}, },
......
{ {
"apiAppointmentInfoDto": { "apiAppointmentInfoDto": {
"appointmentBizId": "appointment_lrEyN7kxrSU2YZLt", "isReferrerAccompany": "1",
"appointmentNo": "Y2601082985339", "isUseCar": "1",
"customerBizId": "customer_iNeCSyIKYrjXVTXa", "isOpenAccount": "1",
"customerNo": null,
"fnaBizId": "fna_nWhIilamRAqCV27g",
"fnaNo": "CSF-B-20260107-0906",
"proposalBizId": null,
"proposalNo": null,
"applyType": "INVESTMENT", "applyType": "INVESTMENT",
"signDate": "2026-01-14 00:00:00", "signDate": "2026-01-26 00:00:00",
"arrivalTime": "2026-01-08 00:00:00", "arrivalTime": "2026-01-28 09:40:00",
"departureTime": "2026-01-14 00:00:00", "departureTime": "2026-02-05 09:40:00",
"meetingPoint": "INSURANCE_COMPANY", "meetingPoint": "INSURANCE_COMPANY",
"signingAddress": "6666", "signingAddress": "886",
"hkMobileCode": "+81", "hkMobile": "886",
"hkMobile": "5556", "bankName": "中国工商银行",
"isOpenAccount": 0, "bankId": "bank_1001",
"bankId": null, "materials": "个人开户: 带好 身份证 和 实名手机 直接前往网点即可,多数情况十分钟内办结。\r\n\r\n对公开户:\r\n\r\n第一步: 致电目标银行网点对公业务部,预约并获取最新资料清单。\r\n\r\n第二步: 对照清单,准备好所有 原件 和 公章。\r\n\r\n第三步: 法定代表人(或授权经办人)携带所有材料,按约定时间前往银行办理。",
"policyTransfer": null, "bankBranchName": "886",
"isUseCar": 0, "openAccountStartTime": "2026-01-05 00:00:00",
"isReferrerAccompany": 0, "openAccountEndTime": "2026-01-20 00:00:00",
"creatorName": "zs", "openAccountLocation": "886",
"referrerDtoList": [], "isBuy": "1",
"isTj": "0",
"openAccountNotice": "886",
"hkMobileCode": "+244",
"objType": "phone",
"key": "hkMobile",
"phoneString": "+244 886",
"referrerDtoList": [
{
"id": 1768182062294,
"span": 24,
"email": "886",
"phone": "886",
"realName": "赵风",
"userBizId": "user_1Y3A18QwDYGMwZHp",
"userSaleBizId": "user_sale_expand_6LipZ2uQYqIpv2vK"
}
],
"userSignDtoList": [ "userSignDtoList": [
{ {
"appointmentUserSignBizId": "appointment_user_sign_1x7bWfRC8YkmpiL4", "id": 1768182068586,
"userSignBizId": "user_sign_rrrrsae445556er", "span": 24,
"userBizId": "user_HNpzB3A0A72JMLVN",
"name": "SW", "name": "SW",
"practiceCode": "6666", "practiceCode": "886",
"phone": "6666", "phone": "886",
"cardType": "household_register", "cardType": "idCard",
"cardNo": "6666", "cardNo": "886",
"email": "6666" "email": "886",
"userBizId": "user_HNpzB3A0A72JMLVN",
"userSignBizId": "user_sign_rrrrsae445556er"
} }
] ],
"isSecond": 1,
"customerBizId": "customer_OgR6wHpkgvvlpsht",
"fnaBizId": "fna_QK3X3ygfsaOKcYQW",
"fnaNo": "CSF-B-20260112-0926"
}, },
"apiProductPlanInfoDto": { "apiProductPlanInfoDto": {
"apiProductPlanMainInfoDto": { "apiProductPlanMainInfoDto": {
"planBizId": "product_plan_aMNtyxS4lQp3Dou3", "companyName": "太平洋保险有限公司",
"companyId": "insurance_company_7dtUJyhgDk6v5Eva", "companyId": "insurance_company_MLXRsUzPBhG76P1X",
"companyName": "上海测试有限公司", "insuranceTypeName": "储蓄险",
"insuranceTypeId": "e67a90222b654545a5778df3fcc8ced3", "insuranceTypeId": "2aba7e865b9b45deba77e0bcc7d6fa67",
"insuranceTypeName": "重疾险",
"productLaunchBizId": "product_launch_1LcCgSXEsf0KfmQM",
"productLaunchMainName": "附加产品001", "productLaunchMainName": "附加产品001",
"issueNumber": "3",
"guaranteePeriod": "6666",
"policyCurrency": "SGD",
"sumInsured": 6666,
"paymentFrequency": "QUARTER",
"eachIssuePremium": 6666,
"initialPaymentMethod": "UNIONPAY",
"policyLevy": 6666,
"isPrepay": 0,
"isTraceable": 1,
"isBacktrack": 1,
"isJoin": 0,
"dividendDistributionMethod": "BREATH",
"renewalPaymentMethod": "UNIONPAY"
},
"apiProductPlanAdditionalInfoDtoList": [
{
"additionalBizId": "additional_zriaqQRTuqwhFPON",
"planBizId": "product_plan_aMNtyxS4lQp3Dou3",
"productLaunchBizId": "product_launch_1LcCgSXEsf0KfmQM", "productLaunchBizId": "product_launch_1LcCgSXEsf0KfmQM",
"productLaunchName": "附加产品001",
"paymentFrequency": null,
"issueNumber": "3", "issueNumber": "3",
"guaranteePeriod": "6666", "policyCurrency": "GBP",
"policyCurrency": "USD", "paymentFrequency": "YEAR",
"sumInsured": 6666, "eachIssuePremium": "886",
"eachIssuePremium": 6666, "policyLevy": "886",
"protectionLevel": "6666", "isPrepay": 0
"guaranteeRegion": "6666", },
"deductibles": "6666", "apiProductPlanAdditionalInfoDtoList": []
"additionalSafeguards": "6666",
"policyLevy": 0
}
]
}, },
"apiPolicyholderInfoDto": { "apiPolicyholderInfoDto": {
"policyholderBizId": "policyholder_uMqoYsDOOQ3AOpu9", "id": 23,
"customerBizId": "customer_iNeCSyIKYrjXVTXa", "customerBizId": "customer_OgR6wHpkgvvlpsht",
"customerNo": null, "nameCn": "测试二",
"nameCn": "最新的投保人", "namePyEn": "CESHIER",
"namePyEn": "ZUIXINDE",
"documentType": "idCard", "documentType": "idCard",
"idNumber": "411424199604041622", "idNumber": "411424199604041622",
"gender": "2", "gender": "2",
"birthday": "2007-01-01 00:00:00", "birthday": "1996-04-04 00:00:00",
"age": "19", "age": 29,
"nationality": "英属处女群岛", "nationality": "中国台湾",
"birthplace": "1284", "birthplace": "886",
"isOtherCountry": 0, "isOtherCountry": "1",
"smokingStatus": "1", "apiTaxationDtoList": [
{
"taxCountry": "中国",
"taxId": "886",
"show": true
}
],
"smokingStatus": "0",
"maritalStatus": "SINGLE", "maritalStatus": "SINGLE",
"educationLevel": "UNIVERSITY", "educationLevel": "UNIVERSITY",
"isRetirement": 0, "isRetirement": "0",
"retirementAge": null, "retirementAge": null,
"height": "158", "height": "160",
"weight": "50", "weight": "50",
"bmi": "20.03", "bmi": "19.53",
"riskAppetite": "CHINESE", "riskAppetite": "LOW",
"dependentsNum": 1, "dependentsNum": 1,
"mobileCode": "+81", "mobileCode": "+994",
"mobile": "1284", "mobile": "886",
"residenceMobileCode": "+886", "residenceMobileCode": "+675",
"residenceMobile": "1284", "residenceMobile": "886",
"landlineCode": null, "landlineCode": null,
"landline": "1284", "landline": "886",
"email": "1284", "email": "886",
"certificateAddress": "1284", "certificateAddress": "886",
"mailingAddress": null, "mailingAddressCode": "886",
"residentialAddress": null,
"mailingAddressCode": "1284",
"employmentStatus": "1", "employmentStatus": "1",
"csName": "1284", "csName": "886",
"industry": "1284", "industry": "886",
"currentMonthlyIncome": null, "currentMonthlyIncome": 886,
"totalWorkingYears": 1284, "totalWorkingYears": 886,
"currentTenure": null, "currentTenure": 886,
"position": "1284", "position": "886",
"companyAddress": null, "companyMobileCode": "+359",
"companyMobileCode": null, "companyMobile": "886",
"companyMobile": null, "companyAddressCode": "886",
"companyAddressCode": "1284", "monthIncome": 886,
"monthIncome": 1284, "monthExpenditure": 886,
"monthExpenditure": 1284, "totalCurrentAssets": 886,
"totalCurrentAssets": 1284, "totalDebt": 885,
"totalDebt": 1284, "travel": "886",
"travel": "1284", "exercise": "VOLLEYBALL",
"exercise": "BICYCLE",
"game": "STIMULATE", "game": "STIMULATE",
"movieDrama": "HISTORY", "movieDrama": "FANTASY",
"delicacy": "1284", "delicacy": "886",
"addressList": [ "addressList": [
{ {
"type": "mailingAddress", "type": "mailingAddress",
"region": "1284", "region": "886",
"city": "1284", "city": "886",
"street": "1284", "street": "886",
"location": "1284" "location": "886",
"addressString": "886886886886",
"objType": "address"
}, },
{ {
"type": "residentialAddress", "type": "residentialAddress",
"region": "1284", "region": "886",
"city": "1284", "city": "886",
"street": "1284", "street": "886",
"location": "1284" "location": "886",
"addressString": "886886886886",
"objType": "address"
}, },
{ {
"type": "companyAddress", "type": "companyAddress",
"region": "1284", "region": "886",
"city": "1284", "city": "886",
"street": "1284", "street": "886",
"location": "1284" "location": "886",
"addressString": "886886886886",
"objType": "address"
} }
], ],
"apiTaxationDtoList": null, "remark": null,
"birthdayValid": true "countryName": "中国台湾",
"phoneString": "+359 886",
"key": "companyMobile",
"phoneCode": "companyMobileCode",
"code": "+359"
}, },
"apiInsurantInfoDto": { "apiInsurantInfoDto": {
"insurantBizId": "insurant_eH5N7m2YyVHQ54H3", "id": 23,
"customerBizId": "customer_iNeCSyIKYrjXVTXa", "customerBizId": "customer_OgR6wHpkgvvlpsht",
"customerNo": null, "nameCn": "测试二",
"policyholderRel": "PARENTS", "namePyEn": "CESHIER",
"nameCn": "最新的受保",
"namePyEn": "ZUIXINDESHOUBAO",
"documentType": "idCard", "documentType": "idCard",
"idNumber": "411424199604041622", "idNumber": "411424199604041622",
"gender": "2", "gender": "2",
"birthday": "2007-01-01 00:00:00", "birthday": "1996-04-04 00:00:00",
"age": "19", "age": 29,
"nationality": "英属处女群岛", "nationality": "中国台湾",
"birthplace": "1284", "birthplace": "886",
"isOtherCountry": 0, "isOtherCountry": "1",
"smokingStatus": "1", "apiTaxationDtoList": [
{
"taxCountry": "中国",
"taxId": "886",
"show": true
}
],
"smokingStatus": "0",
"maritalStatus": "SINGLE", "maritalStatus": "SINGLE",
"educationLevel": "UNIVERSITY", "educationLevel": "UNIVERSITY",
"isRetirement": 0, "isRetirement": "0",
"retirementAge": null, "retirementAge": null,
"height": "158", "height": "160",
"weight": "50", "weight": "50",
"bmi": "20.03", "bmi": "19.53",
"riskAppetite": "CHINESE", "riskAppetite": "LOW",
"dependentsNum": 1, "dependentsNum": 1,
"mobileCode": "+81", "mobileCode": "+994",
"mobile": "1284", "mobile": "886",
"residenceMobileCode": "+886", "residenceMobileCode": "+675",
"residenceMobile": "1284", "residenceMobile": "886",
"landlineCode": null, "landlineCode": null,
"landline": "1284", "landline": "886",
"email": "1284", "email": "886",
"certificateAddress": "1284", "certificateAddress": "886",
"mailingAddress": null, "mailingAddressCode": "886",
"residentialAddress": null,
"mailingAddressCode": "1284",
"employmentStatus": "1", "employmentStatus": "1",
"csName": "1284", "csName": "886",
"industry": "1284", "industry": "886",
"currentMonthlyIncome": null, "currentMonthlyIncome": 886,
"totalWorkingYears": 1284, "totalWorkingYears": 886,
"currentTenure": null, "currentTenure": 886,
"position": "1284", "position": "886",
"companyAddress": null, "companyMobileCode": "+359",
"companyMobileCode": null, "companyMobile": "886",
"companyMobile": null, "companyAddressCode": "886",
"companyAddressCode": "1284", "monthIncome": 886,
"monthIncome": 1284, "monthExpenditure": 886,
"monthExpenditure": 1284, "totalCurrentAssets": 886,
"totalCurrentAssets": 1284, "totalDebt": 885,
"totalDebt": 1284, "travel": "886",
"travel": "1284", "exercise": "VOLLEYBALL",
"exercise": "BICYCLE",
"game": "STIMULATE", "game": "STIMULATE",
"movieDrama": "HISTORY", "movieDrama": "FANTASY",
"delicacy": "1284", "delicacy": "886",
"addressList": [ "addressList": [
{ {
"type": "mailingAddress", "type": "mailingAddress",
"region": "1284", "region": "886",
"city": "1284", "city": "886",
"street": "1284", "street": "886",
"location": "1284" "location": "886",
"addressString": "886886886886",
"objType": "address"
}, },
{ {
"type": "residentialAddress", "type": "residentialAddress",
"region": "1284", "region": "886",
"city": "1284", "city": "886",
"street": "1284", "street": "886",
"location": "1284" "location": "886",
"addressString": "886886886886",
"objType": "address"
}, },
{ {
"type": "companyAddress", "type": "companyAddress",
"region": "1284", "region": "886",
"city": "1284", "city": "886",
"street": "1284", "street": "886",
"location": "1284" "location": "886",
"addressString": "886886886886",
"objType": "address"
} }
], ],
"apiTaxationDtoList": null, "remark": null,
"self": false, "policyholderRel": "MYSELF",
"birthdayValid": true "countryName": "中国台湾",
"phoneString": "+359 886",
"key": "companyMobile",
"phoneCode": "companyMobileCode",
"code": "+359"
}, },
"apiSecondHolderInfoDto": {},
"apiBeneficiaryInfoFzDto": { "apiBeneficiaryInfoFzDto": {
"apiBeneficiaryInfoDtoList": [ "isLegalBeneficiary": 1
{ },
"id": 1767840050795, "apiSecondHolderInfoDto": {
"appointmentBizId": "appointment_lrEyN7kxrSU2YZLt", "isSecond": 1,
"beneficiaryBizId": "beneficiary_rJq87qgQKrTnHLIZ", "insurantRel": "MYSELF",
"insurantRel": "PARENTS", "nameCn": "测试二",
"nameCn": "受益人", "namePyEn": "CESHIER",
"namePyEn": "SHOUYIREN",
"documentType": "idCard", "documentType": "idCard",
"idNumber": "411414199604041234", "idNumber": "411424199604041622",
"gender": "1", "gender": "2",
"birthday": "1996-04-04 00:00:00", "birthday": "1996-04-04 00:00:00",
"nationality": "中国澳门", "benefitRatio": ""
"benefitRatio": 6666
}
],
"isLegalBeneficiary": 0
}, },
"materialDtoList": [] "apiAnswerSaveRequest": {
"questionnaireBizId": "questionnaires_1001",
"objectBizId": "",
"answerSessionsDtoList": []
},
"materialDtoList": [
{
"materialBizId": "material_rPc0sDZurdDFfwSE",
"fileBizIdList": [
"oss_file_jhoezRHKCMf5AHbU"
]
},
{
"materialBizId": "material_NOM56VZmKXa8rwcf",
"fileBizIdList": []
},
{
"materialBizId": "material_Clinlz7VnBLbg151",
"fileBizIdList": []
},
{
"materialBizId": "material_IaSKzxQ73K5qQPUW",
"fileBizIdList": []
},
{
"materialBizId": "material_pOLgtaGwIR5IkUBv",
"fileBizIdList": []
},
{
"materialBizId": "material_h0sIbNWnklHI3dFL",
"fileBizIdList": []
},
{
"materialBizId": "material_Txh02cNvT21QPOZH",
"fileBizIdList": []
},
{
"materialBizId": "material_IeS4kTopn06fGzbe",
"fileBizIdList": []
},
{
"materialBizId": "material_ykfOPMkoBvxsy1Y8",
"fileBizIdList": []
},
{
"materialBizId": "material_dGGFvKISJBz9OhZg",
"fileBizIdList": []
}
]
} }
...@@ -71,7 +71,11 @@ ...@@ -71,7 +71,11 @@
:placeholder="child.placeholder" :placeholder="child.placeholder"
maxlength="30" maxlength="30"
:disabled=" :disabled="
child.key == 'age' || child.key == 'bmi' ? true : editStatus child.key == 'age' ||
child.key == 'bmi' ||
child.key == 'dependentsNum'
? true
: editStatus
" "
@blur="handleInputBlur(child)" @blur="handleInputBlur(child)"
> >
...@@ -105,7 +109,7 @@ ...@@ -105,7 +109,7 @@
v-model="form[child.key]" v-model="form[child.key]"
type="date" type="date"
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD"
:placeholder="child.placeholder" :placeholder="child.placeholder"
:disabled="editStatus" :disabled="editStatus"
:disabled-date="time => disabledDate(time, child)" :disabled-date="time => disabledDate(time, child)"
...@@ -977,7 +981,12 @@ const setFormValue = (obj, formData, exportValue) => { ...@@ -977,7 +981,12 @@ const setFormValue = (obj, formData, exportValue) => {
if (obj.isRetirement || obj.isRetirement == 0) { if (obj.isRetirement || obj.isRetirement == 0) {
form.value['isRetirement'] = String(obj.isRetirement) form.value['isRetirement'] = String(obj.isRetirement)
} }
if (obj.dependentsNum) {
field.show = true
}
if (field.dictType == 'sys_no_yes') {
form.value[field.key] = String(obj[field.key])
}
//要判断drawerType,因为抽屉要回显数据 //要判断drawerType,因为抽屉要回显数据
switch (field.drawerType) { switch (field.drawerType) {
case 'phone': case 'phone':
...@@ -1080,7 +1089,7 @@ const setFormValue = (obj, formData, exportValue) => { ...@@ -1080,7 +1089,7 @@ const setFormValue = (obj, formData, exportValue) => {
addressQuickList.value = removeDuplicates(tempAddressList, 'addressString') addressQuickList.value = removeDuplicates(tempAddressList, 'addressString')
processedCustomerData.value = processedData processedCustomerData.value = processedData
console.log('processedCustomerData.value', processedCustomerData.value) console.log('form.value', form.value)
} }
// 数组去重 // 数组去重
function removeDuplicates(arr, key) { function removeDuplicates(arr, key) {
......
...@@ -426,6 +426,8 @@ const handleRemoteSelectChange = async (row, column, father) => { ...@@ -426,6 +426,8 @@ const handleRemoteSelectChange = async (row, column, father) => {
if (item.value == row.insuranceType) { if (item.value == row.insuranceType) {
if (item.code == 'CI') { if (item.code == 'CI') {
row.showSumInsured = true row.showSumInsured = true
} else {
row.showSumInsured = false
} }
row.insuranceType = item.label row.insuranceType = item.label
} }
...@@ -748,7 +750,7 @@ const setFormValue = (obj, formData) => { ...@@ -748,7 +750,7 @@ const setFormValue = (obj, formData) => {
loading.value = true loading.value = true
let processedData = JSON.parse(JSON.stringify(formData)) let processedData = JSON.parse(JSON.stringify(formData))
// 重疾险要加上row.showSumInsured = true便于控制重疾险保额输入框的显示
for (const section of processedData) { for (const section of processedData) {
if (section.keyType == 'Array') { if (section.keyType == 'Array') {
section.data = obj[section.key] ? obj[section.key] : [] section.data = obj[section.key] ? obj[section.key] : []
......
...@@ -1006,21 +1006,8 @@ const processFormData = async () => { ...@@ -1006,21 +1006,8 @@ const processFormData = async () => {
} }
} }
} }
console.log('searchOptions.value', searchOptions.value)
setFormValue(props.detailInfo, processedData)
// if (props.idsObj.appointmentBizId) {
// setFormValue(props.apiAppointmentInfoDto, processedData)
// return // setFormValue(props.detailInfo, processedData)
// } else if (showDetail.value) {
// // 回显历史签约详情
// setFormValue(detailData.value, processedData)
// return
// } else {
// // 新增给默认值
// form.value['isReferrerAccompany'] = form.value['isOpenAccount'] = form.value['isUseCar'] = 0
// processedAppointmentData.value = processedData
// }
} }
//弹出右侧抽屉 //弹出右侧抽屉
...@@ -1245,7 +1232,9 @@ const setFormValue = (obj, formData) => { ...@@ -1245,7 +1232,9 @@ const setFormValue = (obj, formData) => {
} }
// 给表单表格赋值 // 给表单表格赋值
for (const objKey in obj) { for (const objKey in obj) {
if (objKey == section.key && section.keyType == 'Array' && obj[section.key].length > 0) { if (objKey == section.key && section.keyType == 'Array') {
console.log('key', section.key, obj[section.key])
section.data = obj[section.key] section.data = obj[section.key]
} }
} }
...@@ -1380,6 +1369,9 @@ const setFormValue = (obj, formData) => { ...@@ -1380,6 +1369,9 @@ const setFormValue = (obj, formData) => {
processedAppointmentData.value = oldAppointmentData.value = processedData processedAppointmentData.value = oldAppointmentData.value = processedData
oldObjInfo.value = JSON.parse(JSON.stringify(form.value)) oldObjInfo.value = JSON.parse(JSON.stringify(form.value))
console.log('form.value', form.value) console.log('form.value', form.value)
console.log('====================================')
console.log('详情', processedAppointmentData.value)
console.log('====================================')
} }
// 数组去重 // 数组去重
function removeDuplicates(arr, key) { function removeDuplicates(arr, key) {
...@@ -1557,7 +1549,8 @@ watch( ...@@ -1557,7 +1549,8 @@ watch(
} }
) )
if (Object.keys(props.detailInfo).length > 0) { if (Object.keys(props.detailInfo).length > 0) {
processFormData() // processFormData()
setFormValue(props.detailInfo, appointmentDomData)
} }
// 暴露给父组件 // 暴露给父组件
defineExpose({ defineExpose({
......
...@@ -388,11 +388,6 @@ ...@@ -388,11 +388,6 @@
<template #table> <template #table>
<el-table v-loading="tableLoading" :data="tableData" border> <el-table v-loading="tableLoading" :data="tableData" border>
<el-table-column label="创建人" align="center" prop="creatorName" /> <el-table-column label="创建人" align="center" prop="creatorName" />
<!-- <el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="fetchDictData('sys_gender')" :value="scope.row.gender" />
</template>
</el-table-column> -->
<el-table-column label="创建时间" align="center" prop="createTime"> <el-table-column label="创建时间" align="center" prop="createTime">
<template #default="scope"> <template #default="scope">
...@@ -626,6 +621,11 @@ function getItineraryInfo() { ...@@ -626,6 +621,11 @@ function getItineraryInfo() {
appointmentSummeryInfo.value.meetingPoint = item.label appointmentSummeryInfo.value.meetingPoint = item.label
} }
}) })
fetchDictData('bx_currency_type').forEach(item => {
if (item.value == appointmentSummeryInfo.value.currency) {
appointmentSummeryInfo.value.currency = item.label
}
})
if (appointmentSummeryInfo.value.total) { if (appointmentSummeryInfo.value.total) {
appointmentSummeryInfo.value.total = Number(appointmentSummeryInfo.value.total).toFixed(2) appointmentSummeryInfo.value.total = Number(appointmentSummeryInfo.value.total).toFixed(2)
} }
...@@ -663,9 +663,11 @@ function getItineraryInfo() { ...@@ -663,9 +663,11 @@ function getItineraryInfo() {
}, },
{ {
label: '联系电话', label: '联系电话',
value: appointmentSummeryInfo.value.businessRepresentMobile1 value: appointmentSummeryInfo.value.businessRepresentMobile1Code
? appointmentSummeryInfo.value.businessRepresentMobile1Code + ? appointmentSummeryInfo.value.businessRepresentMobile1Code +
appointmentSummeryInfo.value.businessRepresentMobile1 appointmentSummeryInfo.value.businessRepresentMobile1
: appointmentSummeryInfo.value.businessRepresentMobile1
? appointmentSummeryInfo.value.businessRepresentMobile1
: '-', : '-',
span: 12 // 占12/24 span: 12 // 占12/24
} }
...@@ -773,11 +775,11 @@ const handleExprot = async row => { ...@@ -773,11 +775,11 @@ const handleExprot = async row => {
} }
const changePageNo = val => { const changePageNo = val => {
queryParams.value.pageNo = val queryParams.value.pageNo = val
// getList() viewHistory()
} }
const changePageSize = val => { const changePageSize = val => {
queryParams.value.pageSize = val queryParams.value.pageSize = val
// getList() viewHistory()
} }
const timeValueChange = child => { const timeValueChange = child => {
if (form.value[child.key]) { if (form.value[child.key]) {
...@@ -1037,11 +1039,11 @@ const fetchDictData = dictType => { ...@@ -1037,11 +1039,11 @@ const fetchDictData = dictType => {
dictStore.dictTypeLists.forEach(item => { dictStore.dictTypeLists.forEach(item => {
if (item.dictType == dictType) { if (item.dictType == dictType) {
// options = item.dictItemList // options = item.dictItemList
if (dictType == 'sys_no_yes') { // if (dictType == 'sys_no_yes') {
item.dictItemList.forEach(item1 => { // item.dictItemList.forEach(item1 => {
item1.value = Number(item1.value) // item1.value = Number(item1.value)
}) // })
} // }
options = item.dictItemList options = item.dictItemList
} }
}) })
...@@ -1075,6 +1077,8 @@ const processFormData = async () => { ...@@ -1075,6 +1077,8 @@ const processFormData = async () => {
} }
if (section.data) { if (section.data) {
for (const field of section.data) { for (const field of section.data) {
// 给默认值赋值
if (section.key == 'openAccount') { if (section.key == 'openAccount') {
openAccountKey.value[field.key] = field.key openAccountKey.value[field.key] = field.key
} }
...@@ -1090,35 +1094,37 @@ const processFormData = async () => { ...@@ -1090,35 +1094,37 @@ const processFormData = async () => {
} }
if (field.required) { if (field.required) {
if (field.key === 'firstNamePinyin') {
rules.value[field.key] = [
{ required: true, message: `${field.label}不能为空`, trigger: 'blur' },
{ validator: validateEnglish, trigger: 'change' }
]
} else {
rules.value[field.key] = [ rules.value[field.key] = [
{ required: true, message: `${field.label}不能为空`, trigger: 'blur' } { required: true, message: `${field.label}不能为空`, trigger: 'blur' }
] ]
} }
// 新增赋默认值
if (
!props.idsObj.appointmentBizId &&
(field.key == 'isUseCar' ||
field.key == 'isOpenAccount' ||
field.key == 'isReferrerAccompany')
) {
field.options.forEach(item => {
if (item.value == '0') {
form.value[field.key] = item.value
}
})
} }
} }
} }
} }
console.log('searchOptions.value', searchOptions.value)
// 编辑状态下回显值 // 编辑状态下回显值
if (props.idsObj.appointmentBizId) { if (props.idsObj.appointmentBizId) {
setFormValue(props.apiAppointmentInfoDto, processedData) setFormValue(props.apiAppointmentInfoDto, processedData)
return return
} else if (showDetail.value) {
// 回显历史签约详情
setFormValue(detailData.value, processedData)
return
} else { } else {
// 新增给默认值
form.value['isReferrerAccompany'] = form.value['isOpenAccount'] = form.value['isUseCar'] = 0
processedAppointmentData.value = processedData processedAppointmentData.value = processedData
console.log('processedAppointmentData.value', processedAppointmentData.value)
} }
console.log('processedAppointmentData.value', processedAppointmentData.value)
console.log('form.value', form.value)
} }
//弹出右侧抽屉 //弹出右侧抽屉
...@@ -1383,6 +1389,9 @@ const setFormValue = (obj, formData) => { ...@@ -1383,6 +1389,9 @@ const setFormValue = (obj, formData) => {
field.finishTime = obj[field.key] field.finishTime = obj[field.key]
} }
if (field.dictType == 'sys_no_yes') {
form.value[field.key] = String(form.value[field.key])
}
//要判断drawerType,因为抽屉要回显数据 //要判断drawerType,因为抽屉要回显数据
switch (field.drawerType) { switch (field.drawerType) {
case 'phone': case 'phone':
...@@ -1664,12 +1673,17 @@ watch(showDetail, newVal => { ...@@ -1664,12 +1673,17 @@ watch(showDetail, newVal => {
detailInfo.value = {} detailInfo.value = {}
} }
}) })
const hasLoaded = ref(false) // 新增:是否已加载过数据
watch( watch(
() => props.activeName, () => props.activeName,
newVal => { newVal => {
appointmentRef.value = null appointmentRef.value = null
if (newVal === 'appointmentInfo') { if (newVal === 'appointmentInfo') {
if (!hasLoaded.value) {
processFormData() processFormData()
hasLoaded.value = true
}
showDetail.value = false showDetail.value = false
openList.value = false openList.value = false
} }
......
...@@ -540,6 +540,11 @@ const fetchDictData = dictType => { ...@@ -540,6 +540,11 @@ const fetchDictData = dictType => {
try { try {
dictStore.dictTypeLists.forEach(item => { dictStore.dictTypeLists.forEach(item => {
if (item.dictType == dictType) { if (item.dictType == dictType) {
if (dictType == 'sys_no_yes') {
item.dictItemList.forEach(item1 => {
item1.value = Number(item1.value)
})
}
options = item.dictItemList options = item.dictItemList
} }
}) })
...@@ -580,19 +585,6 @@ const processFormData = async obj => { ...@@ -580,19 +585,6 @@ const processFormData = async obj => {
} }
} }
} }
if (
tempBeneficiaryDomData.value.length > 0 &&
!props.idsObj.appointmentBizId &&
props.pageSource == 'fnaList'
) {
form.value = { ...tempBeneficiaryForm.value }
saveKey.value = { ...tempSaveKey.value }
addressQuickList.value = JSON.parse(JSON.stringify(tempAddressQuickList.value))
phoneQuickList.value = JSON.parse(JSON.stringify(tempPhoneQuickList.value))
processedBeneficiaryData.value = JSON.parse(JSON.stringify(tempBeneficiaryDomData.value))
} else {
processedBeneficiaryData.value = oldAppointmentData.value = processedData
}
if (props.idsObj.appointmentBizId) { if (props.idsObj.appointmentBizId) {
setFormValue(processedData) setFormValue(processedData)
} else { } else {
...@@ -862,6 +854,8 @@ const setFormValue = processedData => { ...@@ -862,6 +854,8 @@ const setFormValue = processedData => {
} }
} }
processedBeneficiaryData.value = oldDom processedBeneficiaryData.value = oldDom
console.log('受益人表单', form.value)
console.log('dom', processedBeneficiaryData.value)
} }
// 获取校验失败的字段信息 // 获取校验失败的字段信息
const getInvalidFields = fields => { const getInvalidFields = fields => {
...@@ -882,7 +876,6 @@ const handleFormValues = () => { ...@@ -882,7 +876,6 @@ const handleFormValues = () => {
return new Promise(async resolve => { return new Promise(async resolve => {
if (processedBeneficiaryData.value.length > 0) { if (processedBeneficiaryData.value.length > 0) {
let submitObj = { ...form.value } let submitObj = { ...form.value }
// 因为投保人没有policyholderRel的校验会影响 受保人,所以暂时先赋值处理
proxy.$refs['beneficiaryInfoFormRef'].validate((valid, fields) => { proxy.$refs['beneficiaryInfoFormRef'].validate((valid, fields) => {
if (valid) { if (valid) {
...@@ -941,29 +934,19 @@ const resetForm = () => { ...@@ -941,29 +934,19 @@ const resetForm = () => {
.catch(() => {}) .catch(() => {})
} }
const hasLoaded = ref(false) // 新增:是否已加载过数据
watch( watch(
() => props.activeName, () => props.activeName,
newVal => { newVal => {
// 切换tab的时侯把表单值保存在临时变量里,方便切换回来的时候回显
tempBeneficiaryForm.value = { ...form.value }
tempSaveKey.value = { ...saveKey.value }
tempAddressQuickList.value = JSON.parse(JSON.stringify(addressQuickList.value))
tempPhoneQuickList.value = JSON.parse(JSON.stringify(phoneQuickList.value))
tempBeneficiaryDomData.value = JSON.parse(JSON.stringify(processedBeneficiaryData.value))
if (newVal === 'beneficiary') { if (newVal === 'beneficiary') {
openList.value = false openList.value = false
if (!hasLoaded.value) {
processFormData({ processFormData({
domdata: beneficiaryDomData, domdata: beneficiaryDomData,
exportValue: null exportValue: null
}) })
// if (props.idsObj.appointmentBizId) { hasLoaded.value = true
// setFormValue() }
// } else {
// // 新增状态
// }
} }
} }
) )
......
...@@ -388,12 +388,7 @@ const handleFormValues = () => { ...@@ -388,12 +388,7 @@ const handleFormValues = () => {
proxy.$refs['heathFormRef'].validate((valid, fields) => { proxy.$refs['heathFormRef'].validate((valid, fields) => {
if (valid) { if (valid) {
errorFields.value = [] // 清空错误信息 errorFields.value = [] // 清空错误信息
if (props.activeName == 'questionnaires') {
submitObj = JSON.parse(JSON.stringify(form.value)) submitObj = JSON.parse(JSON.stringify(form.value))
} else {
submitObj = JSON.parse(JSON.stringify(tempSecondHolderForm.value))
}
let answerSessionsDtoList = [] let answerSessionsDtoList = []
if (submitObj.length > 0) { if (submitObj.length > 0) {
......
...@@ -587,6 +587,11 @@ const fetchDictData = dictType => { ...@@ -587,6 +587,11 @@ const fetchDictData = dictType => {
try { try {
dictStore.dictTypeLists.forEach(item => { dictStore.dictTypeLists.forEach(item => {
if (item.dictType == dictType) { if (item.dictType == dictType) {
if (dictType == 'sys_no_yes') {
item.dictItemList.forEach(item1 => {
item1.value = Number(item1.value)
})
}
options = item.dictItemList options = item.dictItemList
} }
}) })
......
...@@ -394,6 +394,11 @@ const fetchDictData = dictType => { ...@@ -394,6 +394,11 @@ const fetchDictData = dictType => {
try { try {
dictStore.dictTypeLists.forEach(item => { dictStore.dictTypeLists.forEach(item => {
if (item.dictType == dictType) { if (item.dictType == dictType) {
if (dictType == 'sys_no_yes') {
item.dictItemList.forEach(item1 => {
item1.value = Number(item1.value)
})
}
options = item.dictItemList options = item.dictItemList
} }
}) })
...@@ -733,7 +738,7 @@ const resetForm = () => { ...@@ -733,7 +738,7 @@ const resetForm = () => {
.catch(() => {}) .catch(() => {})
} }
const hasLoaded = ref(false) // 新增:是否已加载过数据
watch( watch(
() => props.activeName, () => props.activeName,
newVal => { newVal => {
...@@ -742,6 +747,7 @@ watch( ...@@ -742,6 +747,7 @@ watch(
if (newVal === 'secondHolder') { if (newVal === 'secondHolder') {
openList.value = false openList.value = false
if (!hasLoaded.value) {
if (props.idsObj.appointmentBizId) { if (props.idsObj.appointmentBizId) {
processFormData({ processFormData({
domdata: secondHolderDomData, domdata: secondHolderDomData,
...@@ -755,6 +761,8 @@ watch( ...@@ -755,6 +761,8 @@ watch(
exportValue: null exportValue: null
}) })
} }
hasLoaded.value = true
}
} }
} }
) )
......
<template>
<div class="container">
<CommonPage
:operationBtnList="operationBtnList"
:visibleDefaultButtons="visibleDefaultButtons"
:showSearchForm="true"
:show-pagination="true"
:total="pageTotal"
:current-page="currentPage"
:page-size="pageSize"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
<!-- 搜索区域 -->
<template #searchForm>
<SearchForm ref="searchFormRef" :config="searchConfig" />
</template>
<!-- 列表区域 -->
<template #table>
<!-- 统计信息卡片 -->
<el-table
:data="tableData"
@selection-change="handleSelectionChange"
height="400"
border
highlight-current-row
style="width: 100%"
v-loading="loading"
>
<el-table-column type="selection" width="40" />
<el-table-column prop="fortuneBizType" label="应付单类型" width="120" sortable>
<template #default="{ row }">
{{ getFortuneBizTypeLabel(row.fortuneBizType) }}
</template>
</el-table-column>
<el-table-column prop="policyNo" label="保单号" width="120" sortable />
<el-table-column prop="insuranceCompany" label="保险公司" width="120" sortable />
<el-table-column
prop="commissionPaidAmount"
label="累积已入账金额"
width="120"
sortable
/>
<el-table-column prop="commissionPaidRatio" label="累积已入账比例" width="120" sortable />
<el-table-column prop="fortuneName" label="出账项目" width="130" sortable />
<el-table-column prop="fortunePeriod" label="出账期数" width="130" sortable />
<el-table-column prop="fortuneTotalPeriod" label="总期数" width="120" sortable />
<el-table-column prop="broker" label="转介人" width="130" sortable />
<el-table-column prop="team" label="所属团队" width="120" sortable />
<el-table-column prop="amount" label="应出账金额" width="140" sortable />
<el-table-column prop="currency" label="出账币种" width="130" sortable />
<el-table-column prop="fortunePaidAmount" label="已出账金额" width="120" sortable />
<el-table-column prop="fortuneUnpaidAmount" label="剩余出账金额" width="120" sortable />
<el-table-column prop="currentPaymentAmount" label="本期出账金额" width="120" sortable />
<el-table-column prop="fortuneUnpaidRatio" label="剩余出账比例" width="120" sortable />
<el-table-column prop="status" label="出账状态" width="120" sortable>
<template #default="{ row }">
{{ getDictLabel('csf_fortune_status', row.status) }}
</template>
</el-table-column>
<el-table-column prop="premium" label="期交保费" width="120" sortable />
<el-table-column prop="payoutDate" label="出账日(实)" width="120" sortable />
<el-table-column prop="remark" label="备注" width="120" sortable />
<el-table-column fixed="right" label="操作" min-width="120">
<template #default="{ row }">
<el-popover placement="right" :width="200" trigger="click">
<template #reference>
<el-icon>
<MoreFilled />
</el-icon>
</template>
<el-menu @select="handleSelect($event, row)" popper-class="custom-menu">
<el-menu-item
:index="item.value"
v-for="item in dropdownItems"
:key="item.value"
>{{ item.label }}</el-menu-item
>
</el-menu>
</el-popover>
</template>
</el-table-column>
</el-table>
</template>
</CommonPage>
<!-- 新增出账检核页面-->
<CommonDialog
dialogTitle="新增出账检核"
dialogWidth="80%"
:openDialog="addCheckRecordFormDialogFlag"
:showAction="true"
:showClose="true"
@close="addCheckRecordFormDialogFlag = false"
@confirm="addCheckRecordaddBatchapi"
>
<SearchForm
ref="addCheckRecordFormRef"
:config="addCheckRecordConfig"
v-model="addCheckRecordFormModel"
/>
</CommonDialog>
<!-- 导入出账检核页面 -->
<CommonDialog
dialogTitle="新增出账检核"
dialogWidth="80%"
:openDialog="importCheckRecordFlag"
:showAction="true"
:showClose="true"
@close="importCheckRecordFlag = false"
>
<FileUploadPreview
:header-row="0"
:required-fields="'amount,exchangeRate'"
:use-chinese-header="true"
:transform-submit-data="transformToBackend"
@submit="onSubmit"
/>
</CommonDialog>
<!-- 设置本期出账金额 -->
<CommonDialog
dialogTitle="设置本期出账金额"
dialogWidth="80%"
:openDialog="setPayoutAmountDialogFlag"
:showAction="true"
:showClose="true"
@close="setPayoutAmountDialogFlag = false"
@confirm="updatePayoutAmountapi"
>
<SearchForm
ref="setPayoutAmountFormRef"
:config="setPayoutAmountConfig"
v-model="setPayoutAmountFormModel"
/>
</CommonDialog>
</div>
</template>
<script setup>
import { ref, reactive } from 'vue'
import CommonPage from '@/components/commonPage'
import CommonDialog from '@/components/commonDialog'
import SearchForm from '@/components/SearchForm/SearchForm.vue'
import { ElMessage } from 'element-plus'
import { formatCurrency } from '@/utils/number'
// 接口
import {
getPolicyFortuneList,
addCheckRecordaddBatch,
updatePayoutAmount,
downloadPolicyFortuneAccount
} from '@/api/financial/commission'
import useUserStore from '@/store/modules/user'
import { loadDicts, getDictLabel } from '@/utils/useDict'
const userStore = useUserStore()
// 分页相关
const currentPage = ref(1)
const pageSize = ref(10)
const pageTotal = ref(0)
const loading = ref(false)
const selectedRow = ref(null)
const searchFormRef = ref(null)
const searchParams = ref({})
const searchConfig = ref([
{
type: 'input',
prop: 'policyNo',
label: '保单号'
},
{
type: 'select',
prop: 'statusList',
label: '出账状态',
multiple: true,
dictType: 'csf_fortune_status'
},
{
type: 'select',
prop: 'insuranceCompanyBizIdList',
label: '保险公司',
api: '/insurance/base/api/insuranceCompany/page',
keywordField: 'queryContent',
requestParams: { pageNo: 1, pageSize: 20 },
placeholder: '输入保险公司名称搜索',
debounceWait: 500, // 自定义防抖时间
multiple: true,
valueKey: 'insuranceCompanyBizId',
labelKey: 'abbreviation',
transform: res => {
console.log(res)
return res?.data.records || []
}
},
{
type: 'select',
prop: 'productLaunchBizIdList',
label: '产品计划',
api: '/product/api/relProjectProductLaunch/parameter/page',
keywordField: 'productName',
requestParams: {
tenantBizId: userStore.projectInfo.tenantBizId || '',
projectBizId: userStore.projectInfo.projectBizId || '',
fieldBizId: 'field_olk1qZe81qHHKXbw',
fieldValueBizId: 'field_value_uOfJH5ucA2YwJpbn',
pageNo: 1,
pageSize: 20
},
placeholder: '输入产品计划名称搜索',
debounceWait: 500, // 自定义防抖时间
multiple: true,
valueKey: 'productLaunchBizId',
labelKey: 'productName',
transform: res => {
return res?.data.records || []
}
},
{
type: 'daterange',
prop: 'payoutDate',
label: '出账日(估)',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间'
}
// {
// type: 'select',
// prop: 'status',
// label: '入账状态',
// multiple: true,
// dictType: 'csf_expected_commission_status'
// },
])
// 表格操作菜单
const dropdownItems = [
{ label: '设置本期出账金额', value: 'setPayRoll' }
// { label: '更新', value: 'editRecord' },
// { label: '查看记录', value: 'viewRecord' }
]
// 应收单类型
const fortuneBizTypeOptions = [
{ value: 'R', label: '关联保单应付单' },
{ value: 'U', label: '非关联保单应付单' }
]
// 应付单类型通过value转成label
const getFortuneBizTypeLabel = value => {
const item = fortuneBizTypeOptions.find(item => item.value === value)
return item?.label || ''
}
// 新增出账检核
const addCheckRecordFormModel = ref({})
const addCheckRecordFormRef = ref(null)
const addCheckRecordFormDialogFlag = ref(false)
const addCheckRecordConfig = [
{
type: 'select',
prop: 'fortuneBizType',
label: '应付单类型',
options: fortuneBizTypeOptions
},
{
type: 'select',
prop: 'status',
label: '出账状态',
dictType: 'csf_expected_fortune_status'
},
{
type: 'input',
prop: 'policyNo',
label: '关联保单号',
visible: formData => formData.fortuneBizType === 'R'
},
{
type: 'input',
prop: 'fortunePeriod',
label: '佣金期数',
inputType: 'decimal',
visible: formData => formData.fortuneBizType === 'R',
rules: [{ pattern: /^\d+$/, message: '只能输入正整数', trigger: 'blur' }]
},
{
type: 'input',
prop: 'fortuneTotalPeriod',
label: '总期数',
inputType: 'decimal',
visible: formData => formData.fortuneBizType === 'R',
rules: [{ pattern: /^\d+$/, message: '只能输入正整数', trigger: 'blur' }]
},
{
type: 'date',
prop: 'actualPayoutDate',
label: '出账日(实)',
placeholder: '请选择',
maxDate: 'today'
},
{
type: 'input',
prop: 'amount',
label: '出账金额',
inputType: 'decimal',
rules: [{ pattern: /^\d+$/, message: '只能输入正整数', trigger: 'blur' }]
},
{
type: 'select',
prop: 'currency',
label: '出账币种',
dictType: 'bx_currency_type'
},
{
type: 'select',
prop: 'fortuneType',
label: '出账项目',
dictType: 'csf_fortune_type'
},
{
type: 'select',
prop: 'brokerBizId',
label: '转介人',
api: '/insurance/base/api/userSaleExpand/page',
keywordField: 'realName',
requestParams: { pageNo: 1, pageSize: 20 },
placeholder: '输入转介人名称搜索',
debounceWait: 500, // 自定义防抖时间
valueKey: 'userSaleBizId',
labelKey: 'realName',
onChangeExtraFields: {
broker: 'realName', // 自动同步 raw.name 到 reconciliationCompany
reconciliationCompanyCode: 'code'
},
transform: res => {
return res?.data.records || []
}
}
]
// 设置本期出账金额
const setPayoutAmountFormModel = ref({})
const setPayoutAmountFormRef = ref(null)
const setPayoutAmountDialogFlag = ref(false)
const setPayoutAmountConfig = [
{
type: 'input',
prop: 'currentPaymentAmount',
label: '出账金额',
inputType: 'decimal',
rules: [{ pattern: /^\d+$/, message: '只能输入正整数', trigger: 'blur' }]
},
{
type: 'select',
prop: 'currency',
label: '出账币种',
dictType: 'bx_currency_type'
},
{
type: 'select',
prop: 'status',
label: '出账状态',
dictType: 'csf_expected_fortune_status'
}
]
// 统计信息
const statisticsData = ref({})
// 弹窗相关
const dialogFlag = ref(false)
// 按钮事件处理
const handleAdd = () => {
addCheckRecordFormDialogFlag.value = true
}
const handleExport = () => {
ElMessage.info('点击导出按钮')
}
const handleReset = () => {
// 重置搜索表单
searchFormRef.value.resetForm()
console.log('表单已重置')
}
const handleQuery = async () => {
const params = searchFormRef.value.getFormData()
loadTableData(params)
}
const visibleDefaultButtons = ref(['add', 'import', 'export', 'reset', 'query'])
// 按钮配置
const operationBtnList = ref([
{
key: 'add',
direction: 'left',
label: '新增出账',
click: handleAdd
},
{
key: 'export',
direction: 'right',
click: handleExport
},
{
key: 'reset',
direction: 'right',
click: handleReset
},
{
key: 'query',
direction: 'right',
click: handleQuery
}
])
// 加载表格数据
const loadTableData = async (searchParams = {}) => {
loading.value = true
try {
const params = {
pageNo: currentPage.value,
pageSize: pageSize.value,
...searchParams,
payoutDateStart: searchParams.payoutDate?.[0] || undefined,
payoutDateEnd: searchParams.payoutDate?.[1] || undefined,
payoutDate: undefined
}
const res = await getPolicyFortuneList(params)
tableData.value = res.data.page.records || []
pageTotal.value = res.data.page.total || 0
pageSize.value = res.data.page.size || 0
// 统计信息
statisticsData.value = res.data.statisticsVO || {}
} catch (error) {
console.error('加载数据失败:', error)
ElMessage.error(error.message || '加载数据失败')
} finally {
loading.value = false
}
}
loadTableData()
// 分页事件
const handleSizeChange = val => {
pageSize.value = val
loadTableData()
}
const handleCurrentChange = val => {
currentPage.value = val
loadTableData()
}
// 表格数据
const tableData = ref([])
const handleSelect = (e, row) => {
console.log('选中行:', e, row)
selectedRow.value = row
if (e === 'setPayRoll') {
setPayoutAmountDialogFlag.value = true
}
}
const addCheckRecordaddBatchapi = async data => {
const formData = addCheckRecordFormRef.value.getFormData()
console.log('新增出账检核记录:', formData)
const params = [{ ...formData }]
try {
const res = await addCheckRecordaddBatch(params)
if (res.code === 200) {
ElMessage.success('新增出账检核记录成功')
addCheckRecordFormDialogFlag.value = false
addCheckRecordFormRef.value.resetForm()
loadTableData()
} else {
ElMessage.error(res.msg || '新增出账检核记录失败')
}
} catch (error) {
console.error('新增出账检核记录失败:', error)
ElMessage.error(error.message || '新增出账检核记录失败')
}
}
// 设置本期出账金额
const updatePayoutAmountapi = async data => {
console.log('设置本期出账金额:', data)
const params = {
...setPayoutAmountFormRef.value.getFormData(),
fortuneBizId: selectedRow.value.fortuneBizId
}
try {
const res = await updatePayoutAmount(params)
if (res.code === 200) {
ElMessage.success('设置本期出账金额成功')
loadTableData()
} else {
ElMessage.error(res.msg || '设置本期出账金额失败')
}
} catch (error) {
console.error('设置本期出账金额失败:', error)
ElMessage.error(error.message || '设置本期出账金额失败')
}
}
const updatePayRollStatusDisable = ref(true)
const multipleSelection = ref([])
const handleSelectionChange = val => {
multipleSelection.value = val
console.log('全选:', val)
// 完成检核按钮是否禁用
updatePayRollStatusDisable.value = val.length === 0
}
const downloadPolicyFortuneAccountapi = async data => {
console.log('生成出账清单:', data)
try {
const res = await downloadPolicyFortuneAccount({
fortuneBizIdList: multipleSelection.value.map(item => item.fortuneBizId)
})
if (res.code === 200) {
ElMessage.success('完成检核,等待关账')
loadTableData()
}
} catch (error) {
console.error('检核失败:', error)
ElMessage.error(error.response?.data?.msg || '检核失败')
}
}
import FileUploadPreview from '@/components/fileUploadPreview/fileUploadPreview.vue'
const importCheckRecordFlag = ref(false)
// 如果后端接收的就是当前格式,可直接透传
const formatForBackend = rows => {
return rows.map(row => ({
...row,
amount: Number(row.amount) || 0,
exchangeRate: Number(row.exchangeRate) || 1
}))
}
const onSubmit = data => {
console.log('提交给后端的数据:', data)
// 调用保存 API
}
// 获取入账状态,字典值转化方法
onMounted(async () => {
try {
await loadDicts(['csf_fortune_status'])
} catch (error) {
console.error('字典加载失败', error)
} finally {
loading.value = false
}
})
</script>
<style scoped>
.tableOptionContainer {
display: flex;
justify-content: flex-end;
margin-top: 10px;
}
</style>
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