浏览代码

解决草药代煎和执行科室问题

xiaochan 2 年之前
父节点
当前提交
f2ffa9c4c0

+ 2 - 1
src/components/pat-info-list/PatInfomationDialog.vue

@@ -11,7 +11,8 @@
                                               :sheet-data="sheetData"/>
             </el-tab-pane>
             <el-tab-pane label="医嘱">
-                <emr-order-list :pat-no="props.patNo" :times="props.times"/>
+                <emr-order-list :pat-no="props.patNo" :times="props.times"
+                                :in-the-hospital="props.leaveHospital === 1"/>
             </el-tab-pane>
             <el-tab-pane label="清单">
                 <charge-list :pat-no="props.patNo"

+ 41 - 0
src/components/xiao-chan/dept-code/DeptSelect.vue

@@ -0,0 +1,41 @@
+<template>
+    <el-select v-model="deptCode">
+        <el-option v-for="item in deptList"
+                   :value="item.code"
+                   :key="item.code"
+                   :label="item.name"/>
+    </el-select>
+</template>
+
+<script setup name='DeptSelect'>
+import {getDept} from "@/api/public-api";
+
+const props = defineProps({
+    modelValue: {
+        type: String,
+        default: ''
+    },
+})
+
+const emits = defineEmits(['update:modelValue', 'clear'])
+
+const deptList = ref([])
+const deptCode = computed({
+    get: () => props.modelValue,
+    set: (val) => {
+        emits('update:modelValue', val)
+    }
+})
+
+
+onMounted(() => {
+    getDept().then(res => {
+        deptList.value = res
+    })
+})
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 8 - 2
src/components/xiao-chan/xc-table-v2/XcTableV2.vue

@@ -59,7 +59,10 @@ import {ElCheckbox} from "element-plus";
 
 const props = defineProps({
     data: Array,
-    columns: Array,
+    columns: {
+        type: Array,
+        default: null
+    },
     height: {
         type: Number,
         default: 300
@@ -271,12 +274,15 @@ const isShow = ref(false)
 
 const fixedRight = () => {
     let temp = null
+    if (props.columns === null) {
+        return
+    }
     props.columns.forEach((item, index) => {
         if (temp === null && item.fixed && item.fixed === 'right') {
             temp = item
         }
         item.fixedStyle = fixedStyle(item, index);
-    })
+    });
     temp.fixedStyle['border-left'] = '1px solid #ebeef5'
 }
 

+ 4 - 2
src/components/zhu-yuan-yi-sheng/emr/auxiliary-tools/EmrOrderList.vue

@@ -44,7 +44,8 @@ import {emrCopyFunc} from '@/views/hospitalization/zhu-yuan-yi-sheng/electronic-
 
 const props = defineProps({
     patNo: String,
-    times: Number
+    times: Number,
+    inTheHospital: Boolean,
 })
 
 const list: Ref<Array<any>> = ref([])
@@ -132,7 +133,8 @@ const tempList = computed(() => {
 const open = () => {
     huoQuYiZhuShuJu({
         patNo: props.patNo,
-        times: props.times
+        times: props.times,
+        inTheHospital: props.inTheHospital
     }).then(res => {
         list.value = res as any
     })

+ 1 - 2
src/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-header/YzQueryCondition.vue

@@ -67,7 +67,7 @@ import StatusColor from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/yz-header/S
 import {
     errorMsg,
     isCydy,
-    queryParam, yiZhuData, yiZhuDataInit,
+    queryParam, tempYzData, yiZhuData, yiZhuDataInit,
     yzData, yzMitt
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {BizException, ExceptionEnum} from "@/utils/BizException";
@@ -102,7 +102,6 @@ const queryYz = async (isScroll = true) => {
             patNo: props.patientInfo.inpatientNo,
             times: props.patientInfo.admissTimes
         })
-
     } catch (e) {
         yzData.value = []
     }

+ 31 - 21
src/views/hospitalization/zhu-yuan-yi-sheng/cao-yao-yi-zhu/XinZhengCaoYao.vue

@@ -23,13 +23,14 @@
                 </el-col>
                 <el-col :span="6">
                     <el-form-item class="bi_tian" label="代煎:">
-                        <el-input-number v-model="chuFang.quantityDj" :max="chuFang.quantity"
-                                         :min="0"></el-input-number>
+                        <el-input-number v-model="chuFang.quantityDj"
+                                         :max="chuFang.quantity"
+                                         :min="0"/>
                     </el-form-item>
                 </el-col>
                 <el-col :span="6">
                     <el-form-item class="bi_tian" label="执行科室:">
-                        {{ huanZheXinXi.smallDeptName }}
+                        <dept-select v-model="chuFang.execDept"/>
                     </el-form-item>
                 </el-col>
                 <el-col :span="6">
@@ -49,22 +50,22 @@
                 </el-col>
                 <el-col :span="6">
                     <el-form-item label="加水量(ml):">
-                        <el-input-number v-model="chuFang.cyJsl"></el-input-number>
+                        <el-input-number v-model="chuFang.cyJsl"/>
                     </el-form-item>
                 </el-col>
                 <el-col :span="6">
                     <el-form-item label="煮取(ml):">
-                        <el-input-number v-model="chuFang.cyZql"></el-input-number>
+                        <el-input-number v-model="chuFang.cyZql"/>
                     </el-form-item>
                 </el-col>
                 <el-col :span="6">
                     <el-form-item label="复煎:">
-                        <el-input-number v-model="chuFang.cyFj"></el-input-number>
+                        <el-input-number v-model="chuFang.cyFj"/>
                     </el-form-item>
                 </el-col>
                 <el-col :span="6">
                     <el-form-item label="分几次:">
-                        <el-input-number v-model="chuFang.cyFfcs"></el-input-number>
+                        <el-input-number v-model="chuFang.cyFfcs"/>
                     </el-form-item>
                 </el-col>
                 <el-col :span="6">
@@ -173,7 +174,8 @@ import {
     cuoWuXinXi,
     huanZheXinXi,
     youWuXuanZheHuanZhe,
-    mingXi, yzHeaderSize
+    mingXi,
+    yzHeaderSize
 } from '@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng'
 import {
     baoCunCaoYao,
@@ -192,6 +194,8 @@ import XcComboGrid from "@/components/xiao-chan/combo-grid/XcComboGrid";
 import sleep from "@/utils/sleep";
 import CaoYaoCuoWuXinXin from "@/components/zhu-yuan-yi-sheng/cao-yao-yi-zhu/CaoYaoCuoWuXinXin.vue";
 import {getWindowSize} from "@/utils/window-size";
+import DeptSelect from "@/components/xiao-chan/dept-code/DeptSelect.vue";
+import Dig from "@/utils/math";
 
 const props = defineProps({
     saveSuccess: Function
@@ -205,16 +209,17 @@ const windowSize = computed(() => {
  * 处方信息
  */
 const chuFang = ref({
-    orderName: '',
+    orderName: '草药',
     quantity: 0,
     quantityDj: 0,
     cyMtjs: 0,
-    cyJsl: 0,
-    cyZql: 0,
+    cyJsl: 400,
+    cyZql: 200,
     cyFj: 0,
     cyFfcs: 0,
     cyJssm: '',
     groupNo: '81',
+    execDept: ''
 })
 /**
  * 编辑草药
@@ -242,16 +247,17 @@ const wipeData = () => {
         je: '',
     }
     chuFang.value = {
-        orderName: '',
+        orderName: '草药',
         quantity: 0,
         quantityDj: 0,
         cyMtjs: 0,
-        cyJsl: 0,
-        cyZql: 0,
+        cyJsl: 400,
+        cyZql: 200,
         cyFj: 0,
         cyFfcs: 0,
         cyJssm: '',
         groupNo: '81',
+        execDept: huanZheXinXi.value.smallDept
     }
 }
 
@@ -325,10 +331,14 @@ const dianJiBianJi = (row) => {
 watch(
     () => caoYao.value.quantity,
     () => {
-        caoYao.value.je = (caoYao.value.quantity * caoYao.value.retprice).toFixed(2)
+        caoYao.value.je = Dig.multiply(caoYao.value.quantity, caoYao.value.retprice).toFixed(2)
     }
 )
 
+watch(() => huanZheXinXi.value, () => {
+    chuFang.value.execDept = huanZheXinXi.value.smallDept
+})
+
 /**
  * 下面是取模板的
  */
@@ -400,12 +410,12 @@ const dianJiBaoCunCaoYao = () => {
     if (stringIsBlank(chuFang.value.orderName)) {
         return ElMessage.error('请输入处方名。')
     }
-    if (chuFang.value.quantity === 0) {
-        return ElMessage.error('请选择剂数')
-    }
-    if (chuFang.value.quantityDj === 0) {
-        return ElMessage.error('请选择代煎数')
-    }
+    // if (chuFang.value.quantity === 0) {
+    //     return ElMessage.error('请选择剂数')
+    // }
+    // if (chuFang.value.quantityDj === 0) {
+    //     return ElMessage.error('请选择代煎数')
+    // }
     let listCode = []
     mingXi.value.list.forEach((item) => {
         listCode.push(item.chargeCode + '-' + item.serial)