Commit e42dc030 by yuzhenWang

Merge branch 'test' into 'dev'

Test

See merge request !101
parents 769c83d5 7a3d422b
......@@ -21,17 +21,19 @@
"@element-plus/icons-vue": "^2.3.1",
"@vueup/vue-quill": "1.2.0",
"@vueuse/core": "13.3.0",
"ali-oss": "^6.23.0",
"axios": "1.9.0",
"clipboard": "2.0.11",
"dayjs": "^1.11.18",
"echarts": "5.6.0",
"element-plus": "^2.9.9",
"element-plus": "^2.13.5",
"file-saver": "2.0.5",
"fuse.js": "6.6.2",
"js-beautify": "1.14.11",
"js-cookie": "3.0.5",
"jsencrypt": "3.3.2",
"nprogress": "0.2.0",
"p-limit": "^7.3.0",
"pinia": "3.0.2",
"spark-md5": "^3.0.2",
"splitpanes": "^4.0.4",
......
import request from '@/utils/request'
// 修改上传图片方法,添加正确的请求配置
export function uploadImage(data) {
console.log('data', data)
......@@ -168,9 +167,9 @@ export function uploadMaterialList(data) {
})
}
// 删除上传文件
export function delUploadFile(fileBizId) {
export function delUploadFile(fileBizId,projectBizId) {
return request({
url: `/oss/api/ossFile/del?fileBizId=${fileBizId}`,
url: `/oss/api/ossFile/del?fileBizId=${fileBizId}&projectBizId=${projectBizId}`,
method: 'delete'
})
}
......@@ -221,3 +220,19 @@ export function insuranceReconciliationCompany(data) {
method: 'post'
})
}
// 获取STS凭证
export function getStstoken(projectBizId) {
return request({
url: `/oss/api/sts/sts-token?projectBizId=${projectBizId}`,
method: 'get'
})
}
// 大文件分片上传接口
export function batchSaveFiles(data) {
return request({
url: '/oss/api/sts/batch/save/files',
data: data,
method: 'post'
})
}
......@@ -627,6 +627,9 @@ const handleAppendInput = child => {
const handleInputChange = (val, child) => {
let newVal = numberFormat(val, child)
form.value[child.key] = newVal
if (child.key == 'nameCn' && !form.value['nameCn']) {
form.value['namePyEn'] = ''
}
}
const handleInputBlur = child => {
if (
......@@ -755,7 +758,9 @@ const handleDateChange = child => {
let age = null
if (child.key == 'birthday') {
age = calculateExactAge(proxy.formatToDate(form.value.birthday))
if (age >= 18) {
if (age >= 18 && props.activeName !== 'insurantInfo') {
form.value.age = age
} else if (props.activeName == 'insurantInfo') {
form.value.age = age
}
}
......@@ -1120,7 +1125,7 @@ const setFormValue = (obj, formData, exportValue) => {
// 深拷贝原始数据
form.value = JSON.parse(JSON.stringify(obj))
// 新增预约,是受保人,与投保人关系默认值是本人
if (props.activeName == 'insurantInfo' && !props.idsObj.appointmentBizId) {
if (props.activeName == 'insurantInfo' && !props.idsObj.appointmentBizId && !exportValue) {
form.value['policyholderRel'] = 'MYSELF'
}
// 深拷贝原始数据
......@@ -1269,7 +1274,10 @@ const setFormValue = (obj, formData, exportValue) => {
} else {
form.value.age = null
}
// 使用历史客户导入的,要保持原来的与投保人关系的值
if (exportValue) {
form.value['policyholderRel'] = oldObjInfo.value['policyholderRel']
}
phoneQuickList.value = removeDuplicates(tempPhoneList, 'phoneString')
addressQuickList.value = removeDuplicates(tempAddressList, 'addressString')
if (addressQuickList.value.length > 0) {
......@@ -1398,6 +1406,18 @@ const handleFormValues = source => {
//处理表单数据
for (const key1 in form.value) {
if (key1 == 'nameCn' && submitObj[key1]) {
if (submitObj[key1].length < 2) {
errorFields.value.push({
message: `${tipName}-名字至少为2个字符`
})
}
if (submitObj[key1].length > 6) {
errorFields.value.push({
message: `${tipName}-名字长度不能超过6个字符`
})
}
}
for (const key2 in saveKey.value) {
//要判断drawerType
switch (saveKey.value[key2].objType) {
......
......@@ -12,7 +12,7 @@
<span class="iconfont icon-yanqiweiwancheng"></span>
<span
>{{ parseTime(processInfo.createTime) }}{{
processInfo.customerName || '--'
processInfo.userBizId || '--'
}}创建</span
>
</div>
......@@ -321,7 +321,7 @@ const getDictsData = async () => {
projectBizId: userStore.projectInfo.projectBizId,
tenantBizId: userStore.projectInfo.tenantBizId,
fieldBizId: 'field_olk1qZe81qHHKXbw',
fieldValueBizId: 'field_value_yXzTigvgUdRMFpoR'
fieldValueBizId: 'field_value_yXzTigvgUdRMFpoR',
}
const response6 = await secondAdditonalList(params6)
if (response6.code == 200) {
......
......@@ -695,27 +695,6 @@ const handleFileChange = async file => {
return false // 阻止自动上传
}
const execlUpload = () => {
// exprotLoading.value = true
// let data = {
// // appointmentBizId: idsObj.value.appointmentBizId,
// file: currentFile.value
// }
// try {
// if (currentFile.value) {
// uploadExcel(data).then(res => {
// if (res.code == 200) {
// proxy.$message.success('预约导入成功')
// execlDialog.value = false
// exprotLoading.value = false
// }
// })
// }
// } catch (error) {
// proxy.$message.error(error.message)
// exprotLoading.value = false
// }
}
// 获取预约详情
function getAppointmentInfo(appointmentBizId, changeTab) {
getAppointmentDetail(appointmentBizId).then(res => {
......@@ -1061,8 +1040,9 @@ const handleSubmit = async type => {
if (type == 'submit') {
submitLoading.value = true
// 新增预约单
addAppointment(submitAppointmentObj.value).then(res => {
if (res.code == 200) {
try {
const res = await addAppointment(submitAppointmentObj.value)
if (res.code === 200) {
submitLoading.value = false
proxy.$message.success('预约成功')
editStatus.value = false
......@@ -1071,10 +1051,15 @@ const handleSubmit = async type => {
type: 'add'
})
} else {
console.log('出错了', res)
submitLoading.value = false
}
})
} catch (error) {
console.error('新增请求异常:', error)
submitLoading.value = false
}
}
return
}
// 代表修改预约单 因为编辑暂存也会有预约id
if (idsObj.value.appointmentBizId && type == 'submit') {
......@@ -1084,7 +1069,18 @@ const handleSubmit = async type => {
}
submitLoading.value = true
// 编辑预约单
editAppointmentDetail(submitAppointmentObj.value).then(res => {
// editAppointmentDetail(submitAppointmentObj.value).then(res => {
// if (res.code == 200) {
// submitLoading.value = false
// editStatus.value = true
// getAppointmentInfo(idsObj.value.appointmentBizId)
// proxy.$message.success('修改预约单成功')
// } else {
// submitLoading.value = false
// }
// })
try {
const res = await editAppointmentDetail(submitAppointmentObj.value)
if (res.code == 200) {
submitLoading.value = false
editStatus.value = true
......@@ -1093,7 +1089,11 @@ const handleSubmit = async type => {
} else {
submitLoading.value = false
}
})
} catch (error) {
console.error('修改请求异常:', error)
submitLoading.value = false
}
return
}
// 新增预约暂存
if (type == 'storage') {
......@@ -1103,7 +1103,17 @@ const handleSubmit = async type => {
submitAppointmentObj.value.apiAppointmentInfoDto.fnaNo = props.processDetail.fnaNo
submitLoading.value = true
// 暂存预约单
storageAppointment(submitAppointmentObj.value).then(res => {
// storageAppointment(submitAppointmentObj.value).then(res => {
// if (res.code == 200) {
// submitLoading.value = false
// proxy.$message.success('预约暂存成功')
// router.push({ path: '/sign/appointment' })
// } else {
// submitLoading.value = false
// }
// })
try {
const res = await storageAppointment(submitAppointmentObj.value)
if (res.code == 200) {
submitLoading.value = false
proxy.$message.success('预约暂存成功')
......@@ -1111,13 +1121,28 @@ const handleSubmit = async type => {
} else {
submitLoading.value = false
}
})
} catch (error) {
console.error('暂存请求异常:', error)
submitLoading.value = false
}
}
// 编辑状态下预约暂存
if (type == 'editStorage') {
submitLoading.value = true
// 暂存预约单
appointmentEditStorage(submitAppointmentObj.value).then(res => {
// appointmentEditStorage(submitAppointmentObj.value).then(res => {
// if (res.code == 200) {
// submitLoading.value = false
// proxy.$message.success('预约暂存提交成功')
// editStatus.value = true
// getAppointmentInfo(idsObj.value.appointmentBizId)
// } else {
// submitLoading.value = false
// }
// })
try {
const res = await appointmentEditStorage(submitAppointmentObj.value)
if (res.code == 200) {
submitLoading.value = false
proxy.$message.success('预约暂存提交成功')
......@@ -1126,7 +1151,10 @@ const handleSubmit = async type => {
} else {
submitLoading.value = false
}
})
} catch (error) {
console.error('预约暂存请求异常:', error)
submitLoading.value = false
}
}
}
const handleEdit = () => {
......
......@@ -867,7 +867,7 @@ const viewHistory = () => {
}
const handleTableSelectChange = (father, row, key) => {
searchOptions.value[key].forEach(item => {
console.log('item', item)
// console.log('item', item)
if (row[key] == item.value) {
row[key] = item.label
// row.userBizId = item.userBizId
......@@ -879,7 +879,10 @@ const handleTableSelectChange = (father, row, key) => {
row.email = item.email
row.cardType = item.cardType
} else if (key == 'realName') {
// console.log('转介人',item)
row.userSaleBizId = item.value
row.phone = item.phone
row.email = item.email
} else if (key == 'contractingCompanyName') {
row.contractingCompanyId = item.value
}
......@@ -963,7 +966,7 @@ const searchSelectList = async (query, key) => {
} else if (key == 'realName') {
const params5 = {
pageNo: 1,
pageSize: 10,
pageSize: 999,
realName: queryString
}
const response5 = await getUserSaleExpandList(params5)
......@@ -980,7 +983,7 @@ const searchSelectList = async (query, key) => {
} else if (key == 'name') {
const params5 = {
pageNo: 1,
pageSize: 10,
pageSize: 999,
realName: queryString
}
const response5 = await getAllSignList(params5)
......
......@@ -57,13 +57,13 @@
@click="handleUpdate(scope.row)"
>查看</el-button
>
<el-button
<!-- <el-button
v-if="props.pageSource !== 'policyList'"
type="danger"
link
@click="handleDetele(scope.row)"
>删除</el-button
>
> -->
</template>
</el-table-column>
</el-table>
......@@ -85,6 +85,7 @@
<div class="fileUploadBox">
<el-upload
:action="uploadImgUrl"
:data="{ projectBizId: userStore.projectInfo.projectBizId }"
:headers="headers"
multiple
:limit="limit"
......@@ -138,6 +139,8 @@ import CardOne from '@/components/formCard/cardOne'
import { getToken } from '@/utils/auth'
import { addFile, getAppointmentFile, delFile, editAppointmentFile } from '@/api/sign/appointment'
import useDictStore from '@/store/modules/dict'
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
import {
uploadMaterialList,
delUploadFile,
......@@ -395,7 +398,7 @@ const uploadSuccess = (res, file, fileList) => {
// 删除已上传的文件(仅从列表移除,不调用后端删除)
const removeUploadedFile = (file, index) => {
try {
delUploadFile(file.fileBizId).then(response => {
delUploadFile(file.fileBizId, userStore.projectInfo.projectBizId).then(response => {
uploadedFiles.value.splice(index, 1)
})
} catch (error) {
......
......@@ -38,7 +38,7 @@
:type="child.inputType"
v-model="form[father.key][child.key]"
:placeholder="child.placeholder"
:maxlength="child.maxlength|| 50"
:maxlength="child.maxlength || 50"
:disabled="editStatus"
:style="{ width: child.inputWidth ? child.inputWidth : '100%' }"
@input="val => handleInputChange(val, child, father)"
......@@ -310,7 +310,7 @@ const data = reactive({
dialogForm: {},
queryParams: {
pageNo: 1,
pageSize: 4,
pageSize: 10,
name: undefined
}
})
......@@ -463,6 +463,7 @@ const handleSearchSelectChange = (father, key) => {
}
form.value['apiProductPlanMainInfoDto']['insuranceTypeName'] = item.label
form.value['apiProductPlanMainInfoDto']['insuranceTypeId'] = item.value
form.value['apiProductPlanMainInfoDto']['insuranceTypeCode'] = item.code
}
})
}
......@@ -497,7 +498,7 @@ const searchSelectList = async (query, fieldKey) => {
loginTenantBizId: userStore.projectInfo.tenantBizId,
productName: query.trim(),
pageNo: 1,
pageSize: 10
pageSize: 999
}
const response = await getInsuranceProductList(params)
......@@ -517,16 +518,21 @@ const searchSelectList = async (query, fieldKey) => {
const params = {
productName: query.trim(),
pageNo: 1,
pageSize: 10,
pageSize: 999,
projectBizId: userStore.projectInfo.projectBizId,
tenantBizId: userStore.projectInfo.tenantBizId,
fieldBizId: 'field_olk1qZe81qHHKXbw',
fieldValueBizId:
fieldKey === 'productLaunchName'
? 'field_value_yXzTigvgUdRMFpoR'
: 'field_value_uOfJH5ucA2YwJpbn'
: 'field_value_uOfJH5ucA2YwJpbn',
categoryCodeList: form.value.apiProductPlanMainInfoDto.insuranceTypeCode
? [form.value.apiProductPlanMainInfoDto.insuranceTypeCode]
: [],
insuranceCompanyBizIdList: form.value.apiProductPlanMainInfoDto.companyId
? [form.value.apiProductPlanMainInfoDto.companyId]
: []
}
const response = await secondAdditonalList(params)
if (response.code == 200) {
response.data.records = response.data.records.map(item => {
......@@ -541,7 +547,7 @@ const searchSelectList = async (query, fieldKey) => {
} else if (fieldKey === 'companyName') {
const params9 = {
pageNo: 1,
pageSize: 10,
pageSize: 999,
queryContent: query.trim()
}
const response9 = await getInsuranceCompany(params9)
......@@ -566,7 +572,7 @@ const searchSelectList = async (query, fieldKey) => {
}
const params1 = {
pageNo: 1,
pageSize: 10,
pageSize: 999,
name: query.trim()
}
const response1 = await getInsuranceCategory(params1)
......@@ -583,7 +589,7 @@ const searchSelectList = async (query, fieldKey) => {
} else if (fieldKey == 'reconciliationCompanyName') {
const params1 = {
pageNo: 1,
pageSize: 10,
pageSize: 999,
name: query.trim()
}
const response1 = await insuranceReconciliationCompany(params1)
......
......@@ -523,7 +523,7 @@ const affirmConfig = [
{
type: 'date',
prop: 'policyExpirationDate',
label: '保单截日',
label: '保单截日',
placeholder: '请选择',
// maxDate: 'today',
visible: formData =>
......@@ -582,6 +582,7 @@ const confirmAffirm = async () => {
currentRow.value = {}
}
} catch (error) {
settingAffirmLoading.value = false
console.error('加载数据失败:', error)
ElMessage.error('必填项不能为空' || '认定失败')
}
......
......@@ -423,8 +423,8 @@ const loadTableData = async () => {
// 表格操作菜单
const dropdownItems = [
{ label: '查看详情', value: 'viewDetail' },
{ label: '更新数据', value: 'updateData' },
{ label: '查看保单详情', value: 'viewDetail' },
{ label: '补充保单信息', value: 'updateData' },
{ label: '生成签单报告', value: 'generateReport' },
{ label: '设置新单状态', value: 'setNewSingleStatus' },
// { label: '查看关联', value: 'viewRelated' },
......
......@@ -157,18 +157,34 @@
/>
<el-table-column fixed="right" label="操作" min-width="120">
<template #default="scope">
<el-popconfirm title="确定删除吗?" @confirm="deleteFile(scope.row)">
<template #reference>
<el-button
<div style="display: flex; gap: 8px;">
<!-- 👇 新增:查看按钮 -->
<!-- <el-button
link
type="danger"
type="primary"
size="small"
:disabled="props.mode === 'viewDetail'"
@click="viewFile(scope.row)"
:disabled="!scope.row.fileUrl"
>
删除
</el-button>
</template>
</el-popconfirm>
查看
</el-button> -->
<!-- 原有:删除按钮 (带确认框) -->
<el-popconfirm title="确定删除吗?" @confirm="deleteFile(scope.row)">
<template #reference>
<el-button
link
type="danger"
size="small"
:disabled="props.mode === 'viewDetail'"
>
删除
</el-button>
</template>
</el-popconfirm>
</div>
</template>
</el-table-column>
</el-table>
......@@ -189,13 +205,20 @@
dialogTitle="文件导入"
dialogWidth="80%"
:openDialog="fileUploadDialogFlag"
:showAction="true"
:showAction="false"
:showClose="true"
@close="((fileUploadDialogFlag = false), (files = ''))"
@confirm="((fileUploadDialogFlag = false), (files = ''))"
@close="handleDialogClose"
>
<!-- <FileUploader/> -->
<FileUpload
<FileUploader
:tenant-biz-id="userStore.projectInfo.tenantBizId"
:project-biz-id="userStore.projectInfo.projectBizId"
:object-biz-id="props.policyBizId"
:object-type="'DOCUMENT'"
:project-type="'pc'"
:upload-concurrency="3"
ref="uploaderRef"
/>
<!-- <FileUpload
v-model="files"
:data="{ obiectTableName: 'policy_follow', objectBizId: props.policyBizId }"
:file-type="['xlsx', 'xls', 'doc', 'docx', 'pdf', 'txt', 'jpg', 'jpeg', 'png', 'gif']"
......@@ -204,7 +227,7 @@
:fileSize="15"
:name="'files'"
@uploadEnd="handleUploadEnd"
/>
/> -->
</CommonDialog>
</div>
</template>
......@@ -266,7 +289,17 @@ const props = defineProps({
default: ''
}
})
const uploaderRef = ref(null);
// 【关键】当弹窗关闭时,强制清空上传组件列表
const handleDialogClose = () => {
if (uploaderRef.value) {
// 调用子组件暴露的清空方法
// 你需要在子组件中使用 defineExpose 暴露 clearList 方法
uploaderRef.value.clearList();
fileUploadDialogFlag.value = false
getAttachmentListDetail(props.policyBizId)
}
};
const emit = defineEmits(['update:modelValue', 'submit', 'cancel', 'saveRow'])
const introducerTableData = ref([])
......@@ -656,7 +689,7 @@ const basicPlanFormConfig = ref([
valueKey: 'productName',
labelKey: 'productName',
transform: res => {
console.log('======子组件选择选项后,父组件接收的值产品名称:', res?.data.records || [])
// console.log('======子组件选择选项后,父组件接收的值产品名称:', res?.data.records || [])
return res?.data.records || []
},
onChangeExtraFields: {
......@@ -896,7 +929,7 @@ const attachmentTableColumns = ref([
prop: 'originalName',
label: '文件名',
sortable: true,
width: '150',
width: '300',
formatter: row => row.originalName || '-'
},
{
......@@ -910,8 +943,8 @@ const attachmentTableColumns = ref([
prop: 'createTime',
label: '上传时间',
sortable: true,
width: '150',
formatter: row => row.createTime || '-'
width: '200',
formatter: row => formatToDateTime(row.createTime || '-')
},
{
prop: 'creatorName',
......@@ -1100,7 +1133,7 @@ const handleCancel = () => {
const deleteFile = (row)=>{
console.log(row)
const fileBizId = row.fileBizId || '';
delUploadFile(fileBizId).then(res=>{
delUploadFile(fileBizId,userStore.projectInfo.projectBizId).then(res=>{
console.log(res)
if(res.code===200){
getAttachmentListDetail(props.policyBizId)
......
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