Procházet zdrojové kódy

药房管理 -> 处方审核 -> 新增处方界面
按钮权限标识:rescription:prescriptionCore:add

kumu před 1 rokem
rodič
revize
6481d32715

+ 8 - 0
src/api/prescription/prescriptionCore.js

@@ -101,6 +101,14 @@ export function addPrescriptionCore(data) {
   })
 }
 
+export function addPrescriptionCore2(model) {
+  return request({
+    url: '/yfc-admin/prescriptionManage/addPrescription',
+    method: 'post',
+    data: model
+  });
+}
+
 // 修改处方审核
 export function updatePrescriptionCore(data) {
   return request({

+ 30 - 0
src/tools/object.js

@@ -0,0 +1,30 @@
+export function transformFlatObjectToNested(model, separator = '_', defaultValue = null) {
+  return Object.entries(model).reduce((model, [key, value]) => {
+    const keys = key.split(separator).reverse();
+    let current = model;
+    while (keys.length) {
+      const k = keys.pop();
+      current = current[k] = keys.length ? (current[k] || {}) : (value || defaultValue);
+    }
+    return model;
+  }, {})
+}
+
+export function transformNestedObjectToFlat(model, separator = '_') {
+  const result = {};
+  const stack = [{obj: model, parentKey: ''}];
+
+  while (stack.length > 0) {
+    const {obj, parentKey} = stack.pop();
+    for (const [key, value] of Object.entries(obj)) {
+      const k = parentKey ? `${parentKey}${separator}${key}` : key;
+      if (value && typeof value === 'object' && !Array.isArray(value)) {
+        stack.push({obj: value, parentKey: k});
+      } else {
+        result[k] = value;
+      }
+    }
+  }
+
+  return result;
+}

+ 509 - 0
src/views/rescription/prescriptionCore/edit.vue

@@ -0,0 +1,509 @@
+<script>
+import dayjs from 'dayjs';
+import {listMedicalMechanism} from '@/api/medical/mechanism';
+import {transformFlatObjectToNested} from '@/tools/object';
+import {bignumber, chain} from 'mathjs';
+import {addPrescriptionCore2} from '@/api/prescription/prescriptionCore';
+import {mapGetters} from 'vuex';
+
+import regionOptions from '@/utils/options';
+
+
+export default {
+  data() {
+    const locationValidator = (message) => (rule, value, callback) => {
+      if (this.model.expressExecutor === '顺丰') {
+        if (!value.length) { return callback(new Error(message)); }
+      }
+      callback();
+    };
+    return {
+      medicines: [],
+      model: {},
+      rules: {
+        yljgId: [{required: true, message: '请选择医疗机构'}],
+        yfId: [{required: true, message: '请选择药房'}],
+        preNo: [{required: true, message: '请输入医院处方号'}],
+        name: [{required: true, message: '请输入患者姓名'}],
+        sex: [{required: true, message: '请选择性别'}],
+        age: [{required: true, message: '请输入年龄'}],
+        // recipientTel: [{required: true, message: '请输入联系电话'}],
+        expressExecutor: [{required: true, message: '请选择配送方式'}],
+        consignee: [{validator: locationValidator('请输入收件电话')}],
+        contactNumber: [{validator: locationValidator('请输入收件电话')}],
+        location: [{validator: locationValidator('请选择所属地域')}],
+        address: [{validator: locationValidator('请输入详细地址')}],
+      },
+
+      ageOptions: [
+        {label: '岁', value: '岁'},
+        {label: '月', value: '月'},
+        {label: '周', value: '周'},
+        {label: '天', value: '天'},
+      ],
+      genderOptions: [
+        {label: '男', value: '男'},
+        {label: '女', value: '女'},
+      ],
+      recipeCategoryOptions: [
+        {label: '门诊', value: '1'},
+        {label: '住院', value: '2'},
+      ],
+      expressExecutorOptions: [
+        {label: '送医院', value: '送医院'},
+        {label: '顺丰', value: '顺丰'},
+        {label: '其他', value: '其他'},
+      ],
+      whetherOptions: [
+        {label: '是', value: '1'},
+        {label: '否', value: '0'},
+      ],
+      communityOptions: [],
+      mechanismOptions: [],
+      dosageFormOptions: [],
+      usageOptions: [],
+      concentrationOptions: [],
+      frequencyOptions: [],
+      medicationTimeOptions: [],
+      regionOptions,
+      showPharmacy: false,
+      searchTableForSystemColumns: [
+        {title: '名称', data: 'drugsName'},
+        {title: '编码', data: 'drugsId'},
+        {title: '规格', data: 'drugsSpecsName'},
+        {title: '产地', data: 'placeName'},
+        {title: '零售价', data: 'retail'},
+      ],
+      saving: false,
+    };
+  },
+  computed: {
+    ...mapGetters(['pharmacyList']),
+    getEmptyMedicineRowIndex() {
+      return this.medicines.findIndex(medicine => Object.keys(medicine).length === 0);
+    },
+  },
+  created() {
+    this.formReset();
+    this.getDicts('dosage_form').then((response) => {this.dosageFormOptions = response.data;});
+    this.getDicts('prescription_usage').then((response) => {this.usageOptions = response.data;});
+    this.getDicts('concentration').then((response) => {this.concentrationOptions = response.data;});
+    this.getDicts('frequency').then((response) => {this.frequencyOptions = response.data;});
+    this.getDicts('medicationTime').then((response) => {this.medicationTimeOptions = response.data;});
+  },
+  methods: {
+    formReset() {
+      const pharmacies = Array.isArray(this.pharmacyList) ? this.pharmacyList : [];
+      this.model = {
+        yfId: window.localStorage.getItem('pharmacyId') || (pharmacies.length ? pharmacies[0].id : ''),
+        /* 01 受理时间 */ tackleTime: dayjs().startOf('day').format('YYYY-MM-DD'),
+        /* 02 处方序号 */ recipeSerial: '',
+        /* 03 处方编号 */ recipeBh: '',
+        /* 04 患者姓名 */ name: '',
+        /* 05 患者年龄 */ // age: '',
+        /* 07 患者性别 */ sex: '',
+        /* 08 联系电话 */ recipientTel: '',
+        /* 09 医院处方 */ preNo: '',
+        /* 10 医疗机构 */ yljgId: '',
+        /* 11 门诊住院 */ preMzZy: '',
+        /* 12 就诊科室 */ department: '',
+        /* 13 病区     */ inpatientArea: '',
+        /* 14 病床     */ bedNo: '',
+        /* 15 就诊医生 */ doctor: '',
+        /* 16 临床诊断 */ disName: '',
+        /* 17 剂数     */ // prescription_number: '',
+        /* 18 剂型     */ prescription_dosageForm: '',
+        /* 19 处方用法 */ prescription_prescriptionUsage: '',
+        /* 20 浓煎量   */ prescription_concentration: '',
+        /* 21 服药频次 */ prescription_frequency: '',
+        /* 22 服药时间 */ prescription_medicationTime: '',
+        /* 23 医嘱     */ prescription_remark: '',
+        /* 24 代煎     */ isBehalf: '',
+        /* 26 配送方式 */ expressExecutor: '',
+        /* 27 收件人名 */ consignee: '',
+        /* 28 收件电话 */ contactNumber: '',
+        location: [],
+        /* 29 收件地址 */ address: '',
+        /* 30 快递单号 */ expressCode: '',
+        /* 31 处方金额 */ // prescription_prescriptionSum: '',
+        /* 32 代煎费用 */ // prescription_daijianCost: '',
+        /* 33 配送费用 */ // prescription_distributionCost: '',
+        /* 34 总金额 */ // prescription_prescriptionTotleSum: '',
+      };
+      this.getMechanismList();
+      this.appendMedicine();
+
+      this.showPharmacy = pharmacies.length > 1 || !this.model.yfId;
+    },
+    /** 查询医疗机构列表 */
+    async getMechanismList() {
+      try {
+        const {data: rows} = await listMedicalMechanism();
+        this.mechanismOptions = rows.map(item => (item.disabled = item.state === '0', item));
+      } catch (error) {
+        this.mechanismOptions = [];
+        this.model.yljgId = '';
+      }
+    },
+    async handle() {
+      try {
+        await this.$refs.form.validate();
+        const medicines = this.medicines.filter(medicine => Object.keys(medicine).length);
+        if (medicines.length === 0) throw '请至少添加一味药品';
+        if (medicines.find(medicine => !medicine.matDose)) throw '请补全药品剂量';
+
+        const model = transformFlatObjectToNested(this.model);
+        model['prescription'].drugs = medicines;
+        [model.province = '', model.city = '', model.region = ''] = this.model.location;
+        this.saving = true;
+        await addPrescriptionCore2(model);
+        this.$emit('close', true);
+      } catch (e) {
+        if (e === false) this.$message.warning('请补全表单数据');
+        else if (typeof e === 'string') this.$message.warning(e);
+      }
+      this.saving = false;
+    },
+    cancel() {
+      this.$emit('close', false);
+    },
+    updateValidator(validators) {
+      this.$refs.form.clearValidate(validators);
+      this.$refs.form.validateField(validators);
+    },
+
+    searchMedicinesFormat(res) {
+      try {
+        if (res.rows) return {totalRow: res.total, list: res.rows};
+        else return {totalRow: res.data.length, list: res.data};
+      } catch (error) { return {totalRow: 0, list: []}; }
+    },
+    selectMedicine([value], row, index) {
+      if (value) {
+        row.matCode = value.drugsId;
+        row.matName = value.drugsName;
+        row.drugsSpecsName = value.drugsSpecsName;
+        row.matUsageName = value.matUsageName;
+        // row.matDose = '';
+        row.matUnitName = value.dosageSizeUnit;
+        row.matXsj = value.retail;
+        row.subtotalMoney = this.calculationMedicinePrice(row);
+      } else {
+        delete row.matCode;
+        delete row.matName;
+        delete row.drugsSpecsName;
+        delete row.matUsageName;
+        delete row.matDose;
+        delete row.matUnitName;
+        delete row.matXsj;
+        this.medicines.splice(index, 1, row);
+      }
+      if (this.getEmptyMedicineRowIndex === -1) this.appendMedicine({}, index + 1);
+    },
+    appendMedicine(model, index = this.medicines.length) {
+      this.medicines.splice(index, 0, model || {});
+    },
+    deleteMedicine(row, index) {
+      this.medicines.splice(index, 1);
+    },
+    updateMedicine(row, index) {
+      this.medicines.splice(index, 1, {...row, subtotalMoney: this.calculationMedicinePrice(row)});
+    },
+    calculationMedicinePrice(medicine) {
+      let price = chain(bignumber(medicine.matXsj || 0));
+      return price.multiply(bignumber(medicine.matDose || 0)).value.valueOf();
+    },
+  },
+};
+</script>
+
+<template>
+  <div>
+    <el-form ref="form" :model="model" :rules="rules" label-width="100px">
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="受理时间" prop="tackleTime">
+            <el-date-picker v-model="model.tackleTime" type="date" value-format="yyyy-MM-dd"
+                            placeholder="请选择受理时间"></el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="序号" prop="recipeSerial">
+            <el-input v-model="model.recipeSerial" placeholder="请输入序号"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="编号" prop="recipeBh">
+            <el-input v-model="model.recipeBh" placeholder="请输入编号"/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="患者" prop="name">
+            <el-input v-model="model.name" placeholder="请输入患者姓名"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="年龄" prop="age">
+            <div style="display: flex">
+              <el-input-number v-model="model.age" :min="0" label="请输入年龄"></el-input-number>
+            </div>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="性别" prop="sex">
+            <el-select v-model="model.sex" placeholder="请选择性别" clearable>
+              <el-option v-for="item in genderOptions" :key="item.label" :label="item.label"
+                         :value="item.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="联系电话" prop="recipientTel">
+            <el-input type="tel" v-model="model.recipientTel" placeholder="请输入联系电话" minlength="11"
+                      maxlength="11"/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="医院处方号" prop="preNo">
+            <el-input v-model="model.preNo" placeholder="请输入医院处方号"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="医疗机构" prop="yljgId">
+            <el-select v-model="model.yljgId" placeholder="请选择医疗机构" clearable>
+              <el-option v-for="item in mechanismOptions" :key="item.code" :value="item.code" :label="item.name"
+                         :disabled="item.disabled"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="药房" prop="yfId">
+            <el-select v-model="model.yfId" placeholder="请选择药房" clearable>
+              <el-option v-for="item in pharmacyList" :key="dict.id" :label="dict.name" :value="dict.id"
+                         :disabled="item.disabled"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="门诊住院" prop="preMzZy">
+            <el-select v-model="model.preMzZy" placeholder="请选择" clearable>
+              <el-option v-for="item in recipeCategoryOptions" :key="item.label" :label="item.label"
+                         :value="item.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="就诊科室" prop="department">
+            <el-input v-model="model.department" placeholder="请输入就诊科室"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="病区" prop="inpatientArea">
+            <el-input v-model="model.inpatientArea" placeholder="请输入病区"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="病床" prop="bedNo">
+            <el-input v-model="model.bedNo" placeholder="请输入病床"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="就诊医生" prop="doctor">
+            <el-input v-model="model.doctor" placeholder="请输入就诊医生"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="临床诊断" prop="disName">
+            <el-input v-model="model.disName" placeholder="请输入临床诊断"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="剂数" prop="prescription_number">
+            <el-input-number v-model="model.prescription_number" :min="0" label="请输入剂数"></el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="剂型" prop="prescription_dosageForm">
+            <el-select v-model="model.prescription_dosageForm" placeholder="请选择剂型" clearable>
+              <el-option v-for="item in dosageFormOptions" :key="item.dictValue"
+                         :label="item.dictLabel" :value="item.dictValue"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="处方用法" prop="prescription_prescriptionUsage">
+            <el-select v-model="model.prescription_prescriptionUsage" placeholder="请选择处方用法" clearable>
+              <el-option v-for="item in usageOptions" :key="item.dictValue"
+                         :label="item.dictLabel" :value="item.dictValue"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="浓煎量" prop="prescription_concentration">
+            <el-select v-model="model.prescription_concentration" placeholder="请选择浓煎量" clearable>
+              <el-option v-for="item in concentrationOptions" :key="item.dictValue"
+                         :label="item.dictLabel" :value="item.dictValue"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="服药频次" prop="prescription_frequency">
+            <el-select v-model="model.prescription_frequency" placeholder="请选择服药频次" clearable>
+              <el-option v-for="item in frequencyOptions" :key="item.dictValue"
+                         :label="item.dictLabel" :value="item.dictValue"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="服药时间" prop="prescription_medicationTime">
+            <el-select v-model="model.prescription_medicationTime" placeholder="请选择服药时间" clearable>
+              <el-option v-for="item in medicationTimeOptions" :key="item.dictValue"
+                         :label="item.dictLabel" :value="item.dictValue"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="是否代煎" prop="isBehalf">
+            <el-radio-group v-model="model.isBehalf">
+              <el-radio v-for="item in whetherOptions" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="医嘱" prop="prescription_remark">
+            <el-input v-model="model.prescription_remark" placeholder="请输入医嘱"/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="配送方式" prop="expressExecutor">
+            <el-select v-model="model.expressExecutor" placeholder="请选择配送方式" clearable
+                       @change="updateValidator(['consignee', 'contactNumber', 'location', 'address'])">
+              <el-option v-for="item in expressExecutorOptions" :key="item.label" :label="item.label"
+                         :value="item.value"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="收件人" prop="consignee">
+            <el-input v-model="model.consignee" placeholder="请输入收件人"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="收件电话" prop="contactNumber">
+            <el-input type="tel" v-model="model.contactNumber" placeholder="请输入收件电话" minlength="11"
+                      maxlength="11"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="所属地域" prop="location">
+            <el-cascader v-model="model.location" :options="regionOptions" :props="{ value: 'label' }"
+                         placeholder="请选择省/市/区" clearable></el-cascader>
+          </el-form-item>
+        </el-col>
+        <el-col :span="18">
+          <el-form-item label="收件地址" prop="address">
+            <el-input v-model="model.address" placeholder="请输入详细地址"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="快递单号" prop="expressCode">
+            <el-input v-model="model.expressCode" placeholder="请输入快递单号"/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="处方金额" prop="prescription_prescriptionSum">
+            <el-input-number v-model="model.prescription_prescriptionSum" :precision="2" :step="1"
+                             :min="0"></el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="代煎费用" prop="prescription_daijianCost">
+            <el-input-number v-model="model.prescription_daijianCost" :precision="2" :step="1"
+                             :min="0"></el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="配送费用" prop="prescription_distributionCost">
+            <el-input-number v-model="model.prescription_distributionCost" :precision="2" :step="1"
+                             :min="0"></el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="总金额" prop="prescription_prescriptionTotleSum">
+            <el-input-number v-model="model.prescription_prescriptionTotleSum" :precision="2" :step="1"
+                             :min="0"></el-input-number>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <el-table :data="medicines" style="width: 100%">
+      <el-table-column label="序号" type="index" width="65" align="center"></el-table-column>
+      <el-table-column label="药品名称" prop="matName" align="center">
+        <template slot-scope="scope">
+          <template v-if="!scope.row.matCode">
+            <v-selectpage :tb-columns="searchTableForSystemColumns"
+                          key-field="drugsId" v-model="scope.row.matCode"
+                          placeholder="请输入药品名称" title="药品"
+                          data="drugsSearchForSystem" :params="{}" :pagination="false"
+                          :result-format="searchMedicinesFormat"
+                          @values="selectMedicine($event, scope.row, scope.$index)"
+            ></v-selectpage>
+          </template>
+          <a v-else>
+            {{ scope.row.matName }}
+            <i class="icon el-icon-circle-close" @click="selectMedicine([], scope.row, scope.$index)"></i>
+          </a>
+        </template>
+      </el-table-column>
+      <el-table-column label="药品规格" prop="drugsSpecsName" align="center"></el-table-column>
+      <el-table-column label="剂量单位" prop="matUnitName" width="110" align="center"></el-table-column>
+      <el-table-column label="药品用法" prop="matUsageName" align="center">
+        <template slot-scope="scope" v-if="scope.row.matCode">
+          <el-input v-model="scope.row.matUsageName" :disabled="saving"
+                    @input="updateMedicine(scope.row, scope.$index)"></el-input>
+        </template>
+      </el-table-column>
+      <el-table-column label="剂量" prop="matDose" align="center">
+        <template slot-scope="scope" v-if="scope.row.matCode">
+          <el-input-number v-model="scope.row.matDose" :min="0" :precision="2" :controls="false"
+                           :disabled="saving"
+                           @change="updateMedicine(scope.row, scope.$index)"></el-input-number>
+        </template>
+      </el-table-column>
+      <el-table-column label="药品单价" prop="matXsj" width="110" align="center"></el-table-column>
+      <el-table-column label="小计" prop="subtotalMoney" width="110" align="center"></el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="80" fixed="right">
+        <template slot-scope="scope">
+          <el-button style="width: 40px;" type="danger" size="mini"
+                     :disabled="Object.keys(scope.row).length === 0 || saving"
+                     @click="deleteMedicine(scope.row, scope.$index)"
+          >删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="el-dialog__footer">
+      <el-button type="primary" :loading="saving" @click="handle">保 存</el-button>
+      <el-button @click="cancel">取 消</el-button>
+    </div>
+  </div>
+</template>
+
+<style scoped lang="scss">
+.el-input, .el-select, .el-cascader {
+  width: 100%;
+}
+</style>

+ 10 - 4
src/views/rescription/prescriptionCore/index.vue

@@ -141,9 +141,8 @@
               @click="handleQuery"
               >搜索</el-button
             >
-            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-              >重置</el-button
-            >
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            <el-button icon="el-icon-circle-plus-outline" v-hasPermi="['rescription:prescriptionCore:add']" size="mini" @click="recipeEditOpen = true;">新增处方</el-button>
           </el-form-item>
         </div>
       </div>
@@ -1303,6 +1302,10 @@
         <el-button type="primary" @click="setRemark">确 定</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog :fullscreen="true" title="新增处方" :visible.sync="recipeEditOpen" width="1180px" append-to-body size="mini" destroy-on-close>
+      <edit @close="recipeEditOpen = false;$event && getList()"></edit>
+    </el-dialog>
   </div>
 </template>
 
@@ -1337,6 +1340,7 @@ import {
 import { updatePrintStatus } from "@/api/prescription/prescriptionCore";
 import Pres from "@/components/Pres/index.vue";
 import JsBarcode from "@/components/JsBarcode/index.vue";
+import Edit from "./edit.vue";
 import dayjs from "dayjs";
 
 // import JsBarcode from "jsbarcode"
@@ -1358,10 +1362,12 @@ function debounce(fn, delay) {
 
 export default {
   name: "PrescriptionCore",
-  components: { Pres, JsBarcode },
+  components: { Pres, JsBarcode, Edit },
   data() {
     const now = dayjs().format("YYYY-MM-DD");
     return {
+      recipeEditOpen: false,
+
       curPreNo: "",
       curName: "",
       curSex: "",