Browse Source

耗材参数

XMLWAN 4 years ago
parent
commit
1f88b964ea

+ 5 - 6
src/api/consumable.js View File

14
 //获取透析参数
14
 //获取透析参数
15
 
15
 
16
 export function getDialysisParameters(params){
16
 export function getDialysisParameters(params){
17
-  console.log("params",params)
17
+ 
18
   return request({
18
   return request({
19
      url:"/api/dialysis/getdialysisparameters",
19
      url:"/api/dialysis/getdialysisparameters",
20
      method:"Get",
20
      method:"Get",
23
 }
23
 }
24
 
24
 
25
 
25
 
26
-export function getDialysisBatchParameters(sch_ids){
26
+export function getDialysisBatchParameters(sch_ids,startime){
27
 
27
 
28
   return request({
28
   return request({
29
     url:"/api/dialysis/getdialysisbatchparameters",
29
     url:"/api/dialysis/getdialysisbatchparameters",
30
     method:"get",
30
     method:"get",
31
     params: {
31
     params: {
32
-      ids: sch_ids
32
+      ids: sch_ids,
33
+      startime:startime,
33
     }
34
     }
34
   })
35
   })
35
 }
36
 }
44
 
45
 
45
 
46
 
46
 export function getAllMaterial(params){
47
 export function getAllMaterial(params){
47
-  console.log("params",params)
48
   return request({
48
   return request({
49
      url:"/api/dialysis/getallmaterial",
49
      url:"/api/dialysis/getallmaterial",
50
      method:"Get",
50
      method:"Get",
54
 
54
 
55
 
55
 
56
 export function getCollectList(params){
56
 export function getCollectList(params){
57
-   console.log("数据手机",params)
57
+  
58
   return request({
58
   return request({
59
     url:"/api/dialysis/getcollectlist",
59
     url:"/api/dialysis/getcollectlist",
60
     method:"get",
60
     method:"get",
71
 }
71
 }
72
 
72
 
73
 export function getGatherList(params){
73
 export function getGatherList(params){
74
-  console.log("params======",params)
75
   return request({
74
   return request({
76
     url:"/api/dialysis/getgatherlist",
75
     url:"/api/dialysis/getgatherlist",
77
     method:"get",
76
     method:"get",

+ 110 - 67
src/xt_pages/dialysis/allSummary_print.vue View File

39
                                      >{{getCount(it.patient.id,item.good_id)}}
39
                                      >{{getCount(it.patient.id,item.good_id)}}
40
                                     </td>
40
                                     </td>
41
                                     <td>
41
                                     <td>
42
-                                       <span>
43
-                                        <span v-if="it.prescription.anticoagulant == 0"></span>
44
-                                        <span v-if="it.prescription.anticoagulant == 1">无肝素</span>
45
-                                        <span v-if="it.prescription.anticoagulant == 2">普通肝素</span>
46
-                                        <span v-if="it.prescription.anticoagulant == 3">低分子肝素</span>
47
-                                        <span v-if="it.prescription.anticoagulant == 4">阿加曲班</span>
48
-                                        <span v-if="it.prescription.anticoagulant == 5">枸橼酸钠</span>
49
-                                        <span v-if="it.prescription.anticoagulant == 6">低分子肝素钙</span>
50
-                                        <span v-if="it.prescription.anticoagulant == 7">低分子肝素钠</span>
51
-                                        <span v-if="it.prescription.anticoagulant == 8">依诺肝素</span>
52
-                                        <span v-if="it.prescription.anticoagulant == 9">达肝素</span>
53
-                                        <span v-if="it.prescription.anticoagulant == 10">体外抗凝</span>
54
-                                       </span>
55
-                                        <span>
56
-                                            {{it.prescription.anticoagulant_shouji?it.prescription.anticoagulant_shouji:""}}
57
-                                            <span v-if="it.prescription.anticoagulant == 1 && it.prescription.anticoagulant_shouji!=''">mg</span>
58
-                                            <span v-if="it.prescription.anticoagulant == 2  && it.prescription.anticoagulant_shouji!=''">iu/h</span>
59
-                                            <span v-if="it.prescription.anticoagulant == 3  && it.prescription.anticoagulant_shouji!=''">iu</span>
60
-                                            <span v-if="it.prescription.anticoagulant == 4  && it.prescription.anticoagulant_shouji!=''">mg</span>
61
-                                            <span v-if="it.prescription.anticoagulant == 5  && it.prescription.anticoagulant_shouji!=''">mg</span>
62
-                                            <span v-if="it.prescription.anticoagulant == 6  && it.prescription.anticoagulant_shouji!=''">iu</span>
63
-                                            <span v-if="it.prescription.anticoagulant == 7  && it.prescription.anticoagulant_shouji!=''">iu</span>
64
-                                            <span v-if="it.prescription.anticoagulant == 8  && it.prescription.anticoagulant_shouji!=''">iu</span>
65
-                                            <span v-if="it.prescription.anticoagulant == 9  && it.prescription.anticoagulant_shouji!=''">iu</span>
66
-                                            <span v-if="it.prescription.anticoagulant == 10 && it.prescription.anticoagulant_shouji!=''">mg</span>
67
-                                          </span>
68
-                                          <span>{{it.prescription.anticoagulant_weichi?it.prescription.anticoagulant_weichi:""}}
69
-                                            <span v-if="it.prescription.anticoagulant == 1 && it.prescription.anticoagulant_weichi!=''">mg/h</span>
70
-                                            <span v-if="it.prescription.anticoagulant == 2 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
71
-                                            <span v-if="it.prescription.anticoagulant == 3 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
72
-                                            <span v-if="it.prescription.anticoagulant == 4 && it.prescription.anticoagulant_weichi!=''">mg/h</span>
73
-                                            <span v-if="it.prescription.anticoagulant == 5 && it.prescription.anticoagulant_weichi!=''">ml/h</span>
74
-                                            <span v-if="it.prescription.anticoagulant == 6 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
75
-                                            <span v-if="it.prescription.anticoagulant == 7 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
76
-                                            <span v-if="it.prescription.anticoagulant == 8 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
77
-                                            <span v-if="it.prescription.anticoagulant == 9 && it.prescription.anticoagulant_weichi!=''">iu/h</span>
78
-                                            <span v-if="it.prescription.anticoagulant == 10 && it.prescription.anticoagulant_weichi!=''">mg</span>
79
-                                          </span>
80
-                                          <span>{{it.prescription.anticoagulant_zongliang?it.prescription.anticoagulant_zongliang:""}}
81
-                                            <span v-if="it.prescription.anticoagulant == 1 && it.prescription.anticoagulant_zongliang!=''">mg</span>
82
-                                            <span v-if="it.prescription.anticoagulant == 2 && it.prescription.anticoagulant_zongliang!=''">iu</span>
83
-                                            <span v-if="it.prescription.anticoagulant == 3 && it.prescription.anticoagulant_zongliang!=''">iu</span>
84
-                                            <span v-if="it.prescription.anticoagulant == 4 && it.prescription.anticoagulant_zongliang!=''">mg</span>
85
-                                            <span v-if="it.prescription.anticoagulant == 5 && it.prescription.anticoagulant_zongliang!=''">mg</span>
86
-                                            <span v-if="it.prescription.anticoagulant == 6 && it.prescription.anticoagulant_zongliang!=''">iu/h</span>
87
-                                            <span v-if="it.prescription.anticoagulant == 7 && it.prescription.anticoagulant_zongliang!=''">iu</span>
88
-                                            <span v-if="it.prescription.anticoagulant == 8 && it.prescription.anticoagulant_zongliang!=''">iu</span>
89
-                                            <span v-if="it.prescription.anticoagulant == 9 && it.prescription.anticoagulant_zongliang!=''">iu/h</span>
90
-                                            <span v-if="it.prescription.anticoagulant == 10 && it.prescription.anticoagulant_zongliang!=''">mg</span>
91
-                                          </span>
42
+                                     <span>
43
+                                        <span v-if="getAnticoagulant(it.patient.id) == 0"></span>
44
+                                        <span v-if="getAnticoagulant(it.patient.id) == 1">无肝素</span>
45
+                                        <span v-if="getAnticoagulant(it.patient.id) == 2">普通肝素</span>
46
+                                        <span v-if="getAnticoagulant(it.patient.id) == 3">低分子肝素</span>
47
+                                        <span v-if="getAnticoagulant(it.patient.id) == 4">阿加曲班</span>
48
+                                        <span v-if="getAnticoagulant(it.patient.id) == 5">枸橼酸钠</span>
49
+                                        <span v-if="getAnticoagulant(it.patient.id) == 6">低分子肝素钙</span>
50
+                                        <span v-if="getAnticoagulant(it.patient.id) == 7">低分子肝素钠</span>
51
+                                        <span v-if="getAnticoagulant(it.patient.id) == 8">依诺肝素</span>
52
+                                        <span v-if="getAnticoagulant(it.patient.id) == 9">达肝素</span>
53
+                                        <span v-if="getAnticoagulant(it.patient.id) == 10">体外抗凝</span>
54
+                                    </span>
55
+                                    <span>
56
+                                    {{getAnticoagulantShouji(it.patient.id)?getAnticoagulantShouji(it.patient.id):''}}
57
+                                    <span v-if="getAnticoagulant(it.patient.id) == 1 && getAnticoagulantShouji(it.patient.id)!=''">mg</span>
58
+                                    <span v-if="getAnticoagulant(it.patient.id) == 2  && getAnticoagulantShouji(it.patient.id)!=''">iu/h</span>
59
+                                    <span v-if="getAnticoagulant(it.patient.id) == 3  && getAnticoagulantShouji(it.patient.id)!=''">iu</span>
60
+                                    <span v-if="getAnticoagulant(it.patient.id) == 4  && getAnticoagulantShouji(it.patient.id)!=''">mg</span>
61
+                                    <span v-if="getAnticoagulant(it.patient.id)== 5  && getAnticoagulantShouji(it.patient.id)!=''">mg</span>
62
+                                    <span v-if="getAnticoagulant(it.patient.id) == 6  && getAnticoagulantShouji(it.patient.id)!=''">iu</span>
63
+                                    <span v-if="getAnticoagulant(it.patient.id) == 7  && getAnticoagulantShouji(it.patient.id)!=''">iu</span>
64
+                                    <span v-if="getAnticoagulant(it.patient.id) == 8  && getAnticoagulantShouji(it.patient.id)!=''">iu</span>
65
+                                    <span v-if="getAnticoagulant(it.patient.id) == 9  &&getAnticoagulantShouji(it.patient.id)!=''">iu</span>
66
+                                    <span v-if="getAnticoagulant(it.patient.id) == 10 && getAnticoagulantShouji(it.patient.id)!=''">mg</span>
67
+                                   </span>
68
+                                    <span>
69
+                                      {{getAnticoagulantWeichi(it.patient.id)?getAnticoagulantWeichi(it.patient.id):''}}
70
+                                      <span v-if="getAnticoagulant(it.patient.id) == 1 && getAnticoagulantWeichi(it.patient.id)!=''">mg/h</span>
71
+                                      <span v-if="getAnticoagulant(it.patient.id) == 2 && getAnticoagulantWeichi(it.patient.id)!=''">iu/h</span>
72
+                                      <span v-if="getAnticoagulant(it.patient.id) == 3 && getAnticoagulantWeichi(it.patient.id)!=''">iu/h</span>
73
+                                      <span v-if="getAnticoagulant(it.patient.id) == 4 && getAnticoagulantWeichi(it.patient.id)!=''">mg/h</span>
74
+                                      <span v-if="getAnticoagulant(it.patient.id) == 5 && getAnticoagulantWeichi(it.patient.id)!=''">ml/h</span>
75
+                                      <span v-if="getAnticoagulant(it.patient.id) == 6 && getAnticoagulantWeichi(it.patient.id)!=''">iu/h</span>
76
+                                      <span v-if="getAnticoagulant(it.patient.id) == 7 && getAnticoagulantWeichi(it.patient.id)!=''">iu/h</span>
77
+                                      <span v-if="getAnticoagulant(it.patient.id) == 8 && getAnticoagulantWeichi(it.patient.id)!=''">iu/h</span>
78
+                                      <span v-if="getAnticoagulant(it.patient.id) == 9 && getAnticoagulantWeichi(it.patient.id)!=''">iu/h</span>
79
+                                      <span v-if="getAnticoagulant(it.patient.id) == 10 && getAnticoagulantWeichi(it.patient.id)!=''">mg</span>
80
+                                    </span>
81
+                                    <span>
82
+                                        {{getAnticoagulantZongliang(it.patient.id)?getAnticoagulantZongliang(it.patient.id):''}}
83
+                                      <span v-if="getAnticoagulant(it.patient.id) == 1 && getAnticoagulantZongliang(it.patient.id)!=''">mg</span>
84
+                                      <span v-if="getAnticoagulant(it.patient.id) == 2 && getAnticoagulantZongliang(it.patient.id)!=''">iu</span>
85
+                                      <span v-if="getAnticoagulant(it.patient.id) == 3 && getAnticoagulantZongliang(it.patient.id)!=''">iu</span>
86
+                                      <span v-if="getAnticoagulant(it.patient.id)== 4 && getAnticoagulantZongliang(it.patient.id)!=''">mg</span>
87
+                                      <span v-if="getAnticoagulant(it.patient.id) == 5 && getAnticoagulantZongliang(it.patient.id)!=''">mg</span>
88
+                                      <span v-if="getAnticoagulant(it.patient.id) == 6 && getAnticoagulantZongliang(it.patient.id)!=''">iu/h</span>
89
+                                      <span v-if="getAnticoagulant(it.patient.id) == 7 && getAnticoagulantZongliang(it.patient.id)!=''">iu</span>
90
+                                      <span v-if="getAnticoagulant(it.patient.id) == 8 && getAnticoagulantZongliang(it.patient.id)!=''">iu</span>
91
+                                      <span v-if="getAnticoagulant(it.patient.id) == 9 && getAnticoagulantZongliang(it.patient.id)!=''">iu/h</span>
92
+                                      <span v-if="getAnticoagulant(it.patient.id) == 10 && getAnticoagulantZongliang(it.patient.id)!=''">mg</span>
93
+                                    </span>
92
                                     </td>
94
                                     </td>
93
                                 </tr>
95
                                 </tr>
94
                             </tbody>
96
                             </tbody>
118
             tableName:[],
120
             tableName:[],
119
             consuMables:[],
121
             consuMables:[],
120
             tableData:[],
122
             tableData:[],
121
-            print_date:""
123
+            print_date:"",
124
+            start_time:"",
125
+            prescriptionList:[],
126
+            reduceList:[],
122
         }
127
         }
123
     },
128
     },
124
     methods:{
129
     methods:{
142
           getAllMaterial(params).then(response=>{
147
           getAllMaterial(params).then(response=>{
143
              if(response.data.state == 1){
148
              if(response.data.state == 1){
144
                var material =  response.data.data.material
149
                var material =  response.data.data.material
145
-               console.log("今日耗材",material)
146
                this.tableName = material
150
                this.tableName = material
147
              }
151
              }
148
           })
152
           })
149
         },
153
         },
150
         getCount(patientid,goodid){
154
         getCount(patientid,goodid){
151
            var count = 0
155
            var count = 0
152
-           for(let i=0;i<this.consuMables.length;i++){
153
-              if(patientid == this.consuMables[i].patient_id && goodid == this.consuMables[i].good_id){
154
-                 count = this.consuMables[i].count
156
+           for(let i=0;i<this.reduceList.length;i++){
157
+              if(patientid == this.reduceList[i].patient_id && goodid == this.reduceList[i].good_id){
158
+                 count = this.reduceList[i].count
155
               }
159
               }
156
            }
160
            }
157
            return count
161
            return count
158
-        }
162
+        },
163
+     getAnticoagulant(id){
164
+       var anticoagulant = ""
165
+        for(let i=0;i<this.prescriptionList.length;i++){
166
+          if(this.prescriptionList[i].patient_id == id){
167
+             anticoagulant = this.prescriptionList[i].anticoagulant
168
+          }
169
+        } 
170
+       return anticoagulant
171
+     },
172
+     getAnticoagulantShouji(id){
173
+       var shouji = ""
174
+       for(let i=0;i<this.prescriptionList.length;i++){
175
+         if(this.prescriptionList[i].patient_id == id){
176
+            shouji = this.prescriptionList[i].anticoagulant_shouji
177
+          }
178
+        } 
179
+       return shouji
180
+     },
181
+     getAnticoagulantWeichi(id){
182
+        var weichi = ""
183
+        for(let i=0;i<this.prescriptionList.length;i++){
184
+         if(this.prescriptionList[i].patient_id == id){
185
+            weichi = this.prescriptionList[i].anticoagulant_weichi
186
+        } 
187
+       return weichi
188
+      }
189
+     },
190
+     getAnticoagulantZongliang(id){
191
+       var zongliang = ""
192
+       for(let i=0;i<this.prescriptionList.length;i++){
193
+         if(this.prescriptionList[i].patient_id == id){
194
+            zongliang = this.prescriptionList[i].anticoagulant_zongliang
195
+          }
196
+        } 
197
+       return zongliang
198
+     }
199
+    },
200
+     created(){
201
+      var startime  = moment(new Date()).add('year',0).format("YYYY-MM-DD")
202
+      this.print_date = startime
203
+        //获取今日所有耗材
204
+      this.getAllMaterial()
159
     },
205
     },
160
     mounted(){
206
     mounted(){
161
       var ids = this.$store.getters.temp_params.batch_print_dialysis_record_ids
207
       var ids = this.$store.getters.temp_params.batch_print_dialysis_record_ids
162
-      console.log("打印数据",ids)
163
-       var startime  = moment(new Date()).add('year',0).format("YYYY-MM-DD")
208
+       var start = this.$route.query.start
209
+      this.start_time = start
164
       const params = {
210
       const params = {
165
-         startime:startime,
211
+         startime:this.start_time,
166
          ids:ids.join(',')
212
          ids:ids.join(',')
167
       }
213
       }
168
       //获取汇总打印
214
       //获取汇总打印
169
       getBatchCollection(params).then(response=>{
215
       getBatchCollection(params).then(response=>{
170
          if(response.data.state == 1){
216
          if(response.data.state == 1){
171
             var schedule = response.data.data.schedule
217
             var schedule = response.data.data.schedule
172
-            console.log("schedule",schedule)
173
             this.tableData = schedule
218
             this.tableData = schedule
174
            var consumables = response.data.data.consumables
219
            var consumables = response.data.data.consumables
175
-           console.log("consumables",consumables)
176
            this.consuMables = consumables
220
            this.consuMables = consumables
221
+           var prescripiton = response.data.data.prescripiton
222
+           this.prescriptionList = prescripiton
223
+           var reducelist = response.data.data.reducelist
224
+           this.reduceList = reducelist
177
          }
225
          }
178
       })
226
       })
179
-    },
180
-    created(){
181
-      var startime  = moment(new Date()).add('year',0).format("YYYY-MM-DD")
182
-      this.print_date = startime
183
-        //获取今日所有耗材
184
-      this.getAllMaterial()
185
     }
227
     }
228
+   
186
 }
229
 }
187
 </script>
230
 </script>
188
 
231
 

+ 102 - 63
src/xt_pages/dialysis/components/allSummary.vue View File

63
             </el-table-column>
63
             </el-table-column>
64
             <el-table-column align="center" prop="address" :label="item.type_name" v-for="(item,index) in tableName" :key="index">
64
             <el-table-column align="center" prop="address" :label="item.type_name" v-for="(item,index) in tableName" :key="index">
65
                <template slot-scope="scope"> 
65
                <template slot-scope="scope"> 
66
-                   {{getCount(scope.row.patient.id,item.good_id)}}
66
+                   {{getCount(scope.row.patient.id,item.good_id)?getCount(scope.row.patient.id,item.good_id):""}}
67
                </template>
67
                </template>
68
             </el-table-column>
68
             </el-table-column>
69
             <el-table-column align="center" prop="address" label="抗凝剂(首剂)(维持)(总量)">
69
             <el-table-column align="center" prop="address" label="抗凝剂(首剂)(维持)(总量)">
70
-              <template slot-scope="scope">
71
-                   <span v-if="scope.row.prescription.anticoagulant == 0"></span>
72
-                    <span v-if="scope.row.prescription.anticoagulant == 1">无肝素</span>
73
-                    <span v-if="scope.row.prescription.anticoagulant == 2">普通肝素</span>
74
-                    <span v-if="scope.row.prescription.anticoagulant == 3">低分子肝素</span>
75
-                    <span v-if="scope.row.prescription.anticoagulant == 4">阿加曲班</span>
76
-                    <span v-if="scope.row.prescription.anticoagulant == 5">枸橼酸钠</span>
77
-                    <span v-if="scope.row.prescription.anticoagulant == 6">低分子肝素钙</span>
78
-                    <span v-if="scope.row.prescription.anticoagulant == 7">低分子肝素钠</span>
79
-                    <span v-if="scope.row.prescription.anticoagulant == 8">依诺肝素</span>
80
-                    <span v-if="scope.row.prescription.anticoagulant == 9">达肝素</span>
81
-                    <span v-if="scope.row.prescription.anticoagulant == 10">体外抗凝</span>
70
+             <template slot-scope="scope">
71
+                   <span v-if="getAnticoagulant(scope.row.patient_id) == 0"></span>
72
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 1">无肝素</span>
73
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 2">普通肝素</span>
74
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 3">低分子肝素</span>
75
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 4">阿加曲班</span>
76
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 5">枸橼酸钠</span>
77
+                    <span v-if="getAnticoagulant(scope.row.patient_id)== 6">低分子肝素钙</span>
78
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 7">低分子肝素钠</span>
79
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 8">依诺肝素</span>
80
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 9">达肝素</span>
81
+                    <span v-if="getAnticoagulant(scope.row.patient_id) == 10">体外抗凝</span>
82
                     <span>
82
                     <span>
83
-                      {{scope.row.prescription.anticoagulant_shouji?scope.row.prescription.anticoagulant_shouji:""}}
84
-                      <span v-if="scope.row.prescription.anticoagulant == 1 && scope.row.prescription.anticoagulant_shouji !=''">mg</span>
85
-                      <span v-if="scope.row.prescription.anticoagulant == 2 && scope.row.prescription.anticoagulant_shouji !=''">iu/h</span>
86
-                      <span v-if="scope.row.prescription.anticoagulant == 3 && scope.row.prescription.anticoagulant_shouji !=''">iu</span>
87
-                      <span v-if="scope.row.prescription.anticoagulant == 4 && scope.row.prescription.anticoagulant_shouji !=''">mg</span>
88
-                      <span v-if="scope.row.prescription.anticoagulant == 5 && scope.row.prescription.anticoagulant_shouji !=''">mg</span>
89
-                      <span v-if="scope.row.prescription.anticoagulant == 6 && scope.row.prescription.anticoagulant_shouji !=''">iu</span>
90
-                      <span v-if="scope.row.prescription.anticoagulant == 7 && scope.row.prescription.anticoagulant_shouji !=''">iu</span>
91
-                      <span v-if="scope.row.prescription.anticoagulant == 8 && scope.row.prescription.anticoagulant_shouji !=''">iu</span>
92
-                      <span v-if="scope.row.prescription.anticoagulant == 9 && scope.row.prescription.anticoagulant_shouji !=''">iu</span>
93
-                      <span v-if="scope.row.prescription.anticoagulant == 10 && scope.row.prescription.anticoagulant_shouji !=''">mg</span>
83
+                      {{getAnticoagulantShouji(scope.row.patient_id)?getAnticoagulantShouji(scope.row.patient_id):''}}
84
+                      <span v-if="getAnticoagulant(scope.row.patient_id) ==1 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
85
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 2 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu/h</span>
86
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 3 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
87
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 4 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
88
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 5 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
89
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 6 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
90
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 7 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
91
+                      <span v-if="getAnticoagulant(scope.row.patient_id)== 8 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
92
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 9 && getAnticoagulantShouji(scope.row.patient_id)!=''">iu</span>
93
+                      <span v-if="getAnticoagulant(scope.row.patient_id)== 10 && getAnticoagulantShouji(scope.row.patient_id)!=''">mg</span>
94
                     </span>
94
                     </span>
95
-                    <span>{{scope.row.prescription.anticoagulant_weichi?scope.row.prescription.anticoagulant_weichi:""}}
96
-                      <span v-if="scope.row.prescription.anticoagulant == 1 && scope.row.prescription.anticoagulant_weichi!=''">mg/h</span>
97
-                      <span v-if="scope.row.prescription.anticoagulant == 2  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
98
-                      <span v-if="scope.row.prescription.anticoagulant == 3  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
99
-                      <span v-if="scope.row.prescription.anticoagulant == 4  && scope.row.prescription.anticoagulant_weichi!=''">mg/h</span>
100
-                      <span v-if="scope.row.prescription.anticoagulant == 5  && scope.row.prescription.anticoagulant_weichi!=''">ml/h</span>
101
-                      <span v-if="scope.row.prescription.anticoagulant == 6  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
102
-                      <span v-if="scope.row.prescription.anticoagulant == 7  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
103
-                      <span v-if="scope.row.prescription.anticoagulant == 8  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
104
-                      <span v-if="scope.row.prescription.anticoagulant == 9  && scope.row.prescription.anticoagulant_weichi!=''">iu/h</span>
105
-                      <span v-if="scope.row.prescription.anticoagulant == 10 && scope.row.prescription.anticoagulant_weichi!=''">mg</span>
95
+                    <span>
96
+                       {{getAnticoagulantWeichi(scope.row.patient_id)?getAnticoagulantWeichi(scope.row.patient_id):''}}
97
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 1 && getAnticoagulantWeichi(scope.row.patient_id)!=''">mg/h</span>
98
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 2 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
99
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 3 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
100
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 4 && getAnticoagulantWeichi(scope.row.patient_id)!=''">mg/h</span>
101
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 5 && getAnticoagulantWeichi(scope.row.patient_id)!=''">ml/h</span>
102
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 6 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
103
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 7 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
104
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 8 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
105
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 9 && getAnticoagulantWeichi(scope.row.patient_id)!=''">iu/h</span>
106
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 10 && getAnticoagulantWeichi(scope.row.patient_id)!=''">mg</span>
106
                     </span>
107
                     </span>
107
-                    <span>{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang:""}}
108
-                       <span v-if="scope.row.prescription.anticoagulant == 1 && scope.row.prescription.anticoagulant_zongliang!=''">mg</span>
109
-                      <span v-if="scope.row.prescription.anticoagulant == 2 && scope.row.prescription.anticoagulant_zongliang!=''">iu</span>
110
-                      <span v-if="scope.row.prescription.anticoagulant == 3 && scope.row.prescription.anticoagulant_zongliang!=''">iu</span>
111
-                      <span v-if="scope.row.prescription.anticoagulant == 4 && scope.row.prescription.anticoagulant_zongliang!=''">mg</span>
112
-                      <span v-if="scope.row.prescription.anticoagulant == 5 && scope.row.prescription.anticoagulant_zongliang!=''">mg</span>
113
-                      <span v-if="scope.row.prescription.anticoagulant == 6 && scope.row.prescription.anticoagulant_zongliang!=''">iu/h</span>
114
-                      <span v-if="scope.row.prescription.anticoagulant == 7 && scope.row.prescription.anticoagulant_zongliang!=''">iu</span>
115
-                      <span v-if="scope.row.prescription.anticoagulant == 8 && scope.row.prescription.anticoagulant_zongliang!=''">iu</span>
116
-                      <span v-if="scope.row.prescription.anticoagulant == 9 && scope.row.prescription.anticoagulant_zongliang!=''">iu/h</span>
117
-                      <span v-if="scope.row.prescription.anticoagulant == 10 && scope.row.prescription.anticoagulant_zongliang!=''">mg</span>
108
+                    <span>
109
+                      {{getAnticoagulantZongliang(scope.row.patient_id)?getAnticoagulantZongliang(scope.row.patient_id):''}}
110
+                       <span v-if="getAnticoagulant(scope.row.patient_id) == 1 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
111
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 2 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
112
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 3 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
113
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 4 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
114
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 5 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
115
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 6 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu/h</span>
116
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 7 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
117
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 8 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu</span>
118
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 9 && getAnticoagulantZongliang(scope.row.patient_id)!=''">iu/h</span>
119
+                      <span v-if="getAnticoagulant(scope.row.patient_id) == 10 && getAnticoagulantZongliang(scope.row.patient_id)!=''">mg</span>
118
                     </span>
120
                     </span>
119
                 </template>
121
                 </template>
120
             </el-table-column>
122
             </el-table-column>
142
 import allSummaryDialog from './allSummaryDialog'
144
 import allSummaryDialog from './allSummaryDialog'
143
 import { getAllMaterial,getCollectList } from "@/api/consumable"
145
 import { getAllMaterial,getCollectList } from "@/api/consumable"
144
 import { parseTime } from "@/utils";
146
 import { parseTime } from "@/utils";
147
+const moment = require('moment')
145
 export default {
148
 export default {
146
     components:{
149
     components:{
147
         allSummaryDialog
150
         allSummaryDialog
167
             consuMables:[],
170
             consuMables:[],
168
             total:0,
171
             total:0,
169
             selecting_schs: [],
172
             selecting_schs: [],
170
-            prescriptionList:[]
173
+            prescriptionList:[],
174
+            reduceList:[]
171
         }
175
         }
172
     },
176
     },
173
     created(){
177
     created(){
205
           var startime = parseTime(this.selected_date,'{y}-{m}-{d}')
209
           var startime = parseTime(this.selected_date,'{y}-{m}-{d}')
206
           this.start_time = startime
210
           this.start_time = startime
207
           this.getlist()
211
           this.getlist()
212
+          this.getAllMaterial()
208
         },
213
         },
209
         search(){
214
         search(){
210
            if(this.selected_date==""){
215
            if(this.selected_date==""){
224
           getCollectList(params).then(response=>{
229
           getCollectList(params).then(response=>{
225
              if(response.data.state == 1){
230
              if(response.data.state == 1){
226
                var schedule = response.data.data.schedule
231
                var schedule = response.data.data.schedule
227
-               console.log("打印schedule",schedule)
228
                this.tableData = schedule
232
                this.tableData = schedule
229
                var total = response.data.data.total
233
                var total = response.data.data.total
230
-               console.log("total",total)
231
                this.total = total
234
                this.total = total
232
                var consumables = response.data.data.consumables
235
                var consumables = response.data.data.consumables
233
-               console.log("consumables",consumables)
234
                this.consuMables = consumables
236
                this.consuMables = consumables
237
+               var prescription =  response.data.data.prescription
238
+               this.prescriptionList = prescription
239
+               var reducelist =  response.data.data.reducelist
240
+               this.reduceList = reducelist
235
              }
241
              }
236
           })
242
           })
237
         },
243
         },
248
           getAllMaterial(params).then(response=>{
254
           getAllMaterial(params).then(response=>{
249
              if(response.data.state == 1){
255
              if(response.data.state == 1){
250
                var material =  response.data.data.material
256
                var material =  response.data.data.material
251
-               console.log("material",material)
252
                this.tableName = material
257
                this.tableName = material
253
              }
258
              }
254
           })
259
           })
278
             }
283
             }
279
           getCollectList(params).then(response=>{
284
           getCollectList(params).then(response=>{
280
              if(response.data.state == 1){
285
              if(response.data.state == 1){
281
-               var schedule = response.data.data.schedule
282
-               console.log("打印schedule",schedule)
286
+               var schedule = response.data.data.schedule      
283
                this.tableData = schedule
287
                this.tableData = schedule
284
-               var total = response.data.data.total
285
-               console.log("total",total)
288
+               var total = response.data.data.total      
286
                this.total = total
289
                this.total = total
287
-               var consumables = response.data.data.consumables
288
-               console.log("consumables",consumables)
290
+               var consumables = response.data.data.consumables       
289
                this.consuMables = consumables
291
                this.consuMables = consumables
290
-               var prescription =  response.data.data.prescription
292
+               var prescription =  response.data.data.prescription        
291
                this.prescriptionList = prescription
293
                this.prescriptionList = prescription
294
+               var reducelist =  response.data.data.reducelist          
295
+               this.reduceList = reducelist
292
              }
296
              }
293
           })
297
           })
294
         },
298
         },
295
         getCount(patientid,goodid){
299
         getCount(patientid,goodid){
296
           var count = 0
300
           var count = 0
297
-           for(let i=0;i<this.consuMables.length;i++){
298
-              if(patientid == this.consuMables[i].patient_id && goodid == this.consuMables[i].good_id){
299
-                 count = this.consuMables[i].count
301
+           for(let i=0;i<this.reduceList.length;i++){
302
+              if(patientid == this.reduceList[i].patient_id && goodid == this.reduceList[i].good_id){
303
+                 count = this.reduceList[i].count
300
               }
304
               }
301
            }
305
            }
302
            return count
306
            return count
314
               sch_ids.push(this.selecting_schs[index].id);
318
               sch_ids.push(this.selecting_schs[index].id);
315
           }
319
           }
316
            this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
320
            this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
317
-           this.$router.push("/dialysis/allSummary_print")
321
+           this.$router.push("/dialysis/allSummary_print?start="+this.start_time)
318
         },
322
         },
319
-
323
+       getAnticoagulant(id){
324
+       var anticoagulant = ""
325
+        for(let i=0;i<this.prescriptionList.length;i++){
326
+          if(this.prescriptionList[i].patient_id == id){
327
+             anticoagulant = this.prescriptionList[i].anticoagulant
328
+          }
329
+        } 
330
+       return anticoagulant
331
+     },
332
+     getAnticoagulantShouji(id){
333
+       var shouji = ""
334
+       for(let i=0;i<this.prescriptionList.length;i++){
335
+         if(this.prescriptionList[i].patient_id == id){
336
+            shouji = this.prescriptionList[i].anticoagulant_shouji
337
+          }
338
+        } 
339
+       return shouji
340
+     },
341
+     getAnticoagulantWeichi(id){
342
+        var weichi = ""
343
+        for(let i=0;i<this.prescriptionList.length;i++){
344
+         if(this.prescriptionList[i].patient_id == id){
345
+            weichi = this.prescriptionList[i].anticoagulant_weichi
346
+        } 
347
+       return weichi
348
+      }
349
+     },
350
+     getAnticoagulantZongliang(id){
351
+       var zongliang = ""
352
+       for(let i=0;i<this.prescriptionList.length;i++){
353
+         if(this.prescriptionList[i].patient_id == id){
354
+            zongliang = this.prescriptionList[i].anticoagulant_zongliang
355
+          }
356
+        } 
357
+       return zongliang
358
+     }
320
     }
359
     }
321
 }
360
 }
322
 </script>
361
 </script>

+ 49 - 18
src/xt_pages/dialysis/components/allSummaryDialog.vue View File

10
         style="width:150px;margin-right:10px"
10
         style="width:150px;margin-right:10px"
11
         v-model="startTime"
11
         v-model="startTime"
12
         type="date"
12
         type="date"
13
-        placeholder="选择日期">
13
+        placeholder="选择日期"
14
+        @change="handleScheduleDateChange">
14
         </el-date-picker>
15
         </el-date-picker>
15
         <el-date-picker
16
         <el-date-picker
16
         style="width:150px;margin-right:10px"
17
         style="width:150px;margin-right:10px"
17
         v-model="endTime"
18
         v-model="endTime"
18
         type="date"
19
         type="date"
19
-        placeholder="选择日期">
20
+        placeholder="选择日期"
21
+        @change="handleSchedule">
20
         </el-date-picker>
22
         </el-date-picker>
21
         <el-button icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
23
         <el-button icon="el-icon-printer" type="primary" @click="toPrint">打印</el-button>
22
         
24
         
25
         <el-table :data="tableData" border style="width: 100%" height="300">
27
         <el-table :data="tableData" border style="width: 100%" height="300">
26
             <el-table-column align="center" prop="date" label="商品类型" width="180">
28
             <el-table-column align="center" prop="date" label="商品类型" width="180">
27
                <template slot-scope="scope">
29
                <template slot-scope="scope">
28
-                   {{scope.row.type_name}}
30
+                  <span v-if="scope.row.stage == 1">{{scope.row.type_name}}</span> 
31
+                  <span v-if="scope.row.stage == 2">抗凝剂</span>
29
                </template>
32
                </template>
30
             </el-table-column>
33
             </el-table-column>
31
             <el-table-column align="center" prop="name" label="规格名称" width="180">
34
             <el-table-column align="center" prop="name" label="规格名称" width="180">
32
                 <template slot-scope="scope">
35
                 <template slot-scope="scope">
33
-                  {{scope.row.specification_name}}
36
+                  <span v-if="scope.row.stage == 1">{{scope.row.specification_name}}</span>
37
+                  <span v-if="scope.row.stage == 2 && scope.row.anticoagulant == 1">无肝素</span>
38
+                  <span v-if="scope.row.stage == 2 && scope.row.anticoagulant == 2">普通肝素</span>
39
+                  <span v-if="scope.row.stage == 2 && scope.row.anticoagulant == 3">低分子肝素</span>
40
+                  <span v-if="scope.row.stage == 2 && scope.row.anticoagulant == 4">阿加曲班</span>
41
+                  <span v-if="scope.row.stage == 2 && scope.row.anticoagulant == 5">枸橼酸钠</span>
42
+                  <span v-if="scope.row.stage == 2 && scope.row.anticoagulant == 6">低分子肝素钙</span>
43
+                  <span v-if="scope.row.stage == 2 && scope.row.anticoagulant == 7">低分子肝素钠</span>
44
+                  <span v-if="scope.row.stage == 2 && scope.row.anticoagulant == 8">依诺肝素</span>
45
+                  <span v-if="scope.row.stage == 2 && scope.row.anticoagulant == 9">达肝素</span>
46
+                  <span v-if="scope.row.stage == 2 && scope.row.anticoagulant == 10">体外抗凝</span>
34
                </template>
47
                </template>
35
             </el-table-column>
48
             </el-table-column>
36
             <el-table-column align="center"  prop="address" label="数量">
49
             <el-table-column align="center"  prop="address" label="数量">
68
             schedulType: 0,
81
             schedulType: 0,
69
             partitionArr:[],
82
             partitionArr:[],
70
             partitionType: 0,
83
             partitionType: 0,
71
-            tableData: []
84
+            tableData: [],
85
+            start_time:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
86
+            end_time:moment(new Date()).add('year',0).format("YYYY-MM-DD")
72
         }
87
         }
73
     },
88
     },
74
     created(){
89
     created(){
82
         show() {
97
         show() {
83
             this.visible = true;
98
             this.visible = true;
84
         },
99
         },
100
+        handleScheduleDateChange(){
101
+          var startime = parseTime(this.startTime,'{y}-{m}-{d}')
102
+          console.log("startime====",startime)
103
+          this.start_time = startime
104
+          this.getlist()
105
+        },
106
+        handleSchedule(){
107
+          var endtime = parseTime(this.endTime,'{y}-{m}-{d}')
108
+          this.end_time = endtime
109
+          this.getlist()
110
+        },
85
         toPrint(){
111
         toPrint(){
86
             this.$router.push({
112
             this.$router.push({
87
                 path: '/dialysis/allsummarydialog_print',
113
                 path: '/dialysis/allsummarydialog_print',
89
             })
115
             })
90
         },
116
         },
91
         getlist(){
117
         getlist(){
92
-            // var startime = parseTime(this.startTime, '{y}-{m}-{d}')
93
-            // console.log("startime",startime)
94
-            // var endtime =  parseTime(this.endTime,'{y}-{m}-{d}')
95
-            // console.log("endtime",endtime)
96
             const params = {
118
             const params = {
97
-              start_time:this.startTime,
98
-              end_time:this.endTime
119
+              start_time:this.start_time,
120
+              end_time:this.end_time
99
             }
121
             }
100
-           console.log("params",params)
122
+           console.log("params======",params)
101
           getGatherList(params).then(response=>{
123
           getGatherList(params).then(response=>{
102
             if(response.data.state == 1){
124
             if(response.data.state == 1){
103
-              var warehouselist = response.data.data.warehouselist
104
-              console.log("22222222",warehouselist)
105
-              var consumables =  response.data.data.consumables
106
-              console.log("3333333",consumables)
107
-              this.tableData = warehouselist
125
+              var arr = []
126
+              var warehouselist = response.data.data.warehouselist    
127
+              for(let i=0;i<warehouselist.length;i++){
128
+                 warehouselist[i].stage = 1
129
+              }
130
+             console.log("warehouselist",warehouselist)
131
+              arr.push(...warehouselist)
132
+              var consumables =  response.data.data.consumables            
133
+             
108
               var count = response.data.data.count
134
               var count = response.data.data.count
109
-              console.log("count",count)
135
+              for(let j=0;j<count.length;j++){
136
+                 count[j].stage = 2
137
+              }
138
+             arr.push(...count)
139
+             console.log("arr=====",arr)
140
+             this.tableData = arr
110
             }
141
             }
111
           })
142
           })
112
         }
143
         }

+ 1 - 1
src/xt_pages/dialysis/components/dialysisParameters.vue View File

310
              sch_ids.push(this.selecting_schs[index].id);
310
              sch_ids.push(this.selecting_schs[index].id);
311
          }
311
          }
312
          this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
312
          this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
313
-         this.$router.push("/dialysis/dialysisParameters_print")
313
+         this.$router.push("/dialysis/dialysisParameters_print?startime="+this.start_time)
314
         },
314
         },
315
        handleSizeChange(val) {
315
        handleSizeChange(val) {
316
         this.limit = val;
316
         this.limit = val;

+ 169 - 53
src/xt_pages/dialysis/dialysisParameters_print.vue View File

35
                            <tr v-for="(item,index) in tableData" :key="index">
35
                            <tr v-for="(item,index) in tableData" :key="index">
36
                              <td>{{item.patient.name}}</td>
36
                              <td>{{item.patient.name}}</td>
37
                              <td>{{item.treatment_mode.name}}</td>
37
                              <td>{{item.treatment_mode.name}}</td>
38
-                             <td>{{item.assessment_before_dislysis.weight_after_last_transparency}}</td>
39
-                             <td>{{item.assessment_before_dislysis.weighing_before}}</td>
40
-                             <td>{{item.assessment_before_dislysis.dry_weight}}</td>
41
-                             <td>{{item.assessment_before_dislysis.systolic_blood_pressure}}</td>
42
-                             <td>{{item.prescription.target_ultrafiltration}}</td>
43
-                             <td>{{item.prescription.blood_flow_volume}}</td>
38
+                             <td>{{getLastWeight(item.patient.id)?getLastWeight(item.patient.id):''}}</td>
39
+                             <td>{{getWeightBefor(item.patient.id)?getWeightBefor(item.patient.id):''}}</td>
40
+                             <td>{{getDryWeight(item.patient.id)?getDryWeight(item.patient.id):''}}</td>
41
+                             <td>{{getSysBloodPressure(item.patient.id)?getSysBloodPressure(item.patient.id):''}}</td>
42
+                             <td>{{getTargetUltrafiltration(item.patient.id)?getTargetUltrafiltration(item.patient.id):''}}</td>
43
+                             <td>{{getBloodFlowVolume(item.patient.id)?getBloodFlowVolume(item.patient.id):''}}</td>
44
                              <td>
44
                              <td>
45
                                <span>
45
                                <span>
46
-                                 <span v-if="item.prescription.anticoagulant == 0"></span>
47
-                                 <span v-if="item.prescription.anticoagulant == 1">无肝素</span>
48
-                                 <span v-if="item.prescription.anticoagulant == 2">普通肝素</span>
49
-                                 <span v-if="item.prescription.anticoagulant == 3">低分子肝素</span>
50
-                                 <span v-if="item.prescription.anticoagulant == 4">阿加曲班</span>
51
-                                 <span v-if="item.prescription.anticoagulant == 5">枸橼酸钠</span>
52
-                                 <span v-if="item.prescription.anticoagulant == 6">低分子肝素钙</span>
53
-                                 <span v-if="item.prescription.anticoagulant == 7">低分子肝素钠</span>
54
-                                 <span v-if="item.prescription.anticoagulant == 8">依诺肝素</span>
55
-                                 <span v-if="item.prescription.anticoagulant == 9">达肝素</span>
56
-                                 <span v-if="item.prescription.anticoagulant == 10">体外抗凝</span>
46
+                                 <span v-if="getAnticoagulant(item.patient.id) == 0"></span>
47
+                                 <span v-if="getAnticoagulant(item.patient.id) == 1">无肝素</span>
48
+                                 <span v-if="getAnticoagulant(item.patient.id) == 2">普通肝素</span>
49
+                                 <span v-if="getAnticoagulant(item.patient.id) == 3">低分子肝素</span>
50
+                                 <span v-if="getAnticoagulant(item.patient.id) == 4">阿加曲班</span>
51
+                                 <span v-if="getAnticoagulant(item.patient.id) == 5">枸橼酸钠</span>
52
+                                 <span v-if="getAnticoagulant(item.patient.id) == 6">低分子肝素钙</span>
53
+                                 <span v-if="getAnticoagulant(item.patient.id) == 7">低分子肝素钠</span>
54
+                                 <span v-if="getAnticoagulant(item.patient.id) == 8">依诺肝素</span>
55
+                                 <span v-if="getAnticoagulant(item.patient.id) == 9">达肝素</span>
56
+                                 <span v-if="getAnticoagulant(item.patient.id) == 10">体外抗凝</span>
57
                                </span>
57
                                </span>
58
                                <span>
58
                                <span>
59
-                                  {{item.prescription.anticoagulant_shouji?item.prescription.anticoagulant_shouji:""}}
60
-                                  <span v-if="item.prescription.anticoagulant == 1 && item.prescription.anticoagulant_shouji!=''">mg</span>
61
-                                  <span v-if="item.prescription.anticoagulant == 2  && item.prescription.anticoagulant_shouji!=''">iu/h</span>
62
-                                  <span v-if="item.prescription.anticoagulant == 3  && item.prescription.anticoagulant_shouji!=''">iu</span>
63
-                                  <span v-if="item.prescription.anticoagulant == 4  && item.prescription.anticoagulant_shouji!=''">mg</span>
64
-                                  <span v-if="item.prescription.anticoagulant == 5  && item.prescription.anticoagulant_shouji!=''">mg</span>
65
-                                  <span v-if="item.prescription.anticoagulant == 6  && item.prescription.anticoagulant_shouji!=''">iu</span>
66
-                                  <span v-if="item.prescription.anticoagulant == 7  && item.prescription.anticoagulant_shouji!=''">iu</span>
67
-                                  <span v-if="item.prescription.anticoagulant == 8  && item.prescription.anticoagulant_shouji!=''">iu</span>
68
-                                  <span v-if="item.prescription.anticoagulant == 9  && item.prescription.anticoagulant_shouji!=''">iu</span>
69
-                                  <span v-if="item.prescription.anticoagulant == 10 && item.prescription.anticoagulant_shouji!=''">mg</span>
59
+              
60
+                                  {{getAnticoagulantShouji(item.patient.id)?getAnticoagulantShouji(item.patient.id):''}}
61
+                                  <span v-if="getAnticoagulant(item.patient.id) == 1 && getAnticoagulantShouji(item.patient.id)!=''">mg</span>
62
+                                  <span v-if="getAnticoagulant(item.patient.id) == 2  && getAnticoagulantShouji(item.patient.id)!=''">iu/h</span>
63
+                                  <span v-if="getAnticoagulant(item.patient.id) == 3  && getAnticoagulantShouji(item.patient.id)!=''">iu</span>
64
+                                  <span v-if="getAnticoagulant(item.patient.id) == 4  && getAnticoagulantShouji(item.patient.id)!=''">mg</span>
65
+                                  <span v-if="getAnticoagulant(item.patient.id)== 5  && getAnticoagulantShouji(item.patient.id)!=''">mg</span>
66
+                                  <span v-if="getAnticoagulant(item.patient.id) == 6  && getAnticoagulantShouji(item.patient.id)!=''">iu</span>
67
+                                  <span v-if="getAnticoagulant(item.patient.id) == 7  && getAnticoagulantShouji(item.patient.id)!=''">iu</span>
68
+                                  <span v-if="getAnticoagulant(item.patient.id) == 8  && getAnticoagulantShouji(item.patient.id)!=''">iu</span>
69
+                                  <span v-if="getAnticoagulant(item.patient.id) == 9  &&getAnticoagulantShouji(item.patient.id)!=''">iu</span>
70
+                                  <span v-if="getAnticoagulant(item.patient.id) == 10 && getAnticoagulantShouji(item.patient.id)!=''">mg</span>
70
                                 </span>
71
                                 </span>
71
-                                <span>{{item.prescription.anticoagulant_weichi?item.prescription.anticoagulant_weichi:""}}
72
-                                  <span v-if="item.prescription.anticoagulant == 1 && item.prescription.anticoagulant_weichi!=''">mg/h</span>
73
-                                  <span v-if="item.prescription.anticoagulant == 2 && item.prescription.anticoagulant_weichi!=''">iu/h</span>
74
-                                  <span v-if="item.prescription.anticoagulant == 3 && item.prescription.anticoagulant_weichi!=''">iu/h</span>
75
-                                  <span v-if="item.prescription.anticoagulant == 4 && item.prescription.anticoagulant_weichi!=''">mg/h</span>
76
-                                  <span v-if="item.prescription.anticoagulant == 5 && item.prescription.anticoagulant_weichi!=''">ml/h</span>
77
-                                  <span v-if="item.prescription.anticoagulant == 6 && item.prescription.anticoagulant_weichi!=''">iu/h</span>
78
-                                  <span v-if="item.prescription.anticoagulant == 7 && item.prescription.anticoagulant_weichi!=''">iu/h</span>
79
-                                  <span v-if="item.prescription.anticoagulant == 8 && item.prescription.anticoagulant_weichi!=''">iu/h</span>
80
-                                  <span v-if="item.prescription.anticoagulant == 9 && item.prescription.anticoagulant_weichi!=''">iu/h</span>
81
-                                  <span v-if="item.prescription.anticoagulant == 10 && item.prescription.anticoagulant_weichi!=''">mg</span>
72
+                                <span>
73
+                                  {{getAnticoagulantWeichi(item.patient.id)?getAnticoagulantWeichi(item.patient.id):''}}
74
+                                  <span v-if="getAnticoagulant(item.patient.id) == 1 && getAnticoagulantWeichi(item.patient.id)!=''">mg/h</span>
75
+                                  <span v-if="getAnticoagulant(item.patient.id) == 2 && getAnticoagulantWeichi(item.patient.id)!=''">iu/h</span>
76
+                                  <span v-if="getAnticoagulant(item.patient.id) == 3 && getAnticoagulantWeichi(item.patient.id)!=''">iu/h</span>
77
+                                  <span v-if="getAnticoagulant(item.patient.id) == 4 && getAnticoagulantWeichi(item.patient.id)!=''">mg/h</span>
78
+                                  <span v-if="getAnticoagulant(item.patient.id) == 5 && getAnticoagulantWeichi(item.patient.id)!=''">ml/h</span>
79
+                                  <span v-if="getAnticoagulant(item.patient.id) == 6 && getAnticoagulantWeichi(item.patient.id)!=''">iu/h</span>
80
+                                  <span v-if="getAnticoagulant(item.patient.id) == 7 && getAnticoagulantWeichi(item.patient.id)!=''">iu/h</span>
81
+                                  <span v-if="getAnticoagulant(item.patient.id) == 8 && getAnticoagulantWeichi(item.patient.id)!=''">iu/h</span>
82
+                                  <span v-if="getAnticoagulant(item.patient.id) == 9 && getAnticoagulantWeichi(item.patient.id)!=''">iu/h</span>
83
+                                  <span v-if="getAnticoagulant(item.patient.id) == 10 && getAnticoagulantWeichi(item.patient.id)!=''">mg</span>
82
                                 </span>
84
                                 </span>
83
-                                <span>{{item.prescription.anticoagulant_zongliang?item.prescription.anticoagulant_zongliang:""}}
84
-                                  <span v-if="item.prescription.anticoagulant == 1 && item.prescription.anticoagulant_zongliang!=''">mg</span>
85
-                                  <span v-if="item.prescription.anticoagulant == 2 && item.prescription.anticoagulant_zongliang!=''">iu</span>
86
-                                  <span v-if="item.prescription.anticoagulant == 3 && item.prescription.anticoagulant_zongliang!=''">iu</span>
87
-                                  <span v-if="item.prescription.anticoagulant == 4 && item.prescription.anticoagulant_zongliang!=''">mg</span>
88
-                                  <span v-if="item.prescription.anticoagulant == 5 && item.prescription.anticoagulant_zongliang!=''">mg</span>
89
-                                  <span v-if="item.prescription.anticoagulant == 6 && item.prescription.anticoagulant_zongliang!=''">iu/h</span>
90
-                                  <span v-if="item.prescription.anticoagulant == 7 && item.prescription.anticoagulant_zongliang!=''">iu</span>
91
-                                  <span v-if="item.prescription.anticoagulant == 8 && item.prescription.anticoagulant_zongliang!=''">iu</span>
92
-                                  <span v-if="item.prescription.anticoagulant == 9 && item.prescription.anticoagulant_zongliang!=''">iu/h</span>
93
-                                  <span v-if="item.prescription.anticoagulant == 10 && item.prescription.anticoagulant_zongliang!=''">mg</span>
85
+                                <span>
86
+                                    {{getAnticoagulantZongliang(item.patient.id)?getAnticoagulantZongliang(item.patient.id):''}}
87
+                                  <span v-if="getAnticoagulant(item.patient.id) == 1 && getAnticoagulantZongliang(item.patient.id)!=''">mg</span>
88
+                                  <span v-if="getAnticoagulant(item.patient.id) == 2 && getAnticoagulantZongliang(item.patient.id)!=''">iu</span>
89
+                                  <span v-if="getAnticoagulant(item.patient.id) == 3 && getAnticoagulantZongliang(item.patient.id)!=''">iu</span>
90
+                                  <span v-if="getAnticoagulant(item.patient.id)== 4 && getAnticoagulantZongliang(item.patient.id)!=''">mg</span>
91
+                                  <span v-if="getAnticoagulant(item.patient.id) == 5 && getAnticoagulantZongliang(item.patient.id)!=''">mg</span>
92
+                                  <span v-if="getAnticoagulant(item.patient.id) == 6 && getAnticoagulantZongliang(item.patient.id)!=''">iu/h</span>
93
+                                  <span v-if="getAnticoagulant(item.patient.id) == 7 && getAnticoagulantZongliang(item.patient.id)!=''">iu</span>
94
+                                  <span v-if="getAnticoagulant(item.patient.id) == 8 && getAnticoagulantZongliang(item.patient.id)!=''">iu</span>
95
+                                  <span v-if="getAnticoagulant(item.patient.id) == 9 && getAnticoagulantZongliang(item.patient.id)!=''">iu/h</span>
96
+                                  <span v-if="getAnticoagulant(item.patient.id) == 10 && getAnticoagulantZongliang(item.patient.id)!=''">mg</span>
94
                                 </span>
97
                                 </span>
95
                              </td>
98
                              </td>
96
-                             <td>{{item.prescription.dialyzer_perfusion_apparatus}}</td>
99
+                             <td>
100
+                               <span>{{getDialyzerPerfusionApparatus(item.patient.id)?getDialyzerPerfusionApparatus(item.patient.id):''}}</span></td>
97
                            </tr>
101
                            </tr>
98
                          </thead>
102
                          </thead>
99
                       </table>
103
                       </table>
120
                 { path: false, name: '参数打印' }
124
                 { path: false, name: '参数打印' }
121
             ],
125
             ],
122
             tableData:[],
126
             tableData:[],
123
-            nowDate:""
127
+            nowDate:"",
128
+            start_time:"",
129
+            prescriptionList:[],
130
+            dialysisBefor:[]
124
         }
131
         }
125
     },
132
     },
126
     methods:{
133
     methods:{
134
             style: style,
141
             style: style,
135
             scanStyles: false
142
             scanStyles: false
136
             })
143
             })
144
+        },
145
+
146
+         getLastWeight(id){
147
+       var lastweight = ""
148
+        for(let i=0;i<this.dialysisBefor.length;i++){
149
+          if(this.dialysisBefor[i].patient_id == id){
150
+             lastweight = this.dialysisBefor[i].weight_after_last_transparency
151
+          }
152
+        }
153
+        return lastweight
154
+     },
155
+     getWeightBefor(id){
156
+       var assessmentBeforWeight = ""
157
+        for(let i=0;i<this.dialysisBefor.length;i++){
158
+          if(this.dialysisBefor[i].patient_id == id){
159
+             assessmentBeforWeight = this.dialysisBefor[i].weight_before
160
+          }
161
+        }
162
+       return assessmentBeforWeight
163
+     },
164
+     getDryWeight(id){
165
+        var dryWeight = ""
166
+        for(let i=0;i<this.dialysisBefor.length;i++){
167
+          if(this.dialysisBefor[i].patient_id == id){
168
+             dryWeight = this.dialysisBefor[i].dry_weight
169
+          }
170
+        }
171
+       return dryWeight
172
+     },
173
+     getSysBloodPressure(id){
174
+       var sysBloodPressure = ""
175
+        for(let i=0;i<this.dialysisBefor.length;i++){
176
+          if(this.dialysisBefor[i].patient_id == id){
177
+             sysBloodPressure = this.dialysisBefor[i].systolic_blood_pressure
178
+          }
137
         }
179
         }
180
+        return sysBloodPressure
181
+     },
182
+     getTargetUltrafiltration(id){
183
+       var targetUltrafiltration = ""
184
+       for(let i=0;i<this.prescriptionList.length;i++){
185
+          if(this.prescriptionList[i].patient_id == id){
186
+             targetUltrafiltration = this.prescriptionList[i].target_ultrafiltration
187
+          }
188
+        }
189
+        return targetUltrafiltration
190
+     },
191
+     getBloodFlowVolume(id){
192
+       var bloodFlowVolume = ""
193
+       for(let i=0;i<this.prescriptionList.length;i++){
194
+          if(this.prescriptionList[i].patient_id == id){
195
+             bloodFlowVolume = this.prescriptionList[i].blood_flow_volume
196
+          }
197
+        }
198
+       return bloodFlowVolume
199
+     },
200
+     getDialyzerPerfusionApparatus(id){
201
+       var dialyzerPerfusionApparatus = ""
202
+        for(let i=0;i<this.prescriptionList.length;i++){
203
+          if(this.prescriptionList[i].patient_id == id){
204
+             dialyzerPerfusionApparatus = this.prescriptionList[i].dialyzer_perfusion_apparatus
205
+          }
206
+        } 
207
+      return dialyzerPerfusionApparatus
208
+     },
209
+     getAnticoagulant(id){
210
+       var anticoagulant = ""
211
+        for(let i=0;i<this.prescriptionList.length;i++){
212
+          if(this.prescriptionList[i].patient_id == id){
213
+             anticoagulant = this.prescriptionList[i].anticoagulant
214
+          }
215
+        } 
216
+       return anticoagulant
217
+     },
218
+     getAnticoagulantShouji(id){
219
+       var shouji = ""
220
+       for(let i=0;i<this.prescriptionList.length;i++){
221
+         if(this.prescriptionList[i].patient_id == id){
222
+            shouji = this.prescriptionList[i].anticoagulant_shouji
223
+          }
224
+        } 
225
+       return shouji
226
+     },
227
+     getAnticoagulantWeichi(id){
228
+        var weichi = ""
229
+        for(let i=0;i<this.prescriptionList.length;i++){
230
+         if(this.prescriptionList[i].patient_id == id){
231
+            weichi = this.prescriptionList[i].anticoagulant_weichi
232
+        } 
233
+       return weichi
234
+      }
235
+     },
236
+     getAnticoagulantZongliang(id){
237
+       var zongliang = ""
238
+       for(let i=0;i<this.prescriptionList.length;i++){
239
+         if(this.prescriptionList[i].patient_id == id){
240
+            zongliang = this.prescriptionList[i].anticoagulant_zongliang
241
+          }
242
+        } 
243
+       return zongliang
244
+     }
138
     },
245
     },
139
    created(){
246
    created(){
140
      var nowDate  = moment(new Date()).add('year',0).format("YYYY-MM-DD")
247
      var nowDate  = moment(new Date()).add('year',0).format("YYYY-MM-DD")
141
      this.nowDate = nowDate
248
      this.nowDate = nowDate
249
+     var startime =  this.$route.query.startime
250
+     console.log("startime",startime)
251
+     this.start_time = startime
142
    },
252
    },
143
    mounted(){
253
    mounted(){
144
      var ids = this.$store.getters.temp_params.batch_print_dialysis_record_ids
254
      var ids = this.$store.getters.temp_params.batch_print_dialysis_record_ids
145
      console.log("打印数据",ids)
255
      console.log("打印数据",ids)
146
-     getDialysisBatchParameters(ids.join(',')).then(response=>{
256
+     getDialysisBatchParameters(ids.join(','),this.start_time).then(response=>{
147
         if(response.data.state == 1){
257
         if(response.data.state == 1){
148
           var schedule =  response.data.data.schedule
258
           var schedule =  response.data.data.schedule
149
           console.log("schedule",schedule)
259
           console.log("schedule",schedule)
150
           this.tableData = schedule
260
           this.tableData = schedule
261
+          var prescription = response.data.data.prescription
262
+          this.prescriptionList = prescription
263
+          console.log("prescription",prescription)
264
+          var dialysbefor = response.data.data.dialysbefor
265
+          console.log("dialysbefor",dialysbefor)
266
+          this.dialysisBefor = dialysbefor
151
         } 
267
         } 
152
      })
268
      })
153
    }
269
    }