Compare commits
2 Commits
304d8d2cf3
...
a6c6f3fb64
| Author | SHA1 | Date |
|---|---|---|
|
|
a6c6f3fb64 | |
|
|
aa4c5fe72d |
|
|
@ -56,10 +56,6 @@ const props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: ""
|
default: ""
|
||||||
},
|
},
|
||||||
width: {
|
|
||||||
type: Number,
|
|
||||||
default: 1000
|
|
||||||
},
|
|
||||||
showConfig: {
|
showConfig: {
|
||||||
type: Array as () => showConfig[],
|
type: Array as () => showConfig[],
|
||||||
default: () => []
|
default: () => []
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,7 @@ const init = (_id: any) => {
|
||||||
post("vip/vip/get", {id: _id}).then((res: any) => {
|
post("vip/vip/get", {id: _id}).then((res: any) => {
|
||||||
ruleForm.value = res
|
ruleForm.value = res
|
||||||
ruleForm.value.area = JSON.parse(ruleForm.value.area)
|
ruleForm.value.area = JSON.parse(ruleForm.value.area)
|
||||||
|
ruleForm.value.levelId=ruleForm.value.levelId==0?null:ruleForm.value.levelId
|
||||||
if (!res.levelId) return
|
if (!res.levelId) return
|
||||||
post("vip/vipLevel/get", {levelId: res.levelId}).then((res: any) => {
|
post("vip/vipLevel/get", {levelId: res.levelId}).then((res: any) => {
|
||||||
levelName.value = res.name
|
levelName.value = res.name
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,7 @@ const show = (item:any) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.search {
|
.search {
|
||||||
|
width: 100%;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
border-top: 1px solid #EAEAEC;
|
border-top: 1px solid #EAEAEC;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,7 @@ onUnmounted(() => {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
padding:0 24px;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
height: 35px;
|
height: 35px;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="container-wrapper">
|
<div class="container-wrapper">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<Panel title="患者列表">
|
<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="search">
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<el-input v-model="input3" style="width:100%;height: 100%" placeholder="搜索患者"
|
<el-input v-model="input3" style="width:100%;height: 100%" placeholder="搜索患者"
|
||||||
|
|
@ -73,12 +73,15 @@
|
||||||
formatListTime(listItem.lastVisitTime) || "-"
|
formatListTime(listItem.lastVisitTime) || "-"
|
||||||
}}
|
}}
|
||||||
</el-descriptions-item>
|
</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="证件号码">{{ listItem.certNo || "-" }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="积分"><span>{{ listItem.integralBalance }}</span>
|
<el-descriptions-item label="积分"><span>{{ listItem.integralBalance }}</span>
|
||||||
</el-descriptions-item>
|
</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-item label="备注">{{ listItem.remark || "-" }}</el-descriptions-item>
|
||||||
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -95,11 +98,11 @@
|
||||||
{{ formatDate(scope.row.createDatetime) }}
|
{{ formatDate(scope.row.createDatetime) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="应收" prop="preTotalPrice" width="80">
|
<!-- <el-table-column label="应收" prop="preTotalPrice" width="80">-->
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">-->
|
||||||
{{ scope.row.preTotalPrice }}元
|
<!-- {{ scope.row.preTotalPrice }}元-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="实收" prop="totalPrice" width="80">
|
<el-table-column label="实收" prop="totalPrice" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ scope.row.totalPrice }}元
|
{{ scope.row.totalPrice }}元
|
||||||
|
|
@ -167,6 +170,7 @@ import Panel from "@/components/common/Panel.vue";
|
||||||
import {formatListTime} from "@/utils/dateUtils.ts";
|
import {formatListTime} from "@/utils/dateUtils.ts";
|
||||||
import antys from "@/assets/config/directory/antys.json"
|
import antys from "@/assets/config/directory/antys.json"
|
||||||
import area from "@/assets/config/area.json"
|
import area from "@/assets/config/area.json"
|
||||||
|
import psnCertTypes from "@/assets/config/directory/psnCertTypes.json"
|
||||||
|
|
||||||
|
|
||||||
const isGrant = ref(false)
|
const isGrant = ref(false)
|
||||||
|
|
@ -243,11 +247,54 @@ const closeExchange = () => {
|
||||||
getVipIntegral(listItem.value.id)
|
getVipIntegral(listItem.value.id)
|
||||||
isExchange.value = false
|
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) => {
|
const btn = (item: any, i: number) => {
|
||||||
index.value = i
|
index.value = i
|
||||||
listItem.value = item
|
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)
|
getChargeList(listItem.value.id)
|
||||||
}
|
}
|
||||||
//点击发放
|
//点击发放
|
||||||
|
|
@ -328,31 +375,8 @@ const openLevelEdit = (vip: any) => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const antysList = ref<any>(Object.entries(antys).map(([id, name]) => ({id, name})))
|
const antysList = ref<any>(Object.entries(antys).map(([id, name]) => ({id, name})))
|
||||||
// 定义地区类型
|
const certTypeList=ref<any>(Object.entries(psnCertTypes).map(([id,name])=>({id,name})))
|
||||||
interface Area {
|
|
||||||
name: string;
|
|
||||||
code: string;
|
|
||||||
city?: Area[];
|
|
||||||
area?: Area[];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 通过编码查找地区名称
|
|
||||||
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>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@use "@/assets/scss/base.scss";
|
@use "@/assets/scss/base.scss";
|
||||||
|
|
@ -375,7 +399,6 @@ const findAreaName = (code: string, areas: Area[]): string => {
|
||||||
.search {
|
.search {
|
||||||
height: 56px;
|
height: 56px;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 0 24px;
|
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
height: 42px;
|
height: 42px;
|
||||||
|
|
@ -402,7 +425,6 @@ const findAreaName = (code: string, areas: Area[]): string => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.total {
|
.total {
|
||||||
margin-left: 24px;
|
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-top: 1px solid #EBEEF5;
|
border-top: 1px solid #EBEEF5;
|
||||||
border-bottom: 1px solid #EBEEF5;
|
border-bottom: 1px solid #EBEEF5;
|
||||||
|
|
@ -494,7 +516,7 @@ const findAreaName = (code: string, areas: Area[]): string => {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
.right-top {
|
.right-top {
|
||||||
height: 304px;
|
height: 344px;
|
||||||
|
|
||||||
.detail {
|
.detail {
|
||||||
padding: 0 24px;
|
padding: 0 24px;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue