|
@@ -11,13 +11,16 @@
|
11
|
11
|
<div class="backColor"></div>
|
12
|
12
|
<div class="mainCenter">
|
13
|
13
|
<div class="centerLeft">
|
14
|
|
- <el-form :model="form" ref="form" label-width="80px">
|
|
14
|
+ <el-form :model="form" ref="form" label-width="80px">
|
15
|
15
|
<el-form-item label="姓名:" prop="name">
|
16
|
16
|
<el-input v-model="patientInfo.name" placeholder="" readonly></el-input>
|
17
|
17
|
</el-form-item>
|
18
|
18
|
<el-form-item label="证件号: " prop="name">
|
19
|
19
|
<el-input v-model="patientInfo.id_card_no" placeholder="" readonly></el-input>
|
20
|
20
|
</el-form-item>
|
|
21
|
+ <el-form-item label="挂号类型: " prop="name">
|
|
22
|
+ <el-input v-model="hisPatientInfo.register_type" placeholder="" readonly></el-input>
|
|
23
|
+ </el-form-item>
|
21
|
24
|
<el-form-item label="挂号类型: " prop="name">
|
22
|
25
|
<el-select style="margin-right:5px;" v-model="doctorValue" placeholder="">
|
23
|
26
|
<el-option
|
|
@@ -49,7 +52,7 @@
|
49
|
52
|
</el-form>
|
50
|
53
|
<div class="tabsBox">
|
51
|
54
|
|
52
|
|
- <!--<el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>-->
|
|
55
|
+ <el-button type="text" class="addTab" @click="addCharges" icon="el-icon-circle-plus">附加收费</el-button>
|
53
|
56
|
<el-tabs class="preTabs" v-model="editableTabsValue" type="card" closable @tab-remove="removeTab"
|
54
|
57
|
:before-leave="moreState" @tab-click="tabclickEvent">
|
55
|
58
|
<el-tab-pane
|
|
@@ -63,8 +66,7 @@
|
63
|
66
|
<el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
|
64
|
67
|
</el-tab-pane>
|
65
|
68
|
<div class="RP">Rp</div>
|
66
|
|
- <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
|
67
|
|
- :activeType="customTabIndex"></prescription-table>
|
|
69
|
+ <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs" :activeType="customTabIndex"></prescription-table>
|
68
|
70
|
</el-tabs>
|
69
|
71
|
|
70
|
72
|
</div>
|
|
@@ -97,23 +99,22 @@
|
97
|
99
|
<p :class="rightTab == 2 ? 'activeP' : ''" @click="clickTab(2)">项目</p>
|
98
|
100
|
</div>
|
99
|
101
|
<template>
|
100
|
|
- <!--<div style="margin-top:5px;">-->
|
101
|
|
- <!--<el-input style="width:50%;" v-model="input" placeholder=""></el-input>-->
|
102
|
|
- <!--<el-select style="float: right;width: 49%;" v-model="value" placeholder="">-->
|
103
|
|
- <!--<el-option-->
|
104
|
|
- <!--v-for="item in options"-->
|
105
|
|
- <!--:key="item.value"-->
|
106
|
|
- <!--:label="item.label"-->
|
107
|
|
- <!--:value="item.value">-->
|
108
|
|
- <!--</el-option>-->
|
109
|
|
- <!--</el-select>-->
|
110
|
|
- <!--</div>-->
|
|
102
|
+ <div style="margin-top:5px;">
|
|
103
|
+ <el-input style="width:50%;" v-model="input" placeholder=""></el-input>
|
|
104
|
+ <el-select style="float: right;width: 49%;" v-model="value" placeholder="">
|
|
105
|
+ <el-option
|
|
106
|
+ v-for="item in options"
|
|
107
|
+ :key="item.value"
|
|
108
|
+ :label="item.label"
|
|
109
|
+ :value="item.value">
|
|
110
|
+ </el-option>
|
|
111
|
+ </el-select>
|
|
112
|
+ </div>
|
111
|
113
|
<div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showOne">
|
112
|
114
|
<el-tabs class="rightTabs" v-model="activeName">
|
113
|
115
|
<el-tab-pane label="药品列表" name="1">
|
114
|
|
- <el-table ref="multipleTable" :data="drugs" border @select='selectDrugs' style="width: 100%;"
|
|
116
|
+ <el-table :data="drugs" border @select='selectDrugs' style="width: 100%;"
|
115
|
117
|
:row-style="{ color: '#303133' }"
|
116
|
|
- @select-all="changeAllGoodInfoTableData"
|
117
|
118
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
118
|
119
|
highlight-current-row>
|
119
|
120
|
<el-table-column align="center" type="selection" width="40"></el-table-column>
|
|
@@ -130,8 +131,7 @@
|
130
|
131
|
|
131
|
132
|
</el-tab-pane>
|
132
|
133
|
<el-tab-pane label="医嘱模板" name="2">
|
133
|
|
- <el-table ref="multipleTableTwo" :data="advices_template" border style="width: 100%;"
|
134
|
|
- :row-style="{ color: '#303133' }"
|
|
134
|
+ <el-table :data="advices_template" border style="width: 100%;" :row-style="{ color: '#303133' }"
|
135
|
135
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
136
|
136
|
highlight-current-row>
|
137
|
137
|
<el-table-column align="center" type="selection" width="40"></el-table-column>
|
|
@@ -152,14 +152,13 @@
|
152
|
152
|
</el-tabs>
|
153
|
153
|
</div>
|
154
|
154
|
|
155
|
|
- <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showTwo">
|
|
155
|
+ <div style="height:84%;overflow-y: auto;margin-bottom: 60px;" v-show="showTwo">
|
156
|
156
|
<el-tabs class="rightTabs" v-model="activeName">
|
157
|
157
|
<el-tab-pane label="项目列表" name="1">
|
158
|
|
- <el-table :data="tabProject" border @select='selectChange' style="width: 100%;"
|
|
158
|
+ <el-table :data="tabProject" border @select='selectChange' style="width: 100%;"
|
159
|
159
|
:row-style="{ color: '#303133' }"
|
160
|
|
- @select-all="changeAllGoodInfoTableDataTwo"
|
161
|
160
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
162
|
|
- highlight-current-row>
|
|
161
|
+ highlight-current-row >
|
163
|
162
|
<el-table-column align="center" type="selection" width="40"></el-table-column>
|
164
|
163
|
<el-table-column align="center" prop="name" label="名称">
|
165
|
164
|
<template slot-scope="scope">{{ scope.row.project_name }}</template>
|
|
@@ -176,7 +175,7 @@
|
176
|
175
|
<el-table :data="tabPrjectTeam" border style="width: 100%;" :row-style="{ color: '#303133' }"
|
177
|
176
|
:header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
|
178
|
177
|
highlight-current-row
|
179
|
|
- @select='selectTeam'>
|
|
178
|
+ @select='selectTeam'>
|
180
|
179
|
<el-table-column align="center" type="selection" width="40"></el-table-column>
|
181
|
180
|
<el-table-column align="center" prop="name" label="名称">
|
182
|
181
|
<template slot-scope="scope">{{scope.row.project_team}}</template>
|
|
@@ -207,8 +206,7 @@
|
207
|
206
|
</template>
|
208
|
207
|
</div>
|
209
|
208
|
</div>
|
210
|
|
- <additionalCharges ref='additionalCharges' :hisPatientInfo="hisPatientInfo"
|
211
|
|
- :patientInfo="patientInfo"></additionalCharges>
|
|
209
|
+ <additionalCharges ref='additionalCharges' :hisPatientInfo="hisPatientInfo" :patientInfo="patientInfo"></additionalCharges>
|
212
|
210
|
<select-template ref='selectTemplate'></select-template>
|
213
|
211
|
<save-template ref='saveTemplate'></save-template>
|
214
|
212
|
</div>
|
|
@@ -216,22 +214,21 @@
|
216
|
214
|
|
217
|
215
|
|
218
|
216
|
<script>
|
219
|
|
- import { createHisPrescription, getInitData, getPatientInfo, getSchedulePatientList } from '@/api/his/his'
|
220
|
|
- import { getDictionaryDataConfig } from '@/utils/data'
|
|
217
|
+ import { getPatientInfo, getSchedulePatientList, getInitData,createHisPrescription } from '@/api/his/his'
|
|
218
|
+ import { getDictionaryDataConfig} from "@/utils/data";
|
221
|
219
|
import prescriptionTable from './prescriptionTable'
|
222
|
220
|
import selectTemplate from './selectTemplate'
|
223
|
221
|
import saveTemplate from './saveTemplate'
|
224
|
222
|
import additionalCharges from './additionalCharges'
|
225
|
|
- import { addProjectTeam, getAllProjectTeam, getHisProject, getPojectListById } from '@/api/project/project'
|
|
223
|
+ import { getHisProject,addProjectTeam,getAllProjectTeam,getPojectListById } from '@/api/project/project'
|
|
224
|
+ // import { getPatientInfo, getSchedulePatientList,createHisPrescription } from '@/api/his/his'
|
226
|
225
|
|
227
|
226
|
export default {
|
228
|
227
|
props: {
|
229
|
228
|
patientInfo: Object,
|
230
|
229
|
hisPatientInfo: Object,
|
231
|
230
|
prescriptions: Array,
|
232
|
|
- record_date: String,
|
233
|
|
- other_sick:Array,
|
234
|
|
- diagnoses:Array,
|
|
231
|
+ record_date:String,
|
235
|
232
|
},
|
236
|
233
|
components: {
|
237
|
234
|
selectTemplate,
|
|
@@ -241,13 +238,13 @@
|
241
|
238
|
},
|
242
|
239
|
data() {
|
243
|
240
|
return {
|
244
|
|
- value: '',
|
|
241
|
+ value:"",
|
245
|
242
|
form: {
|
246
|
243
|
name: ''
|
247
|
244
|
},
|
248
|
|
- drugs: [],
|
249
|
|
- allDrugs: [],
|
250
|
|
- advices_template: [],
|
|
245
|
+ drugs:[],
|
|
246
|
+ allDrugs:[],
|
|
247
|
+ advices_template:[],
|
251
|
248
|
|
252
|
249
|
editableTabsValue: '处方1',
|
253
|
250
|
editableTabs: [{
|
|
@@ -255,7 +252,7 @@
|
255
|
252
|
name: '1'
|
256
|
253
|
}],
|
257
|
254
|
tabIndex: 1,
|
258
|
|
- currenet_inedx: 0,
|
|
255
|
+ currenet_inedx:0,
|
259
|
256
|
rightTab: 1,
|
260
|
257
|
activeName: '1',
|
261
|
258
|
curPrescriptions: this.prescriptions[0],
|
|
@@ -266,32 +263,32 @@
|
266
|
263
|
doctorValue: '',
|
267
|
264
|
departmentOptions: [],
|
268
|
265
|
departmentValue: '',
|
|
266
|
+ diagnoses: this.getDictionaryDataConfig('system','diagnose'),
|
|
267
|
+ other_sick:this.getDictionaryDataConfig('system','other_sick_history'),
|
269
|
268
|
total: 0,
|
270
|
|
- state1: '',
|
271
|
|
- state2: '',
|
272
|
|
- customTabIndex: 1,
|
273
|
|
- options: [],
|
274
|
|
- tabProject: [],
|
275
|
|
- strids: '',
|
276
|
|
- showOne: true,
|
277
|
|
- showTwo: false,
|
278
|
|
- tableData: [],
|
279
|
|
- tabPrjectTeam: [],
|
280
|
|
- teamList: [],
|
281
|
|
- doctors: [],
|
282
|
|
- departMent: []
|
|
269
|
+ state1:"",
|
|
270
|
+ state2:"",
|
|
271
|
+ customTabIndex:1,
|
|
272
|
+ options:[],
|
|
273
|
+ tabProject:[],
|
|
274
|
+ strids:"",
|
|
275
|
+ showOne:true,
|
|
276
|
+ showTwo:false,
|
|
277
|
+ tableData:[],
|
|
278
|
+ tabPrjectTeam:[],
|
|
279
|
+ teamList:[],
|
|
280
|
+ doctors:[],
|
|
281
|
+ departMent:[]
|
283
|
282
|
}
|
284
|
|
- }, mounted() {
|
285
|
|
-
|
286
|
283
|
},
|
287
|
284
|
methods: {
|
288
|
|
- createFilter(queryString) {
|
|
285
|
+ createFilter (queryString) {
|
289
|
286
|
return (restaurant) => {
|
290
|
287
|
return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
|
291
|
288
|
}
|
292
|
289
|
},
|
293
|
290
|
|
294
|
|
- querySearch(queryString, cb) {
|
|
291
|
+ querySearch (queryString, cb) {
|
295
|
292
|
var restaurants = this.diagnoses
|
296
|
293
|
console.log(restaurants)
|
297
|
294
|
restaurants.map(item => {
|
|
@@ -301,7 +298,7 @@
|
301
|
298
|
// 调用 callback 返回建议列表的数据
|
302
|
299
|
cb(results)
|
303
|
300
|
},
|
304
|
|
- querySearch2(queryString, cb) {
|
|
301
|
+ querySearch2 (queryString, cb) {
|
305
|
302
|
var restaurants = this.other_sick
|
306
|
303
|
restaurants.map(item => {
|
307
|
304
|
item.value = item.name
|
|
@@ -310,14 +307,14 @@
|
310
|
307
|
// 调用 callback 返回建议列表的数据
|
311
|
308
|
cb(results)
|
312
|
309
|
},
|
313
|
|
- changeKind(val) {
|
|
310
|
+ changeKind(val){
|
314
|
311
|
this.drugs = []
|
315
|
312
|
|
316
|
|
- if (val == 0) {
|
|
313
|
+ if(val == 0){
|
317
|
314
|
this.drugs = this.allDrugs
|
318
|
|
- } else {
|
319
|
|
- for (let i = 0; i < this.allDrugs.length; i++) {
|
320
|
|
- if (this.allDrugs[i].drug_type == val) {
|
|
315
|
+ }else{
|
|
316
|
+ for (let i = 0; i < this.allDrugs.length; i++){
|
|
317
|
+ if (this.allDrugs[i].drug_type == val){
|
321
|
318
|
this.drugs.push(this.allDrugs[i])
|
322
|
319
|
}
|
323
|
320
|
}
|
|
@@ -328,7 +325,7 @@
|
328
|
325
|
return getDictionaryDataConfig(module, filed_name)
|
329
|
326
|
|
330
|
327
|
},
|
331
|
|
- getInitData() {
|
|
328
|
+ getInitData(){
|
332
|
329
|
getInitData().then(response => {
|
333
|
330
|
if (response.data.state == 0) {
|
334
|
331
|
this.$message.error(response.data.msg)
|
|
@@ -338,41 +335,42 @@
|
338
|
335
|
this.allDrugs = response.data.data.drugs
|
339
|
336
|
this.advices_template = response.data.data.advices_template
|
340
|
337
|
this.doctors = response.data.data.doctors
|
341
|
|
- this.departMent = response.data.data.department
|
342
|
|
-
|
|
338
|
+ this.departMent = response.data.data.department
|
|
339
|
+
|
343
|
340
|
}
|
344
|
341
|
})
|
345
|
342
|
|
346
|
343
|
},
|
347
|
|
- tabclickEvent(val) {
|
348
|
|
- for (let i = 0; i < this.prescriptions.length; i++) {
|
|
344
|
+ tabclickEvent(val){
|
|
345
|
+ for (let i= 0; i<this.prescriptions.length; i++){
|
349
|
346
|
console.log(this.prescriptions[i].name)
|
350
|
|
- if (this.prescriptions[i].name == val.name) {
|
351
|
|
- this.curPrescriptions = this.prescriptions[i]
|
|
347
|
+ if(this.prescriptions[i].name == val.name){
|
|
348
|
+ this.curPrescriptions = this.prescriptions[i]
|
352
|
349
|
|
353
|
|
- //用来区分处方属于项目还是药品
|
354
|
|
- if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
|
355
|
|
- this.customTabIndex = 1
|
356
|
|
- }
|
357
|
|
- if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
|
|
350
|
+ //用来区分处方属于项目还是药品
|
|
351
|
+ if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
|
|
352
|
+ this.customTabIndex = 1
|
|
353
|
+ }
|
|
354
|
+ if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
|
358
|
355
|
|
359
|
|
- this.customTabIndex = 2
|
360
|
|
- }
|
|
356
|
+ this.customTabIndex = 2
|
|
357
|
+ }
|
|
358
|
+
|
|
359
|
+ if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0){
|
|
360
|
+ this.customTabIndex = this.rightTab
|
|
361
|
+ }
|
361
|
362
|
|
362
|
|
- if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
|
363
|
|
- this.customTabIndex = this.rightTab
|
364
|
363
|
}
|
365
|
364
|
|
366
|
|
- }
|
367
|
365
|
|
368
|
366
|
}
|
369
|
367
|
},
|
370
|
|
- setData(data) {
|
|
368
|
+ setData(data){
|
371
|
369
|
this.prescriptions = data
|
372
|
370
|
console.log(this.$refs)
|
373
|
371
|
this.$nextTick(() => {
|
374
|
|
- this.$refs.prescription_tables.setNewData(this.prescriptions[0])
|
375
|
|
- })
|
|
372
|
+ this.$refs.prescription_tables.setNewData(this.prescriptions[0])
|
|
373
|
+ });
|
376
|
374
|
},
|
377
|
375
|
moreState(tab, event) {
|
378
|
376
|
if (tab == 'more') {
|
|
@@ -381,7 +379,7 @@
|
381
|
379
|
},
|
382
|
380
|
open(index) {
|
383
|
381
|
if (index == 1) {
|
384
|
|
- let params = {
|
|
382
|
+ let params ={
|
385
|
383
|
patient_id: this.patientInfo.id,
|
386
|
384
|
diagnose: this.state1,
|
387
|
385
|
sick_history: this.state2,
|
|
@@ -390,30 +388,30 @@
|
390
|
388
|
record_date: this.record_date,
|
391
|
389
|
his_patient_id: this.hisPatientInfo.id
|
392
|
390
|
}
|
393
|
|
-
|
394
|
|
- for (let i = 0; i < this.prescriptions.length; i++) {
|
395
|
|
- if (this.prescriptions[i].advices.length > 0 && this.prescriptions[i].project.length == 0) {
|
|
391
|
+
|
|
392
|
+ for (let i = 0; i < this.prescriptions.length; i++){
|
|
393
|
+ if(this.prescriptions[i].advices.length > 0 && this.prescriptions[i].project.length == 0){
|
396
|
394
|
this.prescriptions[i]['type'] = 1
|
397
|
395
|
}
|
398
|
|
- if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length > 0) {
|
|
396
|
+ if(this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length > 0){
|
399
|
397
|
this.prescriptions[i]['type'] = 2
|
400
|
398
|
}
|
401
|
|
- for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
|
|
399
|
+ for (let b = 0; b < this.prescriptions[i].advices.length; b++){
|
402
|
400
|
this.prescriptions[i].advices[b].single_dose = this.prescriptions[i].advices[b].single_dose.toString()
|
403
|
401
|
this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
|
404
|
402
|
this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
|
405
|
403
|
|
406
|
404
|
}
|
407
|
405
|
}
|
408
|
|
- let data = {
|
409
|
|
- 'prescriptions': this.prescriptions
|
|
406
|
+ let data={
|
|
407
|
+ "prescriptions":this.prescriptions
|
410
|
408
|
}
|
411
|
|
- console.log('data', data)
|
412
|
|
- console.log('params', params)
|
413
|
|
- createHisPrescription(data, params).then(response => {
|
414
|
|
- if (response.data.state == 1) {
|
|
409
|
+ console.log("data",data)
|
|
410
|
+ console.log("params",params)
|
|
411
|
+ createHisPrescription(data,params).then(response=>{
|
|
412
|
+ if(response.data.state == 1){
|
415
|
413
|
this.prescriptions = []
|
416
|
|
- this.$message.success('保存成功')
|
|
414
|
+ this.$message.success("保存成功")
|
417
|
415
|
}
|
418
|
416
|
})
|
419
|
417
|
localStorage.setItem('drugs', JSON.stringify(this.preDrugs))
|
|
@@ -433,11 +431,12 @@
|
433
|
431
|
this.prescriptions.push({
|
434
|
432
|
name: newTabName,
|
435
|
433
|
advices: [],
|
436
|
|
- project: []
|
|
434
|
+ project:[],
|
|
435
|
+ projects:[]
|
437
|
436
|
|
438
|
437
|
})
|
439
|
438
|
this.editableTabsValue = newTabName
|
440
|
|
- this.curPrescriptions = this.prescriptions[this.prescriptions.length - 1]
|
|
439
|
+ this.curPrescriptions = this.prescriptions[this.prescriptions.length-1]
|
441
|
440
|
},
|
442
|
441
|
removeTab(targetName) {
|
443
|
442
|
|
|
@@ -459,40 +458,44 @@
|
459
|
458
|
console.log(this.prescriptions)
|
460
|
459
|
},
|
461
|
460
|
clickTab(index) {
|
462
|
|
- if (index == 1) {
|
|
461
|
+ if(index == 1){
|
463
|
462
|
this.showOne = true
|
464
|
463
|
this.showTwo = false
|
465
|
464
|
this.$nextTick(() => {
|
466
|
|
- this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length - 1])
|
467
|
|
- })
|
468
|
|
- this.customTabIndex = 1
|
|
465
|
+ this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
|
|
466
|
+ });
|
|
467
|
+ this.customTabIndex = 1
|
469
|
468
|
}
|
470
|
|
- if (index == 2) {
|
|
469
|
+ if(index == 2){
|
471
|
470
|
this.showTwo = true
|
472
|
471
|
this.showOne = false
|
473
|
|
- this.$nextTick(() => {
|
474
|
|
- this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length - 1])
|
475
|
|
- })
|
476
|
|
- this.customTabIndex = 2
|
|
472
|
+ this.$nextTick(() => {
|
|
473
|
+ this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length-1])
|
|
474
|
+ });
|
|
475
|
+ this.customTabIndex = 2
|
477
|
476
|
}
|
478
|
477
|
this.rightTab = index
|
479
|
478
|
|
|
479
|
+
|
480
|
480
|
//用来区分处方属于项目还是药品
|
481
|
|
- if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
|
|
481
|
+ if(this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0){
|
482
|
482
|
|
483
|
483
|
this.customTabIndex = 1
|
484
|
484
|
}
|
485
|
|
- if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0) {
|
|
485
|
+ if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length > 0){
|
486
|
486
|
|
487
|
487
|
this.customTabIndex = 2
|
488
|
488
|
}
|
489
|
|
- if (this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0) {
|
|
489
|
+ if(this.curPrescriptions.advices.length == 0 && this.curPrescriptions.project.length == 0){
|
490
|
490
|
// this.customTabIndex = this.rightTab
|
491
|
491
|
this.customTabIndex = index
|
492
|
492
|
}
|
493
|
|
- }, changeAllGoodInfoTableData: function(selection) {
|
494
|
|
- this.curDrugs = selection
|
495
|
|
- }, addCharges() {
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+ },
|
|
498
|
+ addCharges() {
|
496
|
499
|
this.$refs.additionalCharges.show()
|
497
|
500
|
},
|
498
|
501
|
selectDrugs(selection, row) {
|
|
@@ -500,50 +503,37 @@
|
500
|
503
|
},
|
501
|
504
|
comfirm() {
|
502
|
505
|
this.preDrugs = this.curDrugs
|
503
|
|
- console.log(this.prescriptions)
|
504
|
|
- for (let i = 0; i < this.prescriptions.length; i++) {
|
505
|
|
- if (this.prescriptions[i].name == this.editableTabsValue) {
|
506
|
|
- var temp = this.deepClone(this.preDrugs)
|
507
|
|
- var temp2 = this.deepClone(this.teamList)
|
508
|
|
- console.log(this.prescriptions[i].advices)
|
509
|
|
- console.log(this.prescriptions[i].project)
|
510
|
|
-
|
511
|
|
- console.log(temp)
|
512
|
|
- console.log(temp2)
|
513
|
|
-
|
514
|
|
- if (temp.length > 0) {
|
515
|
|
- for (let b = 0; b < temp.length; b++) {
|
516
|
|
- this.prescriptions[i].advices.push(temp[b])
|
517
|
|
- }
|
518
|
|
- }
|
519
|
|
- if (temp2.length > 0) {
|
520
|
|
- for (let b = 0; b < temp2.length; b++) {
|
521
|
|
- this.prescriptions[i].project.concat(temp2[b])
|
522
|
|
- }
|
523
|
|
- }
|
|
506
|
+
|
|
507
|
+ for (let i = 0; i < this.prescriptions.length; i++){
|
|
508
|
+ console.log("名称",this.prescriptions[i].name)
|
|
509
|
+ console.log("名称2",this.editableTabsValue)
|
|
510
|
+ if(this.prescriptions[i].name == this.editableTabsValue){
|
|
511
|
+ var temp = this.deepClone(this.preDrugs)
|
|
512
|
+ var temp2 = this.deepClone(this.teamList)
|
|
513
|
+
|
|
514
|
+ this.prescriptions[i].advices = temp
|
|
515
|
+ this.prescriptions[i].project = temp2
|
524
|
516
|
this.curPrescriptions = this.prescriptions[i]
|
525
|
|
- this.$refs.multipleTable.clearSelection()
|
526
|
517
|
// this.$refs.prescription_tables.setNewData(this.prescriptions[i])
|
527
|
518
|
}
|
528
|
519
|
}
|
529
|
|
- }, changeAllGoodInfoTableDataTwo(row) {
|
530
|
|
- this.teamList = row
|
|
520
|
+ console.log("222222",this.prescriptions)
|
531
|
521
|
},
|
532
|
|
- selectChange(row) {
|
|
522
|
+ selectChange(row){
|
533
|
523
|
this.teamList = row
|
534
|
524
|
},
|
535
|
|
- getlist() {
|
536
|
|
- getHisProject().then(response => {
|
537
|
|
- if (response.data.state == 1) {
|
|
525
|
+ getlist(){
|
|
526
|
+ getHisProject().then(response=>{
|
|
527
|
+ if(response.data.state == 1){
|
538
|
528
|
var project = response.data.data.project
|
539
|
|
- console.log('project', project)
|
|
529
|
+ console.log("project",project)
|
540
|
530
|
this.tabProject = project
|
541
|
531
|
}
|
542
|
532
|
})
|
543
|
533
|
},
|
544
|
|
- querySearch() {
|
|
534
|
+ querySearch(){
|
545
|
535
|
|
546
|
|
- }, deepClone(source) {
|
|
536
|
+ },deepClone(source) {
|
547
|
537
|
if (!source && typeof source !== 'object') {
|
548
|
538
|
throw new Error('error arguments', 'shallowClone')
|
549
|
539
|
}
|
|
@@ -557,52 +547,56 @@
|
557
|
547
|
})
|
558
|
548
|
return targetObj
|
559
|
549
|
},
|
560
|
|
- getAllProjectTeam() {
|
561
|
|
- getAllProjectTeam().then(response => {
|
562
|
|
- if (response.data.state == 1) {
|
563
|
|
- var team = response.data.data.team
|
564
|
|
- console.log('team', team)
|
|
550
|
+ getAllProjectTeam(){
|
|
551
|
+ getAllProjectTeam().then(response=>{
|
|
552
|
+ if(response.data.state == 1){
|
|
553
|
+ var team = response.data.data.team
|
|
554
|
+ console.log("team",team)
|
565
|
555
|
this.tabPrjectTeam = team
|
566
|
556
|
}
|
567
|
557
|
})
|
568
|
558
|
},
|
569
|
|
- selectTeam(row) {
|
570
|
|
- var arr = []
|
571
|
|
- for (let i = 0; i < row.length; i++) {
|
572
|
|
- arr.push(row[i].project_id)
|
573
|
|
- }
|
574
|
|
- var ids = arr.join(',')
|
575
|
|
- var strArr = ids.split(',')
|
576
|
|
- var res = []//接收不重复的数据
|
577
|
|
-
|
578
|
|
- for (var i = 0; i < strArr.length; i++) {
|
579
|
|
- var flag = true
|
580
|
|
-
|
581
|
|
- for (var j = 0; j < i; j++) {
|
582
|
|
- if (strArr[i] === strArr[j]) {
|
583
|
|
- flag = false
|
584
|
|
- break
|
585
|
|
- }
|
586
|
|
- }
|
587
|
|
- if (flag) {
|
588
|
|
- res.push(strArr[i])
|
|
559
|
+ selectTeam(row){
|
|
560
|
+ var arr = []
|
|
561
|
+ for(let i=0;i<row.length;i++){
|
|
562
|
+ arr.push(row[i].project_id)
|
589
|
563
|
}
|
|
564
|
+ var ids = arr.join(",")
|
|
565
|
+ console.log("ids",ids)
|
|
566
|
+ var strArr = ids.split(",")
|
|
567
|
+ var res = [];//接收不重复的数据
|
|
568
|
+
|
|
569
|
+ for (var i = 0; i<strArr.length; i++){
|
|
570
|
+ var flag = true;
|
|
571
|
+
|
|
572
|
+ for (var j = 0; j<i; j++){
|
|
573
|
+ if(strArr[i]===strArr[j]){
|
|
574
|
+ flag = false;
|
|
575
|
+ break;
|
|
576
|
+ }
|
|
577
|
+ }
|
|
578
|
+ if(flag){
|
|
579
|
+ res.push(strArr[i])
|
|
580
|
+ }
|
590
|
581
|
}
|
591
|
|
- var idstr = res.join(',')
|
|
582
|
+ console.log("res",res)
|
|
583
|
+
|
|
584
|
+ var idstr = res.join(",")
|
|
585
|
+ console.log("idstr",idstr)
|
592
|
586
|
const params = {
|
593
|
|
- project_id: idstr
|
|
587
|
+ project_id:idstr
|
594
|
588
|
}
|
595
|
|
- getPojectListById(params).then(response => {
|
596
|
|
- if (response.data.state == 1) {
|
597
|
|
- var project = response.data.data.project
|
598
|
|
- console.log('project222', project)
|
599
|
|
- this.teamList = []
|
600
|
|
- this.teamList = project
|
601
|
|
- }
|
|
589
|
+ getPojectListById(params).then(response=>{
|
|
590
|
+ if(response.data.state == 1){
|
|
591
|
+ var project = response.data.data.project
|
|
592
|
+ console.log("project222",project)
|
|
593
|
+ this.teamList = []
|
|
594
|
+ this.teamList = project
|
|
595
|
+ }
|
602
|
596
|
})
|
603
|
597
|
}
|
604
|
598
|
},
|
605
|
|
- created() {
|
|
599
|
+ created(){
|
606
|
600
|
this.getInitData()
|
607
|
601
|
//获取所有项目
|
608
|
602
|
this.getlist()
|