Bläddra i källkod

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

csx 4 år sedan
förälder
incheckning
380ed45ae0

+ 6 - 4
src/api/advice.js Visa fil

@@ -43,13 +43,14 @@ export function EditDoctorAdvice(patient, id, advice, mode) {
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 48
   var params = {
49 49
     id: id,
50 50
     patient: patient,
51 51
     execution_time: time,
52
-    mode: mode
52
+    mode: mode,
53
+    origin:origin,
53 54
   };
54 55
   console.log("paras------",params)
55 56
   return request({
@@ -61,11 +62,12 @@ export function ExecDoctorAdvice(patient, id, time, mode) {
61 62
     }
62 63
   });
63 64
 }
64
-export function CheckDoctorAdvice(patient, id, mode) {
65
+export function  CheckDoctorAdvice(patient, id, mode,origin) {
65 66
   var params = {
66 67
     id: id,
67 68
     patient: patient,
68
-    mode: mode
69
+    mode: mode,
70
+    origin:origin,
69 71
     // execution_time: time,
70 72
   };
71 73
   return request({

+ 9 - 0
src/api/his/his.js Visa fil

@@ -258,6 +258,15 @@ export function getAllHisAdviceTemplate () {
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 Visa fil

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

+ 140 - 35
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Visa fil

@@ -11,6 +11,7 @@
11 11
       <div class="txsj">
12 12
         <el-button
13 13
           round
14
+
14 15
           @click="openLast(3)"
15 16
         >上一方
16 17
         </el-button>
@@ -161,12 +162,14 @@
161 162
       <div class="txsj">
162 163
         <el-button
163 164
           round
165
+          v-if="his_is_open != 1"
164 166
           @click="openLast(1)"
165 167
         >上一方
166 168
         </el-button>
167 169
 
168 170
         <el-button
169 171
           round
172
+          v-if="his_is_open != 1"
170 173
           @click="openNext(2)"
171 174
         >下一方
172 175
         </el-button>
@@ -177,6 +180,7 @@
177 180
           round
178 181
           @click="openGroupFrom"
179 182
           :loading="deleLoading"
183
+          v-if="his_is_open != 1"
180 184
           :disabled="!is_has_create"
181 185
         >新增医嘱
182 186
         </el-button>
@@ -187,6 +191,7 @@
187 191
           :disabled="!is_has_exce"
188 192
           @click="execAdvice"
189 193
           :loading="deleLoading"
194
+
190 195
         >执行医嘱
191 196
         </el-button>
192 197
         <el-button v-else disabled round @click="execAdvice" :loading="deleLoading">执行医嘱</el-button>
@@ -202,7 +207,8 @@
202 207
         <el-button v-else disabled round @click="checkAdvice" :loading="deleLoading">医嘱核对</el-button>
203 208
 
204 209
         <el-button
205
-          v-if="groupSelectRow != null"
210
+
211
+          v-if="groupSelectRow != null || his_is_open != 1"
206 212
           :disabled="!is_has_modify && !is_has_modify_other"
207 213
           round
208 214
           @click="openEditGroupAdvice"
@@ -212,7 +218,7 @@
212 218
         <el-button v-else disabled round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱</el-button>
213 219
 
214 220
         <el-button
215
-          v-if="groupSelectRow != null"
221
+          v-if="groupSelectRow != null ||  his_is_open != 1"
216 222
           :disabled="!is_has_del && !is_has_del_other"
217 223
           round
218 224
           @click="openDeleteGroupAdvice"
@@ -227,6 +233,7 @@
227 233
       <!--   @row-click="cellMouseEnter" -->
228 234
       <!--&lt;!&ndash;:header-cell-style="{ backgroundColor: 'rgb(64, 158, 255)', color: 'white'}"&ndash;&gt;@current-change="selectRow"-->
229 235
       <el-table
236
+        v-if="his_is_open == 0"
230 237
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
231 238
         :data="doctor_advices"
232 239
         border
@@ -260,9 +267,9 @@
260 267
                 <i class="el-icon-arrow-down el-icon--right"></i>
261 268
               </span>
262 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 273
               </el-dropdown-menu>
267 274
             </el-dropdown>
268 275
 
@@ -272,8 +279,8 @@
272 279
                 <i class="el-icon-arrow-down el-icon--right"></i>
273 280
               </span>
274 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 284
               </el-dropdown-menu>
278 285
             </el-dropdown>
279 286
           </template>
@@ -316,6 +323,97 @@
316 323
           </template>
317 324
         </el-table-column>
318 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 417
       <!-- 医嘱列表 end -->
320 418
 
321 419
       <!-- 新医嘱列表 -->
@@ -432,7 +530,7 @@
432 530
           </el-col>
433 531
 
434 532
           <el-col :span="8">
435
-            <el-form-item label="药品规格:">        
533
+            <el-form-item label="药品规格:">
436 534
                 <el-autocomplete
437 535
                   style="width:100px;"
438 536
                   class="inline-input"
@@ -441,7 +539,7 @@
441 539
                   placeholder="请输入内容"
442 540
                   @input="changeDrugDesc"
443 541
                 ></el-autocomplete>
444
-                 
542
+
445 543
                 <el-select
446 544
                   v-model="form.drug_spec_unit"
447 545
                   style="width: 100px;"
@@ -681,7 +779,7 @@
681 779
         current_group_index: -1,
682 780
         title: '临时医嘱',
683 781
         add_title: '新增医嘱',
684
-
782
+        his_is_open:0,
685 783
         showAdviceForm: false,
686 784
         showAdvicePanel: true,
687 785
         showNameForm: false,
@@ -772,9 +870,9 @@
772 870
         this.form['dialysis_order_id'] = this.dialysis_order.id
773 871
       },
774 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 878
     methods: {
@@ -849,7 +947,7 @@
849 947
               remark: ''
850 948
             }
851 949
             console.log("2223333",submitForm)
852
-           
950
+
853 951
             let mode = '1'
854 952
             CreateGroupAdvice(this.patientid, 0, submitForm, mode).then(
855 953
               response => {
@@ -1178,7 +1276,7 @@
1178 1276
       }
1179 1277
       ,
1180 1278
       submitExce() {
1181
-        
1279
+        console.log(this.currentRow.origin)
1182 1280
         if (this.currentRow == null) {
1183 1281
           this.$message.error('请先选择要执行的医嘱!')
1184 1282
           return false
@@ -1195,10 +1293,9 @@
1195 1293
         }
1196 1294
         this.exceLoading = true
1197 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 1299
             if (response.data.state == 0) {
1203 1300
               this.$message.error(response.data.msg)
1204 1301
               this.exceLoading = false
@@ -1262,7 +1359,7 @@
1262 1359
           return false
1263 1360
         }
1264 1361
         let mode = '1'
1265
-        
1362
+
1266 1363
        if(this.src_type == ""){
1267 1364
           this.form.way = 0
1268 1365
           this.form.drug_id = 0
@@ -1275,7 +1372,7 @@
1275 1372
        }
1276 1373
 
1277 1374
         console.log("新增医嘱子药",this.form)
1278
-       
1375
+
1279 1376
         CreateDoctorAdvice(this.patient.id, this.form, mode)
1280 1377
           .then(response => {
1281 1378
             this.loading = false
@@ -1501,6 +1598,7 @@
1501 1598
       }
1502 1599
       ,
1503 1600
       checkAdvice() {
1601
+        console.log(this.currentRow)
1504 1602
         // console.log(this.$store.getters.xt_user)
1505 1603
         if (this.currentRow == null) {
1506 1604
           this.$message.error('请先选择要核对的医嘱!')
@@ -1530,7 +1628,7 @@
1530 1628
             this.deleLoading = true
1531 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 1632
               response => {
1535 1633
                 if (response.data.state == 0) {
1536 1634
                   this.$message.error(response.data.msg)
@@ -1583,7 +1681,7 @@
1583 1681
       }
1584 1682
       ,
1585 1683
       execAdvice() {
1586
-        
1684
+
1587 1685
         if (this.is_has_exce == false) {
1588 1686
           this.$message.error('你没有执行医嘱的权限')
1589 1687
           return false
@@ -1724,7 +1822,7 @@
1724 1822
           })
1725 1823
           .catch(() => {
1726 1824
           })
1727
-        this.handleSpanTempArr()
1825
+        // this.handleSpanTempArr()
1728 1826
       }
1729 1827
       ,
1730 1828
       openDelete(index, row) {
@@ -1902,8 +2000,8 @@
1902 2000
           }
1903 2001
         })
1904 2002
 
1905
-        this.handleSpanTempArr()
1906
-        this.handleStyle()
2003
+        // this.handleSpanTempArr()
2004
+        // this.handleStyle()
1907 2005
       }
1908 2006
       ,
1909 2007
       getXuserName(id) {
@@ -1934,7 +2032,9 @@
1934 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 2038
         this.isVisibility = true
1939 2039
         this.getPermission()
1940 2040
       }
@@ -2025,8 +2125,8 @@
2025 2125
           } else {
2026 2126
             // 判断当前元素与上一个元素是否相同
2027 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 2131
               this.tempArr[this.pos] += 1
2032 2132
               this.tempArr.push(0)
@@ -2036,8 +2136,7 @@
2036 2136
             }
2037 2137
           }
2038 2138
         }
2039
-      }
2040
-      ,
2139
+      },
2041 2140
       cellMouseEnter: function(row, column, event) {
2042 2141
         console.log("数据是",row)
2043 2142
         this.currentRow = row
@@ -2062,7 +2161,7 @@
2062 2161
           if (index === 0) {
2063 2162
             sameRowArr.push([index])
2064 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 2165
               sameRowArr[sIdx].push(index)
2067 2166
             } else {
2068 2167
               sIdx = sIdx + 1
@@ -2175,7 +2274,7 @@
2175 2274
         // });
2176 2275
       },
2177 2276
       objectSpanMethod({ row, column, rowIndex, columnIndex }) {
2178
-     
2277
+
2179 2278
         if (columnIndex === 0) {
2180 2279
           if (rowIndex % 2 === 0) {
2181 2280
             return {
@@ -2211,7 +2310,7 @@
2211 2310
 
2212 2311
             var doctor_advices = response.data.data.advices
2213 2312
             console.log("doctor_advices",doctor_advices)
2214
-           
2313
+
2215 2314
             this.other_doctor_advices = doctor_advices
2216 2315
             this.request_record_date = uParseTime(this.other_doctor_advices[0].record_date, '{y}-{m}-{d}')
2217 2316
             this.sch = response.data.data.schedule
@@ -2405,7 +2504,7 @@
2405 2504
             }else{
2406 2505
               this.form.drug_name_id = 0
2407 2506
             }
2408
-           
2507
+
2409 2508
           }
2410 2509
         }
2411 2510
       },
@@ -2460,6 +2559,12 @@
2460 2559
       this.getDialysisScheduleDetail()
2461 2560
        //获取自备药
2462 2561
       this.getSelfMedicalList()
2562
+    },mounted(){
2563
+      console.log("~~~~~")
2564
+      console.log(this.his_is_open)
2565
+      console.log("~~~~~")
2566
+
2567
+
2463 2568
     },
2464 2569
     components: {
2465 2570
       AddGroupAdvice,

+ 13 - 10
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Visa fil

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

+ 24 - 0
src/xt_pages/dialysis/details/index.vue Visa fil

@@ -264,6 +264,7 @@
264 264
         :special_premission="headNurses"
265 265
         @assessmentAfterDislysis="assessmentAfterDislysisFunc"
266 266
         :system_prescribe="system_prescribe"
267
+        :his_is_open="his_is_open"
267 268
       >
268 269
       </nav-igation>
269 270
 
@@ -623,6 +624,8 @@ export default {
623 624
       aliquid_info: [],
624 625
       config: {},
625 626
 
627
+      his_is_open:0,
628
+
626 629
       lastPredialysisEvaluation: { id: 0 },
627 630
       lastMonitorRecord: { id: 0 },
628 631
       lastAssessmentAfterDislysis: { id: 0 },
@@ -930,6 +933,9 @@ export default {
930 933
               }
931 934
 
932 935
               this.is_open = resp.data.is_open_remind
936
+              if(this.his_is_open == 1){
937
+                this.is_open = 0
938
+              }
933 939
               this.longAdvices = totalAdvice
934 940
               this.waitUploadAdvices = waitUploadAdvices
935 941
               break
@@ -1111,6 +1117,24 @@ export default {
1111 1117
           this.devices = resp.data.devices
1112 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 1138
           var device_map = {}
1115 1139
           for (let index = 0; index < this.devices.length; index++) {
1116 1140
             const device = this.devices[index]

+ 136 - 1
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Visa fil

@@ -88,6 +88,21 @@
88 88
             <el-tab-pane name="more" closable><span slot="label"><i class="el-icon-plus" @click="addTab"></i></span>
89 89
             </el-tab-pane>
90 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 106
             <prescription-table ref="prescription_tables" :prescription="curPrescriptions" :preDrugs="preDrugs"
92 107
                                 :activeType="customTabIndex"></prescription-table>
93 108
           </el-tabs>
@@ -289,6 +304,8 @@
289 304
                        :patientInfo="patientInfo" :additions="additions" ></additionalCharges>
290 305
     <select-template ref='selectTemplate'></select-template>
291 306
     <save-template ref='saveTemplate'></save-template>
307
+    <next-or-last-prescription></next-or-last-prescription>
308
+
292 309
   </div>
293 310
 </template>
294 311
 
@@ -299,7 +316,8 @@
299 316
     delHisPrescription,
300 317
     getInitData,
301 318
     getPatientInfo,
302
-    getSchedulePatientList
319
+    getSchedulePatientList,
320
+    getNextOrLastHisPrescription
303 321
   } from '@/api/his/his'
304 322
   import { getDictionaryDataConfig } from '@/utils/data'
305 323
   import prescriptionTable from './prescriptionTable'
@@ -307,6 +325,8 @@
307 325
   import saveTemplate from './saveTemplate'
308 326
   import additionalCharges from './additionalCharges'
309 327
   import { addProjectTeam, getAllProjectTeam, getHisProject, getPojectListById } from '@/api/project/project'
328
+  import { uParseTime } from '@/utils/tools'
329
+  import NextOrLastPrescription from "./nextOrLastPrescription";
310 330
 
311 331
   export default {
312 332
     props: {
@@ -326,6 +346,7 @@
326 346
       },
327 347
     },
328 348
     components: {
349
+      NextOrLastPrescription,
329 350
       selectTemplate,
330 351
       saveTemplate,
331 352
       prescriptionTable,
@@ -343,6 +364,7 @@
343 364
           {value: 7,label: "其他"},
344 365
 
345 366
         ],
367
+        isLastOrNextVisible:false,
346 368
         multipleTableHeight:'',
347 369
         register_type: '',
348 370
         value: '0',
@@ -372,6 +394,7 @@
372 394
         departmentValue: '',
373 395
         total: 0,
374 396
         state1: '',
397
+        request_record_date:'',
375 398
         state2: '',
376 399
         customTabIndex: 1,
377 400
         options: [],
@@ -402,6 +425,68 @@
402 425
       }
403 426
     },
404 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 490
       selectTemplate(selection, row){
406 491
         this.tempDrugs = selection
407 492
 
@@ -1098,11 +1183,60 @@
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 1205
         for (let i = 0; i < this.prescriptions.length; i++) {
1103 1206
           if (this.prescriptions[i].name == this.editableTabsValue) {
1104 1207
             var temp = this.deepClone(this.curDrugs)
1105 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 1240
             if (temp.length > 0) {
1107 1241
               for (let b = 0; b < temp.length; b++) {
1108 1242
                 let obj = {
@@ -1250,6 +1384,7 @@
1250 1384
         }
1251 1385
       }
1252 1386
     },mounted(){
1387
+      this.request_record_date = this.record_date
1253 1388
       this.getInitData()
1254 1389
       //获取所有项目
1255 1390
       this.getlist()