|
|
@@ -1,9 +1,8 @@
|
|
|
<template>
|
|
|
<!-- 这里是获取模板的 -->
|
|
|
- <huo-qu-mu-ban v-if="muBanDuiHuaKuang"
|
|
|
- @close="muBanDuiHuaKuang = false" @muBanShuJu="muBanShuJu"></huo-qu-mu-ban>
|
|
|
+ <huo-qu-mu-ban v-if="muBanDuiHuaKuang" @close="muBanDuiHuaKuang = false" @muBanShuJu="muBanShuJu"></huo-qu-mu-ban>
|
|
|
<bao-cun-mu-ban ref="baoCunMuBanRef"></bao-cun-mu-ban>
|
|
|
- <template v-for="item in tiShiBiaoTi">
|
|
|
+ <template v-for="(item, index) in tiShiBiaoTi" :key="index">
|
|
|
<el-alert :title="item.title" :type="item.type" effect="dark"></el-alert>
|
|
|
</template>
|
|
|
<el-button icon="el-icon-arrow-left" style="font-size: 14px" type="text" @click="router.go(-1)">返回</el-button>
|
|
|
@@ -11,26 +10,24 @@
|
|
|
<el-button :disabled="yiZhuList.length === 0" type="primary" @click="baoCunMuBanClick">保存模板</el-button>
|
|
|
<el-button icon="el-icon-check" type="success" @click="baoCunYiZhuClick">保存</el-button>
|
|
|
{{ count }}
|
|
|
- <cuo-wu-xin-xi/>
|
|
|
+ <cuo-wu-xin-xi />
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
- <el-button :disabled="yiZhuData.serial === '00' || stringIsBlank(yiZhuData.serial)" icon="el-icon-view"
|
|
|
- type="success" @click="HeLiYongYao.dialog = true">
|
|
|
- 药品用法
|
|
|
- </el-button>
|
|
|
- <yao-ping-xiang-qing v-if="HeLiYongYao.dialog" :code="HeLiYongYao.code"
|
|
|
- @close="HeLiYongYao.dialog = false"></yao-ping-xiang-qing>
|
|
|
+ <el-button :disabled="yiZhuData.serial === '00' || stringIsBlank(yiZhuData.serial)" icon="el-icon-view" type="success" @click="HeLiYongYao.dialog = true"> 药品用法 </el-button>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <el-button @click="tiaoZhuanZhiHeLiYongYao">合理用药</el-button>
|
|
|
+ <yao-ping-xiang-qing v-if="HeLiYongYao.dialog" :code="HeLiYongYao.code" @close="HeLiYongYao.dialog = false"></yao-ping-xiang-qing>
|
|
|
<el-form ref="yiZhuRef" v-model="yiZhuData" label-width="90px" size="mini">
|
|
|
<el-row>
|
|
|
<el-col :span="span" @click="yiZhuMingDialog = true">
|
|
|
<el-form-item class="bi_tian" label="医嘱名称:" prop="orderName">
|
|
|
- <div style="border-bottom: 1px solid #000;height: 29px">
|
|
|
+ <div style="border-bottom: 1px solid #000; height: 29px">
|
|
|
{{ yiZhuData.orderName }}
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item label="规格:" prop="orderName">
|
|
|
- <div style="border-bottom: 1px solid #000;height: 29px">
|
|
|
+ <div style="border-bottom: 1px solid #000; height: 29px">
|
|
|
{{ yiZhuData.drugSpecification }}
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
@@ -38,13 +35,14 @@
|
|
|
<el-col :span="span">
|
|
|
<el-form-item class="bi_tian" label="频率:" prop="frequCode">
|
|
|
<el-select
|
|
|
- v-model="yiZhuData.frequCode"
|
|
|
- :remote-method="pinLvRemoteMethod"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- remote
|
|
|
- size="mini"
|
|
|
- @change="yiZhuData.frequCode === 'ONCE' ? (yiZhuData.endTime = null) : ''">
|
|
|
+ v-model="yiZhuData.frequCode"
|
|
|
+ :remote-method="pinLvRemoteMethod"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ size="mini"
|
|
|
+ @change="yiZhuData.frequCode === 'ONCE' ? (yiZhuData.endTime = null) : ''"
|
|
|
+ >
|
|
|
<el-option v-for="item in yaoPinPingLvData" :key="item.code" :label="item.name" :value="item.code">
|
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
@@ -55,8 +53,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item class="bi_tian" label="一次剂量:" prop="dose">
|
|
|
- <el-input-number v-model="yiZhuData.dose" :min="0" :precision="2" style="width: 110px"
|
|
|
- @change="jiSuanLingLiang"></el-input-number>
|
|
|
+ <el-input-number v-model="yiZhuData.dose" :min="0" :precision="2" style="width: 110px" @change="jiSuanLingLiang"></el-input-number>
|
|
|
<el-select v-model="yiZhuData.doseUnit" size="mini" style="width: 80px" @change="xuanZheJiLiang">
|
|
|
<el-option v-for="item in yaoPinJiLiangData" :key="item.code" :label="item.name" :value="item.code">
|
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.value }}</span>
|
|
|
@@ -67,14 +64,11 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
- <el-form-item label="领量:">
|
|
|
- {{ yiZhuData.drugQuan }} {{ yiZhuData.miniUnitName }}
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item label="领量:"> {{ yiZhuData.drugQuan }} {{ yiZhuData.miniUnitName }} </el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item class="bi_tian" label="给药方式:" prop="supplyCode">
|
|
|
- <el-select v-model="yiZhuData.supplyCode" :remote-method="geiYaoFangShiRemoteMethod" filterable remote
|
|
|
- size="mini">
|
|
|
+ <el-select v-model="yiZhuData.supplyCode" :remote-method="geiYaoFangShiRemoteMethod" filterable remote size="mini">
|
|
|
<el-option v-for="item in geiYaoFangShiData" :key="item.code" :label="item.name" :value="item.code">
|
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
@@ -91,23 +85,23 @@
|
|
|
<el-col :span="span">
|
|
|
<el-form-item class="bi_tian" label="开始时间:" prop="startTime">
|
|
|
<el-date-picker
|
|
|
- v-model="yiZhuData.startTime"
|
|
|
- :disabled-date="disabledDate"
|
|
|
- format="YYYY-MM-DD HH:mm:ss"
|
|
|
- type="datetime"
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ v-model="yiZhuData.startTime"
|
|
|
+ :disabled-date="disabledDate"
|
|
|
+ format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ type="datetime"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item class="bi_tian" label="停止时间:" prop="endTime">
|
|
|
<el-date-picker
|
|
|
- v-model="yiZhuData.endTime"
|
|
|
- :disabled="yiZhuData.frequCode === 'ONCE'"
|
|
|
- :disabled-date="disabledDate"
|
|
|
- format="YYYY-MM-DD HH:mm:ss"
|
|
|
- type="datetime"
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ v-model="yiZhuData.endTime"
|
|
|
+ :disabled="yiZhuData.frequCode === 'ONCE'"
|
|
|
+ :disabled-date="disabledDate"
|
|
|
+ format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ type="datetime"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -118,8 +112,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item class="bi_tian" label="执行科室:" prop="execUnit">
|
|
|
- <el-select v-model="yiZhuData.execUnit" :remote-method="metZhiXingKeShi" filterable remote
|
|
|
- style="width: 120px">
|
|
|
+ <el-select v-model="yiZhuData.execUnit" :remote-method="metZhiXingKeShi" filterable remote style="width: 120px">
|
|
|
<el-option v-for="item in zhiXingKeShiData" :key="item.code" :label="item.name" :value="item.code">
|
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
@@ -130,8 +123,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item label="父医嘱:" prop="orderName">
|
|
|
- <el-select v-model="yiZhuData.parentNo" :disabled="yiZhuData.serial === '00'" clearable
|
|
|
- @clear="yiZhuData.parentNo = null" @click="fuYiZhuClick">
|
|
|
+ <el-select v-model="yiZhuData.parentNo" :disabled="yiZhuData.serial === '00'" clearable @clear="yiZhuData.parentNo = null" @click="fuYiZhuClick">
|
|
|
<el-option v-for="item in fuYiZhuData" :key="item.code" :label="item.name" :value="item.code">
|
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
@@ -147,8 +139,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item label="医生嘱托:">
|
|
|
- <el-input v-model="yiZhuData.instruction" clearable maxlength="50" show-word-limit style="width: 130px"
|
|
|
- type="textarea"></el-input>
|
|
|
+ <el-input v-model="yiZhuData.instruction" clearable maxlength="50" show-word-limit style="width: 130px" type="textarea"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
@@ -170,23 +161,20 @@
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item label="医保自费:">
|
|
|
- <el-switch v-model="yiZhuData.ybSelfFlag" active-color="#13ce66" active-text="自费" active-value="1"
|
|
|
- inactive-color="#ff4949" inactive-text="记账" inactive-value="0">
|
|
|
+ <el-switch v-model="yiZhuData.ybSelfFlag" active-color="#13ce66" active-text="自费" active-value="1" inactive-color="#ff4949" inactive-text="记账" inactive-value="0">
|
|
|
</el-switch>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item label="是否紧急:">
|
|
|
- <el-switch v-model="yiZhuData.emergencyFlag" active-color="#13ce66" active-text="是" active-value="1"
|
|
|
- inactive-color="#ff4949" inactive-text="否" inactive-value="0">
|
|
|
+ <el-switch v-model="yiZhuData.emergencyFlag" active-color="#13ce66" active-text="是" active-value="1" inactive-color="#ff4949" inactive-text="否" inactive-value="0">
|
|
|
</el-switch>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col v-if="yiZhuData.kjywFlag !== 0" :span="span">
|
|
|
<el-form-item label="用药方式:">
|
|
|
<el-select v-model="yiZhuData.yyfs" style="width: 120px" @change="kangJunYaoYongYaoFangShiGaiBian">
|
|
|
- <el-option v-for="item in kangJunYaoWuYongYaoFangShi" :key="item.code" :label="item.name"
|
|
|
- :value="item.code">
|
|
|
+ <el-option v-for="item in kangJunYaoWuYongYaoFangShi" :key="item.code" :label="item.name" :value="item.code">
|
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
<span>{{ item.name }}</span>
|
|
|
@@ -197,11 +185,11 @@
|
|
|
<el-col :span="span">
|
|
|
<el-form-item v-if="yiZhuData.kjywFlag !== 0" label="切口等级:">
|
|
|
<el-select
|
|
|
- v-model="yiZhuData.ssqk"
|
|
|
- :disabled="yiZhuData.yyfs !== 1 && yiZhuData.yyfs !== 2 && yiZhuData.yyfs !== null"
|
|
|
- clearable
|
|
|
- style="width: 120px"
|
|
|
- @clear="yiZhuData.ssqk = null"
|
|
|
+ v-model="yiZhuData.ssqk"
|
|
|
+ :disabled="yiZhuData.yyfs !== 1 && yiZhuData.yyfs !== 2 && yiZhuData.yyfs !== null"
|
|
|
+ clearable
|
|
|
+ style="width: 120px"
|
|
|
+ @clear="yiZhuData.ssqk = null"
|
|
|
>
|
|
|
<el-option v-for="item in kangJunYaoWuQieKou" :key="item.code" :label="item.name" :value="item.code">
|
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
@@ -214,14 +202,13 @@
|
|
|
<el-col :span="span">
|
|
|
<el-form-item v-if="yiZhuData.kjywFlag !== 0" label="用药时间:">
|
|
|
<el-select
|
|
|
- v-model="yiZhuData.yysj"
|
|
|
- :disabled="yiZhuData.yyfs !== 1 && yiZhuData.yyfs !== 2 && yiZhuData.yyfs !== null"
|
|
|
- clearable
|
|
|
- style="width: 120px"
|
|
|
- @clear="yiZhuData.yysj = null"
|
|
|
+ v-model="yiZhuData.yysj"
|
|
|
+ :disabled="yiZhuData.yyfs !== 1 && yiZhuData.yyfs !== 2 && yiZhuData.yyfs !== null"
|
|
|
+ clearable
|
|
|
+ style="width: 120px"
|
|
|
+ @clear="yiZhuData.yysj = null"
|
|
|
>
|
|
|
- <el-option v-for="item in kangJunYaoWuYongYaoShiJian" :key="item.code" :label="item.name"
|
|
|
- :value="item.code">
|
|
|
+ <el-option v-for="item in kangJunYaoWuYongYaoShiJian" :key="item.code" :label="item.name" :value="item.code">
|
|
|
<span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
<span>{{ item.name }}</span></el-option
|
|
|
@@ -278,45 +265,30 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!-- 这里是搜索医嘱的 -->
|
|
|
- <sou-suo-yi-zhu v-if="yiZhuMingDialog" @close="yiZhuMingDialog = false"
|
|
|
- @xuanZhongFeiYong="xuanZhongFeiYong"></sou-suo-yi-zhu>
|
|
|
+ <sou-suo-yi-zhu v-if="yiZhuMingDialog" @close="yiZhuMingDialog = false" @xuanZhongFeiYong="xuanZhongFeiYong"></sou-suo-yi-zhu>
|
|
|
</template>
|
|
|
|
|
|
<script name="TianJiaYiZhu" setup>
|
|
|
-import {
|
|
|
- huoQuFeiYongXinXi,
|
|
|
- huoQuGeiYaoFangShi,
|
|
|
- huoQuZhiXinKeShi,
|
|
|
- huoQuZhuYuanPinLv,
|
|
|
- jiaoYan,
|
|
|
- shangChuanYiZhu
|
|
|
-} from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
|
|
|
-import {
|
|
|
- cuoWuXinXi,
|
|
|
- fuZhiYiZhu,
|
|
|
- getSelfBuy,
|
|
|
- huanZheXinXi,
|
|
|
- youWuXuanZheHuanZhe
|
|
|
-} from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
|
|
|
+import { huoQuFeiYongXinXi, huoQuGeiYaoFangShi, huoQuZhiXinKeShi, huoQuZhuYuanPinLv, jiaoYan, shangChuanYiZhu } from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
|
|
|
+import { cuoWuXinXi, fuZhiYiZhu, getSelfBuy, huanZheXinXi, youWuXuanZheHuanZhe } from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
|
|
|
import store from '../../../../store'
|
|
|
-import {listIsBlank, listNotBlank, stringIsBlank, stringNotBlank} from '@/utils/blank-utils'
|
|
|
-import {kangJunYaoWuQieKou, kangJunYaoWuYongYaoFangShi, kangJunYaoWuYongYaoShiJian} from '@/data'
|
|
|
-import {ElMessage, ElMessageBox} from 'element-plus'
|
|
|
-import {clone} from '@/utils/clone'
|
|
|
+import { listIsBlank, listNotBlank, stringIsBlank, stringNotBlank } from '@/utils/blank-utils'
|
|
|
+import { kangJunYaoWuQieKou, kangJunYaoWuYongYaoFangShi, kangJunYaoWuYongYaoShiJian } from '@/data'
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
+import { clone } from '@/utils/clone'
|
|
|
import HuoQuMuBan from '../../../../components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/HuoQuMuBan.vue'
|
|
|
-import {uuid} from '@/utils/getUuid'
|
|
|
+import { uuid } from '@/utils/getUuid'
|
|
|
import BaoCunMuBan from '../../../../components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunMuBan.vue'
|
|
|
-import {getServerDateApi, yaoPinShiFouPiPeiYiBao} from '@/api/public-api'
|
|
|
+import { getServerDateApi, yaoPinShiFouPiPeiYiBao } from '@/api/public-api'
|
|
|
import router from '@/router'
|
|
|
-import SouSuoYiZhu from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/SouSuoYiZhu.vue";
|
|
|
-import CuoWuXinXi from "@/components/zhu-yuan-yi-sheng/CuoWuXinXi.vue";
|
|
|
-import YaoPingXiangQing from "@/components/zhu-yuan-yi-sheng/he-li-yong-yao/YaoPingXiangQing.vue";
|
|
|
+import SouSuoYiZhu from '@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/SouSuoYiZhu.vue'
|
|
|
+import CuoWuXinXi from '@/components/zhu-yuan-yi-sheng/CuoWuXinXi.vue'
|
|
|
+import YaoPingXiangQing from '@/components/zhu-yuan-yi-sheng/he-li-yong-yao/YaoPingXiangQing.vue'
|
|
|
|
|
|
const windowSize = computed(() => {
|
|
|
return store.state.app.windowSize
|
|
|
})
|
|
|
|
|
|
-
|
|
|
// 设置倒计时
|
|
|
const seconds = ref(600)
|
|
|
// 倒计时提示
|
|
|
@@ -379,12 +351,11 @@ const spanSize = (val) => {
|
|
|
}
|
|
|
}
|
|
|
spanSize(windowSize.value.w)
|
|
|
-
|
|
|
watch(
|
|
|
- () => windowSize.value,
|
|
|
- () => {
|
|
|
- spanSize(windowSize.value.w)
|
|
|
- }
|
|
|
+ () => windowSize.value,
|
|
|
+ () => {
|
|
|
+ spanSize(windowSize.value.w)
|
|
|
+ }
|
|
|
)
|
|
|
|
|
|
// 搜索医嘱
|
|
|
@@ -395,80 +366,80 @@ const xuanZhongFeiYong = (row) => {
|
|
|
yiZhuData.value = clone(row)
|
|
|
if (row.serial !== '00') {
|
|
|
huoQuFeiYongXinXi(row.orderCode, row.serial)
|
|
|
- .then((res) => {
|
|
|
- yiZhuData.value.drugFlag = row.orderType
|
|
|
- // 判断是否 是皮试的药 如果是就只能有这些 给药方式
|
|
|
- if (res.data.psFlag === 1) {
|
|
|
- geiYaoFangShiData.value = res.piShi
|
|
|
- tiShiBiaoTi.value.push({title: '该药品为皮试药品给药方式只能是皮试类型', type: 'warning'})
|
|
|
- yiZhuData.value.psFlag = true
|
|
|
- } else {
|
|
|
- geiYaoFangShiData.value = []
|
|
|
- yiZhuData.value.psFlag = false
|
|
|
- }
|
|
|
- yiZhuData.value.kjywFlag = res.data.kjywFlag
|
|
|
- if (yiZhuData.value.kjywFlag === 1) {
|
|
|
- tiShiBiaoTi.value.push({title: '该药品为抗菌药物,请填写抗菌药物医嘱附注信息录入。', type: 'error'})
|
|
|
- }
|
|
|
- if (res.data.selfFlagYb === 1) {
|
|
|
- tiShiBiaoTi.value.push({title: '该药品医保自费药品,如符合条件请填写记账,不是请填写自费。'})
|
|
|
- }
|
|
|
- yiZhuData.value.miniUnitName = res.data.miniUnitName
|
|
|
- yaoPinJiLiangData.value = res.yaoPingJiLiang
|
|
|
- // 加载 剂量单位
|
|
|
- if (stringNotBlank(yiZhuData.value.doseUnit)) {
|
|
|
- yaoPinJiLiangData.value.forEach((item) => {
|
|
|
- if (item.code === yiZhuData.value.doseUnit) {
|
|
|
- jiLiangValue.value = item.value
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (listNotBlank(yaoPinJiLiangData.value)) {
|
|
|
- // 没有剂量单位的时候默认加载第一个计量单位 并且计算
|
|
|
- yiZhuData.value.doseUnit = yaoPinJiLiangData.value[0].code
|
|
|
- yiZhuData.value.dose = yaoPinJiLiangData.value[0].value
|
|
|
- jiLiangValue.value = yaoPinJiLiangData.value[0].value
|
|
|
- jiSuanLingLiang(yaoPinJiLiangData.value[0].value)
|
|
|
- }
|
|
|
- // 加载默认频率 如果已经填写了 就用有的
|
|
|
- if (stringNotBlank(row.frequCode)) {
|
|
|
- pinLvRemoteMethod(yiZhuData.value.frequCode)
|
|
|
- } else if (stringNotBlank(res.data.frequCode)) {
|
|
|
- yiZhuData.value.frequCode = res.data.frequCode
|
|
|
- pinLvRemoteMethod(yiZhuData.value.frequCode)
|
|
|
- } else {
|
|
|
- yiZhuData.value.frequCode = 'ONCE'
|
|
|
- pinLvRemoteMethod('ONCE')
|
|
|
- }
|
|
|
- // 加载给药方式
|
|
|
- if (stringNotBlank(yiZhuData.value.supplyCode)) {
|
|
|
- geiYaoFangShiRemoteMethod(yiZhuData.value.supplyCode)
|
|
|
- } else if (stringNotBlank(res.data.supplyCode)) {
|
|
|
- yiZhuData.value.supplyCode = res.data.supplyCode
|
|
|
- geiYaoFangShiRemoteMethod(yiZhuData.value.supplyCode)
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- setTimeout(() => {
|
|
|
- console.error(e)
|
|
|
- qingKong()
|
|
|
- }, 100)
|
|
|
- })
|
|
|
+ .then((res) => {
|
|
|
+ yiZhuData.value.drugFlag = row.orderType
|
|
|
+ // 判断是否 是皮试的药 如果是就只能有这些 给药方式
|
|
|
+ if (res.data.psFlag === 1) {
|
|
|
+ geiYaoFangShiData.value = res.piShi
|
|
|
+ tiShiBiaoTi.value.push({ title: '该药品为皮试药品给药方式只能是皮试类型', type: 'warning' })
|
|
|
+ yiZhuData.value.psFlag = true
|
|
|
+ } else {
|
|
|
+ geiYaoFangShiData.value = []
|
|
|
+ yiZhuData.value.psFlag = false
|
|
|
+ }
|
|
|
+ yiZhuData.value.kjywFlag = res.data.kjywFlag
|
|
|
+ if (yiZhuData.value.kjywFlag === 1) {
|
|
|
+ tiShiBiaoTi.value.push({ title: '该药品为抗菌药物,请填写抗菌药物医嘱附注信息录入。', type: 'error' })
|
|
|
+ }
|
|
|
+ if (res.data.selfFlagYb === 1) {
|
|
|
+ tiShiBiaoTi.value.push({ title: '该药品医保自费药品,如符合条件请填写记账,不是请填写自费。' })
|
|
|
+ }
|
|
|
+ yiZhuData.value.miniUnitName = res.data.miniUnitName
|
|
|
+ yaoPinJiLiangData.value = res.yaoPingJiLiang
|
|
|
+ // 加载 剂量单位
|
|
|
+ if (stringNotBlank(yiZhuData.value.doseUnit)) {
|
|
|
+ yaoPinJiLiangData.value.forEach((item) => {
|
|
|
+ if (item.code === yiZhuData.value.doseUnit) {
|
|
|
+ jiLiangValue.value = item.value
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (listNotBlank(yaoPinJiLiangData.value)) {
|
|
|
+ // 没有剂量单位的时候默认加载第一个计量单位 并且计算
|
|
|
+ yiZhuData.value.doseUnit = yaoPinJiLiangData.value[0].code
|
|
|
+ yiZhuData.value.dose = yaoPinJiLiangData.value[0].value
|
|
|
+ jiLiangValue.value = yaoPinJiLiangData.value[0].value
|
|
|
+ jiSuanLingLiang(yaoPinJiLiangData.value[0].value)
|
|
|
+ }
|
|
|
+ // 加载默认频率 如果已经填写了 就用有的
|
|
|
+ if (stringNotBlank(row.frequCode)) {
|
|
|
+ pinLvRemoteMethod(yiZhuData.value.frequCode)
|
|
|
+ } else if (stringNotBlank(res.data.frequCode)) {
|
|
|
+ yiZhuData.value.frequCode = res.data.frequCode
|
|
|
+ pinLvRemoteMethod(yiZhuData.value.frequCode)
|
|
|
+ } else {
|
|
|
+ yiZhuData.value.frequCode = 'ONCE'
|
|
|
+ pinLvRemoteMethod('ONCE')
|
|
|
+ }
|
|
|
+ // 加载给药方式
|
|
|
+ if (stringNotBlank(yiZhuData.value.supplyCode)) {
|
|
|
+ geiYaoFangShiRemoteMethod(yiZhuData.value.supplyCode)
|
|
|
+ } else if (stringNotBlank(res.data.supplyCode)) {
|
|
|
+ yiZhuData.value.supplyCode = res.data.supplyCode
|
|
|
+ geiYaoFangShiRemoteMethod(yiZhuData.value.supplyCode)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ setTimeout(() => {
|
|
|
+ console.error(e)
|
|
|
+ qingKong()
|
|
|
+ }, 100)
|
|
|
+ })
|
|
|
} else {
|
|
|
yiZhuData.value.kjywFlag = 0
|
|
|
huoQuFeiYongXinXi(row.orderCode, '00')
|
|
|
- .then((res) => {
|
|
|
- yiZhuData.value.drugFlag = row.orderType
|
|
|
- yiZhuData.value.frequCode = 'ONCE'
|
|
|
- pinLvRemoteMethod('ONCE')
|
|
|
- if (stringNotBlank(res.paiChiYiZhu)) {
|
|
|
- tiShiBiaoTi.value.push({title: res.paiChiYiZhu, type: 'error'})
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- setTimeout(() => {
|
|
|
- qingKong()
|
|
|
- }, 100)
|
|
|
- })
|
|
|
+ .then((res) => {
|
|
|
+ yiZhuData.value.drugFlag = row.orderType
|
|
|
+ yiZhuData.value.frequCode = 'ONCE'
|
|
|
+ pinLvRemoteMethod('ONCE')
|
|
|
+ if (stringNotBlank(res.paiChiYiZhu)) {
|
|
|
+ tiShiBiaoTi.value.push({ title: res.paiChiYiZhu, type: 'error' })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ setTimeout(() => {
|
|
|
+ qingKong()
|
|
|
+ }, 100)
|
|
|
+ })
|
|
|
}
|
|
|
// 判断这个是不是 新添加的数据 如果是空的就是 新数据
|
|
|
if (stringIsBlank(row.newData)) {
|
|
|
@@ -539,7 +510,7 @@ const fuYiZhuClick = () => {
|
|
|
fuYiZhuData.value = []
|
|
|
yiZhuList.value.forEach((item, index) => {
|
|
|
if (stringNotBlank(item.drugFlag) && item.drugFlag === 'i' && item.id !== yiZhuData.value.id && stringIsBlank(item.parentNo)) {
|
|
|
- fuYiZhuData.value.push({code: item.id, name: item.orderName})
|
|
|
+ fuYiZhuData.value.push({ code: item.id, name: item.orderName })
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -572,21 +543,21 @@ const tianJiaYiZhu = () => {
|
|
|
list: list,
|
|
|
}
|
|
|
shangChuanYiZhu(data)
|
|
|
- .then((res) => {
|
|
|
- let index = tianJiaYiZhuWeiYiBiaoShi.value.indexOf(yiZhuData.value.id)
|
|
|
- if (index > -1) {
|
|
|
- yiZhuList.value.splice(index, 1)
|
|
|
- tianJiaYiZhuWeiYiBiaoShi.value.splice(index, 1)
|
|
|
- ElMessage.error('重复添加,老记录已删除。')
|
|
|
- }
|
|
|
- tianJiaShiHuoQuXiaLaKuangDeZhi()
|
|
|
- tianJiaYiZhuWeiYiBiaoShi.value.push(yiZhuData.value.id)
|
|
|
- yiZhuList.value.push(clone(yiZhuData.value))
|
|
|
- qingKong()
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- cuoWuXinXi.value = e
|
|
|
- })
|
|
|
+ .then((res) => {
|
|
|
+ let index = tianJiaYiZhuWeiYiBiaoShi.value.indexOf(yiZhuData.value.id)
|
|
|
+ if (index > -1) {
|
|
|
+ yiZhuList.value.splice(index, 1)
|
|
|
+ tianJiaYiZhuWeiYiBiaoShi.value.splice(index, 1)
|
|
|
+ ElMessage.error('重复添加,老记录已删除。')
|
|
|
+ }
|
|
|
+ tianJiaShiHuoQuXiaLaKuangDeZhi()
|
|
|
+ tianJiaYiZhuWeiYiBiaoShi.value.push(yiZhuData.value.id)
|
|
|
+ yiZhuList.value.push(clone(yiZhuData.value))
|
|
|
+ qingKong()
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ cuoWuXinXi.value = e
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// 这里是获取下拉框中的值的
|
|
|
@@ -634,7 +605,6 @@ const dianJiFuZhiYiZhu = (val) => {
|
|
|
ElMessage.success('复制成功')
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/* 保存信息 */
|
|
|
const baoCunYiZhuClick = () => {
|
|
|
if (listIsBlank(yiZhuList.value)) {
|
|
|
@@ -642,8 +612,8 @@ const baoCunYiZhuClick = () => {
|
|
|
}
|
|
|
if (youWuXuanZheHuanZhe()) return
|
|
|
let yiBaoBianMaTiShi = []
|
|
|
- yiZhuList.value.forEach(item => {
|
|
|
- yiBaoBianMaTiShi.push(item.orderCode + "-" + item.serial)
|
|
|
+ yiZhuList.value.forEach((item) => {
|
|
|
+ yiBaoBianMaTiShi.push(item.orderCode + '-' + item.serial)
|
|
|
})
|
|
|
yaoPinShiFouPiPeiYiBao(yiBaoBianMaTiShi).then((res) => {
|
|
|
if (stringNotBlank(res)) {
|
|
|
@@ -651,11 +621,12 @@ const baoCunYiZhuClick = () => {
|
|
|
ElMessageBox.confirm(res, '提示', {
|
|
|
type: 'warning',
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
- confirmButtonText: '继续录入'
|
|
|
- }).then((res) => {
|
|
|
- baoCunYiZhu()
|
|
|
- }).catch(() => {
|
|
|
+ confirmButtonText: '继续录入',
|
|
|
})
|
|
|
+ .then((res) => {
|
|
|
+ baoCunYiZhu()
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
} else {
|
|
|
baoCunYiZhu()
|
|
|
}
|
|
|
@@ -674,8 +645,9 @@ function baoCunYiZhu() {
|
|
|
ElMessageBox.confirm('您确定要保存这些数据吗?请仔细检查数据。', '提示', {
|
|
|
type: 'warning',
|
|
|
closeOnClickModal: false,
|
|
|
- }).then(() => {
|
|
|
- shangChuanYiZhu(data)
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ shangChuanYiZhu(data)
|
|
|
.then((res) => {
|
|
|
fuZhiYiZhu.value = []
|
|
|
router.go(-1)
|
|
|
@@ -683,8 +655,8 @@ function baoCunYiZhu() {
|
|
|
.catch((e) => {
|
|
|
cuoWuXinXi.value = e
|
|
|
})
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
}
|
|
|
|
|
|
/* 这里是抗菌药物,选择了除了 1和 2 的其他都可以不用填写 */
|
|
|
@@ -735,13 +707,13 @@ const baoCunMuBanClick = () => {
|
|
|
list: yiZhuList.value,
|
|
|
}
|
|
|
shangChuanYiZhu(data)
|
|
|
- .then((res) => {
|
|
|
- baoCunMuBanRef.value.daKaiBaoCunMuBan(yiZhuList.value)
|
|
|
- cuoWuXinXi.value = ''
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- cuoWuXinXi.value = e
|
|
|
- })
|
|
|
+ .then((res) => {
|
|
|
+ baoCunMuBanRef.value.daKaiBaoCunMuBan(yiZhuList.value)
|
|
|
+ cuoWuXinXi.value = ''
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ cuoWuXinXi.value = e
|
|
|
+ })
|
|
|
}
|
|
|
// 医嘱限制时间不能在之前
|
|
|
const disabledDate = (time) => {
|
|
|
@@ -770,7 +742,6 @@ const dianJiXiuGaiZhiXingKeShi = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
const qingKong = () => {
|
|
|
cuoWuXinXi.value = ''
|
|
|
zhiXingKeShiData.value = []
|
|
|
@@ -869,8 +840,7 @@ const countDown = () => {
|
|
|
if (seconds.value === 300) {
|
|
|
ElMessageBox.alert('您的操作时间过半', '提示', {
|
|
|
type: 'warning',
|
|
|
- }).then((res) => {
|
|
|
- })
|
|
|
+ }).then((res) => {})
|
|
|
} else if (seconds.value === 60 || seconds.value === 30 || seconds.value === 20) {
|
|
|
ElMessage({
|
|
|
message: '剩余操作时间' + seconds.value + '秒',
|
|
|
@@ -887,9 +857,12 @@ const countDown = () => {
|
|
|
|
|
|
let HeLiYongYao = $ref({
|
|
|
dialog: false,
|
|
|
- code: ''
|
|
|
+ code: '',
|
|
|
})
|
|
|
|
|
|
+const tiaoZhuanZhiHeLiYongYao = () => {
|
|
|
+ window.open('http://172.16.32.121:9097/index.html')
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|