Browse Source

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 2 months ago
parent
commit
723cc4790a

+ 19 - 0
src/api/advice.js View File

@@ -604,3 +604,22 @@ export function getDocAdviceByPatientId(params){
604 604
     params:params,
605 605
   })
606 606
 }
607
+
608
+
609
+export function getDoctorAdviceMonthList(params){
610
+ 
611
+  return request({
612
+    url:"/api/schedule/getdoctoradvicemonthlist",
613
+    method:"get",
614
+    params:params,
615
+  })
616
+}
617
+
618
+export function getHisPrescrptionProjectMonthList(params){
619
+
620
+  return request({
621
+    url:"/api/schedule/gethisprescriptionprojectmonthlist",
622
+    method:"get",
623
+    params:params
624
+  })
625
+}

+ 35 - 0
src/router/modules/dialysis.js View File

@@ -120,6 +120,30 @@ export default {
120 120
       }
121 121
     },
122 122
 
123
+    {
124
+      path: '/dialysis/doctorMonthAdviceStaticPrint',
125
+      component: () => import('@/xt_pages/dialysis/doctorAdviceMonthStaticPrint'),
126
+      name: '透析医嘱月统计打印',
127
+      hidden: true,
128
+      is_menu: false,
129
+      meta: {
130
+        title: '透析医嘱月统计打印',
131
+        noCache: true
132
+      }
133
+    },
134
+
135
+    {
136
+      path: '/dialysis/dialysisRecordPrint',
137
+      component: () => import('@/xt_pages/user/dialysisRecordPrint'),
138
+      name: '并发症打印',
139
+      hidden: true,
140
+      is_menu: false,
141
+      meta: {
142
+        title: '并发症打印',
143
+        noCache: true
144
+      }
145
+    },
146
+
123 147
     {
124 148
       path: '/dialysis/doctorNewAdviceStaticPrint',
125 149
       component: () => import('@/xt_pages/dialysis/doctorNewAdviceStaticPrint'),
@@ -155,6 +179,17 @@ export default {
155 179
         noCache: true
156 180
       }
157 181
     },
182
+    {
183
+      path: '/dialysis/doctocAdviceProjectPrint',
184
+      component: () => import('@/xt_pages/dialysis/doctorAdviceProjectPrint'),
185
+      name: '透析耗材统计打印',
186
+      hidden: true,
187
+      is_menu: false,
188
+      meta: {
189
+        title: '透析耗材统计打印',
190
+        noCache: true
191
+      }
192
+    },
158 193
 
159 194
     {
160 195
       path: '/dialysis/signPrint',

+ 66 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue View File

@@ -825,6 +825,72 @@
825 825
                           >
826 826
                           HDF1000
827 827
                           </div>
828
+                          <div
829
+                            class="under_line"
830
+                            style="
831
+                              width: 100px;
832
+                              text-align: center;
833
+                              font-weight: 600;
834
+                            "
835
+                            v-if="record.prescription.mode_id == 38"
836
+                          >
837
+                          HDF80
838
+                          </div>
839
+                          <div
840
+                            class="under_line"
841
+                            style="
842
+                              width: 100px;
843
+                              text-align: center;
844
+                              font-weight: 600;
845
+                            "
846
+                            v-if="record.prescription.mode_id == 39"
847
+                          >
848
+                          HF16
849
+                          </div>
850
+                          <div
851
+                            class="under_line"
852
+                            style="
853
+                              width: 100px;
854
+                              text-align: center;
855
+                              font-weight: 600;
856
+                            "
857
+                            v-if="record.prescription.mode_id == 40"
858
+                          >
859
+                           HD(无肝素)
860
+                          </div>
861
+                          <div
862
+                            class="under_line"
863
+                            style="
864
+                              width: 100px;
865
+                              text-align: center;
866
+                              font-weight: 600;
867
+                            "
868
+                            v-if="record.prescription.mode_id == 41"
869
+                          >
870
+                           HDF17H
871
+                          </div>
872
+                          <div
873
+                            class="under_line"
874
+                            style="
875
+                              width: 100px;
876
+                              text-align: center;
877
+                              font-weight: 600;
878
+                            "
879
+                            v-if="record.prescription.mode_id == 42"
880
+                          >
881
+                           HD.
882
+                          </div>
883
+                          <div
884
+                            class="under_line"
885
+                            style="
886
+                              width: 100px;
887
+                              text-align: center;
888
+                              font-weight: 600;
889
+                            "
890
+                            v-if="record.prescription.mode_id == 43"
891
+                          >
892
+                          HD(2)
893
+                          </div>
828 894
                         </div>
829 895
                       </div>
830 896
 

+ 6 - 1
src/xt_pages/dialysis/bloodPresssWatch.vue View File

@@ -615,7 +615,8 @@
615 615
         </div>
616 616
       </div>
617 617
 
618
-      <div style="margin-left: 1050px; margin-bottom: 10px;">
618
+      <div style="margin-left: 1100px; margin-bottom: 10px;">
619
+        <el-button type="primary" size="small" @click="printOrder">透析并发症登记打印</el-button>
619 620
         <el-button type="primary" size="small" @click="toExport">导出</el-button>
620 621
       </div>
621 622
 
@@ -1884,6 +1885,10 @@ export default {
1884 1885
     // this.template_id = this.$store.getters.xt_user.template_info.template_id;
1885 1886
   },
1886 1887
   methods: {
1888
+   
1889
+    printOrder(){
1890
+      this.$router.push({ path: "/dialysis/dialysisRecordPrint",query:{page:this.listQuery.page,limit:this.listQuery.limit,schedul_type:this.listQuery.schedul_type,partition_type:this.listQuery.partition_type,schedul_time:this.listQuery.schedul_time,keywords:this.listQuery.keywords,start_time:this.listQuery.start_time,end_time:this.listQuery.end_time}} );
1891
+    },
1887 1892
     getTemplateInfo() {
1888 1893
       getPrintTemplate().then(response => {
1889 1894
         if (response.data.state == 0) {

+ 4 - 1
src/xt_pages/dialysis/details/DialysisPrescription.vue View File

@@ -23,7 +23,10 @@
23 23
          <li v-if="isShow('置换速度')&& this.$store.getters.xt_user.template_info.org_id!=10375">
24 24
           <label>置换速度 : </label>
25 25
           <span class="content">{{displace_speed }}</span>
26
-            <span class="unit">L/h</span>
26
+            <span class="unit">
27
+              <span v-if="this.$store.getters.xt_user.template_info.org_id!=10414">L/h</span>
28
+              <span v-if="this.$store.getters.xt_user.template_info.org_id==10414">ml/min</span>
29
+            </span>
27 30
         </li>
28 31
 
29 32
         <li v-if="isShow('置换速度') && this.$store.getters.xt_user.template_info.org_id == 10375">

+ 2 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -4739,7 +4739,8 @@ mu
4739 4739
         id === 14 ||
4740 4740
         id === 15 ||
4741 4741
         id === 16 ||
4742
-        id === 19
4742
+        id === 19 ||
4743
+        id === 42
4743 4744
       ) {
4744 4745
         this.zhiShow = false
4745 4746
         this.huShow = false

+ 367 - 0
src/xt_pages/dialysis/doctorAdviceMonthStaticPrint.vue View File

@@ -0,0 +1,367 @@
1
+<template>
2
+    <div class="main-contain">
3
+      <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+          <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+          </el-col>
9
+        </el-row>
10
+      </div>
11
+      <div class="app-container" style="background-color: white;">
12
+  
13
+        <div id="print_content">
14
+          <div class="print_main_content">
15
+            <div class="order_title_panl">
16
+              <span class="main_title"> &nbsp;
17
+                透析药品
18
+              </span>
19
+              <span  style="float:right;">打印日期: &nbsp;
20
+                  {{ getNowTime() }}
21
+              </span>
22
+            </div>
23
+            <div class="table_panel">
24
+  
25
+              <table class="table">
26
+                <thead>
27
+                <tr>
28
+                  <td width="50">序号</td>
29
+                  <td width="100">药品名称</td>
30
+                  <td width="100">规格</td>
31
+                  <td width="100">数量</td>
32
+                  <td width="100">厂家</td>
33
+                </tr>
34
+                </thead>
35
+                <tbody>
36
+                 <tr v-for="(item,i) in tableMonthList" :key="i">
37
+                  <td>{{i+1}}</td>
38
+                  <td>{{item.advice_name}}</td>
39
+                   <td>{{item.specification_name}}</td>
40
+                  <td>
41
+                    <span v-if="config.is_open == 1">{{getHisCount(item.child,item.max_unit,item.min_unit,item.min_number)}}</span>
42
+                    <span v-if="config.is_open != 1">{{getCount(item.child)}}</span>
43
+                  </td>
44
+                  <td width="100">{{item.manufacturer_name}}</td>
45
+                 </tr>
46
+                </tbody>
47
+              </table>
48
+            </div>
49
+          </div>
50
+        </div>
51
+      </div>
52
+    </div>
53
+  </template>
54
+  
55
+  <script>
56
+    import { getDoctorAdviceMonthList } from '@/api/advice'
57
+    import { parseTime } from '@/utils'
58
+    import { uParseTime } from '@/utils/tools'
59
+    import BreadCrumb from '@/xt_pages/components/bread-crumb'
60
+    import print from 'print-js'
61
+    import { getDataConfig } from '@/utils/data'
62
+    export default {
63
+      name: 'SchedulePrint',
64
+      data() {
65
+        return {
66
+          crumbs: [
67
+            { path: false, name: '排班管理' },
68
+            { path: false, name: '排班打印' }
69
+          ],
70
+          td_1_width: '8%',
71
+          td_2_width: '8%',
72
+          td_3_width: '64%',
73
+          td_4_width: '20%',
74
+          month: 1,
75
+          begin_day: 1,
76
+          total:[],
77
+          list:[],
78
+          schedule_date:"",
79
+          schedule_type:0,
80
+          partition_type:0,
81
+          keywords:"",
82
+          loading:false,
83
+          tableData:[],
84
+          numberList:[],
85
+          partitionArr:[],
86
+          his_config:{},
87
+          typeList:[],
88
+          rowList:[],
89
+          dialysate_formulation:[],
90
+          body_fluid_option:[],
91
+          displace_liqui_part_option:[],
92
+          blood_access_option:[],
93
+          hemodialysisPipelinesOptions:[],
94
+          tableList:[],
95
+          druglist:[],
96
+          config:{},
97
+          org_id:0,
98
+          manufacturerList:[],
99
+          tableMonthList:[]
100
+        }
101
+      },
102
+      components: {
103
+        BreadCrumb
104
+      },
105
+      created() {
106
+        this.org_id = this.$store.getters.xt_user.template_info.org_id;
107
+        this.getlist()
108
+      },
109
+      methods: {
110
+       getNowTime: function () {
111
+        let dateTime;
112
+        let yy = new Date().getFullYear();
113
+        let mm = new Date().getMonth() + 1;
114
+        let dd = new Date().getDate();
115
+        
116
+        dateTime = yy + '-' + mm + '-' + dd
117
+        return dateTime
118
+       },
119
+        getlist(){
120
+        var params = {
121
+          start_time:this.$route.query.start_time,
122
+          end_time:this.$route.query.end_time
123
+        }
124
+        getDoctorAdviceMonthList(params).then(response=>{
125
+          if(response.data.state == 1){
126
+            var config = response.data.data.config
127
+            this.config = {}
128
+            this.config = config
129
+            var drugs = response.data.data.drugs
130
+            this.druglist = []
131
+            this.druglist = drugs
132
+            var manufacturerList =  response.data.data.manufacturerList
133
+            this.manufacturerList = []
134
+            this.manufacturerList = manufacturerList
135
+            var adviceMonthList = response.data.data.adviceList
136
+            var hisAdviceMonthList = response.data.data.hisAdviceList
137
+            if(config.is_open == 1){
138
+               
139
+              if(hisAdviceMonthList!=null && hisAdviceMonthList.length>0){
140
+                let dataInfo = {}
141
+                hisAdviceMonthList.forEach((item, index) => {
142
+                let { drug_id } = item
143
+                if (!dataInfo[drug_id])  {
144
+                  dataInfo[drug_id] = {
145
+                    drug_id:item.drug_id,
146
+                    advice_name:item.advice_name,
147
+                    manufacturer_name:this.getManufacturer(item.drug.manufacturer),
148
+                    specification_name:item.drug.dose + item.drug.dose_unit +"*"+item.drug.min_number+item.drug.min_unit+"/"+item.drug.max_unit,
149
+                    max_unit:item.drug.max_unit,
150
+                    min_unit:item.drug.min_unit,
151
+                    min_number:item.drug.min_number,
152
+                    child: [],
153
+                  }
154
+                }
155
+               })
156
+                let newArr = Object.values(dataInfo)
157
+                console.log("newArr----------------",newArr)
158
+                if(newArr!=null && newArr.length>0){
159
+                   for(let i=0;i<newArr.length;i++){
160
+                     for(let j=0;j<hisAdviceMonthList.length;j++){
161
+                       if(newArr[i].drug_id == hisAdviceMonthList[j].drug_id){
162
+                           newArr[i].child.push(hisAdviceMonthList[j])
163
+                       }
164
+                     }
165
+                   }
166
+                }
167
+                this.tableMonthList = []
168
+                this.tableMonthList = newArr
169
+
170
+              }
171
+            }
172
+
173
+            if(config.is_open == 2 || config.is_open ==0){
174
+             
175
+              if(adviceMonthList!=null && adviceMonthList.length>0){
176
+                 
177
+                if(adviceMonthList!=null && adviceMonthList.length > 0){
178
+                  let dataInfo = {}
179
+                  adviceMonthList.forEach((item, index) => {
180
+                  item.advice_name = item.advice_name.replace(/\s/g,"")
181
+                  let { advice_name } = item
182
+                  if (!dataInfo[advice_name]) {
183
+                      dataInfo[advice_name] = {
184
+                      advice_name:item.advice_name,
185
+                      child: [],
186
+                      count:0,
187
+                      specification_name:item.advice_desc +item.drug_spec_unit,
188
+                      manufacturer_name:""
189
+                    }
190
+                  }
191
+                  })
192
+                  let arr = Object.values(dataInfo)
193
+                  for(let i=0;i<arr.length;i++){
194
+                    for(let j=0;j<adviceMonthList.length;j++){
195
+                    if(arr[i].advice_name == adviceMonthList[j].advice_name){
196
+                        arr[i].child.push(adviceMonthList[j])
197
+                    }
198
+                  }
199
+                  }
200
+                   this.tableMonthList = []
201
+                   this.tableMonthList = arr
202
+                   console.log("hhhhhhhhhhhhhh",this.tableMonthList)
203
+                  }
204
+              }
205
+            }
206
+          }
207
+        })
208
+
209
+
210
+        console.log("params-=----",params)
211
+
212
+      },
213
+       getTimeOne(val) {
214
+          if(val == ""){
215
+          return ""
216
+          }else {
217
+          return uParseTime(val, '{y}-{m}-{d}')
218
+          }
219
+       },
220
+       getCount(val){
221
+         var count = 0
222
+         if(val!=null && val.length > 0){
223
+          for(let i=0;i<val.length;i++){
224
+            count += parseInt(val[i].prescribing_number)
225
+          }
226
+         }
227
+         if(count > 0){
228
+          return count
229
+         }else{
230
+          return 0
231
+         }
232
+       },
233
+      printAction: function() {
234
+      const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
235
+  
236
+      printJS({
237
+          printable: 'print_content',
238
+          type: 'html',
239
+          documentTitle: '  ',
240
+          style: style,
241
+          scanStyles: false
242
+       })
243
+      },
244
+      getSpecification(id){
245
+          var specification_name = ""
246
+          for(let i=0;i<this.druglist.length;i++){
247
+            if(id == this.druglist[i].id){
248
+              specification_name = this.druglist[i].dose+this.druglist[i].dose_unit +"*"+this.druglist[i].min_number+this.druglist[i].min_unit +"/"+this.druglist[i].max_unit
249
+            }
250
+          }
251
+          return specification_name
252
+        },
253
+       getHisCount(val,max_unit,min_unit,min_number){
254
+          var total = 0
255
+          var max_str = "";
256
+          var min_str = "";
257
+          for(let i=0;i<val.length;i++){
258
+            total+=parseInt(val[i].prescribing_number)
259
+          }
260
+          if (total < min_number) {
261
+          min_str = total + min_unit;
262
+        }
263
+        if (total == 0) {
264
+          min_str = "";
265
+          max_str = "";
266
+        }
267
+        if (total >= min_number) {
268
+          if (parseInt(total / min_number) != 0) {
269
+            max_str = parseInt(total / min_number) + max_unit;
270
+          }
271
+          if (total % min_number != 0) {
272
+            min_str = (total % min_number) + min_unit;
273
+          }
274
+        }
275
+        return max_str + min_str;
276
+          
277
+        },
278
+        getManufacturer(id){
279
+          var  manufacturer_name = ""
280
+          for(let i=0;i<this.manufacturerList.length;i++){
281
+              if(id== this.manufacturerList[i].id){
282
+                manufacturer_name = this.manufacturerList[i].manufacturer_name
283
+              }
284
+          }
285
+          return manufacturer_name
286
+      }
287
+     }
288
+    }
289
+  </script>
290
+  
291
+  <style rel="stylesheet/scss" lang="scss" scoped>
292
+    .print_main_content {
293
+      background-color: white;
294
+      width: 960px;
295
+      margin: 0 auto;
296
+      padding: 0 0 20px 0;
297
+  
298
+    .order_title_panl {
299
+      text-align: center;
300
+  
301
+    .main_title {
302
+      font-size: 18px;
303
+      line-height: 40px;
304
+      font-weight: 500;
305
+    }
306
+  
307
+    }
308
+    .table_panel {
309
+  
310
+    .table {
311
+      width: 100%;
312
+      border: 1px solid;
313
+      border-collapse: collapse;
314
+      padding: 2px;
315
+  
316
+    thead {
317
+  
318
+    tr {
319
+  
320
+    td {
321
+      border: 1px solid;
322
+      text-align: center;
323
+      font-size: 20px;
324
+      padding: 15px 5px;
325
+    }
326
+  
327
+    }
328
+    }
329
+    tbody {
330
+  
331
+    tr {
332
+  
333
+    td {
334
+      border: 1px solid;
335
+      text-align: center;
336
+      font-size: 18px;
337
+      padding: 10px 5px;
338
+  
339
+    .proj {
340
+      padding: 5px 0;
341
+      text-align: left;
342
+  
343
+    .proj_title {
344
+      font-size: 16px;
345
+      font-weight: 500;
346
+      line-height: 25px;
347
+    }
348
+  
349
+    .proj_item {
350
+      font-size: 15px;
351
+      line-height: 20px;
352
+  
353
+    .zone_name {
354
+      font-weight: 500;
355
+    }
356
+  
357
+    }
358
+    }
359
+    }
360
+    }
361
+    }
362
+    }
363
+    }
364
+    }
365
+  </style>
366
+  
367
+  

+ 309 - 0
src/xt_pages/dialysis/doctorAdviceProjectPrint.vue View File

@@ -0,0 +1,309 @@
1
+<template>
2
+    <div class="main-contain">
3
+      <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+          <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+          </el-col>
9
+        </el-row>
10
+      </div>
11
+      <div class="app-container" style="background-color: white;">
12
+  
13
+        <div id="print_content">
14
+          <div class="print_main_content">
15
+            <div class="order_title_panl">
16
+              <span class="main_title"> &nbsp;
17
+                透析耗材
18
+              </span>
19
+              <span  style="float:right;">打印日期: &nbsp;
20
+                {{ getNowTime() }}
21
+              </span>
22
+            </div>
23
+            <div class="table_panel">
24
+  
25
+              <table class="table">
26
+                <thead>
27
+                <tr>
28
+                  <td width="50">序号</td>
29
+                  <td width="100">耗材名称</td>
30
+                  <td width="100">规格</td>
31
+                  <td width="100">数量</td>
32
+                  
33
+                </tr>
34
+                </thead>
35
+                <tbody>
36
+                 <tr v-for="(item,i) in tableProjectList" :key="i">
37
+                  <td>{{i+1}}</td>
38
+                  <td>{{item.good_name}}</td>
39
+                   <td>{{item.specification_name}}</td>
40
+                  <td>
41
+                    {{item.count}}
42
+                  </td>
43
+                 </tr>
44
+                </tbody>
45
+              </table>
46
+            </div>
47
+          </div>
48
+        </div>
49
+      </div>
50
+    </div>
51
+  </template>
52
+  
53
+  <script>
54
+    import { getHisPrescrptionProjectMonthList  } from '@/api/advice'
55
+    import { parseTime } from '@/utils'
56
+    import { uParseTime } from '@/utils/tools'
57
+    import BreadCrumb from '@/xt_pages/components/bread-crumb'
58
+    import print from 'print-js'
59
+    import { getDataConfig } from '@/utils/data'
60
+    export default {
61
+      name: 'SchedulePrint',
62
+      data() {
63
+        return {
64
+          crumbs: [
65
+            { path: false, name: '排班管理' },
66
+            { path: false, name: '排班打印' }
67
+          ],
68
+          td_1_width: '8%',
69
+          td_2_width: '8%',
70
+          td_3_width: '64%',
71
+          td_4_width: '20%',
72
+          month: 1,
73
+          begin_day: 1,
74
+          total:[],
75
+          list:[],
76
+          schedule_date:"",
77
+          schedule_type:0,
78
+          partition_type:0,
79
+          keywords:"",
80
+          loading:false,
81
+          tableData:[],
82
+          numberList:[],
83
+          partitionArr:[],
84
+          his_config:{},
85
+          typeList:[],
86
+          rowList:[],
87
+          dialysate_formulation:[],
88
+          body_fluid_option:[],
89
+          displace_liqui_part_option:[],
90
+          blood_access_option:[],
91
+          hemodialysisPipelinesOptions:[],
92
+          tableList:[],
93
+          druglist:[],
94
+          config:{},
95
+          tableProjectList:[]
96
+        }
97
+      },
98
+      components: {
99
+        BreadCrumb
100
+      },
101
+      created() {
102
+        this.getlist()
103
+      },
104
+      methods: {
105
+       getNowTime: function () {
106
+            let dateTime;
107
+            let yy = new Date().getFullYear();
108
+            let mm = new Date().getMonth() + 1;
109
+            let dd = new Date().getDate();
110
+            
111
+            dateTime = yy + '-' + mm + '-' + dd
112
+            return dateTime
113
+       },
114
+       getlist(){
115
+        var params = {
116
+          start_time:this.$route.query.start_time,
117
+          end_time:this.$route.query.end_time
118
+        }
119
+        getHisPrescrptionProjectMonthList(params).then(response=>{
120
+          if(response.data.state ==1){
121
+            var projectMonthList = response.data.data.projectMonthList
122
+            console.log("projectMonthList",projectMonthList)
123
+
124
+            if(projectMonthList!=null && projectMonthList.length>0){
125
+              
126
+              let dataInfo = {}
127
+              projectMonthList.forEach((item, index) => {
128
+              let { project_id } = item
129
+              if (!dataInfo[project_id]) {
130
+                dataInfo[project_id] = {
131
+                  project_id:item.project_id,
132
+                  good_name:item.good_info.good_name,
133
+                  specification_name:item.good_info.specification_name,
134
+                  child: [],
135
+                  count:0,
136
+                }
137
+              }
138
+            })
139
+            let arr = Object.values(dataInfo)
140
+
141
+            if(arr!=null && arr.length >0){
142
+                for(let i =0;i<arr.length;i++){
143
+                  for(let j=0;j<projectMonthList.length;j++){
144
+                    if(arr[i].project_id == projectMonthList[j].project_id){
145
+                        arr[i].child.push(projectMonthList[j])
146
+                    }
147
+                  }
148
+                }
149
+                for(let i =0;i<arr.length;i++){
150
+                  for(let j=0;j<arr[i].child.length;j++){
151
+                    arr[i].count += parseInt(arr[i].child[j].count)
152
+                  }
153
+                }
154
+
155
+                console.log("arr0000000000000000000000",arr)
156
+                this.tableProjectList = []
157
+                this.tableProjectList = arr
158
+
159
+             }
160
+            }
161
+          }
162
+        })
163
+       },
164
+       getTimeOne(val) {
165
+          if(val == ""){
166
+          return ""
167
+          }else {
168
+          return uParseTime(val, '{y}-{m}-{d}')
169
+          }
170
+       },
171
+       getCount(val){
172
+         var count = 0
173
+         if(val!=null && val.length > 0){
174
+          for(let i=0;i<val.length;i++){
175
+            count += parseInt(val[i].prescribing_number)
176
+          }
177
+         }
178
+         if(count > 0){
179
+          return count
180
+         }else{
181
+          return 0
182
+         }
183
+       },
184
+      printAction: function() {
185
+      const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
186
+  
187
+      printJS({
188
+          printable: 'print_content',
189
+          type: 'html',
190
+          documentTitle: '  ',
191
+          style: style,
192
+          scanStyles: false
193
+       })
194
+      },
195
+      getSpecification(id){
196
+          var specification_name = ""
197
+          for(let i=0;i<this.druglist.length;i++){
198
+            if(id == this.druglist[i].id){
199
+              specification_name = this.druglist[i].dose+this.druglist[i].dose_unit +"*"+this.druglist[i].min_number+this.druglist[i].min_unit +"/"+this.druglist[i].max_unit
200
+            }
201
+          }
202
+          return specification_name
203
+        },
204
+       getHisCount(val,max_unit,min_unit,min_number){
205
+          var total = 0
206
+          var max_str = "";
207
+          var min_str = "";
208
+          for(let i=0;i<val.length;i++){
209
+            total+=parseInt(val[i].prescribing_number)
210
+          }
211
+          if (total < min_number) {
212
+          min_str = total + min_unit;
213
+        }
214
+        if (total == 0) {
215
+          min_str = "";
216
+          max_str = "";
217
+        }
218
+        if (total >= min_number) {
219
+          if (parseInt(total / min_number) != 0) {
220
+            max_str = parseInt(total / min_number) + max_unit;
221
+          }
222
+          if (total % min_number != 0) {
223
+            min_str = (total % min_number) + min_unit;
224
+          }
225
+        }
226
+        return max_str + min_str;
227
+          
228
+        },
229
+     }
230
+    }
231
+  </script>
232
+  
233
+  <style rel="stylesheet/scss" lang="scss" scoped>
234
+    .print_main_content {
235
+      background-color: white;
236
+      width: 960px;
237
+      margin: 0 auto;
238
+      padding: 0 0 20px 0;
239
+  
240
+    .order_title_panl {
241
+      text-align: center;
242
+  
243
+    .main_title {
244
+      font-size: 18px;
245
+      line-height: 40px;
246
+      font-weight: 500;
247
+    }
248
+  
249
+    }
250
+    .table_panel {
251
+  
252
+    .table {
253
+      width: 100%;
254
+      border: 1px solid;
255
+      border-collapse: collapse;
256
+      padding: 2px;
257
+  
258
+    thead {
259
+  
260
+    tr {
261
+  
262
+    td {
263
+      border: 1px solid;
264
+      text-align: center;
265
+      font-size: 20px;
266
+      padding: 15px 5px;
267
+    }
268
+  
269
+    }
270
+    }
271
+    tbody {
272
+  
273
+    tr {
274
+  
275
+    td {
276
+      border: 1px solid;
277
+      text-align: center;
278
+      font-size: 18px;
279
+      padding: 10px 5px;
280
+  
281
+    .proj {
282
+      padding: 5px 0;
283
+      text-align: left;
284
+  
285
+    .proj_title {
286
+      font-size: 16px;
287
+      font-weight: 500;
288
+      line-height: 25px;
289
+    }
290
+  
291
+    .proj_item {
292
+      font-size: 15px;
293
+      line-height: 20px;
294
+  
295
+    .zone_name {
296
+      font-weight: 500;
297
+    }
298
+  
299
+    }
300
+    }
301
+    }
302
+    }
303
+    }
304
+    }
305
+    }
306
+    }
307
+  </style>
308
+  
309
+  

+ 411 - 2
src/xt_pages/dialysis/newDoctorAdvice.vue View File

@@ -187,8 +187,13 @@
187 187
 
188 188
         <el-button type="primary" size="small" @click="toStaticOne" v-if="org_id == 9671 || org_id==10340">药品统计</el-button>
189 189
 
190
+
191
+        <el-button type="primary" size="small" @click="toStaticThree">药品月统计</el-button>
192
+
190 193
         <el-button type="primary" size="small" @click="toStaticTwo">耗材统计</el-button>
191 194
 
195
+        <el-button type="primary" size="small" @click="toStaticFour">耗材月统计</el-button>
196
+
192 197
 
193 198
       </div>
194 199
 
@@ -815,6 +820,171 @@
815 820
         <el-button type="primary" @click="startdialogVisibleTwo = false">确 定</el-button>
816 821
       </span>
817 822
     </el-dialog>
823
+
824
+    <el-dialog
825
+      title="药品月统计表"
826
+      :visible.sync="startMothdialogVisible"
827
+      width="60%">
828
+      <span>
829
+        <div class="cell clearfix" style="margin-bottom:10px">
830
+          <label class="title"> <span class="name">日期查询</span> : </label>
831
+          开始:
832
+          <el-date-picker
833
+            v-model="start_time"
834
+            prefix-icon="el-icon-date"
835
+            :editable="false"
836
+            style="width: 250px;"
837
+            type="date"
838
+            placeholder="选择日期时间"
839
+            align="right"
840
+            format="yyyy-MM-dd"
841
+            value-format="yyyy-MM-dd"
842
+           
843
+        ></el-date-picker>
844
+          结束:
845
+          <el-date-picker
846
+            v-model="end_time"
847
+            prefix-icon="el-icon-date"
848
+            :editable="false"
849
+            style="width: 250px;"
850
+            type="date"
851
+            placeholder="选择日期时间"
852
+            align="right"
853
+            format="yyyy-MM-dd"
854
+            value-format="yyyy-MM-dd"
855
+           
856
+        ></el-date-picker>
857
+           <el-button size="small"  @click="getAllQuery" type="primary">查询</el-button>
858
+           <el-button size="small" icon="el-icon-printer"  @click="toPrintTen" type="primary">打印</el-button>
859
+           <el-button size="small"  @click="toExportListThree" type="primary">导出</el-button>
860
+        </div>
861
+     
862
+      <el-table
863
+        :data="tableMonthList"
864
+        border
865
+        :row-style="{ color: '#303133' }"
866
+        :header-cell-style="{
867
+          backgroundColor: 'rgb(245, 247, 250)',
868
+          color: '#606266'
869
+        }"
870
+      >
871
+         <el-table-column  align="center"  label="序号">
872
+           <template slot-scope="scope">
873
+              {{scope.$index+1}}
874
+           </template>
875
+        </el-table-column>
876
+        <el-table-column  align="center"   label="药品名称">
877
+         <template slot-scope="scope">
878
+            {{scope.row.advice_name}}
879
+          </template>
880
+        </el-table-column>
881
+        <el-table-column  align="center"  label="规格">
882
+           <template slot-scope="scope">
883
+             {{scope.row.specification_name}}
884
+           </template>
885
+        </el-table-column>
886
+
887
+        <el-table-column  align="center"   label="数量">
888
+           <template slot-scope="scope">
889
+             <span v-if="config.is_open!=1">{{getCount(scope.row.child)}}</span>
890
+             <span v-if="config.is_open ==1">{{getHisCount(scope.row.child,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
891
+           </template>
892
+        </el-table-column>
893
+      
894
+        <el-table-column align="center" label="厂家">
895
+           <template slot-scope="scope">
896
+             {{scope.row.manufacturer_name}}
897
+           </template>
898
+        </el-table-column>
899
+
900
+
901
+      </el-table>
902
+      </span>
903
+      <span slot="footer" class="dialog-footer">
904
+        <el-button @click="startMothdialogVisible = false">取 消</el-button>
905
+        <el-button type="primary" @click="startMothdialogVisible = false">确 定</el-button>
906
+      </span>
907
+    </el-dialog>
908
+
909
+
910
+    <el-dialog
911
+      title="耗材统计表"
912
+      :visible.sync="startMonthdialogVisible"
913
+      width="60%">
914
+      <span>
915
+        <div class="cell clearfix" style="margin-bottom:10px">
916
+          <label class="title"> <span class="name">日期查询</span> : </label>
917
+          开始:
918
+          <el-date-picker
919
+            v-model="start_time"
920
+            prefix-icon="el-icon-date"
921
+            :editable="false"
922
+            style="width: 250px;"
923
+            type="date"
924
+            placeholder="选择日期时间"
925
+            align="right"
926
+            format="yyyy-MM-dd"
927
+            value-format="yyyy-MM-dd"
928
+           
929
+        ></el-date-picker>
930
+          结束:
931
+          <el-date-picker
932
+            v-model="end_time"
933
+            prefix-icon="el-icon-date"
934
+            :editable="false"
935
+            style="width: 250px;"
936
+            type="date"
937
+            placeholder="选择日期时间"
938
+            align="right"
939
+            format="yyyy-MM-dd"
940
+            value-format="yyyy-MM-dd"
941
+           
942
+        ></el-date-picker>
943
+           <el-button size="small"  @click="getGoodAllQuery" type="primary">查询</el-button>
944
+           <el-button size="small" icon="el-icon-printer"  @click="toExportListFour" type="primary">打印</el-button>
945
+           <el-button size="small"  @click="toExportListFour" type="primary">导出</el-button>
946
+        </div>
947
+      <el-table
948
+        :data="tableProjectList"
949
+        border
950
+        :row-style="{ color: '#303133' }"
951
+        :header-cell-style="{
952
+          backgroundColor: 'rgb(245, 247, 250)',
953
+          color: '#606266'
954
+        }"
955
+      >
956
+         <el-table-column  align="center"  label="序号">
957
+           <template slot-scope="scope">
958
+              {{scope.$index+1}}
959
+           </template>
960
+        </el-table-column>
961
+        <el-table-column  align="center"   label="耗材名称">
962
+         <template slot-scope="scope">
963
+            {{scope.row.good_name}}
964
+          </template>
965
+        </el-table-column>
966
+        <el-table-column  align="center"  label="规格">
967
+           <template slot-scope="scope">
968
+             {{scope.row.specification_name}}
969
+           </template>
970
+        </el-table-column>
971
+
972
+        <el-table-column  align="center"   label="数量">
973
+           <template slot-scope="scope">
974
+              {{scope.row.count}}
975
+           </template>
976
+        </el-table-column>
977
+
978
+
979
+
980
+      </el-table>
981
+      </span>
982
+      <span slot="footer" class="dialog-footer">
983
+        <el-button @click="startMonthdialogVisible = false">取 消</el-button>
984
+        <el-button type="primary" @click="startMonthdialogVisible = false">确 定</el-button>
985
+      </span>
986
+    </el-dialog>
987
+
818 988
     </div>
819 989
 
820 990
 
@@ -828,7 +998,7 @@ import { parseTime } from "@/utils";
828 998
 import { uParseTime } from '@/utils/tools'
829 999
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
830 1000
 import { getPrintTemplate } from "@/api/data";
831
-import { getNewSchedualDoctors,excutionDoctorAdvice,checkNewDoctorAdvice,settleNewDoctorAdvice,excutionDoctorAdviceById,GetMobileScheduleList } from '@/api/advice'
1001
+import { getNewSchedualDoctors,excutionDoctorAdvice,checkNewDoctorAdvice,settleNewDoctorAdvice,excutionDoctorAdviceById,GetMobileScheduleList,getDoctorAdviceMonthList,getHisPrescrptionProjectMonthList } from '@/api/advice'
832 1002
 import { PostSearch } from '@/api/patient'
833 1003
 export default {
834 1004
   name: "Patient",
@@ -906,6 +1076,7 @@ export default {
906 1076
       startdialogVisible:false,
907 1077
       startdialogVisibleOne:false,
908 1078
       startdialogVisibleTwo:false,
1079
+      startMonthdialogVisible:false,
909 1080
       schedule_type:0,
910 1081
       partion_type:0,
911 1082
       druglist:[],
@@ -920,7 +1091,13 @@ export default {
920 1091
       partion_str:"",
921 1092
       keyword:"",
922 1093
       tableProjectList:[],
923
-      manufacturerList:[]
1094
+      manufacturerList:[],
1095
+      start_time: moment().startOf('month').format('YYYY-MM-DD'),
1096
+      end_time: moment().endOf('month').format('YYYY-MM-DD'),
1097
+      startMothdialogVisible:false,
1098
+      adviceMonthList:[],
1099
+      hisAdviceMonthList:[],
1100
+      tableMonthList:[]
924 1101
     };
925 1102
   },
926 1103
   created() {
@@ -2188,6 +2365,156 @@ export default {
2188 2365
            }
2189 2366
          })
2190 2367
       },
2368
+      getAllQuery(){
2369
+        this.toStaticThree()
2370
+      },
2371
+      toStaticThree(){
2372
+        var params = {
2373
+          start_time:this.start_time,
2374
+          end_time:this.end_time
2375
+        }
2376
+        getDoctorAdviceMonthList(params).then(response=>{
2377
+          if(response.data.state == 1){
2378
+            this.startMothdialogVisible = true
2379
+            var config = response.data.data.config
2380
+            this.config = {}
2381
+            this.config = config
2382
+            var drugs = response.data.data.drugs
2383
+            this.druglist = []
2384
+            this.druglist = drugs
2385
+            var manufacturerList =  response.data.data.manufacturerList
2386
+            this.manufacturerList = []
2387
+            this.manufacturerList = manufacturerList
2388
+            var adviceMonthList = response.data.data.adviceList
2389
+            var hisAdviceMonthList = response.data.data.hisAdviceList
2390
+            if(config.is_open == 1){
2391
+               
2392
+              if(hisAdviceMonthList!=null && hisAdviceMonthList.length>0){
2393
+                let dataInfo = {}
2394
+                hisAdviceMonthList.forEach((item, index) => {
2395
+                let { drug_id } = item
2396
+                if (!dataInfo[drug_id])  {
2397
+                  dataInfo[drug_id] = {
2398
+                    drug_id:item.drug_id,
2399
+                    advice_name:item.advice_name,
2400
+                    manufacturer_name:this.getManufacturer(item.drug.manufacturer),
2401
+                    specification_name:item.drug.dose + item.drug.dose_unit +"*"+item.drug.min_number+item.drug.min_unit+"/"+item.drug.max_unit,
2402
+                    max_unit:item.drug.max_unit,
2403
+                    min_unit:item.drug.min_unit,
2404
+                    min_number:item.drug.min_number,
2405
+                    child: [],
2406
+                  }
2407
+                }
2408
+               })
2409
+                let newArr = Object.values(dataInfo)
2410
+                console.log("newArr----------------",newArr)
2411
+                if(newArr!=null && newArr.length>0){
2412
+                   for(let i=0;i<newArr.length;i++){
2413
+                     for(let j=0;j<hisAdviceMonthList.length;j++){
2414
+                       if(newArr[i].drug_id == hisAdviceMonthList[j].drug_id){
2415
+                           newArr[i].child.push(hisAdviceMonthList[j])
2416
+                       }
2417
+                     }
2418
+                   }
2419
+                }
2420
+                this.tableMonthList = []
2421
+                this.tableMonthList = newArr
2422
+
2423
+              }
2424
+            }
2425
+
2426
+            if(config.is_open == 2 || config.is_open ==0){
2427
+             
2428
+              if(adviceMonthList!=null && adviceMonthList.length>0){
2429
+                 
2430
+                if(adviceMonthList!=null && adviceMonthList.length > 0){
2431
+                  let dataInfo = {}
2432
+                  adviceMonthList.forEach((item, index) => {
2433
+                  item.advice_name = item.advice_name.replace(/\s/g,"")
2434
+                  let { advice_name } = item
2435
+                  if (!dataInfo[advice_name]) {
2436
+                      dataInfo[advice_name] = {
2437
+                      advice_name:item.advice_name,
2438
+                      child: [],
2439
+                      count:0,
2440
+                      specification_name:item.advice_desc +item.drug_spec_unit,
2441
+                      manufacturer_name:""
2442
+                    }
2443
+                  }
2444
+                  })
2445
+                  let arr = Object.values(dataInfo)
2446
+                  for(let i=0;i<arr.length;i++){
2447
+                    for(let j=0;j<adviceMonthList.length;j++){
2448
+                    if(arr[i].advice_name == adviceMonthList[j].advice_name){
2449
+                        arr[i].child.push(adviceMonthList[j])
2450
+                    }
2451
+                  }
2452
+                  }
2453
+                   this.tableMonthList = []
2454
+                   this.tableMonthList = arr
2455
+                   console.log("hhhhhhhhhhhhhh",this.tableMonthList)
2456
+                  }
2457
+              }
2458
+            }
2459
+          }
2460
+        })
2461
+
2462
+
2463
+        console.log("params-=----",params)
2464
+
2465
+      },
2466
+      toStaticFour(){
2467
+        var params = {
2468
+          start_time:this.start_time,
2469
+          end_time:this.end_time
2470
+        }
2471
+        getHisPrescrptionProjectMonthList(params).then(response=>{
2472
+          if(response.data.state ==1){
2473
+            var projectMonthList = response.data.data.projectMonthList
2474
+            console.log("projectMonthList",projectMonthList)
2475
+
2476
+            if(projectMonthList!=null && projectMonthList.length>0){
2477
+              
2478
+              let dataInfo = {}
2479
+              projectMonthList.forEach((item, index) => {
2480
+              let { project_id } = item
2481
+              if (!dataInfo[project_id]) {
2482
+                dataInfo[project_id] = {
2483
+                  project_id:item.project_id,
2484
+                  good_name:item.good_info.good_name,
2485
+                  specification_name:item.good_info.specification_name,
2486
+                  child: [],
2487
+                  count:0,
2488
+                }
2489
+              }
2490
+            })
2491
+            let arr = Object.values(dataInfo)
2492
+
2493
+            if(arr!=null && arr.length >0){
2494
+                for(let i =0;i<arr.length;i++){
2495
+                  for(let j=0;j<projectMonthList.length;j++){
2496
+                    if(arr[i].project_id == projectMonthList[j].project_id){
2497
+                        arr[i].child.push(projectMonthList[j])
2498
+                    }
2499
+                  }
2500
+                }
2501
+                for(let i =0;i<arr.length;i++){
2502
+                  for(let j=0;j<arr[i].child.length;j++){
2503
+                    arr[i].count += parseInt(arr[i].child[j].count)
2504
+                  }
2505
+                }
2506
+
2507
+                console.log("arr0000000000000000000000",arr)
2508
+
2509
+                this.startMonthdialogVisible = true
2510
+                this.tableProjectList = []
2511
+                this.tableProjectList = arr
2512
+
2513
+             }
2514
+            }
2515
+          }
2516
+        })
2517
+      },
2191 2518
       getDrugAdviceCount(advice_name,zone_name){
2192 2519
         var str = ""
2193 2520
         var arr =[]
@@ -2330,6 +2657,56 @@ export default {
2330 2657
             this.downloadLoading = false
2331 2658
           })
2332 2659
       },
2660
+      toExportListThree(){
2661
+        import('@/vendor/Export2Excel').then(excel => {
2662
+
2663
+          if(this.tableMonthList!=null && this.tableMonthList.length > 0){
2664
+            for(let i=0;i<this.tableMonthList.length;i++){
2665
+              this.tableMonthList[i].index = i+1
2666
+              if(this.config.is_open == 1){
2667
+                this.tableMonthList[i].total_count = this.getHisCount(this.tableMonthList[i].child,this.tableMonthList[i].max_unit,this.tableMonthList[i].min_unit,this.tableMonthList[i].min_number)
2668
+              }
2669
+              if(this.config.is_open!=1){
2670
+                this.tableMonthList[i].total_count = this.getCount(this.tableMonthList[i].child)
2671
+              }
2672
+
2673
+            }
2674
+          }
2675
+          const tHeader = ['序号','药品名称','规格','数量','厂家']
2676
+          const filterVal = ['index','advice_name','specification_name','total_count','manufacturer_name']
2677
+
2678
+          const data = this.formatJson(filterVal, this.tableMonthList)
2679
+          excel.export_json_to_excel({
2680
+            header: tHeader,
2681
+            data,
2682
+            filename: '药品月统计'
2683
+          })
2684
+            this.downloadLoading = false
2685
+          })
2686
+      },
2687
+      toExportListFour(){
2688
+        import('@/vendor/Export2Excel').then(excel => {
2689
+
2690
+          if(this.tableProjectList!=null && this.tableProjectList.length > 0){
2691
+            for(let i=0;i<this.tableProjectList.length;i++){
2692
+              this.tableProjectList[i].index = i+1
2693
+            }
2694
+          }
2695
+          const tHeader = ['序号','耗材名称','规格','数量']
2696
+          const filterVal = ['index','good_name','specification_name','count']
2697
+
2698
+          const data = this.formatJson(filterVal, this.tableProjectList)
2699
+          excel.export_json_to_excel({
2700
+            header: tHeader,
2701
+            data,
2702
+            filename: '耗材统计'
2703
+          })
2704
+            this.downloadLoading = false
2705
+          })
2706
+      },
2707
+      getGoodAllQuery(){
2708
+        this.toExportListThree()
2709
+      },
2333 2710
       formatJson(filterVal, jsonData) {
2334 2711
         return jsonData.map(v => filterVal.map(j => v[j]));
2335 2712
       },
@@ -2689,6 +3066,38 @@ export default {
2689 3066
             }
2690 3067
         }
2691 3068
         return manufacturer_name
3069
+    },
3070
+    getDrugName(drug_id,drugs){
3071
+      
3072
+      var drug_name = ""
3073
+      for(let i=0;i<drugs.length;i++){
3074
+         if(drug_id == drugs[i].id){
3075
+            drug_name = drugs[i].drug_name
3076
+         }
3077
+      }
3078
+      return drug_name
3079
+    },
3080
+    getMonthManufacturer(drug_id,drugs,manufacturerList){
3081
+      var manufacturer = 0
3082
+      for(let i=0;i<drugs.length;i++){
3083
+         if(drug_id == drugs[i].id){
3084
+          manufacturer = drugs[i].manufacturer
3085
+         }
3086
+      }
3087
+   
3088
+      var  manufacturer_name = ""
3089
+        for(let i=0;i<manufacturerList.length;i++){
3090
+            if(manufacturer== manufacturerList[i].id){
3091
+              manufacturer_name = manufacturerList[i].manufacturer_name
3092
+            }
3093
+        }
3094
+        return manufacturer_name
3095
+    },
3096
+    toPrintTen(){
3097
+      this.$router.push("/dialysis/doctorMonthAdviceStaticPrint?start_time="+this.start_time+"&end_time="+this.end_time)
3098
+    },
3099
+    toPrintTenOne(){
3100
+      this.$router.push("/dialysis/doctocAdviceProjectPrint?start_time="+this.start_time+"&end_time="+this.end_time)
2692 3101
     }
2693 3102
 
2694 3103
   },

+ 70 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

@@ -863,6 +863,76 @@
863 863
                       >
864 864
                       HDF1000
865 865
                       </div>
866
+                      <div
867
+                        class="under_line"
868
+                        style="
869
+                          width: 100px;
870
+                          text-align: center;
871
+                          font-weight: 600;
872
+                        "
873
+                        v-if="prescription.mode_id == 38"
874
+                      >
875
+                      HDF80
876
+                      </div>
877
+                      <div
878
+                        class="under_line"
879
+                        style="
880
+                          width: 100px;
881
+                          text-align: center;
882
+                          font-weight: 600;
883
+                        "
884
+                        v-if="prescription.mode_id == 39"
885
+                      >
886
+                      HF16
887
+                      </div>
888
+
889
+                      <div
890
+                        class="under_line"
891
+                        style="
892
+                          width: 100px;
893
+                          text-align: center;
894
+                          font-weight: 600;
895
+                        "
896
+                        v-if="prescription.mode_id == 40"
897
+                      >
898
+                      HD(无肝素)
899
+                      </div>
900
+
901
+                      <div
902
+                        class="under_line"
903
+                        style="
904
+                          width: 100px;
905
+                          text-align: center;
906
+                          font-weight: 600;
907
+                        "
908
+                        v-if="prescription.mode_id == 41"
909
+                      >
910
+                      HDF17H
911
+                      </div>
912
+
913
+                      <div
914
+                        class="under_line"
915
+                        style="
916
+                          width: 100px;
917
+                          text-align: center;
918
+                          font-weight: 600;
919
+                        "
920
+                        v-if="prescription.mode_id == 42"
921
+                      >
922
+                       HD.
923
+                      </div>
924
+
925
+                      <div
926
+                        class="under_line"
927
+                        style="
928
+                          width: 100px;
929
+                          text-align: center;
930
+                          font-weight: 600;
931
+                        "
932
+                        v-if="prescription.mode_id == 43"
933
+                      >
934
+                        HD(2)
935
+                      </div>
866 936
                     </div>
867 937
 
868 938
                     <div

+ 61 - 35
src/xt_pages/outpatientTool/components/gather.vue View File

@@ -122,8 +122,8 @@ export default {
122 122
        costClassify:getDictionaryDataConfig('system','cost_classify'),
123 123
       tableData: [],
124 124
       chargeDate: [moment(new Date()).add('year', 0).format('YYYY-MM-DD'), moment(new Date()).add('year', 0).format('YYYY-MM-DD')],
125
-      item_type: '0',
126
-      new_item_type:0,
125
+      item_type: "",
126
+      new_item_type:"",
127 127
       item_time_type:'1',
128 128
       items: [
129 129
         { id: 1, name: '药品' },
@@ -165,12 +165,26 @@ export default {
165 165
       // this.getSummaryDetailList()
166 166
     },
167 167
     changeItem() {
168
+      // console.log("-----")
169
+      // this.tableData = []
168 170
       this.new_item_type = this.item_type
169 171
       if(this.item_type == 1){
170 172
         this.new_item_type = -100
171 173
       }else if(this.item_type == 5){
172 174
         this.new_item_type = -200
173 175
       }
176
+      //
177
+      // if(this.new_item_type == 0){
178
+      //   this.tableData = this.all_table_data
179
+      // }else{
180
+      //   let new_table_data = []
181
+      //   for(let aa = 0; aa < this.all_table_data.length; aa++){
182
+      //     if(this.new_item_type == this.all_table_data[aa].cost_classify){
183
+      //       new_table_data.push(this.all_table_data[aa])
184
+      //     }
185
+      //   }
186
+      //   this.tableData = new_table_data
187
+      // }
174 188
       // this.getSummaryDetailList()
175 189
     }, uniquepid(arr) {
176 190
       const res = new Map()
@@ -288,7 +302,6 @@ export default {
288 302
               }
289 303
               new_obj.items.push(obj)
290 304
             }
291
-
292 305
             tempPatientsThree.push(new_obj)
293 306
           }
294 307
 
@@ -299,18 +312,20 @@ export default {
299 312
           for(let i = 0; i < tempPatientsThree.length;i++){
300 313
             let sum = 0
301 314
             for(let b = 0; b < tempPatientsThree[i].items.length;b++){
302
-              let obj = {
315
+              let obj2 = {
303 316
                 name:tempPatientsThree[i].items[b].name,
304 317
                 cost_classify:tempPatientsThree[i].items[b].cost_classify,
305 318
                 price:tempPatientsThree[i].items[b].price,
306
-                patient_id:tempPatientsThree[i].items[b].patient_id,
319
+                patient_id:tempPatientsThree[i].patient_id,
307 320
                 item_name:tempPatientsThree[i].items[b].item_name,
308 321
                 sum:0,
309 322
               }
310 323
               sum = sum + tempPatientsThree[i].items[b].price
311
-              this.tableData.push(obj)
312
-              this.all_table_data.push(obj)
324
+              console.log(obj2)
325
+              this.tableData.push(obj2)
326
+              this.all_table_data.push(obj2)
313 327
             }
328
+
314 329
             for(let c = 0; c < this.tableData.length;c++){
315 330
               if(tempPatientsThree[i].patient_id == this.tableData[c].patient_id){
316 331
                 this.tableData[c].sum = sum
@@ -335,6 +350,7 @@ export default {
335 350
             this.tableData = new_table_data
336 351
           }
337 352
           this.handleSpanTempArr()
353
+          // this.getTotal()
338 354
         }
339 355
       })
340 356
     },getName(cost_classify){
@@ -384,10 +400,7 @@ export default {
384 400
       }
385 401
       return res
386 402
     },unique3(array) {
387
-      console.log("-----11122222")
388 403
 
389
-      console.log(array)
390
-      // res用来存储结果
391 404
       var res = []
392 405
       for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
393 406
         for (var j = 0, resLen = res.length; j < resLen; j++) {
@@ -401,18 +414,6 @@ export default {
401 414
         }
402 415
       }
403 416
       return res
404
-    }, sort(arr) {
405
-      for (var i = 0; i < arr.length - 1; i++) {
406
-        for (var j = 0; j < arr.length - i - 1; j++) {
407
-          if (arr[j].patient_id > arr[j + 1].patient_id) {// 相邻元素两两对比
408
-            var hand = arr[j]
409
-            arr[j] = arr[j + 1]
410
-            arr[j + 1] = hand
411
-
412
-          }
413
-        }
414
-      }
415
-      return arr
416 417
     }, handleSpanTempArr() {
417 418
       this.tempArr = []
418 419
 
@@ -431,8 +432,8 @@ export default {
431 432
           }
432 433
         }
433 434
       }
434
-      console.log('this.tableData',this.tableData);
435
-      
435
+      // console.log('this.tableData',this.tableData);
436
+
436 437
       let sameRowArr = [], sIdx = 0
437 438
       this.tableData.forEach((item, index) => {
438 439
         item.index = index
@@ -448,8 +449,8 @@ export default {
448 449
         }
449 450
       })
450 451
       this.sameRowArr = sameRowArr
451
-      console.log('this.sameRowArr',this.sameRowArr);
452
-      
452
+      // console.log('this.sameRowArr',this.sameRowArr);
453
+
453 454
     }, merge({ row, column, rowIndex, columnIndex }) {
454 455
       if (columnIndex === 0 || columnIndex === 3) {
455 456
         const _row = this.tempArr[rowIndex]
@@ -459,26 +460,51 @@ export default {
459 460
           colspan: _col
460 461
         }
461 462
       }
462
-    }, getTotal(param) {
463
+    }, deepCopy(obj) {
464
+        if ((obj === null) || (typeof obj !== 'object')) {
465
+          return obj;
466
+        }
467
+
468
+        if (obj instanceof Date) {
469
+          return new Date(obj.getTime());
470
+        }
471
+
472
+        if (obj instanceof Array) {
473
+          return obj.reduce((arr, item, i) => {
474
+            arr[i] = this.deepCopy(item);
475
+            return arr;
476
+          }, []);
477
+        }
478
+
479
+        if (obj instanceof Object) {
480
+          return Object.keys(obj).reduce((newObj, key) => {
481
+            newObj[key] = this.deepCopy(obj[key]);
482
+            return newObj;
483
+          }, {});
484
+        }
485
+  },getTotal(param) {
463 486
       const { columns, data } = param
464 487
       const sums = []
488
+      console.log(data)
465 489
       columns.forEach((column, index) => {
466 490
         if (index === 0) {
467 491
           sums[index] = '合计'
468 492
           return
469 493
         }
470
-        console.log('data',data)
471
-        for(let i=0;i<data.length;i++){
472
-          for(let j=i+1;j<data.length;j++){
473
-            if(data[i].patient_id == data[j].patient_id){
474
-              data.splice(j,1)
494
+       var data2  = this.deepCopy(data)
495
+        // var data2 = data
496
+        // console.log('data',data)
497
+        for(let i=0;i<data2.length;i++){
498
+          for(let j=i+1;j<data2.length;j++){
499
+            if(data2[i].patient_id == data2[j].patient_id){
500
+              data2.splice(j,1)
475 501
               j--
476 502
             }
477 503
           }
478 504
         }
479
-        console.log('data111',data);
480
-        
481
-        const values = data.map(item => Number(item[column.property]))
505
+        // console.log('data111',data);
506
+
507
+        const values = data2.map(item => Number(item[column.property]))
482 508
         if (column.property === 'sum') {
483 509
           sums[index] = values.reduce((prev, curr) => {
484 510
             const value = Number(curr)

+ 2 - 2
src/xt_pages/stock/stockInventory.vue View File

@@ -22,9 +22,9 @@
22 22
                 <stockDamaged ref="childOne"></stockDamaged>
23 23
             </el-tab-pane>
24 24
 
25
-            <!-- <el-tab-pane label="盘点日志表" name="seven">
25
+            <el-tab-pane label="盘点日志表" name="seven">
26 26
                 <inventory-record ref="childSeven"></inventory-record>
27
-            </el-tab-pane> -->
27
+            </el-tab-pane>
28 28
         </el-tabs>
29 29
         
30 30
     </div>

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

@@ -8,6 +8,8 @@
8 8
     <div class="patient-app-container app-container">
9 9
       <div style="clearfix">
10 10
 
11
+       
12
+
11 13
         <el-button
12 14
           style="float:right;"
13 15
           size="small"
@@ -834,6 +836,7 @@ export default {
834 836
         });
835 837
       }, 1);
836 838
     },
839
+   
837 840
     clickCurrent(val) {
838 841
 
839 842
       this.patient_id = val.patient_id

+ 348 - 0
src/xt_pages/user/dialysisRecordPrint.vue View File

@@ -0,0 +1,348 @@
1
+<template>
2
+    <div class="main-contain">
3
+      <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+          <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+          </el-col>
9
+        </el-row>
10
+      </div>
11
+      <div class="app-container" style="background-color: white;">
12
+  
13
+        <div id="print_content">
14
+          <div class="print_main_content">
15
+            <div class="order_title_panl">
16
+              <span class="main_title"> &nbsp;
17
+                透析并发症登记
18
+              </span>
19
+              <span  style="float:right;">打印日期: &nbsp;
20
+                  {{ getNowTime() }}
21
+              </span>
22
+            </div>
23
+            <div class="table_panel">
24
+  
25
+              <table class="table">
26
+                <thead>
27
+                <tr>
28
+                  <td width="50">序号</td>
29
+                  <td width="100">时间</td>
30
+                  <td width="100">姓名</td>
31
+                  <td width="100">性别</td>
32
+                  <td width="100">诊断</td>
33
+                  <td width="100">透析并发症</td>
34
+                  <td width="100">症状及处理</td>
35
+                  <td width="100">结果</td>
36
+                </tr>
37
+                </thead>
38
+                <tbody>
39
+                  <tr v-for="(item,i) in tableDataList" :key="i">
40
+                  <td width="50">{{ i+1 }}</td>
41
+                  <td width="100">{{ getTime(item.schedule_date) }}</td>
42
+                  <td width="100">{{item.patient.name}}</td>
43
+                  <td width="100">
44
+                    <span v-if="item.patient.gender==1">男</span>
45
+                    <span v-if="item.patient.gender==2">女</span>
46
+                  </td>
47
+                  <td width="100">{{ item.patient.diagnose }}</td>
48
+                  <td width="100">
49
+                    {{ item.assessment_before_dislysis.complication }}
50
+                  </td>
51
+                  <td width="100">
52
+                    {{ getMonitorSymptom(item.monitoring_record) }} {{ getMonitorDispose(item.monitoring_record) }}
53
+                  </td>
54
+                  <td width="100">{{ getMonitorSymptomResult(item.monitoring_record) }}</td>
55
+                  </tr>
56
+                </tbody>
57
+              </table>
58
+            </div>
59
+          </div>
60
+        </div>
61
+      </div>
62
+    </div>
63
+  </template>
64
+  
65
+  <script>
66
+    import { parseTime } from '@/utils'
67
+    import { uParseTime } from '@/utils/tools'
68
+    import BreadCrumb from '@/xt_pages/components/bread-crumb'
69
+    import print from 'print-js'
70
+    import { getDataConfig } from '@/utils/data'
71
+    import { getSchedualPatient } from "@/api/dialysis";
72
+    export default {
73
+      name: 'SchedulePrint',
74
+      data() {
75
+        return {
76
+          crumbs: [
77
+            { path: false, name: '排班管理' },
78
+            { path: false, name: '排班打印' }
79
+          ],
80
+          td_1_width: '8%',
81
+          td_2_width: '8%',
82
+          td_3_width: '64%',
83
+          td_4_width: '20%',
84
+          month: 1,
85
+          begin_day: 1,
86
+          total:[],
87
+          list:[],
88
+          schedule_date:"",
89
+          schedule_type:0,
90
+          partition_type:0,
91
+          keywords:"",
92
+          loading:false,
93
+          tableData:[],
94
+          numberList:[],
95
+          partitionArr:[],
96
+          his_config:{},
97
+          typeList:[],
98
+          rowList:[],
99
+          dialysate_formulation:[],
100
+          body_fluid_option:[],
101
+          displace_liqui_part_option:[],
102
+          blood_access_option:[],
103
+          hemodialysisPipelinesOptions:[],
104
+          tableList:[],
105
+          druglist:[],
106
+          config:{},
107
+          org_id:0,
108
+          manufacturerList:[],
109
+          tableMonthList:[],
110
+          tableDataList:[],
111
+        }
112
+      },
113
+      components: {
114
+        BreadCrumb
115
+      },
116
+      created() {
117
+        this.org_id = this.$store.getters.xt_user.template_info.org_id;
118
+ 
119
+         this.getlist()
120
+      },
121
+      methods: {
122
+        getMonitorDispose(val){
123
+          var dispose = ""
124
+          if(val!=null && val.length>0){
125
+
126
+            for(let i=0;i<val.length;i++){
127
+              dispose +=val[i].dispose+" "
128
+            }
129
+          }
130
+          return dispose
131
+        },
132
+        getMonitorSymptom(val){
133
+           
134
+          var symptom = ""
135
+          if(val!=null && val.length>0){
136
+             
137
+            for(let i=0;i<val.length;i++){
138
+               symptom +=val[i].symptom+" "
139
+            }
140
+          }
141
+          return symptom
142
+        },
143
+        getMonitorSymptomResult(val){
144
+            var result = ""
145
+          if(val!=null && val.length>0){
146
+             
147
+            for(let i=0;i<val.length;i++){
148
+                result +=val[i].result+" "
149
+            }
150
+          }
151
+          return result
152
+        },
153
+        getTime(val) {
154
+         if(val < 0){
155
+           return ""
156
+         }
157
+         if(val == ""){
158
+          return ""
159
+         }else {
160
+          return uParseTime(val, '{y}-{m}-{d}')
161
+         }
162
+        },
163
+        getlist(){
164
+             var params = {
165
+                page:this.$route.query.page,
166
+                limit:this.$route.query.limit,
167
+                schedul_type:this.$route.query.schedule_type,
168
+                partition_type:this.$route.query.partition_type,
169
+                schedul_time:this.$route.query.schedul_time,
170
+                partition_type:this.$route.query.partition_type,
171
+                schedul_time:this.$route.query.schedul_time,
172
+                keywords:this.$route.query.keywords,
173
+                start_time:this.$route.query.start_time,
174
+                end_time:this.$route.query.end_time
175
+
176
+             }
177
+           getSchedualPatient(params).then(response=>{
178
+             if(response.data.state == 1){
179
+                var schedule =  response.data.data.schedule
180
+                this.tableDataList = schedule
181
+             }
182
+           })
183
+        },
184
+       getNowTime: function () {
185
+        let dateTime;
186
+        let yy = new Date().getFullYear();
187
+        let mm = new Date().getMonth() + 1;
188
+        let dd = new Date().getDate();
189
+        
190
+        dateTime = yy + '-' + mm + '-' + dd
191
+        return dateTime
192
+       },
193
+       
194
+       getTimeOne(val) {
195
+          if(val == ""){
196
+          return ""
197
+          }else {
198
+          return uParseTime(val, '{y}-{m}-{d}')
199
+          }
200
+       },
201
+       getCount(val){
202
+         var count = 0
203
+         if(val!=null && val.length > 0){
204
+          for(let i=0;i<val.length;i++){
205
+            count += parseInt(val[i].prescribing_number)
206
+          }
207
+         }
208
+         if(count > 0){
209
+          return count
210
+         }else{
211
+          return 0
212
+         }
213
+       },
214
+      printAction: function() {
215
+      const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
216
+  
217
+      printJS({
218
+          printable: 'print_content',
219
+          type: 'html',
220
+          documentTitle: '  ',
221
+          style: style,
222
+          scanStyles: false
223
+       })
224
+      },
225
+      getSpecification(id){
226
+          var specification_name = ""
227
+          for(let i=0;i<this.druglist.length;i++){
228
+            if(id == this.druglist[i].id){
229
+              specification_name = this.druglist[i].dose+this.druglist[i].dose_unit +"*"+this.druglist[i].min_number+this.druglist[i].min_unit +"/"+this.druglist[i].max_unit
230
+            }
231
+          }
232
+          return specification_name
233
+        },
234
+       getHisCount(val,max_unit,min_unit,min_number){
235
+          var total = 0
236
+          var max_str = "";
237
+          var min_str = "";
238
+          for(let i=0;i<val.length;i++){
239
+            total+=parseInt(val[i].prescribing_number)
240
+          }
241
+          if (total < min_number) {
242
+          min_str = total + min_unit;
243
+        }
244
+        if (total == 0) {
245
+          min_str = "";
246
+          max_str = "";
247
+        }
248
+        if (total >= min_number) {
249
+          if (parseInt(total / min_number) != 0) {
250
+            max_str = parseInt(total / min_number) + max_unit;
251
+          }
252
+          if (total % min_number != 0) {
253
+            min_str = (total % min_number) + min_unit;
254
+          }
255
+        }
256
+        return max_str + min_str;
257
+          
258
+        },
259
+        getManufacturer(id){
260
+          var  manufacturer_name = ""
261
+          for(let i=0;i<this.manufacturerList.length;i++){
262
+              if(id== this.manufacturerList[i].id){
263
+                manufacturer_name = this.manufacturerList[i].manufacturer_name
264
+              }
265
+          }
266
+          return manufacturer_name
267
+      }
268
+     }
269
+    }
270
+  </script>
271
+  
272
+  <style rel="stylesheet/scss" lang="scss" scoped>
273
+    .print_main_content {
274
+      background-color: white;
275
+      width: 960px;
276
+      margin: 0 auto;
277
+      padding: 0 0 20px 0;
278
+  
279
+    .order_title_panl {
280
+      text-align: center;
281
+  
282
+    .main_title {
283
+      font-size: 18px;
284
+      line-height: 40px;
285
+      font-weight: 500;
286
+    }
287
+  
288
+    }
289
+    .table_panel {
290
+  
291
+    .table {
292
+      width: 100%;
293
+      border: 1px solid;
294
+      border-collapse: collapse;
295
+      padding: 2px;
296
+  
297
+    thead {
298
+  
299
+    tr {
300
+  
301
+    td {
302
+      border: 1px solid;
303
+      text-align: center;
304
+      font-size: 20px;
305
+      padding: 15px 5px;
306
+    }
307
+  
308
+    }
309
+    }
310
+    tbody {
311
+  
312
+    tr {
313
+  
314
+    td {
315
+      border: 1px solid;
316
+      text-align: center;
317
+      font-size: 18px;
318
+      padding: 10px 5px;
319
+  
320
+    .proj {
321
+      padding: 5px 0;
322
+      text-align: left;
323
+  
324
+    .proj_title {
325
+      font-size: 16px;
326
+      font-weight: 500;
327
+      line-height: 25px;
328
+    }
329
+  
330
+    .proj_item {
331
+      font-size: 15px;
332
+      line-height: 20px;
333
+  
334
+    .zone_name {
335
+      font-weight: 500;
336
+    }
337
+  
338
+    }
339
+    }
340
+    }
341
+    }
342
+    }
343
+    }
344
+    }
345
+    }
346
+  </style>
347
+  
348
+  

+ 30 - 14
src/xt_pages/user/doctorAdvice.vue View File

@@ -102,6 +102,22 @@
102 102
           </ul>
103 103
         </div>
104 104
       </div>
105
+
106
+      <div class="cell clearfix">
107
+        <label class="title"> <span class="name">给药途径</span> : </label>
108
+        <div class="time">
109
+          <ul class>
110
+            <li
111
+              :class="item.id == listQuery.delivery_way ? 'active' : ''"
112
+              @click="selectDeliveryWay(item.id)"
113
+              v-for="item in deliveryWay"
114
+              :key="item.id"
115
+            >
116
+              {{ item.name }}
117
+            </li>
118
+          </ul>
119
+        </div>
120
+      </div>
105 121
      
106 122
 
107 123
       <div class="cell clearfix">
@@ -3533,16 +3549,16 @@ export default {
3533 3549
       };
3534 3550
     },
3535 3551
     getList() {
3536
-      //  var name = ""
3537
-      //   for(let i=0;i<this.deliveryWay.length;i++){
3538
-      //       if(this.listQuery.delivery_way == this.deliveryWay[i].id){
3539
-      //         name = this.deliveryWay[i].name
3540
-      //       }
3541
-      //   }
3542
-      //   if(name == '全部'){
3543
-      //     name = ""
3544
-      //   }
3545
-      //  this.listQuery.delivery_way_one = name
3552
+       var name = ""
3553
+        for(let i=0;i<this.deliveryWay.length;i++){
3554
+            if(this.listQuery.delivery_way == this.deliveryWay[i].id){
3555
+              name = this.deliveryWay[i].name
3556
+            }
3557
+        }
3558
+        if(name == '全部'){
3559
+          name = ""
3560
+        }
3561
+       this.listQuery.delivery_way_one = name
3546 3562
       getDoctorAdviceList(this.listQuery).then(response => {
3547 3563
         if (response.data.state == 1) {
3548 3564
           this.adviceTableData = response.data.data.advices;
@@ -4525,10 +4541,10 @@ export default {
4525 4541
           this.deliveryWayOptions =
4526 4542
             response.data.data.drugways === null? []: response.data.data.drugways;
4527 4543
           this.executionFrequencyOptions = response.data.data.efs === null ? [] : response.data.data.efs;
4528
-          // var dics  =  response.data.data.dics
4529
-          // var obj = {id:0,name:"全部"}
4530
-          // this.deliveryWay.push(obj)
4531
-          // this.deliveryWay.push(...dics)
4544
+          var dics  =  response.data.data.dics
4545
+          var obj = {id:0,name:"全部"}
4546
+          this.deliveryWay.push(obj)
4547
+          this.deliveryWay.push(...dics)
4532 4548
         }
4533 4549
       });
4534 4550
     },