dev
This commit is contained in:
parent
a601da3426
commit
aa4c5fe72d
|
|
@ -55,10 +55,6 @@ const props = defineProps({
|
|||
type: String,
|
||||
default: ""
|
||||
},
|
||||
width: {
|
||||
type: Number,
|
||||
default: 1000
|
||||
},
|
||||
showConfig: {
|
||||
type: Array as () => showConfig[],
|
||||
default: () => []
|
||||
|
|
|
|||
|
|
@ -271,6 +271,7 @@ const init = (_id: any) => {
|
|||
post("vip/vip/get", {id: _id}).then((res: any) => {
|
||||
ruleForm.value = res
|
||||
ruleForm.value.area = JSON.parse(ruleForm.value.area)
|
||||
ruleForm.value.levelId=ruleForm.value.levelId==0?null:ruleForm.value.levelId
|
||||
if (!res.levelId) return
|
||||
post("vip/vipLevel/get", {levelId: res.levelId}).then((res: any) => {
|
||||
levelName.value = res.name
|
||||
|
|
|
|||
|
|
@ -193,6 +193,7 @@ const show = (item:any) => {
|
|||
}
|
||||
|
||||
.search {
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
border-top: 1px solid #EAEAEC;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -271,6 +271,7 @@ onUnmounted(() => {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
padding:0 24px;
|
||||
|
||||
.title {
|
||||
height: 35px;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="container-wrapper">
|
||||
<div class="left">
|
||||
<Panel title="患者列表">
|
||||
<div class="panel-content" style="height: 100%;display: flex;flex-direction: column">
|
||||
<div class="panel-content" style="height: 100%;display: flex;flex-direction: column;padding: 0 24px 10px">
|
||||
<div class="search">
|
||||
<div class="input">
|
||||
<el-input v-model="input3" style="width:100%;height: 100%" placeholder="搜索患者"
|
||||
|
|
@ -73,12 +73,15 @@
|
|||
formatListTime(listItem.lastVisitTime) || "-"
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="证件类型"/>
|
||||
<el-descriptions-item label="证件类型">{{certTypeList.find((item:any)=>item.id==listItem.certType)?.name}}</el-descriptions-item>>
|
||||
<el-descriptions-item label="证件号码">{{ listItem.certNo || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="积分"><span>{{ listItem.integralBalance }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="地址">{{ listItem.area}}/{{ listItem.address || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="地址">{{ areaName}}{{ listItem.address || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="既往史" >{{ listItem.beforeMedicalHistory || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="过敏史">{{ listItem.allergyHistory || "-" }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ listItem.remark || "-" }}</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -95,11 +98,11 @@
|
|||
{{ formatDate(scope.row.createDatetime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="应收" prop="preTotalPrice" width="80">
|
||||
<template #default="scope">
|
||||
{{ scope.row.preTotalPrice }}元
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="应收" prop="preTotalPrice" width="80">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{ scope.row.preTotalPrice }}元-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="实收" prop="totalPrice" width="80">
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice }}元
|
||||
|
|
@ -167,6 +170,7 @@ import Panel from "@/components/common/Panel.vue";
|
|||
import {formatListTime} from "@/utils/dateUtils.ts";
|
||||
import antys from "@/assets/config/directory/antys.json"
|
||||
import area from "@/assets/config/area.json"
|
||||
import psnCertTypes from "@/assets/config/directory/psnCertTypes.json"
|
||||
|
||||
|
||||
const isGrant = ref(false)
|
||||
|
|
@ -243,11 +247,54 @@ const closeExchange = () => {
|
|||
getVipIntegral(listItem.value.id)
|
||||
isExchange.value = false
|
||||
}
|
||||
const findAreaName = (code: string | null): string => {
|
||||
if (!code) return "";
|
||||
for (const province of area) {
|
||||
if (province.city && Array.isArray(province.city)) {
|
||||
for (const city of province.city) {
|
||||
if (city.area && Array.isArray(city.area)) {
|
||||
const area = city.area.find((d: any) => d.code === code);
|
||||
if (area) {
|
||||
return `${province.name}/ ${city.name} /${area.name}/`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const province of area) {
|
||||
if (province.city && Array.isArray(province.city)) {
|
||||
const city = province.city.find((c: any) => c.code === code);
|
||||
if (city) {
|
||||
return `${province.name} /${city.name}/`;
|
||||
}
|
||||
}
|
||||
}
|
||||
const province = area.find((item: any) => item.code === code);
|
||||
if (province) {
|
||||
return province.name +'/';
|
||||
}
|
||||
|
||||
// 如果都没找到,返回原始 code
|
||||
return code;
|
||||
};
|
||||
const areaName=ref<any>('')
|
||||
// 点击列表中的某一项
|
||||
const btn = (item: any, i: number) => {
|
||||
index.value = i
|
||||
listItem.value = item
|
||||
listItem.value.area = findAreaName(listItem.value.area)
|
||||
// 修复后:
|
||||
let areaData = listItem.value.area;
|
||||
try {
|
||||
// 如果是字符串则尝试解析为对象
|
||||
if (typeof areaData === 'string') {
|
||||
areaData = JSON.parse(areaData);
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
areaData = null; // 或默认值
|
||||
}
|
||||
areaName.value=findAreaName(areaData[areaData?.length-1])
|
||||
console.log(areaName.value,'findAreaName')
|
||||
getChargeList(listItem.value.id)
|
||||
}
|
||||
//点击发放
|
||||
|
|
@ -328,31 +375,8 @@ const openLevelEdit = (vip: any) => {
|
|||
});
|
||||
}
|
||||
const antysList = ref<any>(Object.entries(antys).map(([id, name]) => ({id, name})))
|
||||
// 定义地区类型
|
||||
interface Area {
|
||||
name: string;
|
||||
code: string;
|
||||
city?: Area[];
|
||||
area?: Area[];
|
||||
}
|
||||
const certTypeList=ref<any>(Object.entries(psnCertTypes).map(([id,name])=>({id,name})))
|
||||
|
||||
// 通过编码查找地区名称
|
||||
const findAreaName = (code: string, areas: Area[]): string => {
|
||||
for (const area of areas) {
|
||||
if (area.code === code) {
|
||||
return area.name;
|
||||
}
|
||||
if (area.city) {
|
||||
const result = findAreaName(code, area.city);
|
||||
if (result) return result;
|
||||
}
|
||||
if (area.area) {
|
||||
const result = findAreaName(code, area.area);
|
||||
if (result) return result;
|
||||
}
|
||||
}
|
||||
return '-';
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@use "@/assets/scss/base.scss";
|
||||
|
|
@ -375,7 +399,6 @@ const findAreaName = (code: string, areas: Area[]): string => {
|
|||
.search {
|
||||
height: 56px;
|
||||
display: flex;
|
||||
padding: 0 24px;
|
||||
|
||||
.input {
|
||||
height: 42px;
|
||||
|
|
@ -402,7 +425,6 @@ const findAreaName = (code: string, areas: Area[]): string => {
|
|||
}
|
||||
|
||||
.total {
|
||||
margin-left: 24px;
|
||||
height: 40px;
|
||||
border-top: 1px solid #EBEEF5;
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
|
|
@ -494,7 +516,7 @@ const findAreaName = (code: string, areas: Area[]): string => {
|
|||
min-width: 0;
|
||||
|
||||
.right-top {
|
||||
height: 304px;
|
||||
height: 344px;
|
||||
|
||||
.detail {
|
||||
padding: 0 24px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue