Browse Source

优化代码以及联动病案首页

DESKTOP-MINPJAU\Administrator 3 years ago
parent
commit
0e51890bc4

+ 9 - 0
src/components/zhu-yuan-yi-sheng/AllergenEntry.vue

@@ -86,6 +86,10 @@ const methodAllergen = (val) => {
   }
 }
 
+/**
+ *
+ * @returns {IMessageHandle} 错误信息
+ */
 const clickNewPatientAllergens = () => {
   if (newAllergen.code === '') {
     return ElMessage.error('请先选择数据')
@@ -104,6 +108,11 @@ const clickNewPatientAllergens = () => {
   })
 }
 
+/**
+ * 删除数据
+ * @param index 当前下标
+ * @param id
+ */
 const clickRemoveAllergens = (index, id) => {
   removePatientAllergens(id).then((res) => {
     patientAllergenData.data.splice(index, 1)

+ 88 - 69
src/views/data-modify/YzActOrderModify.vue

@@ -1,17 +1,18 @@
 <template>
   <el-container>
     <el-header height="36px" style="margin-top: 8px">
-      <el-input size="small" placeholder="在此输入住院号" @keyup.enter="query" v-model.trim="inpatientNo" clearable prefix-icon="el-icon-search" style="width: 300px">
+      <el-input size="small" placeholder="在此输入住院号" @keyup.enter="query" v-model.trim="inpatientNo" clearable
+                prefix-icon="el-icon-search" style="width: 300px">
         <template #prepend>住院号</template>
       </el-input>
       <el-input
-        size="small"
-        placeholder="在此输入医嘱号"
-        oninput="value=value.replace(/[^\d]/g,'')"
-        v-model.trim="actOrderNo"
-        clearable
-        prefix-icon="el-icon-search"
-        style="width: 300px"
+          size="small"
+          placeholder="在此输入医嘱号"
+          oninput="value=value.replace(/[^\d]/g,'')"
+          v-model.trim="actOrderNo"
+          clearable
+          prefix-icon="el-icon-search"
+          style="width: 300px"
       >
         <template #prepend>医嘱号</template>
       </el-input>
@@ -20,7 +21,9 @@
     </el-header>
     <el-container>
       <el-aside>
-        <el-table :height="tableHeight" stripe highlight-current-row :data="cptTable.slice((currentPage - 1) * pageSize, currentPage * pageSize)" style="text-align: center">
+        <el-table :height="tableHeight" stripe highlight-current-row
+                  :data="cptTable.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
+                  style="text-align: center">
           <el-table-column label="医嘱号" prop="actOrderNo"></el-table-column>
           <el-table-column label="医嘱名称" show-overflow-tooltip prop="orderName"></el-table-column>
           <el-table-column label="操作">
@@ -31,22 +34,24 @@
           </el-table-column>
         </el-table>
         <el-pagination
-          @current-change="handleCurrentChange"
-          :page-size="pageSize"
-          :current-page="currentPage"
-          background
-          small
-          style="background-color: white"
-          layout="prev, pager, next"
-          :total="cptTable.length"
+            @current-change="handleCurrentChange"
+            :page-size="pageSize"
+            :current-page="currentPage"
+            background
+            small
+            style="background-color: white"
+            layout="prev, pager, next"
+            :total="cptTable.length"
         >
         </el-pagination>
       </el-aside>
       <el-main>
         <!-- 申请修改医嘱的开始时间和结束时间 -->
-        <span>开始时间:</span><el-date-picker type="datetime" placeholder="选择开始时间" v-model="tianJiaShenHe.startTime"></el-date-picker>
+        <span>开始时间:</span>
+        <el-date-picker type="datetime" placeholder="选择开始时间" v-model="tianJiaShenHe.startTime"></el-date-picker>
         <el-divider direction="vertical"></el-divider>
-        <span>结束时间:</span><el-date-picker type="datetime" placeholder="选择结束时间" v-model="tianJiaShenHe.endTime"></el-date-picker>
+        <span>结束时间:</span>
+        <el-date-picker type="datetime" placeholder="选择结束时间" v-model="tianJiaShenHe.endTime"></el-date-picker>
         <el-divider direction="vertical"></el-divider>
         <el-button @click="tijiaoshenqing" type="success">提交</el-button>
         <el-divider></el-divider>
@@ -70,9 +75,11 @@
         <!-- 这里是查看审核状态的 -->
         <el-dialog v-model="dialogFormVisible" title="审核状态" :width="900">
           住院号:
-          <el-input style="width: 120px" clearable @blur="shenHeInpatientNo = $event.target.value.trim()" v-model="shenHeInpatientNo"></el-input>
+          <el-input style="width: 120px" clearable @blur="shenHeInpatientNo = $event.target.value.trim()"
+                    v-model="shenHeInpatientNo"></el-input>
           医嘱号:
-          <el-input oninput="value=value.replace(/[^\d]/g,'')" style="width: 120px" @blur="shenHeActOrderNo = $event.target.value.trim()" v-model="shenHeActOrderNo"></el-input>
+          <el-input oninput="value=value.replace(/[^\d]/g,'')" style="width: 120px"
+                    @blur="shenHeActOrderNo = $event.target.value.trim()" v-model="shenHeActOrderNo"></el-input>
           <el-divider direction="vertical"></el-divider>
           <el-button @click="queryZhuangTaiClick" type="primary">查询</el-button>
           <el-table :data="dialogTable" :height="tableHeight - 300">
@@ -90,11 +97,11 @@
             <el-table-column label="审核时间" width="80" prop="auditTime"></el-table-column>
           </el-table>
           <el-pagination
-            layout="prev, pager, next, total"
-            @current-change="shenHeXinXiCurrentChange"
-            :total="shenHeXinxiTotal"
-            :page-size="shenHeXinXiPageSize"
-            background
+              layout="prev, pager, next, total"
+              @current-change="shenHeXinXiCurrentChange"
+              :total="shenHeXinxiTotal"
+              :page-size="shenHeXinXiPageSize"
+              background
           ></el-pagination>
         </el-dialog>
         <el-drawer v-model="danGeShenQingDrawer" title="申请修改医嘱" size="50%">
@@ -168,25 +175,27 @@
             <el-row>
               <el-col :span="12">
                 开始时间:
-                <el-date-picker type="datetime" placeholder="修改开始时间" v-model="danGeShenQingDrawerData.newStartTime"></el-date-picker>
+                <el-date-picker type="datetime" placeholder="修改开始时间"
+                                v-model="danGeShenQingDrawerData.newStartTime"></el-date-picker>
               </el-col>
               <el-col :span="12">
                 结束时间:
-                <el-date-picker type="datetime" placeholder="修改结束时间" v-model="danGeShenQingDrawerData.newEndTime"></el-date-picker>
+                <el-date-picker type="datetime" placeholder="修改结束时间"
+                                v-model="danGeShenQingDrawerData.newEndTime"></el-date-picker>
               </el-col>
               <el-col :span="24">
-                <br />
+                <br/>
                 <el-input
-                  type="textarea"
-                  placeholder="申请备注"
-                  maxlength="250"
-                  @blur="danGeShenQingDrawerData.proposeRemark = $event.target.value.trim()"
-                  show-word-limit
-                  v-model="danGeShenQingDrawerData.proposeRemark"
+                    type="textarea"
+                    placeholder="申请备注"
+                    maxlength="250"
+                    @blur="danGeShenQingDrawerData.proposeRemark = $event.target.value.trim()"
+                    show-word-limit
+                    v-model="danGeShenQingDrawerData.proposeRemark"
                 ></el-input>
               </el-col>
             </el-row>
-            <br />
+            <br/>
             <el-button type="primary" @click="danGeShenQingSubmit">提交</el-button>
           </div>
         </el-drawer>
@@ -196,13 +205,14 @@
 </template>
 
 <script>
-import { reactive, ref } from '@vue/reactivity'
-import { ElMessage, ElMessageBox } from 'element-plus'
+import {reactive, ref} from '@vue/reactivity'
+import {ElMessage, ElMessageBox} from 'element-plus'
 import store from '@/store'
-import { yZauditStatus } from '@/utils/computed'
-import { yzModifyApply, yzQuery, chaKanZhuangTai, danGeShenQing } from '@/api/yz-data-mod/yz-xiugaiy'
-import { formatDatetime } from '@/utils/date'
-import { computed } from 'vue'
+import {yZauditStatus} from '@/utils/computed'
+import {yzModifyApply, yzQuery, chaKanZhuangTai, danGeShenQing} from '@/api/yz-data-mod/yz-xiugaiy'
+import {formatDatetime} from '@/utils/date'
+import {computed} from 'vue'
+import router from "@/router";
 
 export default {
   name: 'YzActOrderModify',
@@ -259,27 +269,28 @@ export default {
           inputPattern: /\S/,
           inputErrorMessage: '必填项不能为空,且不得超过100字 (∩•̀ω•́)⊃-*⋆',
         })
-          .then(({ value }) => {
-            tianJiaShenHe.value.proposeRemark = value
-            if (value.length > 100) {
-              ElMessage({
-                type: ' warning',
-                title: '错误',
-                message: '审核备注不超过100字',
-                showClose: true,
-              })
-            } else {
-              tianJiaShenHe.value.startTime = formatDatetime(tianJiaShenHe.value.startTime)
-              tianJiaShenHe.value.endTime = formatDatetime(tianJiaShenHe.value.endTime)
-              tianJiaShenHe.value.proposer = store.state.user.info.code
-              yzModifyApply(tianJiaShenHe.value).then((res) => {
-                actOrderNos.value = []
-                tianJiaShenHe.value = {}
-                tianJiaShenHe.value.list = []
-              })
-            }
-          })
-          .catch(() => {})
+            .then(({value}) => {
+              tianJiaShenHe.value.proposeRemark = value
+              if (value.length > 100) {
+                ElMessage({
+                  type: ' warning',
+                  title: '错误',
+                  message: '审核备注不超过100字',
+                  showClose: true,
+                })
+              } else {
+                tianJiaShenHe.value.startTime = formatDatetime(tianJiaShenHe.value.startTime)
+                tianJiaShenHe.value.endTime = formatDatetime(tianJiaShenHe.value.endTime)
+                tianJiaShenHe.value.proposer = store.state.user.info.code
+                yzModifyApply(tianJiaShenHe.value).then((res) => {
+                  actOrderNos.value = []
+                  tianJiaShenHe.value = {}
+                  tianJiaShenHe.value.list = []
+                })
+              }
+            })
+            .catch(() => {
+            })
       } else {
         ElMessage({
           type: 'warning',
@@ -400,12 +411,12 @@ export default {
       queryTerm.actOrderNo = actOrderNo.value
       queryTerm.inpatientNo = inpatientNo.value
       yzQuery(queryTerm)
-        .then((res) => {
-          dataTable.value = res
-        })
-        .catch(() => {
-          dataTable.value = []
-        })
+          .then((res) => {
+            dataTable.value = res
+          })
+          .catch(() => {
+            dataTable.value = []
+          })
     }
     /**
      * 单个修改医嘱
@@ -438,6 +449,14 @@ export default {
       })
     }
 
+    onActivated(() => {
+      let patNo = router.currentRoute.value.query.patNo
+      if (patNo) {
+        inpatientNo.value = patNo
+        query()
+      }
+    })
+
     return {
       actOrderNo,
       inpatientNo,

+ 55 - 51
src/views/data-modify/ZyChargeFeeModify.vue

@@ -1,10 +1,12 @@
 <template>
   <el-container>
     <el-header height="36px" style="margin-top: 8px">
-      <el-input size="small" placeholder="在此输入住院号" @keyup.enter="query()" v-model="inpatientNo" clearable prefix-icon="el-icon-search" style="width: 300px">
+      <el-input size="small" placeholder="在此输入住院号" @keyup.enter="query()" v-model="inpatientNo" clearable
+                prefix-icon="el-icon-search" style="width: 300px">
         <template #prepend>住院号</template>
       </el-input>
-      <el-input size="small" placeholder="输入收费项目码" @keyup.enter="query()" v-model="chargeCodeMx" clearable prefix-icon="el-icon-search" style="width: 300px">
+      <el-input size="small" placeholder="输入收费项目码" @keyup.enter="query()" v-model="chargeCodeMx" clearable
+                prefix-icon="el-icon-search" style="width: 300px">
         <template #prepend>收费项目码</template>
       </el-input>
       <el-divider direction="vertical"></el-divider>
@@ -59,26 +61,27 @@
     </el-main>
     <el-footer style="height: 40px">
       <el-pagination
-        v-show="data.list.length"
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="searchCriteria.currentPage"
-        :page-sizes="[20, 30, 40, 50, 100]"
-        :page-size="searchCriteria.pageSize"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="data.totalSize"
-        style="margin-top: 5px"
+          v-show="data.list.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="searchCriteria.currentPage"
+          :page-sizes="[20, 30, 40, 50, 100]"
+          :page-size="searchCriteria.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="data.totalSize"
+          style="margin-top: 5px"
       ></el-pagination>
     </el-footer>
   </el-container>
 </template>
 
 <script>
-import { reactive, ref } from '@vue/reactivity'
-import { queryHospitalizationExpenses, totalModify } from '@/api/yz-data-mod/zy-charge-fee-modify'
+import {reactive, ref} from '@vue/reactivity'
+import {queryHospitalizationExpenses, totalModify} from '@/api/yz-data-mod/zy-charge-fee-modify'
 import store from '@/store'
-import { ElMessageBox, ElMessage, ElNotification } from 'element-plus'
-import { describe, costState, aerYouSure, babyOrNot } from '@/utils/computed'
+import {ElMessageBox, ElMessage, ElNotification} from 'element-plus'
+import {describe, costState, aerYouSure, babyOrNot} from '@/utils/computed'
+
 export default {
   name: 'ZyChargeFeeModify',
   setup() {
@@ -116,36 +119,37 @@ export default {
         inputErrorMessage: '请输入正确的金额',
         inputValue: String(val.chargeFee),
       })
-        .then(({ value }) => {
-          if (value === String(val.chargeFee)) {
-            ElNotification.info({
-              message: '数据没有变化,无需修改',
-            })
-            retuen
-          }
-
-          data.data = val
-          data.data.newChargeFee = value
-          totalModify(data.data)
-            .then(() => {
-              ElNotification({
-                type: 'success',
-                dangerouslyUseHTMLString: true,
-                title: '金额修改成功',
-                message: '修改前:' + data.data.chargeFee + '<br/>修改后: ' + value,
-              })
-              queryHospitalizationExpenses(searchCriteria).then((res) => {
-                data.list = res.data
-              })
-            })
-            .catch(() => {
-              ElNotification({
-                type: 'error',
-                message: '修改失败',
+          .then(({value}) => {
+            if (value === String(val.chargeFee)) {
+              ElNotification.info({
+                message: '数据没有变化,无需修改',
               })
-            })
-        })
-        .catch(() => {})
+              retuen
+            }
+
+            data.data = val
+            data.data.newChargeFee = value
+            totalModify(data.data)
+                .then(() => {
+                  ElNotification({
+                    type: 'success',
+                    dangerouslyUseHTMLString: true,
+                    title: '金额修改成功',
+                    message: '修改前:' + data.data.chargeFee + '<br/>修改后: ' + value,
+                  })
+                  queryHospitalizationExpenses(searchCriteria).then((res) => {
+                    data.list = res.data
+                  })
+                })
+                .catch(() => {
+                  ElNotification({
+                    type: 'error',
+                    message: '修改失败',
+                  })
+                })
+          })
+          .catch(() => {
+          })
     }
 
     function query() {
@@ -153,13 +157,13 @@ export default {
       searchCriteria.chargeCodeMx = chargeCodeMx.value
       if (searchCriteria.inpatientNo !== '' && searchCriteria.chargeCodeMx !== '') {
         queryHospitalizationExpenses(searchCriteria)
-          .then((res) => {
-            data.list = res.data
-            data.totalSize = res.total
-          })
-          .catch(() => {
-            data.list = []
-          })
+            .then((res) => {
+              data.list = res.data
+              data.totalSize = res.total
+            })
+            .catch(() => {
+              data.list = []
+            })
       } else {
         ElMessage.error({
           message: '两项都需要填写',

+ 88 - 92
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/TianJiaYiZhu.vue

@@ -295,6 +295,7 @@ import SouSuoYiZhu from '@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/SouSuoYiZhu
 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 AllergenEntry from "@/components/zhu-yuan-yi-sheng/AllergenEntry.vue";
+import Sleep from "element-plus/packages/test-utils/sleep";
 
 const windowSize = computed(() => {
   return store.state.app.windowSize
@@ -360,109 +361,104 @@ const spanSize = (val) => {
   }
 }
 spanSize(windowSize.value.w)
-watch(
-    () => windowSize.value,
-    () => {
+watch(() => windowSize.value, () => {
       spanSize(windowSize.value.w)
     }
 )
 
 // 搜索医嘱
 let yiZhuMingDialog = $ref(false)
-const xuanZhongFeiYong = (row) => {
+const xuanZhongFeiYong = async (row) => {
   qingKong()
-  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'
-              }
-            }
-            // 加载给药方式
-            if (stringIsBlank(yiZhuData.value.supplyCode)) {
-              if (stringNotBlank(res.data.supplyCode)) {
-                yiZhuData.value.supplyCode = res.data.supplyCode
+  await Sleep(600)
+  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'
             }
-          })
-          .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'
-            if (stringNotBlank(res.paiChiYiZhu)) {
-              tiShiBiaoTi.value.push({title: res.paiChiYiZhu, type: 'error'})
+          }
+          // 加载给药方式
+          if (stringIsBlank(yiZhuData.value.supplyCode)) {
+            if (stringNotBlank(res.data.supplyCode)) {
+              yiZhuData.value.supplyCode = res.data.supplyCode
             }
-          })
-          .catch((e) => {
-            setTimeout(() => {
-              qingKong()
-            }, 500)
-          })
-    }
-    // 判断这个是不是 新添加的数据 如果是空的就是 新数据
-    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
-      }
-    }
-    if (stringIsBlank(row.id)) {
-      yiZhuData.value.id = uuid(8, 10)
+          }
+        })
+        .catch(async (e) => {
+          await Sleep(500)
+          qingKong()
+        })
+  } else {
+    yiZhuData.value.kjywFlag = 0
+    huoQuFeiYongXinXi(row.orderCode, '00')
+        .then((res) => {
+          yiZhuData.value.drugFlag = row.orderType
+          yiZhuData.value.frequCode = 'ONCE'
+          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
+    })
+  }
+  // 用来加载默认的执行科室
+  if (stringIsBlank(row.execUnit)) {
+    if (stringNotBlank(huanZheXinXi.value.smallDept)) {
+      yiZhuData.value.execUnit = huanZheXinXi.value.smallDept
     }
-  }, 500)
+  }
+  if (stringIsBlank(row.id)) {
+    yiZhuData.value.id = uuid(8, 10)
+  }
 }
 
 /* 频率 */

+ 36 - 6
src/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/YiZhuLuRu.vue

@@ -43,9 +43,19 @@
       <el-tag effect="dark" type="danger">停止</el-tag>
       <el-divider direction="vertical"></el-divider>
       <el-button icon="el-icon-plus" type="primary" @click="addYiZhuClick"> 添加</el-button>
-      <el-button :disabled="xuanZhongDeShuJu.length === 0" type="warning" @click="dianJiPiLiangTingZhi">批量停止</el-button>
+      <el-button :disabled="xuanZhongDeShuJu.length === 0" type="warning" @click="点击批量停止">批量停止</el-button>
       <el-divider direction="vertical"></el-divider>
-      <el-button :disabled="xuanZhongDeShuJu.length === 0" type="success" @click="dianJiFuZhuXuanZhongYiZhu">复制选中医嘱
+      <el-button :disabled="xuanZhongDeShuJu.length === 0"
+                 type="success"
+                 @click="dianJiFuZhuXuanZhongYiZhu">复制选中医嘱
+      </el-button>
+      <el-button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo) "
+                 @click="clickToModifyTheDoctorSOrderTime">
+        修改医嘱时间
+      </el-button>
+      <el-button type="warning" :disabled="stringIsBlank(huanZheXinXi.inpatientNo) "
+                 @click="jumpToMedicalRecord">
+        病案首页
       </el-button>
     </el-header>
     <el-main>
@@ -331,12 +341,12 @@ const zhiXingChaoZuo = () => {
 }
 
 let yiZhuChaoZuoDialog = $ref(false)
-const content = ref('')
+let content = ref('')
 const tingZhiRiQi = ref('')
 /**
  * 医嘱操作状态 1-设为紧急 2-撤销 3-停止  90-批量停止
  */
-const chaoZuoBiaoZhi = ref(0)
+let chaoZuoBiaoZhi = $ref(0)
 const yiZhuHao = ref(0)
 let yiZhuChaoZuoBiaoTi = $ref('')
 
@@ -433,8 +443,7 @@ function getYiZhuFlag(val) {
 /**
  * 点击批量停止
  */
-const dianJiPiLiangTingZhi = () => {
-  chaoZuoBiaoZhi = 90
+const 点击批量停止 = () => {
   yiZhuChaoZuoDialog = true
   yiZhuChaoZuoBiaoTi = '批量停止'
 }
@@ -443,6 +452,27 @@ const dianJiDuiHuaKuangZhongDeGuanBi = () => {
   yiZhuChaoZuoDialog = false
   content = ''
 }
+
+// 点击修改医嘱时间
+const clickToModifyTheDoctorSOrderTime = () => {
+  router.push({
+    name: 'yzActOrderModify',
+    query: {
+      patNo: huanZheXinXi.value.inpatientNo,
+    },
+  })
+}
+
+const jumpToMedicalRecord = () => {
+  router.push({
+    name: 'fillCaseFrontSheet',
+    query: {
+      patNo: huanZheXinXi.value.inpatientNo,
+      ward: huanZheXinXi.value.smallDept
+    }
+  })
+}
+
 </script>
 
 <style scoped>