Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
This commit is contained in:
commit
baafcfd1e3
|
|
@ -29,10 +29,18 @@
|
|||
v-model="query.keyword"
|
||||
style="height: 100%;width: 100%"
|
||||
placeholder="根据姓名搜索"
|
||||
@input="search"
|
||||
@input="searchInput"
|
||||
/>
|
||||
</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>-->
|
||||
</div>
|
||||
<div class="list" v-loading="loading">
|
||||
|
|
@ -68,7 +76,7 @@ import {nextTick, onMounted, ref, watch} from "vue";
|
|||
import {post} from "@/utils/request.ts";
|
||||
import Panel from "@/components/common/Panel.vue";
|
||||
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 Edit from "@/components/registration/Edit.vue";
|
||||
|
||||
|
|
@ -184,10 +192,11 @@ watch(() => selectedDate.value, (newValue, oldValue) => {
|
|||
}
|
||||
init()
|
||||
})
|
||||
const search = (v: any) => {
|
||||
const searchInput = (v: any) => {
|
||||
query.value.keyword = v
|
||||
init()
|
||||
}
|
||||
const selected= ref(false)
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
|
|
@ -214,6 +223,11 @@ const search = (v: any) => {
|
|||
border-radius: 6px;
|
||||
border: 1px solid #979797;
|
||||
margin-left: 16px;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background: #4D6DE4;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -339,6 +353,7 @@ const search = (v: any) => {
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:deep(.el-input--prefix) {
|
||||
|
|
|
|||
|
|
@ -331,6 +331,7 @@ watch(() => selectedDate.value, (newValue, oldValue) => {
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:deep(.el-input) {
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ const save = () => {
|
|||
...edit_data.value,
|
||||
psnNo: socialCard.value?.data?.baseinfo.psn_no,
|
||||
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) => {
|
||||
|
|
@ -374,6 +374,7 @@ const hide = () => {
|
|||
}
|
||||
const sectionList = ref<any>([])
|
||||
const getSectionList = () => {
|
||||
if(!edit_data.value.organizationDoctorId)return
|
||||
post(apiConfig.OrganizationSectionListByMemberId, {memberId: edit_data.value.organizationDoctorId}).then((res: any) => {
|
||||
sectionList.value = res
|
||||
if (res.length > 0) {
|
||||
|
|
|
|||
|
|
@ -22,9 +22,11 @@ function post(path: string, data: any = {}, options: any = {}) {
|
|||
})
|
||||
.then(response => {
|
||||
if (response.status != 200) {
|
||||
show_error("请求失败,请稍后重试");
|
||||
|
||||
if (config.catch_error) {
|
||||
reject("请求失败,请稍后重试");
|
||||
}else{
|
||||
show_error("请求失败,请稍后重试");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -37,9 +39,11 @@ function post(path: string, data: any = {}, options: any = {}) {
|
|||
return;
|
||||
}
|
||||
else{
|
||||
show_error(data.message);
|
||||
|
||||
if (config.catch_error) {
|
||||
reject(data.message);
|
||||
}else{
|
||||
show_error(data.message);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -47,10 +51,12 @@ function post(path: string, data: any = {}, options: any = {}) {
|
|||
})
|
||||
.catch(error => {
|
||||
// 可以在这里添加通知,例如使用 ElNotification
|
||||
show_error("请求异常,请稍后重试")
|
||||
|
||||
console.error(error)
|
||||
if(config.catch_error){
|
||||
reject(error);
|
||||
reject("请求异常,请稍后重试");
|
||||
}else{
|
||||
show_error("请求异常,请稍后重试")
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ const username = ref('')
|
|||
const password = ref('')
|
||||
const router = useRouter();
|
||||
const loading = ref(false)
|
||||
const tip=ref<string>("正在获取本地网卡地址")
|
||||
|
||||
interface NetWorkType {
|
||||
ip: string,
|
||||
|
|
@ -25,32 +26,24 @@ const netWork = ref<NetWorkType>({
|
|||
})
|
||||
|
||||
|
||||
const handleLogin = () => {
|
||||
const handleLogin = async () => {
|
||||
loading.value = true
|
||||
if (netWork.value.mac == "00-00-00-00-00") {
|
||||
//提示 获取本地IP地址失败,将使用默认IP地址
|
||||
ElMessage({
|
||||
message: "获取本地IP地址失败,将使用默认IP地址",
|
||||
type: 'warning',
|
||||
duration: 1000,
|
||||
})
|
||||
try{
|
||||
await loginCore();
|
||||
}catch (e:any){
|
||||
error(e)
|
||||
}
|
||||
post(apiConfig.ManagerUserLogin, {username: username.value, password: password.value},{catch_error: true}).then((token: any) => {
|
||||
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(() => {
|
||||
finally {
|
||||
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 = () => {
|
||||
loading.value = false
|
||||
ElMessageBox.alert('读卡签到失败,我们将以非签到模式启动系统', '签到提示', {
|
||||
confirmButtonText: '确定',
|
||||
type:'error',
|
||||
showClose: false,
|
||||
callback: (action: Action) => {
|
||||
router.push("/home/index")
|
||||
},
|
||||
})
|
||||
const error = (message:any) => {
|
||||
ElMessageBox.alert(message)
|
||||
}
|
||||
const wsStore = useWsStore();
|
||||
const reciceMessage = (response: Response) => {
|
||||
tip.value="将以IP:"+response.Data[0].IPAddress+"登录签到"
|
||||
netWork.value = {
|
||||
ip: response.Data[0].IPAddress,
|
||||
mac: response.Data[0].MACAddress
|
||||
|
|
@ -94,10 +80,15 @@ const getNetwork = () => {
|
|||
|
||||
onMounted(async () => {
|
||||
wsStore.setMessageCallback(reciceMessage)
|
||||
wsStore.setErrorCallback(errorCallback)
|
||||
getNetwork()
|
||||
});
|
||||
const errorCallback = () => {
|
||||
tip.value="获取本地IP失败,将以默认IP进行登录"
|
||||
}
|
||||
onUnmounted(() => {
|
||||
wsStore.removeAllMessageCallback()
|
||||
wsStore.removeAllErrorCallback()
|
||||
})
|
||||
const isShowAuth = ref(false)
|
||||
const showAuth = () => {
|
||||
|
|
@ -138,11 +129,13 @@ const showAuth = () => {
|
|||
class="input-field"
|
||||
>
|
||||
</div>
|
||||
<div class="button">
|
||||
<div class="button-group">
|
||||
<button type="submit" class="login-button" @click="handleLogin">登录</button>
|
||||
<button class="auth-button" @click="showAuth">授权</button>
|
||||
</div>
|
||||
<div class="tip" >{{tip}}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<Mask :is-show="isShowAuth" @close="isShowAuth=false" :width="600" :height="500" title="授权">
|
||||
<Auth></Auth>
|
||||
|
|
@ -357,11 +350,10 @@ const showAuth = () => {
|
|||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
.button-group {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.login-button {
|
||||
.login-button {
|
||||
flex: 1;
|
||||
padding: 1rem;
|
||||
background: linear-gradient(135deg, #3498db, #2980b9);
|
||||
|
|
@ -380,9 +372,9 @@ const showAuth = () => {
|
|||
&:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.auth-button {
|
||||
.auth-button {
|
||||
flex: 1;
|
||||
margin-left: 10px;
|
||||
padding: 1rem;
|
||||
|
|
@ -402,8 +394,23 @@ const showAuth = () => {
|
|||
&:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.tip{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
text-align: left;
|
||||
box-sizing: border-box;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
overflow: hidden;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.register-link {
|
||||
text-align: center;
|
||||
margin-top: 1.5rem;
|
||||
|
|
|
|||
|
|
@ -68,14 +68,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="addBtn">
|
||||
<el-button type="primary" :icon="Plus" @click="open_edit(1301,0)">新增中西成药</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="open_edit(1302,0)">新增中药饮片</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="open_edit(1306,0)">新增医疗器材</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="open_edit(0,0)">新增其他商品</el-button>
|
||||
<span @click="open_edit(1301,0)">新增中西成药</span>
|
||||
<span @click="open_edit(1302,0)">新增中药饮片</span>
|
||||
<span @click="open_edit(1306,0)">新增医疗器材</span>
|
||||
<span @click="open_edit(0,0)">新增其他商品</span>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<template #default="scope">
|
||||
{{ scope.row.name }}{{ scope.row.commonName ? "(" + scope.row.commonName + ")" : "" }}
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
</template>
|
||||
</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="毛利率" width="120">
|
||||
<template #default="scope">
|
||||
|
|
@ -148,32 +148,27 @@
|
|||
¥{{ scope.row.costPrice.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="医保码" prop="hilistCode" width="240"></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="标签" prop="producer" width="200">
|
||||
<template #default="scope">
|
||||
<el-tag class="tags" type="success" v-for="item in getTagsArray(scope.row.tags)">{{ item }}</el-tag>
|
||||
</template>
|
||||
</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="医保类别">
|
||||
<template #default="scope">
|
||||
{{ getTypeName(scope.row.type) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="statistics">
|
||||
<div class="">总成本:{{statisticsData.totalCost}}</div>
|
||||
<div class="">总售价:{{statisticsData.totalPrice}}</div>
|
||||
<div class="">医保药品:{{statisticsData.totalSocialCount}}个</div>
|
||||
<div class="">总成本:{{ statisticsData.totalCost }}</div>
|
||||
<div class="">总售价:{{ statisticsData.totalPrice }}</div>
|
||||
<div class="">医保药品:{{ statisticsData.totalSocialCount }}个</div>
|
||||
<div v-for="item in statisticsData.chrgitmLvInfoList">
|
||||
{{item.name}}:{{item.ratio}}({{item.count}})
|
||||
{{ item.name }}:{{ item.ratio }}({{ item.count }})
|
||||
</div>
|
||||
</div>
|
||||
<div class="page_btn_list">
|
||||
|
|
@ -439,7 +434,7 @@ const getStatisticsData = () => {
|
|||
flex-direction: column;
|
||||
|
||||
.top {
|
||||
height: 112px;
|
||||
height: 157px;
|
||||
padding: 24px 24px 0;
|
||||
background: #fff;
|
||||
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 {
|
||||
|
|
@ -480,7 +492,8 @@ const getStatisticsData = () => {
|
|||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
.statistics{
|
||||
|
||||
.statistics {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue