|
@@ -1,192 +1,196 @@
|
1
|
1
|
<template>
|
2
|
|
- <div style="height: calc(100% - 58px);display: flex;flex-direction: column;margin-top: 56px;">
|
3
|
|
- <el-button size="small" @click="save" type="primary" style="margin-left:10px;">保存</el-button>
|
4
|
|
- <div class="mainCenter" v-loading="loading">
|
5
|
|
- <div class="centerLeft">
|
6
|
|
- <el-form :model="tempForm" ref="tempForm" label-width="80px"
|
7
|
|
- style="display: flex;flex-wrap: wrap;justify-content: space-between;">
|
8
|
|
- <el-form-item label="模版名称:" prop="name" label-position="right">
|
9
|
|
- <el-input v-model="tempForm.name" placeholder=""></el-input>
|
10
|
|
- </el-form-item>
|
11
|
|
-
|
12
|
|
- <el-form-item label="透析模式: " prop="mode_id" label-position="right">
|
13
|
|
- <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择">
|
14
|
|
- <el-option
|
15
|
|
- v-for="item in modeOptions"
|
16
|
|
- :key="item.id"
|
17
|
|
- :label="item.name"
|
18
|
|
- :value="item.id"
|
19
|
|
- ></el-option>
|
20
|
|
- </el-select>
|
21
|
|
- </el-form-item>
|
22
|
|
- </el-form>
|
23
|
|
- <div class="tabsBox">
|
24
|
|
- <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
|
25
|
|
- closable
|
26
|
|
- @tab-remove="removeTab"
|
27
|
|
- :before-leave="moreState" @tab-click="tabclickEvent">
|
28
|
|
- <el-tab-pane
|
29
|
|
- v-for="(item, index) in prescriptions"
|
30
|
|
- :key="index"
|
31
|
|
- :label="item.name"
|
32
|
|
- :name="item.name"
|
33
|
|
- >
|
34
|
|
- </el-tab-pane>
|
|
2
|
+ <div class="main-contain new-main-contain">
|
|
3
|
+
|
|
4
|
+ <div style="height: calc(100% - 58px);display: flex;flex-direction: column;margin-top: 56px;">
|
|
5
|
+ <el-button size="small" @click="save" type="primary" style="margin-left:10px;width:60px;float: left">保存
|
|
6
|
+ </el-button>
|
|
7
|
+
|
|
8
|
+ <div class="mainCenter" v-loading="loading">
|
|
9
|
+ <div class="centerLeft">
|
|
10
|
+ <el-form :model="tempForm" ref="tempForm" label-width="80px"
|
|
11
|
+ style="display: flex;flex-wrap: wrap;justify-content: space-between;">
|
|
12
|
+ <el-form-item label="模版名称:" prop="name" label-position="right">
|
|
13
|
+ <el-input v-model="tempForm.name" placeholder=""></el-input>
|
|
14
|
+ </el-form-item>
|
|
15
|
+
|
|
16
|
+ <el-form-item label="透析模式: " prop="mode_id" label-position="right">
|
|
17
|
+ <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择">
|
|
18
|
+ <el-option
|
|
19
|
+ v-for="item in modeOptions"
|
|
20
|
+ :key="item.id"
|
|
21
|
+ :label="item.name"
|
|
22
|
+ :value="item.id"
|
|
23
|
+ ></el-option>
|
|
24
|
+ </el-select>
|
|
25
|
+ </el-form-item>
|
|
26
|
+ </el-form>
|
|
27
|
+ <div class="tabsBox">
|
|
28
|
+ <el-tabs class="preTabs" v-model="editableTabsValue" type="border-card"
|
|
29
|
+ closable
|
|
30
|
+ @tab-remove="removeTab"
|
|
31
|
+ :before-leave="moreState" @tab-click="tabclickEvent">
|
|
32
|
+ <el-tab-pane
|
|
33
|
+ v-for="(item, index) in prescriptions"
|
|
34
|
+ :key="index"
|
|
35
|
+ :label="item.name"
|
|
36
|
+ :name="item.name"
|
|
37
|
+ >
|
|
38
|
+ </el-tab-pane>
|
35
|
39
|
|
36
|
|
- <el-tab-pane name="more" closable><span slot="label"><i
|
37
|
|
- class="el-icon-plus"
|
38
|
|
- @click="addTab"></i></span>
|
39
|
|
- </el-tab-pane>
|
|
40
|
+ <el-tab-pane name="more" closable><span slot="label"><i
|
|
41
|
+ class="el-icon-plus"
|
|
42
|
+ @click="addTab"></i></span>
|
|
43
|
+ </el-tab-pane>
|
40
|
44
|
|
41
|
|
- <!--<prescription-table ref="prescription_tables"-->
|
42
|
|
- <!--:prescription="curPrescriptions"-->
|
43
|
|
- <!--:preDrugs="preDrugs"-->
|
44
|
|
- <!--:activeType="customTabIndex"></prescription-table>-->
|
|
45
|
+ <!--<prescription-table ref="prescription_tables"-->
|
|
46
|
+ <!--:prescription="curPrescriptions"-->
|
|
47
|
+ <!--:preDrugs="preDrugs"-->
|
|
48
|
+ <!--:activeType="customTabIndex"></prescription-table>-->
|
45
|
49
|
|
46
|
|
- <prescription-template-table ref="prescription_tables"
|
47
|
|
- :prescription="curPrescriptions"
|
48
|
|
- :preDrugs="preDrugs"
|
49
|
|
- :activeType="customTabIndex"></prescription-template-table>
|
50
|
|
- </el-tabs>
|
|
50
|
+ <prescription-template-table ref="prescription_tables"
|
|
51
|
+ :prescription="curPrescriptions"
|
|
52
|
+ :preDrugs="preDrugs"
|
|
53
|
+ :activeType="customTabIndex"></prescription-template-table>
|
|
54
|
+ </el-tabs>
|
|
55
|
+ </div>
|
51
|
56
|
</div>
|
52
|
|
- </div>
|
53
|
|
- <div class='centerRight'>
|
54
|
|
- <el-tabs class="borderCard" type="border-card" v-model="rightTab" @tab-click="clickTab"
|
55
|
|
- :before-leave='beforeLeave'>
|
56
|
|
- <el-tab-pane label="药品" :name="1">
|
57
|
|
-
|
58
|
|
- </el-tab-pane>
|
59
|
|
- <el-tab-pane label="项目" :name="2">
|
60
|
|
-
|
61
|
|
- </el-tab-pane>
|
62
|
|
- <div style="height:100%;" v-show="showOne">
|
63
|
|
- <el-tabs class="rightTabs" v-model="drug_activeName">
|
64
|
|
- <el-tab-pane label="药品列表" name="1">
|
65
|
|
- <div style="margin-bottom:5px;display:flex;">
|
66
|
|
- <el-input style="width:50%;" @input="searchAction"
|
67
|
|
- @keyup.enter.native='searchAction'
|
68
|
|
- v-model.trim="search_keyword"
|
69
|
|
- placeholder="请输入药品名字"></el-input>
|
70
|
|
- <el-select style="margin-left:5px;width:50%;" v-model="value" placeholder=""
|
71
|
|
- @change="changeKind">
|
72
|
|
- <el-option
|
73
|
|
- label="全部"
|
74
|
|
- value="0">
|
75
|
|
- </el-option>
|
76
|
|
- <el-option
|
77
|
|
- v-for="(item,index) in getDictionaryDataConfig('system','drug_type')"
|
78
|
|
- :key="index"
|
79
|
|
- :label="item.name"
|
80
|
|
- :value="item.id">
|
81
|
|
- </el-option>
|
82
|
|
- </el-select>
|
83
|
|
- </div>
|
84
|
|
- <div style="width: 100%;flex:1;overflow: hidden;" ref="rightTable">
|
85
|
|
- <el-table ref="multipleTable"
|
86
|
|
- :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
|
87
|
|
- :data="drugs" border @select='selectDrugs'
|
88
|
|
- :row-style="{ color: '#303133' }"
|
89
|
|
- @select-all="changeAllGoodInfoTableData"
|
90
|
|
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
91
|
|
- highlight-current-row>
|
92
|
|
- <el-table-column type="selection" width="40" align="center"></el-table-column>
|
93
|
|
- <el-table-column label="名称">
|
94
|
|
- <template slot-scope="scope">{{ scope.row.drug_name }}</template>
|
95
|
|
- </el-table-column>
|
96
|
|
- <el-table-column label="规格" width="60">
|
97
|
|
- <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
|
98
|
|
- </el-table-column>
|
99
|
|
- <el-table-column label="单价" width="40">
|
100
|
|
- <template slot-scope="scope">{{ scope.row.retail_price }}</template>
|
101
|
|
- </el-table-column>
|
102
|
|
- </el-table>
|
103
|
|
- </div>
|
|
57
|
+ <div class='centerRight'>
|
|
58
|
+ <el-tabs class="borderCard" type="border-card" v-model="rightTab" @tab-click="clickTab"
|
|
59
|
+ :before-leave='beforeLeave'>
|
|
60
|
+ <el-tab-pane label="药品" :name="1">
|
104
|
61
|
|
105
|
|
- </el-tab-pane>
|
|
62
|
+ </el-tab-pane>
|
|
63
|
+ <el-tab-pane label="项目" :name="2">
|
106
|
64
|
|
107
|
|
- </el-tabs>
|
108
|
|
- </div>
|
109
|
|
- <div style="height:100%;" v-show="showTwo">
|
110
|
|
- <el-tabs class="rightTabs" v-model="activeName">
|
111
|
|
- <el-tab-pane label="项目列表" name="1">
|
112
|
|
- <div style="margin-bottom:5px;">
|
113
|
|
- <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
|
114
|
|
- <el-input style="width:50%;" @input="searchProjectAction"
|
115
|
|
- @keyup.enter.native='searchProjectAction'
|
116
|
|
- v-model.trim="search_project_keyword"
|
117
|
|
- placeholder="请输入项目名称"></el-input>
|
118
|
|
- <el-select style="float: right;width: 49%;" v-model="value" placeholder=""
|
119
|
|
- @change="changeClass">
|
120
|
|
- <el-option
|
121
|
|
- label="全部"
|
122
|
|
- value="0">
|
123
|
|
- </el-option>
|
124
|
|
- <el-option
|
125
|
|
- v-for="(item, index) in getDictionaryDataConfig('system','cost_classify')"
|
126
|
|
- :key="index"
|
127
|
|
- :label="item.name"
|
128
|
|
- :value="item.id">
|
129
|
|
- </el-option>
|
130
|
|
- </el-select>
|
131
|
|
- </div>
|
132
|
|
- <div style="width: 100%;flex:1;overflow-y: auto;">
|
133
|
|
- <el-table ref="tables"
|
134
|
|
- :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
|
135
|
|
- :data="tabProject" border @select='selectChange'
|
136
|
|
- :row-style="{ color: '#303133' }"
|
137
|
|
- @select-all="changeAllGoodInfoTableDataTwo"
|
138
|
|
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
139
|
|
- highlight-current-row>
|
140
|
|
- <el-table-column type="selection" width="40" align="center"></el-table-column>
|
141
|
|
- <el-table-column prop="name" label="名称">
|
142
|
|
- <template slot-scope="scope">{{ scope.row.project_name }}</template>
|
143
|
|
- </el-table-column>
|
144
|
|
- <el-table-column label="规格" width="60">
|
145
|
|
- <template slot-scope="scope">{{ scope.row.single_dose }}</template>
|
146
|
|
- </el-table-column>
|
147
|
|
- <el-table-column label="单价" width="40">
|
148
|
|
- <template slot-scope="scope">{{ scope.row.price }}</template>
|
149
|
|
- </el-table-column>
|
150
|
|
- </el-table>
|
151
|
|
- </div>
|
152
|
|
- </el-tab-pane>
|
153
|
|
- <el-tab-pane label="项目组套" name="2">
|
154
|
|
- <div style="width: 100%;flex:1;overflow-y: auto;">
|
155
|
|
- <el-table :data="tabPrjectTeam" border ref="tabProjectTeam"
|
156
|
|
- :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
|
157
|
|
- :row-style="{ color: '#303133' }"
|
158
|
|
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
159
|
|
- highlight-current-row
|
160
|
|
- @select='selectTeam'>
|
161
|
|
- <el-table-column type="selection" width="40" align="center"></el-table-column>
|
162
|
|
- <el-table-column prop="name" label="名称">
|
163
|
|
- <template slot-scope="scope">{{scope.row.project_team}}</template>
|
164
|
|
- </el-table-column>
|
165
|
|
- </el-table>
|
166
|
|
- </div>
|
167
|
|
- </el-tab-pane>
|
168
|
|
- </el-tabs>
|
169
|
|
- </div>
|
170
|
|
- </el-tabs>
|
171
|
|
- <template>
|
|
65
|
+ </el-tab-pane>
|
|
66
|
+ <div style="height:100%;" v-show="showOne">
|
|
67
|
+ <el-tabs class="rightTabs" v-model="drug_activeName">
|
|
68
|
+ <el-tab-pane label="药品列表" name="1">
|
|
69
|
+ <div style="margin-bottom:5px;display:flex;">
|
|
70
|
+ <el-input style="width:50%;" @input="searchAction"
|
|
71
|
+ @keyup.enter.native='searchAction'
|
|
72
|
+ v-model.trim="search_keyword"
|
|
73
|
+ placeholder="请输入药品名字"></el-input>
|
|
74
|
+ <el-select style="margin-left:5px;width:50%;" v-model="value" placeholder=""
|
|
75
|
+ @change="changeKind">
|
|
76
|
+ <el-option
|
|
77
|
+ label="全部"
|
|
78
|
+ value="0">
|
|
79
|
+ </el-option>
|
|
80
|
+ <el-option
|
|
81
|
+ v-for="(item,index) in getDictionaryDataConfig('system','drug_type')"
|
|
82
|
+ :key="index"
|
|
83
|
+ :label="item.name"
|
|
84
|
+ :value="item.id">
|
|
85
|
+ </el-option>
|
|
86
|
+ </el-select>
|
|
87
|
+ </div>
|
|
88
|
+ <div style="width: 100%;flex:1;overflow: hidden;" ref="rightTable">
|
|
89
|
+ <el-table ref="multipleTable"
|
|
90
|
+ :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
|
|
91
|
+ :data="drugs" border @select='selectDrugs'
|
|
92
|
+ :row-style="{ color: '#303133' }"
|
|
93
|
+ @select-all="changeAllGoodInfoTableData"
|
|
94
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
95
|
+ highlight-current-row>
|
|
96
|
+ <el-table-column type="selection" width="40"
|
|
97
|
+ align="center"></el-table-column>
|
|
98
|
+ <el-table-column label="名称">
|
|
99
|
+ <template slot-scope="scope">{{ scope.row.drug_name }}</template>
|
|
100
|
+ </el-table-column>
|
|
101
|
+ <el-table-column label="规格" width="60">
|
|
102
|
+ <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
|
|
103
|
+ </el-table-column>
|
|
104
|
+ <el-table-column label="单价" width="40">
|
|
105
|
+ <template slot-scope="scope">{{ scope.row.retail_price }}</template>
|
|
106
|
+ </el-table-column>
|
|
107
|
+ </el-table>
|
|
108
|
+ </div>
|
|
109
|
+
|
|
110
|
+ </el-tab-pane>
|
|
111
|
+
|
|
112
|
+ </el-tabs>
|
|
113
|
+ </div>
|
|
114
|
+ <div style="height:100%;" v-show="showTwo">
|
|
115
|
+ <el-tabs class="rightTabs" v-model="activeName">
|
|
116
|
+ <el-tab-pane label="项目列表" name="1">
|
|
117
|
+ <div style="margin-bottom:5px;">
|
|
118
|
+ <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
|
|
119
|
+ <el-input style="width:50%;" @input="searchProjectAction"
|
|
120
|
+ @keyup.enter.native='searchProjectAction'
|
|
121
|
+ v-model.trim="search_project_keyword"
|
|
122
|
+ placeholder="请输入项目名称"></el-input>
|
|
123
|
+ <el-select style="float: right;width: 49%;" v-model="value" placeholder=""
|
|
124
|
+ @change="changeClass">
|
|
125
|
+ <el-option
|
|
126
|
+ label="全部"
|
|
127
|
+ value="0">
|
|
128
|
+ </el-option>
|
|
129
|
+ <el-option
|
|
130
|
+ v-for="(item, index) in getDictionaryDataConfig('system','cost_classify')"
|
|
131
|
+ :key="index"
|
|
132
|
+ :label="item.name"
|
|
133
|
+ :value="item.id">
|
|
134
|
+ </el-option>
|
|
135
|
+ </el-select>
|
|
136
|
+ </div>
|
|
137
|
+ <div style="width: 100%;flex:1;overflow-y: auto;">
|
|
138
|
+ <el-table ref="tables"
|
|
139
|
+ :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
|
|
140
|
+ :data="tabProject" border @select='selectChange'
|
|
141
|
+ :row-style="{ color: '#303133' }"
|
|
142
|
+ @select-all="changeAllGoodInfoTableDataTwo"
|
|
143
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
144
|
+ highlight-current-row>
|
|
145
|
+ <el-table-column type="selection" width="40"
|
|
146
|
+ align="center"></el-table-column>
|
|
147
|
+ <el-table-column prop="name" label="名称">
|
|
148
|
+ <template slot-scope="scope">{{ scope.row.project_name }}</template>
|
|
149
|
+ </el-table-column>
|
|
150
|
+ <el-table-column label="规格" width="60">
|
|
151
|
+ <template slot-scope="scope">{{ scope.row.single_dose }}</template>
|
|
152
|
+ </el-table-column>
|
|
153
|
+ <el-table-column label="单价" width="40">
|
|
154
|
+ <template slot-scope="scope">{{ scope.row.price }}</template>
|
|
155
|
+ </el-table-column>
|
|
156
|
+ </el-table>
|
|
157
|
+ </div>
|
|
158
|
+ </el-tab-pane>
|
|
159
|
+ <el-tab-pane label="项目组套" name="2">
|
|
160
|
+ <div style="width: 100%;flex:1;overflow-y: auto;">
|
|
161
|
+ <el-table :data="tabPrjectTeam" border ref="tabProjectTeam"
|
|
162
|
+ :height="multipleTableHeight != '' ? multipleTableHeight : '200'"
|
|
163
|
+ :row-style="{ color: '#303133' }"
|
|
164
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
|
165
|
+ highlight-current-row
|
|
166
|
+ @select='selectTeam'>
|
|
167
|
+ <el-table-column type="selection" width="40"
|
|
168
|
+ align="center"></el-table-column>
|
|
169
|
+ <el-table-column prop="name" label="名称">
|
|
170
|
+ <template slot-scope="scope">{{scope.row.project_team}}</template>
|
|
171
|
+ </el-table-column>
|
|
172
|
+ </el-table>
|
|
173
|
+ </div>
|
|
174
|
+ </el-tab-pane>
|
|
175
|
+ </el-tabs>
|
|
176
|
+ </div>
|
|
177
|
+ </el-tabs>
|
|
178
|
+ <template>
|
172
|
179
|
|
173
|
180
|
|
174
|
|
- <div class="comfirmBox">
|
175
|
|
- <el-button type="primary" style="width:100%;" @click="comfirm">确定添加</el-button>
|
176
|
|
- </div>
|
177
|
|
- </template>
|
|
181
|
+ <div class="comfirmBox">
|
|
182
|
+ <el-button type="primary" style="width:100%;" @click="comfirm">确定添加</el-button>
|
|
183
|
+ </div>
|
|
184
|
+ </template>
|
|
185
|
+ </div>
|
178
|
186
|
</div>
|
179
|
187
|
</div>
|
180
|
|
-
|
181
|
188
|
</div>
|
182
|
189
|
</template>
|
183
|
190
|
|
184
|
191
|
|
185
|
192
|
<script>
|
186
|
|
- import {
|
187
|
|
- createdTemplate,
|
188
|
|
- delHisPrescriptionInfoTemplate,
|
189
|
|
- } from '@/api/his/his_config'
|
|
193
|
+ import { createdTemplate, delHisPrescriptionInfoTemplate, getPrescriptionTemplateInfo } from '@/api/his/his_config'
|
190
|
194
|
import {
|
191
|
195
|
createHisPrescription,
|
192
|
196
|
delHisPrescription,
|
|
@@ -207,7 +211,6 @@
|
207
|
211
|
getHisProject,
|
208
|
212
|
getPojectListById
|
209
|
213
|
} from '@/api/project/project'
|
210
|
|
- import { getPrescriptionTemplateInfo } from '@/api/his/his_config'
|
211
|
214
|
|
212
|
215
|
import { uParseTime } from '@/utils/tools'
|
213
|
216
|
import PrescriptionTemplateTable from './components/prescriptionTemplateTable'
|
|
@@ -236,9 +239,9 @@
|
236
|
239
|
},
|
237
|
240
|
data() {
|
238
|
241
|
return {
|
239
|
|
- tempForm:{
|
|
242
|
+ tempForm: {
|
240
|
243
|
name: '',
|
241
|
|
- mode_id: '',
|
|
244
|
+ mode_id: ''
|
242
|
245
|
},
|
243
|
246
|
modeOptions: this.$store.getters.treatment_mode,
|
244
|
247
|
start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
|
|
@@ -320,7 +323,7 @@
|
320
|
323
|
}
|
321
|
324
|
},
|
322
|
325
|
methods: {
|
323
|
|
- save(){
|
|
326
|
+ save() {
|
324
|
327
|
|
325
|
328
|
if (this.prescriptions[0].advices.length == 0 && this.prescriptions[0].project.length == 0) {
|
326
|
329
|
this.$message.error('请先开处方')
|
|
@@ -370,16 +373,14 @@
|
370
|
373
|
let data = {
|
371
|
374
|
'prescriptions': this.prescriptions
|
372
|
375
|
}
|
373
|
|
- createdTemplate(params,data).then(response => {
|
|
376
|
+ createdTemplate(params, data).then(response => {
|
374
|
377
|
if (response.data.state == 1) {
|
375
|
|
- this.$emit('change', this.patientInfo.id)
|
376
|
378
|
this.$message.success('保存成功')
|
|
379
|
+ }else{
|
|
380
|
+ this.$message.error(response.data.msg)
|
377
|
381
|
}
|
378
|
382
|
})
|
379
|
383
|
|
380
|
|
-
|
381
|
|
-
|
382
|
|
-
|
383
|
384
|
},
|
384
|
385
|
changeClass(id) {
|
385
|
386
|
this.tabProject = []
|