Browse Source

优化页面抽取组件

xiaochan 3 years ago
parent
commit
468497c202

+ 8 - 0
src/api/zhu-yuan-yi-sheng/cao-yao-yi-zhu.js

@@ -82,6 +82,14 @@ export function shanChuMuBan(name, deptCode) {
     })
 }
 
+export function shanChuCaoYao(patNo, times, orderNo) {
+    return request({
+        url: url + 'shanChuCaoYao',
+        method: 'get',
+        params: {patNo, times, orderNo}
+    })
+}
+
 
 
 

+ 9 - 0
src/api/zhu-yuan-yi-sheng/shou-shu-shen-qing.js

@@ -57,6 +57,15 @@ export function xinZengShouShuShenQing(data) {
     })
 }
 
+export function shanChuShouShu(recordId) {
+    return request({
+        url: url + 'shanChuShouShu',
+        method: 'get',
+        params: {recordId}
+    })
+}
+
+
 
 
 

+ 115 - 0
src/components/zhu-yuan-yi-sheng/cao-yao-yi-zhu/CaoYaoMuBan.vue

@@ -0,0 +1,115 @@
+<template>
+  <el-dialog v-model="dialog" title="取模板" width="60%" @close="emit('close')">
+    <el-container>
+      <el-aside style="width: 180px;">
+        <el-input v-model="queryName" placeholder="模板名称" style="width: 120px;"></el-input>
+        <el-button @click="dianJiaChaXunMuBan(0)">查询</el-button>
+        <el-table :data="muBanShuJu.muBan" :height="windowSize.h / 2.1" @row-click="dianJiChaKanMuBanXiangQing">
+          <el-table-column label="名称" prop="patternName"></el-table-column>
+          <el-table-column label="操作">
+            <template #default="scope">
+              <el-button circle icon="el-icon-delete" type="danger"
+                         @click="dianJiShanChuMuBan(scope.row,scope.$index)"></el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-aside>
+      <el-main>
+        <el-button :disabled="muBanShuJu.xuanZhongShuJu.length ===0"
+                   @click="emit('xuanZhongShuJu',muBanShuJu.xuanZhongShuJu)">确定
+        </el-button>
+        <el-table :data="muBanShuJu.muBanXiangQing" :height="windowSize.h / 2.1"
+                  @selection-change="huoQuMuBanXuanZhongShuJu">
+          <el-table-column type="selection"></el-table-column>
+          <el-table-column label="编码" prop="chargeCode"></el-table-column>
+          <el-table-column label="名称" prop="chargeCodeName"></el-table-column>
+          <el-table-column label="规格" prop="specification"></el-table-column>
+          <el-table-column label="数量" prop="quantity"></el-table-column>
+          <el-table-column label="单价" prop="retprice"></el-table-column>
+          <el-table-column label="药房" prop="groupNo"></el-table-column>
+          <el-table-column label="包装大小" prop="serial">
+            <template #default="scope">
+              <span v-if="scope.row.serial === '01'">小包装</span>
+              <span v-else-if="scope.row.serial === '99'">大包装</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-main>
+    </el-container>
+  </el-dialog>
+</template>
+
+<script>
+import {computed, onMounted, ref} from "vue";
+import store from "@/store";
+import {huoQuMuBan, muBanXiangQing, shanChuMuBan} from "@/api/zhu-yuan-yi-sheng/cao-yao-yi-zhu";
+import {ElMessageBox} from "element-plus";
+
+export default {
+  name: "CaoYaoMuBan",
+  emits: ['close', 'xuanZhongShuJu'],
+  setup(props, {emit}) {
+    const windowSize = computed(() => {
+      return store.state.app.windowSize
+    })
+    const queryName = ref('')
+    const muBanShuJu = ref({
+      muBan: [],
+      queryName: '',
+      muBanXiangQing: [],
+      xuanZhongShuJu: [],
+      currentPage: 1,
+      pageSize: 30,
+      total: 0
+    })
+    const dianJiaChaXunMuBan = (val) => {
+      huoQuMuBan(queryName.value, store.state.user.info.deptCode, muBanShuJu.value.currentPage, muBanShuJu.value.pageSize, muBanShuJu.value.total).then((res) => {
+        muBanShuJu.value.muBan = res.records
+        if (val === 0) {
+          muBanShuJu.value.total = res.total
+        }
+      })
+    }
+    const dianJiShanChuMuBan = (row, index) => {
+      ElMessageBox.confirm(`您确定删除<span style="color: teal">【${row.patternName}】</span>吗?`, '温馨提示', {
+        type: "warning",
+        dangerouslyUseHTMLString: true,
+      }).then(() => {
+        shanChuMuBan(row.patternName, store.state.user.info.deptCode).then(() => {
+          muBanShuJu.value.muBan.splice(index, 1)
+          muBanShuJu.value.muBanXiangQing = []
+        })
+      }).catch(() => {
+      })
+    }
+
+    const dianJiChaKanMuBanXiangQing = ({patternName, deptCode}) => {
+      muBanXiangQing(patternName, deptCode).then((res) => {
+        muBanShuJu.value.muBanXiangQing = res
+      })
+    }
+    const huoQuMuBanXuanZhongShuJu = (val) => {
+      muBanShuJu.value.xuanZhongShuJu = val
+    }
+
+    onMounted(() => {
+      dianJiaChaXunMuBan(0)
+    })
+    return {
+      windowSize,
+      dialog: true,
+      queryName,
+      dianJiaChaXunMuBan,
+      dianJiShanChuMuBan,
+      muBanShuJu,
+      dianJiChaKanMuBanXiangQing,
+      huoQuMuBanXuanZhongShuJu,
+      emit,
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 97 - 0
src/components/zhu-yuan-yi-sheng/cao-yao-yi-zhu/ChaXuanCaoYao.vue

@@ -0,0 +1,97 @@
+<template>
+  <el-dialog v-model="dialog" title="搜索草药" @close="emit('close')">
+    <el-input ref="queryNameInput" v-model="queryName" clearable
+              style="width: 120px;" @keyup.enter="dianJiChaXunCaoYao(0)"></el-input>
+    <el-divider direction="vertical"></el-divider>
+    <el-button icon="el-icon-search" type="primary" @click="dianJiChaXunCaoYao(0)">查询</el-button>
+    <el-divider direction="vertical"></el-divider>
+    <el-divider></el-divider>
+    <el-table :data="caoYaoShuJu.data" :height="windowSize.h / 2.1" highlight-current-row stripe>
+      <el-table-column label="编码" prop="chargeCode"></el-table-column>
+      <el-table-column label="名称" prop="chargeCodeName"></el-table-column>
+      <el-table-column label="单价" prop="retprice"></el-table-column>
+      <el-table-column label="规格" prop="specification"></el-table-column>
+      <el-table-column label="药房" prop="groupName"></el-table-column>
+      <el-table-column label="包装大小" prop="serial">
+        <template #default="scope">
+          <span v-if="scope.row.serial === '01'">小包装</span>
+          <span v-else-if="scope.row.serial === '99'">大包装</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="选中">
+        <template #default="scope">
+          <el-button type="text" @click="emit('xuanZhongShuJu',scope.row)">选中</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+        :current-page="caoYaoShuJu.currentPage"
+        :page-size="caoYaoShuJu.pageSize"
+        :total="caoYaoShuJu.total"
+        layout="total,  prev, pager, next"
+        @current-change="fanYe">
+    </el-pagination>
+  </el-dialog>
+</template>
+
+<script>
+import {computed, onMounted, ref} from "vue";
+import {huoQuCaoYao} from "@/api/zhu-yuan-yi-sheng/cao-yao-yi-zhu";
+import store from "@/store";
+
+export default {
+  name: "ChaXuanCaoYao",
+  emits: ['close', 'xuanZhongShuJu'],
+  props: {
+    groupNo: {
+      type: String
+    }
+  },
+  setup(props, {emit}) {
+    const windowSize = computed(() => {
+      return store.state.app.windowSize
+    })
+    const queryName = ref('')
+    const queryNameInput = ref(null)
+    const caoYaoShuJu = ref({
+      currentPage: 1,
+      pageSize: 20,
+      total: 0,
+    })
+
+    const dianJiChaXunCaoYao = (val) => {
+      huoQuCaoYao(queryName.value, props.groupNo, caoYaoShuJu.value.currentPage, caoYaoShuJu.value.pageSize, caoYaoShuJu.value.total).then((res) => {
+        if (val === 0) {
+          caoYaoShuJu.value.total = res.total
+        }
+        caoYaoShuJu.value.data = res.records
+      })
+    }
+
+    const fanYe = (val) => {
+      caoYaoShuJu.value.currentPage = val
+      dianJiChaXunCaoYao(caoYaoShuJu.value.total)
+    }
+
+    onMounted(() => {
+      setTimeout(() => {
+        queryNameInput.value.focus()
+      }, 300)
+    })
+    return {
+      dialog: true,
+      emit,
+      queryName,
+      dianJiChaXunCaoYao,
+      fanYe,
+      caoYaoShuJu,
+      windowSize,
+      queryNameInput
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 0 - 1
src/components/zhu-yuan-yi-sheng/hui-zhen-shen-qing/HuanZheZhenDuan.vue

@@ -37,7 +37,6 @@ export default {
     const dialog = true
 
     onMounted(() => {
-      console.log(props.zhenDuanLeiXing)
       huoQuHuanZheZhuYaoZhenDuan(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes, props.zhenDuanLeiXing).then((res) => {
         zhuYaoZhenDuanShuJu.value = res
       })

+ 25 - 4
src/views/hospitalization/zhu-yuan-yi-sheng/cao-yao-yi-zhu/ChaXunChaoYaoYiZhu.vue

@@ -45,11 +45,15 @@
         <el-table-column label="执行科室" prop="execDeptName"></el-table-column>
         <el-table-column label="操作" width="120">
           <template #default="scope">
-            <el-dropdown split-button trigger="click" type="primary" @click="caoYaoYiZhuXiangQing(scope.row)">
+            <el-dropdown split-button type="primary" @click="caoYaoYiZhuXiangQing(scope.row)">
               查看详情
               <template #dropdown>
                 <el-dropdown-menu>
-                  <el-dropdown-item>删除</el-dropdown-item>
+                  <el-dropdown-item>
+                    <el-button icon="el-icon-delete" type="danger" @click="dianJiShanChu(scope.row,scope.$index)">
+                      删除
+                    </el-button>
+                  </el-dropdown-item>
                 </el-dropdown-menu>
               </template>
             </el-dropdown>
@@ -88,11 +92,12 @@
 import {shortcuts} from '@/data/shortcuts'
 import {huanZheXinXi, youWuXuanZheHuanZhe} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {getDateRangeFormatDate} from "@/utils/date";
-import {huoQuCaoYaoShuJu, huoQuChaoYaoMingXi} from "@/api/zhu-yuan-yi-sheng/cao-yao-yi-zhu";
+import {huoQuCaoYaoShuJu, huoQuChaoYaoMingXi, shanChuCaoYao} from "@/api/zhu-yuan-yi-sheng/cao-yao-yi-zhu";
 import store from '@/store'
 import {stringIsBlank} from "@/utils/blank-utils";
 import {computed, onActivated, ref, watch} from "vue";
 import router from "@/router";
+import {ElMessageBox} from "element-plus";
 
 export default {
   name: "CaoYaoYiZhu",
@@ -161,6 +166,21 @@ export default {
       })
     }
 
+    const dianJiShanChu = (row, index) => {
+      console.log(row, index)
+      ElMessageBox.confirm(`您确定要删除${row.orderName}吗`, '提示', {
+        type: 'warning'
+      }).then(() => {
+        shanChuCaoYao(row.inpatientNo, row.admissTimes, row.orderNo).then((res) => {
+          caoYaoShuJu.value.data.splice(index, 1)
+        })
+      }).catch(() => {
+
+      })
+
+
+    }
+
     watch(() => huanZheXinXi.value, () => {
       dianJiChaXunYiZhu(0)
     })
@@ -181,7 +201,8 @@ export default {
       caoYaoYiZhuXiangQing,
       xiangQing,
       DianJiXinZengChaoYao,
-      shiFouFaYao
+      shiFouFaYao,
+      dianJiShanChu
     }
   }
 }

+ 27 - 172
src/views/hospitalization/zhu-yuan-yi-sheng/cao-yao-yi-zhu/XinZhengCaoYao.vue

@@ -3,7 +3,7 @@
     <el-header style="height: 40px">
       <el-button icon="el-icon-arrow-left" style="font-size: 14px" type="text" @click="router.go(-1)">返回</el-button>
       <el-divider direction="vertical"></el-divider>
-      <el-button type="primary" @click="quMuBan.dialog = true;dianJiaChaXunMuBan(0)">取模板</el-button>
+      <el-button type="primary" @click="muBanZuJian = true">取模板</el-button>
       <el-button :disabled="mingXi.list.length === 0 " type="success" @click="cunMuBan.dialog = true">存模板</el-button>
       <el-divider direction="vertical"></el-divider>
       <el-button :disabled="mingXi.list.length === 0 " type="success" @click="dianJiBaoCunCaoYao">保存数据</el-button>
@@ -95,7 +95,7 @@
         <el-row>
           <el-col :span="6">
             <el-form-item label="药品编码:">
-              <el-input v-model="caoYao.chargeCode" @click="dianJiCaoYaoBianMa"></el-input>
+              <el-input v-model="caoYao.chargeCode" @click="chaXunCaoYaoZuJian = true"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
@@ -118,6 +118,7 @@
       </el-form>
       <el-table :data="mingXi.list" :height="windowSize.h / 2.3" highlight-current-row stripe
                 @row-click="dianJiBianJi">
+        <el-table-column type="index"></el-table-column>
         <el-table-column label="编码" prop="chargeCode"></el-table-column>
         <el-table-column label="名称" prop="chargeCodeName"></el-table-column>
         <el-table-column label="数量" prop="quantity"></el-table-column>
@@ -144,73 +145,11 @@
     </el-main>
   </el-container>
   <!--搜索草药弹框-->
-  <el-dialog v-model="caoYaoXinXi.dialog" title="搜索草药">
-    <el-input ref="queryName" v-model="caoYaoXinXi.queryName" clearable
-              style="width: 120px;" @keyup.enter="dianJiChaXunCaoYao(0)"></el-input>
-    <el-divider direction="vertical"></el-divider>
-    <el-button icon="el-icon-search" type="primary" @click="dianJiChaXunCaoYao(0)">查询</el-button>
-    <el-divider direction="vertical"></el-divider>
-    <el-tag>双击数据选中</el-tag>
-    <el-divider></el-divider>
-    <el-table :data="caoYaoXinXi.data" :height="windowSize.h / 2.1" highlight-current-row stripe
-              @row-dblclick="dianJiXuanZhongCaoYao">
-      <el-table-column label="编码" prop="chargeCode"></el-table-column>
-      <el-table-column label="名称" prop="chargeCodeName"></el-table-column>
-      <el-table-column label="单价" prop="retprice"></el-table-column>
-      <el-table-column label="规格" prop="specification"></el-table-column>
-      <el-table-column label="药房" prop="groupName"></el-table-column>
-      <el-table-column label="包装大小" prop="serial">
-        <template #default="scope">
-          <span v-if="scope.row.serial === '01'">小包装</span>
-          <span v-else-if="scope.row.serial === '99'">大包装</span>
-        </template>
-      </el-table-column>
-    </el-table>
-    <el-pagination
-        :current-page="caoYaoXinXi.currentPage"
-        :page-size="caoYaoXinXi.pageSize"
-        :total="caoYaoXinXi.total"
-        layout="total,  prev, pager, next"
-        @current-change="caoYaoFanYe">
-    </el-pagination>
-  </el-dialog>
-  <!--取模板弹框-->
-  <el-dialog v-model="quMuBan.dialog" title="取模板" width="60%">
-    <el-container>
-      <el-aside style="width: 180px;">
-        <el-input v-model="quMuBan.queryName" placeholder="模板名称" style="width: 120px;"></el-input>
-        <el-button @click="dianJiaChaXunMuBan(0)">查询</el-button>
-        <el-table :data="quMuBan.muBan" :height="windowSize.h / 2.1" @row-click="dianJiChaKanMuBanXiangQing">
-          <el-table-column label="名称" prop="patternName"></el-table-column>
-          <el-table-column label="操作">
-            <template #default="scope">
-              <el-button circle icon="el-icon-delete" type="danger"
-                         @click="dianJiShanChuMuBan(scope.row,scope.$index)"></el-button>
-            </template>
-          </el-table-column>
-        </el-table>
-      </el-aside>
-      <el-main>
-        <el-button :disabled="quMuBan.xuanZhongShuJu.length ===0" @click="dianJiXuanZhongMuBanShuJu">确定</el-button>
-        <el-table :data="quMuBan.muBanXiangQing" :height="windowSize.h / 2.1"
-                  @selection-change="huoQuMuBanXuanZhongShuJu">
-          <el-table-column type="selection"></el-table-column>
-          <el-table-column label="编码" prop="chargeCode"></el-table-column>
-          <el-table-column label="名称" prop="chargeCodeName"></el-table-column>
-          <el-table-column label="规格" prop="specification"></el-table-column>
-          <el-table-column label="数量" prop="quantity"></el-table-column>
-          <el-table-column label="单价" prop="retprice"></el-table-column>
-          <el-table-column label="药房" prop="groupNo"></el-table-column>
-          <el-table-column label="包装大小" prop="serial">
-            <template #default="scope">
-              <span v-if="scope.row.serial === '01'">小包装</span>
-              <span v-else-if="scope.row.serial === '99'">大包装</span>
-            </template>
-          </el-table-column>
-        </el-table>
-      </el-main>
-    </el-container>
-  </el-dialog>
+  <cha-xuan-cao-yao v-if="chaXunCaoYaoZuJian" :group-no="chuFang.groupNo"
+                    @close="chaXunCaoYaoZuJian = false" @xuanZhongShuJu="dianJiXuanZhongCaoYao"></cha-xuan-cao-yao>
+  <!-- 获取草药模板 -->
+  <cao-yao-mu-ban v-if="muBanZuJian" @close="muBanZuJian = false"
+                  @xuanZhongShuJu="dianJiXuanZhongMuBanShuJu"></cao-yao-mu-ban>
   <!-- 下面是新增模板 -->
   <el-dialog v-model="cunMuBan.dialog" center title="存模板">
     模板名称:
@@ -223,23 +162,16 @@
 import router from '@/router'
 import {computed, onMounted, ref, watch} from "vue";
 import {huanZheXinXi, youWuXuanZheHuanZhe} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
-import {
-  baoCunCaoYao,
-  chongFuMuBanMing,
-  cunMuBanApi,
-  fuYongFangFa,
-  huoQuCaoYao,
-  huoQuMuBan,
-  muBanXiangQing,
-  shanChuMuBan
-} from "@/api/zhu-yuan-yi-sheng/cao-yao-yi-zhu";
+import {baoCunCaoYao, chongFuMuBanMing, cunMuBanApi, fuYongFangFa} from "@/api/zhu-yuan-yi-sheng/cao-yao-yi-zhu";
 import store from "@/store";
 import {ElMessage, ElMessageBox} from "element-plus";
 import {stringIsBlank} from "@/utils/blank-utils";
+import ChaXuanCaoYao from "@/components/zhu-yuan-yi-sheng/cao-yao-yi-zhu/ChaXuanCaoYao.vue";
+import CaoYaoMuBan from "@/components/zhu-yuan-yi-sheng/cao-yao-yi-zhu/CaoYaoMuBan.vue";
 
 export default {
   name: "XinZhenCaoYao",
-
+  components: {CaoYaoMuBan, ChaXuanCaoYao},
   setup() {
     const windowSize = computed(() => {
       return store.state.app.windowSize
@@ -282,17 +214,8 @@ export default {
       list: [],
     })
 
-    /**
-     * 查询的草药信息
-     */
-    const caoYaoXinXi = ref({
-      queryName: '',
-      dialog: false,
-      data: [],
-      currentPage: 1,
-      pageSize: 20,
-      total: 0
-    })
+
+    const chaXunCaoYaoZuJian = ref(false)
 
     /**
      * 查询草药信息中的 搜索框
@@ -305,28 +228,6 @@ export default {
      */
     const fuYongFangFaShuJu = ref([])
 
-
-    const dianJiCaoYaoBianMa = () => {
-      caoYaoXinXi.value.dialog = true
-      setTimeout(() => {
-        queryName.value.focus()
-      }, 100)
-    }
-
-    const dianJiChaXunCaoYao = (val) => {
-      huoQuCaoYao(caoYaoXinXi.value.queryName, chuFang.value.groupNo, caoYaoXinXi.value.currentPage, caoYaoXinXi.value.pageSize, caoYaoXinXi.value.total).then((res) => {
-        if (val === 0) {
-          caoYaoXinXi.value.total = res.total
-        }
-        caoYaoXinXi.value.data = res.records
-      })
-    }
-
-    const caoYaoFanYe = (val) => {
-      caoYaoXinXi.value.currentPage = val
-      dianJiChaXunCaoYao(caoYaoXinXi.value.total)
-    }
-
     const dianJiXuanZhongCaoYao = (row) => {
       let key = row.chargeCode + row.serial
       if (mingXi.value.weiYi.indexOf(key) > -1) {
@@ -351,44 +252,17 @@ export default {
     /**
      * 下面是取模板的
      */
-    const quMuBan = ref({
-      dialog: false,
-      muBan: [],
-      queryName: '',
-      muBanXiangQing: [],
-      xuanZhongShuJu: [],
-      currentPage: 1,
-      pageSize: 30,
-      total: 0
-    })
-    const dianJiaChaXunMuBan = (val) => {
-      huoQuMuBan(quMuBan.value.queryName, store.state.user.info.deptCode, quMuBan.value.currentPage, quMuBan.value.pageSize, quMuBan.value.total).then((res) => {
-        quMuBan.value.muBan = res.records
-        if (val === 0) {
-          quMuBan.value.total = res.total
-        }
-      })
-    }
-
-    const dianJiChaKanMuBanXiangQing = ({patternName, deptCode}) => {
-      muBanXiangQing(patternName, deptCode).then((res) => {
-        quMuBan.value.muBanXiangQing = res
-      })
-    }
-
-    const huoQuMuBanXuanZhongShuJu = (val) => {
-      quMuBan.value.xuanZhongShuJu = val
-    }
+    const muBanZuJian = ref(false)
 
-    const dianJiXuanZhongMuBanShuJu = () => {
+    const dianJiXuanZhongMuBanShuJu = (data) => {
       let flag = false;
-      for (let item of quMuBan.value.xuanZhongShuJu) {
+      for (let item of data) {
         if (item.groupNo !== chuFang.value.groupNo) {
           ElMessage.error("模板药房和当前药房不相同")
           return
         }
       }
-      quMuBan.value.xuanZhongShuJu.forEach(item => {
+      data.forEach(item => {
         let key = item.chargeCode + item.serial
         if (mingXi.value.weiYi.indexOf(key) > -1) {
           flag = true
@@ -400,7 +274,11 @@ export default {
         }
       })
       if (flag) {
-        ElMessage.error('请勿重复添加。')
+        ElMessage({
+          showClose: true,
+          message: '请勿重复添加。',
+          type: 'error'
+        })
       }
     }
 
@@ -454,29 +332,13 @@ export default {
         data.admissTimes = huanZheXinXi.value.admissTimes
         data.list = mingXi.value.list
         data.deptCode = store.state.user.info.deptCode
-        console.log(data)
         baoCunCaoYao(data).then((res) => {
-          console.log(res)
+          router.go(-1)
         })
       }).catch(() => {
       })
     }
 
-    const dianJiShanChuMuBan = (row, index) => {
-      ElMessageBox.confirm(`您确定删除<span style="color: teal">【${row.patternName}】</span>吗?`, '温馨提示', {
-        type: "warning",
-        dangerouslyUseHTMLString: true,
-      }).then(() => {
-        shanChuMuBan(row.patternName, store.state.user.info.deptCode).then(() => {
-          quMuBan.value.muBan.splice(index, 1)
-          quMuBan.value.muBanXiangQing = []
-        })
-      }).catch(() => {
-      })
-
-    }
-
-
     onMounted(() => {
       fuYongFangFa().then(res => {
         fuYongFangFaShuJu.value = res
@@ -497,24 +359,17 @@ export default {
       ],
       fuYongFangFaShuJu,
       mingXi,
-      caoYaoXinXi,
-      dianJiChaXunCaoYao,
       windowSize,
       dianJiXuanZhongCaoYao,
-      caoYaoFanYe,
       dianJiBianJi,
       caoYao,
-      dianJiCaoYaoBianMa,
       queryName,
-      quMuBan,
-      dianJiaChaXunMuBan,
-      dianJiChaKanMuBanXiangQing,
       dianJiCunMuBan,
       cunMuBan,
-      dianJiXuanZhongMuBanShuJu,
-      huoQuMuBanXuanZhongShuJu,
       dianJiBaoCunCaoYao,
-      dianJiShanChuMuBan
+      chaXunCaoYaoZuJian,
+      muBanZuJian,
+      dianJiXuanZhongMuBanShuJu
     }
   }
 }

+ 3 - 4
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianChaShenQing.vue

@@ -21,9 +21,10 @@
       <el-button icon="el-icon-plus" type="success" @click="daKaiTianJiaJianCha">添加</el-button>
     </el-header>
     <el-container>
-      <el-aside style="width: 330px;">
+      <el-aside style="width: 450px;">
         <el-table :data="jianChaShuJu.data" :height="windowSize.h / 1.4" :row-class-name="tableRowClassName">
           <el-table-column label="项目名称" prop="orderName" show-overflow-tooltip></el-table-column>
+          <el-table-column label="接受" prop="receiveFlagName" show-overflow-tooltip></el-table-column>
           <el-table-column label="时间" prop="startTime">
             <template #default="scope">
               <span v-html="huanHangXianShi(scope.row.startTime)"></span>
@@ -151,14 +152,12 @@ export default {
     }
 
     const dianJiShanChu = (row, index) => {
-      console.log(row)
       ElMessageBox.confirm(`您确定要删除【${row.orderName}】吗?`, '提示').then(() => {
         shanChuJianChaJianYan(row.reqNo, row.inpatientNo, row.admissTimes).then((res) => {
-          console.log(row, index)
+          jianChaShuJu.value.data.splice(index, 1)
         })
       }).catch(() => {
       })
-
     }
 
     const querySearchAsync = (val, cb) => {

+ 23 - 2
src/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/JianYanShenQing.vue

@@ -31,6 +31,12 @@
         <el-table-column label="申请时间" prop="reqDate" show-overflow-tooltip></el-table-column>
         <el-table-column label="申请科室" prop="reqDeptName"></el-table-column>
         <el-table-column label="申请医生" prop="reqDoctorName"></el-table-column>
+        <el-table-column label="接受" prop="receiveFlagName"></el-table-column>
+        <el-table-column label="操作">
+          <template #default="scope">
+            <el-button icon="el-icon-delete" type="danger" @click="dianJiShanChu(scope.row,scope.$index)">删除</el-button>
+          </template>
+        </el-table-column>
       </el-table>
       <el-pagination
           :current-page="chaXunJianYanTiaoJian.currentPage"
@@ -51,8 +57,13 @@ import {shortcuts} from '@/data/shortcuts'
 import store from "@/store";
 import {getDateRangeFormatDate} from "@/utils/date";
 import {huanZheXinXi, youWuXuanZheHuanZhe} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
-import {huoQuJianYan, huoQuJianYanJianChaMing} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
+import {
+  huoQuJianYan,
+  huoQuJianYanJianChaMing,
+  shanChuJianChaJianYan
+} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
 import router from "@/router";
+import {ElMessageBox} from "element-plus";
 
 export default {
   name: "JianYanShenQing",
@@ -109,6 +120,15 @@ export default {
       })
     }
 
+    const dianJiShanChu = (row, index) => {
+      ElMessageBox.confirm(`您确定要删除【${row.orderName}】吗?`, '提示').then(() => {
+        shanChuJianChaJianYan(row.reqNo, row.inpatientNo, row.admissTimes).then((res) => {
+          jianYanShuJu.value.splice(index, 1)
+        })
+      }).catch(() => {
+      })
+    }
+
     const dianJiXinZengJianYan = () => {
       router.push({
         name: 'xinZengShuJu',
@@ -132,7 +152,8 @@ export default {
       querySearchAsync,
       jianYanShuJu,
       tianJiaJianYan,
-      dianJiXinZengJianYan
+      dianJiXinZengJianYan,
+      dianJiShanChu
     }
   }
 }

+ 37 - 8
src/views/hospitalization/zhu-yuan-yi-sheng/shou-shu-shen-qing/ShouShuShenQing.vue

@@ -20,17 +20,34 @@
       <el-button icon="el-icon-plus" type="success" @click="dianJiXinZhenShouShu">新增</el-button>
     </el-header>
     <el-container>
-      <el-aside>
+      <el-aside style="width: 450px">
         <el-table :data="shouShuShuJu.data" :height="windowSize.h / 1.4" :row-class-name="rowClass">
           <el-table-column label="申请号" prop="recordId" show-overflow-tooltip></el-table-column>
+          <el-table-column label="申请号" prop="statusName" show-overflow-tooltip></el-table-column>
           <el-table-column label="项目名称" prop="opName" show-overflow-tooltip></el-table-column>
           <el-table-column label="手术时间" prop="opDatetime" show-overflow-tooltip></el-table-column>
-          <el-table-column fixed="right" label="操作" width="80">
+          <el-table-column fixed="right" label="操作" width="120">
             <template #default="scope">
-              <el-button circle icon="el-icon-view" title="查看"
-                         @click="dianJiChaKanShouShu(scope.row,scope.$index)"></el-button>
-              <el-button circle icon="iconfont icon-dayin" title="打印"
-                         @click="dianJiDaYing(scope.row,scope.$index)"></el-button>
+              <el-dropdown split-button type="primary" @click="dianJiChaKanShouShu(scope.row,scope.$index)">
+                查看
+                <template #dropdown>
+                  <el-dropdown-menu>
+                    <el-dropdown-item>
+                      <el-button icon="el-icon-printer" type="warning"
+                                 @click="dianJiDaYing(scope.row,scope.$index)">打印
+                      </el-button>
+                    </el-dropdown-item>
+                    <br>
+                    <el-dropdown-item>
+                      <el-button icon="el-icon-delete" type="danger" @click="dianJiShanChu(scope.row,scope.$index)">
+                        删除
+                      </el-button>
+                    </el-dropdown-item>
+                  </el-dropdown-menu>
+                </template>
+              </el-dropdown>
+
+
             </template>
           </el-table-column>
         </el-table>
@@ -55,7 +72,8 @@ import {computed, ref, watch} from "vue";
 import {
   huoQuShouShu,
   huoQuShouShuMingCheng,
-  huoQuShouShuShenQingDaYing
+  huoQuShouShuShenQingDaYing,
+  shanChuShouShu
 } from "@/api/zhu-yuan-yi-sheng/shou-shu-shen-qing";
 import {huanZheXinXi, youWuXuanZheHuanZhe} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
 import {shortcuts} from '@/data/shortcuts'
@@ -63,6 +81,7 @@ import store from "@/store";
 import DaYingShouShuShengQingDan from "@/components/zhu-yuan-yi-sheng/shou-shu-shen-qing/DaYingShouShuShengQingDan.vue";
 import {stringNotBlank} from "@/utils/blank-utils";
 import router from "@/router";
+import {ElMessageBox} from "element-plus";
 
 export default {
   name: "ShouShuShenQing",
@@ -134,7 +153,6 @@ export default {
       huoQuShouShuShenQingDaYing(huanZheXinXi.value.inpatientNo, huanZheXinXi.value.admissTimes, row.recordId).then((res) => {
         daYing.value.data = res
         tableIndex.value = index
-        console.log(res)
         if (stringNotBlank(res.applyDate)) {
           res.applyDate = res.applyDate.split(" ")[0]
         }
@@ -144,6 +162,15 @@ export default {
       })
     }
 
+    const dianJiShanChu = (row, index) => {
+      ElMessageBox.confirm(`您确定要删除【${row.opName}】吗?`, '提示', {}).then(() => {
+        console.log(row, index)
+        shanChuShouShu(row.recordId)
+      }).catch(() => {
+
+      })
+    }
+
     watch(() => huanZheXinXi.value, () => {
       dianJiChaXunShouShu(0)
     })
@@ -185,9 +212,11 @@ export default {
       daYing,
       rowClass,
       dianJiXinZhenShouShu,
+      dianJiShanChu,
     }
   }
 }
+
 </script>
 
 <style scoped>