XMLWAN 3 years ago
parent
commit
245d7999dc

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

@@ -468,3 +468,11 @@ export function getAccessList(params) {
468 468
     params: params
469 469
   })
470 470
 }
471
+
472
+export function getInitDataList(params) {
473
+  return request({
474
+    url: '/api/patient/getinitdatelist',
475
+    method: 'get',
476
+    params: params
477
+  })
478
+}

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

@@ -148,8 +148,8 @@
148 148
         <el-pagination
149 149
           @size-change="handleSizeChange"
150 150
           @current-change="handleCurrentChange"
151
-          :page-sizes="[10, 50, 100]"
152
-          :page-size="10"
151
+          :page-sizes="[5,10, 50, 100]"
152
+          :page-size="5"
153 153
           background
154 154
           style="margin-top:20px;float: right"
155 155
           layout="total, sizes, prev, pager, next, jumper"

+ 2 - 2
src/xt_pages/stock/drugs/cancelDrugStockOrder.vue View File

@@ -147,8 +147,8 @@
147 147
       <el-pagination
148 148
         @size-change="handleSizeChange"
149 149
         @current-change="handleCurrentChange"
150
-        :page-sizes="[10, 50, 100]"
151
-        :page-size="10"
150
+        :page-sizes="[5,10, 15, 100]"
151
+        :page-size="5"
152 152
         background
153 153
         style="margin-top:20px;float: right;margin-bottom:10px;"
154 154
         layout="total, sizes, prev, pager, next, jumper"

+ 1 - 1
src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue View File

@@ -635,7 +635,7 @@ export default {
635 635
                 this.$router.back(-1);
636 636
               }
637 637
               if(response.data.data.msg == 2){
638
-                this.$message.error("退库数量大于库数量")
638
+                this.$message.error("退库数量大于库数量")
639 639
               }
640 640
             }
641 641
           });

+ 11 - 2
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue View File

@@ -131,7 +131,7 @@
131 131
                         v-for="(item,index) in numberList"
132 132
                         :key="index"
133 133
                         :label="item.batch_number"
134
-                        :value="item.batch_number">
134
+                        :value="item.id">
135 135
                       </el-option>
136 136
                     </el-select>
137 137
                   </el-form-item>
@@ -448,6 +448,7 @@ export default {
448 448
       tempObj["number"] = ""
449 449
       tempObj["batch_number"] = ""
450 450
       tempObj["max_unit"] = ""
451
+      tempObj["warehouse_info_id"] = 0
451 452
       this.recordInfo.recordData.push(tempObj);
452 453
     },
453 454
     handleDelete: function(index, row) {
@@ -566,12 +567,19 @@ export default {
566 567
                   this.recordInfo.recordData[i].dealer = this.dealerList[z].id
567 568
               }
568 569
             }
570
+
571
+            for(let y=0;y<this.numberList.length;y++){
572
+              if(this.recordInfo.recordData[i].batch_number == this.numberList[y].id){
573
+                this.recordInfo.recordData[i].batch_number = this.numberList[y].batch_number
574
+                this.recordInfo.recordData[i].warehouse_info_id = this.numberList[y].id
575
+              }
576
+            }
569 577
           }
570 578
           const params = {
571 579
             stockOut: this.recordInfo.recordData
572 580
           };
573 581
           console.log("params222222",params)
574
-         
582
+        
575 583
           postDrugWarehouseOut(
576 584
             params,
577 585
             this.warehouse_out_time,
@@ -740,6 +748,7 @@ export default {
740 748
     tempObj["min_number"] = ""
741 749
     tempObj["dealer"] = ""
742 750
     tempObj["number"] = ""
751
+    tempObj["warehouse_info_id"] = 0
743 752
     this.recordInfo.recordData.push(tempObj);
744 753
     this.GetConfigInfo();
745 754
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 14 - 2
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue View File

@@ -100,7 +100,7 @@
100 100
                         v-for="(item,index) in numberList"
101 101
                         :key="index"
102 102
                         :label="item.batch_number"
103
-                        :value="item.batch_number">
103
+                        :value="item.id">
104 104
                       </el-option>
105 105
                     </el-select>
106 106
                   </el-form-item>
@@ -451,6 +451,7 @@
451 451
         tempObj['count_unit'] = ""
452 452
         tempObj['dealer'] = 0
453 453
         tempObj['manufacturer'] = 0
454
+        tempObj['warehouse_info_id'] = 0
454 455
         this.recordInfo.recordData.push(tempObj)
455 456
       }, handleDelete: function(index, row) {
456 457
         if(this.drug_show == true){
@@ -574,12 +575,23 @@
574 575
                     this.recordInfo.recordData[i].dealer = this.dealerList[z].id
575 576
                  }
576 577
                }
578
+               
579
+               for(let y=0;y<this.numberList.length;y++){
580
+                  if(this.recordInfo.recordData[i].batch_number == this.numberList[y].id){
581
+                     this.recordInfo.recordData[i].batch_number = this.numberList[y].batch_number
582
+                     this.recordInfo.recordData[i].warehouse_info_id =  this.numberList[y].id
583
+                  }
584
+                  if(this.recordInfo.recordData[i].batch_number == this.numberList[y].batch_number){
585
+                     this.recordInfo.recordData[i].warehouse_info_id =  this.numberList[y].id
586
+                  }
587
+               }
588
+
577 589
             }
578 590
             const params = {
579 591
               'stockOut': this.recordInfo.recordData
580 592
             }
581 593
             console.log("params----",params)
582
-           
594
+            
583 595
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
584 596
               if (response.data.state == 0) {
585 597
                 this.$message.error(response.data.msg)

+ 6 - 6
src/xt_pages/user/components/PatientSidebar.vue View File

@@ -102,10 +102,10 @@ export default {
102 102
               name: '1-2',
103 103
               label: '病程管理'
104 104
             },
105
-            // {
106
-            //   name: '1-9',
107
-            //   label: '阶段小结'
108
-            // },
105
+            {
106
+              name: '1-9',
107
+              label: '阶段小结'
108
+            },
109 109
             {
110 110
               name: '1-3',
111 111
               label: '检验检查'
@@ -188,7 +188,7 @@ export default {
188 188
       }else if (name == '1-8'){
189 189
         this.$router.push({path:'/patients/patients/'+this.id+'/inspectionInfectious'})
190 190
       }else if (name == '1-9'){
191
-        this.$router.push({path:'/patients/patients/'+6092+'/templateSummary'})
191
+        this.$router.push({path:'/patients/patients/'+2448+'/templateSummary'})
192 192
       }
193 193
     },
194 194
     changePatient(value) {
@@ -334,7 +334,7 @@ export default {
334 334
           path: '/patients/patient/' + this.id + '/proeducation'
335 335
         })
336 336
       }else if (patientKey == '1-9'){
337
-        this.$router.push({path:'/patients/patients/'+this.id+'/templateSummary'})
337
+        this.$router.push({path:'/patients/patients/'+2448+'/templateSummary'})
338 338
       }
339 339
     
340 340
      }else{

+ 16 - 5
src/xt_pages/user/doctorAdvice.vue View File

@@ -2235,7 +2235,8 @@ export default {
2235 2235
               this.adviceForm.advice_name = arr[0]
2236 2236
           }
2237 2237
 
2238
-       
2238
+          console.log("2323223",this.adviceForm)
2239
+        
2239 2240
           EditNewDoctorAdvice(
2240 2241
             this.patientID,
2241 2242
             this.adviceForm.id,
@@ -4059,6 +4060,7 @@ export default {
4059 4060
           this.nameForm.advice_name = arr[0]
4060 4061
        }
4061 4062
       console.log("医嘱2222",this.nameForm)
4063
+     
4062 4064
       var _this = this;
4063 4065
       this.$refs[formName].validate(valid => {
4064 4066
         if (valid) {
@@ -4453,6 +4455,7 @@ export default {
4453 4455
                   type: "",
4454 4456
                   custom_id: "",
4455 4457
                   drug_specs: [],
4458
+                  drug_id:"",
4456 4459
                 }
4457 4460
 
4458 4461
                 medicalList[i].drug_name = medicalList[i].drug_name + "(自备药)"
@@ -4465,6 +4468,7 @@ export default {
4465 4468
                 obj.type = 2
4466 4469
                 obj.custom_id = this.rand(10000000, 99999999)
4467 4470
                 obj.drug_specs = medicalList[i].drug_specs
4471
+                obj.drug_id = medicalList[i].id
4468 4472
                 this.all_drug.push(obj)
4469 4473
               }
4470 4474
             }
@@ -4489,6 +4493,7 @@ export default {
4489 4493
                   type: "",
4490 4494
                   custom_id: "",
4491 4495
                   drug_specs: [],
4496
+                  drug_id:"",
4492 4497
                 }
4493 4498
 
4494 4499
                 obj.drug_name = base_drug_list[i].drug_name
@@ -4500,6 +4505,7 @@ export default {
4500 4505
                 obj.type = 1
4501 4506
                 obj.custom_id = this.rand(10000000, 99999999)
4502 4507
                 obj.drug_specs = base_drug_list[i].drug_specs
4508
+                obj.drug_id = base_drug_list[i].id
4503 4509
                 this.all_drug.push(obj)
4504 4510
               }
4505 4511
             }
@@ -4613,11 +4619,16 @@ export default {
4613 4619
         cb(results);
4614 4620
       },
4615 4621
 
4616
-      handleSelect1(){
4617
-
4622
+      handleSelect1(val){
4623
+        this.drug_id = val.drug_id
4624
+        
4618 4625
       },
4619
-      handleSelect(){
4620
-
4626
+      handleSelect(val){
4627
+        this.src_type = 1
4628
+        this.drug_id = val.drug_id
4629
+        this.nameForm.drug_id = val.drug_id
4630
+        this.nameForm.way = 1
4631
+        this.nameForm.drug_name_id = val.drug_id
4621 4632
       }
4622 4633
   },
4623 4634
   watch: {

+ 164 - 246
src/xt_pages/user/templateSummary.vue View File

@@ -44,17 +44,17 @@
44 44
                 <el-table-column type="selection" width="40" align="center"></el-table-column>
45 45
                 <el-table-column label="阶段小结名称" align="center">
46 46
                   <template slot-scope="scope">
47
-                    {{ scope.row.title}}
47
+                    <!-- {{ scope.row.title}} -->
48 48
                   </template>
49 49
                 </el-table-column>
50 50
                 <el-table-column label="记录时间" align="center">
51 51
                   <template slot-scope="scope">
52
-                    {{ recordTime(scope.row.record_time) }}
52
+                    <!-- {{ recordTime(scope.row.record_time) }} -->
53 53
                   </template>
54 54
                 </el-table-column>
55 55
                 <el-table-column label="记录医生" align="center">
56 56
                   <template slot-scope="scope">
57
-                    {{ doctorName(scope.row.recorder) }}
57
+                    <!-- {{ doctorName(scope.row.recorder) }} -->
58 58
                   </template>
59 59
                 </el-table-column>
60 60
               </el-table>
@@ -76,36 +76,55 @@
76 76
         <div>
77 77
           <div class="new_record_form">
78 78
             <div class="cell clearfix">
79
-              <label class="title"><span class="name">阶段小结时间</span> : </label>
80 79
               <el-form>
80
+                <el-row :gutter="24">
81
+                  <el-col :span="20">
82
+                    <el-form-item label="阶段小结名称:">
83
+                      <el-input v-model="form.title"></el-input>
84
+                    </el-form-item>
85
+                  </el-col>
86
+                </el-row>
81 87
                  <el-row :gutter="24">
82 88
                   <el-col :span="8">
83
-                    <el-form-item>
89
+                    <el-form-item label="阶段小结时间:">
84 90
                         <el-date-picker
85
-                            v-model="value"
91
+                            v-model="form.start_year"
86 92
                             type="year"
93
+                            value-format="yyyy-MM-dd"
87 94
                             placeholder="选择年">
88 95
                         </el-date-picker>
89 96
                     </el-form-item> 
90 97
                   </el-col>
91 98
                   <el-col :span="8">
92 99
                     <el-form-item>
93
-                      <el-radio-group v-model="radio">
100
+                      <el-radio-group v-model="form.radio">
94 101
                         <el-radio :label="1" >月份</el-radio>
95 102
                         <el-radio :label="2" >季度</el-radio>
96 103
                      </el-radio-group>
97 104
                     </el-form-item> 
98 105
                   </el-col>
99
-                  <el-col :span="8">
106
+                  <el-col :span="8" v-if="form.radio == 1">
100 107
                     <el-form-item>
101 108
                       <el-date-picker
102
-                        v-model="value"
109
+                        value-format="MM"
110
+                        v-model="form.start_month"
103 111
                         type="month"
104 112
                         placeholder="选择月">
105 113
                       </el-date-picker>
106 114
                     </el-form-item> 
107 115
                   </el-col>
108
-                   
116
+                  <el-col :span="8" v-if="form.radio == 2">
117
+                    <el-form-item>
118
+                       <el-select v-model="form.quarter" placeholder="请选择">
119
+                        <el-option
120
+                          v-for="item in timeType"
121
+                          :key="item.id"
122
+                          :label="item.name"
123
+                          :value="item.id">
124
+                        </el-option>
125
+                      </el-select>
126
+                    </el-form-item> 
127
+                  </el-col> 
109 128
                  </el-row>  
110 129
                 
111 130
               </el-form>
@@ -117,46 +136,52 @@
117 136
                   <el-row :gutter="24">
118 137
                     <el-col :span="8">
119 138
                      <el-form-item label="干体重">
120
-                      <el-input></el-input>
139
+                      <el-input v-model="form.dry_weight"></el-input>
121 140
                      </el-form-item>  
122 141
                     </el-col>
123 142
                     <el-col :span="8">
124 143
                      <el-form-item label="共透析(次)">
125
-                      <el-input></el-input>
144
+                      <el-input v-model="form.dialysis_count"></el-input>
126 145
                      </el-form-item>  
127 146
                     </el-col>
128 147
                     <el-col :span="8">
129 148
                      <el-form-item label="HD(次)">
130
-                      <el-input></el-input>
149
+                      <el-input v-model="form.hd_count"></el-input>
131 150
                      </el-form-item>  
132 151
                     </el-col>
133 152
                   </el-row>
134 153
                   <el-row :gutter="24">
135 154
                     <el-col :span="8">
136 155
                      <el-form-item label="HDF(次)">
137
-                      <el-input></el-input>
156
+                      <el-input v-model="form.hdf_count"></el-input>
138 157
                      </el-form-item>  
139 158
                     </el-col>
140 159
                     <el-col :span="8">
141 160
                      <el-form-item label="HP(次)">
142
-                      <el-input></el-input>
161
+                      <el-input v-model="form.hp_count"></el-input>
143 162
                      </el-form-item>  
144 163
                     </el-col>
145 164
                     <el-col :span="8">
146 165
                      <el-form-item label="其他(次)">
147
-                      <el-input></el-input>
166
+                      <el-input v-model="form.other_count"></el-input>
148 167
                      </el-form-item>  
149 168
                     </el-col>
150 169
                   </el-row>
151 170
                    <el-row :gutter="24">
152 171
                     <el-col :span="8">
153 172
                      <el-form-item label="透析器">
154
-                      <el-input></el-input>
173
+                      <el-input v-model="form.dialzer_apparatus"></el-input>
155 174
                      </el-form-item>  
156 175
                     </el-col>
176
+                    <el-col :span="8">
177
+                      <el-form-item label="灌流器">
178
+                        <el-input v-model="form.perfusion_apparatus"></el-input>
179
+                      </el-form-item>  
180
+                    </el-col>
181
+
157 182
                     <el-col :span="8">
158 183
                      <el-form-item label="抗凝剂">
159
-                      <el-input></el-input>
184
+                      <el-input v-model="form.anticoagulant"></el-input>
160 185
                      </el-form-item>  
161 186
                     </el-col>
162 187
                   </el-row>
@@ -164,17 +189,17 @@
164 189
                    <el-row :gutter="24">
165 190
                     <el-col :span="8">
166 191
                      <el-form-item label="钾">
167
-                      <el-input></el-input>
192
+                      <el-input v-model="form.kalium"></el-input>
168 193
                      </el-form-item>  
169 194
                     </el-col>
170 195
                     <el-col :span="8">
171 196
                      <el-form-item label="钙">
172
-                      <el-input></el-input>
197
+                      <el-input v-model="form.autunite"></el-input>
173 198
                      </el-form-item>  
174 199
                     </el-col>
175 200
                     <el-col :span="8">
176 201
                      <el-form-item label="钠">
177
-                      <el-input></el-input>
202
+                      <el-input v-model="form.natrium"></el-input>
178 203
                      </el-form-item>  
179 204
                     </el-col>
180 205
                   </el-row>
@@ -182,43 +207,43 @@
182 207
                    <el-row :gutter="24">
183 208
                     <el-col :span="8">
184 209
                      <el-form-item label="时">
185
-                      <el-input></el-input>
210
+                      <el-input v-model="form.hour"></el-input>
186 211
                      </el-form-item>  
187 212
                     </el-col>
188 213
                     <el-col :span="8">
189 214
                      <el-form-item label="分">
190
-                      <el-input></el-input>
215
+                      <el-input v-model="form.minute"></el-input>
191 216
                      </el-form-item>  
192 217
                     </el-col>
193 218
                   </el-row>
194 219
                   <el-row :gutter="24">
195 220
                     <el-col :span="8">
196 221
                      <el-form-item label="透前体重(kg)">
197
-                      <el-input></el-input>
222
+                      <el-input v-model="form.befor_weight"></el-input>
198 223
                      </el-form-item>  
199 224
                     </el-col>
200 225
                     <el-col :span="8">
201 226
                      <el-form-item label="透后体重(kg)">
202
-                      <el-input></el-input>
227
+                      <el-input v-model="form.after_weight"></el-input>
203 228
                      </el-form-item>  
204 229
                     </el-col>
205 230
                   </el-row>
206 231
                    <el-row :gutter="24">
207 232
                     <el-col :span="8">
208 233
                      <el-form-item label="透前血压(mmHg)">
209
-                      <el-input></el-input>
234
+                      <el-input v-model="form.befor_pressure"></el-input>
210 235
                      </el-form-item>  
211 236
                     </el-col>
212 237
                     <el-col :span="8">
213 238
                      <el-form-item label="透后血压(mmHg)">
214
-                      <el-input></el-input>
239
+                      <el-input v-model="form.after_pressure"></el-input>
215 240
                      </el-form-item>  
216 241
                     </el-col>
217 242
                   </el-row>
218 243
                  
219 244
                   <el-row>
220 245
                     <label class="title"><span class="name">阶段小结总结</span> : </label>
221
-                     <el-select v-model="value" placeholder="请选择">
246
+                     <el-select v-model="form.template_summary_id" placeholder="请选择">
222 247
                         <el-option
223 248
                         v-for="item in options"
224 249
                         :key="item.value"
@@ -226,11 +251,11 @@
226 251
                         :value="item.value">
227 252
                         </el-option>
228 253
                      </el-select>
229
-                     <el-input tyep="text"></el-input>
254
+                     <el-input tyep="text" v-model="form.template_summary_content"></el-input>
230 255
                   </el-row>
231 256
                   <el-row>
232 257
                     <label class="title"><span class="name">阶段小结个体化透析方案</span> : </label>
233
-                     <el-select v-model="value" placeholder="请选择">
258
+                     <el-select v-model="form.template_plan_id" placeholder="请选择">
234 259
                         <el-option
235 260
                         v-for="item in options"
236 261
                         :key="item.value"
@@ -238,11 +263,11 @@
238 263
                         :value="item.value">
239 264
                         </el-option>
240 265
                      </el-select>
241
-                     <el-input tyep="text"></el-input>
266
+                     <el-input tyep="text" v-model="form.template_plan_content"></el-input>
242 267
                   </el-row>
243 268
                   <el-row>
244 269
                     <label class="title"><span class="name">阶段小结化验结果</span> : </label>
245
-                     <el-select v-model="value" placeholder="请选择">
270
+                     <el-select v-model="form.template_inspection_id" placeholder="请选择">
246 271
                         <el-option
247 272
                         v-for="item in options"
248 273
                         :key="item.value"
@@ -250,12 +275,12 @@
250 275
                         :value="item.value">
251 276
                         </el-option>
252 277
                      </el-select>
253
-                     <el-input tyep="text"></el-input>
278
+                     <el-input tyep="text" v-model="form.template_inspection_content"></el-input>
254 279
                   </el-row>
255 280
                   <el-row>
256 281
                     <el-col :span="8">
257 282
                       <el-form-item label="记录医生">
258
-                        <el-select v-model="value" placeholder="请选择">
283
+                        <el-select v-model="form.admin_user_id" placeholder="请选择">
259 284
                             <el-option
260 285
                             v-for="item in options"
261 286
                             :key="item.value"
@@ -268,7 +293,7 @@
268 293
                     <el-col :span="8">
269 294
                       <el-form-item label="记录时间">
270 295
                          <el-date-picker
271
-                            v-model="value1"
296
+                            v-model="form.record_time"
272 297
                             type="datetime"
273 298
                             placeholder="选择日期时间">
274 299
                         </el-date-picker>
@@ -282,8 +307,7 @@
282 307
           
283 308
             <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
284 309
               <el-button @click="show_dialog = false">取消</el-button>
285
-              <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
286
-                         @click="createAction" :loading="uploading_new_record">保存
310
+              <el-button type="primary" @click="createAction">保存
287 311
               </el-button>
288 312
             </div>
289 313
           </div>
@@ -291,50 +315,7 @@
291 315
       </el-dialog>
292 316
 
293 317
 
294
-      <el-dialog title="修改病程记录" width="50%" top="5vh" :visible.sync="show_edit_dialog">
295
-        <div>
296
-          <div class="new_record_form">
297
-            <div class="cell clearfix">
298
-              <label class="title"><span class="name">病程日期</span> : </label>
299
-              <el-date-picker v-model="edit_course_of_disease_time" prefix-icon="el-icon-date" :editable="false"
300
-                              style="width: 200px;"
301
-                              type="datetime"
302
-                              placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm"
303
-                              value-format="yyyy-MM-dd HH:mm"></el-date-picker>
304
-
305
-              <label class="title"><span class="name">日常病程</span> : </label>
306
-              <el-select v-model="select_template" placeholder="可选择病程模板" @change="didEditSelectTemplate">
307
-                <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
308
-                           :value="option.content"></el-option>
309
-              </el-select>
310
-            </div>
311
-
312
-
313
-            <div class="cell clearfix" style="margin-top: 10px">
314
-              <label class="title"><span class="name">病程标题</span> : </label>
315
-              <el-input v-model="edit_title" style="width: 420px"></el-input>
316
-            </div>
317
-
318
-            <div class="textarea_panel">
319
-              <!--<el-input v-model="edit_new_content" type="textarea" rows="6" resize="none"></el-input>-->
320
-              <keep-alive>
321
-                <editor ref="edit_neditor"
322
-                        id="edit_editor"
323
-                        style="width: 600px"
324
-                        v-bind:r_content="edit_new_content">
325
-                </editor>
326
-              </keep-alive>
327
-            </div>
328
-
329
-            <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
330
-              <el-button @click="show_edit_dialog = false">取消</el-button>
331
-              <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
332
-                         @click="modifyAction" :loading="uploading_new_record">保存
333
-              </el-button>
334
-            </div>
335
-          </div>
336
-        </div>
337
-      </el-dialog>
318
+  
338 319
     </div>
339 320
   </div>
340 321
 
@@ -345,16 +326,11 @@
345 326
   import PatientSidebar from './components/PatientSidebar'
346 327
   import Editor from '@/components/Editor'
347 328
 
348
-  import {
349
-    createCourseOfDiseaseRecord,
350
-    deleteCourseOfDiseaseRecords,
351
-    getCourseOfDiseaseRecords,
352
-    modifyCourseOfDiseaseRecord,
353
-    GetCoursePrintData
354
-  } from '@/api/patient'
329
+  import { getInitDataList } from '@/api/patient'
355 330
   import { parseTime } from '@/utils'
356 331
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
357
-
332
+  import { uParseTime } from '@/utils/tools'
333
+  const moment = require('moment')
358 334
   export default {
359 335
     name: 'templateSummary',
360 336
     components: {
@@ -386,8 +362,50 @@
386 362
         table_current_index: -1,
387 363
         edit_current_id: 0,
388 364
         edit_title: '',
389
-        radio:1,
390
-        value:''
365
+        value:'',
366
+        form:{
367
+          title:"",
368
+          start_year:new Date(),
369
+          start_month:new Date(),
370
+          radio:1,
371
+          quarter:1,
372
+          dry_weight:"",
373
+          dialysis_count:"",
374
+          hd_count:"",
375
+          hdf_count:"",
376
+          hp_count:"",
377
+          other_count:"",
378
+          dialzer_apparatus:"",
379
+          perfusion_apparatus:"",
380
+          anticoagulant:"",
381
+          kalium:"",
382
+          autunite:"",
383
+          natrium:"",
384
+          houer:"",
385
+          minute:"",
386
+          befor_weight:"",
387
+          after_weight:"",
388
+          befor_pressure:"",
389
+          after_pressure:"",
390
+          template_summary_id:"",
391
+          template_summary_content:"",
392
+          template_plan_id:"",
393
+          template_summary_content:"",
394
+          template_inspection_id:"",
395
+          template_inspection_content:"",
396
+          admin_user_id:"",
397
+          record_time:"",
398
+          patient_id:"",
399
+          start_time:"",
400
+          end_time:"",
401
+        },
402
+        timeType:[
403
+          {id:1,name:"第一季度"},
404
+          {id:2,name:"第二季度"},
405
+          {id:3,name:"第三季度"},
406
+          {id:4,name:"第四季度"},
407
+        ],
408
+        options:[],
391 409
       }
392 410
     },
393 411
     created() {
@@ -423,179 +441,79 @@
423 441
         (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
424 442
         '-' +
425 443
         (nowDay < 10 ? '0' + nowDay : nowDay)
426
-
427
-      this.requestCourseRecords()
428
-
444
+      this.getlist()
429 445
     },
430 446
     methods: {
431
-      requestCourseRecords: function() {
432
-        this.loading = true
433
-        getCourseOfDiseaseRecords(this.patient_id, this.start_time, this.end_time).then(rs => {
434
-          this.loading = false
435
-          var resp = rs.data
436
-          if (resp.state == 1) {
437
-            this.current_select_record = null
438
-            this.records = resp.data.records
439
-            this.doctors = resp.data.doctors
440
-
441
-          } else {
442
-            this.$message.error(resp.msg)
443
-          }
444
-        }).catch(error => {
445
-          this.loading = false
446
-          this.$message.error(error)
447
-        })
447
+      getTime(val) {
448
+         if(val < 0){
449
+           return ""
450
+         }
451
+         if(val == ""){
452
+          return ""
453
+         }else {
454
+          return uParseTime(val, '{y}-{m}-{d}')
455
+         }
448 456
       },
457
+      showEdit(){
449 458
 
450
-      didChangeCurrentRecord: function(record) {
451
-        this.current_select_record = record
452 459
       },
453
-      recordTime: function(timestamp) {
454
-        var time = new Date(timestamp * 1000)
455
-        return parseTime(time, '{y}-{m}-{d} {h}:{m}')
460
+      deleteAction(){
461
+
456 462
       },
457
-      doctorName: function(doctor_id) {
458
-        for (let index = 0; index < this.doctors.length; index++) {
459
-          const doctor = this.doctors[index]
460
-          if (doctor.id == doctor_id) {
461
-            return doctor.name
462
-          }
463
-        }
464
-        return ''
463
+      onRowClick(){
464
+
465 465
       },
466
-      modifyAction: function() {
466
+      createAction(){
467 467
 
468
-        this.edit_new_content = this.$refs.edit_neditor.content
469
-        if (this.edit_new_content.length == 0) {
470
-          this.$message.error('请填写病程内容')
471
-          return
472
-        }
473
-        this.uploading_new_record = true
474
-        modifyCourseOfDiseaseRecord(this.patient_id, this.edit_new_content, this.edit_course_of_disease_time, this.edit_current_id, this.edit_title).then(rs => {
475
-          this.uploading_new_record = false
476
-          var resp = rs.data
477
-          if (resp.state == 1) {
478
-            this.records[this.table_current_index].content = resp.data.record.content
479
-            this.records[this.table_current_index].record_time = resp.data.record.record_time
480
-            this.records[this.table_current_index].recorder = resp.data.record.recorder
481
-            this.records[this.table_current_index].title = resp.data.record.title
482
-
483
-            this.show_edit_dialog = false
484
-            this.edit_new_content = ''
485
-            this.table_current_index = -1
486
-
487
-          } else {
488
-            this.table_current_index = -1
489
-            this.$message.error(resp.msg)
490
-          }
491
-
492
-        }).catch(error => {
493
-          this.table_current_index = -1
494
-          this.uploading_new_record = false
495
-          this.$message.error(error)
496
-        })
468
+      },
469
+      didChangeCurrentRecord(){
497 470
 
498 471
       },
472
+      startTimeChange(){
499 473
 
500
-      createAction: function() {
501
-        this.new_content = this.$refs.editor.content
502
-        if (this.new_content.length == 0) {
503
-          this.$message.error('请填写病程内容')
504
-          return
505
-        }
506
-        this.uploading_new_record = true
507
-        
508
-        createCourseOfDiseaseRecord(this.patient_id, this.new_content, this.course_of_disease_time, this.title).then(rs => {
509
-          this.uploading_new_record = false
510
-          var resp = rs.data
511
-          if (resp.state == 1) {
512
-            this.records.unshift(resp.data.record)
513
-            // this.$refs.record_table.setCurrentRow()
514
-            // this.$refs.record_table.setCurrentRow(this.records[0])
515
-            // this.current_select_record = this.records[0]
516
-            this.show_dialog = false
517
-            this.new_content = ''
518
-            this.title = ''
519
-
520
-          } else {
521
-            this.$message.error(resp.msg)
522
-          }
523
-
524
-        }).catch(error => {
525
-          this.uploading_new_record = false
526
-          this.$message.error(error)
527
-        })
528 474
       },
529
-      didSelectTemplate: function(templateContent) {
530
-        this.new_content = this.new_content.length > 0 ? (this.new_content + templateContent) : templateContent
475
+      endTimeChange(){
531 476
 
532
-      }, didEditSelectTemplate: function(templateContent) {
533
-        this.edit_new_content = this.edit_new_content.length > 0 ? (this.edit_new_content + templateContent) : templateContent
534 477
       },
478
+      print(){
535 479
 
536
-      didSelectionChange: function(selectRows) {
537
-        this.selectingRows = selectRows
538 480
       },
539
-      deleteAction: function() {
540
-        if (this.selectingRows.length == 0) {
541
-          return
542
-        }
543
-        var ids = []
544
-        for (let index = 0; index < this.selectingRows.length; index++) {
545
-          const row = this.selectingRows[index]
546
-          ids.push(row.id)
481
+      getQuarter(year,quarter){
482
+        var start_time = ""
483
+        if(quarter == 1){
484
+           
547 485
         }
548
-        var ids_str = ids.join(',')
549
-        this.loading = true
550
-        deleteCourseOfDiseaseRecords(this.patient_id, ids_str).then(rs => {
551
-          var resp = rs.data
552
-          if (resp.state == 1) {
553
-            for (let id_index = 0; id_index < ids.length; id_index++) {
554
-              for (let record_index = 0; record_index < this.records.length; record_index++) {
555
-                if (ids[id_index] == this.records[record_index].id) {
556
-                  this.records.splice(record_index, 1)
557
-                  break
558
-                }
559
-              }
560
-            }
561
-            this.selectingRows = []
562
-            this.$message.success('已删除')
563
-
564
-          } else {
565
-            this.$message.error(resp.msg)
566
-          }
567
-          this.loading = false
568
-        }).catch(err => {
569
-          this.loading = false
570
-          this.$message.error(err)
571
-        })
572
-      }, startTimeChange(val) {
573
-        this.requestCourseRecords()
574
-      }, endTimeChange(val) {
575
-        this.requestCourseRecords()
576
-      }, showEdit() {
577
-        if (this.table_current_index == -1) {
578
-          this.$message.error('请选择要修改的病程内容')
579
-          return
580
-        }
581
-        this.show_edit_dialog = true
582
-        this.edit_course_of_disease_time = this.recordTime(this.records[this.table_current_index].record_time)
583
-        this.edit_new_content = this.records[this.table_current_index].content
584
-        this.edit_current_id = this.records[this.table_current_index].id
585
-        this.edit_title = this.records[this.table_current_index].title
586
-        this.$refs.record_table.setCurrentRow(null)
587
-
588
-      }, tableRow({ row, rowIndex }) {
589
-        // 把每一行的索引放进row
590
-        row.index = rowIndex
591
-      }, onRowClick(row, event, column) {
592
-        this.table_current_index = row.index
593
-      },print(){
594
-        if (this.table_current_index == -1) {
595
-          this.$message.error('请选择要打印的病程')
596
-          return
486
+
487
+        // DateTime dt = new DateTime();
488
+        // switch (quarter)
489
+        // {
490
+        //     case "第一季度":
491
+        //         dt = new DateTime(year, 1, 1);
492
+        //         break;
493
+        //     case "第二季度":
494
+        //         dt = new DateTime(year, 4, 1);         
495
+        //         break;
496
+        //     case "第三季度":
497
+        //         dt = new DateTime(year, 7, 1);           
498
+        //         break;
499
+        //     case "第四季度":
500
+        //         dt = new DateTime(year, 10, 1);             
501
+        //         break;
502
+
503
+        // }
504
+
505
+      },
506
+      getlist(){
507
+        var params={
508
+        start_year:this.getTime(this.form.start_year),
509
+        start_month:this.getTime(this.form.start_month),
510
+        quarter:this.form.quarter,
597 511
         }
598
-        this.$router.push({ path: "/course/print?id="+this.records[this.table_current_index].id});
512
+        console.log("param222222",params)
513
+        console.log(moment(moment(2020 + '-01-01').toDate()).quarter(2).format("YYYY-MM-DD"))
514
+      getInitDataList(params).then(response=>{
515
+
516
+      })
599 517
       }
600 518
     }
601 519
   }