|
@@ -10,12 +10,15 @@
|
|
|
<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>
|
|
|
+ <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>
|
|
|
+ <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">
|
|
@@ -35,13 +38,13 @@
|
|
|
<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>
|
|
@@ -53,7 +56,8 @@
|
|
|
</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>
|
|
@@ -64,11 +68,12 @@
|
|
|
</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>
|
|
@@ -85,23 +90,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>
|
|
@@ -112,7 +117,8 @@
|
|
|
</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>
|
|
@@ -123,7 +129,8 @@
|
|
|
</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>
|
|
@@ -139,7 +146,8 @@
|
|
|
</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">
|
|
@@ -161,20 +169,23 @@
|
|
|
</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>
|
|
@@ -185,11 +196,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>
|
|
@@ -202,13 +213,14 @@
|
|
|
<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
|
|
@@ -265,21 +277,35 @@
|
|
|
</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'
|
|
@@ -352,10 +378,10 @@ const spanSize = (val) => {
|
|
|
}
|
|
|
spanSize(windowSize.value.w)
|
|
|
watch(
|
|
|
- () => windowSize.value,
|
|
|
- () => {
|
|
|
- spanSize(windowSize.value.w)
|
|
|
- }
|
|
|
+ () => windowSize.value,
|
|
|
+ () => {
|
|
|
+ spanSize(windowSize.value.w)
|
|
|
+ }
|
|
|
)
|
|
|
|
|
|
// 搜索医嘱
|
|
@@ -366,80 +392,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)) {
|
|
@@ -510,7 +536,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})
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -543,21 +569,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
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// 这里是获取下拉框中的值的
|
|
@@ -623,10 +649,11 @@ const baoCunYiZhuClick = () => {
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
confirmButtonText: '继续录入',
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
- baoCunYiZhu()
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ .then((res) => {
|
|
|
+ baoCunYiZhu()
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ })
|
|
|
} else {
|
|
|
baoCunYiZhu()
|
|
|
}
|
|
@@ -641,22 +668,24 @@ function baoCunYiZhu() {
|
|
|
cfType: '1',
|
|
|
list: yiZhuList.value,
|
|
|
}
|
|
|
+ // 合理用药校验
|
|
|
jiaoYan(data)
|
|
|
ElMessageBox.confirm('您确定要保存这些数据吗?请仔细检查数据。', '提示', {
|
|
|
type: 'warning',
|
|
|
closeOnClickModal: false,
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- shangChuanYiZhu(data)
|
|
|
- .then((res) => {
|
|
|
- fuZhiYiZhu.value = []
|
|
|
- router.go(-1)
|
|
|
- })
|
|
|
- .catch((e) => {
|
|
|
- cuoWuXinXi.value = e
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ .then(() => {
|
|
|
+ shangChuanYiZhu(data)
|
|
|
+ .then((res) => {
|
|
|
+ fuZhiYiZhu.value = []
|
|
|
+ router.go(-1)
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ cuoWuXinXi.value = e
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
/* 这里是抗菌药物,选择了除了 1和 2 的其他都可以不用填写 */
|
|
@@ -707,13 +736,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) => {
|
|
@@ -840,7 +869,8 @@ 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 + '秒',
|