Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

See999 4 years ago
parent
commit
c2b3a9795a
37 changed files with 1997 additions and 413 deletions
  1. 8 0
      .gitignore
  2. 0 8
      .idea/Vue_New.iml
  3. 0 6
      .idea/inspectionProfiles/Project_Default.xml
  4. 0 6
      .idea/misc.xml
  5. 0 8
      .idea/modules.xml
  6. 0 6
      .idea/vcs.xml
  7. 5 3
      src/api/common/common.js
  8. 1 1
      src/api/consumable.js
  9. 33 1
      src/api/his/his.js
  10. 9 0
      src/api/project/project.js
  11. 9 0
      src/api/schedule.js
  12. 11 0
      src/router/modules/workforce.js
  13. BIN
      src/store/.DS_Store
  14. BIN
      src/xt_pages/.DS_Store
  15. BIN
      src/xt_pages/dialysis/.DS_Store
  16. 37 9
      src/xt_pages/dialysis/components/consumables.vue
  17. 6 3
      src/xt_pages/dialysis/components/dialysisParameters.vue
  18. 55 13
      src/xt_pages/outpatientCharges/components/prescriptionTable.vue
  19. 143 47
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  20. 218 24
      src/xt_pages/outpatientCharges/summary.vue
  21. 127 42
      src/xt_pages/outpatientCharges/summaryDetail.vue
  22. BIN
      src/xt_pages/outpatientDoctorStation/.DS_Store
  23. 12 37
      src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue
  24. 114 50
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  25. 3 3
      src/xt_pages/outpatientDoctorStation/components/deskRecord.vue
  26. 0 9
      src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue
  27. 62 16
      src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue
  28. 161 10
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue
  29. 65 17
      src/xt_pages/outpatientDoctorStation/pastInquiries.vue
  30. 50 13
      src/xt_pages/outpatientRegistration/index.vue
  31. 6 4
      src/xt_pages/outpatientRegistration/registrationHistory.vue
  32. BIN
      src/xt_pages/stock/.DS_Store
  33. 77 71
      src/xt_pages/stock/drugs/query.vue
  34. 416 0
      src/xt_pages/workforce/components/nextTableWeeks.vue
  35. 3 2
      src/xt_pages/workforce/components/tableWeeks.vue
  36. 348 0
      src/xt_pages/workforce/next_remind_print.vue
  37. 18 4
      src/xt_pages/workforce/remind.vue

+ 8 - 0
.gitignore View File

@@ -1,2 +1,10 @@
1 1
 node_modules/
2 2
 dist/
3
+.idea/Vue_New.iml
4
+.idea/codeStyles
5
+.idea/encodings.xml
6
+.idea/inspectionProfiles
7
+.idea/misc.xml
8
+.idea/modules.xml
9
+.idea/vcs.xml
10
+.idea/workspace.xml

+ 0 - 8
.idea/Vue_New.iml View File

@@ -1,8 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module type="WEB_MODULE" version="4">
3
-  <component name="NewModuleRootManager">
4
-    <content url="file://$MODULE_DIR$" />
5
-    <orderEntry type="inheritedJdk" />
6
-    <orderEntry type="sourceFolder" forTests="false" />
7
-  </component>
8
-</module>

+ 0 - 6
.idea/inspectionProfiles/Project_Default.xml View File

@@ -1,6 +0,0 @@
1
-<component name="InspectionProjectProfileManager">
2
-  <profile version="1.0">
3
-    <option name="myName" value="Project Default" />
4
-    <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
-  </profile>
6
-</component>

+ 0 - 6
.idea/misc.xml View File

@@ -1,6 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="JavaScriptSettings">
4
-    <option name="languageLevel" value="ES6" />
5
-  </component>
6
-</project>

+ 0 - 8
.idea/modules.xml View File

@@ -1,8 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="ProjectModuleManager">
4
-    <modules>
5
-      <module fileurl="file://$PROJECT_DIR$/.idea/Vue_New.iml" filepath="$PROJECT_DIR$/.idea/Vue_New.iml" />
6
-    </modules>
7
-  </component>
8
-</project>

+ 0 - 6
.idea/vcs.xml View File

@@ -1,6 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="VcsDirectoryMappings">
4
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
-  </component>
6
-</project>

+ 5 - 3
src/api/common/common.js View File

@@ -48,7 +48,7 @@ export function getConfigurationList(limit, page) {
48 48
 }
49 49
 
50 50
 export function getConfigurationDetail(id, params) {
51
- 
51
+
52 52
   return request({
53 53
     url: 'com/api/getconfigurationdetail?id=' + id,
54 54
     method: 'get',
@@ -531,10 +531,12 @@ export function getCountModeId(params){
531 531
 }
532 532
 
533 533
 export function getRolloutCount(params){
534
-  
534
+
535 535
   return request({
536 536
     url:"/com/api/getrolloutcount",
537 537
     method:"Get",
538 538
     params:params
539 539
   })
540
-}
540
+}
541
+
542
+

+ 1 - 1
src/api/consumable.js View File

@@ -14,7 +14,7 @@ export function GetAllZone(params){
14 14
 //获取透析参数
15 15
 
16 16
 export function getDialysisParameters(params){
17
-   console.log("params============heyuan",params)
17
+   
18 18
   return request({
19 19
      url:"/api/dialysis/getdialysisparameters",
20 20
      method:"Get",

+ 33 - 1
src/api/his/his.js View File

@@ -106,10 +106,11 @@ export function delHisProject(params) {
106 106
 }
107 107
 
108 108
 
109
-export function getHisOrderList() {
109
+export function getHisOrderList(params) {
110 110
   return request({
111 111
     url: "/api/hisorder/list",
112 112
     method: "get",
113
+    params:params,
113 114
   });
114 115
 }
115 116
 
@@ -152,5 +153,36 @@ export function Refund(params) {
152 153
 }
153 154
 
154 155
 
156
+export function delHisAddition(params) {
157
+  return request({
158
+    url: "/api/addition_charge/delete",
159
+    method: "post",
160
+    params:params,
161
+  });
162
+}
163
+
164
+
165
+
166
+export function getDoctorList() {
167
+  return request({
168
+    url: "/api/doctor/list",
169
+    method: "get",
170
+  });
171
+}
172
+
173
+
174
+export function getExportConsumeDetailList(params) {
175
+  return request({
176
+    url: "/api/consumedetail/export",
177
+    method: "get",
178
+    params:params
179
+  });
180
+}
181
+
182
+
183
+
184
+
185
+
186
+
155 187
 
156 188
 

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

@@ -461,4 +461,13 @@ export function changePatient(id,params){
461 461
       method:"Get",
462 462
       params:params
463 463
     })
464
+  }
465
+
466
+  export function getPatientDetail(id,params){
467
+    
468
+     return request({
469
+       url:"/api/histpatient/getpatientdetail?id="+id,
470
+       method:"Get",
471
+       params:params
472
+     })
464 473
   }

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

@@ -113,3 +113,12 @@ export function exportScheduleTemplate(params) {
113 113
   })
114 114
 }
115 115
 
116
+
117
+export function getNextScheduleWeekDay(params){
118
+  
119
+  return request({
120
+    url:"/api/schedule/getnextscheduleweekday",
121
+    method:"get",
122
+    params:params
123
+  })
124
+}

+ 11 - 0
src/router/modules/workforce.js View File

@@ -70,6 +70,17 @@ export default {
70 70
         title: 'remind_print',
71 71
         noCache: true
72 72
       }
73
+    },
74
+    {
75
+      path: '/schedule/remind/print/next',
76
+      component: () => import('@/xt_pages/workforce/next_remind_print'),
77
+      name: 'next_remind_print',
78
+      hidden: true,
79
+      is_menu: false,
80
+      meta: {
81
+        title: 'next_remind_print',
82
+        noCache: true
83
+      }
73 84
     }
74 85
   ]
75 86
 }

BIN
src/store/.DS_Store View File


BIN
src/xt_pages/.DS_Store View File


BIN
src/xt_pages/dialysis/.DS_Store View File


+ 37 - 9
src/xt_pages/dialysis/components/consumables.vue View File

@@ -42,7 +42,7 @@
42 42
         </div>
43 43
       </div>
44 44
       <div>
45
-        <!--<el-button size="small" icon="el-icon-printer" type="primary">打印</el-button>-->
45
+        <!-- <el-button size="small" icon="el-icon-printer" @click="exportList" type="primary">导出</el-button> -->
46 46
         <el-button size="small" type="primary" @click="statistics">统计表</el-button>
47 47
       </div>
48 48
     </div>
@@ -138,6 +138,7 @@
138 138
         new_list:[],
139 139
 
140 140
         good_types: [],
141
+        arrKey:[],
141 142
 
142 143
       }
143 144
     },
@@ -178,18 +179,19 @@
178 179
 
179 180
       },
180 181
       getGoodUserInfo(good_type_id,good_user,last_good_user) {
182
+        var arrlist =[] 
181 183
         if (good_user != null && good_user.length > 0) {
182 184
           let desc = ""
183 185
           for (let b = 0; b < good_user.length; b++){
184 186
             if(good_type_id == good_user[b].good_type_id)
185 187
               desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
186 188
           }
187
-
188
-
189
+          arrlist.push(desc)
189 190
           return desc
190 191
         }
192
+       console.log("arrlist---------",arrlist)
191 193
         return ""
192
-
194
+       
193 195
         // else if (good_user != null && good_user.length <= 0) {
194 196
         //   if (last_good_user != null && last_good_user.length > 0) {
195 197
         //     let desc = ""
@@ -219,13 +221,20 @@
219 221
             var res = response.data
220 222
             this.total = res.data.total
221 223
             this.good_types.push("姓名")
222
-
224
+            var arr = []
225
+            arr.push("name")
223 226
             for (let a = 0; a <  res.data.good_type.length; a++){
227
+              Object.keys(res.data.good_type[a]).map(item => {
228
+                if(item == 'type_name'){
229
+                  arr.push(item)
230
+                }
231
+              })
224 232
               this.good_types.push(res.data.good_type[a].type_name)
225 233
             }
226
-            console.log("res====",res.data.good_type)
234
+            this.arrKey.push(...arr)
235
+          
227 236
             this.allGoodInfo = res.data.dialysis_goods
228
-            console.log("dis===",res.data.dialysis_goods)
237
+           
229 238
             for(let i = 0; i < res.data.dialysis_goods.length; i++){
230 239
               let arr =[]
231 240
               let obj = {
@@ -271,7 +280,7 @@
271 280
 
272 281
           }
273 282
 
274
-         console.log("list",this.list)
283
+         console.log("list222222",this.list)
275 284
 
276 285
         })
277 286
 
@@ -320,7 +329,26 @@
320 329
       search() {
321 330
         this.query.page = 1
322 331
         this.GetDialysisgoods()
323
-      }
332
+      },
333
+
334
+       exportList(){
335
+         import('@/vendor/Export2Excel').then(excel => {
336
+         const tHeader = this.good_types
337
+         const filterVal = this.arrKey
338
+        
339
+         const data = this.formatJson(filterVal, this.list)
340
+         excel.export_json_to_excel({
341
+           header: tHeader,
342
+           data,
343
+           filename: '透析耗材查询'
344
+         })
345
+          this.downloadLoading = false
346
+        })
347
+       },
348
+       formatJson(filterVal, jsonData) {
349
+        return jsonData.map(v => filterVal.map(j => v[j]));
350
+      },
351
+
324 352
     }
325 353
   }
326 354
 </script>

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

@@ -220,10 +220,12 @@ export default {
220 220
     methods:{
221 221
         selectSchedulType(scheduleType) {
222 222
             this.scheduleType = scheduleType;
223
+            this.tableData = []
223 224
             this.getlist()
224 225
         },
225 226
         selectPartitionType(partitionType) {
226 227
           this.partitionType = partitionType;
228
+          this.tableData = []
227 229
           this.getlist()
228 230
         },
229 231
         getAllZone: function() {
@@ -258,7 +260,7 @@ export default {
258 260
           getDialysisParameters(params).then(response=>{
259 261
              if(response.data.state == 1){
260 262
                 var schedule = response.data.data.schedule
261
-            
263
+              
262 264
                 this.tableData = schedule
263 265
                 var total = response.data.data.total
264 266
                 this.total = total
@@ -352,6 +354,7 @@ export default {
352 354
               limit:this.limit,
353 355
               page:this.page
354 356
             }
357
+           console.log("params9999999",params)
355 358
           getDialysisParameters(params).then(response=>{
356 359
              if(response.data.state == 1){
357 360
                 var schedule = response.data.data.schedule
@@ -478,7 +481,7 @@ export default {
478 481
              dryWeight = this.dialysisBefor[i].dry_weight
479 482
           }
480 483
         }
481
-        console.log("dryweight=====",dryWeight)
484
+       
482 485
        return dryWeight
483 486
      },
484 487
      getSysBloodPressure(id){
@@ -488,7 +491,7 @@ export default {
488 491
              sysBloodPressure = this.dialysisBefor[i].systolic_blood_pressure
489 492
           }
490 493
         }
491
-        console.log("sysBloodPressure=====",sysBloodPressure)
494
+      
492 495
         return sysBloodPressure
493 496
      },
494 497
      getTargetUltrafiltration(id){

+ 55 - 13
src/xt_pages/outpatientCharges/components/prescriptionTable.vue View File

@@ -10,39 +10,55 @@
10 10
       <el-table-column align="center" prop="name" width="90" label="单次用量">
11 11
         <template slot-scope="scope">
12 12
           <div style="display:flex;align-items:center;">
13
-            <el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>
13
+            <!--<el-input v-model="scope.row.single_dose" readonly style="width:65%;"></el-input>-->
14
+            <div> {{scope.row.single_dose}}</div>
15
+
14 16
             <div> {{scope.row.single_dose_unit}}</div>
15 17
           </div>
16 18
         </template>
17 19
       </el-table-column>
18 20
       <el-table-column align="center" prop="name" width="100" label="用法">
19 21
         <template slot-scope="scope">
20
-          <el-input v-model="scope.row.delivery_way" readonly></el-input>
22
+          <!--<el-input v-model="scope.row.delivery_way" readonly></el-input>-->
23
+          <div> {{scope.row.delivery_way}}</div>
21 24
 
22 25
         </template>
23 26
       </el-table-column>
24 27
       <el-table-column align="center" prop="name" width="100" label="频率">
25 28
         <template slot-scope="scope">
26
-          <el-input v-model="scope.row.execution_frequency" readonly></el-input>
29
+          <div> {{scope.row.execution_frequency}}</div>
30
+
31
+          <!--<el-input v-model="scope.row.execution_frequency" readonly></el-input>-->
32
+        </template>
33
+      </el-table-column>
34
+
35
+      <el-table-column align="center" prop="day" width="50" label="天数">
36
+        <template slot-scope="scope">
37
+          {{scope.row.day}}
27 38
         </template>
28 39
       </el-table-column>
29 40
 
30 41
       <el-table-column align="center" prop="name" width="100" label="总量">
31 42
         <template slot-scope="scope">
32 43
           <div style="display:flex;align-items:center;">
33
-            <el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>
44
+            <!--<el-input v-model="scope.row.prescribing_number" style="width:60%" readonly placeholder=""></el-input>-->
45
+            <div> {{scope.row.prescribing_number}}</div>
46
+
34 47
             <div>{{scope.row.prescribing_number_unit}}</div>
35 48
           </div>
36 49
         </template>
37 50
       </el-table-column>
38 51
       <el-table-column align="center" prop="name" width="60" label="单价">
39 52
         <template slot-scope="scope">
40
-          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
53
+          <div> {{scope.row.retail_price}}</div>
54
+
55
+          <!--<el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>-->
41 56
         </template>
42 57
       </el-table-column>
43 58
       <el-table-column align="center" prop="name" width="50" label="备注">
44 59
         <template slot-scope="scope">
45
-          <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>
60
+          <!--<el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder="" readonly></el-input>-->
61
+          <div> {{scope.row.remark}}</div>
46 62
         </template>
47 63
       </el-table-column>
48 64
     </el-table>
@@ -60,42 +76,68 @@
60 76
       </el-table-column>
61 77
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
62 78
         <template slot-scope="scope">
63
-          <el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>
79
+          <!--<el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>-->
80
+          {{scope.row.single_dose}}
64 81
         </template>
65 82
       </el-table-column>
66 83
       <el-table-column align="center" prop="delivery_way" width="80" label="用法">
67 84
         <template slot-scope="scope">
68
-          <el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>
85
+          <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
86
+          {{scope.row.delivery_way}}
87
+
69 88
         </template>
70 89
       </el-table-column>
71 90
       <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
72 91
         <template slot-scope="scope">
73
-          <el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>
92
+          <!--<el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>-->
93
+          {{scope.row.execution_frequency}}
94
+
74 95
         </template>
75 96
       </el-table-column>
76 97
       <el-table-column align="center" prop="number_days" width="50" label="天数">
77 98
         <template slot-scope="scope">
78
-          <el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>
99
+          <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
100
+          {{scope.row.number_days}}
101
+
79 102
         </template>
80 103
       </el-table-column>
81 104
       <el-table-column align="center" prop="total" width="50" label="总量">
82 105
         <template slot-scope="scope">
83 106
           <div style="display:flex;">
84
-            <el-input v-model="scope.row.total" placeholder="" readonly></el-input>
107
+            <!--<el-input v-model="scope.row.total" placeholder="" readonly></el-input>-->
108
+            {{scope.row.total}}
109
+
110
+            <div>{{scope.row.unit}}</div>
111
+
85 112
           </div>
86 113
         </template>
87 114
       </el-table-column>
88 115
       <el-table-column align="center" prop="name" width="50" label="单价">
89 116
         <template slot-scope="scope">
90
-          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
117
+          <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
118
+          {{scope.row.price}}
119
+
91 120
         </template>
92 121
       </el-table-column>
93 122
       <el-table-column align="center" prop="name" width="50" label="备注">
94 123
         <template slot-scope="scope">
95
-          <el-input v-model="scope.row.remark" readonly></el-input>
124
+          <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
125
+          {{scope.row.remark}}
126
+
96 127
         </template>
97 128
       </el-table-column>
98 129
     </el-table>
130
+
131
+    <div class="additionalBox">
132
+      <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
133
+        <span>{{item.item_name}}</span>
134
+        <el-input v-model="item.price" placeholder="" style="width:50px;" readonly></el-input>
135
+        共
136
+        <el-input v-model="item.count" placeholder="" style="width:50px;" readonly></el-input>
137
+        次
138
+        <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
139
+      </div>
140
+    </div>
99 141
   </div>
100 142
 </template>
101 143
 

+ 143 - 47
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -334,6 +334,7 @@
334 334
                   execution_frequency: prescription.advices[b].execution_frequency,
335 335
                   retail_price: prescription.advices[b].price.toString(),
336 336
                   remark: prescription.advices[b].remark,
337
+                  day: prescription.advices[b].day,
337 338
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
338 339
                   single_dose_unit: prescription.advices[b].single_dose_unit,
339 340
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
@@ -357,8 +358,10 @@
357 358
                   total: prescription.project[b].count.toString(),
358 359
                   price: prescription.project[b].price,
359 360
                   remark: prescription.project[b].remark,
360
-                  medical_code: prescription.project[b].project.medical_code
361
+                  medical_code: prescription.project[b].project.medical_code,
362
+                  unit:prescription.project[b].unit,
361 363
                 }
364
+
362 365
                 tempProject.push(obj)
363 366
               }
364 367
               let index = i + 1
@@ -421,19 +424,21 @@
421 424
 
422 425
             }
423 426
           }
424
-          return Math.floor(total * 100) / 100
425
-
426 427
         } else {
427
-          var total = 0
428 428
           if (this.curPrescriptions.project != null) {
429 429
             for (let b = 0; b < this.curPrescriptions.project.length; b++) {
430 430
               total = total +  Math.floor((this.curPrescriptions.project[b].price * this.curPrescriptions.project[b].total) * 100) / 100
431 431
 
432 432
             }
433 433
           }
434
-          return Math.floor(total * 100) / 100
434
+        }
435 435
 
436
+        if (this.curPrescriptions.addition != null) {
437
+          for (let b = 0; b < this.curPrescriptions.addition.length; b++) {
438
+            total = total +  Math.floor((this.curPrescriptions.addition[b].price * this.curPrescriptions.addition[b].count) * 100) / 100
439
+          }
436 440
         }
441
+        return Math.floor(total * 100) / 100
437 442
 
438 443
       },
439 444
       getTotal() {
@@ -450,12 +455,14 @@
450 455
               total = total + Math.floor((this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total) * 100) / 100
451 456
             }
452 457
           }
453
-
454
-          for (let i = 0; i < this.addtions_charge.length; i++) {
455
-            total = total + Math.floor(this.addtions_charge[i].price * 100) / 100
458
+          if (this.prescriptions[i].addition != null) {
459
+            for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
460
+              total = total + Math.floor((this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count) * 100) / 100
461
+            }
456 462
           }
457
-          return Math.floor(total * 100) / 100
458 463
         }
464
+        return Math.floor(total * 100) / 100
465
+
459 466
       },
460 467
       moreState(tab, event) {
461 468
         if (tab == 'more') {
@@ -500,28 +507,43 @@
500 507
           })
501 508
 
502 509
         } else if (index == 5) {
503
-          let params = {
504
-            'order_id': this.order.id,
505
-            'number': this.order.number,
506
-          }
507
-          Refund(params).then(response => {
508
-            if (response.data.state == 0) {
509
-              this.$message.error(response.data.msg)
510
-              this.loadingtwo = false
511
-              return false
512
-            } else {
513
-              this.$message({ message: '退费成功', type: 'success' })
514
-              this.loadingtwo = false
515 510
 
511
+          this.$confirm('是否退费', '退费', {
512
+            confirmButtonText: '确 定',
513
+            cancelButtonText: '取 消',
514
+            type: 'warning'
515
+          }).then(() => {
516
+            let params = {
517
+              'order_id': this.order.id,
518
+              'number': this.order.number,
516 519
             }
520
+            Refund(params).then(response => {
521
+              if (response.data.state == 0) {
522
+                this.$message.error(response.data.msg)
523
+                this.loadingtwo = false
524
+                return false
525
+              } else {
526
+                this.$message({ message: '退费成功', type: 'success' })
527
+                this.loadingtwo = false
528
+
529
+              }
530
+            })
531
+
532
+          }).catch(() => {
533
+
517 534
           })
518 535
 
536
+
519 537
         } else if (index == 6) {
520 538
 
521 539
           if (this.patientInfo.id == 0) {
522 540
             this.$message.error('请先选择要挂号的病人')
523 541
             return
524 542
           }
543
+
544
+
545
+
546
+
525 547
           let params = {
526 548
             'id': this.patientInfo.id,
527 549
             'record_time': this.record_date
@@ -554,45 +576,102 @@
554 576
         // console.log(id)
555 577
         // this.radioStatus = id
556 578
         // this.getPatientList()
579
+        let temp_id = id
557 580
 
558
-        switch (id) {
559
-          case 1:
560
-                this.patientTableData = []
581
+        let params = {
582
+          'record_date': this.record_date
583
+        }
584
+        getSchedulePatientList(params).then(response => {
585
+          if (response.data.state == 0) {
586
+            this.$message.error(response.data.msg)
587
+            return false
588
+          } else {
589
+            this.patientTableData = []
590
+            this.all_table_data = []
591
+            let one_count = 0
592
+            let two_count = 0
593
+            let three_count = 0
594
+            for (let i = 0; i < response.data.data.list.length; i++) {
595
+              // console.log('99999999', response.data.data.list)
561 596
 
562
-            for (let i = 0; i < this.all_table_data.length; i++){
563
-              if(this.all_table_data[i].info.prescription_status == 0 || this.all_table_data[i].info.prescription_status == 1 || this.all_table_data[i].info.prescription_status == 2 ){
564
-                this.patientTableData.push(this.all_table_data[i])
597
+              if(response.data.data.list[i].info.prescription_status == 0 || response.data.data.list[i].info.prescription_status == 1 ||response.data.data.list[i].info.prescription_status == 2 ){
598
+                if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
599
+                  one_count = one_count + 1
600
+                  this.patientTableData.push(response.data.data.list[i])
601
+                }
565 602
               }
566 603
 
567
-            }
568
-            break
569
-          case 2:
570
-            this.patientTableData = []
571
-            for (let i = 0; i < this.all_table_data.length; i++){
572
-              if(this.all_table_data[i].info.prescription_status == 3){
573
-                this.patientTableData.push(this.all_table_data[i])
604
+              if(response.data.data.list[i].info.prescription_status == 3){
605
+                if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
606
+
607
+                  two_count = two_count + 1
608
+                }
574 609
               }
575 610
 
611
+              if(response.data.data.list[i].info.prescription_status == 4){
612
+                if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
613
+                  three_count = three_count + 1
614
+                }
615
+              }
576 616
 
617
+              if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
618
+                this.all_table_data.push(response.data.data.list[i])
619
+              }
577 620
             }
578
-            break
579
-          case 3:
580
-            this.patientTableData = []
581 621
 
582
-            for (let i = 0; i < this.all_table_data.length; i++){
622
+            this.cal_one = one_count
623
+            this.cal_two = two_count
624
+            this.cal_three = three_count
583 625
 
584
-              if(this.all_table_data[i].info.prescription_status == 4){
585
-                this.patientTableData.push(this.all_table_data[i])
586
-              }
626
+            switch (temp_id) {
627
+
628
+              case 1:
629
+                this.patientTableData = []
630
+
631
+                for (let i = 0; i < this.all_table_data.length; i++){
632
+                  if(this.all_table_data[i].info.prescription_status == 0 || this.all_table_data[i].info.prescription_status == 1 || this.all_table_data[i].info.prescription_status == 2 ){
633
+                    this.patientTableData.push(this.all_table_data[i])
634
+                  }
635
+
636
+                }
637
+                break
638
+              case 2:
639
+                this.patientTableData = []
640
+                for (let i = 0; i < this.all_table_data.length; i++){
641
+                  if(this.all_table_data[i].info.prescription_status == 3){
642
+                    this.patientTableData.push(this.all_table_data[i])
643
+                  }
644
+
645
+
646
+                }
647
+                break
648
+              case 3:
649
+                this.patientTableData = []
650
+
651
+                for (let i = 0; i < this.all_table_data.length; i++){
652
+
653
+                  if(this.all_table_data[i].info.prescription_status == 4){
654
+                    this.patientTableData.push(this.all_table_data[i])
655
+                  }
656
+
657
+                }
658
+                break
659
+              case 4:
660
+                this.patientTableData = []
661
+                this.patientTableData = this.all_table_data
662
+                break
587 663
 
588 664
             }
589
-            break
590
-          case 4:
591
-            this.patientTableData = []
592
-            this.patientTableData = this.all_table_data
593
-            break
594 665
 
595
-        }
666
+            this.current_index = 0
667
+            this.$refs.tab.setCurrentRow(this.patientTableData[0])
668
+            this.getPatientInformation(this.patientTableData[0].patients.id,"")
669
+
670
+
671
+          }
672
+        })
673
+
674
+
596 675
 
597 676
 
598 677
 
@@ -699,6 +778,7 @@
699 778
 
700 779
               let tempAdvice = []
701 780
               let tempProject = []
781
+              let tempAddition = []
702 782
 
703 783
               for (let b = 0; b < prescription.advices.length; b++) {
704 784
                 let obj = {
@@ -709,6 +789,7 @@
709 789
                   execution_frequency: prescription.advices[b].execution_frequency,
710 790
                   retail_price: prescription.advices[b].price.toString(),
711 791
                   remark: prescription.advices[b].remark,
792
+                  day: prescription.advices[b].day,
712 793
                   prescribing_number: prescription.advices[b].prescribing_number.toString(),
713 794
                   single_dose_unit: prescription.advices[b].single_dose_unit,
714 795
                   prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
@@ -736,12 +817,27 @@
736 817
                 }
737 818
                 tempProject.push(obj)
738 819
               }
820
+
821
+              for (let b = 0; b < prescription.addition.length; b++) {
822
+                let obj = {
823
+                  id: prescription.addition[b].id,
824
+                  item_name: prescription.addition[b].item_name,
825
+                  price: prescription.addition[b].price,
826
+                  count: prescription.addition[b].count,
827
+                  item_id: prescription.addition[b].item_id,
828
+                }
829
+                tempAddition.push(obj)
830
+              }
831
+
832
+
833
+
739 834
               let index = i + 1
740 835
               let obj = {
741 836
                 id: prescription.id,
742 837
                 name: '处方' + index,
743 838
                 advices: tempAdvice,
744 839
                 project: tempProject,
840
+                addition:tempAddition,
745 841
                 order_status: response.data.data.prescription[i].order_status,
746 842
                 type: response.data.data.prescription[i].type
747 843
               }

+ 218 - 24
src/xt_pages/outpatientCharges/summary.vue View File

@@ -6,27 +6,40 @@
6 6
     <div class="app-container">
7 7
       <div style="display: flex;justify-content: space-between;margin-bottom:10px;">
8 8
         <div>
9
-          <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
9
+          <el-input size="small" style="width:150px;"  v-model="keywords"
10 10
                     class="filter-item"/>
11 11
           <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
12 12
             搜索
13 13
           </el-button>
14
-          <el-select size="small" v-model="value" placeholder="请选择" style="width:150px;margin-left:10px;">
14
+          <el-select size="small" v-model="admin_user_id" placeholder="请选择" style="width:150px;margin-left:10px;" @change="changeDoctor">
15 15
             <el-option
16
-              v-for="item in options"
17
-              :key="item.value"
18
-              :label="item.label"
19
-              :value="item.value">
16
+              label="全部"
17
+              value="0">
18
+            </el-option>
19
+            <el-option
20
+              v-for="item,index in doctors"
21
+              :key="index"
22
+              :label="item.user_name"
23
+              :value="item.admin_user_id">
20 24
             </el-option>
21 25
           </el-select>
22
-          <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date"
23
-                          @change="handleScheduleDateChange" :editable="false" :clearable="false"
24
-                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择日期时间"
26
+          <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
27
+                          @change="handleStartTimeChange" :editable="false" :clearable="false"
28
+                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
29
+                          format="yyyy-MM-dd"
30
+                          value-format="yyyy-MM-dd"
31
+                          align="right"></el-date-picker>
32
+
33
+          <el-date-picker size="small" v-model="end_time" prefix-icon="el-icon-date"
34
+                          @change="handleEndTimeChange" :editable="false" :clearable="false"
35
+                          style="width: 196px;margin-right:10px;" type="date" placeholder="选择结束日期"
36
+                          format="yyyy-MM-dd"
37
+                          value-format="yyyy-MM-dd"
25 38
                           align="right"></el-date-picker>
26 39
           <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
27 40
           <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
28 41
         </div>
29
-        <!--<el-button size="small" type="primary">报表下载</el-button>-->
42
+        <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
30 43
       </div>
31 44
       <el-table :data="tableData" border height="500" style="width: 100%;" :row-style="{ color: '#303133' }"
32 45
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
@@ -38,8 +51,8 @@
38 51
           type="index"
39 52
         >
40 53
         </el-table-column>
41
-        <el-table-column align="center" prop="name" label="门诊/销售编号">
42
-          <template slot-scope="scope">{{ scope.row.number }}</template>
54
+        <el-table-column align="center" prop="name" label="门诊号">
55
+          <template slot-scope="scope">{{ scope.row.his_patient.number }}</template>
43 56
         </el-table-column>
44 57
         <el-table-column align="center" prop="name" label="患者名字">
45 58
           <template slot-scope="scope">{{ scope.row.patient.name }}</template>
@@ -53,8 +66,8 @@
53 66
         <el-table-column align="center" prop="name" label="实收金额">
54 67
           <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
55 68
         </el-table-column>
56
-        <el-table-column align="center" prop="name" label="舍入金额">
57
-          <template slot-scope="scope">{{scope.row.medfee_sumamt - scope.row.medfee_sumamt}}</template>
69
+        <el-table-column align="center" prop="name" label="科室">
70
+          <template slot-scope="scope">{{scope.row.p_info.department.name}}</template>
58 71
         </el-table-column>
59 72
         <el-table-column align="center" prop="name" label="收费日期">
60 73
           <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
@@ -75,14 +88,28 @@
75 88
           </template>
76 89
         </el-table-column>
77 90
       </el-table>
91
+      <el-pagination
92
+        @size-change="handleSizeChange"
93
+        @current-change="handleCurrentChange"
94
+        :page-sizes="[10, 50, 100]"
95
+        :page-size="10"
96
+        background
97
+        style="margin-top:20px;float: right"
98
+        layout="total, sizes, prev, pager, next, jumper"
99
+        :total="total"
100
+
101
+      >
102
+      </el-pagination>
78 103
     </div>
104
+
105
+
79 106
   </div>
80 107
 </template>
81 108
 
82 109
 
83 110
 <script>
84 111
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
85
-  import { getHisOrderList } from '@/api/his/his'
112
+  import { getHisOrderList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
86 113
   import { uParseTime } from '@/utils/tools'
87 114
 
88 115
   export default {
@@ -95,10 +122,153 @@
95 122
           { path: false, name: '门诊收费' },
96 123
           { path: false, name: '项目消费明细汇总' }
97 124
         ],
98
-        tableData: []
125
+        tableData: [],
126
+        limit:10,
127
+        page:1,
128
+        keywords:"",
129
+        start_time:"",
130
+        end_time:"",
131
+        total:"",
132
+        doctors:[],
133
+        admin_user_id:"",
134
+
99 135
       }
100 136
     },
101 137
     methods: {
138
+      export_detail(){
139
+        let params= {
140
+          start_time:this.start_time,
141
+          end_time: this.end_time,
142
+        }
143
+        getExportConsumeDetailList(params).then(response => {
144
+          if (response.data.state == 0) {
145
+            this.$message.error(response.data.msg)
146
+            return false
147
+          } else {
148
+
149
+            let list = []
150
+            for (let i =0; i < response.data.data.order.length; i++){
151
+            let order =   response.data.data.order[i]
152
+              let number = ""
153
+              let name = ""
154
+              let department = ""
155
+              let doctor_name = ""
156
+              let balance_accounts = ""
157
+
158
+              let order_status = ""
159
+
160
+
161
+
162
+              if(order.his_patient != null && order.his_patient.number.length > 0){
163
+                number = order.his_patient.number
164
+
165
+              }
166
+
167
+              if(order.his_patient != null ){
168
+                if(order.his_patient.balance_accounts_type == 1){
169
+                  balance_accounts = "自费"
170
+                }
171
+
172
+                if(order.his_patient.balance_accounts_type == 2){
173
+                  balance_accounts = "医保"
174
+                }
175
+              }
176
+
177
+              if(order.patient != null && order.patient.name.length > 0){
178
+                name = order.patient.name
179
+
180
+              }
181
+
182
+              if(order.p_info != null && order.p_info.department != null && order.p_info.department.name.length > 0){
183
+                department = order.p_info.department.name
184
+
185
+              }
186
+
187
+              if(order.p_info != null && order.p_info.doctor.length > 0){
188
+                doctor_name = order.p_info.doctor
189
+              }
190
+
191
+              if(order.order_status == 1){
192
+                order_status = "待结算"
193
+              }
194
+
195
+              if(order.order_status == 2){
196
+                order_status = "已结算"
197
+              }
198
+
199
+              if(order.order_status == 3){
200
+                order_status = "已退费"
201
+              }
202
+
203
+
204
+              let obj = {
205
+                "就诊号":number,
206
+                "患者姓名":name,
207
+                "应收金额":order.medfee_sumamt,
208
+                "实收金额":order.medfee_sumamt,
209
+                "科室":department,
210
+                "医生姓名":doctor_name,
211
+                "收费类别":balance_accounts,
212
+                "收费者姓名":doctor_name,
213
+                "总金额":order.medfee_sumamt,
214
+                "现金支付":"",
215
+                "账户支付":"",
216
+                "支付宝支付":"",
217
+                "微信支付":"",
218
+                "其他支付":"",
219
+                "收费日期":"",
220
+                "收费状态":order_status,
221
+                "退费日期":"",
222
+              }
223
+              list.push(obj)
224
+            }
225
+            import('@/vendor/Export2Excel').then(excel => {
226
+              const tHeader = ['就诊号', '患者姓名', '应收金额', '实收金额', '科室',"医生姓名","收费类别","收费者姓名","总金额","现金支付","账户支付","支付宝支付","微信支付","其他支付","收费日期","收费状态","退费日期"]
227
+              const filterVal = ['就诊号', '患者姓名', '应收金额', '实收金额', '科室',"医生姓名","收费类别","收费者姓名","总金额","现金支付","账户支付","支付宝支付","微信支付","其他支付","收费日期","收费状态","退费日期"]
228
+              const data = this.formatJson(filterVal, list)
229
+              excel.export_json_to_excel({
230
+                header: tHeader,
231
+                data,
232
+                filename: "消费明细"
233
+              })
234
+            })
235
+
236
+          }
237
+        })
238
+
239
+      },  formatJson(filterVal, jsonData) {
240
+        return jsonData.map(v => filterVal.map(j => v[j]))
241
+      },
242
+      changeDoctor(){
243
+        this.page = 1
244
+        this.keywords=""
245
+        this.getHisOrderList()
246
+      },
247
+      handleSizeChange(limit){
248
+        this.limit = limit;
249
+        this.getHisOrderList()
250
+
251
+      },handleCurrentChange(page){
252
+        this.page = page;
253
+        this.getHisOrderList()
254
+
255
+
256
+      },
257
+      handleStartTimeChange(){
258
+        this.page = 1
259
+        this.keywords=""
260
+        this.getHisOrderList()
261
+      },handleEndTimeChange(){
262
+        this.page = 1
263
+        this.keywords=""
264
+        this.getHisOrderList()
265
+      },
266
+      searchAction(){
267
+        this.page = 1
268
+        this.getHisOrderList()
269
+
270
+
271
+      },
102 272
       getTimes(time) {
103 273
         return uParseTime(time, "{y}-{m}-{d}");
104 274
       },
@@ -109,17 +279,41 @@
109 279
           return uParseTime(value, temp)
110 280
         }
111 281
         return ''
282
+      },getHisOrderList(){
283
+        let params= {
284
+          page : this.page,
285
+          limit: this.limit,
286
+          keywords:this.keywords,
287
+          start_time:this.start_time,
288
+          end_time: this.end_time,
289
+          type: this.admin_user_id
290
+        }
291
+        getHisOrderList(params).then(response => {
292
+          if (response.data.state == 0) {
293
+            this.$message.error(response.data.msg)
294
+            return false
295
+          } else {
296
+            this.tableData = response.data.data.order
297
+            this.total = response.data.data.total
298
+          }
299
+        })
300
+
301
+      },getDoctorList(){
302
+        getDoctorList().then(response => {
303
+          if (response.data.state == 0) {
304
+            this.$message.error(response.data.msg)
305
+            return false
306
+          } else {
307
+            this.doctors = response.data.data.doctors
308
+          }
309
+        })
310
+
311
+
112 312
       }
113 313
     }, created() {
114
-      getHisOrderList().then(response => {
115
-        if (response.data.state == 0) {
116
-          this.$message.error(response.data.msg)
117
-          return false
118
-        } else {
119
-          this.tableData = response.data.data.order
314
+     this.getDoctorList()
315
+     this.getHisOrderList()
120 316
 
121
-        }
122
-      })
123 317
 
124 318
     }
125 319
   }

+ 127 - 42
src/xt_pages/outpatientCharges/summaryDetail.vue View File

@@ -7,22 +7,87 @@
7 7
             <div class="mainCenter">
8 8
                 <div class="centerLeft">
9 9
                     <div class="tabsBox">
10
-                      <el-tabs class="preTabs" v-model="editableTabsValue" type="card" @tab-click="tabclickEvent">
11
-                        <el-tab-pane
12
-                          v-for="(item, index) in prescriptions"
13
-                          :key="index"
14
-                          :label="item.name"
15
-                          :name="item.name"
16
-                        >
17
-                        </el-tab-pane>
18
-
19
-                        <div class="RP">
20
-                          Rp
21
-                        </div>
22
-                        <prescription-table ref="prescription_tables"
23
-                                            :prescription="curPrescriptions"></prescription-table>
10
+                      <el-table  :data="tableData" border style="width: 99%;"
11
+                                :row-style="{ color: '#303133' }"
12
+                                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
13
+
14
+                        <el-table-column align="center" prop="project_name" label="名称">
15
+                          <template slot-scope="scope">{{ scope.row.name }}</template>
16
+                        </el-table-column>
17
+
18
+                        <el-table-column align="center" prop="project_name" label="分类">
19
+                          <template slot-scope="scope">{{ scope.row.type == 1?'药品':'项目' }}</template>
20
+                        </el-table-column>
21
+
22
+
23
+                        <el-table-column align="center" prop="statistical_classification" width="100" label="组">
24
+                          <template slot-scope="scope">
25
+                            {{getGroup(scope.row.statistical_classification)}}
26
+                          </template>
27
+                        </el-table-column>
28
+                        <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
29
+                          <template slot-scope="scope">
30
+                            <!--<el-input v-model="scope.row.single_dose" placeholder="" readonly></el-input>-->
31
+                            {{scope.row.single_dose}}{{scope.row.single_dose_unit}}
32
+                          </template>
33
+                        </el-table-column>
34
+                        <el-table-column align="center" prop="delivery_way" width="80" label="用法">
35
+                          <template slot-scope="scope">
36
+                            <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
37
+                            {{scope.row.delivery_way}}
38
+
39
+                          </template>
40
+                        </el-table-column>
41
+                        <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
42
+                          <template slot-scope="scope">
43
+                            <!--<el-input v-model="scope.row.execution_frequency" placeholder="" readonly></el-input>-->
44
+                            {{scope.row.execution_frequency}}
24 45
 
25
-                      </el-tabs>
46
+                          </template>
47
+                        </el-table-column>
48
+                        <el-table-column align="center" prop="number_days" width="50" label="天数">
49
+                          <template slot-scope="scope">
50
+                            <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
51
+                            {{scope.row.day}}
52
+
53
+                          </template>
54
+                        </el-table-column>
55
+                        <el-table-column align="center" prop="total" width="50" label="总量">
56
+                          <template slot-scope="scope">
57
+                            <div style="display:flex;">
58
+                              <!--<el-input v-model="scope.row.total" placeholder="" readonly></el-input>-->
59
+                              {{scope.row.count}}
60
+                              <div>{{scope.row.prescribing_number_unit}}</div>
61
+
62
+                            </div>
63
+                          </template>
64
+                        </el-table-column>
65
+                        <el-table-column align="center" prop="name" width="50" label="单价">
66
+                          <template slot-scope="scope">
67
+                            <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
68
+                            {{scope.row.price}}
69
+
70
+                          </template>
71
+                        </el-table-column>
72
+                        <el-table-column align="center" prop="name" width="50" label="备注">
73
+                          <template slot-scope="scope">
74
+                            <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
75
+                            {{scope.row.remark}}
76
+
77
+                          </template>
78
+                        </el-table-column>
79
+                      </el-table>
80
+
81
+                      <div class="additionalBox">
82
+                        <div class="additionalOne" v-for="(item,index) in additions" :key="index">
83
+                          <span>{{item.item_name}}</span>
84
+                          <el-input v-model="item.price" placeholder="" style="width:50px;" readonly></el-input>
85
+                          共
86
+                          <el-input v-model="item.count" placeholder="" style="width:50px;" readonly></el-input>
87
+                          次
88
+                          <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
89
+                        </div>
90
+                      </div>
26 91
 
27 92
                     </div>
28 93
                     <div class="costBox">
@@ -68,6 +133,7 @@
68 133
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
69 134
 import { getHisOrder } from '@/api/his/his'
70 135
 import prescriptionTable from './components/prescriptionTable'
136
+import { getDictionaryDataConfig} from "@/utils/data";
71 137
 
72 138
 export default {
73 139
     components:{
@@ -86,6 +152,7 @@ export default {
86 152
           prescriptions: [],
87 153
           record_date: '',
88 154
           tableData: [],
155
+          additions:[],
89 156
           editableTabsValue: '1',
90 157
           loadingone: false,
91 158
           editableTabs: [{
@@ -111,7 +178,9 @@ export default {
111 178
     },created(){
112 179
       this.GetOrderDetail()
113 180
   },methods:{
114
-
181
+    getDictionaryDataConfig(module, filed_name) {
182
+      return getDictionaryDataConfig(module, filed_name)
183
+    },
115 184
     tabclickEvent(val) {
116 185
       for (let i = 0; i < this.prescriptions.length; i++) {
117 186
         if (this.prescriptions[i].name == val.name) {
@@ -134,6 +203,16 @@ export default {
134 203
         }
135 204
       })
136 205
       return targetObj
206
+    },  getGroup(id){
207
+      var name = ""
208
+      var statistics_category =  getDictionaryDataConfig('system','statistics_category')
209
+      console.log("2235",statistics_category)
210
+      for(let i=0;i<statistics_category.length;i++){
211
+        if(id == statistics_category[i].id){
212
+          name = statistics_category[i].name
213
+        }
214
+      }
215
+      return name
137 216
     },
138 217
     getTotal() {
139 218
       var total = 0
@@ -172,59 +251,65 @@ export default {
172 251
           this.order = response.data.data.order
173 252
 
174 253
           this.prescriptions = []
254
+          this.tableData = []
255
+
175 256
           for (let i = 0; i < response.data.data.prescription.length; i++) {
176 257
             var prescription = response.data.data.prescription[i]
177 258
 
178
-            let tempAdvice = []
179
-            let tempProject = []
180 259
 
181 260
             for (let b = 0; b < prescription.advices.length; b++) {
182 261
               let obj = {
183
-                advice_id: prescription.advices[b].id,
184
-                drug_name: prescription.advices[b].advice_name,
262
+                name: prescription.advices[b].advice_name,
263
+                statistical_classification:"",
264
+                type:1,
185 265
                 single_dose: prescription.advices[b].single_dose,
186 266
                 delivery_way: prescription.advices[b].delivery_way,
187 267
                 execution_frequency: prescription.advices[b].execution_frequency,
188
-                retail_price: prescription.advices[b].price.toString(),
268
+                price: prescription.advices[b].price.toString(),
269
+                day: prescription.advices[b].day,
270
+                count:prescription.advices[b].prescribing_number.toString(),
189 271
                 remark: prescription.advices[b].remark,
190
-                prescribing_number: prescription.advices[b].prescribing_number.toString(),
191 272
                 single_dose_unit: prescription.advices[b].single_dose_unit,
192 273
                 prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
193
-                min_unit: prescription.advices[b].single_dose_unit,
194
-                medical_insurance_number: prescription.advices[b].med_list_codg
195 274
 
196 275
               }
197
-              tempAdvice.push(obj)
276
+              this.tableData.push(obj)
198 277
             }
199 278
 
200 279
             for (let b = 0; b < prescription.project.length; b++) {
201
-              console.log(prescription.project[b].project.project_name)
202 280
               let obj = {
203
-                id: prescription.project[b].id,
204
-                project_id: prescription.project[b].project.id,
205
-                project_name: prescription.project[b].project.project_name,
281
+                name: prescription.project[b].project.project_name,
206 282
                 statistical_classification: prescription.project[b].project.statistical_classification,
207 283
                 single_dose: prescription.project[b].single_dose,
208 284
                 delivery_way: prescription.project[b].delivery_way,
209 285
                 execution_frequency: prescription.project[b].execution_frequency,
210
-                number_days: prescription.project[b].day,
211
-                total: prescription.project[b].count.toString(),
212 286
                 price: prescription.project[b].price,
287
+                day: prescription.project[b].day,
288
+                count: prescription.project[b].count.toString(),
213 289
                 remark: prescription.project[b].remark,
214
-                medical_code: prescription.project[b].project.medical_code
290
+                single_dose_unit:"",
291
+                prescribing_number_unit:"",
292
+                type:2,
215 293
               }
216
-              tempProject.push(obj)
294
+              this.tableData.push(obj)
217 295
             }
218
-            let index = i + 1
219
-            let obj = {
220
-              id: prescription.id,
221
-              name: '处方' + index,
222
-              advices: tempAdvice,
223
-              project: tempProject,
224
-              type: response.data.data.prescription[i].type
296
+
297
+            for (let b = 0; b < prescription.addition.length; b++) {
298
+                this.additions.push( prescription.addition[b])
225 299
             }
226
-            this.prescriptions.push(obj)
227
-            this.curPrescriptions = this.prescriptions[0]
300
+
301
+
302
+
303
+            // let index = i + 1
304
+            // let obj = {
305
+            //   id: prescription.id,
306
+            //   name: '处方' + index,
307
+            //   advices: tempAdvice,
308
+            //   project: tempProject,
309
+            //   type: response.data.data.prescription[i].type
310
+            // }
311
+            // this.prescriptions.push(obj)
312
+            // this.curPrescriptions = this.prescriptions[0]
228 313
 
229 314
           }
230 315
           // this.tableData = response.data.data.order

BIN
src/xt_pages/outpatientDoctorStation/.DS_Store View File


+ 12 - 37
src/xt_pages/outpatientDoctorStation/components/additionalCharges.vue View File

@@ -11,7 +11,7 @@
11 11
               @select='selectDrugs'>
12 12
       <el-table-column align="center" type="selection" width="40"></el-table-column>
13 13
       <el-table-column align="center" prop="name" label="名称" width="100">
14
-        <template slot-scope="scope">{{ scope.row.name }}</template>
14
+        <template slot-scope="scope">{{ scope.row.item_name }}</template>
15 15
       </el-table-column>
16 16
       <el-table-column align="center" prop="name" label="金额(元)">
17 17
         <template slot-scope="scope">
@@ -33,8 +33,7 @@
33 33
     props: {
34 34
       hisPatientInfo: Object,
35 35
       patientInfo: Object,
36
-      additions: Array,
37
-      addtions_charge: Array
36
+      additions: Array
38 37
 
39 38
     },
40 39
     data() {
@@ -61,28 +60,17 @@
61 60
         this.chargeTable = []
62 61
        
63 62
         this.visible = true
64
-        if (this.addtions_charge == null || this.addtions_charge.length == 0) {
65
-          for (let i = 0; i < this.additions.length; i++) {
66
-            let obj = {
67
-              id: '0',
68
-              item_id: this.additions[i].id.toString(),
69
-              name: this.additions[i].name,
70
-              price: this.additions[i].price.toString()
71
-            }
72
-            this.chargeTable.push(obj)
73
-          }
74
-        } else {
75
-
76
-          for (let i = 0; i < this.addtions_charge.length; i++) {
77
-            let obj = {
78
-              id: this.addtions_charge[i].id.toString(),
79
-              item_id: this.addtions_charge[i].item_id.toString(),
80
-              name: this.addtions_charge[i].item_name,
81
-              price: this.addtions_charge[i].price.toString()
82
-            }
83
-            this.chargeTable.push(obj)
63
+        for (let i = 0; i < this.additions.length; i++) {
64
+          let obj = {
65
+            id: '0',
66
+            item_id: this.additions[i].id,
67
+            item_name: this.additions[i].name,
68
+            price: this.additions[i].price,
69
+            count: this.additions[i].count,
84 70
           }
71
+          this.chargeTable.push(obj)
85 72
         }
73
+
86 74
       },
87 75
       hide() {
88 76
         this.visible = false
@@ -91,20 +79,7 @@
91 79
         this.charges = val
92 80
       },
93 81
       submitAction() {
94
-        var params = {
95
-          his_patient_id: this.hisPatientInfo.id,
96
-          patient_id: this.patientInfo.id,
97
-          medicineData: this.charges
98
-        }
99
-        saveCharges(params).then(response => {
100
-          if (response.data.state == 1) {
101
-            var data = response.data.data.additional_charges
102
-            this.$emit('setData', data)
103
-            this.$message.success('保存成功')
104
-            this.visible = false
105
-
106
-          }
107
-        })
82
+        this.$emit('setData', this.charges)
108 83
       }
109 84
     },
110 85
     watch: {

+ 114 - 50
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue View File

@@ -145,6 +145,14 @@
145 145
                           <el-table-column label="规格" width="60">
146 146
                             <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
147 147
                           </el-table-column>
148
+                          <el-table-column label="库存" width="60">
149
+                            <template slot-scope="scope">{{
150
+                              stockInCount(scope.row) -
151
+                              salesReturnCount(scope.row) -
152
+                              stockOutCount(scope.row) +
153
+                              cancelStockCount(scope.row)
154
+                              }}</template>
155
+                          </el-table-column>
148 156
                           <el-table-column label="单价" width="40">
149 157
                             <template slot-scope="scope">{{ scope.row.retail_price }}</template>
150 158
                           </el-table-column>
@@ -253,7 +261,7 @@
253 261
       </div>
254 262
     </div>
255 263
     <additionalCharges   v-on:setData="setCharge" ref='additionalCharges' :hisPatientInfo="hisPatientInfo"
256
-                       :patientInfo="patientInfo" :additions="additions" :addtions_charge="addtions_charge"></additionalCharges>
264
+                       :patientInfo="patientInfo" :additions="additions" ></additionalCharges>
257 265
     <select-template ref='selectTemplate'></select-template>
258 266
     <save-template ref='saveTemplate'></save-template>
259 267
   </div>
@@ -282,7 +290,10 @@
282 290
       prescriptions: Array,
283 291
       record_date: String,
284 292
       search_keyword: '',
285
-      addtions_charge:Array,
293
+      addtions_charge: {
294
+        type: Array,
295
+        default: []
296
+      },
286 297
 
287 298
       other_sick: {
288 299
         type: Array,
@@ -302,7 +313,7 @@
302 313
     data() {
303 314
       return {
304 315
         register_type: '',
305
-        value: '',
316
+        value: '0',
306 317
         form: {
307 318
           name: ''
308 319
         },
@@ -315,7 +326,7 @@
315 326
           title: '处方1',
316 327
           name: '1'
317 328
         }],
318
-        tabIndex: 1,
329
+        tabIndex: this.prescriptions.length,
319 330
         currenet_inedx: 0,
320 331
         rightTab: 1,
321 332
         activeName: '1',
@@ -355,11 +366,51 @@
355 366
       }
356 367
     },
357 368
     methods: {
358
-      setCharge(additional_charges){
359
-        console.log("111122222")
360
-        this.addtions_charge = additional_charges
361
-        console.log(this.addtions_charge )
369
+      stockInCount: function(row) {
370
+        let total = 0;
371
+        if(row.stock_in != null) {
372
+          for (let i = 0; i < row.stock_in.length; i++) {
373
+            total = total + row.stock_in[i].warehousing_count;
374
+          }
375
+        }
376
+        return total;
377
+      },
378
+      salesReturnCount: function(row) {
379
+        let total = 0;
380
+        if(row.sales_return != null) {
362 381
 
382
+          for (let i = 0; i < row.sales_return.length; i++) {
383
+            total = total + row.sales_return[i].count;
384
+          }
385
+        }
386
+        return total;
387
+      },
388
+      stockOutCount: function(row) {
389
+        let total = 0;
390
+        if(row.stock_out != null) {
391
+
392
+          for (let i = 0; i < row.stock_out.length; i++) {
393
+            total = total + row.stock_out[i].count;
394
+          }
395
+        }
396
+        return total;
397
+      },
398
+      cancelStockCount: function(row) {
399
+        let total = 0;
400
+        if(row.cancel_stock != null) {
401
+          for (let i = 0; i < row.cancel_stock.length; i++) {
402
+            total = total + row.cancel_stock[i].count;
403
+          }
404
+        }
405
+        return total;
406
+      },
407
+
408
+      setCharge(additional_charges){
409
+        for (let i = 0; i < additional_charges.length; i++){
410
+          additional_charges[i].count = 1
411
+          this.curPrescriptions.addition.push(additional_charges[i])
412
+        }
413
+        this.$refs.additionalCharges.hide()
363 414
 
364 415
       },
365 416
       searchAction() {
@@ -394,6 +445,15 @@
394 445
                 total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
395 446
               }
396 447
             }
448
+
449
+            if (this.prescriptions[i].addition != null) {
450
+              for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
451
+                total = total + this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count
452
+              }
453
+            }
454
+
455
+
456
+
397 457
             total =  Math.floor(total * 100) / 100
398 458
           }
399 459
         }
@@ -402,7 +462,6 @@
402 462
       }, 
403 463
       getCurTotal() {
404 464
         var total = 0
405
-        console.log(this.editableTabsValue)
406 465
 
407 466
         if(this.curPrescriptions.type == 1) {
408 467
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
@@ -430,12 +489,14 @@
430 489
               total = total + this.prescriptions[i].project[b].price * this.prescriptions[i].project[b].total
431 490
             }
432 491
           }
433
-        }
434
-        if(this.addtions_charge != null) {
435
-          for (let i = 0; i < this.addtions_charge.length; i++) {
436
-            total = total + this.addtions_charge[i].price
492
+
493
+          if (this.prescriptions[i].addition != null) {
494
+            for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
495
+              total = total + this.prescriptions[i].addition[b].price * this.prescriptions[i].addition[b].count
496
+            }
437 497
           }
438 498
         }
499
+
439 500
         return Math.floor(total * 100) / 100
440 501
       },
441 502
       createFilter(queryString) {
@@ -494,39 +555,22 @@
494 555
             this.department = response.data.data.department
495 556
             this.sick = response.data.data.sick
496 557
             this.additions = response.data.data.additions
497
-
498 558
             var info = response.data.data.info
499
-
500
-            if (this.$store.getters.xt_user.user.user_type == 2 || this.$store.getters.xt_user.user.user_type == 1) {
501
-              console.log('11111')
502
-              this.doctorValue = this.$store.getters.xt_user.user.id
503
-            } else {
504
-              console.log('222222')
505
-
506
-              this.doctorValue = this.doctors[0].admin_user_id
507
-            }
508
-
509 559
             if (info.user_type == 2 || info.user_type == 1) {
510
-
511
-
512 560
               this.doctorValue = info.admin_user_id
513
-
514
-
515 561
               if (info.department_id == 0) {
516
-
517 562
                 if (this.department.length > 0) {
518 563
                   this.departmentValue = this.department[0].id
519 564
                 } else {
520 565
                   this.departmentValue = ''
566
+
521 567
                 }
522 568
               } else {
523 569
                 this.departmentValue = info.department_id
524 570
               }
525 571
             }else{
526 572
               this.doctorValue = this.doctors[0].admin_user_id
527
-
528 573
             }
529
-
530 574
           }
531 575
         })
532 576
 
@@ -580,15 +624,14 @@
580 624
         this.teamList = []
581 625
 
582 626
       },
583
-      setData(data, info,addition_charge) {
584
-        this.addition_charge = addition_charge
627
+      setData(data, info) {
585 628
         this.prescription_id = data[0].id
586
-
587
-        console.log('99999999', data[0].id)
629
+        this.editableTabsValue = "处方1"
588 630
         this.$emit('event1', this.prescription_id)
589 631
         this.curStatus = 0
590 632
         this.prescriptions = data
591 633
         this.curPrescriptions = this.prescriptions[0]
634
+        console.log( this.curPrescriptions)
592 635
 
593 636
         if (this.curPrescriptions.advices.length > 0 && this.curPrescriptions.project.length == 0) {
594 637
           this.curStatus = 1
@@ -610,7 +653,12 @@
610 653
         this.state1 = info.diagnosis
611 654
         this.state2 = info.sick_history
612 655
         this.doctorValue = info.doctor_id
613
-        this.departmentValue = info.departments
656
+        this.departmentValue = info.departmentValue
657
+
658
+        if(this.doctorValue == 0){
659
+
660
+        }
661
+
614 662
         this.register_type = info.register_type
615 663
 
616 664
         if (info.prescription_status == 1 || info.prescription_status == 2) {
@@ -637,8 +685,8 @@
637 685
         }
638 686
       },
639 687
       open(index) {
640
-        if (this.curPrescriptions.order_status >= 2) {
641
-          this.$message.error('当前处方处于结算或者退费状态,无法保存')
688
+        if (this.curPrescriptions.order_status == 2) {
689
+          this.$message.error('当前处方已经结算,无法保存')
642 690
           return
643 691
         }
644 692
         if (this.doctorValue.length <= 0) {
@@ -670,16 +718,26 @@
670 718
             if (this.prescriptions[i].advices.length == 0 && this.prescriptions[i].project.length > 0) {
671 719
               this.prescriptions[i]['type'] = 2
672 720
             }
721
+
722
+
673 723
             for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
674 724
               this.prescriptions[i].advices[b].single_dose = this.prescriptions[i].advices[b].single_dose.toString()
675 725
               this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
676 726
               this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
727
+              this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
677 728
 
678 729
             }
679 730
 
680 731
             for (let b = 0; b < this.prescriptions[i].project.length; b++) {
681 732
               this.prescriptions[i].project[b].price = parseFloat(this.prescriptions[i].project[b].price)
733
+              this.prescriptions[i].project[b].total = this.prescriptions[i].project[b].total.toString()
734
+            }
682 735
 
736
+            for (let b = 0; b < this.prescriptions[i].addition.length; b++) {
737
+              this.prescriptions[i].addition[b].id = parseInt(this.prescriptions[i].addition[b].id)
738
+              this.prescriptions[i].addition[b].item_id = parseInt(this.prescriptions[i].addition[b].item_id)
739
+              this.prescriptions[i].addition[b].price = parseFloat(this.prescriptions[i].addition[b].price)
740
+              this.prescriptions[i].addition[b].count = this.prescriptions[i].addition[b].count.toString()
683 741
             }
684 742
           }
685 743
           let data = {
@@ -709,6 +767,8 @@
709 767
           return
710 768
         }
711 769
 
770
+        this.tabIndex = this.prescriptions.length
771
+
712 772
         ++this.tabIndex
713 773
         let newTabName = '处方' + this.tabIndex
714 774
         this.prescriptions.push({
@@ -716,7 +776,8 @@
716 776
           name: newTabName,
717 777
           order_status: 0,
718 778
           advices: [],
719
-          project: []
779
+          project: [],
780
+          addition:[]
720 781
 
721 782
         })
722 783
         this.editableTabsValue = newTabName
@@ -820,9 +881,9 @@
820 881
             })
821 882
           }
822 883
 
884
+        }).catch(() => {
885
+
823 886
         })
824
-          .catch(() => {
825
-          })
826 887
 
827 888
       },
828 889
       clickTab(tab) {
@@ -924,8 +985,6 @@
924 985
           }
925 986
         }
926 987
 
927
-        console.log(this.curDrugs)
928
-        console.log(this.curPrescriptions.advices)
929 988
 
930 989
         for (let i = 0; i < this.curDrugs.length; i++) {
931 990
           for (let a = 0; a < this.curPrescriptions.advices.length; a++) {
@@ -941,8 +1000,6 @@
941 1000
           if (this.prescriptions[i].name == this.editableTabsValue) {
942 1001
             var temp = this.deepClone(this.curDrugs)
943 1002
             var temp2 = this.deepClone(this.teamList)
944
-
945
-            console.log(temp2)
946 1003
             if (temp.length > 0) {
947 1004
               for (let b = 0; b < temp.length; b++) {
948 1005
                 let obj = {
@@ -954,12 +1011,17 @@
954 1011
                   execution_frequency: temp[b].execution_frequency,
955 1012
                   retail_price: temp[b].retail_price.toString(),
956 1013
                   remark: '',
1014
+                  day:'',
957 1015
                   prescribing_number: temp[b].prescribing_number,
958 1016
                   single_dose_unit: temp[b].min_unit,
959 1017
                   prescribing_number_unit: temp[b].max_unit,
960 1018
                   medical_insurance_number: temp[b].medical_insurance_number
961 1019
 
962 1020
                 }
1021
+
1022
+                if(obj.prescribing_number == 0 || obj.prescribing_number.length  == 0){
1023
+                  obj.prescribing_number = 1
1024
+                }
963 1025
                 this.prescriptions[i].advices.push(obj)
964 1026
               }
965 1027
               this.curStatus = 1
@@ -979,9 +1041,12 @@
979 1041
                   total: temp2[b].total,
980 1042
                   price: temp2[b].price,
981 1043
                   remark: '',
982
-                  medical_code: temp2[b].medical_code
1044
+                  medical_code: temp2[b].medical_code,
1045
+                  unit:temp2[b].unit
1046
+                }
1047
+                if(obj.total == 0 ){
1048
+                  obj.total = 1
983 1049
                 }
984
-                console.log(obj)
985 1050
                 this.prescriptions[i].project.push(obj)
986 1051
               }
987 1052
               this.curStatus = 2
@@ -1079,16 +1144,15 @@
1079 1144
           }
1080 1145
         }
1081 1146
       }
1082
-    },
1083
-    created() {
1147
+    },mounted(){
1084 1148
       this.getInitData()
1085 1149
       //获取所有项目
1086 1150
       this.getlist()
1087 1151
       //获取所以项目组套
1088 1152
       this.getAllProjectTeam()
1089 1153
 
1090
-    }
1091 1154
 
1155
+    },
1092 1156
   }
1093 1157
 </script>
1094 1158
 

+ 3 - 3
src/xt_pages/outpatientDoctorStation/components/deskRecord.vue View File

@@ -54,15 +54,15 @@
54 54
     </el-form>
55 55
     <div class="mainTitle">体格信息:</div>
56 56
     <el-form class="physiqueForm" :model="case_history" ref="form" label-width="80px">
57
-      <el-form-item label="体温:" prop="name">
57
+      <el-form-item label="体温:" prop="temperature">
58 58
         <el-input v-model="case_history.temperature" placeholder=""></el-input>
59 59
         <span>℃</span>
60 60
       </el-form-item>
61
-      <el-form-item label="脉搏: " prop="name">
61
+      <el-form-item label="脉搏: " prop="pulse">
62 62
         <el-input v-model="case_history.pulse" placeholder=""></el-input>
63 63
         (次/分)
64 64
       </el-form-item>
65
-      <el-form-item label="呼吸: " prop="name">
65
+      <el-form-item label="呼吸: " prop="breathing">
66 66
         <el-input v-model="case_history.breathing" placeholder=""></el-input>
67 67
         (次/分)
68 68
       </el-form-item>

+ 0 - 9
src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue View File

@@ -53,15 +53,6 @@
53 53
             <span style="width:200px;">血压:{{case_history.sbp}}~{{case_history.dbp}} mmHg</span>
54 54
           </div>
55 55
         </div>
56
-        <div class="commonCell">
57
-          <p></p>
58
-          <div class="detailMain">
59
-            <span style="width:140px;">血糖:{{case_history.blood_sugar}} mmol/L</span>
60
-            <span style="width:140px;">血脂:{{case_history.blood_fat}} mmol/L</span>
61
-            <span style="width:140px;">身高:{{case_history.height}} cm</span>
62
-            <span style="width:200px;">体重: kg</span>
63
-          </div>
64
-        </div>
65 56
         <div class="commonCell">
66 57
           <p>主诉</p>
67 58
           <div>{{case_history.chief_conplaint}}</div>

+ 62 - 16
src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue View File

@@ -2,6 +2,7 @@
2 2
   <div class="prescriptionTable">
3 3
     <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
4 4
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
5 6
       <el-table-column align="center" prop="drug_name" label="名称">
6 7
         <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
7 8
       </el-table-column>
@@ -39,6 +40,13 @@
39 40
         </template>
40 41
       </el-table-column>
41 42
 
43
+
44
+      <el-table-column align="center" prop="day" width="50" label="天数">
45
+        <template slot-scope="scope">
46
+          <el-input v-model="scope.row.day" placeholder=""></el-input>
47
+        </template>
48
+      </el-table-column>
49
+
42 50
       <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
43 51
         <template slot-scope="scope">
44 52
           <div style="display:flex;align-items:center;">
@@ -49,7 +57,7 @@
49 57
       </el-table-column>
50 58
       <el-table-column align="center" prop="retail_price" width="60" label="单价">
51 59
         <template slot-scope="scope">
52
-          <el-input v-model="scope.row.retail_price" placeholder=""></el-input>
60
+          <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
53 61
         </template>
54 62
       </el-table-column>
55 63
       <el-table-column align="center" prop="remark" width="50" label="备注">
@@ -66,7 +74,7 @@
66 74
 
67 75
     <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
68 76
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
69
-      <!-- <el-table-column align="center" type="index" width="40" label="序号"></el-table-column> -->
77
+       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
70 78
       <el-table-column align="center" prop="project_name" label="名称">
71 79
         <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
72 80
       </el-table-column>
@@ -97,12 +105,14 @@
97 105
         <template slot-scope="scope">
98 106
           <div style="display:flex;">
99 107
             <el-input v-model="scope.row.total" style="width:50" placeholder=""></el-input>
108
+            <div>{{scope.row.unit}}</div>
109
+
100 110
           </div>
101 111
         </template>
102 112
       </el-table-column>
103 113
       <el-table-column align="center" prop="name" width="50" label="单价">
104 114
         <template slot-scope="scope">
105
-          <el-input v-model="scope.row.price" placeholder=""></el-input>
115
+          <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
106 116
         </template>
107 117
       </el-table-column>
108 118
       <el-table-column align="center" prop="name" width="50" label="备注">
@@ -117,16 +127,16 @@
117 127
       </el-table-column>
118 128
     </el-table>
119 129
 
120
-    <!--<div class="additionalBox">-->
121
-      <!--<div class="additionalOne" v-for="(item,index) in 8" :key="index">-->
122
-        <!--<span>治疗费</span>-->
123
-        <!--<el-input v-model="input" placeholder="" style="width:50px;"></el-input>-->
124
-        <!---->
125
-        <!--<el-input v-model="input" placeholder="" style="width:50px;"></el-input>-->
126
-        <!---->
127
-        <!--<i class="el-icon-delete deleteIcon"></i>-->
128
-      <!--</div>-->
129
-    <!--</div>-->
130
+    <div class="additionalBox">
131
+      <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
132
+        <span>{{item.item_name}}</span>
133
+        <el-input v-model="item.price" placeholder="" style="width:50px;"></el-input>
134
+        共
135
+        <el-input v-model="item.count" placeholder="" style="width:50px;"></el-input>
136
+        次
137
+        <i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>
138
+      </div>
139
+    </div>
130 140
 
131 141
 
132 142
 
@@ -135,12 +145,13 @@
135 145
 
136 146
 <script>
137 147
   import { getDictionaryDataConfig} from "@/utils/data";
138
-  import { getInitData,delHisAdvice,delHisProject } from '@/api/his/his'
148
+  import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
139 149
 
140 150
   export default {
141 151
     props: {
142 152
       preDrugs: Array,
143 153
       activeType: Number,
154
+      addtions_charge:Array,
144 155
       prescription:{
145 156
         type:Object,
146 157
         default: function () {
@@ -179,6 +190,41 @@
179 190
       }
180 191
     },
181 192
    methods:{
193
+     delAddition(index, addition){
194
+       if(this.prescription.order_status == 2){
195
+         this.$message.error('该处方已经结算或者退费,无法删除')
196
+         return
197
+       }
198
+       this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
199
+         confirmButtonText: "确 定",
200
+         cancelButtonText: "取 消",
201
+         type: "warning"
202
+       }).then(() => {
203
+         this.$nextTick(function(){
204
+           if(addition.id == 0){
205
+             this.prescription.addition.splice(index, 1)
206
+           }else{
207
+             let params = {
208
+               'id': addition.id,
209
+             }
210
+             delHisAddition(params).then(response => {
211
+               if (response.data.state == 0) {
212
+                 this.$message.error(response.data.msg)
213
+                 return false
214
+               } else {
215
+                 var temp2 = this.deepClone(this.prescription.addition)
216
+                 temp2.splice(index, 1)
217
+                 this.prescription.addition = temp2
218
+                 this.$message.success(response.data.data.msg)
219
+               }
220
+             })
221
+           }
222
+         });
223
+
224
+       })
225
+         .catch(() => {});
226
+
227
+     },
182 228
       getInitData(){
183 229
         getInitData().then(response => {
184 230
           if (response.data.state == 0) {
@@ -191,7 +237,7 @@
191 237
         })
192 238
 
193 239
       },deleteDrug:function(index, row){
194
-       if(this.prescription.order_status >= 2){
240
+       if(this.prescription.order_status == 2){
195 241
          this.$message.error('该处方已经结算或者退费,无法删除')
196 242
          return
197 243
        }
@@ -267,7 +313,7 @@
267 313
          return name
268 314
       },
269 315
       deleteProject(row,i){
270
-        if(this.prescription.order_status = 2){
316
+        if(this.prescription.order_status == 2){
271 317
           this.$message.error('该处方已经结算或者退费,无法删除')
272 318
           return
273 319
         }

+ 161 - 10
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -147,7 +147,8 @@
147 147
           {
148 148
             name: '处方1',
149 149
             advice: [],
150
-            project: []
150
+            project: [],
151
+            addition:[],
151 152
           }
152 153
         ],
153 154
         search_input: '',
@@ -172,7 +173,6 @@
172 173
         templatedetail:{},
173 174
         detalid:0,
174 175
         prescription_id:0,
175
-        addtions_charge:[],
176 176
 
177 177
         patientid:0,
178 178
         prescriptionList:[],
@@ -231,7 +231,7 @@
231 231
 
232 232
             if(this.patientTableData.length > 0) {
233 233
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
234
-              this.choosePatient(this.patientTableData[0])
234
+              this.getPatientInfo(this.patientTableData[0])
235 235
             }
236 236
 
237 237
             this.prescriptionList = response.data.data.list.prescription
@@ -239,9 +239,7 @@
239 239
 
240 240
           }
241 241
         })
242
-      },
243
-      choosePatient(val) {
244
-        
242
+      },getPatientInfo(val){
245 243
         this.patientid = val.patients.id
246 244
         let params = {
247 245
           'record_date': this.record_date,
@@ -254,14 +252,12 @@
254 252
           } else {
255 253
 
256 254
             this.prescriptions = []
257
-            this.addtions_charge = []
258 255
             this.patientInfo = response.data.data.xt_info
259 256
             this.hisPatientInfo = response.data.data.his_info
260 257
             this.case_history = response.data.data.case_history
261 258
 
262 259
             this.info = response.data.data.info
263 260
 
264
-            this.addtions_charge = response.data.data.addtions_charge
265 261
 
266 262
 
267 263
             this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
@@ -301,6 +297,8 @@
301 297
                 var prescription = response.data.data.prescription[i]
302 298
                 let tempAdvice = []
303 299
                 let tempProject = []
300
+                let tempAddition = []
301
+
304 302
 
305 303
                 for (let b = 0; b < prescription.advices.length; b++) {
306 304
                   let obj = {
@@ -311,6 +309,7 @@
311 309
                     execution_frequency: prescription.advices[b].execution_frequency,
312 310
                     retail_price: prescription.advices[b].price.toString(),
313 311
                     remark: prescription.advices[b].remark,
312
+                    day:prescription.advices[b].day,
314 313
                     prescribing_number:prescription.advices[b].prescribing_number.toString(),
315 314
                     single_dose_unit:prescription.advices[b].single_dose_unit,
316 315
                     prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
@@ -342,6 +341,18 @@
342 341
                 }
343 342
 
344 343
 
344
+                for (let b = 0; b < prescription.addition.length; b++) {
345
+                  let obj = {
346
+                    id: prescription.addition[b].id,
347
+                    item_name: prescription.addition[b].item_name,
348
+                    price: prescription.addition[b].price,
349
+                    count: prescription.addition[b].count,
350
+                    item_id: prescription.addition[b].item_id,
351
+                  }
352
+                  tempAddition.push(obj)
353
+                }
354
+
355
+
345 356
 
346 357
                 let index = i + 1
347 358
                 let obj = {
@@ -349,6 +360,7 @@
349 360
                   name: '处方' + index,
350 361
                   advices: tempAdvice,
351 362
                   project: tempProject,
363
+                  addition:tempAddition,
352 364
                   order_status:prescription.order_status
353 365
                 }
354 366
                 this.prescriptions.push(obj)
@@ -359,6 +371,7 @@
359 371
                 name: '处方' + 1,
360 372
                 advices: [],
361 373
                 project: [],
374
+                addition:[],
362 375
                 orderStatus:0,
363 376
               }
364 377
               this.prescriptions.push(obj)
@@ -366,7 +379,145 @@
366 379
 
367 380
 
368 381
 
369
-            this.$refs.prescriptions.setData(this.prescriptions,this.info,this.addition_charge)
382
+            this.$refs.prescriptions.setData(this.prescriptions,this.info)
383
+          }
384
+        })
385
+
386
+
387
+
388
+      },
389
+      choosePatient(val) {
390
+
391
+        this.patientid = val.patients.id
392
+        let params = {
393
+          'record_date': this.record_date,
394
+          'patient_id': val.patients.id
395
+        }
396
+        getPatientInfo(params).then(response => {
397
+          if (response.data.state == 0) {
398
+            this.$message.error(response.data.msg)
399
+            return false
400
+          } else {
401
+            this.prescriptions = []
402
+            this.patientInfo = response.data.data.xt_info
403
+            this.hisPatientInfo = response.data.data.his_info
404
+            this.case_history = response.data.data.case_history
405
+            var case_history = response.data.data.case_history
406
+            console.log("case_history22222222",case_history)
407
+            if (case_history.breathing  == 0) {
408
+                case_history.breathing = ""
409
+            }
410
+            this.case_history = case_history
411
+            this.info = response.data.data.info
412
+            this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
413
+            if (this.case_history.temperature <= 0) {
414
+              this.case_history.temperature = ''
415
+            }
416
+            if (this.case_history.blood_sugar <= 0) {
417
+              this.case_history.blood_sugar = ''
418
+            }
419
+            if (this.case_history.pulse <= 0) {
420
+              this.case_history.pulse = ''
421
+            }
422
+            if (this.case_history.sbp <= 0) {
423
+              this.case_history.sbp = ''
424
+            }
425
+            if (this.case_history.dbp <= 0) {
426
+              this.case_history.dbp = ''
427
+            }
428
+            if (this.case_history.height <= 0) {
429
+              this.case_history.height = ''
430
+            }
431
+            if (this.case_history.blood_fat <= 0) {
432
+              this.case_history.blood_fat = ''
433
+            }
434
+            if (this.case_history.sick_type <= 0) {
435
+              this.case_history.sick_type = ''
436
+            }
437
+            this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
438
+            if (this.case_history.is_infect == 1) {
439
+              this.case_history.is_infect = true
440
+            } else {
441
+              this.case_history.is_infect = false
442
+            }
443
+            this.prescriptionList =response.data.data.prescription
444
+            if (response.data.data.prescription.length > 0) {
445
+              for (let i = 0; i < response.data.data.prescription.length; i++) {
446
+                var prescription = response.data.data.prescription[i]
447
+                let tempAdvice = []
448
+                let tempProject = []
449
+                let tempAddition = []
450
+                for (let b = 0; b < prescription.advices.length; b++) {
451
+                  let obj = {
452
+                    advice_id: prescription.advices[b].id,
453
+                    drug_name: prescription.advices[b].advice_name,
454
+                    single_dose: prescription.advices[b].single_dose,
455
+                    delivery_way: prescription.advices[b].delivery_way,
456
+                    execution_frequency: prescription.advices[b].execution_frequency,
457
+                    retail_price: prescription.advices[b].price.toString(),
458
+                    remark: prescription.advices[b].remark,
459
+                    day:prescription.advices[b].day,
460
+                    prescribing_number:prescription.advices[b].prescribing_number.toString(),
461
+                    single_dose_unit:prescription.advices[b].single_dose_unit,
462
+                    prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
463
+                    medical_insurance_number:prescription.advices[b].med_list_codg,
464
+                    id:prescription.advices[b].drug_id
465
+                  }
466
+                  tempAdvice.push(obj)
467
+                }
468
+                for (let b = 0; b < prescription.project.length; b++) {
469
+                  console.log(prescription.project[b])
470
+                  console.log(prescription.project[b].project)
471
+                  let obj = {
472
+                    id: prescription.project[b].id,
473
+                    project_id: prescription.project[b].project_id,
474
+                    project_name: prescription.project[b].project.project_name,
475
+                    statistical_classification: prescription.project[b].project.statistical_classification,
476
+                    single_dose: prescription.project[b].single_dose,
477
+                    delivery_way: prescription.project[b].delivery_way,
478
+                    execution_frequency: prescription.project[b].execution_frequency,
479
+                    number_days: prescription.project[b].day,
480
+                    total:prescription.project[b].count.toString(),
481
+                    price:prescription.project[b].price,
482
+                    remark:prescription.project[b].remark,
483
+                    medical_code:prescription.project[b].project.medical_code,
484
+                    unit:prescription.project[b].unit
485
+                  }
486
+                  tempProject.push(obj)
487
+                }
488
+                for (let b = 0; b < prescription.addition.length; b++) {
489
+                  let obj = {
490
+                    id: prescription.addition[b].id,
491
+                    item_name: prescription.addition[b].item_name,
492
+                    price: prescription.addition[b].price,
493
+                    count: prescription.addition[b].count,
494
+                    item_id: prescription.addition[b].item_id,
495
+                  }
496
+                  tempAddition.push(obj)
497
+                }
498
+                let index = i + 1
499
+                let obj = {
500
+                  id: prescription.id,
501
+                  name: '处方' + index,
502
+                  advices: tempAdvice,
503
+                  project: tempProject,
504
+                  addition:tempAddition,
505
+                  order_status:prescription.order_status
506
+                }
507
+                this.prescriptions.push(obj)
508
+              }
509
+            } else {
510
+              let obj = {
511
+                id:0,
512
+                name: '处方' + 1,
513
+                advices: [],
514
+                project: [],
515
+                addition:[],
516
+                orderStatus:0,
517
+              }
518
+              this.prescriptions.push(obj)
519
+            }
520
+            this.$refs.prescriptions.setData(this.prescriptions,this.info)
370 521
           }
371 522
         })
372 523
       },
@@ -450,7 +601,7 @@
450 601
       },
451 602
       handleSelectionChange(val){
452 603
        this.selecting_schs = val
453
-       console.log("99999",this.selecting_schs)
604
+       // console.log("99999",this.selecting_schs)
454 605
       },
455 606
       handleClick(){
456 607
 

+ 65 - 17
src/xt_pages/outpatientDoctorStation/pastInquiries.vue View File

@@ -5,43 +5,42 @@
5 5
     </div>
6 6
     <div class="app-container">
7 7
       <div class="cell clearfix">
8
-        <el-input size="small" style="width:150px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
8
+        <el-input size="small" style="width:150px;" v-model="keywords"
9 9
                   class="filter-item"/>
10 10
         <el-button size="small" style="margin:0 10px;" class="filter-item" type="primary" @click="searchAction">搜索
11 11
         </el-button>
12
-        <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
12
+        <el-date-picker v-model="record_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
13 13
                         :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
14
+                        format="yyyy-MM-dd"
15
+                        value-format="yyyy-MM-dd"
14 16
                         placeholder="选择日期时间" align="right"></el-date-picker>
15 17
       </div>
16 18
       <el-table :data="tableData" border ref="table" style="width: 100%;" :row-style="{ color: '#303133' }"
17 19
                 :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
18 20
         <el-table-column align="center" label="序号" width="60" type="index"></el-table-column>
19 21
         <el-table-column align="center" prop="name" label="姓名" width="100">
20
-          <template slot-scope="scope">{{ scope.row.patient.name }}</template>
22
+          <template slot-scope="scope">{{ scope.row.patients.name }}</template>
21 23
         </el-table-column>
22 24
         <el-table-column align="center" prop="name" label="处方日期" width="110">
23
-          <template slot-scope="scope"> {{getTimes(scope.row.record_date)}}</template>
25
+          <template slot-scope="scope"> {{getTimes(scope.row.info.ctime)}}</template>
24 26
 
25 27
         </el-table-column>
26 28
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
27 29
           <!--<template slot-scope="scope">{{}}</template>-->
28 30
         <!--</el-table-column>-->
29 31
         <el-table-column align="center" prop="name" label="处方号">
30
-          <template slot-scope="scope">{{scope.row.prescription_number}}</template>
32
+          <template slot-scope="scope">{{scope.row.info.prescription_number}}</template>
31 33
         </el-table-column>
32 34
         <el-table-column align="center" prop="name" label="开立医生">
33
-          <template slot-scope="scope">{{scope.row.doctor}}</template>
35
+          <template slot-scope="scope">{{scope.row.info.doctor}}</template>
34 36
         </el-table-column>
35 37
         <el-table-column align="center" prop="name" label="诊断">
36
-          <template slot-scope="scope">{{ scope.row.diagnosis }}</template>
38
+          <template slot-scope="scope">{{ scope.row.info.diagnosis }}</template>
37 39
         </el-table-column>
38 40
         <el-table-column align="center" prop="name" label="状态">
39 41
           <template slot-scope="scope">
40
-            <div v-if=" scope.row.prescription_status == 1">新建</div>
41
-            <div v-if=" scope.row.prescription_status == 2">待结算</div>
42
-            <div v-if=" scope.row.prescription_status == 3">已结算</div>
43
-            <div v-if=" scope.row.prescription_status == 4">已退费</div>
44
-
42
+            <div v-if=" scope.row.info.id == 0">未就诊</div>
43
+            <div v-if=" scope.row.info.id > 0">已就诊</div>
45 44
           </template>
46 45
         </el-table-column>
47 46
         <el-table-column align="center" prop="name" label="操作" width="100">
@@ -80,6 +79,11 @@
80 79
     },
81 80
     data() {
82 81
       return {
82
+        keywords:"",
83
+        total:0,
84
+        record_date:"",
85
+        page:1,
86
+        limit:10,
83 87
         crumbs: [
84 88
           { path: false, name: '门诊医生站' },
85 89
           { path: false, name: '既往查询' }
@@ -104,28 +108,72 @@
104 108
       }
105 109
     },
106 110
     methods: {
111
+      searchAction(){
112
+        this.page = 1;
113
+        this.limit = 10;
114
+        this.getHisPrescriptionList()
115
+
116
+      },
117
+      handleScheduleDateChange(){
118
+        this.page = 1;
119
+        this.limit = 10;
120
+        this.getHisPrescriptionList()
121
+
122
+      },
123
+      handleCurrentChange(page) {
124
+        this.page = page;
125
+        this.getHisPrescriptionList()
126
+
127
+      },
128
+
129
+      handleSizeChange(limit) {
130
+        this.limit = limit;
131
+        this.getHisPrescriptionList()
132
+
133
+
134
+      },
107 135
       getTimes(time) {
108
-        return uParseTime(time, "{y}-{m}-{d}");
136
+        return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
109 137
       },
110 138
       handerShowDetail(row) {
111
-        console.log(row)
112
-        this.$refs.inquiriesDetail.show(row.id)
139
+        if(row.info.id == 0){
140
+          this.$message.error("未就诊")
141
+          return
142
+        }
143
+        this.$refs.inquiriesDetail.show(row.info.id)
113 144
       }, getHisPrescriptionList() {
114
-        getHisPrescriptionList().then(response => {
145
+        let params = {
146
+          record_date:this.record_date,
147
+          page: this.page,
148
+          limit: this.limit,
149
+          keywords: this.keywords,
150
+        }
151
+        getHisPrescriptionList(params).then(response => {
115 152
           if (response.data.state == 0) {
116 153
             this.$message.error(response.data.msg)
117 154
             return false
118 155
           } else {
119 156
             this.tableData = response.data.data.order
157
+            this.total = response.data.data.total
120 158
             this.$nextTick(() => {
121 159
               this.$refs.table.doLayout(); //解决表格错位
122 160
             });
123
-
124 161
           }
125 162
         })
126 163
 
127 164
       }
128 165
     }, created() {
166
+      var nowDate = new Date()
167
+      var nowYear = nowDate.getFullYear()
168
+      var nowMonth = nowDate.getMonth() + 1
169
+      var nowDay = nowDate.getDate()
170
+      this.record_date =
171
+        nowYear +
172
+        '-' +
173
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
174
+        '-' +
175
+        (nowDay < 10 ? '0' + nowDay : nowDay)
176
+
129 177
 
130 178
       this.getHisPrescriptionList()
131 179
 

+ 50 - 13
src/xt_pages/outpatientRegistration/index.vue View File

@@ -9,12 +9,12 @@
9 9
                 <el-form class="basicForm" :model="form"  :rules="rules"  ref="form"  label-width="100px">
10 10
                     <el-form-item label="患者姓名:"  prop="name" :validate-event="is_Name">
11 11
                         <!-- <el-input  v-model="form.name"></el-input> -->
12
-                       <el-select v-model="form.name" placeholder="请选择">
12
+                       <el-select v-model="form.name" placeholder="请选择" @change="changeName">
13 13
                             <el-option
14 14
                             v-for="item in patient"
15 15
                             :key="item.patient_id"
16 16
                             :label="item.name"
17
-                            :value="item.name">
17
+                            :value="item.patient_id">
18 18
                             </el-option>
19 19
                         </el-select>
20 20
                     </el-form-item>
@@ -46,11 +46,17 @@
46 46
 
47 47
                       <el-form-item label="医疗类别:">
48 48
                         <el-select v-model="form.medicalCare" placeholder="请选择">
49
-                            <el-option
49
+                            <!-- <el-option
50 50
                             v-for="item in medicalCare"
51 51
                             :key="item.value"
52 52
                             :label="item.label"
53 53
                             :value="item.value">
54
+                            </el-option> -->
55
+                           <el-option
56
+                            v-for="(item,index) in getDictionaryDataConfig('system','social_type')"
57
+                            :key="index"
58
+                            :label="item.name"
59
+                            :value="item.id">
54 60
                             </el-option>
55 61
                         </el-select>
56 62
                     </el-form-item>
@@ -86,11 +92,17 @@
86 92
 
87 93
                    <el-form-item label="社保类型:">
88 94
                         <el-select v-model="form.social_type" placeholder="请选择">
89
-                            <el-option
95
+                            <!-- <el-option
90 96
                             v-for="(item,index) in getDictionaryDataConfig('system','social_type')"
91 97
                             :key="index"
92 98
                             :label="item.name"
93 99
                             :value="item.id">
100
+                            </el-option> -->
101
+                          <el-option
102
+                            v-for="item in medicalCare"
103
+                            :key="item.value"
104
+                            :label="item.label"
105
+                            :value="item.value">
94 106
                             </el-option>
95 107
                         </el-select>
96 108
                     </el-form-item>
@@ -165,8 +177,9 @@
165 177
 <script>
166 178
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
167 179
 import { basename } from 'path'
168
-import { getAllDoctorList,saveHisPatient,getTodaySchedulePatient } from "@/api/project/project"
180
+import { getAllDoctorList,saveHisPatient,getTodaySchedulePatient,getPatientDetail } from "@/api/project/project"
169 181
 import { getDictionaryDataConfig } from '@/utils/data'
182
+import { uParseTime } from "@/utils/tools";
170 183
 const moment = require('moment')
171 184
 export default {
172 185
     components:{
@@ -199,13 +212,16 @@ export default {
199 212
                 phone:'',
200 213
                 social_type:'',
201 214
             },
202
-            settlement: [{
203
-                value: 1,
204
-                label: '医保'
205
-                }, {
206
-                value: 2,
207
-                label: '自费'
208
-            }],
215
+          settlement: 
216
+            [
217
+              {value: 1,label: '医保'},
218
+              {value: 2,label: '自费'},
219
+              {value: 3,label:'公费'},
220
+              {value: 4,label:'农保'},
221
+              {value: 5,label:'会员'},
222
+              {value: 6,label:'职工'},
223
+              {value: 7,label:'合同'}
224
+            ],
209 225
             sex: [{
210 226
                 value: 1,
211 227
                 label: '男'
@@ -447,6 +463,14 @@ export default {
447 463
              this.is_Name = true
448 464
              return
449 465
           }
466
+          var name = ""
467
+          for(let i=0;i<this.patient.length;i++){
468
+            if(this.form.name == this.patient[i].patient_id){
469
+                name = this.patient[i].name
470
+            }
471
+          }
472
+          console.log("name",name)
473
+          this.form.name  = name
450 474
           this.$refs[formName].validate((valid)=>{
451 475
              if(valid){
452 476
                   if(this.form.costChecked == true){
@@ -480,7 +504,7 @@ export default {
480 504
                     social_type:this.form.social_type
481 505
                 }
482 506
                 console.log("params",params)
483
-
507
+                
484 508
                 saveHisPatient(params).then(response=>{
485 509
                    if(response.data.state == 1){
486 510
                      var patient =  response.data.data.patient
@@ -535,6 +559,19 @@ export default {
535 559
              
536 560
             }
537 561
          }
562
+      },
563
+      changeName(id){
564
+        getPatientDetail(id).then(response=>{
565
+           if(response.data.state == 1){
566
+             var patient =  response.data.data.patient
567
+             console.log("patient",patient)
568
+             this.form.sex = patient.gender 
569
+             this.form.age = patient.age
570
+             this.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
571
+             this.form.phone = patient.phone
572
+             this.form.idCard = patient.id_card_no
573
+          }
574
+        })
538 575
       }
539 576
     },
540 577
     created(){

+ 6 - 4
src/xt_pages/outpatientRegistration/registrationHistory.vue View File

@@ -79,8 +79,8 @@
79 79
                 <el-table-column align="center" prop="name" label="证件号" width='180'>
80 80
                     <template slot-scope="scope">{{ scope.row.id_card_no }}</template>
81 81
                 </el-table-column>
82
-                <el-table-column align="center" label="患者保险类型">
83
-                    <template slot-scope="scope">{{getMedicalTreatment(scope.row.medical_treatment_type)}}</template>
82
+                <el-table-column align="center" label="社保类型">
83
+                    <template slot-scope="scope">{{getMedicalTreatment(scope.row.social_type)}}</template>
84 84
                 </el-table-column>
85 85
                 <el-table-column align="center" prop="name" label="医生" width="80">
86 86
                     <template slot-scope="scope">{{getDoctor(scope.row.doctor) }}</template>
@@ -126,6 +126,7 @@ const moment = require('moment')
126 126
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
127 127
 import { getHisPatientHistory,changePatient,getHisPatient } from "@/api/project/project"
128 128
 import { uParseTime } from "@/utils/tools";
129
+
129 130
 export default {
130 131
     components:{
131 132
         BreadCrumb
@@ -148,8 +149,8 @@ export default {
148 149
                 {value: 4,label: "免收诊金"},
149 150
                 {value: 5,label: "专家"}
150 151
             ],
151
-            start_time:"",
152
-            end_time:"",
152
+            start_time:moment().format("YYYY-MM-DD"),
153
+            end_time:moment().format("YYYY-MM-DD"),
153 154
             limit:20,
154 155
             page:1,
155 156
             total:0,
@@ -178,6 +179,7 @@ export default {
178 179
                 id: 7,
179 180
                 name: "生育保险"
180 181
             }],
182
+            
181 183
             tablePatient:[]
182 184
         }
183 185
     },

BIN
src/xt_pages/stock/.DS_Store View File


+ 77 - 71
src/xt_pages/stock/drugs/query.vue View File

@@ -3,13 +3,14 @@
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
       <el-button
6
-          size="small"
7
-          class="filter-item"
8
-          type="primary"
9
-          icon="el-icon-search"
10
-          @click="setting"
11
-        >设置</el-button
12
-        >
6
+        size="small"
7
+        class="filter-item"
8
+        type="primary"
9
+        icon="el-icon-search"
10
+        @click="setting"
11
+      >设置
12
+      </el-button
13
+      >
13 14
     </div>
14 15
     <div class="app-container ">
15 16
       <div class="cell clearfix">
@@ -26,7 +27,8 @@
26 27
           type="primary"
27 28
           icon="el-icon-search"
28 29
           @click="search"
29
-        >搜索</el-button
30
+        >搜索
31
+        </el-button
30 32
         >
31 33
       </div>
32 34
 
@@ -136,9 +138,9 @@
136 138
   import SettingDialog from './settingDialog/index'
137 139
 
138 140
   export default {
139
-    name: "stockIn",
141
+    name: 'stockIn',
140 142
     created() {
141
-      this.GetAllDrugStockQueryList();
143
+      this.GetAllDrugStockQueryList()
142 144
     },
143 145
     components: {
144 146
       SettingDialog,
@@ -147,29 +149,29 @@
147 149
     data() {
148 150
       return {
149 151
         crumbs: [
150
-          { path: false, name: "库存管理" },
151
-          { path: "/stock/drugs/stock/query", name: "药品库存查询" }
152
+          { path: false, name: '库存管理' },
153
+          { path: '/stock/drugs/stock/query', name: '药品库存查询' }
152 154
         ],
153
-        keywords: "",
155
+        keywords: '',
154 156
         total: 0,
155 157
         multipleSelection: [],
156
-        signAndWeighBoxPatients: "sign-and-weigh-box-patients",
157
-        start_time: "",
158
-        end_time: "",
158
+        signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
159
+        start_time: '',
160
+        end_time: '',
159 161
         page: 1,
160 162
         limit: 10,
161 163
         goodType: [],
162 164
         goodInfo: [],
163
-        tempArr:[],
165
+        tempArr: [],
164 166
         sameRowArr: [],
165 167
         WarehouseInfo: {
166 168
           loading: false,
167 169
           warehouseInfoDate: []
168 170
         }
169
-      };
171
+      }
170 172
     },
171 173
     methods: {
172
-      handleSpanTempArr(){
174
+      handleSpanTempArr() {
173 175
         this.tempArr = []
174 176
 
175 177
         for (let i = 0; i < this.WarehouseInfo.warehouseInfoDate.length; i++) {
@@ -204,8 +206,6 @@
204 206
         })
205 207
         this.sameRowArr = sameRowArr
206 208
 
207
-
208
-
209 209
       },
210 210
       merge({ row, column, rowIndex, columnIndex }) {
211 211
         if (columnIndex === 0) {
@@ -218,113 +218,116 @@
218 218
         }
219 219
       },
220 220
       GetAllDrugStockQueryList: function() {
221
-        console.log(this.keywords);
221
+        console.log(this.keywords)
222 222
         const Params = {
223 223
           page: this.page,
224 224
           limit: this.limit,
225 225
           keyword: this.keywords
226
-        };
227
-        this.WarehouseInfo.loading = true;
228
-        this.WarehouseInfo.warehouseInfoDate = [];
226
+        }
227
+        this.WarehouseInfo.loading = true
228
+        this.WarehouseInfo.warehouseInfoDate = []
229 229
         getAllDrugStockQueryList(Params).then(response => {
230 230
           if (response.data.state == 0) {
231
-            this.WarehouseInfo.loading = false;
232
-            this.$message.error(response.data.msg);
233
-            return false;
231
+            this.WarehouseInfo.loading = false
232
+            this.$message.error(response.data.msg)
233
+            return false
234 234
           } else {
235
-            this.WarehouseInfo.loading = false;
236
-            this.total = response.data.data.total;
235
+            this.WarehouseInfo.loading = false
236
+            this.total = response.data.data.total
237 237
             for (let i = 0; i < response.data.data.list.length; i++) {
238 238
 
239 239
               this.WarehouseInfo.warehouseInfoDate.push(
240 240
                 response.data.data.list[i]
241
-              );
241
+              )
242 242
             }
243 243
             this.handleSpanTempArr()
244 244
           }
245
-        });
245
+        })
246 246
       },
247 247
       getSpecificationName: function(id) {
248
-        let name = "";
248
+        let name = ''
249 249
         for (let i = 0; i < this.goodInfo.length; i++) {
250 250
           if (this.goodInfo[i].id == id) {
251
-            name = this.goodInfo[i].specification_name;
251
+            name = this.goodInfo[i].specification_name
252 252
           }
253 253
         }
254
-        return name;
254
+        return name
255 255
       },
256 256
       getTypeName: function(id) {
257
-        let name = "";
257
+        let name = ''
258 258
         for (let i = 0; i < this.goodType.length; i++) {
259 259
           if (this.goodType[i].id == id) {
260
-            name = this.goodType[i].type_name;
260
+            name = this.goodType[i].type_name
261 261
           }
262 262
         }
263
-        return name;
263
+        return name
264 264
       },
265 265
 
266
-
267 266
       handleBack: function() {
268
-        this.$router.go(-1);
267
+        this.$router.go(-1)
269 268
       },
270 269
       handleSizeChange(val) {
271
-        this.limit = val;
272
-        this.GetAllDrugStockQueryList();
270
+        this.limit = val
271
+        this.GetAllDrugStockQueryList()
273 272
       },
274 273
       handleCurrentChange(val) {
275
-        this.page = val;
276
-        this.GetAllDrugStockQueryList();
274
+        this.page = val
275
+        this.GetAllDrugStockQueryList()
277 276
       },
278 277
       calculate: function(val) {
279
-        return Math.round(parseFloat(val) * 100) / 100;
278
+        return Math.round(parseFloat(val) * 100) / 100
280 279
       },
281 280
       startTimeChange: function() {
282
-        this.GetAllDrugStockQueryList();
281
+        this.GetAllDrugStockQueryList()
283 282
       },
284 283
       endTimeChange: function() {
285
-        this.GetAllDrugStockQueryList();
284
+        this.GetAllDrugStockQueryList()
286 285
       },
287 286
       stockInCount: function(row) {
288
-        let total = 0;
289
-          for (let i = 0; i < row.query_drug_warehousing_info.length; i++) {
290
-            total = total + row.query_drug_warehousing_info[i].warehousing_count;
287
+        let total = 0
288
+        for (let i = 0; i < row.query_drug_warehousing_info.length; i++) {
289
+          total = total + row.query_drug_warehousing_info[i].warehousing_count
291 290
         }
292
-        return total;
291
+        return total
293 292
       },
294 293
       salesReturnCount: function(row) {
295
-        let total = 0;
294
+        let total = 0
296 295
 
297
-          for (let i = 0; i < row.query_drug_sales_return_info.length; i++) {
298
-            total = total + row.query_drug_sales_return_info[i].count;
296
+        for (let i = 0; i < row.query_drug_sales_return_info.length; i++) {
297
+          total = total + row.query_drug_sales_return_info[i].count
299 298
         }
300
-        return total;
299
+        return total
301 300
       },
302 301
       stockOutCount: function(row) {
303
-        let total = 0;
302
+        let total = 0
304 303
 
305
-          for (let i = 0; i < row.query_drug_warehouseout_info.length; i++) {
306
-            total = total + row.query_drug_warehouseout_info[i].count;
304
+        for (let i = 0; i < row.query_drug_warehouseout_info.length; i++) {
305
+          total = total + row.query_drug_warehouseout_info[i].count
307 306
         }
308
-        return total;
307
+        return total
309 308
       },
310 309
       cancelStockCount: function(row) {
311
-        let total = 0;
312
-          for (let i = 0; i < row.query_drug_cancel_stock_info.length; i++) {
313
-            total = total + row.query_drug_cancel_stock_info[i].count;
314
-          }
315
-        return total;
310
+        let total = 0
311
+        for (let i = 0; i < row.query_drug_cancel_stock_info.length; i++) {
312
+          total = total + row.query_drug_cancel_stock_info[i].count
313
+        }
314
+        return total
315
+      },
316
+      showStockInDetailDialog: function(val) {
317
+      },
318
+      showSaleReturnDetailDialog: function() {
319
+      },
320
+      showStockOutDetailDialog: function() {
321
+      },
322
+      showCancelStockDetailDialog: function() {
316 323
       },
317
-      showStockInDetailDialog: function(val) {},
318
-      showSaleReturnDetailDialog: function() {},
319
-      showStockOutDetailDialog: function() {},
320
-      showCancelStockDetailDialog: function() {},
321 324
       search: function() {
322
-        this.GetAllDrugStockQueryList();
323
-      },setting:function() {
325
+        this.GetAllDrugStockQueryList()
326
+      }, setting: function() {
324 327
         this.$refs.dialog.show()
325 328
       }
326 329
     }
327
-  };
330
+  }
328 331
 </script>
329 332
 
330 333
 <style rel="stylesheet/css" lang="scss" scoped>
@@ -336,6 +339,7 @@
336 339
     border-bottom: 1px #dcdfe6 solid;
337 340
     margin: 0px 0 20px 0;
338 341
   }
342
+
339 343
   }
340 344
 
341 345
   .title {
@@ -366,12 +370,14 @@
366 370
   .count {
367 371
     color: #bd2c00;
368 372
   }
373
+
369 374
   .el-table td,
370 375
   .el-table th.is-leaf,
371 376
   .el-table--border,
372 377
   .el-table--group {
373 378
     border-color: #d0d3da;
374 379
   }
380
+
375 381
   .el-table--border::after,
376 382
   .el-table--group::after,
377 383
   .el-table::before {

+ 416 - 0
src/xt_pages/workforce/components/nextTableWeeks.vue View File

@@ -0,0 +1,416 @@
1
+<template>
2
+  <div>
3
+    <div class="cell clearfix" style="float: right">
4
+      <el-button
5
+        style="float: right"
6
+        size="small"
7
+        icon="el-icon-printer"
8
+        @click="printAction()"
9
+        type="primary"
10
+        >打印
11
+      </el-button>
12
+    </div>
13
+
14
+    <div class="cell clearfix">
15
+      <label class="title"> <span class="name">时间</span> : </label>
16
+      <div class="time">
17
+        <ul class>
18
+          <li
19
+            :class="item.id == week_type ? 'active' : ''"
20
+            @click="selectWeekType(item.id)"
21
+            v-for="item in weekArr"
22
+            :key="item.id"
23
+          >
24
+            {{ item.name }}
25
+          </li>
26
+        </ul>
27
+      </div>
28
+      
29
+      <div  class="title"><span class="name">班 次</span> :</div>
30
+      <div class="time">
31
+        <ul class>
32
+          <li
33
+            :class="item.id == week_time ? 'active' : ''"
34
+            @click="selectWeekTime(item.id)"
35
+            v-for="item in weekTimes"
36
+            :key="item.id"
37
+          >
38
+            {{ item.name }}
39
+          </li>
40
+        </ul>
41
+      </div>
42
+    </div>
43
+    <el-table
44
+      :row-style="{ color: '#303133' }"
45
+      :data="scheduleData"
46
+      border
47
+      :header-cell-style="{
48
+        backgroundColor: 'rgb(245, 247, 250)',
49
+        color: '#606266'
50
+      }"
51
+      style="width: 100%"
52
+    >
53
+      <el-table-column label="姓名" min-width="100" align="center">
54
+        <template slot-scope="scope">
55
+          {{ scope.row.patient }}
56
+        </template>
57
+      </el-table-column>
58
+      <el-table-column label="分区" min-width="70" align="center">
59
+        <template slot-scope="scope">
60
+          {{ scope.row.zone.name }}
61
+        </template>
62
+      </el-table-column>
63
+      <el-table-column label="班次" min-width="70" align="center">
64
+        <template slot-scope="scope">
65
+          {{ getSchedulesType(scope.row.schedule_type) }}
66
+        </template>
67
+      </el-table-column>
68
+      <el-table-column label="机号" min-width="70" align="center">
69
+        <template slot-scope="scope">
70
+          {{ scope.row.number.number }}
71
+        </template>
72
+      </el-table-column>
73
+      <el-table-column label="透析模式" min-width="100" align="center">
74
+        <template slot-scope="scope">
75
+          {{
76
+            scope.row.mode_id && modeOptions[scope.row.mode_id]
77
+              ? modeOptions[scope.row.mode_id].name
78
+              : ""
79
+          }}
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column label="透析器" min-width="100" align="center">
83
+        <template slot-scope="scope">
84
+          {{ scope.row.prescription.dialyzer_perfusion_apparatus }}
85
+        </template>
86
+      </el-table-column>
87
+      <el-table-column label="抗凝剂" min-width="100" align="center">
88
+        <template slot-scope="scope">
89
+          <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
90
+          <span v-if="scope.row.prescription.anticoagulant === 2"
91
+            >普通肝素</span
92
+          >
93
+          <span v-if="scope.row.prescription.anticoagulant === 3"
94
+            >低分子肝素</span
95
+          >
96
+          <span v-if="scope.row.prescription.anticoagulant === 4"
97
+            >阿加曲班</span
98
+          >
99
+          <span v-if="scope.row.prescription.anticoagulant === 5"
100
+            >枸橼酸钠</span
101
+          >
102
+          <span v-if="scope.row.prescription.anticoagulant === 6"
103
+            >低分子肝素钙</span
104
+          >
105
+          <span v-if="scope.row.prescription.anticoagulant === 7"
106
+            >低分子肝素钠</span
107
+          >
108
+        </template>
109
+      </el-table-column>
110
+      <el-table-column label="总量" min-width="100" align="center">
111
+        <template slot-scope="scope">
112
+          <span v-if="scope.row.prescription.anticoagulant == 1">{{
113
+            scope.row.prescription.anticoagulant_zongliang
114
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
115
+              : ""
116
+          }}</span>
117
+          <span v-if="scope.row.prescription.anticoagulant == 2">{{
118
+            scope.row.prescription.anticoagulant_zongliang
119
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
120
+              : ""
121
+          }}</span>
122
+          <span v-if="scope.row.prescription.anticoagulant == 3">{{
123
+            scope.row.prescription.anticoagulant_zongliang
124
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
125
+              : ""
126
+          }}</span>
127
+          <span v-if="scope.row.prescription.anticoagulant == 4">{{
128
+            scope.row.prescription.anticoagulant_zongliang
129
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
130
+              : ""
131
+          }}</span>
132
+          <span v-if="scope.row.prescription.anticoagulant == 5">{{
133
+            scope.row.prescription.anticoagulant_zongliang
134
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
135
+              : ""
136
+          }}</span>
137
+          <span v-if="scope.row.prescription.anticoagulant == 6">{{
138
+            scope.row.prescription.anticoagulant_zongliang
139
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
140
+              : ""
141
+          }}</span>
142
+          <span v-if="scope.row.prescription.anticoagulant == 7">{{
143
+            scope.row.prescription.anticoagulant_zongliang
144
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
145
+              : ""
146
+          }}</span>
147
+        </template>
148
+      </el-table-column>
149
+
150
+      <el-table-column label="长期医嘱" min-width="440" align="center">
151
+        <template slot-scope="scope">
152
+          <span style="white-space: pre">{{
153
+            getAdvice(scope.row.doctor_advice)
154
+          }}</span>
155
+        </template>
156
+      </el-table-column>
157
+    </el-table>
158
+  </div>
159
+</template>
160
+
161
+<script>
162
+import { getNextScheduleWeekDay } from "@/api/schedule";
163
+import WeekItem from "./WeekItem";
164
+const moment = require('moment')
165
+export default {
166
+  name: "tableWeeks",
167
+  props: {
168
+    weekTime: {
169
+      type: String,
170
+      default: "thisWeek"
171
+    }
172
+  },
173
+
174
+  data() {
175
+    return {
176
+      weekArr: [
177
+        { id: 1, name: "周一" },
178
+        { id: 2, name: "周二" },
179
+        { id: 3, name: "周三" },
180
+        { id: 4, name: "周四" },
181
+        { id: 5, name: "周五" },
182
+        { id: 6, name: "周六" },
183
+        { id: 7, name: "周日" }
184
+      ],
185
+      anticoagulants_confit: null,
186
+
187
+      week_type: "1",
188
+      week_time:0,
189
+      weekTimes:[
190
+        {id:0,name:"全部"},
191
+        {id:1,name:"上午"},
192
+        {id:2,name:"下午"},
193
+        {id:3,name:"晚上"},
194
+      ],
195
+      weekTitle: ["", "", "", "", "", "", ""],
196
+      weekData: {
197
+        Monday: [],
198
+        Tuesday: [],
199
+        Wednesday: [],
200
+        Thursday: [],
201
+        Friday: [],
202
+        Saturday: [],
203
+        Sunday: []
204
+      },
205
+      scheduleData: [],
206
+      modeOptions: null
207
+    };
208
+  },
209
+  watch: {
210
+  
211
+    weekTime: function() {
212
+      
213
+      var theType = this.weekType(this.weekTime);
214
+      this.getSchedules(theType);
215
+    }
216
+  },
217
+
218
+  methods: {
219
+    printAction() {
220
+      this.$router.push({
221
+        path: "/schedule/remind/print/next?week_type=" + this.week_type+"&week_time="+this.week_time
222
+      });
223
+    },
224
+    getNextScheduleWeekDay() {
225
+        const params = {
226
+          start_time:moment().week(moment().week() + 1).startOf('week').unix(),
227
+          end_time:moment().week(moment().week() + 1).endOf('week').unix(),
228
+          week_type:this.week_type,
229
+          week_time:this.week_time,
230
+        }
231
+      
232
+      getNextScheduleWeekDay(params).then(response => {
233
+        this.scheduleData = [];
234
+        if (response.data.state == 1) {
235
+          this.scheduleData = response.data.data.schedule;
236
+          console.log("下周数据",response.data.data.schedule)
237
+         
238
+        } else {
239
+          this.$message.error("网络错误");
240
+          return false;
241
+        }
242
+      });
243
+    },
244
+
245
+    weekType(weekTime) {
246
+      var theType = 2;
247
+      switch (weekTime) {
248
+        case "lastWeek":
249
+          theType = 1;
250
+          break;
251
+        case "thisWeek":
252
+          theType = 2;
253
+          break;
254
+        case "nextWeek":
255
+          theType = 3;
256
+          break;
257
+        case "nextTwoWeek":
258
+          theType = 4;
259
+          break;
260
+        default:
261
+          theType = 2;
262
+          break;
263
+      }
264
+      return theType;
265
+    },
266
+    weekPath(week) {
267
+      var weekArr = {
268
+        1: "Monday",
269
+        2: "Tuesday",
270
+        3: "Wednesday",
271
+        4: "Thursday",
272
+        5: "Friday",
273
+        6: "Saturday",
274
+        7: "Sunday"
275
+      };
276
+      if (typeof weekArr[week] == "undefined") {
277
+        return "";
278
+      }
279
+      return weekArr[week];
280
+    },
281
+    selectWeekType(type) {
282
+      this.week_type = type;
283
+      // let params = {
284
+      //   week_type: this.week_type
285
+      // };
286
+      this.getNextScheduleWeekDay();
287
+    },
288
+    selectWeekTime(type){
289
+       this.week_time = type
290
+       this.getNextScheduleWeekDay()
291
+    },
292
+
293
+    getSchedulesType: function(type) {
294
+      let type_name = "";
295
+      switch (type) {
296
+        case 1:
297
+          type_name = "上午";
298
+          break;
299
+        case 2:
300
+          type_name = "下午";
301
+          break;
302
+        case 3:
303
+          type_name = "晚上";
304
+          break;
305
+      }
306
+      return type_name;
307
+    },
308
+    getAdvice: function(doctor_advice) {
309
+      if (doctor_advice != null) {
310
+        let name = "";
311
+        for (let i = 0; i < doctor_advice.length; i++) {
312
+          let prescribing_number = "";
313
+          let single_dose = "";
314
+          let drug_spec = "";
315
+
316
+          if (doctor_advice[i].prescribing_number > 0) {
317
+            prescribing_number =
318
+              doctor_advice[i].prescribing_number +
319
+              doctor_advice[i].prescribing_number_unit;
320
+          }
321
+          if (doctor_advice[i].single_dose > 0) {
322
+            single_dose =
323
+              " 单次用量 " +
324
+              doctor_advice[i].single_dose +
325
+              doctor_advice[i].single_dose_unit;
326
+          }
327
+
328
+          if (doctor_advice[i].drug_spec > 0) {
329
+            drug_spec =
330
+              doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
331
+          }
332
+
333
+          name =
334
+            name +
335
+            doctor_advice[i].advice_name +
336
+            " " +
337
+            drug_spec +
338
+            " " +
339
+            prescribing_number +
340
+            " " +
341
+            single_dose +
342
+            " " +
343
+            doctor_advice[i].delivery_way +
344
+            " " +
345
+            doctor_advice[i].execution_frequency +
346
+            " " +
347
+            doctor_advice[i].remark +
348
+            "\n";
349
+
350
+          if (doctor_advice[i].child.length > 0) {
351
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
352
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
353
+                doctor_advice[i].child[a]["presc"] =
354
+                  doctor_advice[i].child[a].prescribing_number +
355
+                  doctor_advice[i].child[a].prescribing_number_unit;
356
+              } else {
357
+                doctor_advice[i].child[a]["presc"] = "";
358
+              }
359
+
360
+              if (doctor_advice[i].child[a].single_dose > 0) {
361
+                doctor_advice[i].child[a]["single"] =
362
+                  " " +
363
+                  " 单次用量 " +
364
+                  " " +
365
+                  doctor_advice[i].child[a].single_dose +
366
+                  doctor_advice[i].child[a].single_dose_unit;
367
+              } else {
368
+                doctor_advice[i].child[a]["single"] = "";
369
+              }
370
+
371
+              name =
372
+                name +
373
+                "▲" +
374
+                doctor_advice[i].child[a].advice_name +
375
+                "" +
376
+                doctor_advice[i].child[a].advice_desc +
377
+                doctor_advice[i].child[a].drug_spec_unit +
378
+                doctor_advice[i].child[a].presc +
379
+                doctor_advice[i].child[a].single +
380
+                "\n";
381
+            }
382
+          }
383
+        }
384
+        return name;
385
+      }
386
+    }
387
+  },
388
+  components: {
389
+    WeekItem
390
+  },
391
+  created() {
392
+    this.modeOptions = this.$store.getters.treatment_mode;
393
+    this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
394
+    console.log("抗凝机", this.anticoagulants_confit);
395
+    this.week_type = new Date().getDay();
396
+    if (this.week_type == 0) {
397
+      this.week_type = 7;
398
+    }
399
+    this.getNextScheduleWeekDay();
400
+  }
401
+};
402
+</script>
403
+
404
+<style rel="stylesheet/css" lang="scss">
405
+.el-table td,
406
+.el-table th.is-leaf,
407
+.el-table--border,
408
+.el-table--group {
409
+  border-color: #d0d3da;
410
+}
411
+.el-table--border::after,
412
+.el-table--group::after,
413
+.el-table::before {
414
+  background-color: #d0d3da;
415
+}
416
+</style>

+ 3 - 2
src/xt_pages/workforce/components/tableWeeks.vue View File

@@ -208,6 +208,7 @@ export default {
208 208
   },
209 209
   watch: {
210 210
     weekTime: function() {
211
+     
211 212
       var theType = this.weekType(this.weekTime);
212 213
       this.getSchedules(theType);
213 214
     }
@@ -224,12 +225,12 @@ export default {
224 225
           week_type:this.week_type,
225 226
           week_time:this.week_time,
226 227
         }
227
-        console.log("params------",params)
228
+       
228 229
       getScheduleWeekDay(params).then(response => {
229 230
         this.scheduleData = [];
230 231
         if (response.data.state == 1) {
231 232
           this.scheduleData = response.data.data.schdules;
232
-          console.log("排班-----", this.scheduleData);
233
+         
233 234
         } else {
234 235
           this.$message.error("网络错误");
235 236
           return false;

+ 348 - 0
src/xt_pages/workforce/next_remind_print.vue View File

@@ -0,0 +1,348 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-row style="float:right;">
6
+        <el-col :span="24">
7
+          <el-button
8
+            size="small"
9
+            icon="el-icon-printer"
10
+            type="primary"
11
+            @click="printAction"
12
+            >打印</el-button
13
+          >
14
+        </el-col>
15
+      </el-row>
16
+    </div>
17
+    <div class="app-container" style="background-color: white;">
18
+      <div id="print_content">
19
+        <div class="print_main_content">
20
+          <div class="order_title_panl">
21
+            <span class="main_title">{{day}}排班提醒({{ currentDate }})</span>
22
+          </div>
23
+          <div class="table_panel">
24
+            <table class="table">
25
+              <thead>
26
+                <tr>
27
+                  <!-- <td :width="td_1_width">姓名</td>
28
+                  <td :width="td_1_width">分区</td>
29
+                  <td :width="td_1_width">班次</td>
30
+                  <td :width="td_1_width">机号</td>
31
+                  <td :width="td_1_width">透析模式</td>
32
+                  <td :width="td_2_width">透析器</td>
33
+                  <td :width="td_2_width">抗凝剂</td>
34
+                  <td :width="td_2_width">低分子肝素</td>
35
+                  <td :width="td_4_width">长期医嘱</td> -->
36
+                  <td width="100">姓名</td>
37
+                  <td width="70">分区</td>
38
+                  <td width="70">班次</td>
39
+                  <td width="70">机号</td>
40
+                  <td width="120">透析模式</td>
41
+                  <td width="100">透析器</td>
42
+                  <td width="120">抗凝剂</td>
43
+                  <td width="100">总量</td>
44
+                  <td width="300">长期医嘱</td>
45
+                </tr>
46
+              </thead>
47
+              <tbody>
48
+              <tr v-for="(main_collection, index) in scheduleData" :key="index">
49
+                <td :width="td_1_width">{{ main_collection.patient}}</td>
50
+                <td :width="td_1_width">{{ main_collection.zone.name }}</td>
51
+                <td :width="td_1_width">
52
+                  {{getSchedulesType(main_collection.schedule_type)}}
53
+                </td>
54
+                <td :width="td_1_width">
55
+                  {{main_collection.number.number}}
56
+
57
+                </td>
58
+                <td :width="td_1_width">
59
+                  {{modeOptions[main_collection.mode_id].name}}
60
+                </td>
61
+                <td :width="td_1_width">
62
+                  {{main_collection.prescription.dialyzer_perfusion_apparatus}}
63
+
64
+
65
+                </td>
66
+                <td :width="td_1_width">
67
+                  {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}}
68
+
69
+                </td>
70
+                <td :width="td_1_width">
71
+                  <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
72
+                  <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
73
+                  <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
74
+                  <span v-if="main_collection.prescription.anticoagulant == 4">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
75
+                  <span v-if="main_collection.prescription.anticoagulant == 5">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
76
+                  <span v-if="main_collection.prescription.anticoagulant == 6">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
77
+                  <span v-if="main_collection.prescription.anticoagulant == 7">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
78
+                </td>
79
+                <td :width="td_4_width" style="text-align:left" >
80
+                  <span style="white-space: pre">{{getAdvice(main_collection.doctor_advice)}}</span>
81
+                </td>
82
+              </tr>
83
+              </tbody>
84
+            </table>
85
+          </div>
86
+        </div>
87
+      </div>
88
+    </div>
89
+  </div>
90
+</template>
91
+
92
+<script>
93
+  import { getNextScheduleWeekDay } from '@/api/schedule'
94
+  import { parseTime } from '@/utils'
95
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
96
+  import print from 'print-js'
97
+  const moment = require('moment') 
98
+  export default {
99
+    name: 'SchedulePrint',
100
+    data() {
101
+      return {
102
+        crumbs: [
103
+          { path: false, name: '排班提醒' },
104
+          { path: false, name: '排班提醒打印' }
105
+        ],
106
+        scheduleData:[],
107
+        week_type: 0,
108
+        day:'',
109
+        td_1_width: '10%',
110
+        td_2_width: '10%',
111
+        td_3_width: '25%',
112
+        td_4_width: '45%',
113
+        modeOptions: null,
114
+        anticoagulants_confit:null,
115
+        currentDate:'',
116
+        start_time:moment().week(moment().week() + 1).startOf('week').unix(),
117
+        end_time:moment().week(moment().week() + 1).endOf('week').unix(),
118
+      }
119
+    },
120
+    components: {
121
+      BreadCrumb
122
+    },
123
+    created() {
124
+     this.currentDate = this.getCurrentDate()
125
+      this.modeOptions = this.$store.getters.treatment_mode
126
+      this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
127
+      this.week_type = this.$route.query.week_type
128
+      this.week_time  = this.$route.query.week_time
129
+      
130
+      const params = {
131
+          week_type:this.week_type,
132
+          week_time:this.week_time,
133
+          start_time:this.start_time,
134
+          end_time:this.end_time,
135
+        }
136
+      console.log("打印下周",params)
137
+      getNextScheduleWeekDay(params).then(rs => {
138
+        var resp = rs.data
139
+        console.log(resp)
140
+        if (resp.state == 1) {
141
+          this.scheduleData = resp.data.schedule
142
+        } else {
143
+          this.$message.error(resp.msg)
144
+        }
145
+      }).catch(err => {
146
+        this.$message.error(err)
147
+      })
148
+    },
149
+    methods: {
150
+      getAdvice:function(doctor_advice) {
151
+        if (doctor_advice != null) {
152
+
153
+        let name = ""
154
+        for (let i = 0; i< doctor_advice.length; i++) {
155
+
156
+          let prescribing_number = ''
157
+          let single_dose = ''
158
+          let drug_spec = ''
159
+
160
+          if (doctor_advice[i].prescribing_number > 0) {
161
+            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
162
+          }
163
+          if (doctor_advice[i].single_dose > 0) {
164
+            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
165
+          }
166
+
167
+          if (doctor_advice[i].drug_spec > 0) {
168
+            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
169
+          }
170
+
171
+          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
172
+
173
+          if (doctor_advice[i].child.length > 0) {
174
+
175
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
176
+
177
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
178
+                doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
179
+              } else {
180
+                doctor_advice[i].child[a]['presc'] = ''
181
+              }
182
+
183
+              if (doctor_advice[i].child[a].single_dose > 0) {
184
+                doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
185
+              } else {
186
+                doctor_advice[i].child[a]['single'] = ''
187
+              }
188
+
189
+              name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
190
+                + doctor_advice[i].child[a].advice_desc
191
+                + doctor_advice[i].child[a].drug_spec_unit
192
+                + doctor_advice[i].child[a].presc
193
+                + doctor_advice[i].child[a].single + "\n"
194
+            }
195
+
196
+          }
197
+        }
198
+          return name
199
+
200
+
201
+        }
202
+
203
+      },
204
+      printAction: function() {
205
+        const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
206
+
207
+        printJS({
208
+          printable: 'print_content',
209
+          type: 'html',
210
+          documentTitle: '  ',
211
+          style: style,
212
+          scanStyles: false
213
+        })
214
+      }, getSchedulesType: function(type) {
215
+        let type_name = ''
216
+        switch (type) {
217
+          case 1:
218
+            type_name = '上午'
219
+            break
220
+          case 2:
221
+            type_name = '下午'
222
+            break
223
+          case 3:
224
+            type_name = '晚上'
225
+            break
226
+        }
227
+        return type_name
228
+      },
229
+      getCurrentDate: function () {
230
+        console.log(this.$route.query.week_type)
231
+        var myDate = new Date();
232
+        var year = myDate.getFullYear(); //年
233
+        var month = myDate.getMonth() + 1; //月
234
+        var day = myDate.getDate() + 7; //日
235
+        var newday = myDate.getDay();
236
+        var days = parseInt(this.$route.query.week_type);
237
+        var dayNum = parseInt(this.$route.query.week_type);
238
+        switch(days) {
239
+          case 1:
240
+            days = '星期一';
241
+            break;
242
+          case 2:
243
+            days = '星期二';
244
+            break;
245
+          case 3:
246
+            days = '星期三';
247
+            break;
248
+          case 4:
249
+            days = '星期四';
250
+            break;
251
+          case 5:
252
+            days = '星期五';
253
+            break;
254
+          case 6:
255
+            days = '星期六';
256
+            break;
257
+          case 7:
258
+            days = '星期日';
259
+            break;
260
+        }
261
+        if(newday > dayNum){
262
+          let lastDay = day - (newday - dayNum)
263
+          console.log("lastDay1",lastDay)
264
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
265
+          return str;
266
+        }else if(newday < dayNum){
267
+          let lastDay = day + (dayNum - newday)
268
+          console.log("lastDay2",lastDay)
269
+          var str = year + "年" + month + "月" + lastDay + "日  " + days;
270
+          return str;
271
+        }else{
272
+          var str = year + "年" + month + "月" + day + "日  " + days;
273
+          return str;
274
+        }
275
+        
276
+        
277
+      }
278
+    }
279
+  }
280
+</script>
281
+
282
+<style rel="stylesheet/scss" lang="scss" scoped>
283
+.print_main_content {
284
+  background-color: white;
285
+  max-width: 1500px;
286
+  margin: 0 auto;
287
+  padding: 0 0 20px 0;
288
+
289
+  .order_title_panl {
290
+    text-align: center;
291
+
292
+    .main_title {
293
+      font-size: 18px;
294
+      line-height: 40px;
295
+      font-weight: 500;
296
+    }
297
+  }
298
+  .table_panel {
299
+    .table {
300
+      width: 100%;
301
+      border: 1px solid;
302
+      border-collapse: collapse;
303
+      padding: 2px;
304
+
305
+      thead {
306
+        tr {
307
+          td {
308
+            border: 1px solid;
309
+            text-align: center;
310
+            font-size: 20px;
311
+            padding: 15px 5px;
312
+          }
313
+        }
314
+      }
315
+      tbody {
316
+        tr {
317
+          td {
318
+            border: 1px solid;
319
+            text-align: center;
320
+            font-size: 18px;
321
+            padding: 10px 5px;
322
+
323
+            .proj {
324
+              padding: 5px 0;
325
+              text-align: left;
326
+
327
+              .proj_title {
328
+                font-size: 16px;
329
+                font-weight: 500;
330
+                line-height: 25px;
331
+              }
332
+
333
+              .proj_item {
334
+                font-size: 15px;
335
+                line-height: 20px;
336
+
337
+                .zone_name {
338
+                  font-weight: 500;
339
+                }
340
+              }
341
+            }
342
+          }
343
+        }
344
+      }
345
+    }
346
+  }
347
+}
348
+</style>

+ 18 - 4
src/xt_pages/workforce/remind.vue View File

@@ -10,12 +10,15 @@
10 10
         <el-tab-pane name="thisWeek">
11 11
             <span slot="label"><i class="el-icon-date"></i> 本周({{theWeek.thisWeek}})</span>
12 12
         </el-tab-pane>
13
-        <!-- <el-tab-pane name="nextWeek">
13
+        <el-tab-pane name="nextWeek">
14 14
             <span slot="label"><i class="el-icon-date"></i> 下一周({{theWeek.nextWeek}})</span>
15
-        </el-tab-pane>  -->
15
+        </el-tab-pane> 
16 16
     </el-tabs>
17 17
     <table-push v-if="activeName=='pushTime'"></table-push>
18
-    <table-weeks v-else :week-time="activeName"> </table-weeks>
18
+    <!-- <table-weeks v-else :week-time="activeName"> </table-weeks> -->
19
+     
20
+   <table-weeks v-if="activeName == 'thisWeek'"> </table-weeks>
21
+   <nextTableWeeks v-if="activeName =='nextWeek'"></nextTableWeeks>
19 22
   </div>
20 23
 </div>
21 24
 </template>
@@ -23,6 +26,7 @@
23 26
 <script>
24 27
 import {getWeekPanels} from '@/api/schedule';
25 28
 import tableWeeks from './components/tableWeeks'
29
+import nextTableWeeks from './components/nextTableWeeks'
26 30
 import tablePush from './components/tablePush'
27 31
 import BreadCrumb from '../components/bread-crumb'
28 32
 export default {
@@ -40,7 +44,8 @@ export default {
40 44
     components:{
41 45
       BreadCrumb,
42 46
         tableWeeks,
43
-        tablePush
47
+        tablePush,
48
+        nextTableWeeks
44 49
     },
45 50
     methods: {
46 51
 
@@ -61,10 +66,19 @@ export default {
61 66
       },
62 67
       handleClick(tab, event) {
63 68
         console.log(tab, event);
69
+      },
70
+      changeActiveName(val){
71
+        console.log("val------",val)
72
+        this.activeName = val
64 73
       }
65 74
     },
66 75
     created(){
67 76
         this.getWeekPanels();
77
+    },
78
+    watch:{
79
+      activeName:function(val){
80
+       console.log("val----",val)
81
+      }
68 82
     }
69 83
 };
70 84
 </script>