浏览代码

输液瓶贴调整

zengfanwei 2 周之前
父节点
当前提交
e7cf642655

+ 34 - 0
src/api/lc/purchasePlan.js

@@ -0,0 +1,34 @@
+import request from "../../utils/request";
+
+//新增或修改采购计划
+export function save(data) {
+    return request({
+        url: '/LcPurchasePlan/save',
+        method: 'post',
+        data,
+    })
+}
+
+//模糊查询采购计划列表(分页)
+export function getLcPurchasePlanList(data) {
+    return request({
+        url: '/LcPurchasePlan/getLcPurchasePlanList',
+        method: 'post',
+        data,
+    })
+}
+
+//删除采购明细
+export function deleteLcPurchasePlanDetailList(data) {
+    return request({
+        url: '/LcPurchasePlan/deleteLcPurchasePlanDetailList',
+        method: 'post',
+        data,
+    })
+}
+
+
+
+
+
+

+ 1 - 1
src/auto-imports.d.ts

@@ -65,6 +65,6 @@ declare global {
 // for type re-export
 declare global {
   // @ts-ignore
-  export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
+  export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
   import('vue')
 }

+ 76 - 52
src/components/inpatient/nurse-module/BottleCard.vue

@@ -1,62 +1,86 @@
 <template>
-  <div style="width: 375px;padding: 4px;border: 1px solid black;border-radius: 4px">
+  <div style="width: 230px;padding: 4px;border: 1px solid black;border-radius: 4px">
     <table style="width: 100%;border-spacing: 0; border-collapse: collapse;table-layout: fixed">
       <thead>
-      <tr>
-        <th colspan="4" style="text-align: left">
-          {{patInfo.wardName}}&nbsp;
-          {{patInfo.bedNo}}&nbsp;
-          {{patInfo.patName}}
-        </th>
-        <th colspan="1" style="text-align: center">
-          {{bottleGroup}}&nbsp;
-        </th>
-        <th colspan="3" style="text-align: right">
-          {{patInfo.patGender}}&nbsp;
-          {{patInfo.ageLabel}}&nbsp;
-          {{simpleYzDate}}
-        </th>
-      </tr>
+        <tr style="font-size: 20px;">
+          <th colspan="4" style="text-align: left;font-weight: bold">
+            {{ patInfo.patName }}
+          </th>
+          <th colspan="2" style="text-align: left">
+            {{ bottleGroup }}
+          </th>
+          <th colspan="2" style="text-align: right">
+            {{ patInfo.bedNo }}
+          </th>
+        </tr>
+        <tr  style="font-size: 14px;font-weight: bold;">
+          <th colspan="5" style="text-align: left">
+            <!-- {{ patInfo.patName }} -->
+            {{ patInfo.patGender }}
+            {{ patInfo.ageLabel }}
+            {{ patInfo.wardName }}
+          </th>
+          <th colspan="3" style="text-align: right">
+            {{ simpleYzDate }}
+          </th>
+        </tr>
+        <!-- <tr>
+          <th colspan="3" style="text-align: left">
+            {{ patInfo.wardName }}
+          </th>
+          <th colspan="3">
+            {{ bottleGroup }}
+          </th>
+          <th colspan="2" style="text-align: right">
+            {{ simpleYzDate }}
+          </th>
+        </tr> -->
       </thead>
       <tbody>
-      <tr>
-        <td colspan="5">药品名称/规格</td>
-        <td style="width: 36px;text-align: center;">频率</td>
-        <td style="width: 36px;text-align: center;">用法</td>
-        <td style="width: 36px;text-align: center;">数量</td>
-      </tr>
-      <tr v-for="item in drugs">
-        <td colspan="5" style="width: 100%;height: 100%;position: relative">
+        <tr>
+          <td colspan="4">药品名称</td>
+          <td style="width: 36px;text-align: center;">规格</td>
+          <td style="width: 36px;text-align: center;">频率</td>
+          <td style="width: 36px;text-align: center;">用法</td>
+          <td style="width: 36px;text-align: center;">数量</td>
+        </tr>
+        <tr v-for="item in drugs">
+          <td colspan="4" style="width: 100%;height: 100%;position: relative">
             <div style="position: absolute;left: 2px;top: 2px;width:90%">
-              {{item.drugName}}
+              {{ item.drugName }}
             </div>
-            <div style="position: absolute;right: 2px;top: 50%; font-weight: bolder">
-              {{item.specification}}
+            <!-- <div style="position: absolute;right: 2px;top: 50%; font-weight: bolder">
+              {{ item.specification }}
+            </div> -->
+          </td>
+          <td>
+            <div style="font-weight: bolder">
+              {{ item.specification }}
             </div>
-        </td>
-        <td style="text-align: right">
-          <div>{{item.frequCode}}</div>
-          <div>{{item.startHour}}</div>
-        </td>
-        <td style="text-align: center">
-          {{drugs[0].instruction}}
-        </td>
-        <td style="text-align: center">
-          {{item.drugOcc}}
-        </td>
-      </tr>
-      <tr>
-        <td colspan="2" style="text-align: center;">配药时间</td>
-        <td colspan="2" style="width: 36px;text-align: center;">加药</td>
-        <td colspan="2"  style="width: 36px;text-align: center;">摆药</td>
-        <td colspan="2"  style="width: 36px;text-align: center;">审核</td>
-      </tr>
-      <tr>
-        <td colspan="2" style="text-align: center;"></td>
-        <td colspan="2" style="width: 36px;height:30px ;text-align: center;"></td>
-        <td colspan="2"  style="width: 36px;text-align: center;"></td>
-        <td colspan="2"  style="width: 36px;text-align: center;"></td>
-      </tr>
+          </td>
+          <td style="text-align: right">
+            <div>{{ item.frequCode }}</div>
+            <div>{{ item.startHour }}</div>
+          </td>
+          <td style="text-align: center">
+            {{ drugs[0].instruction }}
+          </td>
+          <td style="text-align: center">
+            {{ item.drugOcc }}
+          </td>
+        </tr>
+        <tr>
+          <td colspan="2" style="text-align: center;">配药时间</td>
+          <td colspan="2" style="width: 36px;text-align: center;">加药</td>
+          <td colspan="2" style="width: 36px;text-align: center;">摆药</td>
+          <td colspan="2" style="width: 36px;text-align: center;">审核</td>
+        </tr>
+        <tr>
+          <td colspan="2" style="text-align: center;"></td>
+          <td colspan="2" style="width: 36px;height:30px ;text-align: center;"></td>
+          <td colspan="2" style="width: 36px;text-align: center;"></td>
+          <td colspan="2" style="width: 36px;text-align: center;"></td>
+        </tr>
       </tbody>
     </table>
   </div>
@@ -84,7 +108,7 @@ const props = defineProps({
 
 const simpleYzDate = computed(() => {
   let arr = props.yzDate.split('-')
-  return arr[1]+'/'+arr[2]
+  return arr[1] + '/' + arr[2]
 })
 
 </script>

+ 4 - 4
src/views/hospitalization/nurse-module/PrintInfusionCard.vue

@@ -105,7 +105,7 @@
               <div 
                 v-for="(item,index) in printPatientBottleInfos"
                 :id="item.patInfo.patNo+'-'+index"
-                style="width:375px;"
+                style="width:230px;"
               >
                   <bottle-card
                   :drugs="item.bottleCardDrugs"
@@ -118,7 +118,7 @@
               </div>
               <div 
                 v-if="printPatientBottleInfos.length!= 0 && printPatientBottleInfos.length % 2 !=0"
-                style="width: 375px;"
+                style="width: 230px;"
               >
               </div>
           </div>
@@ -387,7 +387,7 @@ onMounted(() => {
   align-items: center;
 }
 .print-bottle-card-area{
-  width: 770px;
+  width: 730px;
   display: flex;
   justify-content: space-between;
   /* align-items: center; */
@@ -395,7 +395,7 @@ onMounted(() => {
   padding: 15px 5px;
 }
 .print-hiden-area{
-  display: none;
+  /* display: none; */
 }
 @media print {
     .your-flex-container {

+ 19 - 513
src/views/logisticsMaterials/procurement/departmentProcurementPlan/index.vue

@@ -11,13 +11,13 @@
                 <!-- <el-button type="primary" icon="Download" @click="exportData" style="margin-left: 5px">导出</el-button> -->
             </div>
             <el-table
-                :data="ypClassData.slice(pageSizeClass * (currentPageClass - 1), pageSizeClass * currentPageClass)"
+                :data="tableData"
                 border style="width: 100%" height="100%" stripe highlight-current-row class="ypClassTable normal-size">
-                <el-table-column prop="code" label="请领单号">
+                <el-table-column prop="lcPurchasePlanCode" label="请领单号">
                 </el-table-column>
-                <el-table-column prop="name" label="请领科室">
+                <el-table-column prop="deptCode" label="请领科室">
                 </el-table-column>
-                <el-table-column prop="name" label="请领月份">
+                <el-table-column prop="purchaseDate" label="请领月份">
                 </el-table-column>
                 <el-table-column prop="name" label="申请人">
                 </el-table-column>
@@ -27,18 +27,18 @@
                 </el-table-column>
                 <el-table-column prop="delFlag" label="审核人">
                 </el-table-column>
-                <el-table-column prop="delFlag" label="状态">
+                <el-table-column prop="status" label="状态">
                 </el-table-column>
                 <el-table-column fixed="right" label="操作" min-width="180" width="180" center>
                     <template #default="scope">
                         <el-button type="primary" size="small" v-if="!scope.row.isEdit"
-                            @click="editYpClass(scope.row)">编辑</el-button>
+                            @click="tableEdit(scope.row)">编辑</el-button>
                         <el-button type="primary" size="small" v-if="scope.row.isEdit"
                             @click="updateYpClass(scope.row)">保存</el-button>
                         <el-button type="primary" size="small" v-if="scope.row.isEdit"
                             @click="cancelYpClass(scope.row)">取消
                         </el-button>
-                        <el-button type="danger" size="small" @click.prevent="deleteYpClass(scope.$index, scope.row)">
+                        <el-button type="danger" size="small" @click.prevent="deleteItem(scope.$index, scope.row)">
                             删除
                         </el-button>
                         <el-button type="success" size="small">
@@ -49,38 +49,23 @@
             </el-table>
         </div>
         <div>
-            <el-pagination :current-page="currentPageClass" :page-size="pageSizeClass" :page-sizes="[10, 15, 20, 25]"
-                :total="ypClassData.length" layout="total, sizes, prev, pager, next, jumper" style="margin-top: 5px"
-                @size-change="handleSizeChangeClass" @current-change="handleCurrentChangeClass">
+            <el-pagination :current-page="pageNumber" :page-size="pageSize" :page-sizes="[10, 15, 20, 25]"
+                :total="total" layout="total, sizes, prev, pager, next, jumper" style="margin-top: 5px"
+                @size-change="handleSizeChange" @current-change="handleCurrentChange">
             </el-pagination>
         </div>
     </div>
     <el-dialog v-model="showDialog" :close-on-click-modal="false" :close-on-press-escape="false"
         :title="(currentEditCode ? '编辑' : '新增') + '科室采购计划'" width="100%" destroy-on-close fullscreen>
-        <!-- <YpPrintName :ypPrintNameDetail="ypPrintNameDetail" @closeYpPrintNameEditFor="closeYpPrintName" /> -->
         <info :currentEditCode="currentEditCode"></info>
     </el-dialog>
 </template>
 <script setup name="YpDict">
 import { ref, onMounted, nextTick } from 'vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
-import {
-    selectYpClass, saveYpClass, delYpClassByCode,
-    selectDrugKind,
-    selectYpDosage,
-    selectYpUnit,
-    selectYpChargeGroup,
-    selectYpVisibleFlag,
-    selectYpSupply,
-    selectYpManuFactory,
-} from '@/api/yp-dict/yp-dict-base.js'
 import searchArea from '@/components/searchArea/index.vue';
 import info from '@/views/logisticsMaterials/procurement/departmentProcurementPlan/info.vue';
 
-const editableTabsValue = ref('ypClass')
-const msgTip = '分类编码(code)有变更,原始字典记录存在关联,请谨慎做更改,是否确认!!!'
-const delFlagOptions = [{ code: '0', name: '启用' }, { code: '1', name: '停用' }]
-
 const searchData = ref([
     {
         label: '请领单号',
@@ -128,515 +113,36 @@ const searchData = ref([
         ],
     },
 ])
-const pageSizeClass = ref(20)
-const currentPageClass = ref(1)
+const pageSize = ref(10)
+const pageNumber = ref(1)
+const total = ref(0)
+const currentEditId = ref('')
+
+const tableData = ref([])
 const handleSizeChangeClass = (val) => {
     pageSizeClass.value = val
+    init()
 }
 const handleCurrentChangeClass = (val) => {
     currentPageClass.value = val
+    init()
 }
 
-const pageSizeKind = ref(20)
-const currentPageKind = ref(1)
-
-const pageSizeDosage = ref(20)
-const currentPageDosage = ref(1)
-
-const pageSizeUnit = ref(20)
-const currentPageUnit = ref(1)
-
-const pageSizeSupply = ref(20)
-const currentPageSupply = ref(1)
-
-const pageSizeManuFactory = ref(20)
-const currentPageManuFactory = ref(1)
-
 const ypClassData = ref([])
-const drugKindData = ref([])
-const ypDosageData = ref([])
-const ypUnitData = ref([])
-const ypChargeGroupData = ref([])
-const visibleFlagData = ref([])
-const ypSupplyData = ref([])
-const ypManuFactoryData = ref([])
 
 let showDialog = ref(false)
-
-const text = ref('')
-onMounted(() => {
-    nextTick(() => {
-        queryYpClass()
-    })
-})
-
 //搜索表单方法
 const searchByForm = (form) => {
     console.log("search", form)
 }
 
-// 查询药品字典-药性字典
-const queryYpClass = () => {
-    selectYpClass(text.value)
-        .then((res) => {
-            res.forEach(row => {
-                // 是否标记
-                row['isEdit'] = false
-                // 是否新增
-                row['isAdd'] = false
-            })
-            ypClassData.value = res
-        })
-        .catch(() => {
-            ypClassData.value = []
-        })
-}
-
-// 查询药品字典-药品分类字典
-const queryDrugKind = () => {
-    selectDrugKind(text.value)
-        .then((res) => {
-            res.forEach(row => {
-                // 是否标记
-                row['isEdit'] = false
-                // 是否新增
-                row['isAdd'] = false
-            })
-            drugKindData.value = res
-        })
-        .catch(() => {
-            drugKindData.value = []
-        })
-}
-
-// 查询药品字典-药品剂型字典
-const queryYpDosage = () => {
-    selectYpDosage(text.value)
-        .then((res) => {
-            res.forEach(row => {
-                // 是否标记
-                row['isEdit'] = false
-                // 是否新增
-                row['isAdd'] = false
-            })
-            ypDosageData.value = res
-        })
-        .catch(() => {
-            ypDosageData.value = []
-        })
-}
-
-// 查询药品字典-药品单位字典
-const queryYpUnit = () => {
-    selectYpUnit(text.value)
-        .then((res) => {
-            res.forEach(row => {
-                // 是否标记
-                row['isEdit'] = false
-                // 是否新增
-                row['isAdd'] = false
-            })
-            ypUnitData.value = res
-        })
-        .catch(() => {
-            ypUnitData.value = []
-        })
-}
-
-// 查询药品字典-药品费别字典
-const queryYpChargeGroup = () => {
-    selectYpChargeGroup(text.value)
-        .then((res) => {
-            res.forEach(row => {
-                // 是否标记
-                row['isEdit'] = false
-                // 是否新增
-                row['isAdd'] = false
-            })
-            ypChargeGroupData.value = res
-        })
-        .catch(() => {
-            ypChargeGroupData.value = []
-        })
-}
-
-// 查询药房药品停用情况
-const flagFilter = ref('')
-const queryVisibleFlag = () => {
-    selectYpVisibleFlag(text.value, flagFilter.value)
-        .then((res) => {
-            res.forEach(row => {
-                // 是否标记
-                row['isEdit'] = false
-                // 是否新增
-                row['isAdd'] = false
-            })
-            visibleFlagData.value = res
-        })
-        .catch(() => {
-            visibleFlagData.value = []
-        })
-}
-
-// 查询药品字典-药品厂家字典
-const queryYpSupply = () => {
-    selectYpSupply(text.value)
-        .then((res) => {
-            res.forEach(row => {
-                // 是否标记
-                row['isEdit'] = false
-                // 是否新增
-                row['isAdd'] = false
-            })
-            ypSupplyData.value = res
-        })
-        .catch(() => {
-            ypSupplyData.value = []
-        })
-}
-
-// 查询药品字典-药品供应商字典
-const queryYpManuFactory = () => {
-    selectYpManuFactory(text.value)
-        .then((res) => {
-            res.forEach(row => {
-                // 是否标记
-                row['isEdit'] = false
-                // 是否新增
-                row['isAdd'] = false
-            })
-            ypManuFactoryData.value = res
-        })
-        .catch(() => {
-            ypManuFactoryData.value = []
-        })
-}
-
-// 查询
-const queryItem = () => {
-    if (editableTabsValue.value === 'ypClass') {
-        queryYpClass()
-    } else if (editableTabsValue.value === 'drugKind') {
-        queryDrugKind()
-    } else if (editableTabsValue.value === 'ypDosage') {
-        queryYpDosage()
-    } else if (editableTabsValue.value === 'ypUnit') {
-        queryYpUnit()
-    } else if (editableTabsValue.value === 'ypChargeGroup') {
-        queryYpChargeGroup()
-    } else if (editableTabsValue.value === 'visibleFlag') {
-        queryVisibleFlag()
-    } else if (editableTabsValue.value === 'ypSupply') {
-        queryYpSupply()
-    } else if (editableTabsValue.value === 'ypManuFactory') {
-        queryYpManuFactory()
-    }
-}
-
 // 新增行
 const onAddItem = () => {
     showDialog.value = true
     return
-
-    if (editableTabsValue.value === 'ypClass') {
-        let count
-        if (ypClassData.value.length % pageSizeClass.value === 0) {
-            count = Math.ceil(ypClassData.value.length / pageSizeClass.value) + 1
-        } else {
-            count = Math.ceil(ypClassData.value.length / pageSizeClass.value)
-        }
-        currentPageClass.value = count
-        ypClassData.value.push({
-            code: '',
-            name: '',
-            pyCode: '',
-            dcode: '',
-            delFlag: '',
-            isEdit: true,
-            isAdd: true,
-        })
-        const el = document.querySelector('.ypClassTable .el-scrollbar__wrap')
-        const el2 = document.querySelector('.ypClassTable .el-table__body tbody')
-        setTimeout(() => {
-            const height = el2.clientHeight - el.clientHeight
-            if (height > 0) {
-                el.scrollTop = height
-            }
-        }, 100)
-    } else if (editableTabsValue.value === 'drugKind') {
-        let count
-        if (drugKindData.value.length % pageSizeKind.value === 0) {
-            count = Math.ceil(drugKindData.value.length / pageSizeKind.value) + 1
-        } else {
-            count = Math.ceil(drugKindData.value.length / pageSizeKind.value)
-        }
-        currentPageKind.value = count
-        drugKindData.value.push({
-            code: '',
-            name: '',
-            pyCode: '',
-            dcode: '',
-            ypType: '',
-            mzBillCode: '',
-            zyBillCode: '',
-            isEdit: true,
-            isAdd: true,
-        })
-        const el = document.querySelector('.drugKindTable .el-scrollbar__wrap')
-        const el2 = document.querySelector('.drugKindTable .el-table__body tbody')
-        setTimeout(() => {
-            const height = el2.clientHeight - el.clientHeight
-            if (height > 0) {
-                el.scrollTop = height
-            }
-        }, 100)
-    } else if (editableTabsValue.value === 'ypDosage') {
-        let count
-        if (ypDosageData.value.length % pageSizeDosage.value === 0) {
-            count = Math.ceil(ypDosageData.value.length / pageSizeDosage.value) + 1
-        } else {
-            count = Math.ceil(ypDosageData.value.length / pageSizeDosage.value)
-        }
-        currentPageDosage.value = count
-        ypDosageData.value.push({
-            code: '',
-            name: '',
-            pyCode: '',
-            dcode: '',
-            dosaType: '',
-            dosaRemark: '',
-            orderNo: '',
-            delFlag: '',
-            ybCode: '',
-            hnsybCode: '',
-            isEdit: true,
-            isAdd: true,
-        })
-        const el = document.querySelector('.ypDosageTable .el-scrollbar__wrap')
-        const el2 = document.querySelector('.ypDosageTable .el-table__body tbody')
-        setTimeout(() => {
-            const height = el2.clientHeight - el.clientHeight
-            if (height > 0) {
-                el.scrollTop = height
-            }
-        }, 100)
-    } else if (editableTabsValue.value === 'ypUnit') {
-        let count
-        if (ypUnitData.value.length % pageSizeUnit.value === 0) {
-            count = Math.ceil(ypUnitData.value.length / pageSizeUnit.value) + 1
-        } else {
-            count = Math.ceil(ypUnitData.value.length / pageSizeUnit.value)
-        }
-        currentPageUnit.value = count
-        ypUnitData.value.push({
-            code: '',
-            name: '',
-            pyCode: '',
-            dcode: '',
-            orderNo: '',
-            delFlag: '',
-            refundableFees: '',
-            isEdit: true,
-            isAdd: true,
-        })
-        const el = document.querySelector('.ypUnitTable .el-scrollbar__wrap')
-        const el2 = document.querySelector('.ypUnitTable .el-table__body tbody')
-        setTimeout(() => {
-            const height = el2.clientHeight - el.clientHeight
-            if (height > 0) {
-                el.scrollTop = height
-            }
-        }, 100)
-    } else if (editableTabsValue.value === 'ypChargeGroup') {
-        ypChargeGroupData.value.push({
-            code: '',
-            name: '',
-            pyCode: '',
-            dcode: '',
-            delFlag: '',
-            isEdit: true,
-            isAdd: true,
-        })
-    } else if (editableTabsValue.value === 'visibleFlag') {
-        ElMessage({
-            type: "warning",
-            message: "不能新增药房药品停用,需先维护药品信息!",
-            duration: 2500,
-            showClose: true,
-        });
-    } else if (editableTabsValue.value === 'ypSupply') {
-        let count
-        if (ypSupplyData.value.length % pageSizeSupply.value === 0) {
-            count = Math.ceil(ypSupplyData.value.length / pageSizeSupply.value) + 1
-        } else {
-            count = Math.ceil(ypSupplyData.value.length / pageSizeSupply.value)
-        }
-        currentPageSupply.value = count
-        ypSupplyData.value.push({
-            code: '',
-            name: '',
-            abbrName: '',
-            address: '',
-            zipCode: '',
-            telNo: '',
-            relName: '',
-            busiRange: '',
-            comment: '',
-            useFlag: '',
-            pyCode: '',
-            dcode: '',
-            delFlag: '',
-            isEdit: true,
-            isAdd: true,
-        })
-        const el = document.querySelector('.ypSupplyTable .el-scrollbar__wrap')
-        const el2 = document.querySelector('.ypSupplyTable .el-table__body tbody')
-        setTimeout(() => {
-            const height = el2.clientHeight - el.clientHeight
-            if (height > 0) {
-                el.scrollTop = height
-            }
-        }, 100)
-    } else if (editableTabsValue.value === 'ypManuFactory') {
-        let count
-        if (ypManuFactoryData.value.length % pageSizeManuFactory.value === 0) {
-            count = Math.ceil(ypManuFactoryData.value.length / pageSizeManuFactory.value) + 1
-        } else {
-            count = Math.ceil(ypManuFactoryData.value.length / pageSizeManuFactory.value)
-        }
-        currentPageManuFactory.value = count
-        ypManuFactoryData.value.push({
-            code: '',
-            name: '',
-            abbrName: '',
-            address: '',
-            zipCode: '',
-            telNo: '',
-            relName: '',
-            productRange: '',
-            comment: '',
-            useFlag: '',
-            pyCode: '',
-            dcode: '',
-            delFlag: '',
-            isEdit: true,
-            isAdd: true,
-        })
-        const el = document.querySelector('.ypManuFactoryTable .el-scrollbar__wrap')
-        const el2 = document.querySelector('.ypManuFactoryTable .el-table__body tbody')
-        setTimeout(() => {
-            const height = el2.clientHeight - el.clientHeight
-            if (height > 0) {
-                el.scrollTop = height
-            }
-        }, 100)
-    }
-}
-
-// 药品字典-药性字典增删改存开始
-// 编辑
-const editYpClass = (row) => {
-    // 备份原始数据
-    row['oldRow'] = JSON.parse(JSON.stringify(row))
-    row.isEdit = true
-}
-// 取消
-const cancelYpClass = (row) => {
-    // 如果是新增的数据
-    if (row.isAdd) {
-        ypClassData.value.splice(ypClassData.value.length - 1, 1)
-    } else {
-        // 不是新增的数据  还原数据
-        for (const i in row.oldRow) {
-            row[i] = row.oldRow[i]
-        }
-    }
-}
-// 保存
-const updateYpClass = (row) => {
-    if (!row.code || !row.name) {
-        ElMessage({
-            type: "warning",
-            message: "药性字典编码或名称不存在,请检查!",
-            duration: 2500,
-            showClose: true,
-        });
-        return
-    }
-
-    if (row.isAdd) {
-        let fe = 0
-        for (let num in ypClassData.value) {
-            if (ypClassData.value[num].code === row.code) {
-                fe++
-            }
-        }
-        if (fe === 2) {
-            ElMessage({
-                type: "warning",
-                message: "存在重复的药性字典,请核对!",
-                duration: 2500,
-                showClose: true,
-            });
-        } else {
-            callSaveYpClass(row, null)
-        }
-
-    } else {
-        let oldCode = row.oldRow.code
-        if (oldCode !== row.code) {
-            ElMessageBox.confirm(msgTip, {
-                cancelButtonText: '取消',
-                confirmButtonText: '确定',
-                type: 'warning',
-                distinguishCancelAndClose: true,
-                dangerouslyUseHTMLString: true
-            }).then(() => {
-                callSaveYpClass(row, oldCode)
-            }).catch((action) => {
-                if (action === 'cancel') {
-                    queryYpClass()
-                }
-            })
-        } else {
-            callSaveYpClass(row, oldCode)
-        }
-    }
-}
-
-const callSaveYpClass = (row, oldCode) => {
-    let title = '请确认是否保存<span style="color:#d12020;">' + row.name + '</span>?'
-    ElMessageBox.confirm(title, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-        distinguishCancelAndClose: true,
-        dangerouslyUseHTMLString: true
-    }).then(() => {
-        saveYpClass(row).then((res) => {
-            ElMessage({
-                type: "success",
-                message: res.cg,
-                duration: 2500,
-                showClose: true,
-            });
-            if (oldCode !== null && oldCode !== row.code) {
-                // 删除原始数据
-                delYpClassByCode(oldCode).then((res) => {
-                    queryYpClass()
-                })
-            } else {
-                queryYpClass()
-            }
-        })
-    }).catch((action) => {
-        if (action === 'cancel') {
-            queryYpClass()
-        }
-    })
 }
 
-const deleteYpClass = (index, row) => {
+const deleteItem = (index, row) => {
     let title = '请确认是否删除<span style="color:#d12020;">' + row.name + '</span>?'
     ElMessageBox.confirm(title, {
         cancelButtonText: '取消',