diff --git a/src/api/common/api.ts b/src/api/common/api.ts index 90d7180..4b3f8f9 100644 --- a/src/api/common/api.ts +++ b/src/api/common/api.ts @@ -22,6 +22,7 @@ enum Api { getMediaUrlByOrgCode = '/sys/api/getMediaUrlByOrgCode', uploadPre = '/sys/common/upload/pre', queryUpBizPrefix = '/api/sysUtils/queryUpBizPrefix', + getManyDictItems = '/sys/api/getManyDictItems', } /** @@ -218,3 +219,21 @@ export const uploadPre = (params) => { export const queryUpBizPrefix = () => { return defHttp.get({ url: Api.queryUpBizPrefix }, { isTransformResponse: false }); }; + +/** + * 查询字典项 + * @param params + */ +export const getManyDictItems = (params) => { + // 处理数组参数 + if (params && params.dictCodeList && Array.isArray(params.dictCodeList)) { + const query = params.dictCodeList.map((code) => `dictCodeList=${encodeURIComponent(code)}`).join('&'); + return defHttp.get( + { + url: `${Api.getManyDictItems}?${query}`, + }, + { isTransformResponse: false } + ); + } + return defHttp.get({ url: Api.getManyDictItems, params }, { isTransformResponse: false }); +}; diff --git a/src/views/elder/elderinfo/ElderInfo.api.ts b/src/views/elder/elderinfo/ElderInfo.api.ts index 45075e8..e24afd9 100644 --- a/src/views/elder/elderinfo/ElderInfo.api.ts +++ b/src/views/elder/elderinfo/ElderInfo.api.ts @@ -1,18 +1,20 @@ import { defHttp } from '/@/utils/http/axios'; -import { useMessage } from "/@/hooks/web/useMessage"; +import { useMessage } from '/@/hooks/web/useMessage'; const { createConfirm } = useMessage(); enum Api { list = '/admin/elderInfo/list', - save='/admin/elderInfo/add', - edit='/admin/elderInfo/edit', + save = '/admin/elderInfo/add', + edit = '/admin/elderInfo/edit', deleteOne = '/admin/elderInfo/delete', deleteBatch = '/admin/elderInfo/deleteBatch', importExcel = '/admin/elderInfo/importExcel', exportXls = '/admin/elderInfo/exportXls', modifyList = '/admin/elderInfo/modifyList', + modifyTableList = '/admin/elderInfo/modifyTableList', getModifyInfo = '/admin/elderInfo/getModifyInfo', + getHisModifyInfo = '/admin/elderInfo/getHisModifyInfo', guaAudit = '/admin/elderInfo/guaAudit', elderAudit = '/admin/elderInfo/elderAudit', changeOrderly = '/admin/elderInfo/changeOrderly', @@ -40,11 +42,11 @@ export const list = (params) => defHttp.get({ url: Api.list, params }); * @param params * @param handleSuccess */ -export const deleteOne = (params,handleSuccess) => { - return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { +export const deleteOne = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); }); -} +}; /** * 批量删除 @@ -59,12 +61,12 @@ export const batchDelete = (params, handleSuccess) => { okText: '确认', cancelText: '取消', onOk: () => { - return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); }); - } + }, }); -} +}; /** * 保存或者更新 @@ -74,8 +76,7 @@ export const batchDelete = (params, handleSuccess) => { export const saveOrUpdate = (params, isUpdate) => { let url = isUpdate ? Api.edit : Api.save; return defHttp.post({ url: url, params }, { isTransformResponse: false }); -} - +}; /** * 变更列表接口 @@ -83,6 +84,11 @@ export const saveOrUpdate = (params, isUpdate) => { */ export const modifyList = (params) => defHttp.get({ url: Api.modifyList, params }); +/** + * 变更日志列表接口 + * @param params + */ +export const modifyTableList = (params) => defHttp.get({ url: Api.modifyTableList, params }); /** * 获取变更信息 @@ -90,7 +96,15 @@ export const modifyList = (params) => defHttp.get({ url: Api.modifyList, params */ export const getModifyInfo = (params) => { return defHttp.post({ url: Api.getModifyInfo, params }); -} +}; + +/** + * 获取历史变更信息 + * @param params + */ +export const getHisModifyInfo = (params) => { + return defHttp.post({ url: Api.getHisModifyInfo, params }); +}; /** * 监护人信息变更审批提交 diff --git a/src/views/elder/elderinfo/ElderInfo.data.ts b/src/views/elder/elderinfo/ElderInfo.data.ts index e84d2ec..76a6788 100644 --- a/src/views/elder/elderinfo/ElderInfo.data.ts +++ b/src/views/elder/elderinfo/ElderInfo.data.ts @@ -47,6 +47,72 @@ export const columns: BasicColumn[] = [ }, ]; +export const auditHisColumns: BasicColumn[] = [ + { + title: 'NUID', + align: 'center', + dataIndex: 'nuId', + }, + { + title: '护理单元', + align: 'center', + dataIndex: 'nuId_dictText', + }, + { + title: '长者姓名', + align: 'center', + dataIndex: 'name', + }, + { + title: '性别', + align: 'center', + dataIndex: 'sex', + width: 80, + }, + { + title: '年龄', + align: 'center', + dataIndex: 'age', + width: 80, + }, + { + title: '监护人姓名', + align: 'center', + dataIndex: 'guardianName', + }, + // { + // title: '关系', + // align: 'center', + // dataIndex: 'relationship', + // }, + { + title: '监护人电话', + align: 'center', + dataIndex: 'guardianPhone', + }, + { + title: '审核时间', + align: 'center', + dataIndex: 'updateTime', + }, + { + title: '审核结果', + align: 'center', + dataIndex: 'modifyStatus', + customRender: ({ text, record }) => { + console.log(text); + var applyStatus = ''; + if (text == '2') { + applyStatus = '审核通过'; + } else if (text == '3') { + applyStatus = '审核未通过'; + } + return applyStatus; + }, + width: 100, + }, +]; + export const elderColumns: BasicColumn[] = [ { title: '护理单元', @@ -68,16 +134,16 @@ export const elderColumns: BasicColumn[] = [ align: 'center', dataIndex: 'age', }, - { - title: '监护人姓名', - align: 'center', - dataIndex: 'guardianName', - }, - { - title: '监护人电话', - align: 'center', - dataIndex: 'guardianPhone', - }, + // { + // title: '监护人姓名', + // align: 'center', + // dataIndex: 'guardianName', + // }, + // { + // title: '监护人电话', + // align: 'center', + // dataIndex: 'guardianPhone', + // }, // { // title: '关系', // align: 'center', diff --git a/src/views/elder/elderinfo/ElderModifyInfoList.vue b/src/views/elder/elderinfo/ElderModifyInfoList.vue index 2f9e689..b51ba55 100644 --- a/src/views/elder/elderinfo/ElderModifyInfoList.vue +++ b/src/views/elder/elderinfo/ElderModifyInfoList.vue @@ -39,36 +39,38 @@ - + diff --git a/src/views/elder/elderinfo/components/ElderInfoForm.vue b/src/views/elder/elderinfo/components/ElderInfoForm.vue index 805386b..c49c1a4 100644 --- a/src/views/elder/elderinfo/components/ElderInfoForm.vue +++ b/src/views/elder/elderinfo/components/ElderInfoForm.vue @@ -4,19 +4,19 @@ + :sndjDicts="sndjDicts" :detailSign="detailSign" :formBpm="false"> @@ -14,9 +14,10 @@ :footer-style="{ textAlign: 'right' }" @close="handleElderUpInfoCancel"> - + @@ -24,9 +25,10 @@ :bodyStyle="{ padding: '14px' }" @close="handleUpInfoCancel"> - + @@ -39,8 +41,8 @@ - + diff --git a/src/views/elder/elderinfo/components/ElderUpInfoForm.vue b/src/views/elder/elderinfo/components/ElderUpInfoForm.vue index ff9064f..a9ee781 100644 --- a/src/views/elder/elderinfo/components/ElderUpInfoForm.vue +++ b/src/views/elder/elderinfo/components/ElderUpInfoForm.vue @@ -39,7 +39,7 @@ + :label-col="labelCol" :wrapper-col="wrapperCol" v-if="izAudit"> @@ -65,10 +65,13 @@ import { ref, reactive, computed, onMounted } from 'vue'; import { Table as ATable, Input, Row, Col, Form } from 'ant-design-vue'; import { applyObj } from '../ElderInfo.data' import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue'; -import { getModifyInfo, elderAudit } from '../ElderInfo.api' +import { getModifyInfo, getHisModifyInfo, elderAudit } from '../ElderInfo.api' import { useMessage } from '/@/hooks/web/useMessage'; import { initDictOptions } from '/@/utils/dict'; +const props = defineProps({ + sndjDicts: null +}); const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS const formRef = ref(); const AForm = Form; @@ -125,7 +128,7 @@ const filteredTableData = computed(() => { || item.d1 == 'elderModifyId' || item.d1 == 'yblxName' || item.d1 == 'sndjName' - || item.d1 == 'jfztName' + // || item.d1 == 'jfztName' ); }); @@ -153,23 +156,107 @@ const setRowClassName = (record) => { return record.d2 !== record.d3 && record.d1 !== 'createTime' ? 'highlight-row' : ''; }; -async function show(record) { - console.log("🌊 ~ show ~ record:", record) - let data = await getModifyInfo({ id: record.id, queryModifyType: 'elder' }) - console.log("🌊 ~ show ~ data:", data) +const izAudit = ref(false) + +async function show(record, sign) { + let data = null; + if (sign == 'audit') { + data = await getModifyInfo({ id: record.id, queryModifyType: 'elder' }) + izAudit.value = true + } + if (sign == 'his') { + data = await getHisModifyInfo(record) + izAudit.value = false + } formData.id = record.id formData.elderModifyId = record.elderModifyId formData.guardianOpenId = record.guardianOpenId formData.name = record.name formData.sysOrgCode = record.sysOrgCode - - tableData.value = data.map(item => ({ - ...item, - // 处理null/undefined显示为空字符串 - d2: item.d2 ?? '', - d3: item.d3 ?? '' - })); + let beforeYblxValue = '' + let afterYblxValue = '' + let beforeYblx = '' + let afterYblx = '' + let beforeSndj = '' + let afterSndj = '' + let beforeJfzt = '' + let afterJfzt = '' + tableData.value = data.map(item => { + //医保类型 + if (item.d1 == 'medicalType') { + if (!!item.d2) { + beforeYblxValue = item.d2 + beforeYblx = props.sndjDicts.medical_insurance_type.filter(mi => mi.value == item.d2)[0].text + } + if (!!item.d3) { + afterYblxValue = item.d3 + afterYblx = props.sndjDicts.medical_insurance_type.filter(mi => mi.value == item.d3)[0].text + } + } + //缴费状态 + // if (item.d1 == 'paymentStatus') { + // if (!!item.d2) { + // beforeJfzt = props.sndjDicts.elder_payment_status.filter(mi => mi.value == item.d2)[0].text + // } + // if (!!item.d3) { + // afterJfzt = props.sndjDicts.elder_payment_status.filter(mi => mi.value == item.d3)[0].text + // } + // } + return { + ...item, + // 处理null/undefined显示为空字符串 + d2: item.d2 ?? '', + d3: item.d3 ?? '' + } + }); + // 处理失能等级 + tableData.value.forEach(item => { + if (item.d1 == 'disabilityReimbursementType') { + if (!!item.d2) { + if (!!beforeYblxValue) { + if (beforeYblxValue == 'syb') { + beforeSndj = props.sndjDicts.syb_reimbursement_type.filter(mi => mi.value == item.d2)[0].text + } + if (beforeYblxValue == 'zgyb') { + beforeSndj = props.sndjDicts.zgyb_reimbursement_type.filter(mi => mi.value == item.d2)[0].text + } + if (beforeYblxValue == 'jmyb') { + beforeSndj = props.sndjDicts.jmyb_reimbursement_type.filter(mi => mi.value == item.d2)[0].text + } + } + } + if (!!item.d3) { + if (!!afterYblxValue) { + if (afterYblxValue == 'syb') { + afterSndj = props.sndjDicts.syb_reimbursement_type.filter(mi => mi.value == item.d3)[0].text + } + if (afterYblxValue == 'zgyb') { + afterSndj = props.sndjDicts.zgyb_reimbursement_type.filter(mi => mi.value == item.d3)[0].text + } + if (afterYblxValue == 'jmyb') { + afterSndj = props.sndjDicts.jmyb_reimbursement_type.filter(mi => mi.value == item.d3)[0].text + } + } + } + } + }) + //处理缴费状态 + tableData.value.forEach(item => { + if (item.d1 == 'yblxName') { + item.d2 = beforeYblx + item.d3 = afterYblx + } + if (item.d1 == 'sndjName') { + item.d2 = beforeSndj + item.d3 = afterSndj + } + // if (item.d1 == 'jfztName') { + // item.d2 = beforeJfzt + // item.d3 = afterJfzt + // } + }) + console.log(123123, props.sndjDicts) } async function submitForm() { diff --git a/src/views/elder/elderinfo/components/GuaUpInfoForm.vue b/src/views/elder/elderinfo/components/GuaUpInfoForm.vue index 7b0a8a5..149d8f6 100644 --- a/src/views/elder/elderinfo/components/GuaUpInfoForm.vue +++ b/src/views/elder/elderinfo/components/GuaUpInfoForm.vue @@ -1,7 +1,7 @@