|
@@ -35,12 +35,20 @@
|
|
|
<el-row>
|
|
|
<el-col :span="span">
|
|
|
<el-form-item class="bi_tian" label="医嘱名称:" prop="orderName">
|
|
|
- <el-input v-model="yiZhuData.orderName" placeholder="placeholder"
|
|
|
- type="textarea"
|
|
|
- v-if="yiZhuData.orderCode === '06054'" :maxlength="50" show-word-limit></el-input>
|
|
|
- <div style="border-bottom: 1px solid #000; height: 29px;width: 100%" v-else @click="yiZhuMingDialog = true">
|
|
|
- {{ yiZhuData.orderName }}
|
|
|
- </div>
|
|
|
+ <xc-combo-grid
|
|
|
+ ref="searchRef"
|
|
|
+ v-model="yiZhuData.orderName"
|
|
|
+ :table-header="tableHeader"
|
|
|
+ :query-data-func="huoQuXiangMu"
|
|
|
+ :current-key="yiZhuData.orderCode + yiZhuData.orderName"
|
|
|
+ @rowClick="xuanZhongFeiYong">
|
|
|
+ </xc-combo-grid>
|
|
|
+ <!-- <el-input v-model="yiZhuData.orderName" placeholder="placeholder"-->
|
|
|
+ <!-- type="textarea"-->
|
|
|
+ <!-- v-if="yiZhuData.orderCode === '06054'" :maxlength="50" show-word-limit></el-input>-->
|
|
|
+ <!-- <div style="border-bottom: 1px solid #000; height: 29px;width: 100%" v-else @click="yiZhuMingDialog = true">-->
|
|
|
+ <!-- {{ yiZhuData.orderName }}-->
|
|
|
+ <!-- </div>-->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="span">
|
|
@@ -353,9 +361,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <!-- 这里是搜索医嘱的 -->
|
|
|
- <sou-suo-yi-zhu v-if="yiZhuMingDialog" @close="closeTheDoctorSOrderSearchBox()"
|
|
|
- @xuanZhongFeiYong="xuanZhongFeiYong"></sou-suo-yi-zhu>
|
|
|
+
|
|
|
<!-- 这个是过敏源的 -->
|
|
|
<AllergenEntry v-if="allergenDialog"
|
|
|
:pat-no="props.patientInfo.inpatientNo"
|
|
@@ -388,7 +394,8 @@ import {
|
|
|
huoQuZhiXinKeShi,
|
|
|
huoQuZhuYuanPinLv,
|
|
|
saveTheDoctorSOrder,
|
|
|
- singleDataCheck
|
|
|
+ singleDataCheck,
|
|
|
+ huoQuXiangMu
|
|
|
} from '@/api/zhu-yuan-yi-sheng/yi-zhu-lu-ru'
|
|
|
import {
|
|
|
fuZhiYiZhu,
|
|
@@ -415,6 +422,9 @@ import {setScrollTop} from "@/utils/el-table-scroll";
|
|
|
import XcTableV3 from "@/components/xiao-chan/table-v3/XcTableV3.vue";
|
|
|
import sleep from "@/utils/sleep";
|
|
|
import BaoCunXinXi from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/BaoCunXinXi.vue";
|
|
|
+import {useDocumentVisibility} from "@vueuse/core";
|
|
|
+import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
+import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid";
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -424,6 +434,23 @@ const props = defineProps({
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+let tableHeader = [
|
|
|
+ {label: '编码', prop: 'orderCode'},
|
|
|
+ {label: '名称', prop: 'orderName'},
|
|
|
+ {label: '规格', prop: 'drugSpecification'},
|
|
|
+ {label: '描述', prop: 'discription'},
|
|
|
+ {label: '库存', prop: 'stockAmount'},
|
|
|
+ {label: '大包装', prop: 'specPack'},
|
|
|
+ {label: '医保类型', prop: 'ybFlagNew'},
|
|
|
+ {label: '医保编码', prop: 'nationalCode'},
|
|
|
+ {label: '医保名称', prop: 'nationalName'},
|
|
|
+ {label: '医保备注', prop: 'ybComment'},
|
|
|
+ {label: '大输液', prop: 'infusionFlagName'},
|
|
|
+ {label: '厂家', prop: 'manuName'},
|
|
|
+ {label: '类型', prop: 'orderType'},
|
|
|
+ {label: '毒麻类型', prop: 'drugFlagName'}
|
|
|
+]
|
|
|
+
|
|
|
const windowSize = computed(() => {
|
|
|
return store.state.app.windowSize
|
|
|
})
|
|
@@ -510,12 +537,10 @@ watch(
|
|
|
)
|
|
|
|
|
|
// 搜索医嘱
|
|
|
-let yiZhuMingDialog = $ref(false)
|
|
|
const xuanZhongFeiYong = async (row) => {
|
|
|
fuYiZhuClick()
|
|
|
qingKong()
|
|
|
await Sleep(200)
|
|
|
- closeTheDoctorSOrderSearchBox()
|
|
|
yiZhuData.value = row
|
|
|
if (row.serial !== '00') {
|
|
|
huoQuFeiYongXinXi(row.orderCode, row.serial, props.patientInfo.smallDept)
|
|
@@ -543,8 +568,8 @@ const xuanZhongFeiYong = async (row) => {
|
|
|
yiZhuData.value.doseUnit = yaoPinJiLiangData.value[0].code
|
|
|
yiZhuData.value.dose = yaoPinJiLiangData.value[0].value
|
|
|
jiLiangValue.value = yaoPinJiLiangData.value[0].value
|
|
|
- jiSuanLingLiang(yiZhuData.value.dose)
|
|
|
}
|
|
|
+ jiSuanLingLiang(yiZhuData.value.dose)
|
|
|
// 加载默认频率 如果已经填写了 就用有的
|
|
|
if (stringIsBlank(row.frequCode)) {
|
|
|
if (stringNotBlank(res.data.frequCode)) {
|
|
@@ -619,11 +644,6 @@ const xuanZhongFeiYong = async (row) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const closeTheDoctorSOrderSearchBox = () => {
|
|
|
- yiZhuMingDialog = false
|
|
|
- xcHotKey(shortcutKeyRegistration)
|
|
|
-}
|
|
|
-
|
|
|
/* 频率 */
|
|
|
let pingLv = $ref(null)
|
|
|
const yaoPinPingLvData = ref([])
|
|
@@ -643,7 +663,6 @@ const xuanZheJiLiang = (val) => {
|
|
|
}
|
|
|
/*计算领量*/
|
|
|
const jiSuanLingLiang = (val) => {
|
|
|
-
|
|
|
if (jiLiangValue.value <= 0) return
|
|
|
let temp = Math.ceil(val / jiLiangValue.value);
|
|
|
|
|
@@ -659,7 +678,7 @@ const jiSuanLingLiang = (val) => {
|
|
|
|
|
|
}
|
|
|
|
|
|
-let minimumPickingQuantity = $ref(0)
|
|
|
+let minimumPickingQuantity = $ref(1)
|
|
|
|
|
|
|
|
|
/* 给药方式 */
|
|
@@ -766,11 +785,11 @@ const whetherToResetTheDataSubscript = () => {
|
|
|
/* 这个是点击单个修改的 */
|
|
|
const xiuGaiYiZhu = (val, index) => {
|
|
|
if (yiZhuData.value.orderCode) {
|
|
|
- ElMessage.warning('请先保存正在编辑的内容')
|
|
|
+ xcMessage.warning('请先保存正在编辑的内容')
|
|
|
return
|
|
|
}
|
|
|
xuanZhongFeiYong(val)
|
|
|
- ElMessage.success('你点击了修改')
|
|
|
+ xcMessage.success('你点击了修改')
|
|
|
yiZhuList.value.splice(index, 1)
|
|
|
tianJiaYiZhuWeiYiBiaoShi.value.splice(index, 1)
|
|
|
whetherToResetTheDataSubscript()
|
|
@@ -780,7 +799,7 @@ const xiuGaiYiZhu = (val, index) => {
|
|
|
const shanChuBiaoGeYiZhu = (val) => {
|
|
|
yiZhuList.value.splice(val, 1)
|
|
|
tianJiaYiZhuWeiYiBiaoShi.value.splice(val, 1)
|
|
|
- ElMessage.success('删除成功')
|
|
|
+ xcMessage.success('删除成功')
|
|
|
whetherToResetTheDataSubscript()
|
|
|
}
|
|
|
|
|
@@ -788,7 +807,7 @@ const shanChuBiaoGeYiZhu = (val) => {
|
|
|
const dianJiFuZhiYiZhu = (val) => {
|
|
|
yiZhuData.value = clone(val)
|
|
|
yiZhuData.value.id = uuid(8, 10)
|
|
|
- ElMessage.success('复制成功')
|
|
|
+ xcMessage.success('复制成功')
|
|
|
}
|
|
|
|
|
|
// 展开table
|
|
@@ -839,7 +858,6 @@ const baoCunYiZhuClick = () => {
|
|
|
saveTheDoctorSOrder(data).then((res) => {
|
|
|
ElMessage.success('医嘱确认成功')
|
|
|
}).catch((e) => {
|
|
|
- console.log(e)
|
|
|
errorMessageData = e
|
|
|
openErrorDialog()
|
|
|
}).finally(() => {
|
|
@@ -1063,13 +1081,6 @@ const saveOrAddADoctorSOrder = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * 打开医嘱搜索框
|
|
|
- */
|
|
|
-const openSearchBox = () => {
|
|
|
- yiZhuMingDialog = true
|
|
|
-}
|
|
|
-
|
|
|
/// 这里是 ctrl 快捷键 结束
|
|
|
|
|
|
const regainFocus = () => {
|
|
@@ -1153,11 +1164,16 @@ const deleteSelectedOrders = () => {
|
|
|
shanChuBiaoGeYiZhu(yiZhuList.value[dataIndex])
|
|
|
}
|
|
|
|
|
|
+const searchRef = ref()
|
|
|
+const openSearch = () => {
|
|
|
+ searchRef.value.focus()
|
|
|
+}
|
|
|
+
|
|
|
// alt 快捷键结束
|
|
|
|
|
|
// 注册快捷键的 list
|
|
|
let shortcutKeyRegistration = {
|
|
|
- ctrl: {s: saveOrAddADoctorSOrder, f: openSearchBox, 1: regainFocus},
|
|
|
+ ctrl: {s: saveOrAddADoctorSOrder, f: openSearch, 1: regainFocus},
|
|
|
alt: {
|
|
|
PageUp: upData,
|
|
|
PageDown: downData,
|
|
@@ -1228,10 +1244,48 @@ onMounted(async () => {
|
|
|
]
|
|
|
}
|
|
|
fuZhiYiZhu.value = []
|
|
|
- testData()
|
|
|
+ // testData()
|
|
|
})
|
|
|
|
|
|
|
|
|
+const visibility = useDocumentVisibility()
|
|
|
+
|
|
|
+let copyOrderPopup = null
|
|
|
+
|
|
|
+watch(() => visibility.value, () => {
|
|
|
+
|
|
|
+ if (visibility.value === "visible") {
|
|
|
+ let copy = localStorage.getItem('copyDoctorSOrder')
|
|
|
+ if (copy === null) {
|
|
|
+ ElMessageBox.close()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ copy = JSON.parse(copy)
|
|
|
+
|
|
|
+ if (copyOrderPopup !== null) return;
|
|
|
+
|
|
|
+ copyOrderPopup = ElMessageBox.confirm('是否要粘贴医嘱', '提示', {
|
|
|
+ type: 'info',
|
|
|
+ }).then(async () => {
|
|
|
+ let serverTime = await getServerDateApi();
|
|
|
+ copy.forEach(item => {
|
|
|
+ item.orderTime = serverTime
|
|
|
+ item.startTime = serverTime
|
|
|
+ item.endTime = serverTime
|
|
|
+ item.frequCodeName = '一次'
|
|
|
+ item.frequCode = 'ONCE'
|
|
|
+ yiZhuList.value.push(item)
|
|
|
+ })
|
|
|
+ localStorage.removeItem('copyDoctorSOrder')
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (yiZhuList.value.length > 0) {
|
|
|
+ document.title = `医嘱录入:【${props.patientInfo.name}】*`
|
|
|
+ }
|
|
|
+ }
|
|
|
+}, {immediate: true})
|
|
|
+
|
|
|
const cloneWindow = () => {
|
|
|
window.opener = null
|
|
|
window.close()
|