Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web

This commit is contained in:
LiJianZhao 2025-05-14 13:55:00 +08:00
commit baafcfd1e3
6 changed files with 154 additions and 111 deletions

View File

@ -29,10 +29,18 @@
v-model="query.keyword" v-model="query.keyword"
style="height: 100%;width: 100%" style="height: 100%;width: 100%"
placeholder="根据姓名搜索" placeholder="根据姓名搜索"
@input="search" @input="searchInput"
/> />
</div> </div>
<div class="add" @click="addChargeOrder">新增患者</div> <div class="add" @click="addChargeOrder" @mousemove="selected=true" @mouseleave="selected=false">
<el-icon style="margin-right: 7px">
<template #default>
<img v-if="!selected" style="width: 26px ;height: 22px" src="/static/images/charge/1.png" alt="" srcset="">
<img v-else style="width: 26px ;height: 22px" src="/static/images/charge/1-active.png" alt="" srcset="">
</template>
</el-icon>
新增患者
</div>
<!-- <el-button type="success" @click="addChargeOrder" size="small">+收费</el-button>--> <!-- <el-button type="success" @click="addChargeOrder" size="small">+收费</el-button>-->
</div> </div>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
@ -68,7 +76,7 @@ import {nextTick, onMounted, ref, watch} from "vue";
import {post} from "@/utils/request.ts"; import {post} from "@/utils/request.ts";
import Panel from "@/components/common/Panel.vue"; import Panel from "@/components/common/Panel.vue";
import {formatListTime, getCurrentDate, getEndOfDay} from "@/utils/dateUtils.ts"; import {formatListTime, getCurrentDate, getEndOfDay} from "@/utils/dateUtils.ts";
import {Calendar} from "@element-plus/icons-vue"; import { Search,Calendar} from "@element-plus/icons-vue";
import {apiConfig} from "@/assets/config/apiConfig.ts"; import {apiConfig} from "@/assets/config/apiConfig.ts";
import Edit from "@/components/registration/Edit.vue"; import Edit from "@/components/registration/Edit.vue";
@ -184,10 +192,11 @@ watch(() => selectedDate.value, (newValue, oldValue) => {
} }
init() init()
}) })
const search = (v: any) => { const searchInput = (v: any) => {
query.value.keyword = v query.value.keyword = v
init() init()
} }
const selected= ref(false)
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
@ -214,6 +223,11 @@ const search = (v: any) => {
border-radius: 6px; border-radius: 6px;
border: 1px solid #979797; border: 1px solid #979797;
margin-left: 16px; margin-left: 16px;
cursor: pointer;
&:hover {
background: #4D6DE4;
color: #fff;
}
} }
} }
@ -339,6 +353,7 @@ const search = (v: any) => {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
cursor: pointer;
} }
:deep(.el-input--prefix) { :deep(.el-input--prefix) {

View File

@ -331,6 +331,7 @@ watch(() => selectedDate.value, (newValue, oldValue) => {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
cursor: pointer;
} }
:deep(.el-input) { :deep(.el-input) {

View File

@ -111,10 +111,10 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="费用类型"> <el-descriptions-item label="费用类型">
<el-form-item prop="type"> <el-form-item prop="type">
<el-select v-model="edit_data.type"> <el-select v-model="edit_data.type">
<el-option label="普通" :value="1"></el-option> <el-option label="普通" :value="1"></el-option>
<el-option label="医保" :value="2"></el-option> <el-option label="医保" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item <el-descriptions-item
@ -246,7 +246,7 @@ const save = () => {
...edit_data.value, ...edit_data.value,
psnNo: socialCard.value?.data?.baseinfo.psn_no, psnNo: socialCard.value?.data?.baseinfo.psn_no,
insutype: socialCard.value?.data?.insuinfo[0].insutype, insutype: socialCard.value?.data?.insuinfo[0].insutype,
insuBalance : socialCard.value?.data?.insuinfo[0].balc, insuBalance: socialCard.value?.data?.insuinfo[0].balc,
} }
form.value.validate((v: any) => { form.value.validate((v: any) => {
@ -374,6 +374,7 @@ const hide = () => {
} }
const sectionList = ref<any>([]) const sectionList = ref<any>([])
const getSectionList = () => { const getSectionList = () => {
if(!edit_data.value.organizationDoctorId)return
post(apiConfig.OrganizationSectionListByMemberId, {memberId: edit_data.value.organizationDoctorId}).then((res: any) => { post(apiConfig.OrganizationSectionListByMemberId, {memberId: edit_data.value.organizationDoctorId}).then((res: any) => {
sectionList.value = res sectionList.value = res
if (res.length > 0) { if (res.length > 0) {

View File

@ -22,9 +22,11 @@ function post(path: string, data: any = {}, options: any = {}) {
}) })
.then(response => { .then(response => {
if (response.status != 200) { if (response.status != 200) {
show_error("请求失败,请稍后重试");
if (config.catch_error) { if (config.catch_error) {
reject("请求失败,请稍后重试"); reject("请求失败,请稍后重试");
}else{
show_error("请求失败,请稍后重试");
} }
return; return;
} }
@ -37,9 +39,11 @@ function post(path: string, data: any = {}, options: any = {}) {
return; return;
} }
else{ else{
show_error(data.message);
if (config.catch_error) { if (config.catch_error) {
reject(data.message); reject(data.message);
}else{
show_error(data.message);
} }
return; return;
} }
@ -47,10 +51,12 @@ function post(path: string, data: any = {}, options: any = {}) {
}) })
.catch(error => { .catch(error => {
// 可以在这里添加通知,例如使用 ElNotification // 可以在这里添加通知,例如使用 ElNotification
show_error("请求异常,请稍后重试")
console.error(error) console.error(error)
if(config.catch_error){ if(config.catch_error){
reject(error); reject("请求异常,请稍后重试");
}else{
show_error("请求异常,请稍后重试")
} }
}); });

View File

@ -13,6 +13,7 @@ const username = ref('')
const password = ref('') const password = ref('')
const router = useRouter(); const router = useRouter();
const loading = ref(false) const loading = ref(false)
const tip=ref<string>("正在获取本地网卡地址")
interface NetWorkType { interface NetWorkType {
ip: string, ip: string,
@ -25,32 +26,24 @@ const netWork = ref<NetWorkType>({
}) })
const handleLogin = () => { const handleLogin = async () => {
loading.value = true loading.value = true
if (netWork.value.mac == "00-00-00-00-00") { try{
// IP使IP await loginCore();
ElMessage({ }catch (e:any){
message: "获取本地IP地址失败将使用默认IP地址", error(e)
type: 'warning',
duration: 1000,
})
} }
post(apiConfig.ManagerUserLogin, {username: username.value, password: password.value},{catch_error: true}).then((token: any) => { finally {
localStorage.setItem('token', token)
// success,error
ElMessage({
message: "登录成功,正在读卡签到,请稍后...",
type: 'success',
duration: 1000,
})
post(apiConfig.signIn, {mac: netWork.value.mac, ip: netWork.value.ip}, {catch_error: true}).then((res: any) => {
success()
}).catch(() => {
error()
})
}).catch(() => {
loading.value = false loading.value = false
}) }
}
const loginCore=async ()=>{
let token:any=await post(apiConfig.ManagerUserLogin, {username: username.value, password: password.value},{catch_error: true})
localStorage.setItem('token', token)
await post(apiConfig.signIn, {mac: netWork.value.mac, ip: netWork.value.ip}, {catch_error: true})
success()
} }
@ -64,19 +57,12 @@ const success = () => {
}, },
}) })
} }
const error = () => { const error = (message:any) => {
loading.value = false ElMessageBox.alert(message)
ElMessageBox.alert('读卡签到失败,我们将以非签到模式启动系统', '签到提示', {
confirmButtonText: '确定',
type:'error',
showClose: false,
callback: (action: Action) => {
router.push("/home/index")
},
})
} }
const wsStore = useWsStore(); const wsStore = useWsStore();
const reciceMessage = (response: Response) => { const reciceMessage = (response: Response) => {
tip.value="将以IP:"+response.Data[0].IPAddress+"登录签到"
netWork.value = { netWork.value = {
ip: response.Data[0].IPAddress, ip: response.Data[0].IPAddress,
mac: response.Data[0].MACAddress mac: response.Data[0].MACAddress
@ -94,10 +80,15 @@ const getNetwork = () => {
onMounted(async () => { onMounted(async () => {
wsStore.setMessageCallback(reciceMessage) wsStore.setMessageCallback(reciceMessage)
wsStore.setErrorCallback(errorCallback)
getNetwork() getNetwork()
}); });
const errorCallback = () => {
tip.value="获取本地IP失败将以默认IP进行登录"
}
onUnmounted(() => { onUnmounted(() => {
wsStore.removeAllMessageCallback() wsStore.removeAllMessageCallback()
wsStore.removeAllErrorCallback()
}) })
const isShowAuth = ref(false) const isShowAuth = ref(false)
const showAuth = () => { const showAuth = () => {
@ -138,11 +129,13 @@ const showAuth = () => {
class="input-field" class="input-field"
> >
</div> </div>
<div class="button"> <div class="button-group">
<button type="submit" class="login-button" @click="handleLogin">登录</button> <button type="submit" class="login-button" @click="handleLogin">登录</button>
<button class="auth-button" @click="showAuth">授权</button> <button class="auth-button" @click="showAuth">授权</button>
</div> </div>
<div class="tip" >{{tip}}</div>
</div> </div>
</div> </div>
<Mask :is-show="isShowAuth" @close="isShowAuth=false" :width="600" :height="500" title="授权"> <Mask :is-show="isShowAuth" @close="isShowAuth=false" :width="600" :height="500" title="授权">
<Auth></Auth> <Auth></Auth>
@ -357,53 +350,67 @@ const showAuth = () => {
} }
} }
.button { .button-group {
display: flex; display: flex;
.login-button {
flex: 1;
padding: 1rem;
background: linear-gradient(135deg, #3498db, #2980b9);
border: none;
border-radius: 8px;
color: white;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s ease;
&:hover {
transform: translateY(-2px);
}
&:active {
transform: translateY(0);
}
}
.auth-button {
flex: 1;
margin-left: 10px;
padding: 1rem;
background: linear-gradient(135deg, #3498db, #2980b9);
border: none;
border-radius: 8px;
color: white;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s ease;
&:hover {
transform: translateY(-2px);
}
&:active {
transform: translateY(0);
}
}
} }
.tip{
.login-button { position: relative;
flex: 1; width: 100%;
padding: 1rem; height: 30px;
background: linear-gradient(135deg, #3498db, #2980b9); line-height: 30px;
border: none; font-size: 14px;
border-radius: 8px; color: #999;
color: white; text-align: left;
font-size: 1.1rem; box-sizing: border-box;
font-weight: 600; padding-left: 10px;
cursor: pointer; padding-right: 10px;
transition: transform 0.2s ease; overflow: hidden;
margin-top: 10px;
&:hover {
transform: translateY(-2px);
}
&:active {
transform: translateY(0);
}
} }
.auth-button {
flex: 1;
margin-left: 10px;
padding: 1rem;
background: linear-gradient(135deg, #3498db, #2980b9);
border: none;
border-radius: 8px;
color: white;
font-size: 1.1rem;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s ease;
&:hover {
transform: translateY(-2px);
}
&:active {
transform: translateY(0);
}
}
.register-link { .register-link {
text-align: center; text-align: center;
margin-top: 1.5rem; margin-top: 1.5rem;

View File

@ -68,14 +68,14 @@
</div> </div>
</div> </div>
<div class="addBtn"> <div class="addBtn">
<el-button type="primary" :icon="Plus" @click="open_edit(1301,0)">新增中西成药</el-button> <span @click="open_edit(1301,0)">新增中西成药</span>
<el-button type="primary" :icon="Plus" @click="open_edit(1302,0)">新增中药饮片</el-button> <span @click="open_edit(1302,0)">新增中药饮片</span>
<el-button type="primary" :icon="Plus" @click="open_edit(1306,0)">新增医疗器材</el-button> <span @click="open_edit(1306,0)">新增医疗器材</span>
<el-button type="primary" :icon="Plus" @click="open_edit(0,0)">新增其他商品</el-button> <span @click="open_edit(0,0)">新增其他商品</span>
</div> </div>
</div> </div>
<div class="content_goods" ref="content"> <div class="content_goods" ref="content">
<el-table :data="tableData" style="width: 100%;height: 100%;padding: 0 24px" @row-click="openMack"> <el-table :data="tableData" style="width: 100%;height: 100%;padding: 0 24px" @row-click="openMack" :header-cell-style="{ backgroundColor: '#F1F5FB' }">
<el-table-column fixed prop="name" label="名称" width="200" show-overflow-tooltip> <el-table-column fixed prop="name" label="名称" width="200" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
{{ scope.row.name }}{{ scope.row.commonName ? "(" + scope.row.commonName + ")" : "" }} {{ scope.row.name }}{{ scope.row.commonName ? "(" + scope.row.commonName + ")" : "" }}
@ -131,7 +131,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="医保限价" prop="hilistPricUplmtAmt" show-overflow-tooltip></el-table-column> <el-table-column label="医保限价" prop="hilistPricUplmtAmt" show-overflow-tooltip></el-table-column>
<el-table-column label="限制说明" prop="hilistLmtpricType"></el-table-column> <el-table-column label="限制说明" prop="hilistLmtpricType" show-overflow-tooltip></el-table-column>
<el-table-column label="自付比例" prop="selfpayProp"></el-table-column> <el-table-column label="自付比例" prop="selfpayProp"></el-table-column>
<el-table-column label="毛利率" width="120"> <el-table-column label="毛利率" width="120">
<template #default="scope"> <template #default="scope">
@ -148,34 +148,29 @@
{{ scope.row.costPrice.toFixed(2) }} {{ scope.row.costPrice.toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="医保码" prop="hilistCode" width="240"></el-table-column> <el-table-column label="医保码" prop="hilistCode" width="240"></el-table-column>
<el-table-column label="标签" prop="producer" width="200"> <el-table-column label="标签" prop="producer" width="200">
<template #default="scope"> <template #default="scope">
<el-tag class="tags" type="success" v-for="item in getTagsArray(scope.row.tags)">{{ item }}</el-tag> <el-tag class="tags" type="success" v-for="item in getTagsArray(scope.row.tags)">{{ item }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark" width="150"/> <el-table-column label="备注" prop="remark" width="100" show-overflow-tooltip/>
<el-table-column label="医保类别"> <el-table-column label="医保类别">
<template #default="scope"> <template #default="scope">
{{ getTypeName(scope.row.type) }} {{ getTypeName(scope.row.type) }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="bottom"> <div class="bottom">
<div class="statistics"> <div class="statistics">
<div class="">总成本:{{statisticsData.totalCost}}</div> <div class="">总成本:{{ statisticsData.totalCost }}</div>
<div class="">总售价:{{statisticsData.totalPrice}}</div> <div class="">总售价:{{ statisticsData.totalPrice }}</div>
<div class="">医保药品:{{statisticsData.totalSocialCount}}</div> <div class="">医保药品:{{ statisticsData.totalSocialCount }}</div>
<div v-for="item in statisticsData.chrgitmLvInfoList"> <div v-for="item in statisticsData.chrgitmLvInfoList">
{{item.name}}:{{item.ratio}}({{item.count}}) {{ item.name }}:{{ item.ratio }}({{ item.count }})
</div> </div>
</div> </div>
<div class="page_btn_list"> <div class="page_btn_list">
<el-pagination <el-pagination
background background
@ -439,7 +434,7 @@ const getStatisticsData = () => {
flex-direction: column; flex-direction: column;
.top { .top {
height: 112px; height: 157px;
padding: 24px 24px 0; padding: 24px 24px 0;
background: #fff; background: #fff;
display: flex; display: flex;
@ -461,6 +456,23 @@ const getStatisticsData = () => {
} }
} }
.addBtn {
span {
display: inline-block;
width: 120px;
height: 42px;
background: #FFFFFF;
border-radius: 6px;
border: 1px solid #4D6DE4;
margin-right: 24px;
font-weight: 500;
font-size: 16px;
color: #4D6DE4;
text-align: center;
line-height: 42px;
}
}
} }
.content_goods { .content_goods {
@ -480,7 +492,8 @@ const getStatisticsData = () => {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
.statistics{
.statistics {
display: flex; display: flex;
} }
} }