|
@@ -37,34 +37,22 @@
|
|
|
</el-col>
|
|
|
<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) : ''"
|
|
|
- >
|
|
|
- <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>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <XcSelect v-model="yiZhuData" :data="yaoPinPingLvData"
|
|
|
+ :name="['frequCode','frequCodeName']" clearable remote
|
|
|
+ @method="pinLvRemoteMethod">
|
|
|
+ </XcSelect>
|
|
|
</el-form-item>
|
|
|
</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-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>
|
|
|
- <el-divider direction="vertical"></el-divider>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <XcSelect v-model="yiZhuData" :data="yaoPinJiLiangData"
|
|
|
+ :name="['doseUnit','doseUnitName']" :width="80"
|
|
|
+ @change="xuanZheJiLiang">
|
|
|
+ <XcOption label="value"></XcOption>
|
|
|
+ <XcOption label="name"></XcOption>
|
|
|
+ </XcSelect>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
@@ -72,14 +60,11 @@
|
|
|
</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-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>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <XcSelect v-model="yiZhuData" :data="geiYaoFangShiData"
|
|
|
+ :name="['supplyCode','supplyCodeName']" clearable
|
|
|
+ remote
|
|
|
+ @method="geiYaoFangShiRemoteMethod">
|
|
|
+ </XcSelect>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
@@ -117,14 +102,10 @@
|
|
|
</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-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>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
+ <XcSelect v-model="yiZhuData" :data="zhiXingKeShiData"
|
|
|
+ :name="['execUnit','execUnitName']"
|
|
|
+ remote @method="metZhiXingKeShi">
|
|
|
+ </XcSelect>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
@@ -134,8 +115,8 @@
|
|
|
<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>
|
|
|
- <span>{{ item.name }}</span></el-option
|
|
|
- >
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -310,6 +291,9 @@ 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 XcSelect from "@/components/xc/select/XcSelect.vue";
|
|
|
+import XcOption from "@/components/xc/select/XcOption.vue";
|
|
|
+
|
|
|
|
|
|
const windowSize = computed(() => {
|
|
|
return store.state.app.windowSize
|
|
@@ -319,8 +303,6 @@ const windowSize = computed(() => {
|
|
|
const seconds = ref(600)
|
|
|
// 倒计时提示
|
|
|
const count = ref('')
|
|
|
-// 搜索药品的输入框
|
|
|
-const searchInput = ref(null)
|
|
|
|
|
|
const yiZhuData = ref({
|
|
|
id: '',
|
|
@@ -387,131 +369,115 @@ watch(
|
|
|
// 搜索医嘱
|
|
|
let yiZhuMingDialog = $ref(false)
|
|
|
const xuanZhongFeiYong = (row) => {
|
|
|
- yiZhuMingDialog = false
|
|
|
qingKong()
|
|
|
- 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
|
|
|
+ setTimeout(() => {
|
|
|
+ yiZhuMingDialog = false
|
|
|
+ yiZhuData.value = 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 {
|
|
|
+ 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 (stringIsBlank(row.frequCode)) {
|
|
|
+ if (stringNotBlank(res.data.frequCode)) {
|
|
|
+ yiZhuData.value.frequCode = res.data.frequCode
|
|
|
+ } else {
|
|
|
+ yiZhuData.value.frequCode = 'ONCE'
|
|
|
}
|
|
|
- })
|
|
|
- } 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 {
|
|
|
+ }
|
|
|
+ // 加载给药方式
|
|
|
+ if (stringIsBlank(yiZhuData.value.supplyCode)) {
|
|
|
+ if (stringNotBlank(res.data.supplyCode)) {
|
|
|
+ yiZhuData.value.supplyCode = res.data.supplyCode
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ setTimeout(() => {
|
|
|
+ console.error(e)
|
|
|
+ qingKong()
|
|
|
+ }, 500)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ yiZhuData.value.kjywFlag = 0
|
|
|
+ huoQuFeiYongXinXi(row.orderCode, '00')
|
|
|
+ .then((res) => {
|
|
|
+ yiZhuData.value.drugFlag = row.orderType
|
|
|
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)
|
|
|
- })
|
|
|
- }
|
|
|
- // 判断这个是不是 新添加的数据 如果是空的就是 新数据
|
|
|
- if (stringIsBlank(row.newData)) {
|
|
|
- getServerDateApi().then((res) => {
|
|
|
- yiZhuData.value.orderTime = res
|
|
|
- yiZhuData.value.startTime = res
|
|
|
- })
|
|
|
- }
|
|
|
- // 加载剂量单位 )
|
|
|
- // 用来加载默认的执行科室
|
|
|
- if (stringIsBlank(row.execUnit)) {
|
|
|
- if (stringNotBlank(huanZheXinXi.value.smallDept)) {
|
|
|
- yiZhuData.value.execUnit = huanZheXinXi.value.smallDept
|
|
|
- zhiXingKeShiData.value.push({
|
|
|
- code: huanZheXinXi.value.smallDept,
|
|
|
- name: huanZheXinXi.value.smallDeptName,
|
|
|
+ if (stringNotBlank(res.paiChiYiZhu)) {
|
|
|
+ tiShiBiaoTi.value.push({title: res.paiChiYiZhu, type: 'error'})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ setTimeout(() => {
|
|
|
+ qingKong()
|
|
|
+ }, 500)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 判断这个是不是 新添加的数据 如果是空的就是 新数据
|
|
|
+ if (stringIsBlank(row.newData)) {
|
|
|
+ getServerDateApi().then((res) => {
|
|
|
+ yiZhuData.value.orderTime = res
|
|
|
+ yiZhuData.value.startTime = res
|
|
|
})
|
|
|
}
|
|
|
- } else {
|
|
|
- metZhiXingKeShi(yiZhuData.value.execUnit)
|
|
|
- }
|
|
|
- if (stringIsBlank(row.id)) {
|
|
|
- yiZhuData.value.id = uuid(8, 10)
|
|
|
- }
|
|
|
+ // 用来加载默认的执行科室
|
|
|
+ if (stringIsBlank(row.execUnit)) {
|
|
|
+ if (stringNotBlank(huanZheXinXi.value.smallDept)) {
|
|
|
+ yiZhuData.value.execUnit = huanZheXinXi.value.smallDept
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stringIsBlank(row.id)) {
|
|
|
+ yiZhuData.value.id = uuid(8, 10)
|
|
|
+ }
|
|
|
+ }, 500)
|
|
|
}
|
|
|
|
|
|
/* 频率 */
|
|
|
const yaoPinPingLvData = ref([])
|
|
|
const pinLvRemoteMethod = (val) => {
|
|
|
- if (val.length > 1) {
|
|
|
- huoQuZhuYuanPinLv(val).then((res) => {
|
|
|
- yaoPinPingLvData.value = res
|
|
|
- })
|
|
|
- }
|
|
|
+ huoQuZhuYuanPinLv(val).then((res) => {
|
|
|
+ yaoPinPingLvData.value = res
|
|
|
+ })
|
|
|
}
|
|
|
/* 选择剂量 */
|
|
|
const yaoPinJiLiangData = ref([])
|
|
|
const jiLiangValue = ref(0)
|
|
|
const xuanZheJiLiang = (val) => {
|
|
|
- yaoPinJiLiangData.value.forEach((item) => {
|
|
|
- if (item.code === val) {
|
|
|
- jiLiangValue.value = item.value
|
|
|
- yiZhuData.value.dose = item.value
|
|
|
- yiZhuData.value.drugQuan = 1
|
|
|
- }
|
|
|
- })
|
|
|
+ jiLiangValue.value = val.value
|
|
|
+ yiZhuData.value.dose = val.value
|
|
|
+ yiZhuData.value.drugQuan = 1
|
|
|
}
|
|
|
/*计算领量*/
|
|
|
const jiSuanLingLiang = (val) => {
|
|
@@ -544,7 +510,6 @@ const fuYiZhuClick = () => {
|
|
|
/* 获取执行科室 */
|
|
|
const zhiXingKeShiData = ref([])
|
|
|
const metZhiXingKeShi = (val) => {
|
|
|
- if (stringIsBlank(val)) return
|
|
|
huoQuZhiXinKeShi(val).then((res) => {
|
|
|
zhiXingKeShiData.value = res
|
|
|
})
|
|
@@ -576,7 +541,6 @@ const tianJiaYiZhu = () => {
|
|
|
tianJiaYiZhuWeiYiBiaoShi.value.splice(index, 1)
|
|
|
ElMessage.error('重复添加,老记录已删除。')
|
|
|
}
|
|
|
- tianJiaShiHuoQuXiaLaKuangDeZhi()
|
|
|
tianJiaYiZhuWeiYiBiaoShi.value.push(yiZhuData.value.id)
|
|
|
yiZhuList.value.push(clone(yiZhuData.value))
|
|
|
qingKong()
|
|
@@ -586,35 +550,13 @@ const tianJiaYiZhu = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-// 这里是获取下拉框中的值的
|
|
|
-const tianJiaShiHuoQuXiaLaKuangDeZhi = () => {
|
|
|
- yaoPinPingLvData.value.forEach((item) => {
|
|
|
- if (item.code === yiZhuData.value.frequCode) {
|
|
|
- yiZhuData.value.frequCodeName = item.name
|
|
|
- }
|
|
|
- })
|
|
|
- yaoPinJiLiangData.value.forEach((item) => {
|
|
|
- if (item.code === yiZhuData.value.doseUnit) {
|
|
|
- yiZhuData.value.doseUnitName = item.name
|
|
|
- }
|
|
|
- })
|
|
|
- geiYaoFangShiData.value.forEach((item) => {
|
|
|
- if (item.code === yiZhuData.value.supplyCode) {
|
|
|
- yiZhuData.value.supplyCodeName = item.name
|
|
|
- }
|
|
|
- })
|
|
|
- zhiXingKeShiData.value.forEach((item) => {
|
|
|
- if (item.code === yiZhuData.value.execUnit) {
|
|
|
- yiZhuData.value.execUnitName = item.name
|
|
|
- }
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
/* 这个是点击单个修改的 */
|
|
|
const xiuGaiYiZhu = (val) => {
|
|
|
val.newData = true
|
|
|
xuanZhongFeiYong(val)
|
|
|
ElMessage.success('你点击了修改')
|
|
|
+ yiZhuList.value.splice(val, 1)
|
|
|
+ tianJiaYiZhuWeiYiBiaoShi.value.splice(val, 1)
|
|
|
}
|
|
|
|
|
|
/* 删除表格医嘱 */
|
|
@@ -776,10 +718,7 @@ const dianJiXiuGaiZhiXingKeShi = () => {
|
|
|
|
|
|
const qingKong = () => {
|
|
|
cuoWuXinXi.value = ''
|
|
|
- zhiXingKeShiData.value = []
|
|
|
yaoPinJiLiangData.value = []
|
|
|
- yaoPinPingLvData.value = []
|
|
|
- geiYaoFangShiData.value = []
|
|
|
jiLiangValue.value = 0
|
|
|
tiShiBiaoTi.value = []
|
|
|
yiZhuData.value = {
|