|
@@ -41,9 +41,13 @@
|
41
|
41
|
<el-button size="small" @click="open(1)" type="primary" style="margin-left:10px;">打印处置单</el-button>
|
42
|
42
|
<el-button size="small" @click="open(2)" type="primary">打印治疗单</el-button>
|
43
|
43
|
<el-button size="small" @click="open(3)" type="primary">打印</el-button>
|
44
|
|
- <el-button v-if="hisPatientInfo == null || hisPatientInfo.id == 0 " size="small" @click="open(6)" type="primary">挂号</el-button>
|
45
|
|
- <el-button v-if="hisPatientInfo != null && hisPatientInfo.id > 0 " size="small" @click="open(4)" type="primary">收费</el-button>
|
46
|
|
- <el-button size="small" v-if="state == '已收费'" @click="open(5)" type="primary">退费</el-button>
|
|
44
|
+ <el-button v-loading="loadingone" v-if="hisPatientInfo == null || hisPatientInfo.id == 0 " size="small" @click="open(6)"
|
|
45
|
+ type="primary">挂号
|
|
46
|
+ </el-button>
|
|
47
|
+ <el-button v-loading="loadingtwo" v-if="hisPatientInfo != null && hisPatientInfo.id > 0 " size="small" @click="open(4)"
|
|
48
|
+ type="primary">收费
|
|
49
|
+ </el-button>
|
|
50
|
+ <el-button size="small" @click="open(5)" type="primary">退费</el-button>
|
47
|
51
|
</div>
|
48
|
52
|
<div class="mainCenter">
|
49
|
53
|
<div class="centerLeft">
|
|
@@ -111,7 +115,7 @@
|
111
|
115
|
import prescriptionTable from './components/prescriptionTable'
|
112
|
116
|
import additionalCharges from './components/additionalCharges'
|
113
|
117
|
import { getPatientInformation, getPatientList } from '@/api/project/project'
|
114
|
|
- import { getPatientInfo, getSchedulePatientList } from '@/api/his/his'
|
|
118
|
+ import { getPatientInfo, getSchedulePatientList, register,upload } from '@/api/his/his'
|
115
|
119
|
|
116
|
120
|
const moment = require('moment')
|
117
|
121
|
export default {
|
|
@@ -134,18 +138,19 @@
|
134
|
138
|
record_date: '',
|
135
|
139
|
tableData: [],
|
136
|
140
|
editableTabsValue: '1',
|
|
141
|
+ loadingone:false,
|
137
|
142
|
editableTabs: [{
|
138
|
143
|
title: '处方1',
|
139
|
144
|
name: '1'
|
140
|
145
|
}],
|
141
|
146
|
tabIndex: 1,
|
142
|
147
|
hisPatientInfo: {},
|
143
|
|
-
|
|
148
|
+ loadingtwo:false,
|
144
|
149
|
patientTableData: [{
|
145
|
150
|
name: '杨美英',
|
146
|
151
|
mdtrt_id: '1709946'
|
147
|
152
|
}],
|
148
|
|
- patientInfo: {},
|
|
153
|
+ patientInfo: { id: 0 },
|
149
|
154
|
doctor: {},
|
150
|
155
|
total: 0,
|
151
|
156
|
state: '未收费',
|
|
@@ -171,16 +176,16 @@
|
171
|
176
|
this.getPatientList()
|
172
|
177
|
},
|
173
|
178
|
methods: {
|
174
|
|
- tabclickEvent(val){
|
175
|
|
- for (let i= 0; i<this.prescriptions.length; i++){
|
176
|
|
- if(this.prescriptions[i].name == val.name){
|
|
179
|
+ tabclickEvent(val) {
|
|
180
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
181
|
+ if (this.prescriptions[i].name == val.name) {
|
177
|
182
|
this.curPrescriptions = {}
|
178
|
|
- var temp = this.deepClone(this.prescriptions[i])
|
|
183
|
+ var temp = this.deepClone(this.prescriptions[i])
|
179
|
184
|
this.curPrescriptions = temp
|
180
|
185
|
console.log(this.curPrescriptions)
|
181
|
186
|
}
|
182
|
187
|
}
|
183
|
|
- },deepClone(source) {
|
|
188
|
+ }, deepClone(source) {
|
184
|
189
|
if (!source && typeof source !== 'object') {
|
185
|
190
|
throw new Error('error arguments', 'shallowClone')
|
186
|
191
|
}
|
|
@@ -203,7 +208,7 @@
|
203
|
208
|
total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
|
204
|
209
|
}
|
205
|
210
|
}
|
206
|
|
- if(this.prescriptions[i].project != null) {
|
|
211
|
+ if (this.prescriptions[i].project != null) {
|
207
|
212
|
for (let b = 0; b < this.prescriptions[i].project.length; b++) {
|
208
|
213
|
total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].count
|
209
|
214
|
}
|
|
@@ -221,12 +226,54 @@
|
221
|
226
|
} else if (index == 2) {
|
222
|
227
|
|
223
|
228
|
} else if (index == 4) {
|
|
229
|
+
|
|
230
|
+ let params = {
|
|
231
|
+ 'id': this.patientInfo.id,
|
|
232
|
+ 'record_time': this.record_date
|
|
233
|
+ }
|
|
234
|
+ this.loadingtwo = true
|
|
235
|
+ upload(params).then(response => {
|
|
236
|
+ if (response.data.state == 0) {
|
|
237
|
+ this.$message.error(response.data.msg)
|
|
238
|
+ this.loadingtwo = false
|
|
239
|
+
|
|
240
|
+ return false
|
|
241
|
+
|
|
242
|
+ } else {
|
|
243
|
+ this.loadingtwo = false
|
|
244
|
+
|
|
245
|
+ }
|
|
246
|
+ })
|
|
247
|
+
|
224
|
248
|
this.state = '已收费'
|
225
|
249
|
this.$message({ message: '收费成功', type: 'success' })
|
226
|
250
|
} else if (index == 5) {
|
227
|
251
|
this.$message({ message: '退费成功', type: 'success' })
|
228
|
|
- }
|
|
252
|
+ } else if (index == 6) {
|
229
|
253
|
|
|
254
|
+ if (this.patientInfo.id == 0) {
|
|
255
|
+ this.$message.error('请先选择要挂号的病人')
|
|
256
|
+ return
|
|
257
|
+ }
|
|
258
|
+ let params = {
|
|
259
|
+ 'id': this.patientInfo.id,
|
|
260
|
+ 'record_time': this.record_date
|
|
261
|
+ }
|
|
262
|
+ this.loadingone = true
|
|
263
|
+ register(params).then(response => {
|
|
264
|
+ if (response.data.state == 0) {
|
|
265
|
+ this.$message.error(response.data.msg)
|
|
266
|
+ this.loadingone = false
|
|
267
|
+
|
|
268
|
+ return false
|
|
269
|
+
|
|
270
|
+ } else {
|
|
271
|
+ this.loadingone = false
|
|
272
|
+ var his_info = response.data.data.his_info
|
|
273
|
+ this.hisPatientInfo = his_info
|
|
274
|
+ }
|
|
275
|
+ })
|
|
276
|
+ }
|
230
|
277
|
},
|
231
|
278
|
addTab(targetName) {
|
232
|
279
|
let newTabName = ++this.tabIndex + ''
|