Commit dd62730e by yuzhenWang

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

修改预约表单得bug发布生产

See merge request !65
parents 6d36ec4c 6e52f6ca
......@@ -27,7 +27,7 @@ import elementIcons from '@/components/SvgIcon/svgicon'
import './permission' // permission control
import { useDict, useDictLists } from '@/utils/dict'
import { useDict, useDictLists,useDictLists1 } from '@/utils/dict'
import { getConfigKey } from '@/api/system/config'
import {
parseTime,
......@@ -58,6 +58,7 @@ const app = createApp(App)
// 全局方法挂载
app.config.globalProperties.useDict = useDict
app.config.globalProperties.useDictLists = useDictLists
app.config.globalProperties.useDictLists1 = useDictLists1
app.config.globalProperties.download = download
app.config.globalProperties.parseTime = parseTime
app.config.globalProperties.getNowTime = getNowTime
......
......@@ -53,3 +53,32 @@ export function useDictLists(typeLists) {
})
})()
}
/**
* 获取多个字典数据 返回promise
*/
export function useDictLists1(typeLists) {
const params = { typeList: typeLists }
console.log(params)
// 返回 Promise,以便调用方可以 await
return getMoreDicts(params).then(resp => {
if (resp.code === 200) {
const dictArray = resp.data.map(item => {
item.dictItemList.forEach(dict => {
dict.label = dict.itemLabel
if (item.dictType === 'sys_no_yes') {
dict.value = Number(dict.itemValue)
} else {
dict.value = dict.itemValue
}
})
return item
})
useDictStore().setDictTypeLists(dictArray)
return dictArray // 可选:返回数据供后续使用
} else {
// 可选:抛出错误便于 catch
throw new Error('获取字典数据失败')
}
})
}
......@@ -469,6 +469,7 @@ const emit = defineEmits(['handleSuccess'])
const { proxy } = getCurrentInstance()
const tempPolicyholderDom = ref([]) //投保人dom
const tempInsurantDom = ref([]) //受保人dom
const tempCustomerDom = ref([]) //受保人dom
const customerRightRef = ref(null)
const showPhoneDrawer = ref(false) //电话抽屉开关
const showAddressDrawer = ref(false) //地址抽屉开关
......@@ -1566,6 +1567,7 @@ const anchorList = computed(() => {
})
const policyholderForm = ref({}) //投保人表单值
const insuredForm = ref({}) //受保人表单值
const customerForm = ref({}) //投保人表单值
watch(
() => form.value,
newVal => {
......@@ -1573,6 +1575,8 @@ watch(
policyholderForm.value = JSON.parse(JSON.stringify(newVal))
} else if (props.activeName == 'insurantInfo') {
insuredForm.value = JSON.parse(JSON.stringify(newVal))
} else if (props.activeName == 'customer') {
customerForm.value = JSON.parse(JSON.stringify(newVal))
}
},
{ immediate: true, deep: true }
......@@ -1584,6 +1588,8 @@ watch(
tempPolicyholderDom.value = JSON.parse(JSON.stringify(newVal))
} else if (props.activeName == 'insurantInfo') {
tempInsurantDom.value = JSON.parse(JSON.stringify(newVal))
} else if (props.activeName == 'customer') {
tempCustomerDom.value = JSON.parse(JSON.stringify(newVal))
}
},
{ immediate: true, deep: true }
......@@ -1593,25 +1599,23 @@ watch(
(newVal, oldVal) => {
editStatus.value = false
customerRightRef.value = null
// || newVal === 'policyholder' || newVal === 'insurantInfo'
if (newVal === 'customer') {
if (JSON.stringify(customerForm.value) != '{}') {
form.value = JSON.parse(JSON.stringify(customerForm.value))
processedCustomerData.value = JSON.parse(JSON.stringify(tempCustomerDom.value))
return
} else {
processFormData()
}
// processFormData()
// 因为客户资料里的编辑状态是单独控制的
if (props.tabSource == 'customer' && props.customerBizId) {
editStatus.value = true
} else if (props.tabSource == 'customer' && !props.customerBizId) {
editStatus.value = false
}
// if (newVal === 'policyholder' || newVal === 'insurantInfo') {
// editStatus.value = props.fatherEditStatus
// }
}
// 切换tab要保存各自的表单值
// if (oldVal == 'policyholder') {
// policyholderForm.value = JSON.parse(JSON.stringify(form.value))
// } else if (oldVal == 'insurantInfo') {
// insuredForm.value = JSON.parse(JSON.stringify(form.value))
// }
if (newVal === 'policyholder') {
editStatus.value = props.fatherEditStatus
if (JSON.stringify(policyholderForm.value) != '{}') {
......
......@@ -420,11 +420,10 @@ const handleRemoteSelectChange = async (row, column, father) => {
}
}
if (column.prop == 'insuranceType' && row.insuranceType) {
// 改变险种的时候逻辑还未处理
//如果险种选择了重疾险,则显示重疾险的输入框
row.insuranceTypeOption.forEach(item => {
if (item.value == row.insuranceType) {
if (item.code == 'CI') {
if (item.code == 'CATEGORY5934890141') {
row.showSumInsured = true
} else {
row.showSumInsured = false
......@@ -756,7 +755,7 @@ const setFormValue = (obj, formData) => {
if (section.keyType == 'Array') {
if (section.key == 'existingSecurityOwner' && obj[section.key]) {
obj[section.key].forEach(item => {
if (item.insuranceCategoryBizId == 'CI') {
if (item.insuranceCategoryBizId == 'CATEGORY5934890141') {
item.showSumInsured = true
}
})
......
......@@ -371,40 +371,7 @@ function handleUpdate(row) {
}
getList()
// 请求一下字典值方便表单回显
if (dictStore.dictTypeLists.length == 0) {
proxy.useDictLists([
'csf_employment',
'sys_no_yes',
'bx_currency_type',
'csf_liquid_asset_type',
'csf_premium_funding_source',
'csf_customer_type',
'csf_customer_title',
'sys_gender',
'csf_marriage',
'csf_education',
'csf_id_type',
'csf_ap_apply_type',
'csf_ap_meeting_point',
'csf_ap_first_issue',
'csf_ap_dividend',
'csf_ap_frequency',
'csf_ap_rel',
'csf_ap_registration',
'csf_ap_exercise',
'csf_ap_risk',
'csf_ap_movie',
'csf_ap_game',
'csf_ap_policy_transfer',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_status',
'md_bank',
'oss_data_type',
'oss_data_person'
])
}
</script>
<style lang="scss" scoped>
.bottomBtn {
......
......@@ -39,7 +39,7 @@
>取消预约</el-button
>
</div>
<div v-else-if="appointmentSummeryInfo.status !== '2'" style="margin-right: 10px">
<div v-else-if="appointmentSummeryInfo.status !== '2'">
<el-button
v-if="pageSource !== 'policyList' && editStatus"
type="primary"
......@@ -71,7 +71,11 @@
>
</div>
<el-button v-if="idsObj.appointmentBizId" type="primary" @click="assetVerification"
<el-button
style="margin-left: 10px"
v-if="idsObj.appointmentBizId"
type="primary"
@click="assetVerification"
>投保人资产验证</el-button
>
<el-button v-if="idsObj.appointmentBizId" type="primary" @click="assetVerification"
......@@ -112,7 +116,11 @@
@click="handleSubmit('storage')"
>暂存</el-button
>
<el-button v-if="idsObj.appointmentBizId" type="primary" @click="assetVerification"
<el-button
style="margin-left: 10px"
v-if="idsObj.appointmentBizId"
type="primary"
@click="assetVerification"
>投保人资产验证</el-button
>
<el-button v-if="idsObj.appointmentBizId" type="primary" @click="assetVerification"
......@@ -744,37 +752,37 @@ function getCustomerInfo(customerBizId) {
}
// 获取各个流程所需要得字典数据
const getDictsData = async () => {
proxy.useDictLists([
'csf_employment',
'sys_no_yes',
'bx_currency_type',
'csf_liquid_asset_type',
'csf_premium_funding_source',
'csf_customer_type',
'csf_customer_title',
'sys_gender',
'csf_marriage',
'csf_education',
'csf_id_type',
'csf_ap_apply_type',
'csf_ap_meeting_point',
'csf_ap_first_issue',
'csf_ap_dividend',
'csf_ap_frequency',
'csf_ap_rel',
'csf_ap_registration',
'csf_ap_exercise',
'csf_ap_risk',
'csf_ap_movie',
'csf_ap_game',
'csf_ap_policy_transfer',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_status',
'md_bank',
'oss_data_type',
'oss_data_person'
])
// proxy.useDictLists([
// 'csf_employment',
// 'sys_no_yes',
// 'bx_currency_type',
// 'csf_liquid_asset_type',
// 'csf_premium_funding_source',
// 'csf_customer_type',
// 'csf_customer_title',
// 'sys_gender',
// 'csf_marriage',
// 'csf_education',
// 'csf_id_type',
// 'csf_ap_apply_type',
// 'csf_ap_meeting_point',
// 'csf_ap_first_issue',
// 'csf_ap_dividend',
// 'csf_ap_frequency',
// 'csf_ap_rel',
// 'csf_ap_registration',
// 'csf_ap_exercise',
// 'csf_ap_risk',
// 'csf_ap_movie',
// 'csf_ap_game',
// 'csf_ap_policy_transfer',
// 'wj_question_first_category',
// 'wj_question_second_category',
// 'csf_ap_status',
// 'md_bank',
// 'oss_data_type',
// 'oss_data_person'
// ])
if (route.query.source == 'policyList') {
const params4 = {
pageNo: 1,
......@@ -886,9 +894,10 @@ const getDictsData = async () => {
dictStore.setSignPeopleList(response7.data.records)
}
}
// 获取下拉框所需要得数据
// 获取下拉框所需要的数据
const getDictsLabelData = async () => {
proxy.useDictLists([
await proxy.useDictLists1([
'csf_employment',
'sys_no_yes',
'bx_currency_type',
......@@ -1128,11 +1137,11 @@ if (route.query.appointmentNo && route.query.source == 'appointmentList') {
processInfo.value = route.query
idsObj.value.appointmentBizId = route.query.appointmentBizId
getDictsData()
// getDictsLabelData()
setTimeout(() => {
// 请求预约单聚合详情
;(async () => {
await getDictsLabelData()
// 字典加载完成后再请求详情
getAppointmentInfo(idsObj.value.appointmentBizId, true)
}, 500)
})()
}
const pageSource = computed(() => {
return props.source || route.query.source
......
......@@ -586,40 +586,7 @@ function handleUpdate(row, type) {
}
getList()
// 请求一下字典值方便表单回显
if (dictStore.dictTypeLists.length == 0) {
proxy.useDictLists([
'csf_employment',
'sys_no_yes',
'bx_currency_type',
'csf_liquid_asset_type',
'csf_premium_funding_source',
'csf_customer_type',
'csf_customer_title',
'sys_gender',
'csf_marriage',
'csf_education',
'csf_id_type',
'csf_ap_apply_type',
'csf_ap_meeting_point',
'csf_ap_first_issue',
'csf_ap_dividend',
'csf_ap_frequency',
'csf_ap_rel',
'csf_ap_registration',
'csf_ap_exercise',
'csf_ap_risk',
'csf_ap_movie',
'csf_ap_game',
'csf_ap_policy_transfer',
'wj_question_first_category',
'wj_question_second_category',
'csf_ap_status',
'md_bank',
'oss_data_type',
'oss_data_person'
])
}
</script>
<style lang="scss" scoped>
.app-container {
......
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