<template>
|
<div>
|
<el-drawer :title="title" :visible.sync="open" size="80%" append-to-body>
|
<div style="font-size: 14px">
|
<table
|
style="
|
width: 96%;
|
margin: 0px 10px;
|
border: 1px solid #dfe6ec;
|
border-collapse: collapse;
|
"
|
cellspacing="4"
|
>
|
<caption style="background-color: #f8f8f9; font-size: 18px">
|
{{
|
fList.cusName
|
}}的体检资料
|
</caption>
|
<tr style="border: 1px solid #dfe6ec; border-collapse: collapse">
|
<td style="border: 1px solid #dfe6ec; border-collapse: collapse">
|
姓名:
|
</td>
|
<td style="border: 1px solid #dfe6ec; border-collapse: collapse">
|
{{ fList.cusName }}
|
</td>
|
<td style="border: 1px solid #dfe6ec; border-collapse: collapse">
|
年龄:
|
</td>
|
<td style="border: 1px solid #dfe6ec; border-collapse: collapse">
|
{{ fList.age }}岁
|
</td>
|
</tr>
|
<tr style="border: 1px solid #dfe6ec; border-collapse: collapse">
|
<td style="border: 1px solid #dfe6ec; border-collapse: collapse">
|
体检单号:
|
</td>
|
<td style="border: 1px solid #dfe6ec; border-collapse: collapse">
|
{{ fList.tjNumber }}
|
</td>
|
<td style="border: 1px solid #dfe6ec; border-collapse: collapse">
|
体检时间:
|
</td>
|
<td style="border: 1px solid #dfe6ec; border-collapse: collapse">
|
{{ fList.tjTime }}
|
</td>
|
</tr>
|
</table>
|
</div>
|
<div style="padding: 10px 10px;width: 96%;">
|
<el-row :gutter="5">
|
<el-col :span="4" v-show="activities.length >=1">
|
<el-timeline style="padding: 0px 10px">
|
<el-timeline-item
|
v-for="(activity, index) in activities"
|
:key="index"
|
>
|
<el-card>
|
<h4>{{ activity.timestamp }}</h4>
|
<p @click="lookmingxi(activity)">{{ activity.content }}</p>
|
</el-card>
|
</el-timeline-item>
|
</el-timeline>
|
</el-col>
|
<el-col :span="20">
|
<el-tabs type="border-card">
|
<el-tab-pane label="西药处方">
|
<el-row :gutter="10" class="mb8" style="margin-left: 5px">
|
<el-col :span="1.5" >
|
<div style="display: flex">
|
<div>取药药房:</div>
|
<div style="border-bottom: 1px solid black">
|
门诊西药房
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="1.5" style="margin-left: 10px">
|
<el-button type="primary" @click="handledrug" size="mini"
|
:disabled="time">新增药品</el-button
|
>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button type="primary" size="mini" @click="deledrug"
|
:disabled="time" >删除药品</el-button
|
>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button type="primary" size="mini" @click="Resetdrug"
|
>重置</el-button
|
>
|
</el-col>
|
</el-row>
|
<el-table
|
:data="dataList"
|
ref="elTable"
|
v-loading="loading"
|
@selection-change="handledrugChange"
|
border
|
height="320px"
|
>
|
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column
|
label="序号"
|
width="60"
|
prop="id"
|
align="center"
|
/>
|
<el-table-column
|
label="药品名称"
|
align="center"
|
prop="pacName"
|
>
|
<template #default="scope">
|
<el-input
|
v-if="scope.row.isEdit"
|
v-model="scope.row.pacName"
|
placeholder="请输入"
|
@focus="changeblur"
|
></el-input>
|
<div v-else class="txt">{{ scope.row.pacName }}</div>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="规格"
|
align="center"
|
prop="pacName"
|
width="100px"
|
/>
|
<el-table-column
|
label="剂量"
|
align="center"
|
prop="detail"
|
width="100px"
|
/>
|
<el-table-column
|
label="单位"
|
align="center"
|
prop="pacRemark"
|
/>
|
<el-table-column label="给药方式" align="center" prop="price">
|
<template #default="scope">
|
<el-input
|
v-if="scope.row.isEdit"
|
v-model="scope.row.price"
|
placeholder="请输入"
|
@focus="changefocus"
|
></el-input>
|
<div v-else class="txt">{{ scope.row.price }}</div>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="给药频率"
|
align="center"
|
prop="pacRemark"
|
>
|
<template #default="scope">
|
<el-input
|
v-if="scope.row.isEdit"
|
v-model="scope.row.pacRemark"
|
placeholder="请输入"
|
@focus="changefocus"
|
></el-input>
|
<div v-else class="txt">{{ scope.row.pacRemark }}</div>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="天数"
|
align="center"
|
prop="pacRemark"
|
/>
|
<el-table-column
|
label="数量"
|
align="center"
|
prop="pacRemark"
|
/>
|
<el-table-column
|
label="库存"
|
align="center"
|
prop="pacRemark"
|
/>
|
<el-table-column
|
label="单位"
|
align="center"
|
prop="pacRemark"
|
/>
|
<el-table-column
|
label="单价"
|
align="center"
|
prop="pacRemark"
|
/>
|
<!-- <el-table-column label="皮试" align="center" prop="pacRemark" />
|
|
<el-table-column
|
label="皮试结果"
|
align="center"
|
prop="pacRemark"
|
/>
|
|
<el-table-column label="自备" align="center" prop="pacRemark" /> -->
|
</el-table>
|
<el-form
|
style="margin-top: 10px"
|
:model="queryParams"
|
size="small"
|
:inline="true"
|
label-width="68px"
|
>
|
<el-form-item label="金额" prop="question">
|
<el-input
|
v-model="queryParams.question"
|
placeholder="请输入金额"
|
clearable
|
/>
|
</el-form-item>
|
<el-form-item label="药品种类" prop="Typesofdrugs">
|
<el-input
|
v-model="queryParams.Typesofdrugs"
|
placeholder="请输入药品种类"
|
clearable
|
/>
|
</el-form-item>
|
<el-form-item>
|
<el-button
|
type="primary"
|
size="mini"
|
@click="handlecomplete"
|
>新增处方</el-button
|
>
|
</el-form-item>
|
</el-form>
|
</el-tab-pane>
|
<el-tab-pane label="中草药">
|
<el-row :gutter="10" class="mb8" style="margin-left: 5px">
|
<el-col :span="1.5">
|
<div style="display: flex">
|
<div>取药药房:</div>
|
<div style="border-bottom: 1px solid black">
|
门诊中药房
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="1.5" style="margin-left: 10px">
|
<el-button type="primary" @click="handlemeddrug" size="mini"
|
:disabled="time">新增药品</el-button
|
>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button type="primary" size="mini" @click="delemeddrug"
|
:disabled="time" >删除药品</el-button
|
>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button type="primary" size="mini" @click="Resetdrug"
|
>重置</el-button
|
>
|
</el-col>
|
</el-row>
|
<el-table
|
:data="list"
|
ref="elTable"
|
v-loading="loading"
|
@selection-change="handleSelectionChange"
|
border
|
height="320px"
|
>
|
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column
|
label="序号"
|
width="60"
|
prop="id"
|
align="center"
|
/>
|
<el-table-column
|
label="药品名称"
|
align="center"
|
prop="pacName"
|
>
|
<template #default="scope">
|
<el-input
|
v-if="scope.row.isEdit"
|
v-model="scope.row.pacName"
|
placeholder="请输入"
|
@focus="changeblur"
|
></el-input>
|
<div v-else class="txt">{{ scope.row.pacName }}</div>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="剂量"
|
align="center"
|
prop="pacName"
|
width="100px"
|
/>
|
<el-table-column
|
label="单位"
|
align="center"
|
prop="detail"
|
width="100px"
|
/>
|
<el-table-column
|
label="单价"
|
align="center"
|
prop="pacRemark"
|
/>
|
<el-table-column label="库存" align="center" prop="price" />
|
</el-table>
|
<el-form
|
style="margin-top: 10px"
|
:model="form"
|
size="small"
|
:inline="true"
|
label-width="68px"
|
>
|
<el-form-item label="金额" prop="question">
|
<el-input
|
v-model="form.question"
|
placeholder="请输入金额"
|
clearable
|
/>
|
</el-form-item>
|
<el-form-item label="药品种类" prop="Typesofdrugs">
|
<el-input
|
v-model="form.Typesofdrugs"
|
placeholder="请输入药品种类"
|
clearable
|
/>
|
</el-form-item>
|
<el-form-item label="剂数" prop="question">
|
<el-input
|
v-model="form.question"
|
placeholder="请输入剂数"
|
clearable
|
/>
|
</el-form-item>
|
<el-form-item label="煎药方式" prop="question">
|
<el-input
|
v-model="form.question"
|
placeholder="请输入煎药方式"
|
clearable
|
/>
|
</el-form-item>
|
<el-form-item label="代煎剂数" prop="question">
|
<el-input
|
v-model="form.question"
|
placeholder="请输入代煎剂数"
|
clearable
|
/>
|
</el-form-item>
|
<el-form-item>
|
<el-button
|
type="primary"
|
size="mini"
|
@click="handlecomplete1"
|
>新增处方</el-button
|
>
|
</el-form-item>
|
</el-form>
|
</el-tab-pane>
|
</el-tabs>
|
</el-col>
|
</el-row>
|
</div>
|
|
|
<Pricedictionary ref="dict" />
|
<Dictionary ref="ar" />
|
<!-- <span slot="footer" class="dialog-footer">
|
<el-button @click="open = false">取 消</el-button>
|
<el-button type="primary" @click="handleOk">确 定</el-button>
|
</span> -->
|
</el-drawer>
|
</div>
|
</template>
|
|
<script>
|
import Pricedictionary from "../Pricedictionary";
|
import Dictionary from "../dictionary";
|
import {
|
Packagestlist,
|
newGetTjPat,
|
getTjYxjcList,
|
} from "@/api/system/package";
|
import { getConfigKey } from "@/api/system/config";
|
export default {
|
name: "Prescription",
|
components: {
|
Pricedictionary,
|
Dictionary,
|
},
|
props: {
|
preObj: {
|
type: Object,
|
},
|
},
|
data() {
|
return {
|
open: false,
|
openone: 0,
|
// 弹出层标题
|
title: "",
|
time:true,
|
dataList: [],
|
selectionList: [],
|
// 遮罩层
|
loading: false,
|
form: {
|
Typesofdrugs: 0,
|
},
|
reverse: false,
|
activities: [
|
{
|
content: "活动按期开始",
|
timestamp: "2018-04-15",
|
},
|
{
|
content: "通过审核",
|
timestamp: "2018-04-13",
|
},
|
{
|
content: "创建成功",
|
timestamp: "2018-04-11",
|
},
|
],
|
queryParams: {
|
pacCode: "",
|
pacName: "",
|
pacRemark: "",
|
Typesofdrugs: 0,
|
},
|
list: [],
|
medList: [],
|
fList: {},
|
};
|
},
|
watch: {
|
preObj(val, newVla) {
|
this.fList = val;
|
},
|
},
|
mounted() {},
|
|
created() {},
|
methods: {
|
handledrug() {
|
if (!this.dataList) {
|
this.dataList = [];
|
this.dataList.push({
|
id: parseInt(length + 1),
|
pacName: "",
|
pacRemark: "",
|
detail: "",
|
price: "",
|
isEdit: true,
|
Selection,
|
});
|
} else {
|
this.dataList.push({
|
id: parseInt(this.dataList.length + 1),
|
pacName: "",
|
pacRemark: "",
|
detail: "",
|
price: "",
|
isEdit: true,
|
Selection,
|
});
|
}
|
this.queryParams.Typesofdrugs = this.dataList.length;
|
},
|
handledrugChange(selection) {
|
this.selectionList = selection;
|
},
|
deledrug() {
|
if (this.selectionList.length == 0) {
|
this.$modal.msgSuccess("请选择需要删除的数据");
|
} else {
|
this.selectionList.forEach((item) => {
|
this.dataList.forEach((item1, index) => {
|
if (item == item1) {
|
this.dataList.splice(index, 1);
|
}
|
});
|
});
|
}
|
this.queryParams.Typesofdrugs = this.dataList.length;
|
},
|
handlemeddrug() {
|
if (!this.list) {
|
this.list = [];
|
this.list.push({
|
id: parseInt(this.list.length + 1),
|
pacName: "",
|
pacRemark: "",
|
detail: "",
|
price: "",
|
isEdit: true,
|
Selection,
|
});
|
} else {
|
this.list.push({
|
id: parseInt(this.list.length + 1),
|
pacName: "",
|
pacRemark: "",
|
detail: "",
|
price: "",
|
isEdit: true,
|
Selection,
|
});
|
}
|
this.form.Typesofdrugs = this.list.length;
|
},
|
delemeddrug() {
|
console.log(this.medList);
|
if (this.medList.length == 0) {
|
this.$modal.msgSuccess("请选择需要删除的数据");
|
} else {
|
this.medList.forEach((item) => {
|
this.list.forEach((item1, index) => {
|
if (item == item1) {
|
this.list.splice(index, 1);
|
}
|
});
|
});
|
}
|
this.form.Typesofdrugs = this.list.length;
|
},
|
lookmingxi(val) {
|
console.log(val, 11111);
|
},
|
getList() {},
|
handleQuery() {},
|
handleSelectionChange(selection) {
|
this.medList = selection;
|
// if (selection.length > 1) {
|
// this.$refs.elTable.clearSelection(); // 清空所有选择
|
// this.$refs.elTable.toggleRowSelection(selection.pop()); // 设置选择项
|
// }
|
},
|
changeblur() {
|
this.$refs.dict.open = true;
|
},
|
Resetdrug(){
|
this.medList=[],
|
this.dataList=[]
|
this.time = false
|
},
|
changefocus() {
|
this.$refs.ar.open = true;
|
},
|
handleOk() {
|
this.open = false;
|
},
|
handlecomplete() {
|
this.open = false;
|
},
|
handlecomplete1() {
|
this.open = false;
|
},
|
},
|
};
|
</script>
|
|
<style scoped></style>
|
|