XMLWAN 3 years ago
parent
commit
41383db9f5

+ 8 - 0
src/api/patient.js View File

@@ -541,3 +541,11 @@ export function UpdateTemplateSummary(params) {
541 541
     params: params
542 542
   })
543 543
 }
544
+
545
+export function deleteSummary(params) {
546
+  return request({
547
+    url: '/api/patient/deletesummary',
548
+    method: 'Get',
549
+    params: params
550
+  })
551
+}

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

@@ -777,3 +777,12 @@ export function saveReportStock(data) {
777 777
     data: data
778 778
   })
779 779
 }
780
+
781
+export function getReportStockList(params) {
782
+  console.log('params', params)
783
+  return request({
784
+    url: '/api/stock/getreportstocklist',
785
+    method: 'get',
786
+    params: params
787
+  })
788
+}

+ 141 - 29
src/xt_pages/stock/stockDamaged.vue View File

@@ -43,36 +43,43 @@
43 43
                 <el-button size="small" type="primary">导出</el-button>
44 44
             </div>
45 45
         </div>
46
-        <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
47
-            <el-table-column
48
-            prop="date"
49
-            label="报损编码">
46
+        <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }" @selection-change="changePrice">
47
+            <el-table-column type="selection" width="55" align="center"> </el-table-column>
48
+            <el-table-column prop="date" label="报损编码">
49
+               <template  slot-scope="scope">
50
+                {{scope.row.warehousing_order}}
51
+               </template>    
50 52
             </el-table-column>
51
-            <el-table-column
52
-            prop="date"
53
-            label="报损日期">
53
+            <el-table-column prop="date" label="报损日期">
54
+              <template  slot-scope="scope">
55
+                {{getTime(scope.row.start_time)}}
56
+               </template>    
54 57
             </el-table-column>
55
-            <el-table-column
56
-            prop="name"
57
-            label="操作人">
58
+            <el-table-column prop="name" label="操作人">
59
+              <template  slot-scope="scope">
60
+                {{getTime(scope.row.user_name)}}
61
+               </template>     
58 62
             </el-table-column>
59
-            <el-table-column
60
-            prop="name"
61
-            label="审核日期">
63
+            <el-table-column prop="name" label="审核日期">
64
+              <template  slot-scope="scope">
65
+                {{getTime(scope.row.checker_time)}}
66
+             </template>
62 67
             </el-table-column>
63
-            <el-table-column
64
-            prop="name"
65
-            label="核对人">
68
+            <el-table-column prop="name" label="核对人">
69
+              <template slot-scope="scope">
70
+                {{scope.row.checker}}
71
+              </template>
66 72
             </el-table-column>
67
-            <el-table-column
68
-            prop="name"
69
-            label="状态">
73
+            <el-table-column prop="name" label="状态">
74
+             <template slot-scope="scope">
75
+                <span v-if="scope.row.checker_status == 1">已核对</span>
76
+                <span v-if="scope.row.checker_status == 2">未核对</span>
77
+              </template>
70 78
             </el-table-column>
71
-            <el-table-column
72
-            label="操作">
79
+            <el-table-column label="操作">
73 80
                 <template slot-scope="scope">
74
-                    <el-button type="text" size="small">删除</el-button>
75
-                    <el-button type="text" size="small">编辑</el-button>
81
+                <el-button type="primary" size="small">删除</el-button>
82
+                <el-button type="primary" size="small">编辑</el-button>
76 83
                 </template>
77 84
             </el-table-column>
78 85
         </el-table>
@@ -94,6 +101,7 @@
94 101
         width="1200px"
95 102
         >
96 103
         <el-form :model="form" class="modifyDialog" label-width="120px">
104
+          
97 105
             <el-form-item label="耗材ID">
98 106
                 <el-input v-model="form.good_id"></el-input>
99 107
             </el-form-item>
@@ -225,14 +233,54 @@
225 233
             <el-button type="primary" @click="saveReportStock">确 定</el-button>
226 234
         </span>
227 235
     </el-dialog>
228
-  
236
+    <el-dialog
237
+        title="耗材报损核对"
238
+        :visible.sync="checkDialogVisible"
239
+        width="30%"
240
+        >
241
+        <span>
242
+          <el-form :model="form">
243
+            <el-row>
244
+              <el-col>
245
+                <el-form-item label="核对时间">
246
+                 <el-date-picker
247
+                    size="small"
248
+                    v-model="check_time"
249
+                    type="date"
250
+                    style="margin-left:5px;width:140px;"
251
+                    placeholder="选择日期">
252
+                  </el-date-picker>
253
+                </el-form-item>  
254
+              </el-col>
255
+            </el-row>  
256
+             <el-row>
257
+              <el-col>
258
+                <el-form-item label="核对人">
259
+                  <el-select v-model="checker" placeholder="请选择">
260
+                    <el-option
261
+                    v-for="item in doctorList"
262
+                    :key="item.admin_user_id"
263
+                    :label="item.user_name"
264
+                    :value="item.admin_user_id">
265
+                    </el-option>
266
+                 </el-select>
267
+                </el-form-item>  
268
+              </el-col>
269
+            </el-row>  
270
+          </el-form>  
271
+        </span>
272
+        <span slot="footer" class="dialog-footer">
273
+            <el-button @click="checkDialogVisible = false">取 消</el-button>
274
+            <el-button type="primary" @click="SaveCheckedPrice">保 存</el-button>
275
+        </span>
276
+    </el-dialog>
229 277
   </div>
230 278
 </template>
231 279
 
232 280
 <script>
233 281
 import BreadCrumb from "../components/bread-crumb";
234 282
 import { uParseTime } from '@/utils/tools'
235
-import { postSearchGoodWarehouseList,saveReportStock} from "@/api/stock"
283
+import { postSearchGoodWarehouseList,saveReportStock,getReportStockList} from "@/api/stock"
236 284
 export default {
237 285
     name: "stockModifyPrice",
238 286
     components:{
@@ -277,6 +325,12 @@ export default {
277 325
             goodList:[],
278 326
             start_time:"",
279 327
             end_time:"",
328
+            checkDialogVisible:false,
329
+            ids:"",
330
+            limit:10,
331
+            page:1,
332
+            total:0,
333
+            doctorList:[],
280 334
         }
281 335
     },
282 336
     methods:{
@@ -390,13 +444,71 @@ export default {
390 444
          }
391 445
       },
392 446
       getlist(){
393
-       getReportStockList().then(response=>{
394
-
447
+         var params = {
448
+          start_time:this.start_time,
449
+          end_time:this.end_time,
450
+          keyword:this.searchKey,
451
+          limit:this.limit,
452
+          page:this.page,
453
+         }
454
+         console.log("param23223232322323",params)
455
+       getReportStockList(params).then(response=>{
456
+          if(response.data.state == 1){
457
+            var list = response.data.data.list
458
+            console.log("list",list)
459
+            this.total = response.data.data.total
460
+            this.tableData = list
461
+           var doctorlist = response.data.data.doctorlist
462
+           this.doctorList = doctorlist
463
+          }
395 464
        })   
396
-      }
465
+      },
466
+     toCheck(){
467
+      if(this.ids.length <=0){
468
+         this.$message.error("请勾选核对数据")
469
+         return
470
+       }else{
471
+         this.checkDialogVisible = true
472
+       }
473
+    
474
+     },
475
+    changePrice(val){
476
+       console.log("val23232322323",val)
477
+      
478
+       var arr = []
479
+      
480
+       for(let i=0;i<val.length;i++){
481
+         arr.push(val[i].id)
482
+       }
483
+      var str = arr.join(",")
484
+    
485
+      console.log("str",str)
486
+      this.ids = str
487
+     
488
+     },
397 489
     },
398 490
     created(){
399
-      this.getlist()
491
+        // var nowDate = new Date();
492
+        // var nowYear = nowDate.getFullYear();
493
+        // var nowMonth = nowDate.getMonth() + 1;
494
+        // var nowDay = nowDate.getDate();
495
+        // this.end_time =
496
+        // nowYear +
497
+        // "-" +
498
+        // (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
499
+        // "-" +
500
+        // (nowDay < 10 ? "0" + nowDay : nowDay);
501
+        // nowDate.setMonth(nowDate.getMonth() - 1);
502
+        // nowYear = nowDate.getFullYear();
503
+        // nowMonth = nowDate.getMonth() + 1;
504
+        // nowDay = nowDate.getDate();
505
+        // this.start_time =
506
+        // nowYear +
507
+        // "-" +
508
+        // (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
509
+        // "-" +
510
+        // (nowDay < 10 ? "0" + nowDay : nowDay);
511
+         this.getlist()
400 512
     },
401 513
     mounted() {
402 514
     },

+ 2 - 0
src/xt_pages/user/dialysisRecord.vue View File

@@ -372,6 +372,7 @@
372 372
             </tbody>
373 373
           </table>
374 374
         </div>
375
+
375 376
       </div>
376 377
     </div>
377 378
   </div>
@@ -446,6 +447,7 @@ export default {
446 447
         if (response.data.state == 1) {
447 448
           this.total = response.data.data.total;
448 449
           this.recordData = response.data.data.records;
450
+          console.log("郭23232323232232323",this.recordData)
449 451
         }
450 452
       });
451 453
     },

+ 80 - 25
src/xt_pages/user/templateSummary.vue View File

@@ -13,8 +13,7 @@
13 13
                                    @click="showEdit">修改</el-button>
14 14
                       <el-button type="primary" icon="el-icon-printer" size="small"
15 15
                                  @click="print">打印</el-button>
16
-                        <el-button size="small" v-show="selectingRows.length > 0" type="danger"
17
-                                   @click="deleteAction">删除</el-button>
16
+                      <el-button size="small"  type="danger" @click="deleteAction">删除</el-button>
18 17
                     </span>
19 18
         </div>
20 19
         <!--<div></div>-->
@@ -37,6 +36,7 @@
37 36
                 }"
38 37
                 :row-style="{ color: '#303133' }" ref="inspection_table" :data="inspectionList"
39 38
                         border highlight-current-row @current-change="changeCurrentRecordTwo"
39
+                        @selection-change="selectSummary"
40 40
                         :row-class-name="tableRow"
41 41
               >
42 42
                 <el-table-column type="selection" width="60" align="center"></el-table-column>
@@ -72,6 +72,7 @@
72 72
                   <span style="margin-right:10px;line-height:30px;">其他:{{editObj.other_count}}次</span>
73 73
                    <br>
74 74
                   <span style="margin-right:10px;line-height:30px;">透析器:{{editObj.dialzer_apparatus}}</span>
75
+                  <span style="margin-right:10px;line-height:30px;">灌流器:{{editObj.perfusion_apparatus}}</span>
75 76
                   <span style="margin-right:10px;line-height:30px;">抗凝剂:
76 77
                     <span> {{getAnticoagulant(editObj.anticoagulant)}}</span>
77 78
                   </span>
@@ -95,11 +96,12 @@
95 96
                     <div style="display:flex;flex-wrap: wrap;">
96 97
                       <div v-for="it in item.arr" style="width:33%;margin-bottom:5px;">
97 98
                         {{ it.item_name }} <span v-if="it.unit!=''">[{{it.unit}}]</span>:
99
+                         {{it.inspect_value}}
98 100
                         <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
99
-                            {{it.inspect_value}}
101
+                           ↓
100 102
                           </span> 
101 103
                           <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
102
-                            {{it.inspect_value}}
104
+                           ↑
103 105
                         </span> 
104 106
                       </div>
105 107
                     </div>
@@ -333,11 +335,12 @@
333 335
                         <div style="display:flex;flex-wrap: wrap;">
334 336
                           <div v-for="it in item.arr" style="width:33%;">
335 337
                            {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>:
338
+                            {{it.inspect_value}}
336 339
                              <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
337
-                             {{it.inspect_value}}
340
+                             ↓
338 341
                            </span> 
339 342
                            <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
340
-                             {{it.inspect_value}}
343
+                            ↑
341 344
                           </span> 
342 345
                           </div>
343 346
                         </div>
@@ -361,7 +364,8 @@
361 364
                       <el-form-item label="记录时间">
362 365
                          <el-date-picker
363 366
                             v-model="form.record_time"
364
-                            type="datetime"
367
+                             type="datetime"
368
+                            value-format="yyyy-MM-dd"
365 369
                             placeholder="选择日期时间">
366 370
                         </el-date-picker>
367 371
                       </el-form-item>
@@ -589,11 +593,12 @@
589 593
                         <div style="display:flex;flex-wrap: wrap;">
590 594
                           <div v-for="it in item.arr" style="width:33%;">
591 595
                             {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>:
596
+                             {{it.inspect_value}}
592 597
                              <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
593
-                             {{it.inspect_value}}
598
+                            ↓
594 599
                            </span> 
595 600
                            <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
596
-                             {{it.inspect_value}}
601
+                             ↑
597 602
                           </span> 
598 603
                           </div>
599 604
                         </div>
@@ -617,7 +622,8 @@
617 622
                       <el-form-item label="记录时间">
618 623
                          <el-date-picker
619 624
                             v-model="form.record_time"
620
-                            type="datetime"
625
+                             type="datetime"
626
+                            value-format="yyyy-MM-dd"
621 627
                             placeholder="选择日期时间">
622 628
                         </el-date-picker>
623 629
                       </el-form-item>
@@ -720,12 +726,12 @@
720 726
                         </el-table-column>
721 727
                         <el-table-column label="结果" align="center">
722 728
                           <template slot-scope="scope">
723
-                            {{scope.row.project_name}} <span v-if="scope.row.unit!=''">[{{scope.row.unit}}]</span>
729
+                            {{scope.row.inspect_value}}
724 730
                            <span v-if="parseInt(scope.row.inspect_value) < parseInt(scope.row.range_min)">
725
-                             {{scope.row.inspect_value}}
731
+                            ↓
726 732
                           </span> 
727 733
                            <span v-if="parseInt(scope.row.inspect_value) > parseInt(scope.row.range_max)">
728
-                             {{scope.row.inspect_value}}
734
+                             ↑
729 735
                           </span> 
730 736
                           </template>
731 737
                         </el-table-column>
@@ -773,7 +779,7 @@
773 779
   import PatientSidebar from './components/PatientSidebar'
774 780
   import Editor from '@/components/Editor'
775 781
  
776
-  import { getInitDataList,getInspectionMajorItem,getInspectionDetail,getInspectionItemList,saveCreation,getTemplateSummaryList,getTemplateSummaryDetail,UpdateTemplateSummary } from '@/api/patient'
782
+  import { getInitDataList,getInspectionMajorItem,getInspectionDetail,getInspectionItemList,saveCreation,getTemplateSummaryList,getTemplateSummaryDetail,UpdateTemplateSummary,deleteSummary } from '@/api/patient'
777 783
   import { parseTime } from '@/utils'
778 784
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
779 785
   import { uParseTime } from '@/utils/tools'
@@ -856,10 +862,11 @@
856 862
           template_inspection_id:0,
857 863
           template_inspection_content:"",
858 864
           admin_user_id:this.$store.getters.xt_user.user.id,
859
-          record_time:new Date(),
865
+          record_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
860 866
           patient_id:"",
861 867
           start_time:"",
862 868
           end_time:"",
869
+          template_plan_content:"",
863 870
         },
864 871
         timeType:[
865 872
           {id:1,name:"第一季度"},
@@ -910,9 +917,11 @@
910 917
         start_month:"",
911 918
         start_date: moment(new Date()).startOf("month").format("YYYY-MM-DD"),
912 919
         end_date: moment(new Date()).endOf('month').format("YYYY-MM-DD"),
920
+        ids:"",
913 921
       }
914 922
     },
915 923
     created() {
924
+      console.log("this.$store.getters.xt_user.user.id",this.$store.getters.xt_user.user.id)
916 925
       this.patient_id = this.$route.params && this.$route.params.id
917 926
       var now = new Date()
918 927
       this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
@@ -979,9 +988,6 @@
979 988
       showEdit(){
980 989
        
981 990
         this.getCurrentRecordDetailOne()
982
-      },
983
-      deleteAction(){
984
-
985 991
       },
986 992
       onRowClick(){
987 993
 
@@ -1171,7 +1177,8 @@
1171 1177
         })
1172 1178
       },
1173 1179
       getInspectionItemList(val){
1174
-        // console.log("中国龚23232323232332",val)
1180
+        this.projectList = []
1181
+        this.inspectDataList = []
1175 1182
        for(let i=0;i<val.length;i++){
1176 1183
         this.projectList.push(val[i].project_id)
1177 1184
         this.inspectDataList.push(val[i].inspect_date)
@@ -1198,8 +1205,7 @@
1198 1205
            
1199 1206
             this.form.template_inspection_content = arr
1200 1207
             this.dialogVisibleInspection = false
1201
-            this.projectList = []
1202
-            this.inspectDataList = []
1208
+           
1203 1209
            }
1204 1210
         })  
1205 1211
       },
@@ -1417,6 +1423,7 @@
1417 1423
            if(response.data.state == 1){
1418 1424
               var list = response.data.data.list
1419 1425
               var inspectlist =  response.data.data.inspectlist
1426
+              console.log("详情232332233223232323",list)
1420 1427
               let arr = this.unique(inspectlist,'project_name')
1421 1428
               this.form.template_inspection_content = arr
1422 1429
               this.edit_show_dialog = true
@@ -1441,6 +1448,7 @@
1441 1448
                this.form.natrium =list.natrium
1442 1449
                this.form.perfusion_apparatus= list.perfusion_apparatus
1443 1450
                this.form.record_time = this.getTime(list.record_time)
1451
+               console.log("时间232233232",this.form.record_time)
1444 1452
                this.form.template_inspection_id = list.template_inspection_id
1445 1453
                this.form.template_plan_content = list.template_plan_content
1446 1454
                this.form.template_summary_content =list.template_summary_content
@@ -1606,12 +1614,19 @@
1606 1614
         this.form.template_inspection_content = ""
1607 1615
         this.form.admin_user_id = ""
1608 1616
         this.form.record_time = ""
1609
-        this.from.after_pressure = ""
1617
+        this.form.after_pressure = ""
1610 1618
         this.form.template_summary_id = ""
1611 1619
         this.form.template_plan_id = ""
1612 1620
         this.form.template_inspection_id = ""
1621
+        console.log("sart",this.form.start_month)
1622
+        var end = ""
1623
+        if(this.form.start_month == "02"){
1624
+          end = this.start_year +"-"+ this.form.start_month + "-"+"28"
1625
+        }else{
1626
+          end = this.start_year +"-"+ this.form.start_month + "-"+"30"
1627
+        }
1613 1628
         var start = this.start_year +"-"+ this.form.start_month+"-"+"01"
1614
-        var end = this.start_year +"-"+ this.form.start_month + "-"+"30"
1629
+       
1615 1630
         this.start_date  = start
1616 1631
         this.end_date = end 
1617 1632
         console.log("开始时间",this.start_date)
@@ -1643,7 +1658,7 @@
1643 1658
         this.form.template_inspection_content = ""
1644 1659
         this.form.admin_user_id = ""
1645 1660
         this.form.record_time = ""
1646
-        this.from.after_pressure = ""
1661
+        this.form.after_pressure = ""
1647 1662
         this.form.template_summary_id = ""
1648 1663
         this.form.template_plan_id = ""
1649 1664
         this.form.template_inspection_id = ""
@@ -1679,7 +1694,47 @@
1679 1694
         console.log("val2323323223",val)
1680 1695
         this.startYear = val+"-" + "30"
1681 1696
         this.getInspectionMajor()
1682
-      }
1697
+      },
1698
+      selectSummary(val){
1699
+        console.log("val23232",val)
1700
+        var arr = []
1701
+        for( let i=0;i<val.length;i++){
1702
+           arr.push(val[i].id)
1703
+        }
1704
+     
1705
+        var str = arr.join(",")
1706
+       console.log("str",str)
1707
+       this.ids = str
1708
+      },
1709
+     deleteAction(){
1710
+       if(this.ids == ""){
1711
+         this.$message.error("请勾选需要删除的数据")
1712
+         return
1713
+       } 
1714
+       this.$confirm('确认删除这条记录?', '删除记录', {
1715
+          confirmButtonText: '确定',
1716
+          cancelButtonText: '取消',
1717
+          type: 'warning'
1718
+        }).then(() => {
1719
+           let params = {
1720
+              ids: this.ids,
1721
+            }
1722
+            console.log("params2323",params)
1723
+            
1724
+            deleteSummary(params).then(response => {
1725
+              if (response.data.state == 0) {
1726
+                this.$message.error(response.data.msg)
1727
+                return false
1728
+              } else {
1729
+                var msg =response.data.data.msg
1730
+                this.getTemplateSummaryList()
1731
+                
1732
+              }
1733
+            })
1734
+          })
1735
+          .catch(() => {
1736
+          })
1737
+     }
1683 1738
 
1684 1739
     },
1685 1740
   //  watch: {

+ 4 - 2
src/xt_pages/user/templateSummaryPrint.vue View File

@@ -33,6 +33,7 @@
33 33
           </div>
34 34
           <div style="display:flex;justify-content: space-between;margin-top:10px;">
35 35
             <span>透析器:{{patientList.dialzer_apparatus}}</span>  
36
+            <span>灌流器:{{patientList.perfusion_apparatus}}</span> 
36 37
             <span>抗凝剂:{{getAnticoagulant(patientList.anticoagulant)}}</span>  
37 38
             <span>透析液(钾:{{patientList.kalium}} 钙:{{patientList.autunite}} Na:{{patientList.natrium}} ):</span> 
38 39
             <span>每次透析(小时):{{patientList.hour}}时{{patientList.minute}}分</span>
@@ -56,11 +57,12 @@
56 57
             <div style="display:flex;flex-wrap: wrap;">
57 58
               <div v-for="it in item.arr" style="width:33%;margin-bottom:10px;">
58 59
                 {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>:
60
+                 {{it.inspect_value}}
59 61
                 <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
60
-                  {{it.inspect_value}}
62
+                 ↓
61 63
                 </span> 
62 64
                 <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
63
-                    {{it.inspect_value}}
65
+                  ↑
64 66
                 </span> 
65 67
               </div>
66 68
             </div>