Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 4 years ago
parent
commit
380ed45ae0

+ 6 - 4
src/api/advice.js View File

43
   });
43
   });
44
 }
44
 }
45
 
45
 
46
-export function ExecDoctorAdvice(patient, id, time, mode) {
46
+export function ExecDoctorAdvice(patient, id, time, mode,origin) {
47
 
47
 
48
   var params = {
48
   var params = {
49
     id: id,
49
     id: id,
50
     patient: patient,
50
     patient: patient,
51
     execution_time: time,
51
     execution_time: time,
52
-    mode: mode
52
+    mode: mode,
53
+    origin:origin,
53
   };
54
   };
54
   console.log("paras------",params)
55
   console.log("paras------",params)
55
   return request({
56
   return request({
61
     }
62
     }
62
   });
63
   });
63
 }
64
 }
64
-export function CheckDoctorAdvice(patient, id, mode) {
65
+export function  CheckDoctorAdvice(patient, id, mode,origin) {
65
   var params = {
66
   var params = {
66
     id: id,
67
     id: id,
67
     patient: patient,
68
     patient: patient,
68
-    mode: mode
69
+    mode: mode,
70
+    origin:origin,
69
     // execution_time: time,
71
     // execution_time: time,
70
   };
72
   };
71
   return request({
73
   return request({

+ 9 - 0
src/api/his/his.js View File

258
 
258
 
259
 
259
 
260
 
260
 
261
+export function getNextOrLastHisPrescription (params) {
262
+  return request({
263
+    url: '/api/hisprescription/get',
264
+    method: 'get',
265
+    params:params,
266
+  })
267
+}
268
+
269
+
261
 
270
 
262
 
271
 
263
 
272
 

+ 8 - 2
src/xt_pages/dialysis/details/NavIgation.vue View File

129
       :patient="patient"
129
       :patient="patient"
130
       :admin_users="admin_users"
130
       :admin_users="admin_users"
131
       :dialysis_order="dialysis_order"
131
       :dialysis_order="dialysis_order"
132
+      :his_is_open="his_is_open"
132
     ></doctor-advice-dialog>
133
     ></doctor-advice-dialog>
133
 
134
 
134
     <computer-dialog
135
     <computer-dialog
225
       default: () => {
226
       default: () => {
226
         return 0;
227
         return 0;
227
       }
228
       }
229
+    },his_is_open:{
230
+      type: Number,
231
+      default: () => {
232
+        return 0;
233
+      }
228
     },
234
     },
229
     patient: {
235
     patient: {
230
       // 患者信息
236
       // 患者信息
575
       this.$refs.assessment_after_dislysis.show(this.assessment_after_dislysis,this.last_assessment_after_dislysis);
581
       this.$refs.assessment_after_dislysis.show(this.assessment_after_dislysis,this.last_assessment_after_dislysis);
576
     },
582
     },
577
     showDoctorAdviceDialog: function() {
583
     showDoctorAdviceDialog: function() {
578
-      this.$refs.doctor_advice.show();
584
+      this.$refs.doctor_advice.show(this.his_is_open);
579
     },
585
     },
580
     showComputerDialog: function() {
586
     showComputerDialog: function() {
581
       this.$refs.computer_dialog.show(this.dialysis_order);
587
       this.$refs.computer_dialog.show(this.dialysis_order);
584
       this.$refs.finish_dialog.show(this.dialysis_order);
590
       this.$refs.finish_dialog.show(this.dialysis_order);
585
     },
591
     },
586
     showPrescription: function() {
592
     showPrescription: function() {
587
-      this.$refs.prescription.show(this.prescription,this.schedual,this.last_dialysis_prescribe);
593
+      this.$refs.prescription.show(this.prescription,this.schedual,this.last_dialysis_prescribe,this.his_is_open);
588
     },
594
     },
589
     showAccepts: function() {
595
     showAccepts: function() {
590
       this.$refs.accepts.show(this.receiver_treatment_access);
596
       this.$refs.accepts.show(this.receiver_treatment_access);

+ 140 - 35
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue View File

11
       <div class="txsj">
11
       <div class="txsj">
12
         <el-button
12
         <el-button
13
           round
13
           round
14
+
14
           @click="openLast(3)"
15
           @click="openLast(3)"
15
         >上一方
16
         >上一方
16
         </el-button>
17
         </el-button>
161
       <div class="txsj">
162
       <div class="txsj">
162
         <el-button
163
         <el-button
163
           round
164
           round
165
+          v-if="his_is_open != 1"
164
           @click="openLast(1)"
166
           @click="openLast(1)"
165
         >上一方
167
         >上一方
166
         </el-button>
168
         </el-button>
167
 
169
 
168
         <el-button
170
         <el-button
169
           round
171
           round
172
+          v-if="his_is_open != 1"
170
           @click="openNext(2)"
173
           @click="openNext(2)"
171
         >下一方
174
         >下一方
172
         </el-button>
175
         </el-button>
177
           round
180
           round
178
           @click="openGroupFrom"
181
           @click="openGroupFrom"
179
           :loading="deleLoading"
182
           :loading="deleLoading"
183
+          v-if="his_is_open != 1"
180
           :disabled="!is_has_create"
184
           :disabled="!is_has_create"
181
         >新增医嘱
185
         >新增医嘱
182
         </el-button>
186
         </el-button>
187
           :disabled="!is_has_exce"
191
           :disabled="!is_has_exce"
188
           @click="execAdvice"
192
           @click="execAdvice"
189
           :loading="deleLoading"
193
           :loading="deleLoading"
194
+
190
         >执行医嘱
195
         >执行医嘱
191
         </el-button>
196
         </el-button>
192
         <el-button v-else disabled round @click="execAdvice" :loading="deleLoading">执行医嘱</el-button>
197
         <el-button v-else disabled round @click="execAdvice" :loading="deleLoading">执行医嘱</el-button>
202
         <el-button v-else disabled round @click="checkAdvice" :loading="deleLoading">医嘱核对</el-button>
207
         <el-button v-else disabled round @click="checkAdvice" :loading="deleLoading">医嘱核对</el-button>
203
 
208
 
204
         <el-button
209
         <el-button
205
-          v-if="groupSelectRow != null"
210
+
211
+          v-if="groupSelectRow != null || his_is_open != 1"
206
           :disabled="!is_has_modify && !is_has_modify_other"
212
           :disabled="!is_has_modify && !is_has_modify_other"
207
           round
213
           round
208
           @click="openEditGroupAdvice"
214
           @click="openEditGroupAdvice"
212
         <el-button v-else disabled round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱</el-button>
218
         <el-button v-else disabled round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱</el-button>
213
 
219
 
214
         <el-button
220
         <el-button
215
-          v-if="groupSelectRow != null"
221
+          v-if="groupSelectRow != null ||  his_is_open != 1"
216
           :disabled="!is_has_del && !is_has_del_other"
222
           :disabled="!is_has_del && !is_has_del_other"
217
           round
223
           round
218
           @click="openDeleteGroupAdvice"
224
           @click="openDeleteGroupAdvice"
227
       <!--   @row-click="cellMouseEnter" -->
233
       <!--   @row-click="cellMouseEnter" -->
228
       <!--&lt;!&ndash;:header-cell-style="{ backgroundColor: 'rgb(64, 158, 255)', color: 'white'}"&ndash;&gt;@current-change="selectRow"-->
234
       <!--&lt;!&ndash;:header-cell-style="{ backgroundColor: 'rgb(64, 158, 255)', color: 'white'}"&ndash;&gt;@current-change="selectRow"-->
229
       <el-table
235
       <el-table
236
+        v-if="his_is_open == 0"
230
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
237
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
231
         :data="doctor_advices"
238
         :data="doctor_advices"
232
         border
239
         border
260
                 <i class="el-icon-arrow-down el-icon--right"></i>
267
                 <i class="el-icon-arrow-down el-icon--right"></i>
261
               </span>
268
               </span>
262
               <el-dropdown-menu slot="dropdown">
269
               <el-dropdown-menu slot="dropdown">
263
-                <el-dropdown-item @click.native="openEdit(scope.$index, scope.row)">修改医嘱</el-dropdown-item>
264
-                <el-dropdown-item @click.native="openDelete(scope.$index, scope.row)">删除医嘱</el-dropdown-item>
265
-                <el-dropdown-item @click.native="openNewChildTwo(scope.$index, scope.row)">新增子药</el-dropdown-item>
270
+                <el-dropdown-item v-if=" his_is_open != 1" @click.native="openEdit(scope.$index, scope.row)">修改医嘱</el-dropdown-item>
271
+                <el-dropdown-item v-if=" his_is_open != 1" @click.native="openDelete(scope.$index, scope.row)">删除医嘱</el-dropdown-item>
272
+                <el-dropdown-item v-if=" his_is_open != 1" @click.native="openNewChildTwo(scope.$index, scope.row)">新增子药</el-dropdown-item>
266
               </el-dropdown-menu>
273
               </el-dropdown-menu>
267
             </el-dropdown>
274
             </el-dropdown>
268
 
275
 
272
                 <i class="el-icon-arrow-down el-icon--right"></i>
279
                 <i class="el-icon-arrow-down el-icon--right"></i>
273
               </span>
280
               </span>
274
               <el-dropdown-menu slot="dropdown">
281
               <el-dropdown-menu slot="dropdown">
275
-                <el-dropdown-item @click.native="openEdit(scope.$index, scope.row)">修改子药</el-dropdown-item>
276
-                <el-dropdown-item @click.native="openDelete(scope.$index, scope.row)">删除子药</el-dropdown-item>
282
+                <el-dropdown-item v-if=" his_is_open != 1" @click.native="openEdit(scope.$index, scope.row)">修改子药</el-dropdown-item>
283
+                <el-dropdown-item v-if=" his_is_open != 1" @click.native="openDelete(scope.$index, scope.row)">删除子药</el-dropdown-item>
277
               </el-dropdown-menu>
284
               </el-dropdown-menu>
278
             </el-dropdown>
285
             </el-dropdown>
279
           </template>
286
           </template>
316
           </template>
323
           </template>
317
         </el-table-column>
324
         </el-table-column>
318
       </el-table>
325
       </el-table>
326
+      <el-table
327
+        v-else
328
+        :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
329
+        :data="doctor_advices"
330
+        border
331
+        style="width: 100%"
332
+        v-show="showAdvicePanel"
333
+        ref="advices_list"
334
+        @row-click="cellMouseEnter"
335
+        :row-class-name="tableRowClassName"
336
+        :cell-class-name="adviceNameShow"
337
+        :modal-append-to-body="false"
338
+        highlight-current-row
339
+      >
340
+        <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
341
+          <template slot-scope="scope">
342
+            <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
343
+          </template>
344
+        </el-table-column>
345
+        <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
346
+          <template slot-scope="scope">
347
+            <span>
348
+              {{scope.row.start_time | parseTime('{y}-{m}-{d} {h}:{i}')}}
349
+            </span>
350
+          </template>
351
+        </el-table-column>
352
+        <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
353
+          <template slot-scope="scope">
354
+            <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
355
+              <span class="el-dropdown-link">
356
+                {{ getAdviceContent(scope.row, 1)}}
357
+                <i class="el-icon-arrow-down el-icon--right"></i>
358
+              </span>
359
+              <el-dropdown-menu slot="dropdown">
360
+                <el-dropdown-item v-if=" his_is_open != 1" @click.native="openEdit(scope.$index, scope.row)">修改医嘱</el-dropdown-item>
361
+                <el-dropdown-item v-if=" his_is_open != 1" @click.native="openDelete(scope.$index, scope.row)">删除医嘱</el-dropdown-item>
362
+                <el-dropdown-item v-if=" his_is_open != 1" @click.native="openNewChildTwo(scope.$index, scope.row)">新增子药</el-dropdown-item>
363
+              </el-dropdown-menu>
364
+            </el-dropdown>
365
+
366
+            <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
367
+              <span class="el-dropdown-link">
368
+                &emsp;{{ getAdviceContent(scope.row, 2)}}
369
+                <i class="el-icon-arrow-down el-icon--right"></i>
370
+              </span>
371
+              <el-dropdown-menu slot="dropdown">
372
+                <el-dropdown-item v-if=" his_is_open != 1" @click.native="openEdit(scope.$index, scope.row)">修改子药</el-dropdown-item>
373
+                <el-dropdown-item v-if=" his_is_open != 1" @click.native="openDelete(scope.$index, scope.row)">删除子药</el-dropdown-item>
374
+              </el-dropdown-menu>
375
+            </el-dropdown>
376
+          </template>
377
+        </el-table-column>
378
+
379
+        <el-table-column
380
+          prop="execution_time"
381
+          align="center"
382
+          min-width="30px"
383
+          label="执行时间"
384
+          sortable
385
+        >
386
+          <template slot-scope="scope">
387
+            <span v-if="scope.row.execution_time != 0">
388
+              {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
389
+            </span>
390
+            <span v-else></span>
391
+          </template>
392
+        </el-table-column>
393
+        <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
394
+          <template slot-scope="scope">
395
+            <span v-if="scope.row.parent_id == 0">
396
+              {{getXuserName(scope.row.execution_staff)}}
397
+            </span>
398
+            <span v-else></span>
399
+          </template>
400
+        </el-table-column>
401
+        <el-table-column
402
+          v-if="template_id != 6"
403
+          prop="checker"
404
+          min-width="30px"
405
+          align="center"
406
+          label="核对人员"
407
+        >
408
+          <template slot-scope="scope">
409
+            <span v-if="scope.row.parent_id == 0">
410
+              {{getXuserName(scope.row.checker)}}
411
+            </span>
412
+            <span v-else></span>
413
+          </template>
414
+        </el-table-column>
415
+      </el-table>
416
+
319
       <!-- 医嘱列表 end -->
417
       <!-- 医嘱列表 end -->
320
 
418
 
321
       <!-- 新医嘱列表 -->
419
       <!-- 新医嘱列表 -->
432
           </el-col>
530
           </el-col>
433
 
531
 
434
           <el-col :span="8">
532
           <el-col :span="8">
435
-            <el-form-item label="药品规格:">        
533
+            <el-form-item label="药品规格:">
436
                 <el-autocomplete
534
                 <el-autocomplete
437
                   style="width:100px;"
535
                   style="width:100px;"
438
                   class="inline-input"
536
                   class="inline-input"
441
                   placeholder="请输入内容"
539
                   placeholder="请输入内容"
442
                   @input="changeDrugDesc"
540
                   @input="changeDrugDesc"
443
                 ></el-autocomplete>
541
                 ></el-autocomplete>
444
-                 
542
+
445
                 <el-select
543
                 <el-select
446
                   v-model="form.drug_spec_unit"
544
                   v-model="form.drug_spec_unit"
447
                   style="width: 100px;"
545
                   style="width: 100px;"
681
         current_group_index: -1,
779
         current_group_index: -1,
682
         title: '临时医嘱',
780
         title: '临时医嘱',
683
         add_title: '新增医嘱',
781
         add_title: '新增医嘱',
684
-
782
+        his_is_open:0,
685
         showAdviceForm: false,
783
         showAdviceForm: false,
686
         showAdvicePanel: true,
784
         showAdvicePanel: true,
687
         showNameForm: false,
785
         showNameForm: false,
772
         this.form['dialysis_order_id'] = this.dialysis_order.id
870
         this.form['dialysis_order_id'] = this.dialysis_order.id
773
       },
871
       },
774
       doctor_advices: function() {
872
       doctor_advices: function() {
775
-        this.handleSpanTempArr()
776
-        this.hoverOrderArr = []
777
-        this.handleStyle()
873
+        // this.handleSpanTempArr()
874
+        // this.hoverOrderArr = []
875
+        // this.handleStyle()
778
       }
876
       }
779
     },
877
     },
780
     methods: {
878
     methods: {
849
               remark: ''
947
               remark: ''
850
             }
948
             }
851
             console.log("2223333",submitForm)
949
             console.log("2223333",submitForm)
852
-           
950
+
853
             let mode = '1'
951
             let mode = '1'
854
             CreateGroupAdvice(this.patientid, 0, submitForm, mode).then(
952
             CreateGroupAdvice(this.patientid, 0, submitForm, mode).then(
855
               response => {
953
               response => {
1178
       }
1276
       }
1179
       ,
1277
       ,
1180
       submitExce() {
1278
       submitExce() {
1181
-        
1279
+        console.log(this.currentRow.origin)
1182
         if (this.currentRow == null) {
1280
         if (this.currentRow == null) {
1183
           this.$message.error('请先选择要执行的医嘱!')
1281
           this.$message.error('请先选择要执行的医嘱!')
1184
           return false
1282
           return false
1195
         }
1293
         }
1196
         this.exceLoading = true
1294
         this.exceLoading = true
1197
         let mode = '6'
1295
         let mode = '6'
1198
-        
1199
-         console.log("222222",this.currentRow.id)
1200
-        
1201
-        ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime, mode).then(response => {
1296
+
1297
+
1298
+        ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime, mode,this.currentRow.origin).then(response => {
1202
             if (response.data.state == 0) {
1299
             if (response.data.state == 0) {
1203
               this.$message.error(response.data.msg)
1300
               this.$message.error(response.data.msg)
1204
               this.exceLoading = false
1301
               this.exceLoading = false
1262
           return false
1359
           return false
1263
         }
1360
         }
1264
         let mode = '1'
1361
         let mode = '1'
1265
-        
1362
+
1266
        if(this.src_type == ""){
1363
        if(this.src_type == ""){
1267
           this.form.way = 0
1364
           this.form.way = 0
1268
           this.form.drug_id = 0
1365
           this.form.drug_id = 0
1275
        }
1372
        }
1276
 
1373
 
1277
         console.log("新增医嘱子药",this.form)
1374
         console.log("新增医嘱子药",this.form)
1278
-       
1375
+
1279
         CreateDoctorAdvice(this.patient.id, this.form, mode)
1376
         CreateDoctorAdvice(this.patient.id, this.form, mode)
1280
           .then(response => {
1377
           .then(response => {
1281
             this.loading = false
1378
             this.loading = false
1501
       }
1598
       }
1502
       ,
1599
       ,
1503
       checkAdvice() {
1600
       checkAdvice() {
1601
+        console.log(this.currentRow)
1504
         // console.log(this.$store.getters.xt_user)
1602
         // console.log(this.$store.getters.xt_user)
1505
         if (this.currentRow == null) {
1603
         if (this.currentRow == null) {
1506
           this.$message.error('请先选择要核对的医嘱!')
1604
           this.$message.error('请先选择要核对的医嘱!')
1530
             this.deleLoading = true
1628
             this.deleLoading = true
1531
             let mode = '7'
1629
             let mode = '7'
1532
 
1630
 
1533
-            CheckDoctorAdvice(this.patient.id, this.currentRow.id, mode).then(
1631
+            CheckDoctorAdvice(this.patient.id, this.currentRow.id, mode,this.currentRow.origin).then(
1534
               response => {
1632
               response => {
1535
                 if (response.data.state == 0) {
1633
                 if (response.data.state == 0) {
1536
                   this.$message.error(response.data.msg)
1634
                   this.$message.error(response.data.msg)
1583
       }
1681
       }
1584
       ,
1682
       ,
1585
       execAdvice() {
1683
       execAdvice() {
1586
-        
1684
+
1587
         if (this.is_has_exce == false) {
1685
         if (this.is_has_exce == false) {
1588
           this.$message.error('你没有执行医嘱的权限')
1686
           this.$message.error('你没有执行医嘱的权限')
1589
           return false
1687
           return false
1724
           })
1822
           })
1725
           .catch(() => {
1823
           .catch(() => {
1726
           })
1824
           })
1727
-        this.handleSpanTempArr()
1825
+        // this.handleSpanTempArr()
1728
       }
1826
       }
1729
       ,
1827
       ,
1730
       openDelete(index, row) {
1828
       openDelete(index, row) {
1902
           }
2000
           }
1903
         })
2001
         })
1904
 
2002
 
1905
-        this.handleSpanTempArr()
1906
-        this.handleStyle()
2003
+        // this.handleSpanTempArr()
2004
+        // this.handleStyle()
1907
       }
2005
       }
1908
       ,
2006
       ,
1909
       getXuserName(id) {
2007
       getXuserName(id) {
1934
         this.$refs.addGroupForm.open()
2032
         this.$refs.addGroupForm.open()
1935
       }
2033
       }
1936
       ,
2034
       ,
1937
-      show() {
2035
+      show(his_is_open) {
2036
+        this.his_is_open = his_is_open
2037
+        console.log(this.his_is_open)
1938
         this.isVisibility = true
2038
         this.isVisibility = true
1939
         this.getPermission()
2039
         this.getPermission()
1940
       }
2040
       }
2025
           } else {
2125
           } else {
2026
             // 判断当前元素与上一个元素是否相同
2126
             // 判断当前元素与上一个元素是否相同
2027
             if (
2127
             if (
2028
-              this.doctor_advices[i].groupno ===
2029
-              this.doctor_advices[i - 1].groupno
2128
+              this.doctor_advices[i].created_time ===
2129
+              this.doctor_advices[i - 1].created_time
2030
             ) {
2130
             ) {
2031
               this.tempArr[this.pos] += 1
2131
               this.tempArr[this.pos] += 1
2032
               this.tempArr.push(0)
2132
               this.tempArr.push(0)
2036
             }
2136
             }
2037
           }
2137
           }
2038
         }
2138
         }
2039
-      }
2040
-      ,
2139
+      },
2041
       cellMouseEnter: function(row, column, event) {
2140
       cellMouseEnter: function(row, column, event) {
2042
         console.log("数据是",row)
2141
         console.log("数据是",row)
2043
         this.currentRow = row
2142
         this.currentRow = row
2062
           if (index === 0) {
2161
           if (index === 0) {
2063
             sameRowArr.push([index])
2162
             sameRowArr.push([index])
2064
           } else {
2163
           } else {
2065
-            if (item.groupno === this.doctor_advices[index - 1].groupno) {
2164
+            if (item.created_time === this.doctor_advices[index - 1].created_time) {
2066
               sameRowArr[sIdx].push(index)
2165
               sameRowArr[sIdx].push(index)
2067
             } else {
2166
             } else {
2068
               sIdx = sIdx + 1
2167
               sIdx = sIdx + 1
2175
         // });
2274
         // });
2176
       },
2275
       },
2177
       objectSpanMethod({ row, column, rowIndex, columnIndex }) {
2276
       objectSpanMethod({ row, column, rowIndex, columnIndex }) {
2178
-     
2277
+
2179
         if (columnIndex === 0) {
2278
         if (columnIndex === 0) {
2180
           if (rowIndex % 2 === 0) {
2279
           if (rowIndex % 2 === 0) {
2181
             return {
2280
             return {
2211
 
2310
 
2212
             var doctor_advices = response.data.data.advices
2311
             var doctor_advices = response.data.data.advices
2213
             console.log("doctor_advices",doctor_advices)
2312
             console.log("doctor_advices",doctor_advices)
2214
-           
2313
+
2215
             this.other_doctor_advices = doctor_advices
2314
             this.other_doctor_advices = doctor_advices
2216
             this.request_record_date = uParseTime(this.other_doctor_advices[0].record_date, '{y}-{m}-{d}')
2315
             this.request_record_date = uParseTime(this.other_doctor_advices[0].record_date, '{y}-{m}-{d}')
2217
             this.sch = response.data.data.schedule
2316
             this.sch = response.data.data.schedule
2405
             }else{
2504
             }else{
2406
               this.form.drug_name_id = 0
2505
               this.form.drug_name_id = 0
2407
             }
2506
             }
2408
-           
2507
+
2409
           }
2508
           }
2410
         }
2509
         }
2411
       },
2510
       },
2460
       this.getDialysisScheduleDetail()
2559
       this.getDialysisScheduleDetail()
2461
        //获取自备药
2560
        //获取自备药
2462
       this.getSelfMedicalList()
2561
       this.getSelfMedicalList()
2562
+    },mounted(){
2563
+      console.log("~~~~~")
2564
+      console.log(this.his_is_open)
2565
+      console.log("~~~~~")
2566
+
2567
+
2463
     },
2568
     },
2464
     components: {
2569
     components: {
2465
       AddGroupAdvice,
2570
       AddGroupAdvice,

+ 13 - 10
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

517
 
517
 
518
               <el-input v-model="dialysisPrescription.blood" @focus="showInnerDialog('6')"></el-input>
518
               <el-input v-model="dialysisPrescription.blood" @focus="showInnerDialog('6')"></el-input>
519
 
519
 
520
-              
520
+
521
             </el-form-item>
521
             </el-form-item>
522
           </el-col>
522
           </el-col>
523
 
523
 
791
             <!--</el-form-item>-->
791
             <!--</el-form-item>-->
792
           <!--</el-col>-->
792
           <!--</el-col>-->
793
 
793
 
794
-           
794
+
795
 
795
 
796
 
796
 
797
 
797
 
1358
             //     this.InnerDialogProps.selected = arrtwo
1358
             //     this.InnerDialogProps.selected = arrtwo
1359
             //     this.InnerDialogProps.isShowTextArea = false
1359
             //     this.InnerDialogProps.isShowTextArea = false
1360
             //     break
1360
             //     break
1361
-            // }  
1361
+            // }
1362
         }
1362
         }
1363
-      }, 
1363
+      },
1364
       innerDialogComfirm: function(val) {
1364
       innerDialogComfirm: function(val) {
1365
         this.InnerDialogProps.visibility = false
1365
         this.InnerDialogProps.visibility = false
1366
         switch (val.type) {
1366
         switch (val.type) {
1819
       getTime(val) {
1819
       getTime(val) {
1820
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1820
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1821
       },
1821
       },
1822
-      show(pre,schedual,last) {
1822
+      show(pre,schedual,last,his_is_open) {
1823
+        if(his_is_open == 1){
1824
+          this.is_open = 0
1825
+        }
1823
         var date = new Date()
1826
         var date = new Date()
1824
         var year = date.getFullYear()
1827
         var year = date.getFullYear()
1825
         var month = date.getMonth() + 1
1828
         var month = date.getMonth() + 1
1892
 
1895
 
1893
         if (this.predialysis == null || this.predialysis.id == 0) {
1896
         if (this.predialysis == null || this.predialysis.id == 0) {
1894
           if(last != null) {
1897
           if(last != null) {
1895
-          
1898
+
1896
             this.dialysisPrescription.niprocart = last.niprocart
1899
             this.dialysisPrescription.niprocart = last.niprocart
1897
             this.dialysisPrescription.jms = last.jms
1900
             this.dialysisPrescription.jms = last.jms
1898
             this.dialysisPrescription.fistula_needle_set = last.fistula_needle_set
1901
             this.dialysisPrescription.fistula_needle_set = last.fistula_needle_set
2000
             ParamsQuery['patient'] = this.patient.id
2003
             ParamsQuery['patient'] = this.patient.id
2001
             ParamsQuery['record_date'] = this.record_date
2004
             ParamsQuery['record_date'] = this.record_date
2002
             ParamsQuery['mode'] = '1'
2005
             ParamsQuery['mode'] = '1'
2003
-    
2006
+
2004
             console.log("第一")
2007
             console.log("第一")
2005
             postPrescription(ParamsQuery).then(response => {
2008
             postPrescription(ParamsQuery).then(response => {
2006
               if (response.data.state == 0) {
2009
               if (response.data.state == 0) {
2092
               ParamsQuery['record_date'] = this.record_date
2095
               ParamsQuery['record_date'] = this.record_date
2093
               ParamsQuery['mode'] = '1'
2096
               ParamsQuery['mode'] = '1'
2094
               console.log("第三")
2097
               console.log("第三")
2095
-              
2098
+
2096
               postPrescription(ParamsQuery).then(response => {
2099
               postPrescription(ParamsQuery).then(response => {
2097
                 if (response.data.state == 0) {
2100
                 if (response.data.state == 0) {
2098
                   this.$message.error(response.data.msg)
2101
                   this.$message.error(response.data.msg)
2175
                     type: 'success',
2178
                     type: 'success',
2176
                     duration: 2000
2179
                     duration: 2000
2177
                   })
2180
                   })
2178
- 
2181
+
2179
                   const prescription_resp = response.data.data.prescription
2182
                   const prescription_resp = response.data.data.prescription
2180
                   // console.log("aaaaaaa", prescription_resp);
2183
                   // console.log("aaaaaaa", prescription_resp);
2181
                   var prescription = this.prescription
2184
                   var prescription = this.prescription
2817
                       duration: 2000
2820
                       duration: 2000
2818
                     })
2821
                     })
2819
                     const params = {
2822
                     const params = {
2820
-                   
2823
+
2821
                       advices: this.waitUploadAdvices,
2824
                       advices: this.waitUploadAdvices,
2822
                       advice_date: uParseTime(
2825
                       advice_date: uParseTime(
2823
                         this.$route.query.date,
2826
                         this.$route.query.date,

+ 24 - 0
src/xt_pages/dialysis/details/index.vue View File

264
         :special_premission="headNurses"
264
         :special_premission="headNurses"
265
         @assessmentAfterDislysis="assessmentAfterDislysisFunc"
265
         @assessmentAfterDislysis="assessmentAfterDislysisFunc"
266
         :system_prescribe="system_prescribe"
266
         :system_prescribe="system_prescribe"
267
+        :his_is_open="his_is_open"
267
       >
268
       >
268
       </nav-igation>
269
       </nav-igation>
269
 
270
 
623
       aliquid_info: [],
624
       aliquid_info: [],
624
       config: {},
625
       config: {},
625
 
626
 
627
+      his_is_open:0,
628
+
626
       lastPredialysisEvaluation: { id: 0 },
629
       lastPredialysisEvaluation: { id: 0 },
627
       lastMonitorRecord: { id: 0 },
630
       lastMonitorRecord: { id: 0 },
628
       lastAssessmentAfterDislysis: { id: 0 },
631
       lastAssessmentAfterDislysis: { id: 0 },
930
               }
933
               }
931
 
934
 
932
               this.is_open = resp.data.is_open_remind
935
               this.is_open = resp.data.is_open_remind
936
+              if(this.his_is_open == 1){
937
+                this.is_open = 0
938
+              }
933
               this.longAdvices = totalAdvice
939
               this.longAdvices = totalAdvice
934
               this.waitUploadAdvices = waitUploadAdvices
940
               this.waitUploadAdvices = waitUploadAdvices
935
               break
941
               break
1111
           this.devices = resp.data.devices
1117
           this.devices = resp.data.devices
1112
           this.device_numbers = resp.data.device_numbers
1118
           this.device_numbers = resp.data.device_numbers
1113
 
1119
 
1120
+          var his_doctor_advices = resp.data.his_advices
1121
+          this.his_is_open = resp.data.is_open_config.is_open
1122
+          console.log(this.his_is_open)
1123
+
1124
+
1125
+          for (let i = 0; i <  this.doctor_advices.length; i++){
1126
+            this.doctor_advices[i]['origin'] = 1
1127
+          }
1128
+
1129
+          if (his_doctor_advices != null) {
1130
+            for (let i = 0; i < his_doctor_advices.length; i++) {
1131
+              his_doctor_advices[i]['origin'] = 2
1132
+              his_doctor_advices[i]['way'] = 1
1133
+              this.doctor_advices.push(his_doctor_advices[i])
1134
+            }
1135
+          }
1136
+
1137
+
1114
           var device_map = {}
1138
           var device_map = {}
1115
           for (let index = 0; index < this.devices.length; index++) {
1139
           for (let index = 0; index < this.devices.length; index++) {
1116
             const device = this.devices[index]
1140
             const device = this.devices[index]

+ 136 - 1
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

88
             <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
88
             <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
89
             </el-tab-pane>
89
             </el-tab-pane>
90
             <div class="RP">Rp</div>
90
             <div class="RP">Rp</div>
91
+
92
+            <div style="float: right">
93
+            <el-button
94
+              round
95
+              @click="openLast(3)"
96
+            >上一方
97
+            </el-button>
98
+
99
+            <el-button
100
+              round
101
+              @click="openNext(4)"
102
+            >下一方
103
+            </el-button>
104
+            </div>
105
+
91
             <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
106
             <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
92
                                 :activeType="customTabIndex"></prescription-table>
107
                                 :activeType="customTabIndex"></prescription-table>
93
           </el-tabs>
108
           </el-tabs>
289
                        :patientInfo="patientInfo" :additions="additions" ></additionalCharges>
304
                        :patientInfo="patientInfo" :additions="additions" ></additionalCharges>
290
     <select-template ref='selectTemplate'></select-template>
305
     <select-template ref='selectTemplate'></select-template>
291
     <save-template ref='saveTemplate'></save-template>
306
     <save-template ref='saveTemplate'></save-template>
307
+    <next-or-last-prescription></next-or-last-prescription>
308
+
292
   </div>
309
   </div>
293
 </template>
310
 </template>
294
 
311
 
299
     delHisPrescription,
316
     delHisPrescription,
300
     getInitData,
317
     getInitData,
301
     getPatientInfo,
318
     getPatientInfo,
302
-    getSchedulePatientList
319
+    getSchedulePatientList,
320
+    getNextOrLastHisPrescription
303
   } from '@/api/his/his'
321
   } from '@/api/his/his'
304
   import { getDictionaryDataConfig } from '@/utils/data'
322
   import { getDictionaryDataConfig } from '@/utils/data'
305
   import prescriptionTable from './prescriptionTable'
323
   import prescriptionTable from './prescriptionTable'
307
   import saveTemplate from './saveTemplate'
325
   import saveTemplate from './saveTemplate'
308
   import additionalCharges from './additionalCharges'
326
   import additionalCharges from './additionalCharges'
309
   import { addProjectTeam, getAllProjectTeam, getHisProject, getPojectListById } from '@/api/project/project'
327
   import { addProjectTeam, getAllProjectTeam, getHisProject, getPojectListById } from '@/api/project/project'
328
+  import { uParseTime } from '@/utils/tools'
329
+  import NextOrLastPrescription from "./nextOrLastPrescription";
310
 
330
 
311
   export default {
331
   export default {
312
     props: {
332
     props: {
326
       },
346
       },
327
     },
347
     },
328
     components: {
348
     components: {
349
+      NextOrLastPrescription,
329
       selectTemplate,
350
       selectTemplate,
330
       saveTemplate,
351
       saveTemplate,
331
       prescriptionTable,
352
       prescriptionTable,
343
           {value: 7,label: "其他"},
364
           {value: 7,label: "其他"},
344
 
365
 
345
         ],
366
         ],
367
+        isLastOrNextVisible:false,
346
         multipleTableHeight:'',
368
         multipleTableHeight:'',
347
         register_type: '',
369
         register_type: '',
348
         value: '0',
370
         value: '0',
372
         departmentValue: '',
394
         departmentValue: '',
373
         total: 0,
395
         total: 0,
374
         state1: '',
396
         state1: '',
397
+        request_record_date:'',
375
         state2: '',
398
         state2: '',
376
         customTabIndex: 1,
399
         customTabIndex: 1,
377
         options: [],
400
         options: [],
402
       }
425
       }
403
     },
426
     },
404
     methods: {
427
     methods: {
428
+      GetNextOrLastHisPrescription(params){
429
+        getNextOrLastHisPrescription(params).then(response => {
430
+          if (response.data.state == 1) {
431
+
432
+            // this.request_record_date = uParseTime(this.other_doctor_advices[0].record_date, '{y}-{m}-{d}')
433
+          } else {
434
+            this.$message.error(response.data.msg)
435
+
436
+          }
437
+        })
438
+
439
+
440
+      },
441
+      openLast(val) {
442
+        if (val == 1) {
443
+          this.isLastOrNextVisible = true
444
+          this.isVisibility = false
445
+          this.request_record_date = this.record_date
446
+
447
+          let params = {
448
+            patient_id: this.patientid,
449
+            record_time: this.request_record_date,
450
+            type: 1
451
+          }
452
+
453
+          this.GetNextOrLastHisPrescription(params)
454
+        } else if (val == 3) {
455
+
456
+          let params = {
457
+            patient_id: this.patientid,
458
+            record_time: this.request_record_date,
459
+            type: 1
460
+          }
461
+
462
+          this.GetNextOrLastHisPrescription(params)
463
+
464
+        }
465
+      },
466
+      openNext(val) {
467
+        if (val == 2) {
468
+          this.isLastOrNextVisible = true
469
+          this.isVisibility = false
470
+          this.request_record_date = this.record_date
471
+
472
+          let params = {
473
+            patient_id: this.patientid,
474
+            record_time: this.request_record_date,
475
+            type: 2
476
+          }
477
+
478
+          this.GetNextOrLastHisPrescription(params)
479
+        } else if (val == 4) {
480
+          let params = {
481
+            patient_id: this.patientid,
482
+            record_time: this.request_record_date,
483
+            type: 2
484
+          }
485
+          this.GetNextOrLastHisPrescription(params)
486
+
487
+        }
488
+      },
489
+
405
       selectTemplate(selection, row){
490
       selectTemplate(selection, row){
406
         this.tempDrugs = selection
491
         this.tempDrugs = selection
407
 
492
 
1098
             }
1183
             }
1099
           }
1184
           }
1100
         }
1185
         }
1186
+        let templateDrugs=[]
1187
+
1188
+        for (let i = 0; i< this.tempDrugs.length;i++){
1189
+          for (let a = 0; a < this.tempDrugs[i].advices.length; a++ ){
1190
+            templateDrugs.push(this.tempDrugs[i].advices[a])
1191
+          }
1192
+        }
1193
+
1194
+        // for (let i = 0; i < templateDrugs.length; i++) {
1195
+        //   for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
1196
+        //     if (this.templateDrugs[i].drug_id == this.curPrescriptions.advices[i].id) {
1197
+        //       this.$message.error('改处方存在相同的药品,无法添加相同的药品')
1198
+        //       return
1199
+        //
1200
+        //     }
1201
+        //   }
1202
+        // }
1203
+
1101
 
1204
 
1102
         for (let i = 0; i < this.prescriptions.length; i++) {
1205
         for (let i = 0; i < this.prescriptions.length; i++) {
1103
           if (this.prescriptions[i].name == this.editableTabsValue) {
1206
           if (this.prescriptions[i].name == this.editableTabsValue) {
1104
             var temp = this.deepClone(this.curDrugs)
1207
             var temp = this.deepClone(this.curDrugs)
1105
             var temp2 = this.deepClone(this.teamList)
1208
             var temp2 = this.deepClone(this.teamList)
1209
+
1210
+            var temp3 = this.deepClone(templateDrugs)
1211
+
1212
+            if (temp3.length > 0) {
1213
+              for (let b = 0; b < temp3.length; b++) {
1214
+                let obj = {
1215
+                  advice_id: 0,
1216
+                  id: temp3[b].id,
1217
+                  drug_name: temp3[b].advice_name,
1218
+                  single_dose: temp3[b].single_dose,
1219
+                  delivery_way: temp3[b].delivery_way,
1220
+                  execution_frequency: temp3[b].execution_frequency,
1221
+                  retail_price: temp3[b].drug.retail_price.toString(),
1222
+                  remark: '',
1223
+                  day:1,
1224
+                  prescribing_number: temp3[b].prescribing_number,
1225
+                  single_dose_unit: temp3[b].drug.min_unit,
1226
+                  prescribing_number_unit: temp3[b].drug.max_unit,
1227
+                  medical_insurance_number: temp3[b].drug.medical_insurance_number
1228
+                }
1229
+
1230
+                if(obj.prescribing_number == 0 || obj.prescribing_number.length  == 0){
1231
+                  obj.prescribing_number = 1
1232
+                }
1233
+                this.prescriptions[i].advices.push(obj)
1234
+              }
1235
+              this.curStatus = 1
1236
+            }
1237
+
1238
+
1239
+
1106
             if (temp.length > 0) {
1240
             if (temp.length > 0) {
1107
               for (let b = 0; b < temp.length; b++) {
1241
               for (let b = 0; b < temp.length; b++) {
1108
                 let obj = {
1242
                 let obj = {
1250
         }
1384
         }
1251
       }
1385
       }
1252
     },mounted(){
1386
     },mounted(){
1387
+      this.request_record_date = this.record_date
1253
       this.getInitData()
1388
       this.getInitData()
1254
       //获取所有项目
1389
       //获取所有项目
1255
       this.getlist()
1390
       this.getlist()