XMLWAN vor 2 Jahren
Ursprung
Commit
b8c29b540e

+ 15 - 5
src/api/advice.js Datei anzeigen

@@ -42,13 +42,15 @@ export function EditDoctorAdvice(patient, id, advice, mode) {
42 42
   })
43 43
 }
44 44
 
45
-export function ExecDoctorAdvice(patient, id, time, mode, origin) {
45
+export function ExecDoctorAdvice(patient, id, time, mode, origin, hisAdviceIds, adviceIds) {
46 46
   var params = {
47 47
     id: id,
48 48
     patient: patient,
49 49
     execution_time: time,
50 50
     mode: mode,
51
-    origin: origin
51
+    origin: origin,
52
+    hisAdviceIds: hisAdviceIds,
53
+    adviceIds: adviceIds
52 54
   }
53 55
 
54 56
   return request({
@@ -60,13 +62,14 @@ export function ExecDoctorAdvice(patient, id, time, mode, origin) {
60 62
     }
61 63
   })
62 64
 }
63
-export function CheckDoctorAdvice(patient, id, mode, origin) {
65
+export function CheckDoctorAdvice(patient, id, mode, origin, hisAdviceIds, adviceIds) {
64 66
   var params = {
65 67
     id: id,
66 68
     patient: patient,
67 69
     mode: mode,
68
-    origin: origin
69
-    // execution_time: time,
70
+    origin: origin,
71
+    hisAdviceIds: hisAdviceIds,
72
+    adviceIds: adviceIds
70 73
   }
71 74
   return request({
72 75
     url: '/api/patients/advice/check',
@@ -509,3 +512,10 @@ export function getDoctorAdviceCount(params) {
509 512
   })
510 513
 }
511 514
 
515
+export function GetOrderDoctorAdvice(params) {
516
+  return request({
517
+    url: '/api/schedule/getorderdoctoradvice',
518
+    method: 'get',
519
+    params: params
520
+  })
521
+}

+ 16 - 0
src/api/dialysis_record.js Datei anzeigen

@@ -113,6 +113,22 @@ export function getLongAdvice(params) {
113 113
   })
114 114
 }
115 115
 
116
+export function getLongAdviceOne(params) {
117
+  return request({
118
+    url: '/api/dialysis/advice_remind/one',
119
+    method: 'Get',
120
+    params: params
121
+  })
122
+}
123
+
124
+export function getLongAdviceTwo(params) {
125
+  return request({
126
+    url: '/api/dialysis/advice_remind/two',
127
+    method: 'Get',
128
+    params: params
129
+  })
130
+}
131
+
116 132
 export function GetSchedualNumber(params) {
117 133
   return request({
118 134
     url: '/api/schedule/get',

+ 16 - 0
src/api/drug/drug.js Datei anzeigen

@@ -547,3 +547,19 @@ export function getPurchaseStockQuery(params) {
547 547
     params: params
548 548
   })
549 549
 }
550
+
551
+export function getDrugWarehouseOutDetailByPatientId(params) {
552
+  return request({
553
+    url: '/api/good/getdrugwarehouseoutdetailbypatientid',
554
+    method: 'get',
555
+    params: params
556
+  })
557
+}
558
+
559
+export function getDrugExpiryDateQuery(params) {
560
+  return request({
561
+    url: '/api/drug/getdrugexpirydatequery',
562
+    method: 'get',
563
+    params: params
564
+  })
565
+}

+ 1 - 0
src/lang/zh.js Datei anzeigen

@@ -170,6 +170,7 @@ export default {
170 170
     drugsExpiryDate: '药品有效期预警',
171 171
     drugsSurplus: '药品剩余预警',
172 172
     drugsQuery: '库存查询',
173
+    drugsNewQuery: '库存查询',
173 174
     drugsReportLoss: '药品报损',
174 175
     drugsAdjustPrice: '药品调价',
175 176
     drugsStockCancel: '退库单',

+ 6 - 0
src/router/modules/drugs.js Datei anzeigen

@@ -18,6 +18,12 @@ export default {
18 18
       name: 'drugsQuery',
19 19
       meta: { title: 'drugsQuery', noCache: true }
20 20
     },
21
+    {
22
+      path: '/stock/drugs/drugNewQuery',
23
+      component: () => import('@/xt_pages/stock/drugs/drugNewQuery'),
24
+      name: 'drugsNewQuery',
25
+      meta: { title: 'drugsNewQuery', noCache: true }
26
+    },
21 27
     {
22 28
       path: '/stock/drugs/stock/in',
23 29
       component: () => import('@/xt_pages/stock/drugs/drugStockInOrder'),

+ 7 - 2
src/xt_pages/dialysis/PatientBox.vue Datei anzeigen

@@ -240,7 +240,7 @@ import dialysisPrescriptionDialog from "../dialysis/details/dialog/dialysisPresc
240 240
 import treatmentSummaryDialog from "../dialysis/details/dialog/treatmentSummaryDialog";
241 241
 import {
242 242
   getDialysisScheduleDetail,
243
-  getLongAdvice,
243
+  getLongAdviceOne,
244 244
 } from "@/api/dialysis_record";
245 245
 
246 246
 export default {
@@ -340,6 +340,7 @@ export default {
340 340
       type: Array,
341 341
     },
342 342
     patientStateVal: Number,
343
+    selected_date:String,
343 344
   },
344 345
 
345 346
   methods: {
@@ -661,10 +662,12 @@ export default {
661 662
       });
662 663
     },
663 664
     getLongAdvice() {
665
+    
664 666
       let params = {
665 667
         patient_id: this.patient_id,
668
+        schedule_date:parseTime(this.selected_date, '{y}-{m}-{d}'),
666 669
       };
667
-      getLongAdvice(params).then((rs) => {
670
+      getLongAdviceOne(params).then((rs) => {
668 671
         var resp = rs.data;
669 672
         if (resp.state == 1) {
670 673
           var status = parseInt(resp.data.status);
@@ -698,7 +701,9 @@ export default {
698 701
               }
699 702
 
700 703
               this.is_open = resp.data.is_open_remind;
704
+              
701 705
               this.longAdvices = totalAdvice;
706
+              console.log("长期医嘱22332323232232323",this.longAdvices)
702 707
               this.waitUploadAdvices = waitUploadAdvices;
703 708
               break;
704 709
           }

+ 184 - 116
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Datei anzeigen

@@ -165,7 +165,6 @@
165 165
           :disabled="!is_has_exce"
166 166
           @click="execAdvice"
167 167
           :loading="deleLoading"
168
-
169 168
         >执行医嘱
170 169
         </el-button>
171 170
         <el-button v-else disabled round @click="execAdvice" :loading="deleLoading">执行医嘱</el-button>
@@ -209,6 +208,7 @@
209 208
       <!-- 医嘱列表 -->
210 209
       <!--   @row-click="cellMouseEnter" -->
211 210
       <!--&lt;!&ndash;:header-cell-style="{ backgroundColor: 'rgb(64, 158, 255)', color: 'white'}"&ndash;&gt;@current-change="selectRow"-->
211
+      <!-- :span-method="objectSpanMethod" -->
212 212
       <el-table
213 213
         v-if="his_is_open !=1 && is_advice_open!=1"
214 214
         :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
@@ -219,14 +219,13 @@
219 219
         ref="advices_list"
220 220
         @row-click="cellMouseEnter"
221 221
         :row-class-name="tableRowClassName"
222
-        :span-method="objectSpanMethod"
222
+        
223 223
         :cell-class-name="adviceNameShow"
224 224
         :modal-append-to-body="false"
225
+        @selection-change="handleSelectionChange"
225 226
         highlight-current-row
226
-
227 227
       >
228
-      <!-- @selection-change="handleSelectionChange" -->
229
-        <!-- <el-table-column type="selection"  width="55"></el-table-column> -->
228
+       <el-table-column type="selection"  width="55" ></el-table-column>
230 229
        <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
231 230
           <template slot-scope="scope">
232 231
             <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
@@ -300,8 +299,6 @@
300 299
             <span>
301 300
               {{getXuserName(scope.row.checker)}}
302 301
             </span>
303
-
304
-
305 302
           </template>
306 303
         </el-table-column>
307 304
       </el-table>
@@ -321,8 +318,9 @@
321 318
         :cell-class-name="adviceNameShow"
322 319
         :modal-append-to-body="false"
323 320
         highlight-current-row
321
+        @selection-change="handleSelectionChange"
324 322
       >
325
-        <!-- <el-table-column type="selection"  width="55"></el-table-column> -->
323
+        <el-table-column type="selection"  width="55"></el-table-column>
326 324
         <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
327 325
           <template slot-scope="scope">
328 326
             <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
@@ -330,13 +328,6 @@
330 328
         </el-table-column>
331 329
 
332 330
 
333
-        <!--===================================-->
334
-<!--        <el-table-column prop="date" label="调试" align="center" min-width="26px">-->
335
-<!--          <template slot-scope="scope">-->
336
-<!--            <span @click="lili(scope.$index,scope.row)">{{ scope.row.parent_id }}</span>-->
337
-<!--          </template>-->
338
-<!--        </el-table-column>-->
339
-
340 331
         <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
341 332
           <template slot-scope="scope">
342 333
             <span>
@@ -623,7 +614,8 @@
623 614
     EditDoctorAdvice,
624 615
     ExecDoctorAdvice,
625 616
     getAdviceConfig,
626
-    GetLastOrNextDoctorAdvice
617
+    GetLastOrNextDoctorAdvice,
618
+    GetOrderDoctorAdvice
627 619
   } from '@/api/advice'
628 620
   import { getDataConfig } from '@/utils/data'
629 621
 
@@ -780,6 +772,8 @@
780 772
         drug_id: 0,
781 773
         src_type:"",
782 774
         org_id:0,
775
+        hisAdviceIds:"",
776
+        adviceIds:"",
783 777
       }
784 778
     },
785 779
     watch: {
@@ -796,16 +790,50 @@
796 790
 
797 791
     },
798 792
     methods: {
799
-      handleSelectionChange(){
800
-
801
-      },
802
-
803
-      //调试
804
-      lili(index,row){
805
-        // console.log("==index==",index)
806
-        // console.log("==row==",row)
807
-        console.log("==doctor_advices==",this.doctor_advices)
808
-        console.log("==this.form==",this.form)
793
+      handleSelectionChange(row){
794
+        console.log("row3233223232332322323",row)
795
+       if(row.length >0){
796
+         this.currentRow = row[0]
797
+       }
798
+       var bloodIds= []
799
+       var hisIds=[]
800
+       console.log("this.his_is_open ",this.his_is_open )
801
+       console.log("is_advice_open",this.is_advice_open)
802
+       for(let i=0;i<row.length;i++){
803
+        //血透
804
+         if(this.his_is_open  != 1 && this.is_advice_open!=1){
805
+            bloodIds.push(row[i].id)
806
+         }
807
+         //his
808
+         if(this.his_is_open == 1 && this.is_advice_open!=1){
809
+             hisIds.push(row[i].id)
810
+         }
811
+         
812
+         if(this.his_is_open == 1 && this.is_advice_open == 1){
813
+            if(row[i].origin == 1){
814
+              bloodIds.push(row[i].id)
815
+            }
816
+            if(row[i].origin == 2){
817
+              hisIds.push(row[i].id)
818
+            }
819
+           this.currentRow.origin = 3
820
+         }
821
+       }
822
+      
823
+       if(this.his_is_open  == 1 || this.is_advice_open == 1){
824
+         this.is_has_exce = true
825
+         this.is_has_check = true
826
+       }
827
+     
828
+       if(this.his_is_open!=1 && this.is_advice_open!=1){
829
+        
830
+          this.is_has_exce = true
831
+          this.is_has_check = true
832
+       }
833
+        console.log("bloodIds",bloodIds,"hisIds",hisIds)
834
+       this.adviceIds = bloodIds.join(",")
835
+       this.hisAdviceIds = hisIds.join(",")
836
+      
809 837
       },
810 838
       getContent: function() {
811 839
         if (this.sch != null) {
@@ -1242,7 +1270,7 @@
1242 1270
         let mode = '6'
1243 1271
 
1244 1272
 
1245
-        ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime, mode,this.currentRow.origin).then(response => {
1273
+        ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime, mode,this.currentRow.origin,this.hisAdviceIds,this.adviceIds).then(response => {
1246 1274
             if (response.data.state == 0) {
1247 1275
               this.$message.error(response.data.msg)
1248 1276
               this.exceLoading = false
@@ -1254,46 +1282,71 @@
1254 1282
                 type: 'success',
1255 1283
                 duration: 2000
1256 1284
               })
1285
+              
1257 1286
               var msg = response.data.data.msg
1258 1287
               if(msg == 1){
1259
-                var exid = response.data.data.advice.id
1260
-                  if (response.data.data.advice.parent_id > 0) {
1261
-                    exid = response.data.data.advice.parent_id
1262
-                  }
1263
-
1264
-                  this.currentRow.execution_state = 1
1265
-                  this.currentRow.execution_staff =
1266
-                    response.data.data.advice.execution_staff
1267
-                  this.currentRow.execution_time =
1268
-                    response.data.data.advice.execution_time
1269
-                  var alen = this.doctor_advices.length
1270
-
1271
-                  for (var index in this.doctor_advices) {
1272
-                    if (
1273
-                      this.doctor_advices[index].id == exid ||
1274
-                      this.doctor_advices[index].parent_id == exid
1275
-                    ) {
1276
-                      this.doctor_advices[index].execution_state = 1
1277
-                      this.doctor_advices[index].execution_staff =
1278
-                        response.data.data.advice.execution_staff
1279
-                      this.doctor_advices[index].execution_time =
1280
-                        response.data.data.advice.execution_time
1281
-                      // this.doctor_advices[index].checker = response.data.data.advice.checker;
1282
-                      break
1283
-                    }
1284
-                  }
1285
-                  this.execTimeDialogVisible = false
1286
-
1287
-                  return false
1288
+                  let params = {
1289
+                  patient_id: this.patientid,
1290
+                  record_time: this.request_record_date,
1291
+                  type: 1,
1292
+                  advice_date:this.$route.query.date,
1293
+                }
1294
+                this.GetOrderDoctorAdvice(params)
1295
+                this.execTimeDialogVisible = false
1288 1296
               }
1297
+            
1298
+              // if(msg == 1){
1299
+              //   var exid = response.data.data.advice.id
1300
+              //     if (response.data.data.advice.parent_id > 0) {
1301
+              //       exid = response.data.data.advice.parent_id
1302
+              //     }
1303
+
1304
+              //     this.currentRow.execution_state = 1
1305
+              //     this.currentRow.execution_staff =
1306
+              //       response.data.data.advice.execution_staff
1307
+              //     this.currentRow.execution_time =
1308
+              //       response.data.data.advice.execution_time
1309
+              //     var alen = this.doctor_advices.length
1310
+
1311
+              //     for (var index in this.doctor_advices) {
1312
+              //       if (
1313
+              //         this.doctor_advices[index].id == exid ||
1314
+              //         this.doctor_advices[index].parent_id == exid
1315
+              //       ) {
1316
+              //         this.doctor_advices[index].execution_state = 1
1317
+              //         this.doctor_advices[index].execution_staff =
1318
+              //           response.data.data.advice.execution_staff
1319
+              //         this.doctor_advices[index].execution_time =
1320
+              //           response.data.data.advice.execution_time
1321
+              //         break
1322
+              //       }
1323
+              //     }
1324
+              //     this.execTimeDialogVisible = false
1325
+
1326
+              //     return false
1327
+              // }
1289 1328
 
1290 1329
               if(msg == 2){
1291 1330
                 this.$message.error("库存不足,请入库")
1331
+               let params = {
1332
+                patient_id: this.patientid,
1333
+                record_time: this.request_record_date,
1334
+                type: 1,
1335
+                advice_date:this.$route.query.date,
1336
+              }
1337
+              this.GetOrderDoctorAdvice(params)
1292 1338
                 this.execTimeDialogVisible = false
1293 1339
                 return false
1294 1340
               }
1295 1341
               if(msg == 3){
1296 1342
                 this.$message.error("无库存,请入库")
1343
+               let params = {
1344
+                patient_id: this.patientid,
1345
+                record_time: this.request_record_date,
1346
+                type: 1,
1347
+                advice_date:this.$route.query.date,
1348
+              }
1349
+              this.GetOrderDoctorAdvice(params)
1297 1350
                 this.execTimeDialogVisible = false
1298 1351
                 return false
1299 1352
               }
@@ -1602,7 +1655,7 @@
1602 1655
             this.deleLoading = true
1603 1656
             let mode = '7'
1604 1657
 
1605
-            CheckDoctorAdvice(this.patient.id, this.currentRow.id, mode,this.currentRow.origin).then(
1658
+            CheckDoctorAdvice(this.patient.id, this.currentRow.id, mode,this.currentRow.origin,this.hisAdviceIds,this.adviceIds).then(
1606 1659
               response => {
1607 1660
                 if (response.data.state == 0) {
1608 1661
                   this.$message.error(response.data.msg)
@@ -1616,33 +1669,37 @@
1616 1669
                     type: 'success',
1617 1670
                     duration: 2000
1618 1671
                   })
1619
-
1620
-                  var exid = response.data.data.advice.id
1621
-                  if (response.data.data.advice.parent_id > 0) {
1622
-                    exid = response.data.data.advice.parent_id
1672
+                   let params = {
1673
+                    patient_id: this.patientid,
1674
+                    record_time: this.request_record_date,
1675
+                    type: 1,
1676
+                    advice_date:this.$route.query.date,
1623 1677
                   }
1624
-                  // if (this.currentRow.parent_id > 0) {
1625
-                  //     exid = this.currentRow.parent_id;
1678
+                console.log("param233223223233232",params)
1679
+                 this.GetOrderDoctorAdvice(params)
1680
+                  // var exid = response.data.data.advice.id
1681
+                  // if (response.data.data.advice.parent_id > 0) {
1682
+                  //   exid = response.data.data.advice.parent_id
1683
+                  // }
1684
+                  // this.currentRow.check_state = 1
1685
+                  // this.currentRow.check_time =
1686
+                  //   response.data.data.advice.check_time
1687
+                  // this.currentRow.checker = response.data.data.advice.checker
1688
+                  // var alen = this.doctor_advices.length
1689
+
1690
+                  // for (var index in this.doctor_advices) {
1691
+                  //   if (
1692
+                  //     this.doctor_advices[index].id == exid ||
1693
+                  //     this.doctor_advices[index].parent_id == exid
1694
+                  //   ) {
1695
+                  //     this.doctor_advices[index].check_state = 1
1696
+                  //     this.doctor_advices[index].check_time =
1697
+                  //       response.data.data.advice.check_time
1698
+                  //     this.doctor_advices[index].checker =
1699
+                  //       response.data.data.advice.checker
1700
+                  //     // break;
1701
+                  //   }
1626 1702
                   // }
1627
-                  this.currentRow.check_state = 1
1628
-                  this.currentRow.check_time =
1629
-                    response.data.data.advice.check_time
1630
-                  this.currentRow.checker = response.data.data.advice.checker
1631
-                  var alen = this.doctor_advices.length
1632
-
1633
-                  for (var index in this.doctor_advices) {
1634
-                    if (
1635
-                      this.doctor_advices[index].id == exid ||
1636
-                      this.doctor_advices[index].parent_id == exid
1637
-                    ) {
1638
-                      this.doctor_advices[index].check_state = 1
1639
-                      this.doctor_advices[index].check_time =
1640
-                        response.data.data.advice.check_time
1641
-                      this.doctor_advices[index].checker =
1642
-                        response.data.data.advice.checker
1643
-                      // break;
1644
-                    }
1645
-                  }
1646 1703
 
1647 1704
                   this.deleLoading = false
1648 1705
                 }
@@ -1736,29 +1793,6 @@
1736 1793
           this.nowExecTime = new Date(group_top_advice.start_time * 1000)
1737 1794
         }
1738 1795
         this.$refs.exec_time.open()
1739
-        // if (this.currentRow == null) {
1740
-        //   this.$message.error("请先选择要执行的医嘱!");
1741
-        //   return false;
1742
-        // }
1743
-        //
1744
-        // if (
1745
-        //   this.currentRow.stop_state == 1 ||
1746
-        //   this.currentRow.execution_state == 1
1747
-        // ) {
1748
-        //   this.$message.error("所选医嘱已停止或执行");
1749
-        //   return false;
1750
-        // }
1751
-        //
1752
-        // if (
1753
-        //   this.currentRow.checker > 0 &&
1754
-        //   this.currentRow.checker == this.$store.getters.xt_user.user.id
1755
-        // ) {
1756
-        //   this.$message.error("核对与执行不能是同一人");
1757
-        //   return false;
1758
-        // }
1759
-        //
1760
-        // this.execTimeDialogVisible = true;
1761
-        // this.deleLoading = true;
1762 1796
       }
1763 1797
       ,
1764 1798
 
@@ -2009,8 +2043,6 @@
2009 2043
       }
2010 2044
       ,
2011 2045
       show(his_is_open,is_advice_open) {
2012
-        console.log("his_is_open233232323232323322323",his_is_open)
2013
-        console.log("is_advice_open233232323232323322323",is_advice_open)
2014 2046
         this.his_is_open = his_is_open
2015 2047
         this.is_advice_open = is_advice_open
2016 2048
         this.isVisibility = true
@@ -2116,7 +2148,7 @@
2116 2148
         }
2117 2149
       },
2118 2150
       cellMouseEnter: function(row, column, event) {
2119
-        console.log("row323323322323233232",row)
2151
+       
2120 2152
         this.currentRow = row
2121 2153
         this.groupSelectRow = row
2122 2154
         // this.sameRowArr.forEach((arr, i) => {
@@ -2286,11 +2318,11 @@
2286 2318
       }
2287 2319
       ,
2288 2320
       GetLastOrNextDoctorAdvice(params) {
2321
+       
2289 2322
         GetLastOrNextDoctorAdvice(params).then(response => {
2290 2323
           if (response.data.state == 1) {
2291 2324
 
2292 2325
             var doctor_advices = response.data.data.advices
2293
-
2294 2326
             this.other_doctor_advices = doctor_advices
2295 2327
             this.request_record_date = uParseTime(this.other_doctor_advices[0].record_date, '{y}-{m}-{d}')
2296 2328
             this.sch = response.data.data.schedule
@@ -2301,6 +2333,40 @@
2301 2333
         })
2302 2334
 
2303 2335
       },
2336
+      GetOrderDoctorAdvice(params){
2337
+        GetOrderDoctorAdvice(params).then(response=>{
2338
+           if(response.data.state == 1){
2339
+            var doctorAdvice =  response.data.data.doctorAdvice
2340
+            for(let i=0;i<doctorAdvice.lenght;i++){
2341
+               doctorAdvice[i].origin = 1 
2342
+            }
2343
+            
2344
+            var hisDoctorAdvice = response.data.data.hisDoctorAdvice
2345
+            for(let i=0;i<hisDoctorAdvice.length;i++){
2346
+               hisDoctorAdvice[i].origin = 2
2347
+            }
2348
+            this.doctor_advices = []
2349
+            if(this.his_is_open!=1 && this.is_advice_open !=1){
2350
+              
2351
+               this.doctor_advices = doctorAdvice
2352
+            }
2353
+            if(this.his_is_open ==1 && this.is_advice_open!=1){
2354
+              this.doctor_advices = hisDoctorAdvice
2355
+            }
2356
+
2357
+            if(this.his_is_open == 1 &&  this.is_advice_open == 1){
2358
+               for(let i=0;i<doctorAdvice.length;i++){
2359
+                  this.doctor_advices.push(doctorAdvice[i])
2360
+               }
2361
+               for(let i=0;i<hisDoctorAdvice.length;i++){
2362
+                 this.doctor_advices.push(hisDoctorAdvice[i])
2363
+               }
2364
+            }
2365
+           
2366
+           
2367
+           }
2368
+        })
2369
+      },
2304 2370
       getDialysisScheduleDetail() {
2305 2371
         if(this.$route.query.showView && this.$route.query.showView == true){
2306 2372
           return
@@ -2341,7 +2407,8 @@
2341 2407
           let params = {
2342 2408
             patient_id: this.patientid,
2343 2409
             record_time: this.request_record_date,
2344
-            type: 1
2410
+            type: 1,
2411
+            advice_date:this.$route.query.date,
2345 2412
           }
2346 2413
 
2347 2414
           this.GetLastOrNextDoctorAdvice(params)
@@ -2350,7 +2417,8 @@
2350 2417
           let params = {
2351 2418
             patient_id: this.patientid,
2352 2419
             record_time: this.request_record_date,
2353
-            type: 1
2420
+            type: 1,
2421
+            advice_date:this.$route.query.date,
2354 2422
           }
2355 2423
 
2356 2424
           this.GetLastOrNextDoctorAdvice(params)
@@ -2366,7 +2434,8 @@
2366 2434
           let params = {
2367 2435
             patient_id: this.patientid,
2368 2436
             record_time: this.request_record_date,
2369
-            type: 2
2437
+            type: 2,
2438
+            advice_date:this.$route.query.date,
2370 2439
           }
2371 2440
 
2372 2441
           this.GetLastOrNextDoctorAdvice(params)
@@ -2374,7 +2443,8 @@
2374 2443
           let params = {
2375 2444
             patient_id: this.patientid,
2376 2445
             record_time: this.request_record_date,
2377
-            type: 2
2446
+            type: 2,
2447
+            advice_date:this.$route.query.date,
2378 2448
           }
2379 2449
           this.GetLastOrNextDoctorAdvice(params)
2380 2450
 
@@ -2562,6 +2632,7 @@
2562 2632
      }
2563 2633
     },
2564 2634
     created() {
2635
+      console.log("doctor_advices32323233323322332",this.doctor_advices)
2565 2636
       var date = this.$route.query && this.$route.query.date
2566 2637
       this.record_date = uParseTime(date, '{y}-{m}-{d}')
2567 2638
       this.form.advice_date = this.record_date
@@ -2571,9 +2642,6 @@
2571 2642
       this.org_id = this.$store.getters.xt_user.org.id
2572 2643
       this.patientid = this.$route.query.patient_id
2573 2644
       this.request_record_date = this.record_date
2574
-
2575
-
2576
-      // this.getDialysisScheduleDetail()
2577 2645
        //获取自备药
2578 2646
       this.getSelfMedicalList()
2579 2647
     },

+ 14 - 4
src/xt_pages/dialysis/details/index.vue Datei anzeigen

@@ -725,7 +725,7 @@ import TreatmentOf from './treatmentOf'
725 725
 import OperationStaff from './operationStaff'
726 726
 import {
727 727
   getDialysisScheduleDetail,
728
-  getLongAdvice,
728
+  getLongAdviceTwo,
729 729
   getDialysisRecordInitData,
730 730
   getDialysisSchedules,
731 731
   getInitPrintData
@@ -1086,9 +1086,10 @@ export default {
1086 1086
     },
1087 1087
     getLongAdvice() {
1088 1088
       const params = {
1089
-        patient_id: this.patient_id
1089
+        patient_id: this.patient_id,
1090
+        schedule_date:this.$route.query.date,
1090 1091
       }
1091
-      getLongAdvice(params).then(rs => {
1092
+      getLongAdviceTwo(params).then(rs => {
1092 1093
         var resp = rs.data
1093 1094
         if (resp.state == 1) {
1094 1095
           var status = parseInt(resp.data.status)
@@ -1129,6 +1130,7 @@ export default {
1129 1130
                 this.is_open = 1
1130 1131
               }
1131 1132
               this.longAdvices = totalAdvice
1133
+              console.log("长期医嘱汇总 u 公告让你😯23232322332",this.longAdvices)
1132 1134
               this.waitUploadAdvices = waitUploadAdvices
1133 1135
               break
1134 1136
           }
@@ -1410,6 +1412,7 @@ export default {
1410 1412
       )
1411 1413
     },
1412 1414
     printOrderOne(){
1415
+
1413 1416
       this.getInitPrintData()
1414 1417
 
1415 1418
     },
@@ -2164,7 +2167,13 @@ export default {
2164 2167
         })
2165 2168
       },
2166 2169
     getInitPrintData(){
2167
-      this.startVisibility = true
2170
+      const loading = this.$loading({
2171
+        lock: true,
2172
+        text: 'Loading',
2173
+        spinner: 'el-icon-loading',
2174
+        background: 'rgba(0, 0, 0, 0.7)'
2175
+       })
2176
+      
2168 2177
        var params = {
2169 2178
          patient_id:this.$route.query.patient_id,
2170 2179
          record_date:this.$route.query.date,
@@ -2177,6 +2186,7 @@ export default {
2177 2186
           this.printList = list
2178 2187
           this.assessmentAfterDislysis = assessmentAfterDislysis
2179 2188
           this.startVisibility = true
2189
+          loading.close()
2180 2190
         }
2181 2191
       })
2182 2192
     }

+ 2 - 1
src/xt_pages/dialysis/schedualPatient.vue Datei anzeigen

@@ -85,7 +85,7 @@
85 85
         <div v-for="zone_schedule in allPatient" :key="zone_schedule.zone_id" class="list clearfix">
86 86
           <!-- <h3 style="width:40px;" class="title">{{zone_schedule.zone_name}}</h3> -->
87 87
           <div v-if="zone_schedule.schedules.length > 0 && patientStateVal != 1" style="font-size:16px;font-weight: bold;color: #34495e;margin-right:10px;line-height:30px;">{{zone_schedule.zone_name}}</div>
88
-          <patient-box :schedules="zone_schedule.schedules" :patientStateVal='patientStateVal' style="flex:1"></patient-box>
88
+          <patient-box :schedules="zone_schedule.schedules" :patientStateVal='patientStateVal' :selected_date="selected_date" style="flex:1"></patient-box>
89 89
         </div>
90 90
         
91 91
         <div class="NoData" v-show="filtedSchedules.length == 0">
@@ -299,6 +299,7 @@ import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_
299 299
       var patient_state_selected = this.$store.getters.patient_state_selected
300 300
       var treat_state_selected = this.$store.getters.treat_state_selected
301 301
       var selected_date = this.$store.getters.selected_date
302
+
302 303
       if (schedule_type_selected) {
303 304
         this.schedule_type_selected = schedule_type_selected.schedule_type_selected
304 305
       }

+ 2 - 1
src/xt_pages/hospitalStation/components/callPrescription.vue Datei anzeigen

@@ -165,7 +165,7 @@
165 165
 <script>
166 166
   import { uParseTime } from '@/utils/tools'
167 167
   import { getDictionaryDataConfig} from "@/utils/data";
168
-
168
+  const moment = require('moment')
169 169
   import {
170 170
     getCallHisPrescription
171 171
   } from '@/api/his/his'
@@ -353,6 +353,7 @@
353 353
         this.srcPrescriptions = srcPrescriptions;
354 354
         this.start_time  = start_time;
355 355
         this.end_time = end_time;
356
+       
356 357
         this.patient_id = id;
357 358
         this.name = '处方调用' + '('+name +')';
358 359
         this.allPrescription = prescriptions;

+ 1 - 1
src/xt_pages/hospitalStation/components/deskPrescription.vue Datei anzeigen

@@ -2191,7 +2191,7 @@ export default {
2191 2191
         }
2192 2192
         let params = {
2193 2193
           end_time: this.record_date,
2194
-          start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
2194
+          start_time:  moment().add(-7, 'd').format("YYYY-MM-DD"),
2195 2195
           patient_id: this.patientInfo.id,
2196 2196
           p_type: 1
2197 2197
         }

+ 23 - 0
src/xt_pages/outpatientCharges/components/registerDialog9504.vue Datei anzeigen

@@ -609,6 +609,29 @@
609 609
                   '-' +
610 610
                   birth.substr(6, 2)
611 611
                 that.form.age = jsGetAge(births, '-')
612
+              }else  {
613
+                this.form.id = patient.id
614
+                that.form.name = patient.name
615
+                that.form.gender = patient.gender
616
+                that.form.age = patient.age
617
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
618
+                that.form.phone = patient.phone
619
+                that.form.id_card = patient.id_card_no
620
+
621
+                var thisLen = that.form.id_card.length
622
+                var birth = ''
623
+                if (thisLen == 15) {
624
+                  birth = '19' + that.form.id_card.substr(6, 6)
625
+                } else {
626
+                  birth = that.form.id_card.substr(6, 8)
627
+                }
628
+                var births =
629
+                    birth.substr(0, 4) +
630
+                    '-' +
631
+                    birth.substr(4, 2) +
632
+                    '-' +
633
+                    birth.substr(6, 2)
634
+                that.form.age = jsGetAge(births, '-')
612 635
               }
613 636
               that.$message({message: '读卡成功', type: 'success'})
614 637
 

+ 10 - 4
src/xt_pages/outpatientDoctorStation/components/callPrescription.vue Datei anzeigen

@@ -165,7 +165,7 @@
165 165
 <script>
166 166
   import { uParseTime } from '@/utils/tools'
167 167
   import { getDictionaryDataConfig} from "@/utils/data";
168
-
168
+  const moment = require('moment')
169 169
   import {
170 170
     getCallHisPrescription
171 171
   } from '@/api/his/his'
@@ -192,7 +192,8 @@
192 192
           p_type:2,
193 193
         };
194 194
         this.GetCallHisPrescription(params)
195
-      },changeEndTime(){
195
+      },
196
+      changeEndTime(){
196 197
         let params={
197 198
           patient_id:this.patient_id,
198 199
           start_time: this.start_time,
@@ -203,6 +204,7 @@
203 204
         this.GetCallHisPrescription(params)
204 205
       },
205 206
       GetCallHisPrescription(params){
207
+        console.log("param222222222",params)
206 208
         getCallHisPrescription(params).then(response => {
207 209
           if (response.data.state == 1) {
208 210
             this.allPrescription = response.data.data.prescriptions;
@@ -371,10 +373,13 @@
371 373
           this.srcPrescriptions =  this.srcPrescriptions.concat(prescriptions);
372 374
           this.$emit('call', this.srcPrescriptions)
373 375
         }
374
-      },show(name,id,end_time, start_time,srcPrescriptions,prescriptions){
376
+      },
377
+      show(name,id,end_time, start_time,srcPrescriptions,prescriptions){
378
+
375 379
         this.srcPrescriptions = srcPrescriptions;
376
-        this.start_time  = start_time;
380
+        this.start_time  = start_time
377 381
         this.end_time = end_time;
382
+      
378 383
         this.patient_id = id;
379 384
         this.name = '处方调用' + '('+name +')';
380 385
         this.allPrescription = prescriptions;
@@ -382,6 +387,7 @@
382 387
           this.allPrescription[i].check_group = []
383 388
         }
384 389
         this.isLastOrNextVisible = true
390
+
385 391
       },close(){
386 392
         this.isLastOrNextVisible = false
387 393
       },hide(){

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue Datei anzeigen

@@ -2183,7 +2183,7 @@
2183 2183
           }
2184 2184
           let params = {
2185 2185
             end_time: this.record_date,
2186
-            start_time: moment(new Date()).subtract(30, 'days').format('YYYY-MM-DD'),
2186
+            start_time:  moment().add(-7, 'd').format("YYYY-MM-DD"),
2187 2187
             patient_id: this.patientInfo.id,
2188 2188
             p_type: 2
2189 2189
           }

+ 1 - 1
src/xt_pages/outpatientDoctorStation/modeTemplate.vue Datei anzeigen

@@ -4,7 +4,7 @@
4 4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
5 5
             <div style="float:right">
6 6
               <el-button type="primary" @click="add">新增</el-button>
7
-              <el-button type="primary" @click="batchAdd">批量新增</el-button>
7
+              <!-- <el-button type="primary" @click="batchAdd">批量新增</el-button> -->
8 8
             </div>
9 9
         </div>
10 10
         <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">

+ 440 - 0
src/xt_pages/stock/drugs/components/drugPatientQuery.vue Datei anzeigen

@@ -0,0 +1,440 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="app-container">
4
+         <el-container>
5
+               <div style="width:27%">
6
+                <el-row>
7
+                   时间:
8
+                    <el-date-picker
9
+                      size="small"
10
+                      v-model="start_time"
11
+                      prefix-icon="el-icon-date"
12
+                      :editable="false"
13
+                      style="width:160px;"
14
+                      type="date"
15
+                      placeholder="选择日期时间"
16
+                      align="right"
17
+                      format="yyyy-MM-dd"
18
+                      value-format="yyyy-MM-dd"
19
+                      @change="startTimeChange"
20
+                    ></el-date-picker> 
21
+                      <span>-</span> 
22
+                      <el-date-picker
23
+                        size="small"
24
+                        v-model="end_time"
25
+                        prefix-icon="el-icon-date"
26
+                        :editable="false"
27
+                        style="width:160px;"
28
+                        type="date"
29
+                        placeholder="选择日期时间"
30
+                        align="right"
31
+                        format="yyyy-MM-dd"
32
+                        value-format="yyyy-MM-dd"
33
+                        @change="endTimeChange"
34
+                    ></el-date-picker>
35
+                </el-row>
36
+                <el-row></el-row>
37
+                 <el-row>
38
+                   <el-col :span="24">
39
+                      <el-input style="width:200px;margin-top:10px;margin-bottom:10px" placeholder="请输入患者姓名" v-model="keyword"></el-input>&nbsp;<el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
40
+                   </el-col>
41
+                  </el-row>
42
+
43
+                  <el-row>
44
+                      <el-table
45
+                          ref="singleTable"
46
+                          :data="patientList"
47
+                          highlight-current-row
48
+                           border
49
+                          @current-change="handleCurrentChange"
50
+                           height="440"
51
+                           :row-style="{ color: '#303133' }"
52
+                          :header-cell-style="{
53
+                            backgroundColor: 'rgb(245, 247, 250)',
54
+                            color: '#606266'
55
+                          }"
56
+                        >
57
+                     <el-table-column
58
+                       prop="date"
59
+                       label="序号"
60
+                      align="center"
61
+                      >
62
+                      <template slot-scope="scope">
63
+                        {{scope.$index + 1}}
64
+                      </template>
65
+                    </el-table-column>
66
+                     <el-table-column
67
+                       prop="name"
68
+                      label="姓名"
69
+                      align="center">
70
+                      <template slot-scope="scope">
71
+                        {{scope.row.name}}
72
+                      </template>
73
+                     </el-table-column>
74
+
75
+                     </el-table>
76
+                  </el-row>
77
+               </div>
78
+
79
+                 <el-main>
80
+                  <div class="main newMain">
81
+                      
82
+                        
83
+                  <el-tabs>
84
+
85
+                   <el-tab-pane label="患者使用列表">
86
+                   
87
+                     <el-table
88
+                          :data="tableList"
89
+                          highlight-current-row
90
+                           border
91
+                           height="440"
92
+                           :row-style="{ color: '#303133' }"
93
+                          :header-cell-style="{
94
+                            backgroundColor: 'rgb(245, 247, 250)',
95
+                            color: '#606266'
96
+                          }"
97
+                        >
98
+                     <el-table-column
99
+                       prop="date"
100
+                       label="名称"
101
+                      align="center"
102
+                      >
103
+                      <template slot-scope="scope">
104
+                        {{scope.row.drug.drug_name}}
105
+                      </template>
106
+                    </el-table-column>
107
+                     <el-table-column
108
+                       prop="name"
109
+                      label="生产厂家"
110
+                      align="center">
111
+                      <template slot-scope="scope">
112
+                        {{getManufacturName(scope.row.manufacturer)}}
113
+                      </template>
114
+                     </el-table-column>
115
+                      <el-table-column
116
+                       prop="name"
117
+                      label="规格&单位"
118
+                      align="center">
119
+                      <template slot-scope="scope">
120
+                        {{scope.row.drug.dose}}{{scope.row.drug.dose_unit}} * {{scope.row.drug.min_number}}{{scope.row.drug.min_unit}}/{{scope.row.drug.max_unit}}
121
+                      </template>
122
+                     </el-table-column>
123
+                      <el-table-column
124
+                       prop="name"
125
+                      label="数量"
126
+                      align="center">
127
+                      <template slot-scope="scope">
128
+                        {{scope.row.count}}
129
+                      </template>
130
+                     </el-table-column>
131
+
132
+                     </el-table>
133
+                      <el-pagination
134
+                        @size-change="handleSizeChange"
135
+                        @current-change="handleCurrentChange"
136
+                        :page-sizes="[10, 50, 100,200,500,1000]"
137
+                        :page-size="10"
138
+                        background
139
+                        align="right"
140
+                        style="margin-top:20px;"
141
+                        layout="total, sizes, prev, pager, next, jumper"
142
+                        :total="total"
143
+                        >
144
+                      </el-pagination>
145
+                    </el-tab-pane>
146
+                   </el-tabs>
147
+                </div>
148
+             </el-main>
149
+          </el-container>
150
+        </el-container>
151
+      </el-container>
152
+      </div>
153
+    </div>
154
+
155
+</template>
156
+<script>
157
+import { getGoodPatientList,getDrugWarehouseOutDetailByPatientId } from "@/api/drug/drug"
158
+export default {
159
+  data(){
160
+    return{
161
+      zoneList:[],
162
+      zone_id:0,
163
+      tableData:[],
164
+      DeviceTypeType:[],
165
+      device_type:"",
166
+      forms:{},
167
+      start_time:"",
168
+      end_time:"",
169
+      patientList:[],
170
+      tableList:[],
171
+      keyword:"",
172
+      manufacturerList:[],
173
+      patient_id:0,
174
+      patient:{},
175
+      limit:10,
176
+      page:1,
177
+      total:0,
178
+    }
179
+  },
180
+  methods:{
181
+    handleSizeChange(val) {
182
+      this.limit = val;
183
+      this.getDrugWarehouseOutDetailByPatientId()
184
+    },
185
+    handleCurrentChange(val) {
186
+      this.page = val;
187
+      this.getDrugWarehouseOutDetailByPatientId()
188
+    },
189
+    startTimeChange(){
190
+      this.handleCurrentChange(this.patient)
191
+    },
192
+    endTimeChange(){
193
+      this.handleCurrentChange(this.patient)
194
+    },
195
+    getlist(){
196
+        var params = {
197
+          keyword:this.keyword,
198
+        }
199
+      getGoodPatientList(params).then(response=>{
200
+        if(response.data.state == 1){
201
+          var list = response.data.data.list
202
+          this.patientList = list
203
+          this.$refs.singleTable.setCurrentRow(this.patientList[0]);
204
+          this.handleCurrentChange(this.patientList[0])
205
+        }
206
+      })
207
+    },
208
+   onSearch(){
209
+     this.getlist()
210
+   },
211
+   handleCurrentChange(val){
212
+       this.patient = val
213
+       var params = {
214
+         patient_id:val.id,
215
+         start_time:this.start_time,
216
+         end_time:this.end_time,
217
+         limit:this.limit,
218
+         page:this.page,
219
+       }
220
+     getDrugWarehouseOutDetailByPatientId(params).then(response=>{
221
+        if(response.data.state == 1){
222
+          var list = response.data.data.list
223
+          this.manufacturerList = response.data.data.manufacturerList
224
+          this.tableList = list
225
+          this.total = response.data.data.total
226
+        }
227
+     })
228
+   },
229
+   getDrugWarehouseOutDetailByPatientId(){
230
+      var params = {
231
+         patient_id:this.patient,
232
+         start_time:this.start_time,
233
+         end_time:this.end_time,
234
+         limit:this.limit,
235
+         page:this.page,
236
+       }
237
+     getDrugWarehouseOutDetailByPatientId(params).then(response=>{
238
+        if(response.data.state == 1){
239
+          var list = response.data.data.list
240
+          this.manufacturerList = response.data.data.manufacturerList
241
+          this.tableList = list
242
+        }
243
+     })
244
+   },
245
+   getManufacturName(id){
246
+     var manufacturer_name = ""
247
+     for(let i=0;i<this.manufacturerList.length;i++){
248
+        if(id == this.manufacturerList[i].id){
249
+          manufacturer_name = this.manufacturerList[i].manufacturer_name
250
+        } 
251
+     }
252
+     return manufacturer_name
253
+   }
254
+  },
255
+  created(){
256
+    var nowDate = new Date();
257
+    var nowYear = nowDate.getFullYear();
258
+    var nowMonth = nowDate.getMonth() + 1;
259
+    var nowDay = nowDate.getDate();
260
+    this.end_time =
261
+      nowYear +
262
+      "-" +
263
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
264
+      "-" +
265
+      (nowDay < 10 ? "0" + nowDay : nowDay);
266
+    nowDate.setMonth(nowDate.getMonth() - 1);
267
+    nowYear = nowDate.getFullYear();
268
+    nowMonth = nowDate.getMonth() + 1;
269
+    nowDay = nowDate.getDate();
270
+    this.start_time =
271
+      nowYear +
272
+      "-" +
273
+      (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
274
+      "-" +
275
+      (nowDay < 10 ? "0" + nowDay : nowDay);
276
+     this.getlist()
277
+  },
278
+  
279
+}
280
+</script>
281
+
282
+
283
+   
284
+<style lang="scss" scoped>
285
+    .zone{
286
+      //  margin-left: 30px;
287
+      //  text-align: left;
288
+       width: 70px;
289
+       display: inline-block;
290
+       color:#606266;
291
+    }
292
+    .disinfect{
293
+      position: relative;
294
+      .newButton{
295
+        // position: absolute;
296
+        // right: 2%;
297
+        // top:4px;
298
+        // z-index: 9;
299
+        margin-bottom: 10px;
300
+    margin-left: 90%;
301
+      }
302
+    }
303
+    .disinfectOne{
304
+      position: relative;
305
+      .newButtonOne{
306
+        position: absolute;
307
+         right: 0;
308
+         top: -10;
309
+         z-index: 18;
310
+      }
311
+    }
312
+    .but{
313
+      width: 200px;
314
+      height: 50px;
315
+      // border: solid 1px red;
316
+      margin-left: 77%;
317
+    }
318
+    .clearn{
319
+      width: 460px;
320
+      height: 50px;
321
+      // border:solid 1px red;
322
+      margin-left:650px;
323
+    }
324
+
325
+  .zClass{
326
+    width: 200px;
327
+    height: 200px;
328
+    // border:solid 1px red;
329
+    margin-left: 450px;
330
+    margin-top: 200px;
331
+  }
332
+  .warn{
333
+    color: red;
334
+    font-size: 14px;
335
+    width: 100%;
336
+    display: inline-block;
337
+    margin-left: 96px;
338
+  }
339
+
340
+  .userbutton{
341
+       margin-bottom: 10px;
342
+    margin-left: 82%
343
+  }
344
+
345
+</style>
346
+<style lang="scss">
347
+   .a{
348
+     margin-bottom: 10px;
349
+      margin-top: 6px;
350
+
351
+   }
352
+
353
+   .b{
354
+    .el-button{
355
+      margin-left: 90%;
356
+      margin-bottom: 10px;
357
+    }
358
+   }
359
+
360
+   .stoppage{
361
+     .el-form-item__label{
362
+       width:190px;
363
+     }
364
+   }
365
+   .st{
366
+     .el-form-item__label{
367
+       width:-10px;
368
+     }
369
+   }
370
+   .main{
371
+     position: relative;
372
+     .newButtonOne{
373
+       position:absolute;
374
+       right: 0;
375
+       z-index: 2;
376
+     }
377
+   }
378
+
379
+    .elbutton{
380
+      // border: solid 1px red;
381
+      height: 50px;
382
+      width: 400px;
383
+      margin-left: 650px;
384
+    }
385
+  // .el-form-item__label {
386
+  //   width: 130px;
387
+  //   font-size: 14px;
388
+  // }
389
+  .el-form-item__error {
390
+    margin-left: 130px;
391
+  }
392
+
393
+ .el-upload-list__item-name {
394
+    color: #606266;
395
+    display: block;
396
+    margin-right: 40px;
397
+    overflow: hidden;
398
+    padding-left: 4px;
399
+    text-overflow: ellipsis;
400
+    transition: color .3s;
401
+    white-space: nowrap;
402
+}
403
+.el-main{
404
+  padding-top: 0px;
405
+}
406
+.newMain{
407
+  .el-form-item__label{
408
+    width: 104px;
409
+  }
410
+}
411
+.newDisinfectOne{
412
+  .el-input--prefix .el-input__inner{
413
+    padding-left: 15px
414
+  }
415
+}
416
+.stoppage{
417
+  .el-form-item__label{
418
+    width: 18%;
419
+  }
420
+}
421
+.newItem{
422
+  .el-form-item__label{
423
+    width: 130px;
424
+  }
425
+}
426
+.formItem{
427
+  .el-form-item__label{
428
+    width: 104px;
429
+    line-height: 30px;
430
+  }
431
+}
432
+.newname{
433
+  .el-form-item__label{
434
+    width: 60px;
435
+  }
436
+}
437
+::-webkit-scrollbar{
438
+  height: 20px;
439
+}
440
+</style>

+ 0 - 0
src/xt_pages/stock/drugs/components/drugQuery.vue Datei anzeigen


+ 532 - 0
src/xt_pages/stock/drugs/components/expiryDateDrugQuery.vue Datei anzeigen

@@ -0,0 +1,532 @@
1
+<template>
2
+  <div class="main-contain">
3
+     <div class="app-container ">
4
+        <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
5
+         <div>
6
+          <span>有效期:</span>
7
+          <el-select v-model="expiry_type" style="width:200px;margin-right:10px;" placeholder="请选择"
8
+            filterable
9
+            @change="changeExpriyList">
10
+              <el-option
11
+                v-for="item in expriyList"
12
+                :key="item.id"
13
+                :label="item.name"
14
+                :value="item.id">
15
+              </el-option>
16
+          </el-select>
17
+          <span>仓库名称:</span>
18
+          <el-select v-model="storehouse_id" style="width:200px;margin-right:10px;" placeholder="请选择"
19
+          filterable
20
+           @change="changeStorehouseName">
21
+            <el-option
22
+              v-for="item in houseList"
23
+              :key="item.id"
24
+              :label="item.storehouse_name"
25
+              :value="item.id">
26
+            </el-option>
27
+          </el-select>
28
+          <el-input v-model="keyword" style="width:200px" placeholder="请输入药品名称或生产厂商" ></el-input>
29
+          <el-button  type="primary" icon="el-icon-search" @click="seach">搜索</el-button>
30
+         </div>
31
+        </div>
32
+           <el-table
33
+            :row-style="{ color: '#303133' }"
34
+            :header-cell-style="{
35
+              backgroundColor: 'rgb(245, 247, 250)',
36
+              color: '#606266'
37
+            }"
38
+            :data="tableList"
39
+            :class="signAndWeighBoxPatients"
40
+            border
41
+          >
42
+            <el-table-column label="药品类型" align="center">
43
+              <template slot-scope="scope">
44
+                 {{getDrugTypeName(scope.row.XtBaseDrug.drug_type)}}
45
+              </template>
46
+            </el-table-column>
47
+            <el-table-column label="药品名称" align="center">
48
+              <template slot-scope="scope">
49
+                 {{scope.row.XtBaseDrug.drug_name}}
50
+              </template>
51
+            </el-table-column>
52
+            <el-table-column label="规格&单位" align="center">
53
+                <template slot-scope="scope">
54
+                   {{scope.row.XtBaseDrug.dose}}{{scope.row.XtBaseDrug.dose_unit}}*{{scope.row.XtBaseDrug.min_number}}{{scope.row.XtBaseDrug.min_unit}}/{{scope.row.XtBaseDrug.max_unit}}
55
+                </template>
56
+            </el-table-column>
57
+            <el-table-column label="生产厂商" align="center">
58
+              <template slot-scope="scope">
59
+                 {{getManufacturName(scope.row.manufacturer)}}
60
+              </template>
61
+            </el-table-column>
62
+            <el-table-column label="进货价" align="center">
63
+              <template slot-scope="scope">
64
+                 {{scope.row.price}}
65
+              </template>
66
+            </el-table-column>
67
+            <el-table-column label="库存" align="center">
68
+              <template slot-scope="scope">
69
+                 {{scope.row.stock_max_number}}{{scope.row.XtBaseDrug.max_unit}}{{scope.row.stock_min_number}}{{scope.row.XtBaseDrug.min_unit}}
70
+              </template>
71
+            </el-table-column>
72
+        
73
+            <el-table-column label="批号" align="center">
74
+              <template slot-scope="scope">
75
+                 {{scope.row.batch_number}}
76
+               </template>
77
+            </el-table-column>
78
+          
79
+            <el-table-column label="有效期" align="center">
80
+              <template slot-scope="scope">
81
+                {{getTime(scope.row.expiry_date)}}
82
+             </template>
83
+            </el-table-column>
84
+
85
+            <el-table-column label="剩余天数" align="center">
86
+              <template slot-scope="scope">
87
+                {{getDaysBetween(getTime(scope.row.expiry_date),getTime(nowtime))}}
88
+              </template>
89
+            </el-table-column>
90
+          </el-table>
91
+           <el-pagination
92
+            @size-change="handleSizeChange"
93
+            @current-change="handleCurrentChange"
94
+            :page-sizes="[10, 50, 100,200,500,1000]"
95
+            :page-size="10"
96
+            background
97
+            align="right"
98
+            style="margin-top:20px;"
99
+            layout="total, sizes, prev, pager, next, jumper"
100
+            :total="total"
101
+          >
102
+            </el-pagination>
103
+     </div>
104
+
105
+
106
+
107
+   
108
+
109
+  </div>
110
+</template>
111
+<script>
112
+import { getStorehouseList,getDrugExpiryDateQuery } from "@/api/drug/drug"
113
+import {
114
+  getStockDrugCount
115
+} from "@/api/stock";
116
+import { uParseTime } from '@/utils/tools'
117
+import moment from 'moment';
118
+export default {
119
+
120
+  data(){
121
+    return{
122
+     tableList:[],
123
+     goodList:[
124
+      {id:1,name:"全部耗材"},
125
+      {id:2,name:"库存预警"},
126
+     ],
127
+     houseList:[],
128
+     storehouse_id:0,
129
+     good_type:1,
130
+     multipleSelection: [],
131
+     signAndWeighBoxPatients: "sign-and-weigh-box-patients",
132
+     manufacturerList:[],
133
+     limit:10,
134
+     page:1,
135
+     total:0,
136
+     limitone:10,
137
+     pageone:1,
138
+     totalone:0,
139
+     keyword:"",
140
+     goodTypeList:[],
141
+     start_time:"",
142
+     end_time:"",
143
+     countList:[],
144
+     outCountList:[],
145
+     autoCountList:[],
146
+     cancelCountList:[],
147
+     org_id:this.$store.getters.xt_user.org_id,
148
+     dialogVisible:false,
149
+     start_first_time:"",
150
+     end_first_time:"",
151
+     tableData:[],
152
+     good_id:0,
153
+     patientList:[],
154
+     good_name:"",
155
+     specification_name:"",
156
+     expiry_type:0,
157
+     expriyList:[
158
+      {id:0,name:"全部"},
159
+      {id:1,name:"已过期"},
160
+      {id:2,name:"30天内过期"},
161
+      {id:3,name:"90天内过期"},
162
+      {id:4,name:"180天内过期"},
163
+      {id:5,name:"1年内过期"},
164
+     ],
165
+     nowtime:0,
166
+     start_time:"",
167
+     drugTypeList:[],
168
+    }
169
+  
170
+  },
171
+  methods:{
172
+    changeStorehouseName(){
173
+      this.getlist()
174
+    },
175
+    changeGoodName(){
176
+
177
+    },
178
+    getStorehouseList(){
179
+      getStorehouseList().then(response=>{
180
+         if(response.data.state == 1){
181
+           var houseList = response.data.data.list
182
+           var obj = {id:0,storehouse_name:"全部"}
183
+           this.houseList.push(obj)
184
+           for(let i=0;i<houseList.length;i++){
185
+             this.houseList.push(houseList[i])
186
+           }
187
+           this.manufacturerList = response.data.data.manufacturerList
188
+           this.goodTypeList = response.data.data.goodTypeList
189
+           this.patientList = response.data.data.patientList
190
+         }
191
+      })
192
+    },
193
+    getlist(){
194
+        var params = {
195
+          storehouse_id:this.storehouse_id,
196
+          expiry_type:this.expiry_type,
197
+          keyword:this.keyword,
198
+          page:this.page,
199
+          limit:this.limit,
200
+          start_time:this.start_time,
201
+        }
202
+      getDrugExpiryDateQuery(params).then(response=>{
203
+         if(response.data.state == 1){
204
+            var list = response.data.data.list
205
+            this.tableList = list
206
+            var manufacturerList = response.data.data.manufacturerList
207
+            this.manufacturerList = manufacturerList
208
+            this.total = response.data.data.total
209
+            this.nowtime = response.data.data.nowtime
210
+            this.drugTypeList =  response.data.data.drugTypeList
211
+         }
212
+      })
213
+    },
214
+    getManufacturName(id){
215
+      var manufacturer_name = ""
216
+      for(let i=0;i<this.manufacturerList.length;i++){
217
+        if(id == this.manufacturerList[i].id){
218
+           manufacturer_name = this.manufacturerList[i].manufacturer_name
219
+        }
220
+      }
221
+      return manufacturer_name
222
+    },
223
+    handleSizeChange(val) {
224
+      this.limit = val;
225
+      this.getlist()
226
+    },
227
+    handleCurrentChange(val) {
228
+      this.page = val;
229
+      this.getlist()
230
+    },
231
+    handleSizeChangeOne(val) {
232
+      this.limitone = val;
233
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
234
+    },
235
+    handleCurrentChangeOne(val) {
236
+      this.pageone = val;
237
+      this.toDialogClick(this.good_id,this.good_name,this.specification_name)
238
+    },
239
+   seach(){
240
+    this.getlist()
241
+   },
242
+   getDrugTypeName(id){
243
+     var name = ""
244
+     for(let i=0;i<this.drugTypeList.length;i++){
245
+       if(id == this.drugTypeList[i].value){
246
+         name = this.drugTypeList[i].name
247
+       }
248
+     }
249
+     return name
250
+   },
251
+   getHouseName(id){
252
+     var storehouse_name = ""
253
+     for(let i=0;i<this.houseList.length;i++){
254
+       if(id == this.houseList[i].id){
255
+         storehouse_name = this.houseList[i].storehouse_name
256
+       }
257
+     }
258
+     return storehouse_name
259
+   },
260
+   getWareInfoCount(val,storehouse_id){
261
+     var count = 0
262
+     if(val.length > 0){
263
+       for(let i=0;i<val.length;i++){
264
+         if(val[i].storehouse_id == storehouse_id){
265
+             count +=val[i].warehousing_count
266
+         }
267
+       }
268
+     }
269
+     if(count > 0){
270
+       return count
271
+     }else{
272
+       return ""
273
+     }
274
+   },
275
+   getStockDrugCount(){
276
+        var params ={
277
+           keywords: this.keywords,
278
+           start_time:this.start_time,
279
+           end_time:this.end_time,
280
+        }
281
+      getStockDrugCount(params).then(response=>{
282
+         if(response.data.state == 1){
283
+           var outlist = response.data.data.outList
284
+           this.outCountList = outlist
285
+           var autoCount = response.data.data.autoCount
286
+           this.autoCountList = autoCount
287
+           var totalCount = response.data.data.totalCount
288
+           this.cancelCountList = totalCount
289
+         }
290
+      })
291
+    },
292
+    getWareInfoCountOne(val,storehouse_id){
293
+     var count = 0
294
+     if(val.length > 0){
295
+       for(let i=0;i<val.length;i++){
296
+         if(val[i].storehouse_id == storehouse_id){
297
+             count +=val[i].stock_count
298
+         }
299
+       }
300
+     }
301
+     if(count > 0){
302
+       return count
303
+     }else{
304
+       return ""
305
+     }
306
+   },
307
+   getOutCount(id){
308
+      var count = 0
309
+      for(let i=0;i<this.outCountList.length;i++){
310
+         if(id == this.outCountList[i].good_id){
311
+           count = this.outCountList[i].count
312
+         }
313
+      }
314
+     return count
315
+   },
316
+   getAutoCount(id){
317
+     var count= 0
318
+     for(let i=0;i<this.autoCountList.length;i++){
319
+       if(id == this.autoCountList[i].good_id){
320
+         count = this.autoCountList[i].count
321
+       }
322
+     }
323
+     return count
324
+   },
325
+   getCancelCount(id){
326
+     var count = 0
327
+     for(let i=0;i<this.cancelCountList.length;i++){
328
+       if(id == this.cancelCountList[i].good_id){
329
+          count = this.cancelCountList[i].count
330
+       }
331
+     }
332
+     return count
333
+   },
334
+   getCancelCountInfo(cancel_stock_info,storehouse_id){
335
+     var count = 0 
336
+     if(cancel_stock_info.length >0){
337
+        for(let i=0;i<cancel_stock_info.length;i++){
338
+          if(storehouse_id ==  cancel_stock_info[i].storehouse_id){
339
+              count += cancel_stock_info[i].count
340
+          }
341
+        }
342
+     }
343
+     return count
344
+   },
345
+   getWareOutInfoCount(warehouse_out_info,storehouse_id){
346
+     var count = 0
347
+     if(warehouse_out_info.length > 0){
348
+       for(let i=0;i<warehouse_out_info.length;i++){
349
+         if(storehouse_id == warehouse_out_info[i].storehouse_id){
350
+            count +=warehouse_out_info[i].count
351
+         }
352
+       }
353
+     }
354
+     return count
355
+   },
356
+   getInCount(id){
357
+      var count= 0
358
+     for(let i=0;i<this.countList.length;i++){
359
+      if(id == this.countList[i].good_id){
360
+          count = this.countList[i].count
361
+      }
362
+     }
363
+     return count
364
+    },
365
+    getOutCount(id){
366
+      var count = 0
367
+      for(let i=0;i<this.outCountList.length;i++){
368
+         if(id == this.outCountList[i].good_id){
369
+           count = this.outCountList[i].count
370
+         }
371
+      }
372
+     return count
373
+   },
374
+   getAutoCount(id){
375
+     var count= 0
376
+     for(let i=0;i<this.autoCountList.length;i++){
377
+       if(id == this.autoCountList[i].good_id){
378
+         count = this.autoCountList[i].count
379
+       }
380
+     }
381
+     return count
382
+   },
383
+   getCancelCount(id){
384
+     var count = 0
385
+     for(let i=0;i<this.cancelCountList.length;i++){
386
+       if(id == this.cancelCountList[i].good_id){
387
+          count = this.cancelCountList[i].count
388
+       }
389
+     }
390
+     return count
391
+   },
392
+   getStockCount(id){
393
+     var stock_count = 0
394
+     for(let i=0;i<this.countList.length;i++){
395
+       if(id == this.countList[i].good_id){
396
+         stock_count = this.countList[i].stock_count
397
+       }
398
+     }
399
+     return stock_count
400
+   },
401
+   getWareInfo(arr){
402
+     var total = 0
403
+     if(arr.length > 0){
404
+       for(let i=0;i<arr.length;i++){
405
+         total += parseInt(arr[i].warehousing_count)
406
+       }
407
+     }else{
408
+       total = ""
409
+     }
410
+     return total
411
+   },
412
+   getOverplus(arr){
413
+     var total = 0
414
+     if(arr.length > 0){
415
+      for(let i=0;i<arr.length;i++){
416
+        total += arr[i].stock_count
417
+      }
418
+     }else{
419
+       total = ""
420
+     }
421
+     return total
422
+   },
423
+   getCancelInfo(arr){
424
+     var total = 0
425
+     if(arr.length > 0){
426
+      for(let i=0;i<arr.length;i++){
427
+        total += arr[i].count
428
+      }
429
+     }else{
430
+       total = ""
431
+     }
432
+     return total
433
+   },
434
+   getOverFlushInfo(arr){
435
+     var total = 0
436
+     if(arr.length >0){
437
+      for(let i=0;i<arr.length;i++){
438
+        total += arr[i].stock_count
439
+      }
440
+     }
441
+     return total
442
+   },
443
+   startFirstTimeChange(){
444
+    
445
+   },
446
+   endEndTimeChange(){
447
+
448
+   },
449
+  getTime(val) {
450
+    if(val < 0){
451
+      return ""
452
+    }
453
+   if(val == ""){
454
+     return ""
455
+   }else {
456
+    return uParseTime(val, '{y}-{m}-{d}')
457
+   }
458
+   },
459
+  getName(id){
460
+    var name = ""
461
+    for(let i=0;i<this.patientList.length;i++){
462
+      if(id == this.patientList[i].id){
463
+        name = this.patientList[i].name
464
+      }
465
+    }
466
+    return name
467
+  },
468
+  getDaysBetween(dateString1, dateString2) {
469
+    let startDate = Date.parse(dateString1);
470
+    let endDate = Date.parse(dateString2);
471
+    return (startDate - endDate ) / (1 * 24 * 60 * 60 * 1000);
472
+  },
473
+  changeExpriyList(val){
474
+   
475
+    if(val ==0){
476
+     this.start_time = ""
477
+     this.getlist()
478
+    }
479
+    //已过期
480
+    if(val == 1){
481
+      this.getlist()
482
+    }
483
+    //30天内过期
484
+    if(val == 2){
485
+      var time = this.addDate(this.getTime(this.nowtime),30)
486
+      this.start_time = time
487
+      this.getlist()
488
+    }
489
+    //90天内过期
490
+    if(val == 3){
491
+       var time = this.addDate(this.getTime(this.nowtime),90)
492
+      this.start_time = time
493
+      this.getlist()
494
+    }
495
+    //180天内过期
496
+    if(val == 4){
497
+       var time = this.addDate(this.getTime(this.nowtime),180)
498
+       this.start_time = time
499
+    }
500
+    //1年以后
501
+    if(val == 5){
502
+       var time = this.addDate(this.getTime(this.nowtime),365)
503
+       this.start_time = time
504
+       this.getlist()
505
+    }
506
+  
507
+  },
508
+  addDate(date, days) {
509
+    var date = new Date(date);
510
+    date.setDate(date.getDate() + days);
511
+    var year = date.getFullYear();
512
+    var month = date.getMonth() + 1;
513
+    var day = date.getDate();
514
+    var mm = "'" + month + "'";
515
+    var dd = "'" + day + "'";
516
+    if(mm.length == 3) {
517
+      month = "0" + month;
518
+    }
519
+    if(dd.length == 3) {
520
+      day = "0" + day;
521
+    }
522
+    var time = year + "-" + month + "-" + day
523
+    return time;
524
+  },
525
+  },
526
+  created(){
527
+    this.getStorehouseList()
528
+    this.getlist()
529
+  }
530
+}
531
+</script>
532
+

+ 0 - 0
src/xt_pages/stock/drugs/components/purchaseDrugQuery.vue Datei anzeigen


+ 135 - 0
src/xt_pages/stock/drugs/drugNewQuery.vue Datei anzeigen

@@ -0,0 +1,135 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+     
6
+    </div>
7
+     <div class="app-container ">
8
+        <el-tabs v-model="activeName" @tab-click="handleClick">
9
+            <el-tab-pane label="库存查询" name="first">
10
+              <DrugQuery></DrugQuery>
11
+            </el-tab-pane>
12
+            <el-tab-pane label="进销存查询" name="second">
13
+               <PurchaseDrugQuery></PurchaseDrugQuery>
14
+           </el-tab-pane>
15
+            <el-tab-pane label="有效期查询" name="third">
16
+                <ExpiryDateDrugQuery></ExpiryDateDrugQuery>
17
+            </el-tab-pane>
18
+            <el-tab-pane label="患者查询" name="fourth">
19
+                <DrugPatientQuery></DrugPatientQuery>
20
+            </el-tab-pane>
21
+        </el-tabs>
22
+     </div>
23
+  </div>
24
+</template>
25
+
26
+<script>
27
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
28
+import DrugQuery from "@/xt_pages/stock/drugs/components/drugQuery"
29
+import ExpiryDateDrugQuery from "@/xt_pages/stock/drugs/components/expiryDateDrugQuery"
30
+import PurchaseDrugQuery from "@/xt_pages/stock/drugs/components/purchaseDrugQuery"
31
+import DrugPatientQuery from "@/xt_pages/stock/drugs/components/drugPatientQuery"
32
+export default {
33
+  name: "stockNewQuery",
34
+  
35
+  components: {
36
+    BreadCrumb,
37
+    DrugQuery,
38
+    ExpiryDateDrugQuery,
39
+    PurchaseDrugQuery,
40
+    DrugPatientQuery
41
+  },
42
+  data() {
43
+    return {
44
+      crumbs: [
45
+        { path: false, name: "库存管理" },
46
+        { path: "/stock/query", name: "库存查询" }
47
+      ],
48
+      multipleSelection: [],
49
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
50
+      activeName: 'first'
51
+    };
52
+  },
53
+  methods:{
54
+    handleClick(){
55
+        
56
+    }
57
+  }
58
+};
59
+</script>
60
+
61
+<style rel="stylesheet/css" lang="scss" scoped>
62
+.information {
63
+  border: 1px #dcdfe6 solid;
64
+  padding: 30px 20px 30px 20px;
65
+
66
+  .border {
67
+    border-bottom: 1px #dcdfe6 solid;
68
+    margin: 0px 0 20px 0;
69
+  }
70
+}
71
+
72
+.title {
73
+  background: #409eff;
74
+  height: 44px;
75
+  line-height: 44px;
76
+  padding: 0 0 0 10px;
77
+  color: #fff;
78
+  margin: 0 0 10px 0;
79
+}
80
+
81
+.edit_separater {
82
+  border-top: 1px solid rgb(233, 233, 233);
83
+  margin-top: 15px;
84
+  margin-bottom: 15px;
85
+}
86
+</style>
87
+
88
+<style>
89
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
90
+  font-size: 12px;
91
+}
92
+
93
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
94
+  background: #6fb5fa;
95
+}
96
+
97
+.count {
98
+  color: #bd2c00;
99
+}
100
+.el-table td,
101
+.el-table th.is-leaf,
102
+.el-table--border,
103
+.el-table--group {
104
+  border-color: #d0d3da;
105
+}
106
+.el-table--border::after,
107
+.el-table--group::after,
108
+.el-table::before {
109
+  background-color: #d0d3da;
110
+}
111
+
112
+/* 合并表格线样式 */
113
+
114
+.spanClass .cell {
115
+  padding: 0 !important;
116
+}
117
+
118
+.spanClass .cell tr {
119
+  display: inline-block;
120
+  width: 100%;
121
+  /* height: 44px; */
122
+}
123
+
124
+.spanClass .cell tr td {
125
+  padding: 10px 0;
126
+  border-bottom: 1px solid #ebeef5;
127
+  display: block;
128
+  width: 100%;
129
+  min-height: 44px;
130
+}
131
+.spanClass .cell tr:last-of-type td{
132
+  border-bottom: none;
133
+}
134
+
135
+</style>

+ 41 - 0
src/xt_pages/stock/query/patientQuery.vue Datei anzeigen

@@ -130,6 +130,18 @@
130 130
                      </el-table-column>
131 131
 
132 132
                      </el-table>
133
+                      <el-pagination
134
+                        @size-change="handleSizeChange"
135
+                        @current-change="handleCurrentChange"
136
+                        :page-sizes="[10, 50, 100,200,500,1000]"
137
+                        :page-size="10"
138
+                        background
139
+                        align="right"
140
+                        style="margin-top:20px;"
141
+                        layout="total, sizes, prev, pager, next, jumper"
142
+                        :total="total"
143
+                        >
144
+                      </el-pagination>
133 145
                     </el-tab-pane>
134 146
                    </el-tabs>
135 147
                 </div>
@@ -160,9 +172,20 @@ export default {
160 172
       manufacturerList:[],
161 173
       patient_id:0,
162 174
       patient:{},
175
+      limit:10,
176
+      page:1,
177
+      total:0,
163 178
     }
164 179
   },
165 180
   methods:{
181
+   handleSizeChange(val) {
182
+      this.limit = val;
183
+      this.getWarehouseOutDetailByPatientId()
184
+    },
185
+    handleCurrentChange(val) {
186
+      this.page = val;
187
+      this.getWarehouseOutDetailByPatientId()
188
+    },
166 189
     startTimeChange(){
167 190
       this.handleCurrentChange(this.patient)
168 191
     },
@@ -191,15 +214,33 @@ export default {
191 214
          patient_id:val.id,
192 215
          start_time:this.start_time,
193 216
          end_time:this.end_time,
217
+         limit:this.limit,
218
+         page:this.page
194 219
        }
195 220
      getWarehouseOutDetailByPatientId(params).then(response=>{
196 221
         if(response.data.state == 1){
197 222
           var list = response.data.data.list
223
+          this.total = response.data.data.total
198 224
           this.manufacturerList = response.data.data.manufacturerList
199 225
           this.tableList = list
200 226
         }
201 227
      })
202 228
    },
229
+   getWarehouseOutDetailByPatientId(){
230
+     var params = {
231
+        patient_id:this.patient,
232
+        start_time:this.start_time,
233
+        end_time:this.end_time,
234
+      }
235
+    getWarehouseOutDetailByPatientId().then(response=>{
236
+       if(response.data.state == 1){
237
+        var list = response.data.data.list
238
+        this.total = response.data.data.total
239
+        this.manufacturerList = response.data.data.manufacturerList
240
+        this.tableList = list
241
+       }
242
+    })
243
+   },
203 244
    getManufacturName(id){
204 245
      var manufacturer_name = ""
205 246
      for(let i=0;i<this.manufacturerList.length;i++){

+ 60 - 10
src/xt_pages/user/components/EditGroupAdvice.vue Datei anzeigen

@@ -196,6 +196,17 @@
196 196
                   >
197 197
                 </template>
198 198
               </el-table-column>
199
+
200
+              <el-table-column
201
+                label="推送截止日期"
202
+                min-width="80"
203
+                property="execution_frequency"
204
+                align="center"
205
+              >
206
+               <template slot-scope="scope">
207
+                 {{scope.row.push_start_time}}
208
+                </template>
209
+              </el-table-column>
199 210
             </el-table>
200 211
           </el-col>
201 212
         </el-row>
@@ -559,6 +570,19 @@
559 570
               </el-checkbox-group>
560 571
             </el-form-item>
561 572
           </el-col>
573
+
574
+          <el-col :span="24">
575
+             <el-form-item label="推送截止日期:">
576
+                 <el-date-picker
577
+                   v-model="nameForm.push_start_time"
578
+                   type="date"
579
+                   format="yyyy-MM-dd"
580
+                   value-format="yyyy-MM-dd"
581
+                  :picker-options="pickerOptionsOne"
582
+                  placeholder="推送截止日期">
583
+                 </el-date-picker>
584
+              </el-form-item>
585
+          </el-col>
562 586
         </el-row>
563 587
       </el-form>
564 588
       <div slot="footer" class="dialog-footer">
@@ -586,10 +610,17 @@ import {
586 610
   StopDoctorAdvice
587 611
 } from "@/api/advice";
588 612
 import { getSelfMedicalList,getDrugDescByDrugName } from "@/api/drug/drug"
613
+import { uParseTime } from "@/utils/tools";
589 614
 export default {
590 615
   name: "EditGroupAdvice",
591 616
   data() {
592 617
     return {
618
+      pickerOptionsOne: {
619
+      // 限制收货时间不让选择今天以前的
620
+      disabledDate(time) {
621
+        return time.getTime() < Date.now() - 8.64e7;
622
+      },
623
+      },
593 624
       weeks: [],
594 625
       editRowKey: 0,
595 626
       templateFormVisible: false,
@@ -632,7 +663,8 @@ export default {
632 663
         way:0,
633 664
         drug_id:0,
634 665
         src_type:"",
635
-        drug_name_id:0
666
+        drug_name_id:0,
667
+        push_start_time:"",
636 668
       },
637 669
 
638 670
       drugOptions: [],
@@ -898,11 +930,11 @@ export default {
898 930
                 groupno: _this.groupForm.groupno,
899 931
                 frequency_type: _this.nameForm.frequency_type,
900 932
                 day_count: _this.nameForm.day_count.toString(),
901
-                week_days: this.weeks
902
-                  .filter(function(s) {
933
+                week_days: this.weeks.filter(function(s) {
903 934
                     return s && s.trim();
904
-                  })
905
-                  .join(",")
935
+                  }).join(","),
936
+                push_start_time: _this.nameForm.push_start_time,
937
+                
906 938
               };
907 939
             } else {
908 940
               submitForm = {
@@ -931,6 +963,7 @@ export default {
931 963
                 frequency_type: 0,
932 964
                 day_count: "0",
933 965
                 week_days: "",
966
+                push_start_time:_this.nameForm.push_start_time
934 967
 
935 968
               };
936 969
             }
@@ -991,9 +1024,10 @@ export default {
991 1024
                     _this.adviceTableData[index].frequency_type = advice.frequency_type;
992 1025
                     _this.adviceTableData[index].day_count = advice.day_count;
993 1026
                     _this.adviceTableData[index].week_day = advice.week_day;
994
-                    _this.adviceTableData[index].way = advice.way,
995
-                    _this.adviceTableData[index].drug_id = advice.drug_id,
1027
+                    _this.adviceTableData[index].way = advice.way
1028
+                    _this.adviceTableData[index].drug_id = advice.drug_id
996 1029
                     _this.adviceTableData[index].drug_name_id = advice.drug_name_id
1030
+                    _this.adviceTableData[index].push_start_time = advice.push_start_time
997 1031
                     break;
998 1032
                   }
999 1033
                 }
@@ -1024,6 +1058,7 @@ export default {
1024 1058
                           _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way
1025 1059
                           _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id
1026 1060
                           _this.groupForm.adviceNames[index].children[j].drug_name_id = _this.nameForm.drug_name_id
1061
+                          _this.groupForm.adviceNames[index].children[j].push_start_time = _this.nameForm.push_start_time
1027 1062
                           _this.$set(
1028 1063
                             _this.groupForm.adviceNames[index].children,
1029 1064
                             j,
@@ -1053,6 +1088,7 @@ export default {
1053 1088
                       _this.groupForm.adviceNames[index].way = _this.nameForm.way
1054 1089
                       _this.groupForm.adviceNames[index].day_count = _this.nameForm.day_count;
1055 1090
                       _this.groupForm.adviceNames[index].week_day = _this.weeks.join(",");
1091
+                       _this.groupForm.adviceNames[index].push_start_time = _this.nameForm.push_start_time;
1056 1092
                       console.log(_this.weeks);
1057 1093
                       _this.$set(
1058 1094
                         _this.groupForm.adviceNames,
@@ -1091,7 +1127,7 @@ export default {
1091 1127
                 remark: _this.groupForm.remark,
1092 1128
                 parent_id: _this.groupSelectRow.id,
1093 1129
                 groupno: _this.groupForm.groupno,
1094
-
1130
+                push_start_time:_this.groupForm.push_start_time
1095 1131
               };
1096 1132
 
1097 1133
               let mode = "";
@@ -1204,6 +1240,7 @@ export default {
1204 1240
                     drug_id:_this.nameForm.drug_id,
1205 1241
                     way:_this.nameForm.way,
1206 1242
                     drug_name_id:_this.nameForm.drug_name_id,
1243
+                    push_start_time:_this.nameForm.push_start_time,
1207 1244
                     isEdit: 0,
1208 1245
                     id: 0,
1209 1246
                     children: [],
@@ -1403,7 +1440,8 @@ export default {
1403 1440
         index: 0,
1404 1441
         children: [],
1405 1442
         parent_row: this.groupSelectRow.row_key,
1406
-        id: 0
1443
+        id: 0,
1444
+        push_start_time:"",
1407 1445
       };
1408 1446
       this.isChild = true;
1409 1447
       this.nameFormVisible = true;
@@ -1445,6 +1483,7 @@ export default {
1445 1483
           frequency_type: this.groupSelectRow.frequency_type,
1446 1484
           drug_id:0,
1447 1485
           drug_name_id:0,
1486
+          push_start_time:this.groupSelectRow.push_start_time,
1448 1487
           way:0,
1449 1488
         };
1450 1489
 
@@ -1476,7 +1515,8 @@ export default {
1476 1515
           parent_row: 0,
1477 1516
           day_count: "",
1478 1517
           week_days: "",
1479
-          frequency_type: 0
1518
+          frequency_type: 0,
1519
+          push_start_time:"",
1480 1520
         };
1481 1521
         this.nameFormTitle = "新增医嘱内容";
1482 1522
       }
@@ -2485,6 +2525,16 @@ export default {
2485 2525
 
2486 2526
         cb(results);
2487 2527
       },
2528
+      getTime(val) {
2529
+         if(val < 0){
2530
+           return ""
2531
+         }
2532
+         if(val == ""){
2533
+          return ""
2534
+         }else {
2535
+          return uParseTime(val, '{y}-{m}-{d}')
2536
+         }
2537
+      },
2488 2538
   },
2489 2539
   watch: {
2490 2540
     rowKey: function() {

+ 102 - 34
src/xt_pages/user/doctorAdvice.vue Datei anzeigen

@@ -426,6 +426,16 @@
426 426
           </template>
427 427
         </el-table-column>
428 428
 
429
+        <el-table-column
430
+          label="推送截止日期"
431
+          width="180"
432
+          align="center"
433
+        >
434
+          <template slot-scope="scope">
435
+            <span v-if="scope.row.push_start_time >0">{{scope.row.push_start_time | parseTime("{y}-{m}-{d}")}}</span>
436
+          </template>
437
+        </el-table-column>
438
+
429 439
         <!-- <template v-if="adviceType==3">
430 440
                     <el-table-column key="advice_doctor_3" label="开嘱医生" min-width="80"  property="advice_doctor" align="center">
431 441
                         <template slot-scope="scope">
@@ -760,6 +770,16 @@
760 770
                     >
761 771
                   </template>
762 772
                 </el-table-column>
773
+                <el-table-column 
774
+                 label="推送截止日期"
775
+                  min-width="80"
776
+                  align="center"
777
+                >
778
+                <template slot-scope="scope">
779
+                   {{scope.row.push_start_time}}
780
+                </template>
781
+                
782
+                </el-table-column>
763 783
               </el-table>
764 784
             </el-col>
765 785
           </el-row>
@@ -967,7 +987,7 @@
967 987
           ref="nameForm"
968 988
           :rules="nameRules"
969 989
           :model="nameForm"
970
-          label-width="90px"
990
+          label-width="120px"
971 991
         >
972 992
           <el-row>
973 993
             <el-col :span="10">
@@ -1130,6 +1150,8 @@
1130 1150
               </el-form-item>
1131 1151
             </el-col>
1132 1152
 
1153
+           
1154
+
1133 1155
             <el-col :span="12" v-if="nameForm.frequency_type == 2">
1134 1156
               <el-form-item prop="day_count">
1135 1157
                 <el-input
@@ -1153,6 +1175,19 @@
1153 1175
                 </el-checkbox-group>
1154 1176
               </el-form-item>
1155 1177
             </el-col>
1178
+
1179
+            <el-col :span="24">
1180
+               <el-form-item label="推送截止日期:">
1181
+                 <el-date-picker
1182
+                   v-model="nameForm.push_start_time"
1183
+                   type="date"
1184
+                   format="yyyy-MM-dd"
1185
+                   value-format="yyyy-MM-dd"
1186
+                  :picker-options="pickerOptionsOne"
1187
+                  placeholder="推送截止日期">
1188
+                 </el-date-picker>
1189
+              </el-form-item>
1190
+            </el-col>
1156 1191
           </el-row>
1157 1192
         </el-form>
1158 1193
         <div slot="footer" class="dialog-footer">
@@ -1196,7 +1231,7 @@
1196 1231
           ref="adviceForm"
1197 1232
           :rules="adviceRules"
1198 1233
           :model="adviceForm"
1199
-          label-width="90px"
1234
+          label-width="120px"
1200 1235
         >
1201 1236
           <el-row>
1202 1237
             <el-col :span="12">
@@ -1396,7 +1431,22 @@
1396 1431
                 </el-select>
1397 1432
               </el-form-item>
1398 1433
             </el-col>
1434
+
1435
+             <el-col :span="24">
1436
+               <el-form-item label="推送截止日期:">
1437
+                 <el-date-picker
1438
+                   v-model="adviceForm.push_start_time"
1439
+                   type="date"
1440
+                   format="yyyy-MM-dd"
1441
+                   value-format="yyyy-MM-dd"
1442
+                  :picker-options="pickerOptionsOne"
1443
+                  placeholder="推送截止日期">
1444
+                 </el-date-picker>
1445
+              </el-form-item>
1446
+            </el-col>
1399 1447
           </el-row>
1448
+
1449
+          
1400 1450
           <el-form-item label="备注 :">
1401 1451
             <el-input type="textarea" v-model="adviceForm.remark"></el-input>
1402 1452
           </el-form-item>
@@ -1404,6 +1454,8 @@
1404 1454
           <el-form-item label="开嘱医生 :">
1405 1455
             <span>{{ adminusername }} </span>
1406 1456
           </el-form-item>
1457
+
1458
+        
1407 1459
         </el-form>
1408 1460
         <div slot="footer" class="dialog-footer">
1409 1461
           <template v-if="isEdit">
@@ -1983,6 +2035,12 @@ export default {
1983 2035
 
1984 2036
   data() {
1985 2037
     return {
2038
+      pickerOptionsOne: {
2039
+        // 限制收货时间不让选择今天以前的
2040
+        disabledDate(time) {
2041
+          return time.getTime() < Date.now() - 8.64e7;
2042
+        },
2043
+      },
1986 2044
       weeks: [],
1987 2045
       is_open_remind: "",
1988 2046
       checkList: [],
@@ -2088,6 +2146,7 @@ export default {
2088 2146
         drug_id:0,
2089 2147
         way:0,
2090 2148
         drug_name_id:0,
2149
+        push_start_time:"",
2091 2150
       },
2092 2151
       nameForm: {
2093 2152
         advice_name: "",
@@ -2104,7 +2163,8 @@ export default {
2104 2163
         isEdit: 0,
2105 2164
         index: 0,
2106 2165
         id: 0,
2107
-        children: []
2166
+        children: [],
2167
+        push_start_time:"",
2108 2168
       },
2109 2169
       groupForm: {
2110 2170
         day_count: "",
@@ -2194,6 +2254,7 @@ export default {
2194 2254
       drug_id: 0,
2195 2255
       src_type:"",
2196 2256
       org_id:0,
2257
+     
2197 2258
     };
2198 2259
   },
2199 2260
   methods: {
@@ -2266,6 +2327,7 @@ export default {
2266 2327
               this.dialogFormVisible = false;
2267 2328
               this.resetForm(formName);
2268 2329
               var advice = response.data.data.advice;
2330
+              
2269 2331
               this.adviceTableData[this.currentIndex].drug_spec =
2270 2332
                 advice.drug_spec;
2271 2333
               this.adviceTableData[this.currentIndex].drug_spec_unit =
@@ -2291,6 +2353,7 @@ export default {
2291 2353
               this.adviceTableData[this.currentIndex].advice_doctor =
2292 2354
                 advice.advice_doctor;
2293 2355
               this.adviceTableData[this.currentIndex].remark = advice.remark;
2356
+               this.adviceTableData[this.currentIndex].push_start_time = advice.push_start_time;
2294 2357
               this.currentIndex = -1;
2295 2358
               return false;
2296 2359
             }
@@ -3005,7 +3068,8 @@ export default {
3005 3068
         doctor: groups[0].advice_doctor,
3006 3069
 
3007 3070
         remark: groups[0].remark,
3008
-        groupno: groupno
3071
+        groupno: groupno,
3072
+        
3009 3073
       };
3010 3074
       console.log("到了",groups[0]);
3011 3075
 
@@ -3049,7 +3113,8 @@ export default {
3049 3113
           children: [],
3050 3114
           parent_row: 0,
3051 3115
           row_key: this.rowKey,
3052
-          table: []
3116
+          table: [],
3117
+          push_start_time:uParseTime(groups[index].push_start_time, "{y}-{m}-{d}")
3053 3118
         };
3054 3119
 
3055 3120
         if (item.id in childMap) {
@@ -3076,7 +3141,8 @@ export default {
3076 3141
               id: childMap[item.id][key].id,
3077 3142
               children: [],
3078 3143
               parent_row: item.row_key,
3079
-              row_key: this.rowKey
3144
+              row_key: this.rowKey,
3145
+              push_start_time:uParseTime(childMap[item.id][key].push_start_time, "{y}-{m}-{d}")
3080 3146
             };
3081 3147
             item.children.push(child);
3082 3148
           }
@@ -3132,7 +3198,8 @@ export default {
3132 3198
         advice_doctor: row.advice_doctor,
3133 3199
         remark: "",
3134 3200
         parent_id: row.parent_id > 0 ? row.parent_id : row.id,
3135
-        drug_id:""
3201
+        drug_id:"",
3202
+        push_start_time:"",
3136 3203
       };
3137 3204
       this.dialogFormVisible = true;
3138 3205
     },
@@ -3386,14 +3453,15 @@ export default {
3386 3453
         single_dose: row.single_dose != 0 ? row.single_dose : "",
3387 3454
         single_dose_unit: row.single_dose_unit,
3388 3455
         prescribing_number:
3389
-          row.prescribing_number != 0 ? row.prescribing_number : "",
3456
+        row.prescribing_number != 0 ? row.prescribing_number : "",
3390 3457
         prescribing_number_unit: row.prescribing_number_unit,
3391 3458
         delivery_way: row.delivery_way,
3392 3459
         execution_frequency: row.execution_frequency,
3393 3460
         advice_doctor: row.advice_doctor,
3394 3461
         remark: row.remark,
3395 3462
         id: row.id,
3396
-        parent_id: row.parent_id
3463
+        parent_id: row.parent_id,
3464
+        push_start_time:uParseTime(row.push_start_time, "{y}-{m}-{d}"),
3397 3465
       };
3398 3466
     },
3399 3467
     getList() {
@@ -4100,6 +4168,7 @@ export default {
4100 4168
                       _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
4101 4169
                       _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
4102 4170
                       _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
4171
+                       _this.groupForm.adviceNames[index].children[j].push_start_time = _this.nameForm.push_start_time;
4103 4172
 
4104 4173
                       _this.$set(
4105 4174
                         _this.groupForm.adviceNames[index].children,
@@ -4114,31 +4183,19 @@ export default {
4114 4183
               }
4115 4184
             } else {
4116 4185
               for (let index = 0; index < ale; index++) {
4117
-                if (
4118
-                  _this.groupSelectRow.row_key ==
4119
-                  _this.groupForm.adviceNames[index].row_key
4120
-                ) {
4186
+                if (_this.groupSelectRow.row_key == _this.groupForm.adviceNames[index].row_key) {
4121 4187
                   _this.groupForm.adviceNames[index].advice_name =_this.nameForm.advice_name;
4122
-                  _this.groupForm.adviceNames[index].advice_desc =
4123
-                    _this.nameForm.advice_desc;
4124
-
4125
-                  _this.groupForm.adviceNames[index].single_dose =
4126
-                    "" + _this.nameForm.single_dose;
4127
-                  _this.groupForm.adviceNames[index].single_dose_unit =
4128
-                    _this.nameForm.single_dose_unit;
4129
-                  _this.groupForm.adviceNames[index].drug_spec =
4130
-                    "" + _this.nameForm.drug_spec;
4131
-                  _this.groupForm.adviceNames[index].drug_spec_unit =
4132
-                    _this.nameForm.drug_spec_unit;
4133
-                  _this.groupForm.adviceNames[index].prescribing_number =
4134
-                    "" + _this.nameForm.prescribing_number;
4135
-                  _this.groupForm.adviceNames[index].prescribing_number_unit =
4136
-                    _this.nameForm.prescribing_number_unit;
4137
-                  _this.groupForm.adviceNames[index].delivery_way =
4138
-                    _this.nameForm.delivery_way;
4139
-                  _this.groupForm.adviceNames[index].execution_frequency =
4140
-                    _this.nameForm.execution_frequency;
4141
-
4188
+                  _this.groupForm.adviceNames[index].advice_desc =_this.nameForm.advice_desc;
4189
+
4190
+                  _this.groupForm.adviceNames[index].single_dose = "" + _this.nameForm.single_dose;
4191
+                  _this.groupForm.adviceNames[index].single_dose_unit =_this.nameForm.single_dose_unit;
4192
+                  _this.groupForm.adviceNames[index].drug_spec = "" + _this.nameForm.drug_spec;
4193
+                  _this.groupForm.adviceNames[index].drug_spec_unit =_this.nameForm.drug_spec_unit;
4194
+                  _this.groupForm.adviceNames[index].prescribing_number = "" + _this.nameForm.prescribing_number;
4195
+                  _this.groupForm.adviceNames[index].prescribing_number_unit = _this.nameForm.prescribing_number_unit;
4196
+                  _this.groupForm.adviceNames[index].delivery_way = _this.nameForm.delivery_way;
4197
+                  _this.groupForm.adviceNames[index].execution_frequency = _this.nameForm.execution_frequency;
4198
+                  _this.groupForm.adviceNames[index].push_start_time = _this.nameForm.push_start_time
4142 4199
                   if (_this.nameForm.frequency_type == 1) {
4143 4200
                     _this.groupForm.adviceNames[index].frequency_type =
4144 4201
                       _this.nameForm.frequency_type;
@@ -4657,7 +4714,17 @@ export default {
4657 4714
         this.nameForm.drug_id = tmp.id
4658 4715
         console.log("isiisisthis.adviceForm",this.adviceForm)
4659 4716
         this.adviceForm.drug_id = tmp.id
4660
-      }
4717
+      },
4718
+      getTime(val) {
4719
+         if(val < 0){
4720
+           return ""
4721
+         }
4722
+         if(val == ""){
4723
+          return ""
4724
+         }else {
4725
+          return uParseTime(val, '{y}-{m}-{d}')
4726
+         }
4727
+      },
4661 4728
   },
4662 4729
   watch: {
4663 4730
     adviceTableData: function() {
@@ -4752,6 +4819,7 @@ export default {
4752 4819
 </style>
4753 4820
 
4754 4821
 <style rel="stylesheet/scss" lang="scss" scoped>
4822
+
4755 4823
 .printForm {
4756 4824
   width: 960px;
4757 4825
 }