|
|
@@ -1,6 +1,5 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
-
|
|
|
<el-table v-loading="loading" :data="list">
|
|
|
<el-table-column label="处方编号" prop="prescribeCode" min-width="160" />
|
|
|
<el-table-column label="患者" prop="patientName" width="100" />
|
|
|
@@ -12,8 +11,9 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="审核意见" prop="auditReason" show-overflow-tooltip />
|
|
|
<el-table-column label="创建时间" prop="createTime" width="160" />
|
|
|
- <el-table-column label="操作" width="100" align="center">
|
|
|
+ <el-table-column label="操作" width="150" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button v-if="scope.row.status === 0" size="mini" type="primary" @click="handleOpen(scope.row)">开方</el-button>
|
|
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -21,6 +21,7 @@
|
|
|
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
|
|
|
+ <!-- 处方详情 -->
|
|
|
<el-dialog title="处方详情" :visible.sync="detailOpen" width="640px" append-to-body>
|
|
|
<el-descriptions :column="2" border>
|
|
|
<el-descriptions-item label="处方编号">{{ detail.prescribe ? detail.prescribe.prescribeCode : '' }}</el-descriptions-item>
|
|
|
@@ -37,11 +38,61 @@
|
|
|
<el-table-column label="医嘱" prop="instructions" />
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 开方 -->
|
|
|
+ <el-dialog title="开方" :visible.sync="openForm.open" width="820px" append-to-body :close-on-click-modal="false">
|
|
|
+ <el-form label-width="90px">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="患者姓名">
|
|
|
+ <el-input :value="currentRow.patientName" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-form-item label="诊断/医嘱">
|
|
|
+ <el-input v-model="openForm.diagnose" type="textarea" :rows="2" placeholder="请输入诊断/医嘱" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <div style="margin-bottom: 8px;">
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="small" @click="handleAddDrug">新增药品</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table :data="openForm.drugs" border>
|
|
|
+ <el-table-column label="药品名称" prop="drugName" min-width="140">
|
|
|
+ <template slot-scope="scope"><el-input v-model="scope.row.drugName" size="small" placeholder="药品名称" /></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="规格" prop="drugSpec" width="110">
|
|
|
+ <template slot-scope="scope"><el-input v-model="scope.row.drugSpec" size="small" placeholder="规格" /></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="用法" prop="usageMethod" width="100">
|
|
|
+ <template slot-scope="scope"><el-input v-model="scope.row.usageMethod" size="small" placeholder="用法" /></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="频次" prop="usageFrequencyUnit" width="90">
|
|
|
+ <template slot-scope="scope"><el-input v-model="scope.row.usageFrequencyUnit" size="small" placeholder="频次" /></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="每次用量" prop="usagePerUseCount" width="90">
|
|
|
+ <template slot-scope="scope"><el-input v-model="scope.row.usagePerUseCount" size="small" placeholder="每次用量" /></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="数量" prop="drugNum" width="80">
|
|
|
+ <template slot-scope="scope"><el-input v-model="scope.row.drugNum" size="small" placeholder="数量" /></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="60" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" icon="el-icon-delete" @click="handleDeleteDrug(scope.$index)" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <div slot="footer">
|
|
|
+ <el-button @click="openForm.open = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="submitOpen">提交开方</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getPrescribeList, getPrescribe } from '@/api/prescribe'
|
|
|
+import { getPrescribeList, getPrescribe, openPrescribe } from '@/api/prescribe'
|
|
|
|
|
|
export default {
|
|
|
name: 'PrescribeList',
|
|
|
@@ -52,7 +103,13 @@ export default {
|
|
|
total: 0,
|
|
|
queryParams: { pageNum: 1, pageSize: 10, type: 1 },
|
|
|
detailOpen: false,
|
|
|
- detail: { prescribe: {}, drugs: [] }
|
|
|
+ detail: { prescribe: {}, drugs: [] },
|
|
|
+ currentRow: {},
|
|
|
+ openForm: {
|
|
|
+ open: false,
|
|
|
+ diagnose: '',
|
|
|
+ drugs: []
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -73,12 +130,48 @@ export default {
|
|
|
this.detailOpen = true
|
|
|
})
|
|
|
},
|
|
|
+ handleOpen(row) {
|
|
|
+ this.currentRow = row
|
|
|
+ this.openForm = { open: true, diagnose: row.diagnose || '', drugs: [] }
|
|
|
+ },
|
|
|
+ handleAddDrug() {
|
|
|
+ this.openForm.drugs.push({
|
|
|
+ drugName: '',
|
|
|
+ drugSpec: '',
|
|
|
+ usageMethod: '',
|
|
|
+ usageFrequencyUnit: '',
|
|
|
+ usagePerUseCount: '',
|
|
|
+ drugNum: 1
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleDeleteDrug(index) {
|
|
|
+ this.openForm.drugs.splice(index, 1)
|
|
|
+ },
|
|
|
+ submitOpen() {
|
|
|
+ if (!this.openForm.diagnose) {
|
|
|
+ this.$message.warning('请填写诊断/医嘱')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.openForm.drugs.length === 0) {
|
|
|
+ this.$message.warning('请至少添加一种药品')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ openPrescribe({
|
|
|
+ prescribeId: this.currentRow.prescribeId,
|
|
|
+ diagnose: this.openForm.diagnose,
|
|
|
+ drugs: this.openForm.drugs
|
|
|
+ }).then(() => {
|
|
|
+ this.$message.success('开方成功,已进入待审核')
|
|
|
+ this.openForm.open = false
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ },
|
|
|
statusText(status) {
|
|
|
- const map = { 0: '待审核', 1: '已通过', 2: '已驳回', 3: '调剂中', 4: '调剂完成', 5: '已发药' }
|
|
|
+ const map = { 0: '待开方', 1: '待审核', 2: '已通过', '-1': '已拒方', '-2': '已取消' }
|
|
|
return map[status] || '未知'
|
|
|
},
|
|
|
statusType(status) {
|
|
|
- const map = { 0: 'warning', 1: 'success', 2: 'danger', 3: 'info', 4: 'info', 5: 'success' }
|
|
|
+ const map = { 0: 'warning', 1: 'warning', 2: 'success', '-1': 'danger', '-2': 'info' }
|
|
|
return map[status] || 'info'
|
|
|
}
|
|
|
}
|