Browse Source

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

see999 4 years ago
parent
commit
8a6f134be5
53 changed files with 10536 additions and 4437 deletions
  1. 0 1
      config/prod.env.js
  2. 17 6
      src/api/config.js
  3. 40 0
      src/api/his/his.js
  4. 82 0
      src/api/his/his_config.js
  5. 9 9
      src/api/project/project.js
  6. 2 0
      src/lang/zh.js
  7. 18 0
      src/router/modules/outpatientDoctorStation.js
  8. 55 5
      src/xt_pages/data/basicConfig.vue
  9. 259 225
      src/xt_pages/data/components/addInspection.vue
  10. 307 257
      src/xt_pages/data/components/editInspection.vue
  11. 9 1
      src/xt_pages/dialysis/batch_print/batch_print_order.vue
  12. 14 9
      src/xt_pages/hospitalStation/allListPrint.vue
  13. 1 1
      src/xt_pages/hospitalStation/components/ChargePrescriptionTable.vue
  14. 52 33
      src/xt_pages/hospitalStation/components/callPrescription.vue
  15. 180 38
      src/xt_pages/hospitalStation/components/deskPrescription.vue
  16. 20 1
      src/xt_pages/hospitalStation/components/inquiriesDetail.vue
  17. 1 1
      src/xt_pages/hospitalStation/components/newPrescriptionTable.vue
  18. 43 24
      src/xt_pages/hospitalStation/components/nextOrLastPrescription.vue
  19. 13 12
      src/xt_pages/hospitalStation/components/prescriptionTable.vue
  20. 125 17
      src/xt_pages/hospitalStation/doctorDesk.vue
  21. 26 16
      src/xt_pages/hospitalStation/listPrint.vue
  22. 7 1
      src/xt_pages/hospitalStation/newStatementPrint.vue
  23. 54 13
      src/xt_pages/hospitalStation/outpatientChargesManagement.vue
  24. 7 2
      src/xt_pages/hospitalStation/summary.vue
  25. 294 284
      src/xt_pages/hospitalStation/summaryDetail.vue
  26. 7 2
      src/xt_pages/outpatientCharges/allListPrint.vue
  27. 1 1
      src/xt_pages/outpatientCharges/components/chargeMonthPrescriptionTable.vue
  28. 1 1
      src/xt_pages/outpatientCharges/components/prescriptionTable.vue
  29. 324 326
      src/xt_pages/outpatientCharges/components/registerDialog.vue
  30. 3 3
      src/xt_pages/outpatientCharges/costComparison.vue
  31. 185 57
      src/xt_pages/outpatientCharges/incomeStatistics.vue
  32. 10 5
      src/xt_pages/outpatientCharges/listPrint.vue
  33. 10 10
      src/xt_pages/outpatientCharges/listTemplate/printTwo.vue
  34. 1043 660
      src/xt_pages/outpatientCharges/outpatientChargesManagement.vue
  35. 218 218
      src/xt_pages/outpatientCharges/statementPrint.vue
  36. 13 3
      src/xt_pages/outpatientCharges/summaryDetail.vue
  37. 26 4
      src/xt_pages/outpatientDoctorStation/components/callPrescription.vue
  38. 1310 1118
      src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue
  39. 15 3
      src/xt_pages/outpatientDoctorStation/components/inquiriesDetail.vue
  40. 1 1
      src/xt_pages/outpatientDoctorStation/components/newPrescriptionTable.vue
  41. 22 7
      src/xt_pages/outpatientDoctorStation/components/nextOrLastPrescription.vue
  42. 7 7
      src/xt_pages/outpatientDoctorStation/components/prescriptionTable.vue
  43. 468 0
      src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue
  44. 250 67
      src/xt_pages/outpatientDoctorStation/components/saveTemplate.vue
  45. 2286 770
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue
  46. 7 7
      src/xt_pages/outpatientDoctorStation/pastInquiries.vue
  47. 485 0
      src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue
  48. 1995 0
      src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue
  49. 14 14
      src/xt_pages/outpatientDoctorStation/template/printOne.vue
  50. 2 2
      src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue
  51. 132 132
      src/xt_pages/outpatientRegistration/index.vue
  52. 65 62
      src/xt_pages/outpatientRegistration/registrationHistory.vue
  53. 1 1
      src/xt_pages/qcd/dialysisTotal.vue

+ 0 - 1
config/prod.env.js View File

9
   MIRCO_MALL_HOST: '"http://mall.kuyicloud.com"',
9
   MIRCO_MALL_HOST: '"http://mall.kuyicloud.com"',
10
   CDM_HOST: '"http://cdm.kuyicloud.com"',
10
   CDM_HOST: '"http://cdm.kuyicloud.com"',
11
 }
11
 }
12
-

+ 17 - 6
src/api/config.js View File

148
 
148
 
149
 
149
 
150
 export function getMonitorConfig(params){
150
 export function getMonitorConfig(params){
151
-  
151
+
152
   return request({
152
   return request({
153
     url:"/api/monitor/getmonitorconfig",
153
     url:"/api/monitor/getmonitorconfig",
154
     method:"Get",
154
     method:"Get",
158
 
158
 
159
 
159
 
160
 export function addOrderConfig(params){
160
 export function addOrderConfig(params){
161
-  
161
+
162
   return request({
162
   return request({
163
     url:"/api/order/addorderconfig",
163
     url:"/api/order/addorderconfig",
164
     method:"Get",
164
     method:"Get",
168
 }
168
 }
169
 
169
 
170
 export function getOrderConfig(params){
170
 export function getOrderConfig(params){
171
-  
171
+
172
   return request({
172
   return request({
173
     url:"/api/order/getorderconfig",
173
     url:"/api/order/getorderconfig",
174
     method:"get",
174
     method:"get",
177
 }
177
 }
178
 
178
 
179
 export function changeFuncPrint(params){
179
 export function changeFuncPrint(params){
180
-  
180
+
181
   return request({
181
   return request({
182
     url:"/api/order/changefuncprint",
182
     url:"/api/order/changefuncprint",
183
     method:"get",
183
     method:"get",
186
 }
186
 }
187
 
187
 
188
 export function getDataPrintList(params){
188
 export function getDataPrintList(params){
189
-  
189
+
190
   return request({
190
   return request({
191
     url:"/api/order/getdataprint",
191
     url:"/api/order/getdataprint",
192
     method:"get",
192
     method:"get",
193
     params:params
193
     params:params
194
   })
194
   })
195
-}
195
+}
196
+
197
+
198
+
199
+export function postXtHisProjectIsOpen(params){
200
+
201
+  return request({
202
+    url:"/api/xtconfigproject/isopen",
203
+    method:"post",
204
+    params:params
205
+  })
206
+}

+ 40 - 0
src/api/his/his.js View File

429
 
429
 
430
 
430
 
431
 
431
 
432
+export function getIncomeStatisticsDataList(params) {
433
+  return request({
434
+    url: "/api/incomestatistics/get",
435
+    method: "get",
436
+    params:params,
437
+  });
438
+}
439
+
440
+
441
+
442
+
443
+
444
+
445
+export function saveTeam(data, params) {
446
+  return request({
447
+    url: "/api/his/saveprojectteam",
448
+    method: "post",
449
+    data:data,
450
+    params:params,
451
+  });
452
+}
453
+
454
+
455
+
432
 
456
 
457
+export function editTeam(params,data) {
458
+  return request({
459
+    url: "/api/his/updateprojectteam",
460
+    method: "post",
461
+    data:data,
462
+    params:params,
463
+  });
464
+}
433
 
465
 
466
+export function createdTemplate(params,data) {
467
+  return request({
468
+    url: "/api/hisprescriptiontemplate/create",
469
+    method: "post",
470
+    data:data,
471
+    params:params,
472
+  });
473
+}
434
 
474
 
435
 
475
 

+ 82 - 0
src/api/his/his_config.js View File

1
+import request from "@/utils/request";
2
+
3
+
4
+
5
+export function getPatientList(params) {
6
+  return request({
7
+    url: "/api/his/patient/list",
8
+    method: "get",
9
+    params:params
10
+  });
11
+}
12
+
13
+
14
+export function getPrescriptiontemplateList(params) {
15
+  return request({
16
+    url: "/api/his/prescriptiontemplate/list",
17
+    method: "get",
18
+    params:params
19
+  });
20
+}
21
+
22
+
23
+export function getPrescriptionTemplateInfo(params) {
24
+  return request({
25
+    url: "/api/his/prescriptiontemplate/info",
26
+    method: "get",
27
+    params:params
28
+  });
29
+}
30
+
31
+
32
+
33
+export function createdTemplate(params,data) {
34
+  return request({
35
+    url: "/api/his/prescriptiontemplate/create",
36
+    method: "post",
37
+    data:data,
38
+    params:params,
39
+  });
40
+}
41
+
42
+
43
+
44
+
45
+export function delHisPrescriptionTemplate(params) {
46
+  return request({
47
+    url: "/api/his/prescriptiontemplate/delete",
48
+    method: "post",
49
+    params:params,
50
+  });
51
+}
52
+
53
+
54
+
55
+export function delHisPrescriptionInfoTemplate(params) {
56
+  return request({
57
+    url: "/api/his/prescriptioninfotemplate/delete",
58
+    method: "post",
59
+    params:params,
60
+  });
61
+}
62
+
63
+
64
+
65
+
66
+export function delHisPrescriptionAdviceTemplate(params) {
67
+  return request({
68
+    url: "/api/his/advicetemplate/delete",
69
+    method: "post",
70
+    params:params,
71
+  });
72
+}
73
+
74
+
75
+
76
+export function delHisPrescriptionProjectTemplate(params) {
77
+  return request({
78
+    url: "/api/his/projecttemplate/delete",
79
+    method: "post",
80
+    params:params,
81
+  });
82
+}

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

1
 import request from "@/utils/request";
1
 import request from "@/utils/request";
2
-import url from "postcss-url";
2
+
3
 
3
 
4
 export function saveProject(params){
4
 export function saveProject(params){
5
 
5
 
47
   })
47
   })
48
 }
48
 }
49
 
49
 
50
-export function saveProjectTeam(params){
51
-
52
-  return request({
53
-    url:"/api/his/saveprojectteam",
54
-    methods:"Get",
55
-    params:params
56
-  })
57
-}
50
+// export function saveProjectTeam(params,data){
51
+//   return request({
52
+//     url:"/api/his/saveprojectteam",
53
+//     methods:"DELETE",
54
+//     data:data,
55
+//     params:params,
56
+//   })
57
+// }
58
 
58
 
59
 export function getProjectTeamList(params){
59
 export function getProjectTeamList(params){
60
 
60
 

+ 2 - 0
src/lang/zh.js View File

247
     hospitalStation:"住院工作站",
247
     hospitalStation:"住院工作站",
248
     pastInquiries:"既往查询",
248
     pastInquiries:"既往查询",
249
 
249
 
250
+    prescriptionTemplate:"处方模版",
251
+
250
   },
252
   },
251
   navbar: {
253
   navbar: {
252
     logOut: '退出登录',
254
     logOut: '退出登录',

+ 18 - 0
src/router/modules/outpatientDoctorStation.js View File

24
         name: 'outpatientDoctorStationPastInquiries',
24
         name: 'outpatientDoctorStationPastInquiries',
25
         meta: { title: 'outpatientDoctorStationPastInquiries', noCache: true }
25
         meta: { title: 'outpatientDoctorStationPastInquiries', noCache: true }
26
     },
26
     },
27
+    {
28
+      path: '/outpatientDoctorStation/prescriptionTemplate',
29
+      component: () => import('@/xt_pages/outpatientDoctorStation/prescriptionTemplate'),
30
+      name: 'prescriptionTemplate',
31
+      meta: { title: 'prescriptionTemplate', noCache: true }
32
+    },
33
+
34
+    {
35
+      path: '/outpatientDoctorStation/prescriptionTemplatedetail',
36
+      component: () => import('@/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail'),
37
+      name: 'prescriptionTemplatedetail',
38
+      hidden: true,
39
+      is_menu: false,
40
+      meta: { title: 'prescriptionTemplatedetail', noCache: true }
41
+    },
42
+
43
+
44
+
27
     {
45
     {
28
         path: '/outpatientDoctorStation/templateManagement',
46
         path: '/outpatientDoctorStation/templateManagement',
29
         component: () => import('@/xt_pages/outpatientDoctorStation/templateManagement'),
47
         component: () => import('@/xt_pages/outpatientDoctorStation/templateManagement'),

+ 55 - 5
src/xt_pages/data/basicConfig.vue View File

26
           </p>
26
           </p>
27
         </div>
27
         </div>
28
 
28
 
29
+        <div class="configBox">
30
+            <p style="font-size:18px;font-weight:bold">处方项目同步到临时医嘱</p>
31
+            <p style="font-size:14px;margin-top:5px;color:#333;">开启门诊处方的项目同步后,护士则在血透的临时医嘱中可以看到相关的耗材/检验检查数据</p>
32
+            <p style="margin-top:20px;">门诊处方项目同步到透析医嘱:
33
+                <el-switch v-model="is_open_xt_his_project" @change="changeFuncProject"></el-switch>
34
+            </p>
35
+        </div>
36
+
37
+
29
         <!-- <div class="configBox">
38
         <!-- <div class="configBox">
30
           <p style="font-size:18px;font-weight:bold">血压数据自动获取</p>
39
           <p style="font-size:18px;font-weight:bold">血压数据自动获取</p>
31
           <p style="font-size:14px;margin-top:5px;color:#333;">在联机的状态下,开启透析监测-血压数据自动获取功能后,则不需要手动输入,数据会自动上传到监测中</p>
40
           <p style="font-size:14px;margin-top:5px;color:#333;">在联机的状态下,开启透析监测-血压数据自动获取功能后,则不需要手动输入,数据会自动上传到监测中</p>
71
                 <!--<el-switch v-model="value"></el-switch>-->
80
                 <!--<el-switch v-model="value"></el-switch>-->
72
             <!--</p>-->
81
             <!--</p>-->
73
         <!--</div>-->
82
         <!--</div>-->
74
-        
83
+
75
     </div>
84
     </div>
76
   </div>
85
   </div>
77
 </template>
86
 </template>
78
 
87
 
79
 <script>
88
 <script>
80
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
89
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
81
-import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen,changeFuncPrint,getDataPrintList} from '@/api/config'
90
+import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen,changeFuncPrint,getDataPrintList,postXtHisProjectIsOpen} from '@/api/config'
82
 
91
 
83
 export default {
92
 export default {
84
   name: "printTemplate",
93
   name: "printTemplate",
95
       is_open_monitor:false,
104
       is_open_monitor:false,
96
       is_open_order:false,
105
       is_open_order:false,
97
       is_open_print:false,
106
       is_open_print:false,
107
+      is_open_xt_his_project: false,
98
     };
108
     };
99
   },
109
   },
100
   methods: {
110
   methods: {
104
           if (response.data.state === 1) {
114
           if (response.data.state === 1) {
105
             if(response.data.data.is_open_xt_his == 1) {
115
             if(response.data.data.is_open_xt_his == 1) {
106
               this.is_open_xt_his = true
116
               this.is_open_xt_his = true
117
+
107
             }else{
118
             }else{
108
               this.is_open_xt_his = false
119
               this.is_open_xt_his = false
109
             }
120
             }
110
 
121
 
122
+            if(response.data.data.is_open_xt_his_project == 1) {
123
+              this.is_open_xt_his_project = true
124
+
125
+            }else{
126
+              this.is_open_xt_his_project = false
127
+            }
128
+
111
           } else {
129
           } else {
112
             this.$message.error(response.data.msg)
130
             this.$message.error(response.data.msg)
113
           }
131
           }
146
         )
164
         )
147
       }
165
       }
148
     },
166
     },
167
+    changeFuncProject(val){
168
+      if(this.is_open_xt_his_project){
169
+        let params={
170
+          is_open:this.is_open_xt_his_project
171
+        }
172
+        postXtHisProjectIsOpen(params).then(
173
+          response => {
174
+            if (response.data.state === 1) {
175
+              this.is_open_xt_his_project = response.data.data.is_open
176
+
177
+            } else {
178
+              this.$message.error(response.data.msg)
179
+            }
180
+          }
181
+        )
182
+      }else{
183
+        let params={
184
+          is_open:this.is_open_xt_his_project
185
+        }
186
+        postXtHisProjectIsOpen(params).then(
187
+          response => {
188
+            if (response.data.state === 1) {
189
+              this.is_open_xt_his_project = response.data.data.is_open
190
+
191
+            } else {
192
+              this.$message.error(response.data.msg)
193
+            }
194
+          }
195
+        )
196
+      }
197
+    },
198
+
149
 
199
 
150
     changeFuncTwo(){
200
     changeFuncTwo(){
151
       console.log("3333333",this.is_open_monitor)
201
       console.log("3333333",this.is_open_monitor)
193
        }
243
        }
194
       let params = {
244
       let params = {
195
          is_open:is_open,
245
          is_open:is_open,
196
-       } 
246
+       }
197
       addOrderConfig(params).then(response=>{
247
       addOrderConfig(params).then(response=>{
198
          if(response.data.state == 1){
248
          if(response.data.state == 1){
199
            var config = response.data.data.config
249
            var config = response.data.data.config
224
       }
274
       }
225
       if(val == false){
275
       if(val == false){
226
         is_open = 0
276
         is_open = 0
227
-      } 
277
+      }
228
       var params = {
278
       var params = {
229
         is_open:is_open,
279
         is_open:is_open,
230
       }
280
       }
231
-     
281
+
232
       changeFuncPrint(params).then(response=>{
282
       changeFuncPrint(params).then(response=>{
233
          if(response.data.state == 1){
283
          if(response.data.state == 1){
234
            var dataPrint =  response.data.data.dataPrint
284
            var dataPrint =  response.data.data.dataPrint

+ 259 - 225
src/xt_pages/data/components/addInspection.vue View File

1
 <template>
1
 <template>
2
     <el-dialog
2
     <el-dialog
3
-        :title="formTitle"
4
-        width="900px"
5
-        :visible.sync="visible"
6
-        :before-close="_close"
3
+            :title="formTitle"
4
+            width="900px"
5
+            :visible.sync="visible"
6
+            :before-close="_close"
7
     >
7
     >
8
         <div>
8
         <div>
9
-            <el-form :model="form" :rules="rules" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
9
+            <el-form :model="form" :rules="rules" ref="form" label-width="100px"
10
+                     style="display: flex;flex-wrap: wrap;justify-content: space-between;">
10
                 <el-form-item label="组套名称 : " prop="project_team" style="width:100%">
11
                 <el-form-item label="组套名称 : " prop="project_team" style="width:100%">
11
                     <el-input v-model="form.project_team" placeholder="" maxlength="30"></el-input>
12
                     <el-input v-model="form.project_team" placeholder="" maxlength="30"></el-input>
12
                 </el-form-item>
13
                 </el-form-item>
19
                 <el-form-item label="五笔 : " prop="wubi" style="width:50%">
20
                 <el-form-item label="五笔 : " prop="wubi" style="width:50%">
20
                     <el-input v-model="form.wubi" placeholder="" maxlength="30"></el-input>
21
                     <el-input v-model="form.wubi" placeholder="" maxlength="30"></el-input>
21
                 </el-form-item>
22
                 </el-form-item>
22
-                
23
+
23
                 <el-form-item label="试管颜色 : " prop="tube_color" style="width:50%">
24
                 <el-form-item label="试管颜色 : " prop="tube_color" style="width:50%">
24
                     <el-select v-model="form.tube_color" style="width:160px;" placeholder="请选择">
25
                     <el-select v-model="form.tube_color" style="width:160px;" placeholder="请选择">
25
                         <el-option
26
                         <el-option
26
-                         v-for="(item,index) in getDictionaryDataConfig('system','tube_color')"
27
-                         :key="index"
28
-                         :label="item.name"
29
-                         :value="item.id">
27
+                                v-for="(item,index) in getDictionaryDataConfig('system','tube_color')"
28
+                                :key="index"
29
+                                :label="item.name"
30
+                                :value="item.id">
30
                         </el-option>
31
                         </el-option>
31
-                  </el-select>
32
+                    </el-select>
32
                 </el-form-item>
33
                 </el-form-item>
33
                 <el-form-item label="组套类型 : " prop="team_type" style="width:50%">
34
                 <el-form-item label="组套类型 : " prop="team_type" style="width:50%">
34
                     <el-select v-model="form.team_type" style="width:100%;" placeholder="请选择">
35
                     <el-select v-model="form.team_type" style="width:100%;" placeholder="请选择">
35
                         <el-option
36
                         <el-option
36
-                        v-for="item in options"
37
-                        :key="item.value"
38
-                        :label="item.label"
39
-                        :value="item.value">
37
+                                v-for="item in options"
38
+                                :key="item.value"
39
+                                :label="item.label"
40
+                                :value="item.value">
40
                         </el-option>
41
                         </el-option>
41
                     </el-select>
42
                     </el-select>
42
                 </el-form-item>
43
                 </el-form-item>
43
                 <el-form-item label="备注 : " prop="name" style="width:100%;">
44
                 <el-form-item label="备注 : " prop="name" style="width:100%;">
44
                     <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
45
                     <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
45
                 </el-form-item>
46
                 </el-form-item>
46
-  
47
-                 <el-form-item label="组套明细" style="width:50%;">
47
+
48
+                <el-form-item label="组套明细" style="width:50%;">
48
                     <el-select v-model="form.project_detail" placeholder="请选择">
49
                     <el-select v-model="form.project_detail" placeholder="请选择">
49
                         <el-option
50
                         <el-option
50
-                        v-for="item in projectList"
51
-                        :key="item.id"
52
-                        :label="item.project_name"
53
-                        :value="item.id">
51
+                                v-for="item in projectList"
52
+                                :key="item.id"
53
+                                :label="item.project_name"
54
+                                :value="item.id">
54
                         </el-option>
55
                         </el-option>
55
                     </el-select>
56
                     </el-select>
56
 
57
 
57
-                    </el-form-item>
58
-                 <el-form-item label="数量" style="width:50%;"> 
59
-                      <div style="display:flex;"> 
60
-                         <el-input v-model="form.number" style="margin-right:10px;"></el-input>
61
-                         <el-button type="primary" @click="addProjectList">添加</el-button>
62
-                      </div>
63
-                  </el-form-item>
58
+                </el-form-item>
59
+                <el-form-item label="数量" style="width:50%;">
60
+                    <div style="display:flex;">
61
+                        <el-input v-model="form.number" style="margin-right:10px;"></el-input>
62
+                        <el-button type="primary" @click="addProjectList">添加</el-button>
63
+                    </div>
64
+                </el-form-item>
64
             </el-form>
65
             </el-form>
65
             <el-form>
66
             <el-form>
66
-                <el-table :data="tableData" border  style="100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row ref="tab">
67
+                <el-table :data="tableData" border style="100%" :row-style="{ color: '#303133' }"
68
+                          :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
69
+                          highlight-current-row ref="tab">
67
                     <el-table-column align="center" prop="name" label="分类" width="120">
70
                     <el-table-column align="center" prop="name" label="分类" width="120">
68
-                        <template slot-scope="scope">{{getId(scope.row.statistical_classification)}}</template>
71
+                        <template slot-scope="scope">
72
+                            <div >{{scope.row.type == 2?getId(scope.row.statistical_classification):'耗材'}}</div>
73
+                        </template>
69
                     </el-table-column>
74
                     </el-table-column>
70
                     <el-table-column align="center" prop="name" label="组套明细" width="120">
75
                     <el-table-column align="center" prop="name" label="组套明细" width="120">
71
                         <template slot-scope="scope">{{scope.row.project_name}}</template>
76
                         <template slot-scope="scope">{{scope.row.project_name}}</template>
72
                     </el-table-column>
77
                     </el-table-column>
73
-                     <el-table-column align="center" prop="name" label="数量" width="120">
78
+                    <el-table-column align="center" prop="name" label="数量" width="120">
74
                         <template slot-scope="scope">{{scope.row.number}}</template>
79
                         <template slot-scope="scope">{{scope.row.number}}</template>
75
                     </el-table-column>
80
                     </el-table-column>
76
-                     <el-table-column align="center" prop="name" label="单位" width="120">
81
+                    <el-table-column align="center" prop="name" label="单位" width="120">
77
                         <template slot-scope="scope">{{scope.row.unit}}</template>
82
                         <template slot-scope="scope">{{scope.row.unit}}</template>
78
                     </el-table-column>
83
                     </el-table-column>
79
                     <el-table-column align="center" prop="name" label="单价" width="120">
84
                     <el-table-column align="center" prop="name" label="单价" width="120">
81
                     </el-table-column>
86
                     </el-table-column>
82
                     <el-table-column align="center" prop="name" label="操作">
87
                     <el-table-column align="center" prop="name" label="操作">
83
                         <template slot-scope="scope">
88
                         <template slot-scope="scope">
84
-                          <el-tooltip
85
-                            class="item"
86
-                            effect="dark"
87
-                            content="删除"
88
-                            placement="top"
89
+                            <el-tooltip
90
+                                    class="item"
91
+                                    effect="dark"
92
+                                    content="删除"
93
+                                    placement="top"
89
                             >
94
                             >
90
-                            <el-button
91
-                                type="danger"
92
-                                icon="el-icon-delete"
93
-                                size="small"
94
-                                @click="DeleteProject(scope.row.id,scope.$index)"
95
-                            ></el-button>
95
+                                <el-button
96
+                                        type="danger"
97
+                                        icon="el-icon-delete"
98
+                                        size="small"
99
+                                        @click="DeleteProject(scope.row.id,scope.$index)"
100
+                                ></el-button>
96
                             </el-tooltip>
101
                             </el-tooltip>
97
                         </template>
102
                         </template>
98
                     </el-table-column>
103
                     </el-table-column>
103
 
108
 
104
         <div slot="footer" class="dialog-footer">
109
         <div slot="footer" class="dialog-footer">
105
             <el-button @click="hide">取 消</el-button>
110
             <el-button @click="hide">取 消</el-button>
106
-            <el-button type="primary"  @click="submitAction('form')">保 存</el-button>
111
+            <el-button type="primary" @click="submitAction('form')">保 存</el-button>
107
         </div>
112
         </div>
108
-  </el-dialog>
113
+    </el-dialog>
109
 </template>
114
 </template>
110
 
115
 
111
 <script>
116
 <script>
112
-import { getDictionaryDataConfig,getDataConfig } from "@/utils/data";
113
-import { saveProjectTeam,getAllProjectList,addProjectList,DeleteProject,getProjectDetail } from "@/api/project/project"
114
-export default {
115
-    data(){
116
-        return{
117
-            visible:false,
118
-            formTitle:'',
119
-            activeName:'first',
120
-            form:{
121
-              project_team:'',
122
-              price:"",
123
-              pinyin:"",
124
-              wubi:"",
125
-              tube_color:"",
126
-              team_type:"",
127
-              remark:"",
128
-              project_detail:"",
129
-              number:""
130
-            },
131
-            options: [
132
-            {value: 1,label: '是'},
133
-            {value: 2,label: '否'}
134
-            ],
135
-            value: '',
136
-            radio:'1',
137
-            rules: {
138
-              project_team: [{ required: true, message: '请填写组套名称', trigger: 'blur'  }],
139
-            //   pinyin: [{ required: true, message: '请填写拼音' , trigger: 'blur' }],
140
-            //   wubi: [{ required: true, message: '请填写五笔' , trigger: 'blur' }],
141
-              price: [{ required: true, message: '请填写价格', trigger: 'change' }],
142
-              team_type: [{ required:true,message:'请填写组套类型',trigger:'change' }]
143
-           },
144
-           tableData:[],
145
-           projectList:[],
146
-           tabList:[],
147
-           itemList:[]
148
-        }
149
-    },
150
-    methods:{
151
-        getDataConfig(module, filed_name){
152
-            return getDataConfig(module, filed_name)
153
-        },
154
-            getDictionaryDataConfig(module, filed_name) {
155
-            return getDictionaryDataConfig(module, filed_name)
156
-        },
157
-        _close: function(done) {
158
-            done()
159
-        },
160
-        clear: function() {
161
-            this.form.id = 0;
162
-            this.form.name = "";
163
-            this.form.intro = "";
164
-        },
165
-        show(id) {
166
-            this.visible = true
167
-            this.formTitle = '新增' 
168
-         },
169
-        hide() {
170
-         this.visible = false
171
-        },
172
-        submitAction(formName){
173
-           this.$refs[formName].validate((valid)=>{
174
-                var arr = []
175
-                var listId = []
176
-                for(let i=0;i<this.tableData.length;i++){
177
-                    arr.push(this.tableData[i].id)
178
-                    
179
-                }
180
-                console.log("arr",arr)
181
-                console.log("table",this.tableData)
182
-                var ids = arr.join(",")
183
-                var listIds = this.itemList.join(",")
184
-                var params = {
185
-                 project_team:this.form.project_team,
186
-                 price:this.form.price,
187
-                 pinyin:this.form.pinyin,
188
-                 wubi:this.form.wubi,
189
-                 tube_color:this.form.tube_color,
190
-                 team_type:this.form.team_type,
191
-                 remark:this.form.remark,
192
-                 ids:ids,
193
-                 item_id:listIds
194
-               }
195
-              
196
-              saveProjectTeam(params).then(response=>{
197
-                 if(response.data.state == 1){
198
-                   var projectTeam = response.data.data.projectTeam
199
-                   console.log("projectTeam",projectTeam)
200
-                   this.$message.success("保存成功")  
201
-                   this.visible = false
202
-                   this.form.project_team = "",
203
-                   this.form.price = "",
204
-                   this.form.pinyin = "",
205
-                   this.form.wubi = "",
206
-                   this.form.tube_color = "",
207
-                   this.form.team_type = "",
208
-                   this.form.remark = ""
209
-                   this.tableData = []
210
-                   this.form.number = ""
211
-                   this.$parent.getlist()
212
-                 }else{
213
-                    this.$message.error("项目组套名称已存在!")
214
-                 }
215
-              }) 
216
-           })
117
+  import { getDataConfig, getDictionaryDataConfig } from '@/utils/data'
118
+  import {
119
+    addProjectList,
120
+    DeleteProject,
121
+    getAllProjectList,
122
+    getProjectDetail,
123
+    saveProjectTeam
124
+  } from '@/api/project/project'
125
+
126
+  import {
127
+    saveTeam
128
+  } from '@/api/his/his'
129
+
130
+
131
+  export default {
132
+    data() {
133
+      return {
134
+        visible: false,
135
+        formTitle: '',
136
+        activeName: 'first',
137
+        form: {
138
+          project_team: '',
139
+          price: '',
140
+          pinyin: '',
141
+          wubi: '',
142
+          tube_color: '',
143
+          team_type: '',
144
+          remark: '',
145
+          project_detail: '',
146
+          number: '1'
217
         },
147
         },
218
-        getlist(){
219
-          getAllProjectList().then(response=>{
220
-             if(response.data.state == 1){
221
-               var projectList = response.data.data.projectList
222
-               console.log('projectlist33333',projectList)
223
-              
224
-               this.projectList = projectList
225
-            //    var hisprojectlist = response.data.data.hisprojectlist
226
-            //    console.log("hisprojectlist",hisprojectlist)
227
-            //    this.tableData = hisprojectlist
228
-             }
229
-          })   
148
+        options: [
149
+          { value: 1, label: '是' },
150
+          { value: 2, label: '否' }
151
+        ],
152
+        value: '',
153
+        radio: '1',
154
+        rules: {
155
+          project_team: [{ required: true, message: '请填写组套名称', trigger: 'blur' }],
156
+          //   pinyin: [{ required: true, message: '请填写拼音' , trigger: 'blur' }],
157
+          //   wubi: [{ required: true, message: '请填写五笔' , trigger: 'blur' }],
158
+          price: [{ required: true, message: '请填写价格', trigger: 'change' }],
159
+          team_type: [{ required: true, message: '请填写组套类型', trigger: 'change' }]
230
         },
160
         },
231
-       
232
-        getId(id){
233
-          var name = ""
234
-          var statistics_category =  getDictionaryDataConfig('system','statistics_category') 
235
-          console.log("2235",statistics_category)
236
-          for(let i=0;i<statistics_category.length;i++){
237
-             if(id == statistics_category[i].id){
238
-                 name = statistics_category[i].name
239
-             }
161
+        tableData: [],
162
+        projectList: [],
163
+        tabList: [],
164
+        itemList: []
165
+      }
166
+    },
167
+    methods: {
168
+      getDataConfig(module, filed_name) {
169
+        return getDataConfig(module, filed_name)
170
+      },
171
+      getDictionaryDataConfig(module, filed_name) {
172
+        return getDictionaryDataConfig(module, filed_name)
173
+      },
174
+      _close: function(done) {
175
+        done()
176
+      },
177
+      clear: function() {
178
+        this.form.id = 0
179
+        this.form.name = ''
180
+        this.form.intro = ''
181
+      },
182
+      show(id) {
183
+        this.visible = true
184
+        this.formTitle = '新增'
185
+      },
186
+      hide() {
187
+        this.visible = false
188
+      },
189
+      submitAction(formName) {
190
+        this.$refs[formName].validate((valid) => {
191
+          var params = {
192
+            project_team: this.form.project_team,
193
+            price: this.form.price,
194
+            pinyin: this.form.pinyin,
195
+            wubi: this.form.wubi,
196
+            tube_color: this.form.tube_color,
197
+            team_type: this.form.team_type,
198
+            remark: this.form.remark,
240
           }
199
           }
241
-          return name
242
-        },
243
-        chagneInspection(id){
244
-           getProjectDetail(id).then(response=>{
245
-              if(response.data.state == 1){
246
-               var projectdetail = response.data.data.projecDetail
247
-               console.log("projectdetail",projectdetail)
248
-               this.tableData.push(projectdetail)
249
-              }
250
-           })
251
-        },
252
-       addProjectList(){
253
-          
254
-          for(let i=0;i<this.projectList.length;i++){
255
-            if(this.form.project_detail == this.projectList[i].id){
256
-                this.projectList[i].number = this.form.number
257
-                this.tableData.push(this.projectList[i])
258
-            }
259
-         }
260
-         console.log("33333",this.tableData)
261
-      
262
-         
263
-            const params = {
264
-              id:this.form.project_detail,
265
-              number:parseInt(this.form.number)
266
-            }
267
-           console.log("params",params)
268
-          addProjectList(params).then(response=>{
269
-             if(response.data.state == 1){
270
-               var projectList = response.data.data.projectList
271
-               var item = response.data.data.item
272
-               console.log("item22222",item)
273
-               this.itemList.push(item.id)
274
-               this.$message.success("保存成功")
275
-               this.form.project_detail = ""
276
-               this.form.number = ""
277
-            //    this.getlist()
278
-             }
279
-          })
280
-        },
281
-        DeleteProject(id,index){
282
-           this.$confirm("确认删除此项目吗?", "删除", {
283
-            confirmButtonText: "确 定",
284
-            cancelButtonText: "取 消",
285
-            type: "warning"
286
-         }).then(() => {
287
-          DeleteProject(id).then(response => {
200
+          let data = {
201
+            "info":this.tableData
202
+          }
203
+          saveTeam(data,params).then(response => {
288
             if (response.data.state == 1) {
204
             if (response.data.state == 1) {
289
-               this.tableData.splice(index, 1);
205
+              var projectTeam = response.data.data.projectTeam
206
+              console.log('projectTeam', projectTeam)
207
+              this.$message.success('保存成功')
208
+              this.visible = false
209
+              this.form.project_team = '',
210
+                this.form.price = '',
211
+                this.form.pinyin = '',
212
+                this.form.wubi = '',
213
+                this.form.tube_color = '',
214
+                this.form.team_type = '',
215
+                this.form.remark = ''
216
+              this.tableData = []
217
+              this.form.number = ''
218
+              this.$parent.getlist()
290
             } else {
219
             } else {
291
-             
220
+              this.$message.error('项目组套名称已存在!')
292
             }
221
             }
293
-          });
222
+          })
223
+        })
224
+      },
225
+      getlist() {
226
+        getAllProjectList().then(response => {
227
+          if (response.data.state == 1) {
228
+            var projectList = response.data.data.projectList
229
+            var goodInfos = response.data.data.good_info
230
+
231
+            for (let i = 0; i < projectList.length; i++) {
232
+              let obj = {
233
+                id: projectList[i].id,
234
+                statistical_classification: projectList[i].statistical_classification,
235
+                number: '1',
236
+                project_name: projectList[i].project_name,
237
+                unit: projectList[i].unit,
238
+                price: projectList[i].price,
239
+                type: 2
240
+              }
241
+              this.projectList.push(obj)
242
+
243
+            }
244
+
245
+            for (let i = 0; i < goodInfos.length; i++) {
246
+              let obj = {
247
+                id: goodInfos[i].id,
248
+                statistical_classification: goodInfos[i].statistical_classification,
249
+                number: '1',
250
+                project_name: goodInfos[i].good_name,
251
+                unit: goodInfos[i].good_unit,
252
+                price: goodInfos[i].retail_price,
253
+                type: 3
254
+              }
255
+              this.projectList.push(obj)
256
+            }
257
+
258
+            console.log(this.projectList)
259
+
260
+            // this.projectList = projectList
261
+            //    var hisprojectlist = response.data.data.hisprojectlist
262
+            //    console.log("hisprojectlist",hisprojectlist)
263
+            //    this.tableData = hisprojectlist
264
+          }
294
         })
265
         })
295
-        .catch(() => {});
266
+      },
267
+
268
+      getId(id) {
269
+        var name = ''
270
+        var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
271
+        console.log('2235', statistics_category)
272
+        for (let i = 0; i < statistics_category.length; i++) {
273
+          if (id == statistics_category[i].id) {
274
+            name = statistics_category[i].name
275
+          }
296
         }
276
         }
277
+        return name
278
+      },
279
+      chagneInspection(id) {
280
+        getProjectDetail(id).then(response => {
281
+          if (response.data.state == 1) {
282
+            var projectdetail = response.data.data.projecDetail
283
+            console.log('projectdetail', projectdetail)
284
+            this.tableData.push(projectdetail)
285
+          }
286
+        })
287
+      },
288
+      addProjectList() {
289
+        console.log(this.projectList)
290
+        for (let i = 0; i < this.projectList.length; i++) {
291
+          if (this.form.project_detail == this.projectList[i].id) {
292
+            this.projectList[i].number = this.form.number
293
+            this.projectList[i].number =  this.projectList[i].number.toString()
294
+            this.tableData.push(this.projectList[i])
295
+            this.form.project_detail = ""
296
+            this.form.number = ""
297
+          }
298
+        }
299
+        // console.log("33333",this.tableData)
300
+        //
301
+        //
302
+        //    const params = {
303
+        //      id:this.form.project_detail,
304
+        //      number:parseInt(this.form.number)
305
+        //    }
306
+        //   console.log("params",params)
307
+        //  addProjectList(params).then(response=>{
308
+        //     if(response.data.state == 1){
309
+        //       var projectList = response.data.data.projectList
310
+        //       var item = response.data.data.item
311
+        //       console.log("item22222",item)
312
+        //       this.itemList.push(item.id)
313
+        //       this.$message.success("保存成功")
314
+        //       this.form.project_detail = ""
315
+        //       this.form.number = ""
316
+        //    //    this.getlist()
317
+        //     }
318
+        //  })
319
+      },
320
+      DeleteProject(id, index) {
321
+        this.$confirm('确认删除此项目吗?', '删除', {
322
+          confirmButtonText: '确 定',
323
+          cancelButtonText: '取 消',
324
+          type: 'warning'
325
+        }).then(() => {
326
+            this.tableData.splice(index, 1)
327
+        })
328
+          .catch(() => {
329
+          })
330
+      }
297
     },
331
     },
298
-    created(){
332
+    created() {
299
       //获取所以的项目
333
       //获取所以的项目
300
       this.getlist()
334
       this.getlist()
301
-   
335
+
302
     }
336
     }
303
-}
337
+  }
304
 </script>
338
 </script>

+ 307 - 257
src/xt_pages/data/components/editInspection.vue View File

1
 <template>
1
 <template>
2
     <el-dialog
2
     <el-dialog
3
-        :title="formTitle"
4
-        width="900px"
5
-        :visible.sync="visible"
6
-        :before-close="_close"
3
+            :title="formTitle"
4
+            width="900px"
5
+            :visible.sync="visible"
6
+            :before-close="_close"
7
     >
7
     >
8
         <div>
8
         <div>
9
-            <el-form :model="form" :rules="rules" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
9
+            <el-form :model="form" :rules="rules" ref="form" label-width="100px"
10
+                     style="display: flex;flex-wrap: wrap;justify-content: space-between;">
10
                 <el-form-item label="组套名称 : " prop="project_team" style="width:100%">
11
                 <el-form-item label="组套名称 : " prop="project_team" style="width:100%">
11
                     <el-input v-model="form.project_team" placeholder="" maxlength="30"></el-input>
12
                     <el-input v-model="form.project_team" placeholder="" maxlength="30"></el-input>
12
                 </el-form-item>
13
                 </el-form-item>
19
                 <el-form-item label="五笔 : " prop="wubi" style="width:50%">
20
                 <el-form-item label="五笔 : " prop="wubi" style="width:50%">
20
                     <el-input v-model="form.wubi" placeholder="" maxlength="30"></el-input>
21
                     <el-input v-model="form.wubi" placeholder="" maxlength="30"></el-input>
21
                 </el-form-item>
22
                 </el-form-item>
22
-                
23
+
23
                 <el-form-item label="试管颜色 : " prop="name" style="width:50%">
24
                 <el-form-item label="试管颜色 : " prop="name" style="width:50%">
24
-                     <el-select v-model="form.tube_color" style="width:160px;" placeholder="请选择">
25
+                    <el-select v-model="form.tube_color" style="width:160px;" placeholder="请选择">
25
                         <el-option
26
                         <el-option
26
-                         v-for="(item,index) in getDictionaryDataConfig('system','tube_color')"
27
-                         :key="index"
28
-                         :label="item.name"
29
-                         :value="item.id">
27
+                                v-for="(item,index) in getDictionaryDataConfig('system','tube_color')"
28
+                                :key="index"
29
+                                :label="item.name"
30
+                                :value="item.id">
30
                         </el-option>
31
                         </el-option>
31
-                  </el-select>
32
+                    </el-select>
32
                 </el-form-item>
33
                 </el-form-item>
33
                 <el-form-item label="组套类型 : " prop="team_type" style="width:50%">
34
                 <el-form-item label="组套类型 : " prop="team_type" style="width:50%">
34
                     <el-select v-model="form.team_type" style="width:100%;" placeholder="请选择">
35
                     <el-select v-model="form.team_type" style="width:100%;" placeholder="请选择">
35
                         <el-option
36
                         <el-option
36
-                        v-for="item in options"
37
-                        :key="item.value"
38
-                        :label="item.label"
39
-                        :value="item.value">
37
+                                v-for="item in options"
38
+                                :key="item.value"
39
+                                :label="item.label"
40
+                                :value="item.value">
40
                         </el-option>
41
                         </el-option>
41
                     </el-select>
42
                     </el-select>
42
                 </el-form-item>
43
                 </el-form-item>
43
                 <el-form-item label="备注 : " prop="name" style="width:100%;">
44
                 <el-form-item label="备注 : " prop="name" style="width:100%;">
44
                     <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
45
                     <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
45
                 </el-form-item>
46
                 </el-form-item>
46
-                 <el-form-item label="组套明细" style="width:50%;">
47
+                <el-form-item label="组套明细" style="width:50%;">
47
                     <el-select v-model="form.project_detail" placeholder="请选择">
48
                     <el-select v-model="form.project_detail" placeholder="请选择">
48
                         <el-option
49
                         <el-option
49
-                        v-for="item in projectList"
50
-                        :key="item.id"
51
-                        :label="item.project_name"
52
-                        :value="item.id">
50
+                                v-for="item,index in projectList"
51
+                                :key="index"
52
+                                :label="item.project_name"
53
+                                :value="item.id">
53
                         </el-option>
54
                         </el-option>
54
                     </el-select>
55
                     </el-select>
55
 
56
 
56
-                    </el-form-item>
57
-                 <el-form-item label="数量" style="width:50%;"> 
58
-                      <div style="display:flex;"> 
59
-                         <el-input v-model="form.number" style="margin-right:10px;"></el-input>
60
-                         <el-button type="primary" @click="addProjectList">添加</el-button>
61
-                      </div>
62
-                  </el-form-item>
57
+                </el-form-item>
58
+                <el-form-item label="数量" style="width:50%;">
59
+                    <div style="display:flex;">
60
+                        <el-input v-model="form.number" style="margin-right:10px;"></el-input>
61
+                        <el-button type="primary" @click="addProjectList">添加</el-button>
62
+                    </div>
63
+                </el-form-item>
63
             </el-form>
64
             </el-form>
64
             <el-form>
65
             <el-form>
65
-                <el-table :data="tableData" border  style="100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row ref="tab">
66
+                <el-table :data="tableData" border style="100%" :row-style="{ color: '#303133' }"
67
+                          :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
68
+                          highlight-current-row ref="tab">
66
                     <el-table-column align="center" prop="name" label="分类" width="120">
69
                     <el-table-column align="center" prop="name" label="分类" width="120">
67
-                        <template slot-scope="scope">{{getId(scope.row.statistical_classification)}}</template>
70
+                        <template slot-scope="scope">
71
+                            <div>{{scope.row.type == 2?getId(scope.row.statistical_classification):'耗材'}}</div>
72
+                        </template>
68
                     </el-table-column>
73
                     </el-table-column>
69
                     <el-table-column align="center" prop="name" label="组套明细" width="120">
74
                     <el-table-column align="center" prop="name" label="组套明细" width="120">
70
                         <template slot-scope="scope">{{scope.row.project_name}}</template>
75
                         <template slot-scope="scope">{{scope.row.project_name}}</template>
71
                     </el-table-column>
76
                     </el-table-column>
72
-                     <el-table-column align="center" prop="name" label="数量" width="120">
77
+                    <el-table-column align="center" prop="name" label="数量" width="120">
73
                         <template slot-scope="scope">{{scope.row.number}}</template>
78
                         <template slot-scope="scope">{{scope.row.number}}</template>
74
                     </el-table-column>
79
                     </el-table-column>
75
-                     <el-table-column align="center" prop="name" label="单位" width="120">
80
+                    <el-table-column align="center" prop="name" label="单位" width="120">
76
                         <template slot-scope="scope">{{scope.row.unit}}</template>
81
                         <template slot-scope="scope">{{scope.row.unit}}</template>
77
                     </el-table-column>
82
                     </el-table-column>
78
                     <el-table-column align="center" prop="name" label="单价" width="120">
83
                     <el-table-column align="center" prop="name" label="单价" width="120">
80
                     </el-table-column>
85
                     </el-table-column>
81
                     <el-table-column align="center" prop="name" label="操作">
86
                     <el-table-column align="center" prop="name" label="操作">
82
                         <template slot-scope="scope">
87
                         <template slot-scope="scope">
83
-                          <el-tooltip
84
-                            class="item"
85
-                            effect="dark"
86
-                            content="删除"
87
-                            placement="top"
88
+                            <el-tooltip
89
+                                    class="item"
90
+                                    effect="dark"
91
+                                    content="删除"
92
+                                    placement="top"
88
                             >
93
                             >
89
-                            <el-button
90
-                                type="danger"
91
-                                icon="el-icon-delete"
92
-                                size="small"
93
-                                @click="DeleteProject(scope.row.id,scope.$index)"
94
-                            ></el-button>
94
+                                <el-button
95
+                                        type="danger"
96
+                                        icon="el-icon-delete"
97
+                                        size="small"
98
+                                        @click="DeleteProject(scope.row.m_id,scope.$index)"
99
+                                ></el-button>
95
                             </el-tooltip>
100
                             </el-tooltip>
96
                         </template>
101
                         </template>
97
                     </el-table-column>
102
                     </el-table-column>
102
 
107
 
103
         <div slot="footer" class="dialog-footer">
108
         <div slot="footer" class="dialog-footer">
104
             <el-button @click="hide">取 消</el-button>
109
             <el-button @click="hide">取 消</el-button>
105
-            <el-button type="primary"  @click="submitAction('form')">保 存</el-button>
110
+            <el-button type="primary" @click="submitAction('form')">保 存</el-button>
106
         </div>
111
         </div>
107
-  </el-dialog>
112
+    </el-dialog>
108
 </template>
113
 </template>
109
 
114
 
110
 <script>
115
 <script>
111
-import { getProjectTeamDetail,updatedProjectTeam,getAllProjectList,addProjectList,DeleteProject } from "@/api/project/project"
112
-import { getDictionaryDataConfig,getDataConfig} from "@/utils/data";
113
-export default {
114
-    data(){
115
-        return{
116
-            visible:false,
117
-            formTitle:'',
118
-            activeName:'first',
119
-            form:{
120
-              id:"",
121
-              project_team:'',
122
-              price:"",
123
-              pinyin:"",
124
-              wubi:"",
125
-              tube_color:"",
126
-              team_type:"",
127
-              remark:"",
128
-              project_detail:"",
129
-              number:"",
130
-              item_id:"",
131
-            },
132
-            options: [{
133
-            value: 1,
134
-            label: '是'
135
-            }, {
136
-            value: 2,
137
-            label: '否'
138
-            },],
139
-            value: '',
140
-            radio:'1',
141
-            rules: {
142
-              project_team: [{ required: true, message: '请填写组套名称', trigger: 'blur'  }],
143
-            //   pinyin: [{ required: true, message: '请填写拼音' , trigger: 'blur' }],
144
-            //   wubi: [{ required: true, message: '请填写五笔' , trigger: 'blur' }],
145
-              price: [{ required: true, message: '请填写价格', trigger: 'change' }],
146
-              team_type: [{ required:true,message:'请填写组套类型',trigger:'change' }]
147
-           },
148
-           tableData:[],
149
-           item_id:[],
150
-           projectList:[]
151
-        }
152
-    },
153
-    methods:{
154
-         getDataConfig(module, filed_name){
155
-            return getDataConfig(module, filed_name)
156
-        },
157
-            getDictionaryDataConfig(module, filed_name) {
158
-            return getDictionaryDataConfig(module, filed_name)
159
-        },
160
-        _close: function(done) {
161
-            done()
162
-        },
163
-        clear: function() {
164
-            this.form.id = 0;
165
-            this.form.name = "";
166
-            this.form.intro = "";
167
-        },
168
-        show(id) {
169
-         this.visible = true
170
-         this.formTitle = '编辑'
171
-         this.getProjectTeamDetail(id) 
116
+  import {
117
+    editTeam
118
+  } from '@/api/his/his'
119
+  import {
120
+    addProjectList,
121
+    DeleteProject,
122
+    getAllProjectList,
123
+    getProjectTeamDetail,
124
+    updatedProjectTeam
125
+  } from '@/api/project/project'
126
+  import { getDataConfig, getDictionaryDataConfig } from '@/utils/data'
127
+
128
+  export default {
129
+    data() {
130
+      return {
131
+        visible: false,
132
+        formTitle: '',
133
+        activeName: 'first',
134
+        form: {
135
+          id: '',
136
+          project_team: '',
137
+          price: '',
138
+          pinyin: '',
139
+          wubi: '',
140
+          tube_color: '',
141
+          team_type: '',
142
+          remark: '',
143
+          project_detail: '',
144
+          number: '',
145
+          item_id: ''
172
         },
146
         },
173
-        hide() {
174
-    
175
-            this.visible = false
147
+        options: [{
148
+          value: 1,
149
+          label: '是'
150
+        }, {
151
+          value: 2,
152
+          label: '否'
153
+        }],
154
+        value: '',
155
+        radio: '1',
156
+        rules: {
157
+          project_team: [{ required: true, message: '请填写组套名称', trigger: 'blur' }],
158
+          //   pinyin: [{ required: true, message: '请填写拼音' , trigger: 'blur' }],
159
+          //   wubi: [{ required: true, message: '请填写五笔' , trigger: 'blur' }],
160
+          price: [{ required: true, message: '请填写价格', trigger: 'change' }],
161
+          team_type: [{ required: true, message: '请填写组套类型', trigger: 'change' }]
176
         },
162
         },
177
-        getProjectTeamDetail(id){
178
-           getProjectTeamDetail(id).then(response=>{
179
-              if(response.data.state == 1){
180
-                 var projectTeamDetail =  response.data.data.projectTeamDetail
181
-                 console.log("projectTeamDetail",projectTeamDetail)
182
-                 var str  = projectTeamDetail.project_id
183
-                 var arr = str.split(",")
184
-                 console.log("Arr33333",arr)
185
-                 var list = response.data.data.list
186
-                 console.log("list",list)
187
-                 var hisList = response.data.data.hisList
188
-                 console.log("histList",hisList)
189
-                 for(let i=0;i<list.length;i++){
190
-                   for(let j=0;j<hisList.length;j++){
191
-                       if(list[i].id == hisList[j].project_id){
192
-                           list[i].number = hisList[j].number
193
-                       }
194
-                   }
195
-                 }
196
-                
197
-                 var strArr = []
198
-                 for(let i=0;i<arr.length;i++){
199
-                   for(let j=0;j<list.length;j++){
200
-                      if((arr[i]== list[j].id)){
201
-                          strArr.push(list[j])
202
-                      }
203
-                   }
204
-                 }
205
-                 console.log("数据222222",strArr)
206
-                 this.tableData = strArr
207
-               
208
-               
209
-                 this.form.id = projectTeamDetail.id
210
-                 this.form.project_team = projectTeamDetail.project_team
211
-                 this.form.price = projectTeamDetail.price
212
-                 this.form.pinyin = projectTeamDetail.pinyin
213
-                 this.form.wubi  = projectTeamDetail.wubi
214
-                 this.form.tube_color = projectTeamDetail.tube_color
215
-                 if(projectTeamDetail.tube_color == 0){
216
-                    this.form.tube_color = ""
217
-                 }
218
-                 this.form.team_type = projectTeamDetail.team_type
219
-                 if(projectTeamDetail.team_type == 0){
220
-                    this.form.team_type = ""
221
-                 }     
222
-                 this.form.remark = projectTeamDetail.remark
223
-                 this.form.item_id = projectTeamDetail.item_id
224
-                //  console.log("project",projectTeamDetail)
163
+        tableData: [],
164
+        item_id: [],
165
+        projectList: []
166
+      }
167
+    },
168
+    methods: {
169
+      getDataConfig(module, filed_name) {
170
+        return getDataConfig(module, filed_name)
171
+      },
172
+      getDictionaryDataConfig(module, filed_name) {
173
+        return getDictionaryDataConfig(module, filed_name)
174
+      },
175
+      _close: function(done) {
176
+        done()
177
+      },
178
+      clear: function() {
179
+        this.form.id = 0
180
+        this.form.name = ''
181
+        this.form.intro = ''
182
+      },
183
+      show(id) {
184
+        this.visible = true
185
+        this.formTitle = '编辑'
186
+        this.getlist(id)
187
+        this.getProjectTeamDetail(id)
188
+
189
+      }, getlist(id) {
190
+
191
+        getAllProjectList().then(response => {
192
+          if (response.data.state == 1) {
193
+            console.log(id)
194
+            console.log('!~~~~')
195
+
196
+            var projectList = response.data.data.projectList
197
+            var goodInfos = response.data.data.good_info
198
+
199
+            for (let i = 0; i < projectList.length; i++) {
200
+              let obj = {
201
+                id: projectList[i].id,
202
+                statistical_classification: projectList[i].statistical_classification,
203
+                number: '1',
204
+                project_name: projectList[i].project_name,
205
+                unit: projectList[i].unit,
206
+                price: projectList[i].price,
207
+                type: 2,
208
+                m_id: 0
225
               }
209
               }
226
-           }) 
227
-        },
228
-        submitAction(formName){
229
-           this.$refs[formName].validate((valid)=>{
230
-               var arr = []
231
-                for(let i=0;i<this.tableData.length;i++){
232
-                    arr.push(this.tableData[i].id)
233
-                }
234
-             
235
-               var ids = arr.join(",")
236
-               var item_id = this.form.item_id + "," + this.item_id.join(",") 
237
-               console.log("item_id",item_id)
238
-               
239
-               if(valid){
240
-                var params = {
241
-                    id:this.form.id,
242
-                    project_team:this.form.project_team,
243
-                    price:this.form.price,
244
-                    pinyin:this.form.pinyin,
245
-                    wubi:this.form.wubi,
246
-                    tube_color:this.form.tube_color,
247
-                    team_type:this.form.team_type,
248
-                    remark:this.form.remark,
249
-                    ids:ids,
250
-                    item_id:item_id
251
-                }
252
-                // console.log("params",params)
253
-                 updatedProjectTeam(params).then(response=>{
254
-                   if(response.data.state == 1){
255
-                     var projectTeam = response.data.data.projectTeam
256
-                     this.$message.success("保存成功")
257
-                     this.visible = false
258
-                     this.$parent.getlist()
259
-                   }
260
-                 })
210
+              this.projectList.push(obj)
211
+
212
+            }
213
+
214
+            for (let i = 0; i < goodInfos.length; i++) {
215
+              let obj = {
216
+                id: goodInfos[i].id,
217
+                statistical_classification: goodInfos[i].statistical_classification,
218
+                number: '1',
219
+                project_name: goodInfos[i].good_name,
220
+                unit: goodInfos[i].good_unit,
221
+                price: goodInfos[i].retail_price,
222
+                type: 3,
223
+                m_id: 0
224
+
261
               }
225
               }
262
-           })  
263
-        
264
-        },
265
-       getlist(){
266
-          getAllProjectList().then(response=>{
267
-             if(response.data.state == 1){
268
-               var projectList = response.data.data.projectList
269
-               console.log('projectlist33333',projectList)
270
-               this.projectList = projectList
271
-               var hisprojectlist = response.data.data.hisprojectlist
272
-             console.log("hisprojectlist",hisprojectlist)
273
-            //    this.tableData = hisprojectlist
274
-             }
275
-          })   
276
-        },
277
-        getId(id){
278
-          console.log("id",id)
279
-          var name = ""
280
-          var statistics_category =  getDictionaryDataConfig('system','statistics_category') 
281
-          console.log("statics",statistics_category)
282
-          for(let i=0;i<statistics_category.length;i++){
283
-             if(id == statistics_category[i].id){
284
-                 name = statistics_category[i].name
285
-             }
226
+              this.projectList.push(obj)
227
+            }
228
+
286
           }
229
           }
287
-          return name
288
-        },
289
-       addProjectList(){
290
-           
291
-           console.log("表格",this.tableData)
292
-            const params = {
293
-              id:this.form.project_detail,
294
-              number:parseInt(this.form.number)
230
+        })
231
+      },
232
+
233
+      hide() {
234
+        this.visible = false
235
+      },
236
+      getProjectTeamDetail(id) {
237
+        getProjectTeamDetail(id).then(response => {
238
+          if (response.data.state == 1) {
239
+            this.tableData = []
240
+            var projectTeamDetail = response.data.data.projectTeamDetail
241
+            var hisList = response.data.data.hisList
242
+
243
+            console.log(this.projectList)
244
+            console.log(hisList)
245
+
246
+            for (let i = 0; i < hisList.length; i++) {
247
+
248
+              let obj = {
249
+                m_id: hisList[i].id,
250
+                id: hisList[i].project_id,
251
+                number: hisList[i].number,
252
+                type: hisList[i].type
253
+              }
254
+              if (hisList[i].type == 2) {
255
+                obj['statistical_classification'] = hisList[i].project.statistical_classification
256
+                obj['project_name'] = hisList[i].project.project_name
257
+                obj['unit'] = hisList[i].project.unit
258
+                obj['price'] = hisList[i].project.price
259
+
260
+              } else {
261
+                obj['project_name'] = hisList[i].good_info.good_name
262
+                obj['unit'] = hisList[i].good_info.good_unit
263
+                obj['price'] = hisList[i].good_info.retail_price
264
+              }
265
+              this.tableData.push(obj)
295
             }
266
             }
296
-           console.log("params",params)
297
-          addProjectList(params).then(response=>{
298
-             if(response.data.state == 1){
299
-               var projectList = response.data.data.projectList
300
-               projectList.number = parseInt(this.form.number)
301
-               this.tableData.push(projectList)
302
-               console.log("23333",this.tableData)
303
-               var item = response.data.data.item
304
-               this.item_id.push(item.id)
305
-               this.$message.success("保存成功")
306
-               this.form.project_detail = ""
307
-               this.form.number = ""
308
-               this.getlist()
309
-             }
310
-          })
311
-        },
312
-        DeleteProject(id,index){
267
+            this.form.id = projectTeamDetail.id
268
+            this.form.project_team = projectTeamDetail.project_team
269
+            this.form.price = projectTeamDetail.price
270
+            this.form.pinyin = projectTeamDetail.pinyin
271
+            this.form.wubi = projectTeamDetail.wubi
272
+            this.form.tube_color = projectTeamDetail.tube_color
273
+            if (projectTeamDetail.tube_color == 0) {
274
+              this.form.tube_color = ''
275
+            }
276
+            this.form.team_type = projectTeamDetail.team_type
277
+            if (projectTeamDetail.team_type == 0) {
278
+              this.form.team_type = ''
279
+            }
280
+            this.form.remark = projectTeamDetail.remark
281
+            // this.form.item_id = projectTeamDetail.item_id
282
+            //  console.log("project",projectTeamDetail)
283
+          }
284
+        })
285
+      },
286
+      submitAction(formName) {
287
+        this.$refs[formName].validate((valid) => {
288
+          var arr = []
289
+          for (let i = 0; i < this.tableData.length; i++) {
290
+            if (this.tableData[i].m_id == 0) {
291
+              arr.push(this.tableData[i])
292
+            }
293
+          }
313
 
294
 
314
-           this.$confirm("确认删除此项目吗?", "删除", {
315
-            confirmButtonText: "确 定",
316
-            cancelButtonText: "取 消",
317
-            type: "warning"
318
-         }).then(() => {
319
-          DeleteProject(id).then(response => {
320
-            if (response.data.state == 1) {
321
-               this.tableData.splice(index, 1);
322
-               
323
-            } else {
324
-             
295
+          if (valid) {
296
+            var params = {
297
+              id: this.form.id,
298
+              project_team: this.form.project_team,
299
+              price: this.form.price,
300
+              pinyin: this.form.pinyin,
301
+              wubi: this.form.wubi,
302
+              tube_color: this.form.tube_color,
303
+              team_type: this.form.team_type,
304
+              remark: this.form.remark
325
             }
305
             }
326
-          });
306
+            let data = {
307
+              'info': arr
308
+            }            // console.log("params",params)
309
+            editTeam(params, data).then(response => {
310
+              if (response.data.state == 1) {
311
+                // var projectTeam = response.data.data.projectTeam
312
+                this.$message.success('保存成功')
313
+                this.visible = false
314
+                // this.$parent.getlist()
315
+              }
316
+            })
317
+          }
327
         })
318
         })
328
-        .catch(() => {});
319
+
320
+      },
321
+      getId(id) {
322
+        console.log('id', id)
323
+        var name = ''
324
+        var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
325
+        console.log('statics', statistics_category)
326
+        for (let i = 0; i < statistics_category.length; i++) {
327
+          if (id == statistics_category[i].id) {
328
+            name = statistics_category[i].name
329
+          }
330
+        }
331
+        return name
332
+      },
333
+      addProjectList() {
334
+        for (let i = 0; i < this.projectList.length; i++) {
335
+          if (this.form.project_detail == this.projectList[i].id) {
336
+            this.projectList[i].number = this.form.number
337
+            this.projectList[i].number = this.projectList[i].number.toString()
338
+            this.tableData.push(this.projectList[i])
339
+            this.form.project_detail = ''
340
+            this.form.number = ''
341
+          }
329
         }
342
         }
343
+
344
+      },
345
+      DeleteProject(id, index) {
346
+
347
+        if (id == 0) {
348
+          this.$confirm('确认删除此项目吗?', '删除', {
349
+            confirmButtonText: '确 定',
350
+            cancelButtonText: '取 消',
351
+            type: 'warning'
352
+          }).then(() => {
353
+            this.tableData.splice(index, 1)
354
+
355
+          })
356
+            .catch(() => {
357
+            })
358
+
359
+        } else {
360
+          this.$confirm('确认删除此项目吗?', '删除', {
361
+            confirmButtonText: '确 定',
362
+            cancelButtonText: '取 消',
363
+            type: 'warning'
364
+          }).then(() => {
365
+            DeleteProject(id).then(response => {
366
+              if (response.data.state == 1) {
367
+                this.tableData.splice(index, 1)
368
+
369
+              } else {
370
+
371
+              }
372
+            })
373
+          })
374
+            .catch(() => {
375
+            })
376
+
377
+        }
378
+
379
+      }
330
     },
380
     },
331
-    created(){
332
-       this.getlist()   
381
+    created() {
382
+      this.getlist()
333
     }
383
     }
334
-}
384
+  }
335
 </script>
385
 </script>

+ 9 - 1
src/xt_pages/dialysis/batch_print/batch_print_order.vue View File

2049
 
2049
 
2050
 
2050
 
2051
           for (const index in this.records) {
2051
           for (const index in this.records) {
2052
+            for(const index2 in this.records[index].his_project){
2053
+              if(this.records[index].his_project[index2].type == 2){
2054
+                this.records[index].his_project[index2]['advice_name'] = this.records[index].his_project[index2].project.project_name
2055
+              }else if(this.records[index].his_project[index2].type == 3){
2056
+                this.records[index].his_project[index2]['advice_name'] =this.records[index].his_project[index2].good_info.good_name
2057
+              }
2058
+              this.records[index].his_project[index2]['advice_doctor'] = this.records[index].his_project[index2].doctor
2059
+            }
2052
             this.records[index].advices = this.records[index].advices.concat(this.records[index].his_advices)
2060
             this.records[index].advices = this.records[index].advices.concat(this.records[index].his_advices)
2061
+            this.records[index].advices = this.records[index].advices.concat(this.records[index].his_project)
2053
           }
2062
           }
2054
 
2063
 
2055
-
2056
           for (const recordIndex in this.records) {
2064
           for (const recordIndex in this.records) {
2057
             var dlegh = 0;
2065
             var dlegh = 0;
2058
             if (
2066
             if (

+ 14 - 9
src/xt_pages/hospitalStation/allListPrint.vue View File

168
 
168
 
169
         if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
169
         if (new_drug_ids.length == 0 && new_project_ids.length > 0) {
170
           for (let i = 0; i < new_project_ids.length; i++) {
170
           for (let i = 0; i < new_project_ids.length; i++) {
171
-            let obj = {};
172
-            let count = 0;
171
+            let obj = {}
172
+            let count = 0
173
             for (let a = 0; a < details.length; a++) {
173
             for (let a = 0; a < details.length; a++) {
174
               if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
174
               if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
175
-                obj['name'] = details[a].project.project.project_name;
176
-                obj['spec'] = '1';
177
-                obj['unit'] = details[a].project.project.unit;
178
-                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type);
179
-                obj['price'] = parseFloat(details[a].pric);
180
-                obj['is_total'] = 2;
175
+                if( details[a].project.type == 2){
176
+                  obj['name'] = details[a].project.project.project_name
177
+                }else if(details[a].project.type == 3){
178
+                  obj['name'] = details[a].project.good_info.good_name
179
+                }
180
+                obj['unit'] = details[a].project.unit
181
+
182
+                obj['spec'] = '1'
183
+                obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
184
+                obj['price'] = parseFloat(details[a].pric)
185
+                obj['is_total'] = 2
181
 
186
 
182
                 count = count + details[a].cnt
187
                 count = count + details[a].cnt
183
               }
188
               }
184
             }
189
             }
185
-            obj['count'] = count;
190
+            obj['count'] = count
186
             list.push(obj)
191
             list.push(obj)
187
           }
192
           }
188
         }
193
         }

+ 1 - 1
src/xt_pages/hospitalStation/components/ChargePrescriptionTable.vue View File

61
         <template slot-scope="scope">{{ scope.row.project_name }}</template>
61
         <template slot-scope="scope">{{ scope.row.project_name }}</template>
62
       </el-table-column>
62
       </el-table-column>
63
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
63
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
64
-        <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
64
+        <template slot-scope="scope">{{scope.row.type == 2 ?getGroup(scope.row.statistical_classification):'耗材'}}</template>
65
       </el-table-column>
65
       </el-table-column>
66
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
66
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
67
         <template slot-scope="scope">{{scope.row.single_dose}}{{scope.row.unit}}</template>
67
         <template slot-scope="scope">{{scope.row.single_dose}}{{scope.row.unit}}</template>

+ 52 - 33
src/xt_pages/hospitalStation/components/callPrescription.vue View File

1
 <template>
1
 <template>
2
   <el-dialog
2
   <el-dialog
3
-    :title="name"
4
-    :visible.sync="isLastOrNextVisible"
5
-    @close="hide"
6
-    width="1010px"
7
-    class="callPrescription"
8
-    :modal-append-to-body="false"
3
+          :title="name"
4
+          :visible.sync="isLastOrNextVisible"
5
+          @close="hide"
6
+          width="1010px"
7
+          class="callPrescription"
8
+          :modal-append-to-body="false"
9
   >
9
   >
10
     <el-date-picker
10
     <el-date-picker
11
-      v-model="start_time"
12
-      prefix-icon="el-icon-date"
13
-      @change="changeTime"
14
-      :editable="false"
15
-      style="width: 150px;"
16
-      type="date"
17
-      placeholder="选择日期时间"
18
-      align="right"
19
-      format="yyyy-MM-dd"
20
-      value-format="yyyy-MM-dd"
11
+            v-model="start_time"
12
+            prefix-icon="el-icon-date"
13
+            @change="changeTime"
14
+            :editable="false"
15
+            style="width: 150px;"
16
+            type="date"
17
+            placeholder="选择日期时间"
18
+            align="right"
19
+            format="yyyy-MM-dd"
20
+            value-format="yyyy-MM-dd"
21
     ></el-date-picker>
21
     ></el-date-picker>
22
     <span class>-</span>
22
     <span class>-</span>
23
     <el-date-picker
23
     <el-date-picker
24
-      v-model="end_time"
25
-      prefix-icon="el-icon-date"
26
-      @change="changeEndTime"
27
-      :editable="false"
28
-      style="width: 150px;"
29
-      type="date"
30
-      placeholder="选择日期时间"
31
-      align="right"
32
-      format="yyyy-MM-dd"
33
-      value-format="yyyy-MM-dd"
24
+            v-model="end_time"
25
+            prefix-icon="el-icon-date"
26
+            @change="changeEndTime"
27
+            :editable="false"
28
+            style="width: 150px;"
29
+            type="date"
30
+            placeholder="选择日期时间"
31
+            align="right"
32
+            format="yyyy-MM-dd"
33
+            value-format="yyyy-MM-dd"
34
     ></el-date-picker>
34
     ></el-date-picker>
35
 
35
 
36
 
36
 
93
             <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
93
             <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
94
             <el-table-column align="center" prop="project_name" width="160" label="名称">
94
             <el-table-column align="center" prop="project_name" width="160" label="名称">
95
               <template slot-scope="scope">
95
               <template slot-scope="scope">
96
-                <span>{{ scope.row.project.project_name }}</span>
96
+                <span>{{ scope.row.type == 2?scope.row.project.project_name:scope.row.good_info.good_name}}</span>
97
               </template>
97
               </template>
98
             </el-table-column>
98
             </el-table-column>
99
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
99
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
100
-              <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
100
+              <template slot-scope="scope">{{scope.row.type == 2 ?getGroup(scope.row.statistical_classification):"耗材"}}</template>
101
             </el-table-column>
101
             </el-table-column>
102
             <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
102
             <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
103
               <template slot-scope="scope">
103
               <template slot-scope="scope">
190
           start_time: this.start_time,
190
           start_time: this.start_time,
191
           end_time:this.end_time,
191
           end_time:this.end_time,
192
           p_type:1,
192
           p_type:1,
193
-
194
         };
193
         };
195
         this.GetCallHisPrescription(params)
194
         this.GetCallHisPrescription(params)
196
       },changeEndTime(){
195
       },changeEndTime(){
261
                 single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
260
                 single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
262
                 prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
261
                 prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
263
                 medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
262
                 medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
264
-                id:prescription.doctor_advice[b].drug_id
263
+                id:prescription.doctor_advice[b].drug_id,
264
+                drug:prescription.doctor_advice[b].drug,
265
               };
265
               };
266
               tempAdvice.push(obj)
266
               tempAdvice.push(obj)
267
 
267
 
268
             }
268
             }
269
 
269
 
270
 
270
 
271
+
271
             for (let b = 0; b < prescription.project.length; b++) {
272
             for (let b = 0; b < prescription.project.length; b++) {
272
               let obj = {
273
               let obj = {
273
                 id: 0,
274
                 id: 0,
281
                 total:prescription.project[b].count,
282
                 total:prescription.project[b].count,
282
                 price:prescription.project[b].price,
283
                 price:prescription.project[b].price,
283
                 remark:prescription.project[b].remark,
284
                 remark:prescription.project[b].remark,
284
-                medical_code:prescription.project[b].project.medical_code,
285
+                unit: prescription.project[b].unit,
286
+                type: prescription.project[b].type,
287
+
288
+
289
+                // medical_code:prescription.project[b].project.medical_code,
285
               };
290
               };
291
+              console.log(prescription.project[b].type)
292
+              if(prescription.project[b].type == 2){
293
+
294
+                obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
295
+                obj['medical_code'] =  prescription.project[b].project.medical_code
296
+                obj['project_name'] =  prescription.project[b].project.project_name
297
+
298
+              }else if(prescription.project[b].type == 3){
299
+
300
+                obj['statistical_classification'] = ""
301
+                obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
302
+                obj['project_name'] =  prescription.project[b].good_info.good_name
303
+              }
304
+
286
               tempProject.push(obj)
305
               tempProject.push(obj)
287
             }
306
             }
288
             let obj = {
307
             let obj = {
347
 </script>
366
 </script>
348
 
367
 
349
 <style lang="scss">
368
 <style lang="scss">
350
-.callPrescription{
369
+  .callPrescription{
351
   .el-dialog__body{
370
   .el-dialog__body{
352
     padding:0px 20px 30px;
371
     padding:0px 20px 30px;
353
   }
372
   }
355
     margin-top: 10px;
374
     margin-top: 10px;
356
     font-size: 14px;
375
     font-size: 14px;
357
   }
376
   }
358
-}
377
+  }
359
 </style>
378
 </style>

+ 180 - 38
src/xt_pages/hospitalStation/components/deskPrescription.vue View File

577
       }
577
       }
578
     },
578
     },
579
     methods: {
579
     methods: {
580
-
581
       changeClass(id) {
580
       changeClass(id) {
582
         this.tabProject = [];
581
         this.tabProject = [];
583
         if (id == 0) {
582
         if (id == 0) {
591
         }
590
         }
592
       },
591
       },
593
       setMonthPrescription(month_prescriptions) {
592
       setMonthPrescription(month_prescriptions) {
593
+
594
+
595
+
594
         this.month_prescriptions = [];
596
         this.month_prescriptions = [];
595
 
597
 
596
         let drug_month_prescriptions = {
598
         let drug_month_prescriptions = {
663
           return cur
665
           return cur
664
         }, []); // 设置cur默认类型为数组,并且初始值为空的数组
666
         }, []); // 设置cur默认类型为数组,并且初始值为空的数组
665
 
667
 
666
-        console.log(drug_ids);
667
-        console.log(project_ids);
668
-        console.log(additions_ids);
669
-
670
-        console.log(additions_ids);
671
-
672
         let drugs = [];
668
         let drugs = [];
673
         let projects = [];
669
         let projects = [];
674
         let additions = [];
670
         let additions = [];
689
               obj['id'] = drug_month_prescriptions.advices[a].drug_id;
685
               obj['id'] = drug_month_prescriptions.advices[a].drug_id;
690
               // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
686
               // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
691
               obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price);
687
               obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price);
692
-              count = count + drug_month_prescriptions.advices[a].prescribing_number
688
+              obj['drug'] = drug_month_prescriptions.advices[a].drug;
689
+
690
+
691
+                      count = count + drug_month_prescriptions.advices[a].prescribing_number
693
 
692
 
694
             }
693
             }
695
           }
694
           }
702
           let count = 0;
701
           let count = 0;
703
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
702
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
704
             if (project_ids[i].price == project_month_prescriptions.project[a].price) {
703
             if (project_ids[i].price == project_month_prescriptions.project[a].price) {
705
-              obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
706
-              obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification;
704
+              // obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
705
+              // obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification;
707
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose;
706
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose;
708
               obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way;
707
               obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way;
709
               obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency;
708
               obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency;
710
               obj['number_days'] = project_month_prescriptions.project[a].day;
709
               obj['number_days'] = project_month_prescriptions.project[a].day;
711
-              obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code;
710
+              // obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code;
712
               obj['unit'] = project_month_prescriptions.project[a].unit;
711
               obj['unit'] = project_month_prescriptions.project[a].unit;
713
               obj['project_id'] = project_month_prescriptions.project[a].project_id;
712
               obj['project_id'] = project_month_prescriptions.project[a].project_id;
714
               count = count + project_month_prescriptions.project[a].count;
713
               count = count + project_month_prescriptions.project[a].count;
715
               // price = price + project_month_prescriptions.project[a].price
714
               // price = price + project_month_prescriptions.project[a].price
716
               obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
715
               obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
717
 
716
 
717
+
718
+              if (project_month_prescriptions.project[a].type == 2) {
719
+                console.log("~~~~~~~????????")
720
+
721
+                obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
722
+                obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
723
+                obj['project_name'] = project_month_prescriptions.project[a].project.project_name
724
+
725
+              } else if (project_month_prescriptions.project[a].type == 3) {
726
+                console.log("~~~~~~~????????2222222")
727
+
728
+                obj['statistical_classification'] = ''
729
+                obj['medical_code'] = project_month_prescriptions.project[a].good_info.medical_insurance_number
730
+                obj['project_name'] = project_month_prescriptions.project[a].good_info.good_name
731
+              }
732
+
718
             }
733
             }
719
           }
734
           }
720
           obj['total'] = count;
735
           obj['total'] = count;
767
 
782
 
768
         this.curMonthPrescriptions = this.month_prescriptions[0]
783
         this.curMonthPrescriptions = this.month_prescriptions[0]
769
 
784
 
785
+        console.log("~~~~~~~~~")
786
+
787
+        console.log(this.curMonthPrescriptions)
788
+        console.log("~~~~~~~~~")
789
+
790
+
770
       },
791
       },
771
 
792
 
772
       // setMonthPrescription(month_prescriptions) {
793
       // setMonthPrescription(month_prescriptions) {
999
                       single_dose_unit: prescription.advices[b].single_dose_unit,
1020
                       single_dose_unit: prescription.advices[b].single_dose_unit,
1000
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1021
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1001
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1022
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1002
-                      id: prescription.advices[b].drug_id
1023
+                      id: prescription.advices[b].drug_id,
1024
+                      drug:prescription.advices[b].drug,
1025
+
1026
+
1003
                     };
1027
                     };
1004
                     tempAdvice.push(obj)
1028
                     tempAdvice.push(obj)
1005
                   }
1029
                   }
1019
                       price: prescription.project[b].price,
1043
                       price: prescription.project[b].price,
1020
                       remark: prescription.project[b].remark,
1044
                       remark: prescription.project[b].remark,
1021
                       medical_code: prescription.project[b].project.medical_code,
1045
                       medical_code: prescription.project[b].project.medical_code,
1022
-                      unit: prescription.project[b].project.unit
1046
+                      unit: prescription.project[b].unit
1023
                     };
1047
                     };
1048
+                    if (prescription.project[b].type == 2) {
1049
+                      obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1050
+                      obj['medical_code'] = prescription.project[b].project.medical_code
1051
+                      obj['project_name'] = prescription.project[b].project.project_name
1052
+
1053
+                    } else if (prescription.project[b].type == 3) {
1054
+                      obj['statistical_classification'] = ''
1055
+                      obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1056
+                      obj['project_name'] = prescription.project[b].good_info.good_name
1057
+                    }
1024
                     tempProject.push(obj)
1058
                     tempProject.push(obj)
1025
                   }
1059
                   }
1026
 
1060
 
1104
                       single_dose_unit: prescription.advices[b].single_dose_unit,
1138
                       single_dose_unit: prescription.advices[b].single_dose_unit,
1105
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1139
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1106
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1140
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1107
-                      id: prescription.advices[b].drug_id
1141
+                      id: prescription.advices[b].drug_id,
1142
+                      drug:prescription.advices[b].drug,
1143
+
1108
                     };
1144
                     };
1109
                     tempAdvice.push(obj)
1145
                     tempAdvice.push(obj)
1110
                   }
1146
                   }
1124
                       price: prescription.project[b].price,
1160
                       price: prescription.project[b].price,
1125
                       remark: prescription.project[b].remark,
1161
                       remark: prescription.project[b].remark,
1126
                       medical_code: prescription.project[b].project.medical_code,
1162
                       medical_code: prescription.project[b].project.medical_code,
1127
-                      unit: prescription.project[b].project.unit
1163
+                      unit: prescription.project[b].unit
1128
                     };
1164
                     };
1165
+                    if (prescription.project[b].type == 2) {
1166
+                      obj['statistical_classification'] = prescription.project[b].project.statistical_classification
1167
+                      obj['medical_code'] = prescription.project[b].project.medical_code
1168
+                      obj['project_name'] = prescription.project[b].project.project_name
1169
+
1170
+                    } else if (prescription.project[b].type == 3) {
1171
+                      obj['statistical_classification'] = ''
1172
+                      obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
1173
+                      obj['project_name'] = prescription.project[b].good_info.good_name
1174
+                    }
1129
                     tempProject.push(obj)
1175
                     tempProject.push(obj)
1130
                   }
1176
                   }
1131
 
1177
 
2377
                   prescribing_number: temp[b].prescribing_number,
2423
                   prescribing_number: temp[b].prescribing_number,
2378
                   single_dose_unit: temp[b].min_unit,
2424
                   single_dose_unit: temp[b].min_unit,
2379
                   prescribing_number_unit: temp[b].max_unit,
2425
                   prescribing_number_unit: temp[b].max_unit,
2380
-                  medical_insurance_number: temp[b].medical_insurance_number
2426
+                  medical_insurance_number: temp[b].medical_insurance_number,
2427
+                  drug: temp[b],
2381
 
2428
 
2382
                 };
2429
                 };
2383
 
2430
 
2389
               this.curStatus = 1
2436
               this.curStatus = 1
2390
             }
2437
             }
2391
 
2438
 
2392
-           if(this.activeName == 2){
2393
-
2394
-              for(let i = 0; i<temp2.length;i++){
2395
-               for(let j=0;j<this.hisList.length;j++){
2396
-                   if(temp2[i].id == this.hisList[j].project_id){
2397
-                      temp2[i].total =  this.hisList[j].number
2398
-                   }
2399
-               }
2400
-              }
2401
-            }
2439
+           // if(this.activeName == 2){
2440
+           //
2441
+           //  //   for(let i = 0; i<temp2.length;i++){
2442
+           //  //    for(let j=0;j<this.hisList.length;j++){
2443
+           //  //        if(temp2[i].id == this.hisList[j].project_id){
2444
+           //  //           temp2[i].total =  this.hisList[j].number
2445
+           //  //        }
2446
+           //  //    }
2447
+           //  //   }
2448
+           //  // }
2402
 
2449
 
2403
 
2450
 
2404
             if (temp2.length > 0) {
2451
             if (temp2.length > 0) {
2405
-              console.log("temp2222222222",temp2);
2406
               for (let b = 0; b < temp2.length; b++) {
2452
               for (let b = 0; b < temp2.length; b++) {
2407
                 let obj = {
2453
                 let obj = {
2408
                   id: 0,
2454
                   id: 0,
2417
                   price: temp2[b].price,
2463
                   price: temp2[b].price,
2418
                   remark: '',
2464
                   remark: '',
2419
                   medical_code: temp2[b].medical_code,
2465
                   medical_code: temp2[b].medical_code,
2420
-                  unit: temp2[b].unit
2421
-                };
2466
+                  unit: temp2[b].unit,
2467
+                  type: temp2[b].type
2468
+                }
2422
                 if (obj.total == 0) {
2469
                 if (obj.total == 0) {
2423
                   obj.total = 1
2470
                   obj.total = 1
2424
                 }
2471
                 }
2472
+                if (obj.type == 3) {
2473
+                  obj.single_dose = 1
2474
+                }
2425
                 this.prescriptions[i].project.push(obj)
2475
                 this.prescriptions[i].project.push(obj)
2426
               }
2476
               }
2427
               this.curStatus = 2
2477
               this.curStatus = 2
2428
             }
2478
             }
2429
 
2479
 
2430
             this.curPrescriptions = this.prescriptions[i];
2480
             this.curPrescriptions = this.prescriptions[i];
2431
-            console.log("~~~~~~~~~");
2432
-            console.log("~~~~~~~~~");
2433
 
2481
 
2434
             this.$refs.multipleTable.clearSelection();
2482
             this.$refs.multipleTable.clearSelection();
2435
             this.$refs.tables.clearSelection()
2483
             this.$refs.tables.clearSelection()
2449
       getlist() {
2497
       getlist() {
2450
         getHisProject().then(response => {
2498
         getHisProject().then(response => {
2451
           if (response.data.state == 1) {
2499
           if (response.data.state == 1) {
2452
-            var project = response.data.data.project;
2453
-            this.tabProject = project;
2454
-            this.allProject = project
2500
+            var project = response.data.data.project
2501
+            for (let i = 0; i < project.length; i++) {
2502
+              let obj = {
2503
+                id: project[i].id,
2504
+                project_name: project[i].project_name,
2505
+                statistical_classification: project[i].statistical_classification,
2506
+                single_dose: project[i].single_dose,
2507
+                delivery_way: project[i].delivery_way,
2508
+                execution_frequency: project[i].execution_frequency,
2509
+                number_days: project[i].number_days,
2510
+                price: project[i].price,
2511
+                medical_code: project[i].medical_code,
2512
+                unit: project[i].unit,
2513
+                type: 2
2514
+              }
2515
+
2516
+              this.tabProject.push(obj)
2517
+            }
2518
+
2519
+            var good_info = response.data.data.good_info
2520
+
2521
+            for (let i = 0; i < good_info.length; i++) {
2522
+              let obj = {
2523
+                id: good_info[i].id,
2524
+                project_name: good_info[i].good_name,
2525
+                statistical_classification: 0,
2526
+                single_dose: 1,
2527
+                delivery_way: '',
2528
+                execution_frequency: '',
2529
+                number_days: 1,
2530
+                price: good_info[i].retail_price,
2531
+                medical_code: good_info[i].medical_insurance_number,
2532
+                unit: this.getGoodUnit(good_info[i].good_unit),
2533
+                type: 3
2534
+              }
2535
+              this.tabProject.push(obj)
2536
+            }
2537
+
2538
+            this.allProject = this.tabProject
2455
 
2539
 
2456
           }
2540
           }
2457
         })
2541
         })
2542
+
2458
       }, deepClone(source) {
2543
       }, deepClone(source) {
2459
         if (!source && typeof source !== 'object') {
2544
         if (!source && typeof source !== 'object') {
2460
           throw new Error('error arguments', 'shallowClone')
2545
           throw new Error('error arguments', 'shallowClone')
2477
             this.tabPrjectTeam = team
2562
             this.tabPrjectTeam = team
2478
           }
2563
           }
2479
         })
2564
         })
2565
+      }, getGoodUnit(id) {
2566
+        var goodUnit = this.$store.getters.good_unit
2567
+        for (let i = 0; i < goodUnit.length; i++) {
2568
+          if (goodUnit[i].id == id) {
2569
+            return goodUnit[i].name
2570
+          }
2571
+        }
2480
       },
2572
       },
2481
       selectTeam(row) {
2573
       selectTeam(row) {
2482
         console.log("row",row);
2574
         console.log("row",row);
2483
         var arr = [];
2575
         var arr = [];
2484
         for (let i = 0; i < row.length; i++) {
2576
         for (let i = 0; i < row.length; i++) {
2485
-          arr.push(row[i].project_id)
2577
+          arr.push(row[i].item_id)
2486
         }
2578
         }
2487
         var ids = arr.join(',');
2579
         var ids = arr.join(',');
2488
         var strArr = ids.split(',');
2580
         var strArr = ids.split(',');
2507
         };
2599
         };
2508
         getPojectListById(params).then(response => {
2600
         getPojectListById(params).then(response => {
2509
           if (response.data.state == 1) {
2601
           if (response.data.state == 1) {
2510
-            var project = response.data.data.project;
2511
-            this.teamList = [];
2512
-            this.teamList = project
2602
+            this.teamList = []
2603
+            var project = response.data.data.project
2604
+            for (let i = 0; i < project.length; i++) {
2605
+              if (project[i].type == 2) {
2606
+
2607
+                let obj = {
2608
+                  id: project[i].project_id,
2609
+                  project_name: project[i].project.project_name,
2610
+                  statistical_classification: project[i].project.statistical_classification,
2611
+                  single_dose: project[i].project.single_dose,
2612
+                  delivery_way: project[i].project.delivery_way,
2613
+                  execution_frequency: project[i].project.execution_frequency,
2614
+                  number_days: project[i].project.number_days,
2615
+                  total: project[i].number,
2616
+                  price: project[i].project.price,
2617
+                  remark: '',
2618
+                  medical_code: project[i].project.medical_code,
2619
+                  unit: project[i].project.unit,
2620
+                  type: project[i].type
2621
+                }
2622
+                if (obj.total == 0) {
2623
+                  obj.total = 1
2624
+                }
2625
+
2626
+                this.teamList.push(obj)
2627
+              } else if (project[i].type == 3) {
2628
+                let obj = {
2629
+                  id: project[i].project_id,
2630
+                  project_name: project[i].good_info.good_name,
2631
+                  statistical_classification: "",
2632
+                  single_dose: "",
2633
+                  delivery_way: "",
2634
+                  execution_frequency:"",
2635
+                  number_days:"",
2636
+                  total: project[i].number,
2637
+                  price: project[i].good_info.retail_price,
2638
+                  remark: '',
2639
+                  medical_code: project[i].good_info.medical_insurance_number,
2640
+                  unit: project[i].good_info.unit,
2641
+                  type: project[i].type
2642
+                }
2643
+                if (obj.total == 0) {
2644
+                  obj.total = 1
2645
+                }
2646
+                this.teamList.push(obj)
2647
+
2648
+                console.log( this.teamList)
2649
+
2650
+              }
2651
+            }
2652
+
2653
+
2513
           }
2654
           }
2514
         })
2655
         })
2656
+
2515
       }, changeDoctor(val) {
2657
       }, changeDoctor(val) {
2516
         for (let i = 0; i < this.doctors.length; i++) {
2658
         for (let i = 0; i < this.doctors.length; i++) {
2517
           if (this.doctors[i].admin_user_id == this.doctorValue) {
2659
           if (this.doctors[i].admin_user_id == this.doctorValue) {

+ 20 - 1
src/xt_pages/hospitalStation/components/inquiriesDetail.vue View File

295
                   medical_code: prescription.project[b].project.medical_code,
295
                   medical_code: prescription.project[b].project.medical_code,
296
                   unit:prescription.project[b].project.unit,
296
                   unit:prescription.project[b].project.unit,
297
                 };
297
                 };
298
+                if(prescription.project[b].type == 2){
299
+                  obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
300
+                  obj['medical_code'] =  prescription.project[b].project.medical_code
301
+                  obj['project_name'] =  prescription.project[b].project.project_name
302
+                  obj['type'] =  2
303
+
304
+
305
+
306
+                }else if(prescription.project[b].type == 3){
307
+                  obj['statistical_classification'] = ""
308
+                  obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
309
+                  obj['project_name'] =  prescription.project[b].good_info.good_name
310
+                  obj['type'] =  3
311
+
312
+                }
298
                 tempProject.push(obj)
313
                 tempProject.push(obj)
299
               }
314
               }
315
+
316
+              console.log(tempProject)
300
               let index = i + 1;
317
               let index = i + 1;
301
               let obj = {
318
               let obj = {
302
                 id: prescription.id,
319
                 id: prescription.id,
306
                 type: response.data.data.prescription[i].type
323
                 type: response.data.data.prescription[i].type
307
               };
324
               };
308
               this.prescriptions.push(obj);
325
               this.prescriptions.push(obj);
309
-              console.log(this.prescriptions);
310
 
326
 
311
               this.curPrescriptions = this.prescriptions[0]
327
               this.curPrescriptions = this.prescriptions[0]
328
+
329
+
330
+
312
             }
331
             }
313
           }
332
           }
314
         });
333
         });

+ 1 - 1
src/xt_pages/hospitalStation/components/newPrescriptionTable.vue View File

63
       </el-table-column>
63
       </el-table-column>
64
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
64
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
65
         <template slot-scope="scope">
65
         <template slot-scope="scope">
66
-          <div>{{getGroup(scope.row.statistical_classification)}}</div>
66
+          <div>{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</div>
67
         </template>
67
         </template>
68
       </el-table-column>
68
       </el-table-column>
69
       <el-table-column align="center" prop="single_dose" width="100" label="单次用量">
69
       <el-table-column align="center" prop="single_dose" width="100" label="单次用量">

+ 43 - 24
src/xt_pages/hospitalStation/components/nextOrLastPrescription.vue View File

1
 <template>
1
 <template>
2
   <el-dialog
2
   <el-dialog
3
-    :title="name"
4
-    :visible.sync="isLastOrNextVisible"
5
-    @close="hide"
6
-    width="1010px"
7
-    :modal-append-to-body="false"
8
-    class="isLastOrNext"
3
+          :title="name"
4
+          :visible.sync="isLastOrNextVisible"
5
+          @close="hide"
6
+          width="1010px"
7
+          :modal-append-to-body="false"
8
+          class="isLastOrNext"
9
   >
9
   >
10
     <div class="txsj" style="text-align:center;">
10
     <div class="txsj" style="text-align:center;">
11
       <el-button
11
       <el-button
12
-        round
12
+              round
13
 
13
 
14
-        @click="openLast(3)"
14
+              @click="openLast(3)"
15
       >上一方
15
       >上一方
16
       </el-button>
16
       </el-button>
17
 
17
 
18
       <el-button
18
       <el-button
19
-        round
20
-        @click="openNext(4)"
19
+              round
20
+              @click="openNext(4)"
21
       >下一方
21
       >下一方
22
       </el-button>
22
       </el-button>
23
     </div>
23
     </div>
39
 
39
 
40
             <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
40
             <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
41
               <template slot-scope="scope">
41
               <template slot-scope="scope">
42
-                  <div>{{scope.row.single_dose}}{{scope.row.single_dose_unit}}</div>
42
+                <div>{{scope.row.single_dose}}{{scope.row.single_dose_unit}}</div>
43
               </template>
43
               </template>
44
             </el-table-column>
44
             </el-table-column>
45
             <el-table-column align="center" prop="delivery_way" width="100" label="用法">
45
             <el-table-column align="center" prop="delivery_way" width="100" label="用法">
81
             <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
81
             <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
82
             <el-table-column align="center" prop="project_name" width="160" label="名称">
82
             <el-table-column align="center" prop="project_name" width="160" label="名称">
83
               <template slot-scope="scope">
83
               <template slot-scope="scope">
84
-                <span>{{ scope.row.project.project_name }}</span>
84
+                <span>{{ scope.row.type == 2 ?scope.row.project.project_name:scope.row.good_info.good_name}}</span>
85
               </template>
85
               </template>
86
             </el-table-column>
86
             </el-table-column>
87
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
87
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
88
-              <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
88
+              <template slot-scope="scope">{{ scope.row.type == 2 ?getGroup(scope.row.statistical_classification):"耗材"}}</template>
89
             </el-table-column>
89
             </el-table-column>
90
             <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
90
             <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
91
               <template slot-scope="scope">
91
               <template slot-scope="scope">
117
             </el-table-column>
117
             </el-table-column>
118
             <el-table-column align="center" prop="total" width="70" label="总量">
118
             <el-table-column align="center" prop="total" width="70" label="总量">
119
               <template slot-scope="scope">
119
               <template slot-scope="scope">
120
-                  <div>{{ scope.row.total }}{{scope.row.unit}}</div>
120
+                <div>{{ scope.row.total }}{{scope.row.unit}}</div>
121
               </template>
121
               </template>
122
             </el-table-column>
122
             </el-table-column>
123
             <el-table-column align="center" prop="name" width="60" label="单价">
123
             <el-table-column align="center" prop="name" width="60" label="单价">
165
         name:"",
165
         name:"",
166
         request_record_date:'',
166
         request_record_date:'',
167
         patient_id:0,
167
         patient_id:0,
168
-         allPrescription: [
168
+        allPrescription: [
169
           {
169
           {
170
             check_group: [],
170
             check_group: [],
171
             prescriptions: [
171
             prescriptions: [
235
       }
235
       }
236
     }, methods: {
236
     }, methods: {
237
       openLast(val) {
237
       openLast(val) {
238
-       if (val == 3) {
238
+        if (val == 3) {
239
           let params = {
239
           let params = {
240
             patient_id: this.patient_id,
240
             patient_id: this.patient_id,
241
             record_time: this.request_record_date,
241
             record_time: this.request_record_date,
242
-            type: 1
242
+            type: 1,
243
+            p_type:1,
243
           };
244
           };
244
 
245
 
245
           this.GetNextOrLastHisPrescription(params)
246
           this.GetNextOrLastHisPrescription(params)
251
           let params = {
252
           let params = {
252
             patient_id: this.patient_id,
253
             patient_id: this.patient_id,
253
             record_time: this.request_record_date,
254
             record_time: this.request_record_date,
254
-            type: 2
255
+            type: 2,
256
+            p_type:1,
257
+
255
           };
258
           };
256
           this.GetNextOrLastHisPrescription(params)
259
           this.GetNextOrLastHisPrescription(params)
257
         }
260
         }
314
                 single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
317
                 single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
315
                 prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
318
                 prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
316
                 medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
319
                 medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
317
-                id:prescription.doctor_advice[b].drug_id
320
+                id:prescription.doctor_advice[b].drug_id,
321
+                drug:prescription.doctor_advice[b].drug,
318
               };
322
               };
319
               tempAdvice.push(obj)
323
               tempAdvice.push(obj)
320
 
324
 
325
               let obj = {
329
               let obj = {
326
                 id: 0,
330
                 id: 0,
327
                 project_id: prescription.project[b].project_id,
331
                 project_id: prescription.project[b].project_id,
328
-                project_name: prescription.project[b].project.project_name,
329
-                statistical_classification: prescription.project[b].project.statistical_classification,
332
+                // project_name: prescription.project[b].project.project_name,
333
+                // statistical_classification: prescription.project[b].project.statistical_classification,
330
                 single_dose: prescription.project[b].single_dose,
334
                 single_dose: prescription.project[b].single_dose,
331
                 delivery_way: prescription.project[b].delivery_way,
335
                 delivery_way: prescription.project[b].delivery_way,
332
                 execution_frequency: prescription.project[b].execution_frequency,
336
                 execution_frequency: prescription.project[b].execution_frequency,
334
                 total:prescription.project[b].count.toString(),
338
                 total:prescription.project[b].count.toString(),
335
                 price:prescription.project[b].price,
339
                 price:prescription.project[b].price,
336
                 remark:prescription.project[b].remark,
340
                 remark:prescription.project[b].remark,
337
-                medical_code:prescription.project[b].project.medical_code,
341
+                unit: prescription.project[b].unit,
342
+                type: prescription.project[b].type,
343
+
344
+                // medical_code:prescription.project[b].project.medical_code,
338
               };
345
               };
346
+
347
+              if(prescription.project[b].type == 2){
348
+                obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
349
+                obj['medical_code'] =  prescription.project[b].project.medical_code
350
+                obj['project_name'] =  prescription.project[b].project.project_name
351
+
352
+              }else if(prescription.project[b].type == 3){
353
+                obj['statistical_classification'] = ""
354
+                obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
355
+                obj['project_name'] =  prescription.project[b].good_info.good_name
356
+              }
357
+
339
               tempProject.push(obj)
358
               tempProject.push(obj)
340
             }
359
             }
341
             let obj = {
360
             let obj = {
405
 </script>
424
 </script>
406
 
425
 
407
 <style lang="scss">
426
 <style lang="scss">
408
-.isLastOrNext{
427
+  .isLastOrNext{
409
   .el-dialog__body{
428
   .el-dialog__body{
410
     padding:0px 20px 30px;
429
     padding:0px 20px 30px;
411
   }
430
   }
413
     margin-top: 10px;
432
     margin-top: 10px;
414
     font-size: 14px;
433
     font-size: 14px;
415
   }
434
   }
416
-}
435
+  }
417
 </style>
436
 </style>

+ 13 - 12
src/xt_pages/hospitalStation/components/prescriptionTable.vue View File

75
         </template>
75
         </template>
76
       </el-table-column>
76
       </el-table-column>
77
     </el-table>
77
     </el-table>
78
-
79
     <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
78
     <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
80
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
79
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
81
-       <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
80
+      <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
82
       <el-table-column align="center" prop="project_name" label="名称">
81
       <el-table-column align="center" prop="project_name" label="名称">
83
         <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
82
         <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
84
       </el-table-column>
83
       </el-table-column>
85
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
84
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
86
-        <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
85
+        <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
87
       </el-table-column>
86
       </el-table-column>
88
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
87
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
89
         <template slot-scope="scope">
88
         <template slot-scope="scope">
95
       <el-table-column align="center" prop="delivery_way" width="80" label="用法">
94
       <el-table-column align="center" prop="delivery_way" width="80" label="用法">
96
         <template slot-scope="scope">
95
         <template slot-scope="scope">
97
           <el-autocomplete
96
           <el-autocomplete
98
-            style="width:100%;"
99
-            class="inline-input"
100
-            v-model="scope.row.delivery_way"
101
-            :fetch-suggestions="querySearch2"
102
-            placeholder="请输入内容"
97
+                  style="width:100%;"
98
+                  class="inline-input"
99
+                  v-model="scope.row.delivery_way"
100
+                  :fetch-suggestions="querySearch2"
101
+                  placeholder="请输入内容"
103
           ></el-autocomplete>
102
           ></el-autocomplete>
104
         </template>
103
         </template>
105
       </el-table-column>
104
       </el-table-column>
108
           <el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>
107
           <el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>
109
         </template>
108
         </template>
110
       </el-table-column>
109
       </el-table-column>
111
-      <el-table-column align="center" prop="number_days" width="50" label="天数">
110
+      <el-table-column align="center" prop="number_days" width="70" label="天数">
112
         <template slot-scope="scope">
111
         <template slot-scope="scope">
113
-          <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)" placeholder=""></el-input>
114
-          <div>{{'天'}}</div>
112
+          <div style="display:flex;align-items:center;">
113
+            <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)" placeholder=""></el-input>
114
+            <div>{{'天'}}</div>
115
+          </div>
115
         </template>
116
         </template>
116
       </el-table-column>
117
       </el-table-column>
117
       <el-table-column align="center" prop="total" width="70" label="总量">
118
       <el-table-column align="center" prop="total" width="70" label="总量">
132
       </el-table-column>
133
       </el-table-column>
133
       <el-table-column align="center" prop="name" width="50" label="备注">
134
       <el-table-column align="center" prop="name" width="50" label="备注">
134
         <template slot-scope="scope">
135
         <template slot-scope="scope">
135
-           <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
136
+          <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
136
         </template>
137
         </template>
137
       </el-table-column>
138
       </el-table-column>
138
       <el-table-column align="center" width="40" prop="name" label="操作">
139
       <el-table-column align="center" width="40" prop="name" label="操作">

+ 125 - 17
src/xt_pages/hospitalStation/doctorDesk.vue View File

463
               obj['id'] = drug_month_prescriptions.advices[a].drug_id;
463
               obj['id'] = drug_month_prescriptions.advices[a].drug_id;
464
               // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
464
               // obj['retail_price'] = obj['retail_price'] +  drug_month_prescriptions.advices[a].drug.retail_price
465
               obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price);
465
               obj['retail_price'] = parseFloat(drug_month_prescriptions.advices[a].price);
466
+              obj['drug'] = drug_month_prescriptions.advices[a].drug
467
+
466
               count = count + drug_month_prescriptions.advices[a].prescribing_number
468
               count = count + drug_month_prescriptions.advices[a].prescribing_number
467
 
469
 
468
             }
470
             }
476
           let count = 0;
478
           let count = 0;
477
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
479
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
478
             if (project_ids[i].price == project_month_prescriptions.project[a].price) {
480
             if (project_ids[i].price == project_month_prescriptions.project[a].price) {
481
+
482
+              if(project_month_prescriptions.project[a].type == 2){
483
+                obj['statistical_classification'] =  project_month_prescriptions.project[a].project.statistical_classification
484
+                obj['medical_code'] =  project_month_prescriptions.project[a].project.medical_code
485
+                obj['project_name'] =  project_month_prescriptions.project[a].project.project_name
486
+
487
+
488
+              }else if(project_month_prescriptions.project[a].type == 3){
489
+                obj['statistical_classification'] = ""
490
+                obj['medical_code'] =  project_month_prescriptions.project[a].good_info.medical_insurance_number
491
+                obj['project_name'] =  project_month_prescriptions.project[a].good_info.good_name
492
+
493
+              }
494
+              obj['type'] = project_month_prescriptions.project[a].type
495
+
479
               obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
496
               obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
480
               obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification;
497
               obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification;
481
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose;
498
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose;
776
             this.patientInfo = response.data.data.xt_info;
793
             this.patientInfo = response.data.data.xt_info;
777
             this.hisPatientInfo = response.data.data.his_info;
794
             this.hisPatientInfo = response.data.data.his_info;
778
             this.case_history = response.data.data.case_history;
795
             this.case_history = response.data.data.case_history;
779
-            console.log("病历222222",this.case_history);
780
             this.info = response.data.data.info;
796
             this.info = response.data.data.info;
781
             this.doctors = response.data.data.doctors;
797
             this.doctors = response.data.data.doctors;
782
             this.department = response.data.data.department;
798
             this.department = response.data.data.department;
833
             //处方相关
849
             //处方相关
834
             this.prescriptionList = response.data.data.prescription;
850
             this.prescriptionList = response.data.data.prescription;
835
 
851
 
852
+
853
+
854
+
836
             if (response.data.data.prescription.length > 0) {
855
             if (response.data.data.prescription.length > 0) {
837
               for (let i = 0; i < response.data.data.prescription.length; i++) {
856
               for (let i = 0; i < response.data.data.prescription.length; i++) {
838
                 var prescription = response.data.data.prescription[i];
857
                 var prescription = response.data.data.prescription[i];
856
                     single_dose_unit: prescription.advices[b].single_dose_unit,
875
                     single_dose_unit: prescription.advices[b].single_dose_unit,
857
                     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
876
                     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
858
                     medical_insurance_number: prescription.advices[b].med_list_codg,
877
                     medical_insurance_number: prescription.advices[b].med_list_codg,
859
-                    id: prescription.advices[b].drug_id
878
+                    id: prescription.advices[b].drug_id,
879
+                    drug:prescription.advices[b].drug,
860
                   };
880
                   };
861
                   tempAdvice.push(obj)
881
                   tempAdvice.push(obj)
862
                 }
882
                 }
878
                     remark: prescription.project[b].remark,
898
                     remark: prescription.project[b].remark,
879
                     medical_code: prescription.project[b].project.medical_code,
899
                     medical_code: prescription.project[b].project.medical_code,
880
                     unit: prescription.project[b].project.unit,
900
                     unit: prescription.project[b].project.unit,
901
+                    type: prescription.project[b].type
881
                   };
902
                   };
903
+
904
+                  if(prescription.project[b].type == 2){
905
+                    obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
906
+                    obj['medical_code'] =  prescription.project[b].project.medical_code
907
+                    obj['project_name'] =  prescription.project[b].project.project_name
908
+
909
+                  }else if(prescription.project[b].type == 3){
910
+                    obj['statistical_classification'] = ""
911
+                    obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
912
+                    obj['project_name'] =  prescription.project[b].good_info.good_name
913
+                  }
882
                   tempProject.push(obj)
914
                   tempProject.push(obj)
883
                 }
915
                 }
884
 
916
 
916
                 this.prescriptions.push(obj)
948
                 this.prescriptions.push(obj)
917
               }
949
               }
918
             } else {
950
             } else {
951
+
952
+
953
+
919
               let obj = {
954
               let obj = {
920
                 id: 0,
955
                 id: 0,
921
                 name: '处方' + 1,
956
                 name: '处方' + 1,
922
                 advices: [],
957
                 advices: [],
923
                 project: [],
958
                 project: [],
924
                 addition: [],
959
                 addition: [],
925
-                orderStatus: 0,
960
+                order_status: 0,
926
                 pre_time: nowTime,
961
                 pre_time: nowTime,
927
 
962
 
928
               };
963
               };
1046
                           single_dose_unit: prescription.advices[b].single_dose_unit,
1081
                           single_dose_unit: prescription.advices[b].single_dose_unit,
1047
                           prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1082
                           prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1048
                           medical_insurance_number: prescription.advices[b].med_list_codg,
1083
                           medical_insurance_number: prescription.advices[b].med_list_codg,
1049
-                          id: prescription.advices[b].drug_id
1084
+                          id: prescription.advices[b].drug_id,
1085
+                          drug:prescription.advices[b].drug,
1050
                         };
1086
                         };
1051
                         tempAdvice.push(obj)
1087
                         tempAdvice.push(obj)
1052
                       }
1088
                       }
1064
                           price: prescription.project[b].price,
1100
                           price: prescription.project[b].price,
1065
                           remark: prescription.project[b].remark,
1101
                           remark: prescription.project[b].remark,
1066
                           medical_code: prescription.project[b].project.medical_code,
1102
                           medical_code: prescription.project[b].project.medical_code,
1067
-                          unit: prescription.project[b].unit
1103
+                          unit: prescription.project[b].unit,
1104
+                          type: prescription.project[b].type,
1068
                         };
1105
                         };
1106
+                        if(prescription.project[b].type == 2){
1107
+                          obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
1108
+                          obj['medical_code'] =  prescription.project[b].project.medical_code
1109
+                          obj['project_name'] =  prescription.project[b].project.project_name
1110
+
1111
+                        }else if(prescription.project[b].type == 3){
1112
+                          obj['statistical_classification'] = ""
1113
+                          obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
1114
+                          obj['project_name'] =  prescription.project[b].good_info.good_name
1115
+                        }
1069
                         tempProject.push(obj)
1116
                         tempProject.push(obj)
1070
                       }
1117
                       }
1071
                       for (let b = 0; b < prescription.addition.length; b++) {
1118
                       for (let b = 0; b < prescription.addition.length; b++) {
1106
                       advices: [],
1153
                       advices: [],
1107
                       project: [],
1154
                       project: [],
1108
                       addition: [],
1155
                       addition: [],
1109
-                      orderStatus: 0,
1156
+                      order_status: 0,
1110
                       pre_time: nowTime,
1157
                       pre_time: nowTime,
1111
                     };
1158
                     };
1112
                     this.prescriptions.push(obj)
1159
                     this.prescriptions.push(obj)
1215
                           single_dose_unit: prescription.advices[b].single_dose_unit,
1262
                           single_dose_unit: prescription.advices[b].single_dose_unit,
1216
                           prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1263
                           prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1217
                           medical_insurance_number: prescription.advices[b].med_list_codg,
1264
                           medical_insurance_number: prescription.advices[b].med_list_codg,
1218
-                          id: prescription.advices[b].drug_id
1265
+                          id: prescription.advices[b].drug_id,
1266
+                          drug:prescription.advices[b].drug,
1267
+
1219
                         };
1268
                         };
1220
                         tempAdvice.push(obj)
1269
                         tempAdvice.push(obj)
1221
                       }
1270
                       }
1233
                           price: prescription.project[b].price,
1282
                           price: prescription.project[b].price,
1234
                           remark: prescription.project[b].remark,
1283
                           remark: prescription.project[b].remark,
1235
                           medical_code: prescription.project[b].project.medical_code,
1284
                           medical_code: prescription.project[b].project.medical_code,
1236
-                          unit: prescription.project[b].unit
1285
+                          unit: prescription.project[b].unit,
1286
+                          type:prescription.project[b].type,
1287
+
1237
                         };
1288
                         };
1289
+                        if(prescription.project[b].type == 2){
1290
+                          obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
1291
+                          obj['medical_code'] =  prescription.project[b].project.medical_code
1292
+                          obj['project_name'] =  prescription.project[b].project.project_name
1293
+
1294
+                        }else if(prescription.project[b].type == 3){
1295
+                          obj['statistical_classification'] = ""
1296
+                          obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
1297
+                          obj['project_name'] =  prescription.project[b].good_info.good_name
1298
+                        }
1299
+
1300
+
1238
                         tempProject.push(obj)
1301
                         tempProject.push(obj)
1239
                       }
1302
                       }
1240
                       for (let b = 0; b < prescription.addition.length; b++) {
1303
                       for (let b = 0; b < prescription.addition.length; b++) {
1275
                       advices: [],
1338
                       advices: [],
1276
                       project: [],
1339
                       project: [],
1277
                       addition: [],
1340
                       addition: [],
1278
-                      orderStatus: 0,
1341
+                      order_status: 0,
1279
                       pre_time: nowTime,
1342
                       pre_time: nowTime,
1280
                     };
1343
                     };
1281
                     this.prescriptions.push(obj)
1344
                     this.prescriptions.push(obj)
1385
                           single_dose_unit: prescription.advices[b].single_dose_unit,
1448
                           single_dose_unit: prescription.advices[b].single_dose_unit,
1386
                           prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1449
                           prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1387
                           medical_insurance_number: prescription.advices[b].med_list_codg,
1450
                           medical_insurance_number: prescription.advices[b].med_list_codg,
1388
-                          id: prescription.advices[b].drug_id
1451
+                          id: prescription.advices[b].drug_id,
1452
+                          drug:prescription.advices[b].drug,
1453
+
1389
                         };
1454
                         };
1390
                         tempAdvice.push(obj)
1455
                         tempAdvice.push(obj)
1391
                       }
1456
                       }
1403
                           price: prescription.project[b].price,
1468
                           price: prescription.project[b].price,
1404
                           remark: prescription.project[b].remark,
1469
                           remark: prescription.project[b].remark,
1405
                           medical_code: prescription.project[b].project.medical_code,
1470
                           medical_code: prescription.project[b].project.medical_code,
1406
-                          unit: prescription.project[b].unit
1471
+                          unit: prescription.project[b].unit,
1472
+                          type:prescription.project[b].type,
1473
+
1407
                         };
1474
                         };
1475
+                        if(prescription.project[b].type == 2){
1476
+                          obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
1477
+                          obj['medical_code'] =  prescription.project[b].project.medical_code
1478
+                          obj['project_name'] =  prescription.project[b].project.project_name
1479
+
1480
+                        }else if(prescription.project[b].type == 3){
1481
+                          obj['statistical_classification'] = ""
1482
+                          obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
1483
+                          obj['project_name'] =  prescription.project[b].good_info.good_name
1484
+                        }
1485
+
1408
                         tempProject.push(obj)
1486
                         tempProject.push(obj)
1409
                       }
1487
                       }
1410
                       for (let b = 0; b < prescription.addition.length; b++) {
1488
                       for (let b = 0; b < prescription.addition.length; b++) {
1445
                       advices: [],
1523
                       advices: [],
1446
                       project: [],
1524
                       project: [],
1447
                       addition: [],
1525
                       addition: [],
1448
-                      orderStatus: 0,
1526
+                      order_status: 0,
1449
                       pre_time: nowTime,
1527
                       pre_time: nowTime,
1450
                     };
1528
                     };
1451
                     this.prescriptions.push(obj)
1529
                     this.prescriptions.push(obj)
1607
                         single_dose_unit: prescription.advices[b].single_dose_unit,
1685
                         single_dose_unit: prescription.advices[b].single_dose_unit,
1608
                         prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1686
                         prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1609
                         medical_insurance_number: prescription.advices[b].med_list_codg,
1687
                         medical_insurance_number: prescription.advices[b].med_list_codg,
1610
-                        id: prescription.advices[b].drug_id
1688
+                        id: prescription.advices[b].drug_id,
1689
+                        drug:prescription.advices[b].drug,
1690
+
1611
                       };
1691
                       };
1612
                       tempAdvice.push(obj)
1692
                       tempAdvice.push(obj)
1613
                     }
1693
                     }
1625
                         price: prescription.project[b].price,
1705
                         price: prescription.project[b].price,
1626
                         remark: prescription.project[b].remark,
1706
                         remark: prescription.project[b].remark,
1627
                         medical_code: prescription.project[b].project.medical_code,
1707
                         medical_code: prescription.project[b].project.medical_code,
1628
-                        unit: prescription.project[b].unit
1708
+                        unit: prescription.project[b].unit,
1709
+                        type:prescription.project[b].type,
1710
+
1629
                       };
1711
                       };
1712
+                      if(prescription.project[b].type == 2){
1713
+                        obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
1714
+                        obj['medical_code'] =  prescription.project[b].project.medical_code
1715
+                        obj['project_name'] =  prescription.project[b].project.project_name
1716
+
1717
+                      }else if(prescription.project[b].type == 3){
1718
+                        obj['statistical_classification'] = ""
1719
+                        obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
1720
+                        obj['project_name'] =  prescription.project[b].good_info.good_name
1721
+                      }
1722
+
1630
                       tempProject.push(obj)
1723
                       tempProject.push(obj)
1631
                     }
1724
                     }
1632
                     for (let b = 0; b < prescription.addition.length; b++) {
1725
                     for (let b = 0; b < prescription.addition.length; b++) {
1669
                     advices: [],
1762
                     advices: [],
1670
                     project: [],
1763
                     project: [],
1671
                     addition: [],
1764
                     addition: [],
1672
-                    orderStatus: 0,
1765
+                    order_status: 0,
1673
                     pre_time: nowTime
1766
                     pre_time: nowTime
1674
 
1767
 
1675
                   };
1768
                   };
1782
                       single_dose_unit: prescription.advices[b].single_dose_unit,
1875
                       single_dose_unit: prescription.advices[b].single_dose_unit,
1783
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1876
                       prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1784
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1877
                       medical_insurance_number: prescription.advices[b].med_list_codg,
1785
-                      id: prescription.advices[b].drug_id
1878
+                      id: prescription.advices[b].drug_id,
1879
+                      drug:prescription.advices[b].drug,
1880
+
1786
                     };
1881
                     };
1787
                     tempAdvice.push(obj)
1882
                     tempAdvice.push(obj)
1788
                   }
1883
                   }
1800
                       price: prescription.project[b].price,
1895
                       price: prescription.project[b].price,
1801
                       remark: prescription.project[b].remark,
1896
                       remark: prescription.project[b].remark,
1802
                       medical_code: prescription.project[b].project.medical_code,
1897
                       medical_code: prescription.project[b].project.medical_code,
1898
+                      type:prescription.project[b].type,
1899
+
1803
                       unit: prescription.project[b].unit
1900
                       unit: prescription.project[b].unit
1804
                     };
1901
                     };
1902
+                    if(prescription.project[b].type == 2){
1903
+                      obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
1904
+                      obj['medical_code'] =  prescription.project[b].project.medical_code
1905
+                      obj['project_name'] =  prescription.project[b].project.project_name
1906
+
1907
+                    }else if(prescription.project[b].type == 3){
1908
+                      obj['statistical_classification'] = ""
1909
+                      obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
1910
+                      obj['project_name'] =  prescription.project[b].good_info.good_name
1911
+                    }
1912
+
1805
                     tempProject.push(obj)
1913
                     tempProject.push(obj)
1806
                   }
1914
                   }
1807
                   for (let b = 0; b < prescription.addition.length; b++) {
1915
                   for (let b = 0; b < prescription.addition.length; b++) {
1842
                   advices: [],
1950
                   advices: [],
1843
                   project: [],
1951
                   project: [],
1844
                   addition: [],
1952
                   addition: [],
1845
-                  orderStatus: 0,
1953
+                  order_status: 0,
1846
                   pre_time: nowTime,
1954
                   pre_time: nowTime,
1847
                 };
1955
                 };
1848
                 this.prescriptions.push(obj)
1956
                 this.prescriptions.push(obj)

+ 26 - 16
src/xt_pages/hospitalStation/listPrint.vue View File

51
       getInfo(order_id) {
51
       getInfo(order_id) {
52
         let params = {
52
         let params = {
53
           id: order_id
53
           id: order_id
54
-        };
54
+        }
55
         getHisOrderDetail(params).then(response => {
55
         getHisOrderDetail(params).then(response => {
56
           if (response.data.state == 0) {
56
           if (response.data.state == 0) {
57
-            this.$message.error(response.data.msg);
57
+            this.$message.error(response.data.msg)
58
             return false
58
             return false
59
           } else {
59
           } else {
60
-            this.order = response.data.data.order;
61
-            this.patient = response.data.data.patient;
62
-            console.log(this.patient);
63
-            this.admin = response.data.data.admin_info;
60
+            this.order = response.data.data.order
61
+            this.patient = response.data.data.patient
62
+            console.log(this.patient)
63
+            this.admin = response.data.data.admin_info
64
 
64
 
65
 
65
 
66
             for (let i = 0; i < response.data.data.order_info.length; i++) {
66
             for (let i = 0; i < response.data.data.order_info.length; i++) {
67
-              var infos = response.data.data.order_info[i];
67
+              var infos = response.data.data.order_info[i]
68
               let obj = {
68
               let obj = {
69
                 med_chrgitm_type: this.getType(infos.med_chrgitm_type),
69
                 med_chrgitm_type: this.getType(infos.med_chrgitm_type),
70
                 price: infos.pric,
70
                 price: infos.pric,
71
                 count: infos.cnt
71
                 count: infos.cnt
72
-              };
72
+              }
73
+              console.log(infos)
73
               if (infos.advice && infos.advice.id == 0 && infos.project && infos.project.id > 0) {
74
               if (infos.advice && infos.advice.id == 0 && infos.project && infos.project.id > 0) {
74
-                obj['p_time'] = this.getTimes(infos.project.prescription.ctime);
75
-                obj['name'] = infos.project.project.project_name;
76
-                obj['spec'] = 1;
77
-                obj['unit'] = infos.project.project.unit
75
+                obj['p_time'] = this.getTimes(infos.project.prescription.ctime)
76
+                if(infos.project.type == 2){
77
+                  obj['name'] = infos.project.project.project_name
78
+
79
+
80
+                }else if (infos.project.type == 3){
81
+
82
+                  obj['name'] = infos.project.good_info.good_name
83
+
84
+                }
85
+                obj['spec'] = 1
86
+                obj['unit'] = infos.project.unit
78
 
87
 
79
               }
88
               }
80
 
89
 
81
               if (infos.advice && infos.advice.id > 0 && infos.project && infos.project.id == 0) {
90
               if (infos.advice && infos.advice.id > 0 && infos.project && infos.project.id == 0) {
82
-                obj['p_time'] = this.getTimes(infos.advice.prescription.ctime);
83
-                obj['name'] = infos.advice.advice_name;
84
-                obj['spec'] = infos.advice.drug.drug_spec;
91
+                obj['p_time'] = this.getTimes(infos.advice.prescription.ctime)
92
+                obj['name'] = infos.advice.advice_name
93
+                obj['spec'] = infos.advice.drug.drug_spec
85
                 obj['unit'] = infos.advice.drug.max_unit
94
                 obj['unit'] = infos.advice.drug.max_unit
86
 
95
 
87
               }
96
               }
88
-              this.list.push(obj);
97
+              this.list.push(obj)
89
               this.list.sort(function(a, b) {
98
               this.list.sort(function(a, b) {
90
                 return b.p_time < a.p_time ? 1 : -1
99
                 return b.p_time < a.p_time ? 1 : -1
91
               })
100
               })
94
           }
103
           }
95
         })
104
         })
96
       },
105
       },
106
+
97
       getType(med_chrgitm_type) {
107
       getType(med_chrgitm_type) {
98
         switch (med_chrgitm_type) {
108
         switch (med_chrgitm_type) {
99
           case '01':
109
           case '01':

+ 7 - 1
src/xt_pages/hospitalStation/newStatementPrint.vue View File

147
         //       console.log("doctorporject",doctorPorject)
147
         //       console.log("doctorporject",doctorPorject)
148
         //     }
148
         //     }
149
         // })
149
         // })
150
+      },  getTimes(time) {
151
+        return uParseTime(time, '{y}-{m}-{d}')
150
       },
152
       },
151
       searchAction(){
153
       searchAction(){
152
 
154
 
221
                 that.info['treat_cost_total'] = response.data.data.treatCostTotal;
223
                 that.info['treat_cost_total'] = response.data.data.treatCostTotal;
222
                 that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal;
224
                 that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal;
223
                 that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal;
225
                 that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal;
224
-                console.log(this.info)
226
+
227
+                if(that.paramsObj.settle_type != 1){
228
+                  that.info.begndate = that.getTimes(that.paramsObj.start_time)
229
+                  that.info.enddate = that.getTimes(that.paramsObj.end_time)
230
+                }
225
               }
231
               }
226
             })
232
             })
227
             .catch(function (error) {
233
             .catch(function (error) {

+ 54 - 13
src/xt_pages/hospitalStation/outpatientChargesManagement.vue View File

1028
               }
1028
               }
1029
 
1029
 
1030
               for (let b = 0; b < prescription.project.length; b++) {
1030
               for (let b = 0; b < prescription.project.length; b++) {
1031
-                console.log(prescription.project[b].project.project_name);
1032
                 let obj = {
1031
                 let obj = {
1033
                   id: prescription.project[b].id,
1032
                   id: prescription.project[b].id,
1034
                   project_id: prescription.project[b].project.id,
1033
                   project_id: prescription.project[b].project.id,
1035
-                  project_name: prescription.project[b].project.project_name,
1036
-                  statistical_classification: prescription.project[b].project.statistical_classification,
1037
                   single_dose: prescription.project[b].single_dose,
1034
                   single_dose: prescription.project[b].single_dose,
1038
                   delivery_way: prescription.project[b].delivery_way,
1035
                   delivery_way: prescription.project[b].delivery_way,
1039
                   execution_frequency: prescription.project[b].execution_frequency,
1036
                   execution_frequency: prescription.project[b].execution_frequency,
1041
                   total: prescription.project[b].count.toString(),
1038
                   total: prescription.project[b].count.toString(),
1042
                   price: prescription.project[b].price,
1039
                   price: prescription.project[b].price,
1043
                   remark: prescription.project[b].remark,
1040
                   remark: prescription.project[b].remark,
1044
-                  medical_code: prescription.project[b].project.medical_code,
1045
-                  unit: prescription.project[b].unit
1041
+                  // medical_code: prescription.project[b].project.medical_code,
1042
+                  unit: prescription.project[b].unit,
1043
+                  type:prescription.project[b].type,
1044
+
1046
                 };
1045
                 };
1046
+                if(prescription.project[b].type == 2){
1047
+                  obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
1048
+                  obj['medical_code'] =  prescription.project[b].project.medical_code
1049
+                  obj['project_name'] =  prescription.project[b].project.project_name
1050
+
1051
+                }else if(prescription.project[b].type == 3){
1052
+                  obj['statistical_classification'] = ""
1053
+                  obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
1054
+                  obj['project_name'] =  prescription.project[b].good_info.good_name
1055
+                }
1056
+
1047
 
1057
 
1048
                 tempProject.push(obj)
1058
                 tempProject.push(obj)
1049
               }
1059
               }
2606
           let count = 0;
2616
           let count = 0;
2607
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
2617
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
2608
             if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
2618
             if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
2609
-              obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
2610
-              obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification;
2619
+
2620
+              if(project_month_prescriptions.project[a].type == 2){
2621
+                obj['statistical_classification'] =  project_month_prescriptions.project[a].project.statistical_classification
2622
+                obj['medical_code'] =  project_month_prescriptions.project[a].project.medical_code
2623
+                obj['project_name'] =  project_month_prescriptions.project[a].project.project_name
2624
+                obj['type'] = 2
2625
+
2626
+              }else if(project_month_prescriptions.project[a].type == 3){
2627
+                obj['statistical_classification'] = ""
2628
+                obj['medical_code'] =  project_month_prescriptions.project[a].good_info.medical_insurance_number
2629
+                obj['project_name'] =  project_month_prescriptions.project[a].good_info.good_name
2630
+                obj['type'] = 3
2631
+
2632
+              }
2633
+
2634
+
2635
+              // obj['project_name'] = project_month_prescriptions.project[a].project.project_name;
2636
+              // obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification;
2611
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose;
2637
               obj['single_dose'] = project_month_prescriptions.project[a].single_dose;
2612
               obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way;
2638
               obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way;
2613
               obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency;
2639
               obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency;
2614
               obj['number_days'] = project_month_prescriptions.project[a].day;
2640
               obj['number_days'] = project_month_prescriptions.project[a].day;
2615
-              obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code;
2641
+              // obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code;
2616
               obj['unit'] = project_month_prescriptions.project[a].unit;
2642
               obj['unit'] = project_month_prescriptions.project[a].unit;
2617
               obj['project_id'] = project_month_prescriptions.project[a].project_id;
2643
               obj['project_id'] = project_month_prescriptions.project[a].project_id;
2618
               count = count + project_month_prescriptions.project[a].count;
2644
               count = count + project_month_prescriptions.project[a].count;
2800
               }
2826
               }
2801
 
2827
 
2802
               for (let b = 0; b < prescription.project.length; b++) {
2828
               for (let b = 0; b < prescription.project.length; b++) {
2803
-                console.log(prescription.project[b].project.project_name);
2804
                 let obj = {
2829
                 let obj = {
2805
                   id: prescription.project[b].id,
2830
                   id: prescription.project[b].id,
2806
                   project_id: prescription.project[b].project.id,
2831
                   project_id: prescription.project[b].project.id,
2807
-                  project_name: prescription.project[b].project.project_name,
2808
-                  statistical_classification: prescription.project[b].project.statistical_classification,
2832
+                  // project_name: prescription.project[b].project.project_name,
2833
+                  // statistical_classification: prescription.project[b].project.statistical_classification,
2809
                   single_dose: prescription.project[b].single_dose,
2834
                   single_dose: prescription.project[b].single_dose,
2810
                   delivery_way: prescription.project[b].delivery_way,
2835
                   delivery_way: prescription.project[b].delivery_way,
2811
                   execution_frequency: prescription.project[b].execution_frequency,
2836
                   execution_frequency: prescription.project[b].execution_frequency,
2813
                   total: prescription.project[b].count.toString(),
2838
                   total: prescription.project[b].count.toString(),
2814
                   price: prescription.project[b].price,
2839
                   price: prescription.project[b].price,
2815
                   remark: prescription.project[b].remark,
2840
                   remark: prescription.project[b].remark,
2816
-                  medical_code: prescription.project[b].project.medical_code,
2817
-                  unit: prescription.project[b].project.unit
2841
+                  // medical_code: prescription.project[b].project.medical_code,
2842
+                  unit: prescription.project[b].project.unit,
2843
+                  type:prescription.project[b].type,
2844
+
2818
                 };
2845
                 };
2846
+
2847
+                if(prescription.project[b].type == 2){
2848
+                  obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
2849
+                  obj['medical_code'] =  prescription.project[b].project.medical_code
2850
+                  obj['project_name'] =  prescription.project[b].project.project_name
2851
+
2852
+                }else if(prescription.project[b].type == 3){
2853
+                  obj['statistical_classification'] = ""
2854
+                  obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
2855
+                  obj['project_name'] =  prescription.project[b].good_info.good_name
2856
+                }
2857
+
2858
+
2859
+
2819
                 tempProject.push(obj)
2860
                 tempProject.push(obj)
2820
               }
2861
               }
2821
 
2862
 

+ 7 - 2
src/xt_pages/hospitalStation/summary.vue View File

505
             order_id: row.id,
505
             order_id: row.id,
506
             patient_id: row.patient_id,
506
             patient_id: row.patient_id,
507
             record_time: this.getTimes(row.settle_accounts_date),
507
             record_time: this.getTimes(row.settle_accounts_date),
508
-            admin_user_id: this.$store.getters.xt_user.user.id
508
+            admin_user_id: this.$store.getters.xt_user.user.id,
509
+
510
+
509
           };
511
           };
510
           this.orderObj9504 = obj
512
           this.orderObj9504 = obj
511
         } else {
513
         } else {
512
           this.statementVisible = true;
514
           this.statementVisible = true;
513
           let obj = {
515
           let obj = {
514
-            order_id: row.id
516
+            order_id: row.id,
517
+            settle_type:row.settle_type,
518
+            start_time:row.settle_start_time,
519
+            end_time:row.settle_end_time,
515
           };
520
           };
516
           this.orderObj = obj
521
           this.orderObj = obj
517
         }
522
         }

+ 294 - 284
src/xt_pages/hospitalStation/summaryDetail.vue View File

3
         <div class="position">
3
         <div class="position">
4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
4
             <bread-crumb :crumbs='crumbs'></bread-crumb>
5
         </div>
5
         </div>
6
-      <el-popover
7
-        placement="bottom"
8
-        width="210"
9
-        trigger="click">
10
-        <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
11
-        <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
12
-        <el-button  slot="reference" style="margin:10px 10px;float: right" type="primary" size="small" >打印</el-button>
13
-
14
-      </el-popover>
6
+        <el-popover
7
+                placement="bottom"
8
+                width="210"
9
+                trigger="click">
10
+            <el-button size="small" ref="button_two" @click="open(1)">打印清单</el-button>
11
+            <el-button size="small" ref="button_six" @click="open(2)">打印汇总</el-button>
12
+            <el-button  slot="reference" style="margin:10px 10px;float: right" type="primary" size="small" >打印</el-button>
13
+
14
+        </el-popover>
15
         <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
15
         <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
16
             <div class="mainCenter">
16
             <div class="mainCenter">
17
                 <div class="centerLeft">
17
                 <div class="centerLeft">
18
                     <div class="tabsBox">
18
                     <div class="tabsBox">
19
-                      <el-table  :data="tableData" border style="width: 100%;"
20
-                                :row-style="{ color: '#303133' }"
21
-                                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
22
-
23
-                        <el-table-column align="center" prop="project_name" label="名称">
24
-                          <template slot-scope="scope">{{ scope.row.name }}</template>
25
-                        </el-table-column>
26
-
27
-                        <el-table-column align="center" prop="project_name" label="分类" width="100">
28
-                          <template slot-scope="scope">{{ scope.row.type == 1?'药品':'项目' }}</template>
29
-                        </el-table-column>
30
-
31
-
32
-                        <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
33
-                          <template slot-scope="scope">{{scope.row.single_dose}}&nbsp;&nbsp;{{scope.row.single_dose_unit}}</template>
34
-
35
-                        </el-table-column>
36
-                        <el-table-column align="center" prop="delivery_way" width="90" label="用法">
37
-                          <template slot-scope="scope">
38
-                            <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
39
-                            {{scope.row.delivery_way}}
40
-
41
-                          </template>
42
-                        </el-table-column>
43
-                        <el-table-column align="center" prop="execution_frequency" width="90" label="频率">
44
-                          <template slot-scope="scope">{{scope.row.execution_frequency}}</template>
45
-                        </el-table-column>
46
-                        <el-table-column align="center" prop="number_days" width="60" label="天数">
47
-                          <template slot-scope="scope">
48
-                            <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
49
-                            {{scope.row.day}}天
50
-
51
-                          </template>
52
-                        </el-table-column>
53
-                        <el-table-column align="center" prop="total" width="60" label="总量">
54
-                          <template slot-scope="scope">{{scope.row.count}}&nbsp;&nbsp;{{scope.row.prescribing_number_unit}}</template>
55
-                        </el-table-column>
56
-                        <el-table-column align="center" prop="name" width="60" label="单价">
57
-                          <template slot-scope="scope">
58
-                            <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
59
-                            {{scope.row.price}}元
60
-
61
-                          </template>
62
-                        </el-table-column>
63
-
64
-                          <el-table-column align="center" prop="name" width="60" label="总价">
65
-                              <template slot-scope="scope">
66
-                                  <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
67
-                                  {{scope.row.price}}元
68
-
69
-                              </template>
70
-                          </el-table-column>
71
-
72
-
73
-                        <el-table-column align="center" prop="name" width="80" label="备注">
74
-                          <template slot-scope="scope">
75
-                            <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
76
-                            {{scope.row.remark}}
77
-
78
-                          </template>
79
-                        </el-table-column>
80
-                      </el-table>
81
-
82
-                      <div class="additionalBox">
83
-                        <div class="additionalOne" v-for="(item,index) in additions" :key="index">
84
-                          <span :title="item.item_name">{{item.item_name}}</span>
85
-                          <el-input v-model="item.price" placeholder="" style="width:50px;" readonly></el-input>
86
-                          共
87
-                          <el-input v-model="item.count" placeholder="" style="width:50px;" readonly></el-input>
88
-                          次
89
-                          <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
19
+                        <el-table  :data="tableData" border style="width: 100%;"
20
+                                   :row-style="{ color: '#303133' }"
21
+                                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
22
+
23
+                            <el-table-column align="center" prop="project_name" label="名称">
24
+                                <template slot-scope="scope">{{ scope.row.name }}</template>
25
+                            </el-table-column>
26
+
27
+                            <el-table-column align="center" prop="project_name" label="分类" width="100">
28
+                                <template slot-scope="scope">{{ scope.row.type == 1?'药品': scope.row.project_type == 2? '项目':'耗材'}}</template>
29
+                            </el-table-column>
30
+
31
+
32
+                            <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
33
+                                <template slot-scope="scope">{{scope.row.single_dose}}&nbsp;&nbsp;{{scope.row.single_dose_unit}}</template>
34
+
35
+                            </el-table-column>
36
+                            <el-table-column align="center" prop="delivery_way" width="90" label="用法">
37
+                                <template slot-scope="scope">
38
+                                    <!--<el-input v-model="scope.row.delivery_way" placeholder="" readonly></el-input>-->
39
+                                    {{scope.row.delivery_way}}
40
+
41
+                                </template>
42
+                            </el-table-column>
43
+                            <el-table-column align="center" prop="execution_frequency" width="90" label="频率">
44
+                                <template slot-scope="scope">{{scope.row.execution_frequency}}</template>
45
+                            </el-table-column>
46
+                            <el-table-column align="center" prop="number_days" width="60" label="天数">
47
+                                <template slot-scope="scope">
48
+                                    <!--<el-input v-model="scope.row.number_days" placeholder="" readonly></el-input>-->
49
+                                    {{scope.row.day}}天
50
+
51
+                                </template>
52
+                            </el-table-column>
53
+                            <el-table-column align="center" prop="total" width="60" label="总量">
54
+                                <template slot-scope="scope">{{scope.row.count}}&nbsp;&nbsp;{{scope.row.prescribing_number_unit}}</template>
55
+                            </el-table-column>
56
+                            <el-table-column align="center" prop="name" width="60" label="单价">
57
+                                <template slot-scope="scope">
58
+                                    <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
59
+                                    {{scope.row.price}}元
60
+
61
+                                </template>
62
+                            </el-table-column>
63
+
64
+                            <el-table-column align="center" prop="name" width="60" label="总价">
65
+                                <template slot-scope="scope">
66
+                                    <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
67
+                                    {{scope.row.price}}元
68
+
69
+                                </template>
70
+                            </el-table-column>
71
+
72
+
73
+                            <el-table-column align="center" prop="name" width="80" label="备注">
74
+                                <template slot-scope="scope">
75
+                                    <!--<el-input v-model="scope.row.remark" readonly></el-input>-->
76
+                                    {{scope.row.remark}}
77
+
78
+                                </template>
79
+                            </el-table-column>
80
+                        </el-table>
81
+
82
+                        <div class="additionalBox">
83
+                            <div class="additionalOne" v-for="(item,index) in additions" :key="index">
84
+                                <span :title="item.item_name">{{item.item_name}}</span>
85
+                                <el-input v-model="item.price" placeholder="" style="width:50px;" readonly></el-input>
86
+                                共
87
+                                <el-input v-model="item.count" placeholder="" style="width:50px;" readonly></el-input>
88
+                                次
89
+                                <!--<i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>-->
90
+                            </div>
90
                         </div>
91
                         </div>
91
-                      </div>
92
 
92
 
93
                     </div>
93
                     </div>
94
                     <div class="costBox">
94
                     <div class="costBox">
95
-                      <span>当前处方总费用:<span style="color:red;">{{ order.medfee_sumamt}}元</span></span>
96
-                      <span v-if="order.order_status == 1">待结算</span>
97
-                      <span v-if="order.order_status == 2">已结算</span>
98
-                      <span v-if="order.order_status == 3">已退费</span>
95
+                        <span>当前处方总费用:<span style="color:red;">{{ order.medfee_sumamt}}元</span></span>
96
+                        <span v-if="order.order_status == 1">待结算</span>
97
+                        <span v-if="order.order_status == 2">已结算</span>
98
+                        <span v-if="order.order_status == 3">已退费</span>
99
 
99
 
100
 
100
 
101
                     </div>
101
                     </div>
121
                     </ul>
121
                     </ul>
122
                     <!--<p class="centerRightTitle">发票费用</p>-->
122
                     <!--<p class="centerRightTitle">发票费用</p>-->
123
                     <!--<ul class="basicUl">-->
123
                     <!--<ul class="basicUl">-->
124
-                        <!--<li style="width:100%;">西药费:0.00元</li>-->
124
+                    <!--<li style="width:100%;">西药费:0.00元</li>-->
125
                     <!--</ul>-->
125
                     <!--</ul>-->
126
                 </div>
126
                 </div>
127
             </div>
127
             </div>
128
         </div>
128
         </div>
129
 
129
 
130
-      <div v-if="listVisible">
131
-      <el-dialog
132
-        class="centerDialog"
133
-        width="900px"
134
-        title="打印"
135
-        :visible.sync="listVisible">
136
-        <list-print  :paramsObj='paramsObj'></list-print>
137
-      </el-dialog>
138
-      </div>
139
-
140
-      <div v-if="allListVisible">
141
-      <el-dialog
142
-        class="centerDialog"
143
-        width="900px"
144
-        title="打印"
145
-        :visible.sync="allListVisible">
146
-        <all-list-print :paramsObj='paramsObj'></all-list-print>
147
-      </el-dialog>
148
-      </div>
130
+        <div v-if="listVisible">
131
+            <el-dialog
132
+                    class="centerDialog"
133
+                    width="900px"
134
+                    title="打印"
135
+                    :visible.sync="listVisible">
136
+                <list-print  :paramsObj='paramsObj'></list-print>
137
+            </el-dialog>
138
+        </div>
139
+
140
+        <div v-if="allListVisible">
141
+            <el-dialog
142
+                    class="centerDialog"
143
+                    width="900px"
144
+                    title="打印"
145
+                    :visible.sync="allListVisible">
146
+                <all-list-print :paramsObj='paramsObj'></all-list-print>
147
+            </el-dialog>
148
+        </div>
149
 
149
 
150
 
150
 
151
     </div>
151
     </div>
152
 </template>
152
 </template>
153
 
153
 
154
-
155
 <script>
154
 <script>
156
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
155
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
157
 import { getHisOrder } from '@/api/his/his'
156
 import { getHisOrder } from '@/api/his/his'
161
 import AllListPrint from './allListPrint'
160
 import AllListPrint from './allListPrint'
162
 
161
 
163
 export default {
162
 export default {
164
-    components:{
165
-      AllListPrint,
166
-      ListPrint,
167
-        BreadCrumb,
168
-      prescriptionTable,
169
-
170
-    },
171
-    data(){
172
-        return{
173
-          listVisible:false,
174
-          allListVisible:false,
175
-          paramsObj:{
176
-            id:this.$route.query.id
177
-          },
178
-            crumbs: [
179
-                { path: false, name: '门诊收费' },
180
-                { path: false, name: '项目消费明细汇总详情' }
181
-            ],
182
-          info: {},
183
-          curPrescriptions: {},
184
-          prescriptions: [],
185
-          record_date: '',
186
-          tableData: [],
187
-          additions:[],
188
-          editableTabsValue: '1',
189
-          loadingone: false,
190
-          editableTabs: [{
191
-            title: '处方1',
192
-            name: '1'
193
-          }],
194
-          tabIndex: 1,
195
-          hisPatientInfo: {},
196
-          loadingtwo: false,
197
-          patientTableData: [{
198
-            name: '杨美英',
199
-            mdtrt_id: '1709946'
200
-          }],
201
-          patientInfo: { id: 0 },
202
-          doctor: {},
203
-          total: 0,
204
-          state: '未收费',
205
-          radio: 1,
206
-          radioStatus: 1,
207
-          search_input: '',
208
-          order:{},
209
-        }
210
-    },created(){
211
-      this.GetOrderDetail()
212
-  },methods:{
213
-      open(val){
214
-        if(val == 1){
215
-          this.paramsObj.id == this.$route.query.id;
216
-          this.listVisible = true
217
-
218
-        }else if(val == 2){
219
-          this.paramsObj.id == this.$route.query.id;
220
-          this.allListVisible = true
221
-        }
163
+  components:{
164
+    AllListPrint,
165
+    ListPrint,
166
+    BreadCrumb,
167
+    prescriptionTable,
168
+
169
+  },
170
+  data(){
171
+    return{
172
+      listVisible:false,
173
+      allListVisible:false,
174
+      paramsObj:{
175
+        id:this.$route.query.id
222
       },
176
       },
177
+      crumbs: [
178
+        { path: false, name: '门诊收费' },
179
+        { path: false, name: '项目消费明细汇总详情' }
180
+      ],
181
+      info: {},
182
+      curPrescriptions: {},
183
+      prescriptions: [],
184
+      record_date: '',
185
+      tableData: [],
186
+      additions:[],
187
+      editableTabsValue: '1',
188
+      loadingone: false,
189
+      editableTabs: [{
190
+        title: '处方1',
191
+        name: '1'
192
+      }],
193
+      tabIndex: 1,
194
+      hisPatientInfo: {},
195
+      loadingtwo: false,
196
+      patientTableData: [{
197
+        name: '杨美英',
198
+        mdtrt_id: '1709946'
199
+      }],
200
+      patientInfo: { id: 0 },
201
+      doctor: {},
202
+      total: 0,
203
+      state: '未收费',
204
+      radio: 1,
205
+      radioStatus: 1,
206
+      search_input: '',
207
+      order:{},
208
+    }
209
+  },created(){
210
+    this.GetOrderDetail()
211
+  },methods:{
212
+    open(val){
213
+      if(val == 1){
214
+        this.paramsObj.id == this.$route.query.id
215
+        this.listVisible = true
216
+
217
+      }else if(val == 2){
218
+        this.paramsObj.id == this.$route.query.id
219
+        this.allListVisible = true
220
+      }
221
+    },
223
     // getTotal() {
222
     // getTotal() {
224
     //   var total = 0
223
     //   var total = 0
225
     //   for (let i = 0; i < this.prescriptions.length; i++) {
224
     //   for (let i = 0; i < this.prescriptions.length; i++) {
253
     tabclickEvent(val) {
252
     tabclickEvent(val) {
254
       for (let i = 0; i < this.prescriptions.length; i++) {
253
       for (let i = 0; i < this.prescriptions.length; i++) {
255
         if (this.prescriptions[i].name == val.name) {
254
         if (this.prescriptions[i].name == val.name) {
256
-          this.curPrescriptions = {};
257
-          var temp = this.deepClone(this.prescriptions[i]);
255
+          this.curPrescriptions = {}
256
+          var temp = this.deepClone(this.prescriptions[i])
258
           this.curPrescriptions = temp
257
           this.curPrescriptions = temp
259
         }
258
         }
260
       }
259
       }
263
       if (!source && typeof source !== 'object') {
262
       if (!source && typeof source !== 'object') {
264
         throw new Error('error arguments', 'shallowClone')
263
         throw new Error('error arguments', 'shallowClone')
265
       }
264
       }
266
-      const targetObj = source.constructor === Array ? [] : {};
265
+      const targetObj = source.constructor === Array ? [] : {}
267
       Object.keys(source).forEach((keys) => {
266
       Object.keys(source).forEach((keys) => {
268
         if (source[keys] && typeof source[keys] === 'object') {
267
         if (source[keys] && typeof source[keys] === 'object') {
269
           targetObj[keys] = this.deepClone(source[keys])
268
           targetObj[keys] = this.deepClone(source[keys])
270
         } else {
269
         } else {
271
           targetObj[keys] = source[keys]
270
           targetObj[keys] = source[keys]
272
         }
271
         }
273
-      });
272
+      })
274
       return targetObj
273
       return targetObj
275
     },  getGroup(id){
274
     },  getGroup(id){
276
-      var name = "";
277
-      var statistics_category =  getDictionaryDataConfig('system','statistics_category');
275
+      var name = ""
276
+      var statistics_category =  getDictionaryDataConfig('system','statistics_category')
278
       for(let i=0;i<statistics_category.length;i++){
277
       for(let i=0;i<statistics_category.length;i++){
279
         if(id == statistics_category[i].id){
278
         if(id == statistics_category[i].id){
280
           name = statistics_category[i].name
279
           name = statistics_category[i].name
283
       return name
282
       return name
284
     },
283
     },
285
     getTotal() {
284
     getTotal() {
286
-      var total = 0;
285
+      var total = 0
287
       for (let i = 0; i < this.prescriptions.length; i++) {
286
       for (let i = 0; i < this.prescriptions.length; i++) {
288
         if (this.prescriptions[i].advices != null) {
287
         if (this.prescriptions[i].advices != null) {
289
           for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
288
           for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
304
       }
303
       }
305
     },  unique(array) {
304
     },  unique(array) {
306
       // res用来存储结果
305
       // res用来存储结果
307
-      var res = [];
306
+      var res = []
308
       for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
307
       for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
309
         for (var j = 0, resLen = res.length; j < resLen; j++) {
308
         for (var j = 0, resLen = res.length; j < resLen; j++) {
310
           if (array[i].id === res[j].id && array[i].price === res[j].price) {
309
           if (array[i].id === res[j].id && array[i].price === res[j].price) {
319
       return res
318
       return res
320
     },
319
     },
321
     setMonthPrescription(month_prescriptions) {
320
     setMonthPrescription(month_prescriptions) {
322
-      console.log(month_prescriptions);
321
+      console.log(month_prescriptions)
323
       let drug_month_prescriptions = {
322
       let drug_month_prescriptions = {
324
         advices: []
323
         advices: []
325
-      };
326
-      let drug_ids = [];
324
+      }
325
+      let drug_ids = []
327
       let project_month_prescriptions = {
326
       let project_month_prescriptions = {
328
         project: []
327
         project: []
329
 
328
 
330
-      };
331
-      let project_ids = [];
329
+      }
330
+      let project_ids = []
332
 
331
 
333
       let addition_month_prescriptions = {
332
       let addition_month_prescriptions = {
334
         addition: []
333
         addition: []
335
 
334
 
336
-      };
337
-      let additions_ids = [];
335
+      }
336
+      let additions_ids = []
338
 
337
 
339
       for (let i = 0; i < month_prescriptions.length; i++) {
338
       for (let i = 0; i < month_prescriptions.length; i++) {
340
         if (month_prescriptions[i].type == 1) { //药品
339
         if (month_prescriptions[i].type == 1) { //药品
343
               id: month_prescriptions[i].advices[a].drug_id,
342
               id: month_prescriptions[i].advices[a].drug_id,
344
               price: month_prescriptions[i].advices[a].price
343
               price: month_prescriptions[i].advices[a].price
345
 
344
 
346
-            };
347
-            drug_ids.push(obj);
345
+            }
346
+            drug_ids.push(obj)
348
             drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
347
             drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
349
           }
348
           }
350
 
349
 
354
               id: month_prescriptions[i].project[a].project_id,
353
               id: month_prescriptions[i].project[a].project_id,
355
               price: month_prescriptions[i].project[a].price
354
               price: month_prescriptions[i].project[a].price
356
 
355
 
357
-            };
358
-            project_ids.push(obj);
356
+            }
357
+            project_ids.push(obj)
359
             project_month_prescriptions.project.push(month_prescriptions[i].project[a])
358
             project_month_prescriptions.project.push(month_prescriptions[i].project[a])
360
           }
359
           }
361
         }
360
         }
365
             id: month_prescriptions[i].addition[a].item_id,
364
             id: month_prescriptions[i].addition[a].item_id,
366
             price: month_prescriptions[i].addition[a].price
365
             price: month_prescriptions[i].addition[a].price
367
 
366
 
368
-          };
369
-          additions_ids.push(obj);
367
+          }
368
+          additions_ids.push(obj)
370
           addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
369
           addition_month_prescriptions.addition.push(month_prescriptions[i].addition[a])
371
 
370
 
372
         }
371
         }
373
 
372
 
374
       }
373
       }
375
 
374
 
376
-      drug_ids = this.unique(drug_ids);
377
-      project_ids= this.unique(project_ids);
378
-      additions_ids= this.unique(additions_ids);
375
+      drug_ids = this.unique(drug_ids)
376
+      project_ids= this.unique(project_ids)
377
+      additions_ids= this.unique(additions_ids)
379
 
378
 
380
 
379
 
381
 
380
 
382
 
381
 
383
 
382
 
384
       for (let i = 0; i < drug_ids.length; i++) {
383
       for (let i = 0; i < drug_ids.length; i++) {
385
-        let obj = {};
386
-        let count = 0;
384
+        let obj = {}
385
+        let count = 0
387
         for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
386
         for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
388
           if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id ==  drug_month_prescriptions.advices[a].drug_id) {
387
           if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id ==  drug_month_prescriptions.advices[a].drug_id) {
389
-            obj['name'] = drug_month_prescriptions.advices[a].advice_name;
390
-            obj['statistical_classification'] = '';
391
-            obj['type'] = 1;
392
-            obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose;
393
-            obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way;
394
-            obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency;
395
-            obj['day'] = drug_month_prescriptions.advices[a].day;
396
-            obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit;
397
-            obj['remark'] = drug_month_prescriptions.advices[a].remark;
398
-            obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price);
388
+            obj['name'] = drug_month_prescriptions.advices[a].advice_name
389
+            obj['statistical_classification'] = ''
390
+            obj['type'] = 1
391
+            obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
392
+            obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
393
+            obj['execution_frequency'] = drug_month_prescriptions.advices[a].execution_frequency
394
+            obj['day'] = drug_month_prescriptions.advices[a].day
395
+            obj['prescribing_number_unit'] = drug_month_prescriptions.advices[a].prescribing_number_unit
396
+            obj['remark'] = drug_month_prescriptions.advices[a].remark
397
+            obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price)
399
             count = count + drug_month_prescriptions.advices[a].prescribing_number
398
             count = count + drug_month_prescriptions.advices[a].prescribing_number
400
 
399
 
401
           }
400
           }
402
         }
401
         }
403
-        obj['count'] = count;
402
+        obj['count'] = count
404
         this.tableData.push(obj)
403
         this.tableData.push(obj)
405
       }
404
       }
406
 
405
 
407
       for (let i = 0; i < project_ids.length; i++) {
406
       for (let i = 0; i < project_ids.length; i++) {
408
-        let obj = {};
409
-        let count = 0;
407
+        let obj = {}
408
+        let count = 0
410
         for (let a = 0; a < project_month_prescriptions.project.length; a++) {
409
         for (let a = 0; a < project_month_prescriptions.project.length; a++) {
411
           if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
410
           if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
412
-            obj['name'] = project_month_prescriptions.project[a].project.project_name;
413
-            obj['statistical_classification'] = '';
414
-            obj['single_dose'] = project_month_prescriptions.project[a].single_dose;
415
-            obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way;
416
-            obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency;
417
-            obj['day'] = project_month_prescriptions.project[a].day;
418
-            obj['single_dose_unit'] = project_month_prescriptions.project[a].unit;
419
-            obj['prescribing_number_unit'] = project_month_prescriptions.project[a].unit;
420
-            count = count + project_month_prescriptions.project[a].count;
421
-            obj['price'] = parseFloat(project_month_prescriptions.project[a].price);
422
-            obj['remark'] = project_month_prescriptions.project[a].remark;
411
+
412
+            if(project_month_prescriptions.project[a].type == 2){
413
+              obj['name'] = project_month_prescriptions.project[a].project.project_name
414
+              obj['statistical_classification'] = ''
415
+              obj['project_type'] = 2
416
+
417
+
418
+            }else if (project_month_prescriptions.project[a].type == 3){
419
+              obj['name'] = project_month_prescriptions.project[a].good_info.good_name
420
+              obj['statistical_classification'] = ''
421
+              obj['project_type'] = 3
422
+            }
423
+            obj['single_dose'] = project_month_prescriptions.project[a].single_dose
424
+            obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
425
+            obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
426
+            obj['day'] = project_month_prescriptions.project[a].day
427
+            obj['single_dose_unit'] = project_month_prescriptions.project[a].unit
428
+            obj['prescribing_number_unit'] = project_month_prescriptions.project[a].unit
429
+            count = count + project_month_prescriptions.project[a].count
430
+            obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
431
+            obj['remark'] = project_month_prescriptions.project[a].remark
423
             obj['type'] = 2
432
             obj['type'] = 2
424
 
433
 
425
 
434
 
426
           }
435
           }
427
         }
436
         }
428
-        obj['count'] = count;
437
+        obj['count'] = count
429
         this.tableData.push(obj)
438
         this.tableData.push(obj)
430
 
439
 
431
       }
440
       }
432
 
441
 
433
       for (let i = 0; i < additions_ids.length; i++) {
442
       for (let i = 0; i < additions_ids.length; i++) {
434
-        let obj = {};
435
-        let count = 0;
436
-        console.log(addition_month_prescriptions.addition);
443
+        let obj = {}
444
+        let count = 0
445
+        console.log(addition_month_prescriptions.addition)
437
         if (addition_month_prescriptions.addition) {
446
         if (addition_month_prescriptions.addition) {
438
           for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
447
           for (let a = 0; a < addition_month_prescriptions.addition.length; a++) {
439
             if (additions_ids[i].price == addition_month_prescriptions.addition[a].price &&additions_ids[i].id == addition_month_prescriptions.addition[a].item_id) {
448
             if (additions_ids[i].price == addition_month_prescriptions.addition[a].price &&additions_ids[i].id == addition_month_prescriptions.addition[a].item_id) {
440
-              obj['item_name'] = addition_month_prescriptions.addition[a].item_name;
441
-              count = count + addition_month_prescriptions.addition[a].count;
449
+              obj['item_name'] = addition_month_prescriptions.addition[a].item_name
450
+              count = count + addition_month_prescriptions.addition[a].count
442
               obj['price'] = parseFloat(addition_month_prescriptions.addition[a].price)
451
               obj['price'] = parseFloat(addition_month_prescriptions.addition[a].price)
443
             }
452
             }
444
           }
453
           }
445
-          obj['count'] = count;
454
+          obj['count'] = count
446
           this.additions.push(obj)
455
           this.additions.push(obj)
447
 
456
 
448
         }
457
         }
454
       let params={
463
       let params={
455
         number:this.$route.query.number,
464
         number:this.$route.query.number,
456
         patient_id:this.$route.query.patient_id,
465
         patient_id:this.$route.query.patient_id,
457
-      };
466
+      }
458
       getHisOrder(params).then(response => {
467
       getHisOrder(params).then(response => {
459
         if (response.data.state == 0) {
468
         if (response.data.state == 0) {
460
-          this.$message.error(response.data.msg);
469
+          this.$message.error(response.data.msg)
461
           return false
470
           return false
462
         } else {
471
         } else {
463
-          this.patientInfo = response.data.data.order.patient;
464
-          this.hisPatientInfo = response.data.data.order.his_patient;
465
-          this.info = response.data.data.p_info;
466
-          this.order = response.data.data.order;
472
+          this.patientInfo = response.data.data.order.patient
473
+          this.hisPatientInfo = response.data.data.order.his_patient
474
+          this.info = response.data.data.p_info
475
+          this.order = response.data.data.order
467
 
476
 
468
-          this.prescriptions = [];
469
-          this.tableData = [];
477
+          this.prescriptions = []
478
+          this.tableData = []
470
 
479
 
471
 
480
 
472
-          var prescription = response.data.data.prescription;
473
-          this.prescriptions = prescription;
481
+          var prescription = response.data.data.prescription
482
+          this.prescriptions = prescription
474
           this.setMonthPrescription(prescription)
483
           this.setMonthPrescription(prescription)
475
 
484
 
476
 
485
 
478
           //   var prescription = response.data.data.prescription[i]
487
           //   var prescription = response.data.data.prescription[i]
479
 
488
 
480
 
489
 
481
-            // for (let b = 0; b < prescription.advices.length; b++) {
482
-            //   let obj = {
483
-            //     name: prescription.advices[b].advice_name,
484
-            //     statistical_classification:"",
485
-            //     type:1,
486
-            //     single_dose: prescription.advices[b].single_dose,
487
-            //     delivery_way: prescription.advices[b].delivery_way,
488
-            //     execution_frequency: prescription.advices[b].execution_frequency,
489
-            //     price: prescription.advices[b].price.toString(),
490
-            //     day: prescription.advices[b].day,
491
-            //     count:prescription.advices[b].prescribing_number.toString(),
492
-            //     remark: prescription.advices[b].remark,
493
-            //     single_dose_unit: prescription.advices[b].single_dose_unit,
494
-            //     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
495
-            //
496
-            //   }
497
-            //   this.tableData.push(obj)
498
-            // }
499
-            //
500
-            // for (let b = 0; b < prescription.project.length; b++) {
501
-            //   let obj = {
502
-            //     name: prescription.project[b].project.project_name,
503
-            //     statistical_classification: prescription.project[b].project.statistical_classification,
504
-            //     single_dose: prescription.project[b].single_dose,
505
-            //     delivery_way: prescription.project[b].delivery_way,
506
-            //     execution_frequency: prescription.project[b].execution_frequency,
507
-            //     price: prescription.project[b].price,
508
-            //     day: prescription.project[b].day,
509
-            //     count: prescription.project[b].count.toString(),
510
-            //     remark: prescription.project[b].remark,
511
-            //     single_dose_unit:prescription.project[b].project.unit,
512
-            //     prescribing_number_unit:prescription.project[b].project.unit,
513
-            //     type:2,
514
-            //   }
515
-            //   this.tableData.push(obj)
516
-            // }
517
-            //
518
-            // for (let b = 0; b < prescription.addition.length; b++) {
519
-            //     this.additions.push( prescription.addition[b])
520
-            // }
521
-
522
-
523
-
524
-            // let index = i + 1
525
-            // let obj = {
526
-            //   id: prescription.id,
527
-            //   name: '处方' + index,
528
-            //   advices: tempAdvice,
529
-            //   project: tempProject,
530
-            //   type: response.data.data.prescription[i].type
531
-            // }
532
-            // this.prescriptions.push(obj)
533
-            // this.curPrescriptions = this.prescriptions[0]
490
+          // for (let b = 0; b < prescription.advices.length; b++) {
491
+          //   let obj = {
492
+          //     name: prescription.advices[b].advice_name,
493
+          //     statistical_classification:"",
494
+          //     type:1,
495
+          //     single_dose: prescription.advices[b].single_dose,
496
+          //     delivery_way: prescription.advices[b].delivery_way,
497
+          //     execution_frequency: prescription.advices[b].execution_frequency,
498
+          //     price: prescription.advices[b].price.toString(),
499
+          //     day: prescription.advices[b].day,
500
+          //     count:prescription.advices[b].prescribing_number.toString(),
501
+          //     remark: prescription.advices[b].remark,
502
+          //     single_dose_unit: prescription.advices[b].single_dose_unit,
503
+          //     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
504
+          //
505
+          //   }
506
+          //   this.tableData.push(obj)
507
+          // }
508
+          //
509
+          // for (let b = 0; b < prescription.project.length; b++) {
510
+          //   let obj = {
511
+          //     name: prescription.project[b].project.project_name,
512
+          //     statistical_classification: prescription.project[b].project.statistical_classification,
513
+          //     single_dose: prescription.project[b].single_dose,
514
+          //     delivery_way: prescription.project[b].delivery_way,
515
+          //     execution_frequency: prescription.project[b].execution_frequency,
516
+          //     price: prescription.project[b].price,
517
+          //     day: prescription.project[b].day,
518
+          //     count: prescription.project[b].count.toString(),
519
+          //     remark: prescription.project[b].remark,
520
+          //     single_dose_unit:prescription.project[b].project.unit,
521
+          //     prescribing_number_unit:prescription.project[b].project.unit,
522
+          //     type:2,
523
+          //   }
524
+          //   this.tableData.push(obj)
525
+          // }
526
+          //
527
+          // for (let b = 0; b < prescription.addition.length; b++) {
528
+          //     this.additions.push( prescription.addition[b])
529
+          // }
530
+
531
+
532
+
533
+          // let index = i + 1
534
+          // let obj = {
535
+          //   id: prescription.id,
536
+          //   name: '处方' + index,
537
+          //   advices: tempAdvice,
538
+          //   project: tempProject,
539
+          //   type: response.data.data.prescription[i].type
540
+          // }
541
+          // this.prescriptions.push(obj)
542
+          // this.curPrescriptions = this.prescriptions[0]
534
 
543
 
535
           // }
544
           // }
536
           // this.tableData = response.data.data.order
545
           // this.tableData = response.data.data.order
540
     }
549
     }
541
   }
550
   }
542
 }
551
 }
552
+
543
 </script>
553
 </script>
544
 
554
 
545
 <style lang="scss" scoped>
555
 <style lang="scss" scoped>

+ 7 - 2
src/xt_pages/outpatientCharges/allListPrint.vue View File

172
             let count = 0
172
             let count = 0
173
             for (let a = 0; a < details.length; a++) {
173
             for (let a = 0; a < details.length; a++) {
174
               if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
174
               if (new_project_ids[i].id == details[a].project.project_id && new_project_ids[i].price == details[a].project.price) {
175
-                obj['name'] = details[a].project.project.project_name
175
+               if( details[a].project.type == 2){
176
+                 obj['name'] = details[a].project.project.project_name
177
+               }else if(details[a].project.type == 3){
178
+                 obj['name'] = details[a].project.good_info.good_name
179
+               }
180
+                obj['unit'] = details[a].project.unit
181
+
176
                 obj['spec'] = '1'
182
                 obj['spec'] = '1'
177
-                obj['unit'] = details[a].project.project.unit
178
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
183
                 obj['med_chrgitm_type'] = this.getType(details[a].med_chrgitm_type)
179
                 obj['price'] = parseFloat(details[a].pric)
184
                 obj['price'] = parseFloat(details[a].pric)
180
                 obj['is_total'] = 2
185
                 obj['is_total'] = 2

+ 1 - 1
src/xt_pages/outpatientCharges/components/chargeMonthPrescriptionTable.vue View File

61
         <template slot-scope="scope">{{ scope.row.project_name }}</template>
61
         <template slot-scope="scope">{{ scope.row.project_name }}</template>
62
       </el-table-column>
62
       </el-table-column>
63
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
63
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
64
-        <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
64
+        <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
65
       </el-table-column>
65
       </el-table-column>
66
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
66
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
67
         <template slot-scope="scope">{{scope.row.single_dose}}{{scope.row.unit}}</template>
67
         <template slot-scope="scope">{{scope.row.single_dose}}{{scope.row.unit}}</template>

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

61
         <template slot-scope="scope">{{ scope.row.project_name }}</template>
61
         <template slot-scope="scope">{{ scope.row.project_name }}</template>
62
       </el-table-column>
62
       </el-table-column>
63
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
63
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
64
-        <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
64
+        <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
65
       </el-table-column>
65
       </el-table-column>
66
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
66
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
67
         <template slot-scope="scope">{{scope.row.single_dose}}{{scope.row.unit}}</template>
67
         <template slot-scope="scope">{{scope.row.single_dose}}{{scope.row.unit}}</template>

+ 324 - 326
src/xt_pages/outpatientCharges/components/registerDialog.vue View File

1
 <template>
1
 <template>
2
-  <el-dialog width="854px" class="registerDialog" :title="titles" :visible.sync="visibility"
3
-             :close-on-click-modal="isClose"
4
-             :close-on-press-escape="isClose">
5
-
6
-    <el-form :model="form" :rules="rules" ref="formValue" label-width="100px">
7
-      <el-form-item label="患者姓名:" prop="name" :validate-event="is_Name">
8
-        <el-autocomplete
9
-          class="checkSearch"
10
-          popper-class="my-autocomplete"
11
-          v-model="form.name"
12
-          :fetch-suggestions="querySearchAsync"
13
-          :trigger-on-focus="false"
14
-          placeholder="请输入病人名字"
15
-          @select="handleSelect"
16
-          style="width:160px;"
17
-        >
18
-          <i class="el-icon-search el-input__icon" slot="suffix"></i>
19
-          <template slot-scope="{ item }">
20
-            <div class="name">{{ item.name }}</div>
21
-          </template>
22
-        </el-autocomplete>
23
-      </el-form-item>
24
-
25
-      <el-form-item label="性别:" prop="gender" :validate-event="is_Name">
26
-        <el-select v-model="form.gender" placeholder="请选择" style="width:100%;">
27
-          <el-option
28
-            v-for="item in sex"
29
-            :key="item.value"
30
-            :label="item.label"
31
-            :value="item.value">
32
-          </el-option>
33
-        </el-select>
34
-
35
-
36
-      </el-form-item>
37
-
38
-      <el-form-item label="年龄:" prop="age" :validate-event="is_Name">
39
-        <el-input v-model="form.age"></el-input>
40
-      </el-form-item>
41
-
42
-
43
-      <el-form-item label="出生日期:" prop="birthday" :validate-event="is_Name">
44
-        <el-date-picker v-model="form.birthday" type="date" format="yyyy-MM-dd"
45
-                        value-format="yyyy-MM-dd" placeholder="选择日期" style="width:100%;"></el-date-picker>
46
-      </el-form-item>
47
-
48
-      <el-form-item label="手机号码:" prop="phone">
49
-        <el-input v-model="form.phone"></el-input>
50
-      </el-form-item>
51
-
52
-
53
-      <el-form-item label="医疗类别:">
54
-        <el-select v-model="form.medical_care" placeholder="请选择" style="width:100%;">
55
-          <el-option
56
-            v-for="(item,index) in medical_care"
57
-            :key="index"
58
-            :label="item.label"
59
-            :value="item.value">
60
-          </el-option>
61
-        </el-select>
62
-      </el-form-item>
63
-
64
-
65
-      <el-form-item label="证件类型:" prop="certificates" :validate-event="is_Name">
66
-        <el-select v-model="form.certificates" placeholder="请选择" style="width:100%;">
67
-          <el-option
68
-            v-for="item in certificates"
69
-            :key="item.value"
70
-            :label="item.label"
71
-            :value="item.value">
72
-          </el-option>
73
-        </el-select>
74
-      </el-form-item>
75
-
76
-      <el-form-item label="证件号码:" prop="id_card" :validate-event="is_Name">
77
-        <el-input v-model="form.id_card"></el-input>
78
-      </el-form-item>
79
-
80
-      <el-form-item label="处方类型:" prop="p_type" :validate-event="is_Name">
81
-        <el-select style="margin-right:5px;width:100px;" v-model="form.p_type" placeholder=""
82
-        >
83
-          <el-option
84
-            v-for="(item,index) in registers"
85
-            :key="index"
86
-            :label="item.label"
87
-            :value="item.value">
88
-          </el-option>
89
-        </el-select>
90
-      </el-form-item>
91
-      <el-form-item label="大病类别:" prop="sick_type" :validate-event="is_Name">
92
-        <el-select style="margin-right:5px;width:100px;" v-model="form.sick_type" placeholder="">
93
-          <el-option
94
-            v-for="(item,index) in sick"
95
-            :key="index"
96
-            :label="item.class_name"
97
-            :value="item.id">
98
-          </el-option>
99
-        </el-select>
100
-      </el-form-item>
101
-
102
-      <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
103
-        <el-select style="margin-right:5px;width:100px;" v-model="form.diagnosis" placeholder="">
104
-          <el-option
105
-            v-for="(item,index) in diagnoses"
106
-            :key="index"
107
-            :label="item.class_name"
108
-            :value="item.id">
109
-          </el-option>
110
-        </el-select>
111
-      </el-form-item>
112
-
113
-
114
-      <el-form-item label="结算类型:">
115
-        <el-select v-model="form.settlement_value" placeholder="请选择" style="width:100%;">
116
-          <el-option
117
-            v-for="item in settlement"
118
-            :key="item.value"
119
-            :label="item.label"
120
-            :value="item.value">
121
-          </el-option>
122
-        </el-select>
123
-      </el-form-item>
124
-
125
-
126
-      <el-form-item label="社保类型:">
127
-        <el-select v-model="form.social_type" placeholder="请选择" style="width:100%;">
128
-          <el-option
129
-            v-for="item in medicalCare"
130
-            :key="item.value"
131
-            :label="item.label"
132
-            :value="item.value">
133
-          </el-option>
134
-        </el-select>
135
-      </el-form-item>
136
-
137
-
138
-      <el-form-item label="读卡类型:" prop="id_card_type" :validate-event="is_Name">
139
-        <el-select v-model="form.id_card_type" placeholder="请选择">
140
-          <el-option
141
-            v-for="item in IDCardTypes"
142
-            :key="item.value"
143
-            :label="item.label"
144
-            :value="item.value">
145
-          </el-option>
146
-        </el-select>
147
-      </el-form-item>
148
-
149
-
150
-      <el-form-item class="specialFormItem" label="医保卡号:">
151
-        <div style="display:flex;">
152
-          <el-input v-model="form.medical_insurance_card"></el-input>
153
-          <el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>
154
-
155
-        </div>
156
-      </el-form-item>
157
-
158
-      <el-form-item label="挂号类型:"  >
159
-        <el-select v-model="form.register" placeholder="请选择" style="width:100%;">
160
-          <el-option
161
-            v-for="item in register"
162
-            :key="item.value"
163
-            :label="item.label"
164
-            :value="item.value">
165
-          </el-option>
166
-        </el-select>
167
-      </el-form-item>
168
-      <el-form-item label="挂号费:">
169
-        <el-input v-model="form.registration_fee"></el-input>
170
-      </el-form-item>
171
-      <el-form-item label="诊疗费:">
172
-        <el-input v-model="form.medical_expenses"></el-input>
173
-      </el-form-item>
174
-    </el-form>
175
-
176
-    <span slot="footer" class="dialog-footer">
2
+    <el-dialog width="854px" class="registerDialog" :title="titles" :visible.sync="visibility"
3
+               :close-on-click-modal="isClose"
4
+               :close-on-press-escape="isClose">
5
+
6
+        <el-form :model="form" :rules="rules" ref="formValue" label-width="100px">
7
+            <el-form-item label="患者姓名:" prop="name" :validate-event="is_Name">
8
+                <el-autocomplete
9
+                        class="checkSearch"
10
+                        popper-class="my-autocomplete"
11
+                        v-model="form.name"
12
+                        :fetch-suggestions="querySearchAsync"
13
+                        :trigger-on-focus="false"
14
+                        placeholder="请输入病人名字"
15
+                        @select="handleSelect"
16
+                        style="width:160px;"
17
+                >
18
+                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
19
+                    <template slot-scope="{ item }">
20
+                        <div class="name">{{ item.name }}</div>
21
+                    </template>
22
+                </el-autocomplete>
23
+            </el-form-item>
24
+
25
+            <el-form-item label="性别:" prop="gender" :validate-event="is_Name">
26
+                <el-select v-model="form.gender" placeholder="请选择" style="width:100%;">
27
+                    <el-option
28
+                            v-for="item in sex"
29
+                            :key="item.value"
30
+                            :label="item.label"
31
+                            :value="item.value">
32
+                    </el-option>
33
+                </el-select>
34
+
35
+
36
+            </el-form-item>
37
+
38
+            <el-form-item label="年龄:" prop="age" :validate-event="is_Name">
39
+                <el-input v-model="form.age"></el-input>
40
+            </el-form-item>
41
+
42
+
43
+            <el-form-item label="出生日期:" prop="birthday" :validate-event="is_Name">
44
+                <el-date-picker v-model="form.birthday" type="date" format="yyyy-MM-dd"
45
+                                value-format="yyyy-MM-dd" placeholder="选择日期" style="width:100%;"></el-date-picker>
46
+            </el-form-item>
47
+
48
+            <el-form-item label="手机号码:" prop="phone">
49
+                <el-input v-model="form.phone"></el-input>
50
+            </el-form-item>
51
+
52
+
53
+            <el-form-item label="医疗类别:">
54
+                <el-select v-model="form.medical_care" placeholder="请选择" style="width:100%;">
55
+                    <el-option
56
+                            v-for="(item,index) in medical_care"
57
+                            :key="index"
58
+                            :label="item.label"
59
+                            :value="item.value">
60
+                    </el-option>
61
+                </el-select>
62
+            </el-form-item>
63
+
64
+
65
+            <el-form-item label="证件类型:" prop="certificates" :validate-event="is_Name">
66
+                <el-select v-model="form.certificates" placeholder="请选择" style="width:100%;">
67
+                    <el-option
68
+                            v-for="item in certificates"
69
+                            :key="item.value"
70
+                            :label="item.label"
71
+                            :value="item.value">
72
+                    </el-option>
73
+                </el-select>
74
+            </el-form-item>
75
+
76
+            <el-form-item label="证件号码:" prop="id_card" :validate-event="is_Name">
77
+                <el-input v-model="form.id_card"></el-input>
78
+            </el-form-item>
79
+
80
+            <el-form-item label="处方类型:" prop="p_type" :validate-event="is_Name">
81
+                <el-select style="margin-right:5px;width:100px;" v-model="form.p_type" placeholder=""
82
+                >
83
+                    <el-option
84
+                            v-for="(item,index) in registers"
85
+                            :key="index"
86
+                            :label="item.label"
87
+                            :value="item.value">
88
+                    </el-option>
89
+                </el-select>
90
+            </el-form-item>
91
+            <el-form-item label="大病类别:" prop="sick_type" :validate-event="is_Name">
92
+                <el-select style="margin-right:5px;width:100px;" v-model="form.sick_type" placeholder="">
93
+                    <el-option
94
+                            v-for="(item,index) in sick"
95
+                            :key="index"
96
+                            :label="item.class_name"
97
+                            :value="item.id">
98
+                    </el-option>
99
+                </el-select>
100
+            </el-form-item>
101
+
102
+            <el-form-item label="诊断:" prop="diagnosis" :validate-event="is_Name">
103
+                <el-select style="margin-right:5px;width:100px;" v-model="form.diagnosis" placeholder="">
104
+                    <el-option
105
+                            v-for="(item,index) in diagnoses"
106
+                            :key="index"
107
+                            :label="item.class_name"
108
+                            :value="item.id">
109
+                    </el-option>
110
+                </el-select>
111
+            </el-form-item>
112
+
113
+
114
+            <el-form-item label="结算类型:">
115
+                <el-select v-model="form.settlement_value" placeholder="请选择" style="width:100%;">
116
+                    <el-option
117
+                            v-for="item in settlement"
118
+                            :key="item.value"
119
+                            :label="item.label"
120
+                            :value="item.value">
121
+                    </el-option>
122
+                </el-select>
123
+            </el-form-item>
124
+
125
+
126
+            <el-form-item label="社保类型:">
127
+                <el-select v-model="form.social_type" placeholder="请选择" style="width:100%;">
128
+                    <el-option
129
+                            v-for="item in medicalCare"
130
+                            :key="item.value"
131
+                            :label="item.label"
132
+                            :value="item.value">
133
+                    </el-option>
134
+                </el-select>
135
+            </el-form-item>
136
+
137
+
138
+            <el-form-item label="读卡类型:" prop="id_card_type" :validate-event="is_Name">
139
+                <el-select v-model="form.id_card_type" placeholder="请选择">
140
+                    <el-option
141
+                            v-for="item in IDCardTypes"
142
+                            :key="item.value"
143
+                            :label="item.label"
144
+                            :value="item.value">
145
+                    </el-option>
146
+                </el-select>
147
+            </el-form-item>
148
+
149
+
150
+            <el-form-item class="specialFormItem" label="医保卡号:">
151
+                <div style="display:flex;">
152
+                    <el-input v-model="form.medical_insurance_card"></el-input>
153
+                    <el-button style="margin-left:10px;" type="primary" @click="reading">读卡</el-button>
154
+
155
+                </div>
156
+            </el-form-item>
157
+
158
+            <el-form-item label="挂号类型:" prop="register" :validate-event="is_Name">
159
+                <el-select v-model="form.register" placeholder="请选择" style="width:100%;">
160
+                    <el-option
161
+                            v-for="item in register"
162
+                            :key="item.value"
163
+                            :label="item.label"
164
+                            :value="item.value">
165
+                    </el-option>
166
+                </el-select>
167
+            </el-form-item>
168
+            <el-form-item label="挂号费:">
169
+                <el-input v-model="form.registration_fee"></el-input>
170
+            </el-form-item>
171
+            <el-form-item label="诊疗费:">
172
+                <el-input v-model="form.medical_expenses"></el-input>
173
+            </el-form-item>
174
+        </el-form>
175
+
176
+        <span slot="footer" class="dialog-footer">
177
     <el-button @click="cancel('formValue')">取 消</el-button>
177
     <el-button @click="cancel('formValue')">取 消</el-button>
178
     <el-button type="primary" @click="confirm('formValue')">挂 号</el-button>
178
     <el-button type="primary" @click="confirm('formValue')">挂 号</el-button>
179
   </span>
179
   </span>
180
-  </el-dialog>
180
+    </el-dialog>
181
 
181
 
182
 </template>
182
 </template>
183
 
183
 
184
 <script>
184
 <script>
185
-  import {jsGetAge, uParseTime} from "@/utils/tools";
185
+  import { jsGetAge, uParseTime } from '@/utils/tools'
186
   import axios from 'axios'
186
   import axios from 'axios'
187
-  import {PostSearch} from '@/api/patient'
187
+  import { PostSearch } from '@/api/patient'
188
 
188
 
189
-  import {getDictionaryDataConfig} from '@/utils/data'
189
+  import { getDictionaryDataConfig } from '@/utils/data'
190
 
190
 
191
   export default {
191
   export default {
192
 
192
 
196
 
196
 
197
       return {
197
       return {
198
         registers: [
198
         registers: [
199
-          {value: 11, label: "普通门诊"},
200
-          {value: 12, label: '门诊挂号'},
201
-          {value: 13, label: "急诊"},
202
-          {value: 14, label: "门诊特殊病"},
203
-          {value: 15, label: "门诊统筹"},
204
-          {value: 16, label: "门诊慢性病"},
205
-          {value: 21, label: "普通住院"},
199
+          { value: 11, label: '普通门诊' },
200
+          { value: 12, label: '门诊挂号' },
201
+          { value: 13, label: '急诊' },
202
+          { value: 14, label: '门诊特殊病' },
203
+          { value: 15, label: '门诊统筹' },
204
+          { value: 16, label: '门诊慢性病' },
205
+          { value: 21, label: '普通住院' }
206
         ],
206
         ],
207
         medical_care: [
207
         medical_care: [
208
-          {value: 11, label: "普通门诊"},
209
-          {value: 12, label: '家庭通道'},
210
-          {value: 13, label: "门诊大病"},
211
-          {value: 14, label: "重疾特药"},
212
-          {value: 15, label: "门诊慢病"},
213
-          {value: 16, label: "门诊特检"},
214
-          {value: 17, label: "健康体检"},
215
-          {value: 18, label: "预防接种"},
216
-          {value: 19, label: "门诊输血"},
217
-          {value: 91, label: "新冠肺炎门诊"},
208
+          { value: 11, label: '普通门诊' },
209
+          { value: 12, label: '家庭通道' },
210
+          { value: 13, label: '门诊大病' },
211
+          { value: 14, label: '重疾特药' },
212
+          { value: 15, label: '门诊慢病' },
213
+          { value: 16, label: '门诊特检' },
214
+          { value: 17, label: '健康体检' },
215
+          { value: 18, label: '预防接种' },
216
+          { value: 19, label: '门诊输血' },
217
+          { value: 91, label: '新冠肺炎门诊' }
218
         ],
218
         ],
219
 
219
 
220
-
221
         form: {
220
         form: {
222
           id: '',
221
           id: '',
223
           settlement_value: '',
222
           settlement_value: '',
236
           doctor: '',
235
           doctor: '',
237
           id_card_type: 1,
236
           id_card_type: 1,
238
           department: '',
237
           department: '',
239
-          registration_fee: 0,
240
-          medical_expenses: 0,
238
+          registration_fee: '',
239
+          medical_expenses: '',
241
           cost: '',
240
           cost: '',
242
           phone: '',
241
           phone: '',
243
-          social_type: '',
242
+          social_type: ''
244
         }, IDCardTypes: [{
243
         }, IDCardTypes: [{
245
           value: 1,
244
           value: 1,
246
           label: '社保卡'
245
           label: '社保卡'
247
         }, {
246
         }, {
248
           value: 2,
247
           value: 2,
249
-          label: "身份证"
248
+          label: '身份证'
250
         }, {
249
         }, {
251
           value: 3,
250
           value: 3,
252
-          label: "电子凭证"
253
-        },],
251
+          label: '电子凭证'
252
+        }],
254
         settlement: [
253
         settlement: [
255
-          {value: 1, label: '医保'},
256
-          {value: 2, label: '自费'},
257
-          {value: 3, label: '公费'},
258
-          {value: 4, label: '农保'},
259
-          {value: 5, label: '会员'},
260
-          {value: 6, label: '职工'},
261
-          {value: 7, label: '合同'}
254
+          { value: 1, label: '医保' },
255
+          { value: 2, label: '自费' },
256
+          { value: 3, label: '公费' },
257
+          { value: 4, label: '农保' },
258
+          { value: 5, label: '会员' },
259
+          { value: 6, label: '职工' },
260
+          { value: 7, label: '合同' }
262
         ],
261
         ],
263
         sex: [{
262
         sex: [{
264
           value: 1,
263
           value: 1,
272
           label: '内地身份证'
271
           label: '内地身份证'
273
         }, {
272
         }, {
274
           value: 2,
273
           value: 2,
275
-          label: "社保卡"
274
+          label: '社保卡'
276
         }, {
275
         }, {
277
           value: 3,
276
           value: 3,
278
-          label: "护照"
277
+          label: '护照'
279
         }, {
278
         }, {
280
           value: 4,
279
           value: 4,
281
-          label: "军官证"
280
+          label: '军官证'
282
         }, {
281
         }, {
283
           value: 5,
282
           value: 5,
284
-          label: "台胞证"
283
+          label: '台胞证'
285
         }, {
284
         }, {
286
           value: 6,
285
           value: 6,
287
-          label: "港澳地区身份证"
286
+          label: '港澳地区身份证'
288
         }],
287
         }],
289
         medicalCare: [{
288
         medicalCare: [{
290
           value: 1,
289
           value: 1,
291
           label: '职工基本医疗保险'
290
           label: '职工基本医疗保险'
292
         }, {
291
         }, {
293
           value: 2,
292
           value: 2,
294
-          label: "公务员医疗补助"
293
+          label: '公务员医疗补助'
295
         }, {
294
         }, {
296
           value: 3,
295
           value: 3,
297
-          label: "大额医疗费用补助"
296
+          label: '大额医疗费用补助'
298
         }, {
297
         }, {
299
           value: 4,
298
           value: 4,
300
-          label: "离休人员医疗"
299
+          label: '离休人员医疗'
301
         }, {
300
         }, {
302
           value: 5,
301
           value: 5,
303
-          label: "城乡居民基本医疗保险"
302
+          label: '城乡居民基本医疗保险'
304
         }, {
303
         }, {
305
           value: 6,
304
           value: 6,
306
-          label: "城乡居民大病医疗保险"
305
+          label: '城乡居民大病医疗保险'
307
         }, {
306
         }, {
308
           value: 7,
307
           value: 7,
309
-          label: "生育保险"
308
+          label: '生育保险'
310
         }],
309
         }],
311
         register: [{
310
         register: [{
312
           value: 1,
311
           value: 1,
313
           label: '普通'
312
           label: '普通'
314
         }, {
313
         }, {
315
           value: 2,
314
           value: 2,
316
-          label: "主治"
315
+          label: '主治'
317
         }, {
316
         }, {
318
           value: 3,
317
           value: 3,
319
-          label: "主任"
318
+          label: '主任'
320
         }, {
319
         }, {
321
           value: 4,
320
           value: 4,
322
-          label: "免收诊金"
321
+          label: '免收诊金'
323
         }, {
322
         }, {
324
           value: 5,
323
           value: 5,
325
-          label: "专家"
324
+          label: '专家'
326
         }],
325
         }],
327
         rules: {
326
         rules: {
328
-          name: [{required: true, message: "患者姓名不能为空", trigger: 'blur'}],
329
-          gender: [{required: true, message: "患者性别不能为空", trigger: 'blur'}],
330
-          id_card: [{required: true, message: '证件号码不能为空', trigger: 'blur'}],
331
-          register: [{required: true, message: '请选择挂号类型', trigger: 'blur'}],
332
-          doctor: [{required: true, message: '请选择医生', trigger: 'blur'}],
333
-          department: [{required: true, message: '请填写科室', trigger: 'blur'}],
334
-          age: [{required: true, message: "患者年龄不能为空", trigger: 'blur'}],
335
-          birthday: [{required: true, message: "患者出生日期不能为空", trigger: 'blur'}],
336
-          certificates: [{required: true, message: "证件类型不能为空", trigger: 'change'}],
337
-          id_card_type: [{required: true, message: "读卡类型不能为空", trigger: 'change'}],
338
-          p_type: [{required: true, message: "处方类型不能为空", trigger: 'change'}],
339
-          sick_type: [{required: true, message: "大病类别不能为空", trigger: 'change'}],
340
-          diagnosis: [{required: true, message: "诊断不能为空", trigger: 'change'}],
327
+          name: [{ required: true, message: '患者姓名不能为空', trigger: 'blur' }],
328
+          gender: [{ required: true, message: '患者性别不能为空', trigger: 'blur' }],
329
+          id_card: [{ required: true, message: '证件号码不能为空', trigger: 'blur' }],
330
+          register: [{ required: true, message: '请选择挂号类型', trigger: 'blur' }],
331
+          doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }],
332
+          department: [{ required: true, message: '请填写科室', trigger: 'blur' }],
333
+          age: [{ required: true, message: '患者年龄不能为空', trigger: 'blur' }],
334
+          birthday: [{ required: true, message: '患者出生日期不能为空', trigger: 'blur' }],
335
+          certificates: [{ required: true, message: '证件类型不能为空', trigger: 'change' }],
336
+          id_card_type: [{ required: true, message: '读卡类型不能为空', trigger: 'change' }],
337
+          p_type: [{ required: true, message: '处方类型不能为空', trigger: 'change' }],
338
+          sick_type: [{ required: true, message: '大病类别不能为空', trigger: 'change' }],
339
+          diagnosis: [{ required: true, message: '诊断不能为空', trigger: 'change' }]
341
         },
340
         },
342
         visibility: false,
341
         visibility: false,
343
         labelPosition: 'right',
342
         labelPosition: 'right',
360
           medical_expenses: '',
359
           medical_expenses: '',
361
           cost: '',
360
           cost: '',
362
           phone: '',
361
           phone: '',
363
-          social_type: '',
364
-        },
362
+          social_type: ''
363
+        }
365
 
364
 
366
       }
365
       }
367
     },
366
     },
385
 
384
 
386
       },
385
       },
387
       sick: Array,
386
       sick: Array,
388
-      diagnoses: Array,
387
+      diagnoses: Array
389
     },
388
     },
390
     methods: {
389
     methods: {
391
       handleSelect(val) {
390
       handleSelect(val) {
392
-        this.form.id = val.id;
393
-        this.form.name = val.name;
394
-        this.form.gender = val.gender;
395
-        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}');
396
-        this.form.phone = val.phone;
397
-        this.form.id_card = val.id_card_no;
398
-        var thisLen = this.form.id_card.length;
399
-        var birth = "";
391
+        this.form.id = val.id
392
+        this.form.name = val.name
393
+        this.form.gender = val.gender
394
+        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
395
+        this.form.phone = val.phone
396
+        this.form.id_card = val.id_card_no
397
+        var thisLen = this.form.id_card.length
398
+        var birth = ''
400
         if (thisLen == 15) {
399
         if (thisLen == 15) {
401
-          birth = "19" + this.form.id_card.substr(6, 6);
400
+          birth = '19' + this.form.id_card.substr(6, 6)
402
         } else {
401
         } else {
403
-          birth = this.form.id_card.substr(6, 8);
402
+          birth = this.form.id_card.substr(6, 8)
404
         }
403
         }
405
         var births =
404
         var births =
406
           birth.substr(0, 4) +
405
           birth.substr(0, 4) +
407
-          "-" +
406
+          '-' +
408
           birth.substr(4, 2) +
407
           birth.substr(4, 2) +
409
-          "-" +
410
-          birth.substr(6, 2);
411
-        this.form.age = jsGetAge(births, "-");
408
+          '-' +
409
+          birth.substr(6, 2)
410
+        this.form.age = jsGetAge(births, '-')
412
       },
411
       },
413
       querySearchAsync(keyword, cb) {
412
       querySearchAsync(keyword, cb) {
414
-        let key = '';
413
+        let key = ''
415
         if (keyword != undefined) {
414
         if (keyword != undefined) {
416
           key = keyword
415
           key = keyword
417
         }
416
         }
418
-        let searchArray = [];
417
+        let searchArray = []
419
         PostSearch(key).then(response => {
418
         PostSearch(key).then(response => {
420
           if (response.data.state == 1) {
419
           if (response.data.state == 1) {
421
-            searchArray = response.data.data.patient;
420
+            searchArray = response.data.data.patient
422
             cb(searchArray)
421
             cb(searchArray)
423
           } else {
422
           } else {
424
             cb([])
423
             cb([])
426
         })
425
         })
427
       },
426
       },
428
       reading(medicalInsuranceCard) {
427
       reading(medicalInsuranceCard) {
429
-        var that = this;
428
+        var that = this
430
         if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
429
         if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
431
-          this.$message.error("请先选择读卡类型");
430
+          this.$message.error('请先选择读卡类型')
432
           return
431
           return
433
         }
432
         }
434
         let params = {
433
         let params = {
435
           'id_card_type': this.form.id_card_type,
434
           'id_card_type': this.form.id_card_type,
436
-          'admin_user_id': this.$store.getters.xt_user.user.id,
435
+          'admin_user_id': this.$store.getters.xt_user.user.id
437
 
436
 
438
-        };
437
+        }
439
         axios.get('http://127.0.0.1:9532/api/sscard', {
438
         axios.get('http://127.0.0.1:9532/api/sscard', {
440
           params: params
439
           params: params
441
         })
440
         })
442
-          .then(function (response) {
441
+          .then(function(response) {
443
             if (response.data.state == 0) {
442
             if (response.data.state == 0) {
444
-              that.$message.error(response.data.msg);
443
+              that.$message.error(response.data.msg)
445
               return false
444
               return false
446
             } else {
445
             } else {
447
-              var patient = response.data.data.patient;
446
+              var patient = response.data.data.patient
448
 
447
 
449
               if (that.form.id_card_type == 1) {
448
               if (that.form.id_card_type == 1) {
450
-                this.form.id = patient.id;
451
-                that.form.name = patient.name;
452
-                that.form.sex = patient.gender;
453
-                that.form.age = patient.age;
454
-                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
455
-                that.form.phone = patient.phone;
456
-                that.form.idCard = patient.id_card_no;
449
+                this.form.id = patient.id
450
+                that.form.name = patient.name
451
+                that.form.sex = patient.gender
452
+                that.form.age = patient.age
453
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
454
+                that.form.phone = patient.phone
455
+                that.form.idCard = patient.id_card_no
457
                 that.form.medicalInsuranceCard = response.data.data.number
456
                 that.form.medicalInsuranceCard = response.data.data.number
458
 
457
 
459
               } else if (that.form.id_card_type == 2) {
458
               } else if (that.form.id_card_type == 2) {
460
-                this.form.id = patient.id;
461
-                that.form.name = patient.name;
462
-                that.form.sex = patient.gender;
463
-                that.form.age = patient.age;
464
-                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
465
-                that.form.phone = patient.phone;
459
+                this.form.id = patient.id
460
+                that.form.name = patient.name
461
+                that.form.sex = patient.gender
462
+                that.form.age = patient.age
463
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
464
+                that.form.phone = patient.phone
466
                 that.form.idCard = patient.id_card_no
465
                 that.form.idCard = patient.id_card_no
467
               }
466
               }
468
-              that.$message({message: '读卡成功', type: 'success'})
467
+              that.$message({ message: '读卡成功', type: 'success' })
469
             }
468
             }
470
           })
469
           })
471
-          .catch(function (error) {
472
-
473
-          });
470
+          .catch(function(error) {
474
 
471
 
472
+          })
475
 
473
 
476
       },
474
       },
477
       getDictionaryDataConfig(module, filed_name) {
475
       getDictionaryDataConfig(module, filed_name) {
478
         return getDictionaryDataConfig(module, filed_name)
476
         return getDictionaryDataConfig(module, filed_name)
479
       },
477
       },
480
-      show: function () {
481
-        this.visibility = true;
478
+      show: function() {
479
+        this.visibility = true
482
         // this.form = Object.assign({}, this.resetForm)
480
         // this.form = Object.assign({}, this.resetForm)
483
-        this.form.id = 0;
484
-        this.form.settlement_value = '';
485
-        this.form.medical_insurance_card = '';
486
-        this.form.name = '';
487
-        this.form.gender = '';
488
-        this.form.medical_care = '';
489
-        this.form.birthda = '';
490
-        this.form.age = '';
491
-        this.form.id_card = '';
492
-        this.form.register = '';
493
-        this.form.doctor = '';
494
-        this.form.department = '';
495
-        this.form.registration_fee = 0;
496
-        this.form.medical_expenses = 0;
497
-        this.form.cost = '';
498
-        this.form.phone = '';
499
-        this.form.social_type = '';
500
-
501
-        this.form.p_type = 14;
502
-        this.form.sick_type = this.sick[0].id;
503
-        this.form.diagnosis = this.diagnoses[0].id;
504
-        this.form.id_card_type = 2;
505
-        this.form.certificates = 1;
506
-        this.form.settlement_value = 1
481
+        this.form.id = 0
482
+        this.form.settlement_value = ''
483
+        this.form.medical_insurance_card = ''
484
+        this.form.name = ''
485
+        this.form.gender = ''
486
+        this.form.medical_care = ''
487
+        this.form.birthda = ''
488
+        this.form.age = ''
489
+        this.form.id_card = ''
490
+        this.form.register = ''
491
+        this.form.doctor = ''
492
+        this.form.department = ''
493
+        this.form.registration_fee = ''
494
+        this.form.medical_expenses = ''
495
+        this.form.cost = ''
496
+        this.form.phone = ''
497
+        this.form.social_type = ''
498
+
499
+        this.form.p_type = 14
500
+        this.form.sick_type = this.sick[0].id
501
+        this.form.diagnosis = this.diagnoses[0].id
502
+        this.form.id_card_type = 2
503
+        this.form.certificates = 1
504
+
507
         // this.form.name = patientInfo.name
505
         // this.form.name = patientInfo.name
508
         // this.form.gender = patientInfo.gender
506
         // this.form.gender = patientInfo.gender
509
         // this.form.age = patientInfo.age
507
         // this.form.age = patientInfo.age
519
       },
517
       },
520
 
518
 
521
       hide: function () {
519
       hide: function () {
522
-        this.visibility = false;
520
+        this.visibility = false
523
         this.$refs['formValue'].resetFields()
521
         this.$refs['formValue'].resetFields()
524
-      }, cancel: function (formName) {
525
-        this.$emit('cancel', this.getValue());
522
+      }, cancel: function(formName) {
523
+        this.$emit('cancel', this.getValue())
526
         this.$refs['formValue'].resetFields()
524
         this.$refs['formValue'].resetFields()
527
       },
525
       },
528
-      confirm: function (formName) {
526
+      confirm: function(formName) {
529
         this.$refs['formValue'].validate((valid) => {
527
         this.$refs['formValue'].validate((valid) => {
530
           if (valid) {
528
           if (valid) {
531
-            let value = {};
532
-            value = this.getValue();
529
+            let value = {}
530
+            value = this.getValue()
533
             this.$emit('confirm', value)
531
             this.$emit('confirm', value)
534
           }
532
           }
535
         })
533
         })
536
       },
534
       },
537
-      getValue: function () {
538
-        let form = {};
539
-        form = this.form;
535
+      getValue: function() {
536
+        let form = {}
537
+        form = this.form
540
         return form
538
         return form
541
       }
539
       }
542
     }
540
     }
545
 </script>
543
 </script>
546
 
544
 
547
 <style lang="scss" scoped>
545
 <style lang="scss" scoped>
548
-  .registerDialog {
546
+    .registerDialog {
549
 
547
 
550
-  .el-form {
551
-    display: flex;
552
-    flex-wrap: wrap;
553
-  }
548
+    .el-form {
549
+        display: flex;
550
+        flex-wrap: wrap;
551
+    }
554
 
552
 
555
-  .el-form-item {
556
-    width: 50%;
557
-  }
553
+    .el-form-item {
554
+        width: 50%;
555
+    }
558
 
556
 
559
-  }
557
+    }
560
 </style>
558
 </style>

+ 3 - 3
src/xt_pages/outpatientCharges/costComparison.vue View File

158
                 <el-form :model="form" label-width="100px">
158
                 <el-form :model="form" label-width="100px">
159
                     <el-form-item label="时间" label-width="100px">
159
                     <el-form-item label="时间" label-width="100px">
160
                         <el-date-picker v-model="start_time" prefix-icon="el-icon-date"
160
                         <el-date-picker v-model="start_time" prefix-icon="el-icon-date"
161
-                                        @change="handleStartTimeChange" :editable="false" :clearable="false"
161
+                                        :editable="false" :clearable="false"
162
                                         style="width: 200px;" type="date" placeholder="选择开始日期"
162
                                         style="width: 200px;" type="date" placeholder="选择开始日期"
163
                                         format="yyyy-MM-dd"
163
                                         format="yyyy-MM-dd"
164
                                         value-format="yyyy-MM-dd"
164
                                         value-format="yyyy-MM-dd"
166
                         -
166
                         -
167
 
167
 
168
                         <el-date-picker v-model="end_time" prefix-icon="el-icon-date"
168
                         <el-date-picker v-model="end_time" prefix-icon="el-icon-date"
169
-                                        @change="handleEndTimeChange" :editable="false" :clearable="false"
169
+                                       :editable="false" :clearable="false"
170
                                         style="width: 200px;margin-right:10px;" type="date" placeholder="选择结束日期"
170
                                         style="width: 200px;margin-right:10px;" type="date" placeholder="选择结束日期"
171
                                         format="yyyy-MM-dd"
171
                                         format="yyyy-MM-dd"
172
                                         value-format="yyyy-MM-dd"
172
                                         value-format="yyyy-MM-dd"
458
                   that.$alert(result_desc, '对账结果', {
458
                   that.$alert(result_desc, '对账结果', {
459
                     confirmButtonText: '确定',
459
                     confirmButtonText: '确定',
460
                     callback: action => {
460
                     callback: action => {
461
-                      this.dialogFormVisible = false
461
+                      that.dialogFormVisible = false
462
                     }
462
                     }
463
                   })
463
                   })
464
 
464
 

+ 185 - 57
src/xt_pages/outpatientCharges/incomeStatistics.vue View File

11
           <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
11
           <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
12
             搜索
12
             搜索
13
           </el-button>
13
           </el-button>
14
-          <el-select size="small" v-model="admin_user_id" placeholder="请选择" style="width:150px;margin-left:10px;" @change="changeDoctor">
15
-            <el-option
16
-              label="全部"
17
-              value="0">
18
-            </el-option>
19
-            <el-option
20
-              v-for="(item,index) in type"
21
-              :key="index"
22
-              :label="item.user_name"
23
-              :value="item.admin_user_id">
24
-            </el-option>
25
-          </el-select>
14
+
26
           <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
15
           <el-date-picker size="small" v-model="start_time" prefix-icon="el-icon-date"
27
                           @change="handleStartTimeChange" :editable="false" :clearable="false"
16
                           @change="handleStartTimeChange" :editable="false" :clearable="false"
28
                           style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
17
                           style="width: 196px;margin-right:10px;" type="date" placeholder="选择开始日期"
36
                           format="yyyy-MM-dd"
25
                           format="yyyy-MM-dd"
37
                           value-format="yyyy-MM-dd"
26
                           value-format="yyyy-MM-dd"
38
                           align="right"></el-date-picker>
27
                           align="right"></el-date-picker>
39
-          <!--<el-radio v-model="radio" label="1">明细</el-radio>-->
40
-          <!--<el-radio v-model="radio" label="2">汇总</el-radio>-->
28
+          <el-radio v-model="radio" label="1" @change="changeType">汇总</el-radio>
29
+          <el-radio v-model="radio" label="2"  @change="changeType">明细</el-radio>
41
         </div>
30
         </div>
42
         <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
31
         <el-button size="small" type="primary" @click="export_detail">报表下载</el-button>
43
       </div>
32
       </div>
44
       <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
33
       <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"
45
-                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
34
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row  v-if="radio == '1'">
46
         <el-table-column
35
         <el-table-column
47
           prop="date"
36
           prop="date"
48
           label="序号"
37
           label="序号"
52
         >
41
         >
53
         </el-table-column>
42
         </el-table-column>
54
         <el-table-column align="center" prop="name" label="收费日期">
43
         <el-table-column align="center" prop="name" label="收费日期">
55
-          <template slot-scope="scope">{{ scope.row.selt_time }}</template>
44
+          <template slot-scope="scope" >{{ scope.row.settle_accounts_date }}</template>
45
+        </el-table-column>
46
+        <el-table-column align="center" prop="name" label="总金额">
47
+          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
48
+        </el-table-column>
49
+        <el-table-column align="center" prop="name" label="医保统筹金额">
50
+          <template slot-scope="scope">{{scope.row.fund_pay_sumamt}}</template>
51
+        </el-table-column>
52
+        <el-table-column align="center" prop="name" label="大额基金金额">
53
+          <template slot-scope="scope">{{scope.row.hifob_pay}}</template>
54
+        </el-table-column>
55
+        <el-table-column align="center" prop="name" label="大病基金金额">
56
+          <template slot-scope="scope">{{scope.row.hifmi_pay}}</template>
57
+        </el-table-column>
58
+        <el-table-column align="center" prop="name" label="补充保险基金金额">
59
+          <template slot-scope="scope">{{scope.row.hifes_pay}}</template>
60
+        </el-table-column>
61
+        <el-table-column align="center" prop="name" label="医疗救助基金金额">
62
+          <template slot-scope="scope">{{scope.row.maf_pay}}</template>
63
+        </el-table-column>
64
+        <el-table-column align="center" prop="name" label="公务员基金">
65
+          <template slot-scope="scope">{{scope.row.cvlserv_pay}}</template>
66
+        </el-table-column>
67
+        <el-table-column align="center" prop="name" label="个人支付基金">
68
+          <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
56
         </el-table-column>
69
         </el-table-column>
70
+        <el-table-column align="center" prop="name" label="折扣金额">
71
+          <template slot-scope="scope">{{scope.row.discount_price}}</template>
72
+        </el-table-column>
73
+        <el-table-column align="center" prop="name" label="优惠金额">
74
+          <template slot-scope="scope">{{scope.row.preferential_price}}</template>
75
+        </el-table-column>
76
+        <el-table-column align="center" prop="name" label="个人账户支付金额">
77
+          <template slot-scope="scope">{{scope.row.acct_pay}}</template>
78
+        </el-table-column>
79
+        <!--<el-table-column align="center" prop="name" label="预交金">-->
80
+          <!--<template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>-->
81
+        <!--</el-table-column>-->
57
 
82
 
83
+        <!--<el-table-column align="center" prop="name" label="现金">-->
84
+          <!--<template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>-->
85
+        <!--</el-table-column>-->
58
 
86
 
59
-        <el-table-column align="center" prop="name" label="患者名字">
60
-          <template slot-scope="scope">{{ scope.row.psn_name }}</template>
61
-        </el-table-column>
62
-        <!--<el-table-column align="center" prop="name" label="患者类型">-->
63
-          <!--<template slot-scope="scope"></template>-->
87
+        <!--<el-table-column align="center" prop="name" label="微信">-->
88
+          <!--<template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>-->
64
         <!--</el-table-column>-->
89
         <!--</el-table-column>-->
65
-        <el-table-column align="center" prop="name" label="总金额">
66
-          <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
90
+
91
+        <!--<el-table-column align="center" prop="name" label="操作">-->
92
+          <!--<template slot-scope="scope">-->
93
+            <!--<el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>-->
94
+          <!--</template>-->
95
+        <!--</el-table-column>-->
96
+      </el-table>
97
+
98
+      <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }"  v-if="radio == '2'"
99
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
100
+        <el-table-column
101
+                prop="date"
102
+                label="序号"
103
+                width="60"
104
+                align="center"
105
+                type="index"
106
+        >
67
         </el-table-column>
107
         </el-table-column>
68
 
108
 
109
+        <el-table-column align="center" prop="name" label="收费日期">
110
+          <template slot-scope="scope" >{{ scope.row.setl_time }}</template>
111
+        </el-table-column>
112
+        <el-table-column align="center" prop="name" label="姓名">
113
+          <template slot-scope="scope" >{{ scope.row.psn_name }}</template>
114
+        </el-table-column>
69
         <el-table-column align="center" prop="name" label="总金额">
115
         <el-table-column align="center" prop="name" label="总金额">
70
           <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
116
           <template slot-scope="scope">{{scope.row.medfee_sumamt}}</template>
71
         </el-table-column>
117
         </el-table-column>
118
+        <el-table-column align="center" prop="name" label="基金支付">
119
+          <template slot-scope="scope">{{scope.row.fund_pay_sumamt}}</template>
120
+        </el-table-column>
121
+        <el-table-column align="center" prop="name" label="个人支付基金">
122
+          <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
123
+        </el-table-column>
72
 
124
 
125
+        <el-table-column align="center" prop="name" label="床位费">
126
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'01')}}</template>
127
+        </el-table-column>
128
+
129
+        <el-table-column align="center" prop="name" label="诊察费">
130
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'02')}}</template>
131
+        </el-table-column>
73
 
132
 
74
 
133
 
75
-        <el-table-column align="center" prop="name" label="实收金额">
76
-          <template slot-scope="scope">{{scope.row.reality_price}}</template>
134
+        <el-table-column align="center" prop="name" label="检查费">
135
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'03')}}</template>
77
         </el-table-column>
136
         </el-table-column>
78
-        <el-table-column align="center" prop="name" label="科室">
79
-          <template slot-scope="scope">{{scope.row.p_info.department.name}}</template>
137
+
138
+        <el-table-column align="center" prop="name" label="化验费">
139
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'04')}}</template>
80
         </el-table-column>
140
         </el-table-column>
81
-        <el-table-column align="center" prop="name" label="收费日期">
82
-          <template slot-scope="scope">  {{getTimes(scope.row.settle_accounts_date)}}</template>
141
+
142
+        <el-table-column align="center" prop="name" label="治疗费">
143
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'05')}}</template>
83
         </el-table-column>
144
         </el-table-column>
84
-        <el-table-column align="center" prop="name" label="收费员">
85
-          <template slot-scope="scope">{{ scope.row.p_info.doctor }}</template>
145
+
146
+
147
+        <el-table-column align="center" prop="name" label="手术费">
148
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'06')}}</template>
86
         </el-table-column>
149
         </el-table-column>
87
-        <el-table-column align="center" prop="name" label="状态">
88
-          <template slot-scope="scope">
89
-            <div v-if="scope.row.order_status == 1">待结算</div>
90
-            <div v-if="scope.row.order_status == 2">已结算</div>
91
-            <div v-if="scope.row.order_status == 3">已退费</div>
92
-          </template>
150
+
151
+        <el-table-column align="center" prop="name" label="护理费">
152
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'07')}}</template>
93
         </el-table-column>
153
         </el-table-column>
94
-        <el-table-column align="center" prop="name" label="操作">
95
-          <template slot-scope="scope">
96
-            <el-button size="mini" type="primary" @click="toDetail(scope.row)">详情</el-button>
97
-          </template>
154
+
155
+
156
+        <el-table-column align="center" prop="name" label="卫生材料费">
157
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'08')}}</template>
98
         </el-table-column>
158
         </el-table-column>
159
+
160
+        <el-table-column align="center" prop="name" label="西药费">
161
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'09')}}</template>
162
+        </el-table-column>
163
+
164
+        <el-table-column align="center" prop="name" label="中药饮片费">
165
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'10')}}</template>
166
+        </el-table-column>
167
+
168
+
169
+        <el-table-column align="center" prop="name" label="中成药费">
170
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'11')}}</template>
171
+        </el-table-column>
172
+
173
+        <el-table-column align="center" prop="name" label="一般诊疗费">
174
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'12')}}</template>
175
+        </el-table-column>
176
+
177
+        <el-table-column align="center" prop="name" label="挂号费">
178
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'13')}}</template>
179
+        </el-table-column>
180
+
181
+        <el-table-column align="center" prop="name" label="其他费">
182
+          <template slot-scope="scope">{{getPrice(scope.row.order_info,'14')}}</template>
183
+        </el-table-column>
184
+        <el-table-column align="center" prop="name" label="医保支付">
185
+          <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
186
+        </el-table-column>
187
+        <el-table-column align="center" prop="name" label="现金">
188
+        <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
189
+        </el-table-column>
190
+        <el-table-column align="center" prop="name" label="微信">
191
+        <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
192
+        </el-table-column>
193
+        <el-table-column align="center" prop="name" label="支付宝">
194
+          <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
195
+        </el-table-column>
196
+        <el-table-column align="center" prop="name" label="银行卡">
197
+          <template slot-scope="scope">{{scope.row.psn_cash_pay}}</template>
198
+        </el-table-column>
199
+
99
       </el-table>
200
       </el-table>
201
+
100
       <el-pagination
202
       <el-pagination
101
         @size-change="handleSizeChange"
203
         @size-change="handleSizeChange"
102
         @current-change="handleCurrentChange"
204
         @current-change="handleCurrentChange"
118
 
220
 
119
 <script>
221
 <script>
120
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
222
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
121
-  import { getHisOrderList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
223
+  import { getIncomeStatisticsDataList,getDoctorList,getExportConsumeDetailList } from '@/api/his/his'
122
   import { uParseTime } from '@/utils/tools'
224
   import { uParseTime } from '@/utils/tools'
123
 
225
 
124
   export default {
226
   export default {
132
           { path: false, name: '项目消费明细汇总' }
234
           { path: false, name: '项目消费明细汇总' }
133
         ],
235
         ],
134
         tableData: [],
236
         tableData: [],
237
+        radio:'1',
135
         limit:10,
238
         limit:10,
136
         page:1,
239
         page:1,
137
         keywords:"",
240
         keywords:"",
144
       }
247
       }
145
     },
248
     },
146
     methods: {
249
     methods: {
250
+      getPrice(order_info, number){
251
+
252
+
253
+
254
+
255
+
256
+      },
257
+      changeType(val){
258
+
259
+        let params= {
260
+          page : this.page,
261
+          limit: this.limit,
262
+          keywords:this.keywords,
263
+          start_time:this.start_time,
264
+          end_time: this.end_time,
265
+          statistics_type: this.radio
266
+        }
267
+        getIncomeStatisticsDataList(params).then(response => {
268
+          if (response.data.state == 0) {
269
+            this.$message.error(response.data.msg)
270
+            return false
271
+          } else {
272
+            this.tableData = response.data.data.list
273
+            this.total = response.data.data.total
274
+          }
275
+        })
276
+
277
+
278
+      },
147
       export_detail(){
279
       export_detail(){
148
         let params= {
280
         let params= {
149
           start_time:this.start_time,
281
           start_time:this.start_time,
248
       },  formatJson(filterVal, jsonData) {
380
       },  formatJson(filterVal, jsonData) {
249
         return jsonData.map(v => filterVal.map(j => v[j]))
381
         return jsonData.map(v => filterVal.map(j => v[j]))
250
       },
382
       },
251
-      changeDoctor(){
252
-        this.page = 1
253
-        this.keywords=""
254
-        this.getHisOrderList()
255
-      },
383
+
256
       handleSizeChange(limit){
384
       handleSizeChange(limit){
257
         this.limit = limit;
385
         this.limit = limit;
258
-        this.getHisOrderList()
386
+        this.getIncomeStatisticsDataList()
259
 
387
 
260
       },handleCurrentChange(page){
388
       },handleCurrentChange(page){
261
         this.page = page;
389
         this.page = page;
262
-        this.getHisOrderList()
390
+        this.getIncomeStatisticsDataList()
263
 
391
 
264
 
392
 
265
       },
393
       },
266
       handleStartTimeChange(){
394
       handleStartTimeChange(){
267
         this.page = 1
395
         this.page = 1
268
         this.keywords=""
396
         this.keywords=""
269
-        this.getHisOrderList()
397
+        this.getIncomeStatisticsDataList()
270
       },handleEndTimeChange(){
398
       },handleEndTimeChange(){
271
         this.page = 1
399
         this.page = 1
272
         this.keywords=""
400
         this.keywords=""
273
-        this.getHisOrderList()
401
+        this.getIncomeStatisticsDataList()
274
       },
402
       },
275
       searchAction(){
403
       searchAction(){
276
         this.page = 1
404
         this.page = 1
277
-        this.getHisOrderList()
405
+        this.getIncomeStatisticsDataList()
278
 
406
 
279
 
407
 
280
       },
408
       },
288
           return uParseTime(value, temp)
416
           return uParseTime(value, temp)
289
         }
417
         }
290
         return ''
418
         return ''
291
-      },getHisOrderList(){
419
+      },getIncomeStatisticsDataList(){
292
         let params= {
420
         let params= {
293
           page : this.page,
421
           page : this.page,
294
           limit: this.limit,
422
           limit: this.limit,
295
           keywords:this.keywords,
423
           keywords:this.keywords,
296
           start_time:this.start_time,
424
           start_time:this.start_time,
297
           end_time: this.end_time,
425
           end_time: this.end_time,
298
-          type: this.admin_user_id
426
+          statistics_type: this.radio
299
         }
427
         }
300
-        getHisOrderList(params).then(response => {
428
+        getIncomeStatisticsDataList(params).then(response => {
301
           if (response.data.state == 0) {
429
           if (response.data.state == 0) {
302
             this.$message.error(response.data.msg)
430
             this.$message.error(response.data.msg)
303
             return false
431
             return false
304
           } else {
432
           } else {
305
-            this.tableData = response.data.data.order
433
+            this.tableData = response.data.data.list
306
             this.total = response.data.data.total
434
             this.total = response.data.data.total
307
           }
435
           }
308
         })
436
         })
321
       }
449
       }
322
     }, created() {
450
     }, created() {
323
      this.getDoctorList()
451
      this.getDoctorList()
324
-     this.getHisOrderList()
452
+     this.getIncomeStatisticsDataList()
325
 
453
 
326
 
454
 
327
     }
455
     }

+ 10 - 5
src/xt_pages/outpatientCharges/listPrint.vue View File

56
       if(this.org_id == 10106){
56
       if(this.org_id == 10106){
57
         this.getInfo10106(this.paramsObj.id)
57
         this.getInfo10106(this.paramsObj.id)
58
       }
58
       }
59
-      
59
+
60
     },
60
     },
61
 
61
 
62
     methods: {
62
     methods: {
85
                 price: infos.pric,
85
                 price: infos.pric,
86
                 count: infos.cnt
86
                 count: infos.cnt
87
               }
87
               }
88
+              console.log(infos)
88
               if (infos.advice && infos.advice.id == 0 && infos.project && infos.project.id > 0) {
89
               if (infos.advice && infos.advice.id == 0 && infos.project && infos.project.id > 0) {
89
                 obj['p_time'] = this.getTimes(infos.project.prescription.ctime)
90
                 obj['p_time'] = this.getTimes(infos.project.prescription.ctime)
90
-                obj['name'] = infos.project.project.project_name
91
+                if(infos.project.type == 2){
92
+                  obj['name'] = infos.project.project.project_name
93
+                }else if (infos.project.type == 3){
94
+                  obj['name'] = infos.project.good_info.good_name
95
+                }
91
                 obj['spec'] = 1
96
                 obj['spec'] = 1
92
-                obj['unit'] = infos.project.project.unit
97
+                obj['unit'] = infos.project.unit
93
 
98
 
94
               }
99
               }
95
 
100
 
189
             scanStyles: false
194
             scanStyles: false
190
           });
195
           });
191
         }
196
         }
192
-        
197
+
193
 
198
 
194
         // if (this.org_template_info.template_id == 1) {
199
         // if (this.org_template_info.template_id == 1) {
195
         //   printJS({
200
         //   printJS({
464
   .newContainer::-webkit-scrollbar {
469
   .newContainer::-webkit-scrollbar {
465
     height: 15px !important;
470
     height: 15px !important;
466
   }
471
   }
467
-</style>
472
+</style>

+ 10 - 10
src/xt_pages/outpatientCharges/listTemplate/printTwo.vue View File

84
         <div>
84
         <div>
85
             <div v-if="Object.values(obj)[index].length > 0" v-for="(item,itemIndex) in Object.values(obj)[index]" :key="itemIndex" style="border-bottom:1px solid #000;padding:10px 0;display:flex;" >
85
             <div v-if="Object.values(obj)[index].length > 0" v-for="(item,itemIndex) in Object.values(obj)[index]" :key="itemIndex" style="border-bottom:1px solid #000;padding:10px 0;display:flex;" >
86
                 <div style="width:20%;text-align:center;" v-if="item.advice_id > 0">{{ item.advice.drug.medical_insurance_number }}</div>
86
                 <div style="width:20%;text-align:center;" v-if="item.advice_id > 0">{{ item.advice.drug.medical_insurance_number }}</div>
87
-                <div style="width:20%;text-align:center;" v-if="item.project_id > 0">{{ item.project.project.medical_code }}</div>
87
+                <div style="width:20%;text-align:center;" v-if="item.project_id > 0">{{item.project.type == 2?item.project.project.medical_code: item.project.good_info.medical_insurance_number}}</div>
88
                 <div style="width:20%;text-align:center;" v-if="item.advice_id > 0">{{item.advice.drug.drug_name}}</div>
88
                 <div style="width:20%;text-align:center;" v-if="item.advice_id > 0">{{item.advice.drug.drug_name}}</div>
89
-                <div style="width:20%;text-align:center;" v-if="item.project_id > 0">{{item.project.project.project_name}}</div>
89
+                <div style="width:20%;text-align:center;" v-if="item.project_id > 0">{{item.project.type == 2?item.project.project.project_name:item.project.good_info.good_name}}</div>
90
 
90
 
91
                 <div style="width:10%;text-align:center;">{{item.pric}}</div>
91
                 <div style="width:10%;text-align:center;">{{item.pric}}</div>
92
                 <div style="width:10%;text-align:center;">{{item.cnt}}</div>
92
                 <div style="width:10%;text-align:center;">{{item.cnt}}</div>
97
             </div>
97
             </div>
98
         </div>
98
         </div>
99
     </div>
99
     </div>
100
-    
100
+
101
     <div style="display:flex;border-bottom:1px solid #000;padding:20px 0 10px;">
101
     <div style="display:flex;border-bottom:1px solid #000;padding:20px 0 10px;">
102
       <div style="width:70%;">合计:</div>
102
       <div style="width:70%;">合计:</div>
103
       <div style="width:10%;text-align:center;">{{info.medfee_sumamt}}</div>
103
       <div style="width:10%;text-align:center;">{{info.medfee_sumamt}}</div>
135
         default: function () {
135
         default: function () {
136
           return {}
136
           return {}
137
         }
137
         }
138
-      }, 
138
+      },
139
       order_infos: {
139
       order_infos: {
140
         type: Object,
140
         type: Object,
141
         default: function () {
141
         default: function () {
142
           return {}
142
           return {}
143
         }
143
         }
144
-      }, 
144
+      },
145
       p_admin: {
145
       p_admin: {
146
         type: Object,
146
         type: Object,
147
         default: function () {
147
         default: function () {
153
           return {}
153
           return {}
154
         }
154
         }
155
       }
155
       }
156
-    }, 
156
+    },
157
     data(){
157
     data(){
158
         return{
158
         return{
159
             obj:{},
159
             obj:{},
224
                     'med_chrgitm_type11':[],
224
                     'med_chrgitm_type11':[],
225
                     'med_chrgitm_type14':[],
225
                     'med_chrgitm_type14':[],
226
                 }
226
                 }
227
-                
227
+
228
                 newVal.map(item => {
228
                 newVal.map(item => {
229
-                    
229
+
230
                     if(item.med_chrgitm_type == '01'){
230
                     if(item.med_chrgitm_type == '01'){
231
                         obj.med_chrgitm_type01.push(item)
231
                         obj.med_chrgitm_type01.push(item)
232
                         this.price01 += item.det_item_fee_sumamt
232
                         this.price01 += item.det_item_fee_sumamt
255
                         obj.med_chrgitm_type14.push(item)
255
                         obj.med_chrgitm_type14.push(item)
256
                         this.price14 += item.det_item_fee_sumamt
256
                         this.price14 += item.det_item_fee_sumamt
257
                     }
257
                     }
258
-                    
258
+
259
                 })
259
                 })
260
                 this.obj = obj
260
                 this.obj = obj
261
                 console.log('this.obj',this.obj)
261
                 console.log('this.obj',this.obj)
264
         }
264
         }
265
     }
265
     }
266
 }
266
 }
267
-    
267
+
268
 
268
 
269
 
269
 
270
 </script>
270
 </script>

File diff suppressed because it is too large
+ 1043 - 660
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue


+ 218 - 218
src/xt_pages/outpatientCharges/statementPrint.vue View File

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
-    <template>
4
-      <el-button
5
-        style="position:fixed;right:25px;z-index:999"
6
-        :loading="loading"
7
-        size="small"
8
-        icon="el-icon-printer"
9
-        @click="printThisPage"
10
-        type="primary"
11
-      >打印</el-button
12
-      >
13
-    </template>
14
-
15
-    <div class='dialysisPage' style="padding-top:40px;">
16
-      <printOne :info="info" v-if="org_id != 9990"></printOne>
17
-      <printTwo  :info="info" v-if="org_id == 9990"></printTwo>
18
-    </div>
3
+       <template>
4
+        <el-button
5
+          style="position:fixed;right:25px;z-index:999"
6
+          :loading="loading"
7
+          size="small"
8
+          icon="el-icon-printer"
9
+          @click="printThisPage"
10
+          type="primary"
11
+          >打印</el-button
12
+        >
13
+      </template>
14
+
15
+      <div class='dialysisPage' style="padding-top:40px;">
16
+        <printOne :info="info" v-if="org_id != 9990"></printOne>
17
+        <printTwo  :info="info" v-if="org_id == 9990"></printTwo>
18
+      </div>
19
   </div>
19
   </div>
20
 </template>
20
 </template>
21
 
21
 
22
 <script>
22
 <script>
23
 
23
 
24
 
24
 
25
-  import { parseTime } from "@/utils";
26
-  import { getDialysisRecord } from "@/api/dialysis";
27
-  import { getDataConfig } from "@/utils/data";
28
-  import { jsGetAge, uParseTime } from "@/utils/tools";
29
-  import axios from 'axios'
30
-
31
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
32
-  import print from "print-js";
33
-  import printOne from "./statementTemplate/printOne"
34
-  import printTwo from "./statementTemplate/printTwo"
35
-  import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
36
-  export default {
37
-    name: "dialysisPrintOrder",
38
-    components: {
39
-      BreadCrumb,
40
-      printOne,
41
-      printTwo
42
-    },
43
-    props:{
44
-      paramsObj:Object
45
-    },
46
-    data() {
47
-      return {
48
-        crumbs: [
49
-          { path: false, name: '门诊医生站' },
50
-          { path: false, name: '打印' }
51
-        ],
52
-        record_date:"",
53
-        patientTableData:[],
54
-        advicePrint:[],
55
-        hisPatient:{},
56
-        patient:{},
57
-        search_input:"",
58
-        loading:false,
59
-        patient_id:0,
60
-        prescription_id:0,
61
-        ids:'',
62
-        info:null,
63
-        org_id:""
64
-      };
65
-    },
66
-    methods:{
67
-      printThisPage() {
68
-        var ptime = Math.round(new Date().getTime() / 1000);
69
-        this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
70
-
71
-        const style =
72
-          '@media print {.statementTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}';
25
+import { parseTime } from "@/utils";
26
+import { getDialysisRecord } from "@/api/dialysis";
27
+import { getDataConfig } from "@/utils/data";
28
+import { jsGetAge, uParseTime } from "@/utils/tools";
29
+import axios from 'axios'
30
+
31
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
32
+import print from "print-js";
33
+import printOne from "./statementTemplate/printOne"
34
+import printTwo from "./statementTemplate/printTwo"
35
+import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
36
+export default {
37
+  name: "dialysisPrintOrder",
38
+  components: {
39
+    BreadCrumb,
40
+    printOne,
41
+    printTwo
42
+  },
43
+  props:{
44
+    paramsObj:Object
45
+  },
46
+  data() {
47
+    return {
48
+      crumbs: [
49
+        { path: false, name: '门诊医生站' },
50
+        { path: false, name: '打印' }
51
+      ],
52
+      record_date:"",
53
+      patientTableData:[],
54
+      advicePrint:[],
55
+      hisPatient:{},
56
+      patient:{},
57
+      search_input:"",
58
+      loading:false,
59
+      patient_id:0,
60
+      prescription_id:0,
61
+      ids:'',
62
+      info:null,
63
+      org_id:""
64
+    };
65
+  },
66
+  methods:{
67
+    printThisPage() {
68
+      var ptime = Math.round(new Date().getTime() / 1000);
69
+      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
70
+
71
+      const style =
72
+        '@media print {.statementTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}';
73
         printJS({
73
         printJS({
74
-          printable: "statement-print",
75
-          type: "html",
76
-          style: style,
77
-          scanStyles: false
74
+            printable: "statement-print",
75
+            type: "html",
76
+            style: style,
77
+            scanStyles: false
78
         });
78
         });
79
 
79
 
80
-        // if (this.org_template_info.template_id == 1) {
81
-        //   printJS({
82
-        //     printable: "dialysis-print-box",
83
-        //     type: "html",
84
-        //     style: style,
85
-        //     scanStyles: false
86
-        //   });
87
-        // }
88
-      },
89
-      getAllDoctorList(){
90
-        getAllDoctorList().then(response=>{
91
-          if(response.data.state == 1){
92
-            var doctor =  response.data.data.doctor;
93
-
94
-            this.doctorList = doctor
95
-          }
96
-        })
97
-      },
98
-      getAllHisPatientList(){
99
-        const params = {
100
-          record_date:this.record_date
101
-        };
102
-        getAllHisPatientList(params).then(response=>{
103
-          if(response.data.state == 1){
80
+      // if (this.org_template_info.template_id == 1) {
81
+      //   printJS({
82
+      //     printable: "dialysis-print-box",
83
+      //     type: "html",
84
+      //     style: style,
85
+      //     scanStyles: false
86
+      //   });
87
+      // }
88
+    },
89
+    getAllDoctorList(){
90
+      getAllDoctorList().then(response=>{
91
+        if(response.data.state == 1){
92
+               var doctor =  response.data.data.doctor;
93
+
94
+               this.doctorList = doctor
95
+             }
96
+         })
97
+     },
98
+    getAllHisPatientList(){
99
+         const params = {
100
+           record_date:this.record_date
101
+         };
102
+      getAllHisPatientList(params).then(response=>{
103
+         if(response.data.state == 1){
104
             this.patientTableData = response.data.data.list;
104
             this.patientTableData = response.data.data.list;
105
             this.patientTableDataTwo = response.data.data.list;
105
             this.patientTableDataTwo = response.data.data.list;
106
 
106
 
120
             // this.choosePatient(this.patientTableData[0])
120
             // this.choosePatient(this.patientTableData[0])
121
             this.cal_one = cal_one;
121
             this.cal_one = cal_one;
122
             this.cal_two = cal_two
122
             this.cal_two = cal_two
123
-          }
124
-        })
125
-      },
126
-
127
-      changePatient(row){
128
-        console.log("row",row);
129
-        this.patient_id = row.patient_id;
130
-        this.record_date = this.record_date;
131
-        this.prescription_id = this.prescription_id
132
-        //   var params = {
133
-        //     patient_id:row.patient_id,
134
-        //     record_date:this.record_date,
135
-        //     prescription_id:this.prescription_id,
136
-        //   }
137
-        // getPrescriptionPrint(params).then(response=>{
138
-        //     if(response.data.state == 1){
139
-        //       var advicePrint =  response.data.data.advicePrint
140
-        //       console.log("adviceprint",advicePrint)
141
-        //       this.advicePrint = advicePrint
142
-        //       // var hisPatient =  response.data.data.hisPatient
143
-        //       // console.log("hispatient",hisPatient)
144
-        //       // this.hisPatient = hisPatient
145
-        //       var patient =  response.data.data.patient
146
-        //       console.log("patient",patient)
147
-        //       this.patient = patient
148
-        //       var doctorPorject = response.data.data.doctorPorject
149
-        //       console.log("doctorporject",doctorPorject)
150
-        //     }
151
-        // })
152
-      }, getTimes(time) {
153
-        return uParseTime(time, '{y}-{m}-{d}')
154
-      },
155
-      searchAction(){
123
+         }
124
+      })
125
+    },
156
 
126
 
157
-      },
158
-      getInfo(order_id) {
159
-        if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 ||  this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 9674 ||  this.$store.getters.xt_user.org_id == 10106  ||  this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9990) {
127
+    changePatient(row){
128
+      console.log("row",row);
129
+      this.patient_id = row.patient_id;
130
+      this.record_date = this.record_date;
131
+      this.prescription_id = this.prescription_id
132
+      //   var params = {
133
+      //     patient_id:row.patient_id,
134
+      //     record_date:this.record_date,
135
+      //     prescription_id:this.prescription_id,
136
+      //   }
137
+      // getPrescriptionPrint(params).then(response=>{
138
+      //     if(response.data.state == 1){
139
+      //       var advicePrint =  response.data.data.advicePrint
140
+      //       console.log("adviceprint",advicePrint)
141
+      //       this.advicePrint = advicePrint
142
+      //       // var hisPatient =  response.data.data.hisPatient
143
+      //       // console.log("hispatient",hisPatient)
144
+      //       // this.hisPatient = hisPatient
145
+      //       var patient =  response.data.data.patient
146
+      //       console.log("patient",patient)
147
+      //       this.patient = patient
148
+      //       var doctorPorject = response.data.data.doctorPorject
149
+      //       console.log("doctorporject",doctorPorject)
150
+      //     }
151
+      // })
152
+    }, getTimes(time) {
153
+      return uParseTime(time, '{y}-{m}-{d}')
154
+    },
155
+    searchAction(){
160
 
156
 
161
-          var that = this;
157
+    },
158
+    getInfo(order_id) {
159
+      if (this.$store.getters.xt_user.org_id == 3877 || this.$store.getters.xt_user.org_id == 9919 ||  this.$store.getters.xt_user.org_id == 9671 ||  this.$store.getters.xt_user.org_id == 9674 ||  this.$store.getters.xt_user.org_id == 10106  ||  this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 9990) {
162
 
160
 
163
-          axios.get('http://127.0.0.1:9532/api/settle/query', {
164
-            params: {
165
-              order_id: order_id,
166
-              admin_user_id:this.$store.getters.xt_user.user.id,
161
+        var that = this;
167
 
162
 
168
-            }
169
-          })
170
-            .then(function (response) {
171
-              if (response.data.state == 0) {
172
-                this.$message.error(response.data.msg);
173
-                return false
174
-              } else {
175
-                console.log("logloglog");
163
+        axios.get('http://127.0.0.1:9532/api/settle/query', {
164
+          params: {
165
+            order_id: order_id,
166
+            admin_user_id:this.$store.getters.xt_user.user.id,
176
 
167
 
177
-                console.log(response.data.data.info);
178
-                that.info = response.data.data.info;
179
-                console.log(that.info);
180
-                that.p_admin = response.data.data.printor_admin;
181
-                that.charge_admin = response.data.data.charge_admin;
168
+          }
169
+        })
170
+          .then(function (response) {
171
+            if (response.data.state == 0) {
172
+              this.$message.error(response.data.msg);
173
+              return false
174
+            } else {
175
+              console.log("logloglog");
182
 
176
 
183
-                that.info['p_admin'] =  that.p_admin;
184
-                that.info['charge_admin'] =  that.charge_admin;
177
+              console.log(response.data.data.info);
178
+              that.info = response.data.data.info;
179
+              console.log(that.info);
180
+              that.p_admin = response.data.data.printor_admin;
181
+              that.charge_admin = response.data.data.charge_admin;
185
 
182
 
186
-                that.info['date'] =  response.data.data.date;
187
-                that.info['number'] =  response.data.data.number;
188
-                that.info['order_infos'] =  response.data.data.order_infos;
189
-                that.info['diagnosis'] =  response.data.data.diagnosis;
183
+              that.info['p_admin'] =  that.p_admin;
184
+              that.info['charge_admin'] =  that.charge_admin;
190
 
185
 
186
+              that.info['date'] =  response.data.data.date;
187
+              that.info['number'] =  response.data.data.number;
188
+              that.info['order_infos'] =  response.data.data.order_infos;
189
+              that.info['diagnosis'] =  response.data.data.diagnosis;
191
 
190
 
192
-                that.info['bed_cost_total'] = response.data.data.bedCostTotal;
193
-                that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal;
194
-                that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal;
195
 
191
 
196
-                that.info['operation_cost_total'] = response.data.data.operationCostTotal;
197
-                that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal;
198
-                that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal;
192
+              that.info['bed_cost_total'] = response.data.data.bedCostTotal;
193
+              that.info['bed_cost_self_total'] = response.data.data.bedCostSelfTotal;
194
+              that.info['bed_cost_part_self_total'] = response.data.data.bedCostPartSelfTotal;
199
 
195
 
200
-                that.info['other_cost_total'] = response.data.data.otherCostTotal;
201
-                that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal;
202
-                that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal;
196
+              that.info['operation_cost_total'] = response.data.data.operationCostTotal;
197
+              that.info['operation_cost_self_total'] = response.data.data.operationCostSelfTotal;
198
+              that.info['operation_cost_part_self_total'] = response.data.data.operationCostPartSelfTotal;
203
 
199
 
204
-                that.info['material_cost_total'] = response.data.data.materialCostTotal;
205
-                that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal;
206
-                that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal;
200
+              that.info['other_cost_total'] = response.data.data.otherCostTotal;
201
+              that.info['other_cost_self_total'] = response.data.data.otherCostSelfTotal;
202
+              that.info['other_cost_part_self_total'] = response.data.data.otherCostPartSelfTotal;
207
 
203
 
208
-                that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal;
209
-                that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal;
210
-                that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal;
204
+              that.info['material_cost_total'] = response.data.data.materialCostTotal;
205
+              that.info['material_cost_self_total'] = response.data.data.materialCostSelfTotal;
206
+              that.info['material_cost_part_self_total'] = response.data.data.materialCostPartSelfTotal;
211
 
207
 
212
-                that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal;
213
-                that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal;
214
-                that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
208
+              that.info['western_medicine_cost_total'] = response.data.data.westernMedicineCostTotal;
209
+              that.info['western_medicine_cost_self_total'] = response.data.data.westernMedicineCostSelfTotal;
210
+              that.info['western_medicine_cost_part_self_total'] = response.data.data.westernMedicineCostPartSelfTotal;
215
 
211
 
212
+              that.info['chinese_traditional_medicine_cost_total'] = response.data.data.chineseTraditionalMedicineCostTotal;
213
+              that.info['chinese_traditional_medicine_cost_self_total'] = response.data.data.chineseTraditionalMedicineCostSelfTotal;
214
+              that.info['chinese_traditional_medicine_cost_part_self_total'] = response.data.data.chineseTraditionalMedicineCostPartSelfTotal;
216
 
215
 
217
-                that.info['check_cost_total'] = response.data.data.checkCostTotal;
218
-                that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal;
219
-                that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal;
220
 
216
 
217
+              that.info['check_cost_total'] = response.data.data.checkCostTotal;
218
+              that.info['check_cost_self_total'] = response.data.data.checkCostSelfTotal;
219
+              that.info['check_cost_part_self_total'] = response.data.data.checkCostPartSelfTotal;
221
 
220
 
222
-                that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal;
223
-                that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal;
224
-                that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal;
225
 
221
 
226
-                that.info['treat_cost_total'] = response.data.data.treatCostTotal;
227
-                that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal;
228
-                that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal;
229
-                that.info['date'] =  response.data.data.date;
230
-                that.info['number'] =  response.data.data.number;
231
-                that.info['order_infos'] =  response.data.data.order_infos;
232
-                that.info['diagnosis'] =  response.data.data.diagnosis
222
+              that.info['laboratory_cost_total'] = response.data.data.laboratoryCostTotal;
223
+              that.info['laboratory_cost_self_total'] = response.data.data.laboratoryCostSelfTotal;
224
+              that.info['laboratory_cost_part_self_total'] = response.data.data.laboratoryCostPartSelfTotal;
233
 
225
 
234
-                if(that.paramsObj.settle_type != 1){
235
-                  that.info.begndate = that.getTimes(that.paramsObj.start_time)
236
-                  that.info.enddate = that.getTimes(that.paramsObj.end_time)
237
-                }
226
+              that.info['treat_cost_total'] = response.data.data.treatCostTotal;
227
+              that.info['treat_cost_self_total'] = response.data.data.treatCostSelfTotal;
228
+              that.info['treat_cost_part_self_total'] = response.data.data.treatCostPartSelfTotal;
229
+              that.info['date'] =  response.data.data.date;
230
+              that.info['number'] =  response.data.data.number;
231
+              that.info['order_infos'] =  response.data.data.order_infos;
232
+              that.info['diagnosis'] =  response.data.data.diagnosis
238
 
233
 
234
+              if(that.paramsObj.settle_type != 1){
235
+                that.info.begndate = that.getTimes(that.paramsObj.start_time)
236
+                that.info.enddate = that.getTimes(that.paramsObj.end_time)
239
               }
237
               }
240
-            })
241
-            .catch(function (error) {
242
 
238
 
243
-            });
244
-        }
239
+            }
240
+          })
241
+          .catch(function (error) {
242
+
243
+          });
245
       }
244
       }
245
+    }
246
 
246
 
247
-    },
247
+  },
248
 
248
 
249
-    created() {
250
-      this.getInfo(this.paramsObj.order_id);
251
-      this.org_id = this.$store.getters.xt_user.org_id;
252
-      console.log("this.org_id",this.org_id)
253
-    },
254
-    watch:{
255
-      paramsObj:{//深度监听,可监听到对象、数组的变化
256
-        handler(val, oldVal){
257
-          this.paramsObj = val;
258
-          this.getInfo(this.paramsObj.order_id)
259
-
260
-        },
261
-        deep:true
262
-      }
249
+  created() {
250
+    this.getInfo(this.paramsObj.order_id);
251
+    this.org_id = this.$store.getters.xt_user.org_id;
252
+    console.log("this.org_id",this.org_id)
253
+  },
254
+  watch:{
255
+    paramsObj:{//深度监听,可监听到对象、数组的变化
256
+      handler(val, oldVal){
257
+        this.paramsObj = val;
258
+        this.getInfo(this.paramsObj.order_id)
259
+
260
+      },
261
+      deep:true
263
     }
262
     }
263
+  }
264
 
264
 
265
-  };
265
+};
266
 </script>
266
 </script>
267
 
267
 
268
 <style>
268
 <style>
269
-  .dialysis-print-order {
270
-    width: 960px;
271
-    margin: 0 auto;
272
-  }
273
-
274
-  .dialysis-print-order .order-yy-name {
275
-    margin: auto;
276
-    text-align: center;
277
-    font-size: 20px;
278
-    letter-spacing: 5px;
279
-  }
269
+.dialysis-print-order {
270
+  width: 960px;
271
+  margin: 0 auto;
272
+}
273
+
274
+.dialysis-print-order .order-yy-name {
275
+  margin: auto;
276
+  text-align: center;
277
+  font-size: 20px;
278
+  letter-spacing: 5px;
279
+}
280
 
280
 
281
   .dialysis-print-order .order-title {
281
   .dialysis-print-order .order-title {
282
     margin: auto;
282
     margin: auto;

+ 13 - 3
src/xt_pages/outpatientCharges/summaryDetail.vue View File

25
                         </el-table-column>
25
                         </el-table-column>
26
 
26
 
27
                         <el-table-column align="center" prop="project_name" label="分类" width="100">
27
                         <el-table-column align="center" prop="project_name" label="分类" width="100">
28
-                          <template slot-scope="scope">{{ scope.row.type == 1?'药品':'项目' }}</template>
28
+                          <template slot-scope="scope">{{ scope.row.type == 1?'药品': scope.row.project_type == 2? '项目':'耗材'}}</template>
29
                         </el-table-column>
29
                         </el-table-column>
30
 
30
 
31
 
31
 
409
         let count = 0
409
         let count = 0
410
         for (let a = 0; a < project_month_prescriptions.project.length; a++) {
410
         for (let a = 0; a < project_month_prescriptions.project.length; a++) {
411
           if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
411
           if (project_ids[i].price == project_month_prescriptions.project[a].price &&project_ids[i].id == project_month_prescriptions.project[a].project_id ) {
412
-            obj['name'] = project_month_prescriptions.project[a].project.project_name
413
-            obj['statistical_classification'] = ''
412
+
413
+            if(project_month_prescriptions.project[a].type == 2){
414
+              obj['name'] = project_month_prescriptions.project[a].project.project_name
415
+              obj['statistical_classification'] = ''
416
+              obj['project_type'] = 2
417
+
418
+
419
+            }else if (project_month_prescriptions.project[a].type == 3){
420
+              obj['name'] = project_month_prescriptions.project[a].good_info.good_name
421
+              obj['statistical_classification'] = ''
422
+              obj['project_type'] = 3
423
+            }
414
             obj['single_dose'] = project_month_prescriptions.project[a].single_dose
424
             obj['single_dose'] = project_month_prescriptions.project[a].single_dose
415
             obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
425
             obj['delivery_way'] = project_month_prescriptions.project[a].delivery_way
416
             obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency
426
             obj['execution_frequency'] = project_month_prescriptions.project[a].execution_frequency

+ 26 - 4
src/xt_pages/outpatientDoctorStation/components/callPrescription.vue View File

93
             <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
93
             <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
94
             <el-table-column align="center" prop="project_name" width="160" label="名称">
94
             <el-table-column align="center" prop="project_name" width="160" label="名称">
95
               <template slot-scope="scope">
95
               <template slot-scope="scope">
96
-                <span>{{ scope.row.project.project_name }}</span>
96
+                <span>{{ scope.row.type == 2?scope.row.project.project_name:scope.row.good_info.good_name}}</span>
97
               </template>
97
               </template>
98
             </el-table-column>
98
             </el-table-column>
99
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
99
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
100
-              <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
100
+              <template slot-scope="scope">{{scope.row.type == 2 ?getGroup(scope.row.statistical_classification):"耗材"}}</template>
101
             </el-table-column>
101
             </el-table-column>
102
             <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
102
             <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
103
               <template slot-scope="scope">
103
               <template slot-scope="scope">
260
                 single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
260
                 single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
261
                 prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
261
                 prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
262
                 medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
262
                 medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
263
-                id:prescription.doctor_advice[b].drug_id
263
+                id:prescription.doctor_advice[b].drug_id,
264
+                drug:prescription.doctor_advice[b].drug,
265
+
264
               };
266
               };
265
               tempAdvice.push(obj)
267
               tempAdvice.push(obj)
266
 
268
 
267
             }
269
             }
268
 
270
 
269
 
271
 
272
+
270
             for (let b = 0; b < prescription.project.length; b++) {
273
             for (let b = 0; b < prescription.project.length; b++) {
271
               let obj = {
274
               let obj = {
272
                 id: 0,
275
                 id: 0,
280
                 total:prescription.project[b].count,
283
                 total:prescription.project[b].count,
281
                 price:prescription.project[b].price,
284
                 price:prescription.project[b].price,
282
                 remark:prescription.project[b].remark,
285
                 remark:prescription.project[b].remark,
283
-                medical_code:prescription.project[b].project.medical_code,
286
+                unit: prescription.project[b].unit,
287
+                type: prescription.project[b].type
288
+
289
+                // medical_code:prescription.project[b].project.medical_code,
284
               };
290
               };
291
+              console.log(prescription.project[b].type)
292
+              if(prescription.project[b].type == 2){
293
+                console.log("pre")
294
+
295
+                obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
296
+                obj['medical_code'] =  prescription.project[b].project.medical_code
297
+                obj['project_name'] =  prescription.project[b].project.project_name
298
+
299
+              }else if(prescription.project[b].type == 3){
300
+                console.log("pre2")
301
+
302
+                obj['statistical_classification'] = ""
303
+                obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
304
+                obj['project_name'] =  prescription.project[b].good_info.good_name
305
+              }
306
+
285
               tempProject.push(obj)
307
               tempProject.push(obj)
286
             }
308
             }
287
             let obj = {
309
             let obj = {

File diff suppressed because it is too large
+ 1310 - 1118
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue


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

285
                 let obj = {
285
                 let obj = {
286
                   id: prescription.project[b].id,
286
                   id: prescription.project[b].id,
287
                   project_id: prescription.project[b].project.id,
287
                   project_id: prescription.project[b].project.id,
288
-                  project_name: prescription.project[b].project.project_name,
289
-                  statistical_classification: prescription.project[b].project.statistical_classification,
288
+                  // project_name: prescription.project[b].project.project_name,
289
+                  // statistical_classification: prescription.project[b].project.statistical_classification,
290
                   single_dose: prescription.project[b].single_dose,
290
                   single_dose: prescription.project[b].single_dose,
291
                   delivery_way: prescription.project[b].delivery_way,
291
                   delivery_way: prescription.project[b].delivery_way,
292
                   execution_frequency: prescription.project[b].execution_frequency,
292
                   execution_frequency: prescription.project[b].execution_frequency,
294
                   total: prescription.project[b].count.toString(),
294
                   total: prescription.project[b].count.toString(),
295
                   price: prescription.project[b].price,
295
                   price: prescription.project[b].price,
296
                   remark: prescription.project[b].remark,
296
                   remark: prescription.project[b].remark,
297
-                  medical_code: prescription.project[b].project.medical_code,
297
+                  // medical_code: prescription.project[b].project.medical_code,
298
                   unit:prescription.project[b].project.unit,
298
                   unit:prescription.project[b].project.unit,
299
+                  type:prescription.project[b].type,
300
+
301
+                }
302
+                if(prescription.project[b].type == 2){
303
+                  obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
304
+                  obj['medical_code'] =  prescription.project[b].project.medical_code
305
+                  obj['project_name'] =  prescription.project[b].project.project_name
306
+
307
+                }else if(prescription.project[b].type == 3){
308
+                  obj['statistical_classification'] = ""
309
+                  obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
310
+                  obj['project_name'] =  prescription.project[b].good_info.good_name
299
                 }
311
                 }
300
                 tempProject.push(obj)
312
                 tempProject.push(obj)
301
               }
313
               }

+ 1 - 1
src/xt_pages/outpatientDoctorStation/components/newPrescriptionTable.vue View File

63
       </el-table-column>
63
       </el-table-column>
64
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
64
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
65
         <template slot-scope="scope">
65
         <template slot-scope="scope">
66
-          <div>{{getGroup(scope.row.statistical_classification)}}</div>
66
+          <div>{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</div>
67
         </template>
67
         </template>
68
       </el-table-column>
68
       </el-table-column>
69
       <el-table-column align="center" prop="single_dose" width="100" label="单次用量">
69
       <el-table-column align="center" prop="single_dose" width="100" label="单次用量">

+ 22 - 7
src/xt_pages/outpatientDoctorStation/components/nextOrLastPrescription.vue View File

81
             <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
81
             <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
82
             <el-table-column align="center" prop="project_name" width="160" label="名称">
82
             <el-table-column align="center" prop="project_name" width="160" label="名称">
83
               <template slot-scope="scope">
83
               <template slot-scope="scope">
84
-                <span>{{ scope.row.project.project_name }}</span>
84
+                <span>{{ scope.row.type == 2 ?scope.row.project.project_name:scope.row.good_info.good_name}}</span>
85
               </template>
85
               </template>
86
             </el-table-column>
86
             </el-table-column>
87
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
87
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
88
-              <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
88
+              <template slot-scope="scope">{{ scope.row.type == 2 ?getGroup(scope.row.statistical_classification):"耗材"}}</template>
89
             </el-table-column>
89
             </el-table-column>
90
             <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
90
             <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
91
               <template slot-scope="scope">
91
               <template slot-scope="scope">
317
                 single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
317
                 single_dose_unit:prescription.doctor_advice[b].single_dose_unit,
318
                 prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
318
                 prescribing_number_unit:prescription.doctor_advice[b].prescribing_number_unit,
319
                 medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
319
                 medical_insurance_number:prescription.doctor_advice[b].med_list_codg,
320
-                id:prescription.doctor_advice[b].drug_id
320
+                id:prescription.doctor_advice[b].drug_id,
321
+                drug:prescription.doctor_advice[b].drug,
321
               };
322
               };
322
               tempAdvice.push(obj)
323
               tempAdvice.push(obj)
323
 
324
 
328
               let obj = {
329
               let obj = {
329
                 id: 0,
330
                 id: 0,
330
                 project_id: prescription.project[b].project_id,
331
                 project_id: prescription.project[b].project_id,
331
-                project_name: prescription.project[b].project.project_name,
332
-                statistical_classification: prescription.project[b].project.statistical_classification,
332
+                // project_name: prescription.project[b].project.project_name,
333
+                // statistical_classification: prescription.project[b].project.statistical_classification,
333
                 single_dose: prescription.project[b].single_dose,
334
                 single_dose: prescription.project[b].single_dose,
334
                 delivery_way: prescription.project[b].delivery_way,
335
                 delivery_way: prescription.project[b].delivery_way,
335
                 execution_frequency: prescription.project[b].execution_frequency,
336
                 execution_frequency: prescription.project[b].execution_frequency,
337
                 total:prescription.project[b].count.toString(),
338
                 total:prescription.project[b].count.toString(),
338
                 price:prescription.project[b].price,
339
                 price:prescription.project[b].price,
339
                 remark:prescription.project[b].remark,
340
                 remark:prescription.project[b].remark,
340
-                medical_code:prescription.project[b].project.medical_code,
341
+                unit: prescription.project[b].unit,
342
+                type: prescription.project[b].type
343
+
344
+                // medical_code:prescription.project[b].project.medical_code,
341
               };
345
               };
346
+
347
+              if(prescription.project[b].type == 2){
348
+                obj['statistical_classification'] =  prescription.project[b].project.statistical_classification
349
+                obj['medical_code'] =  prescription.project[b].project.medical_code
350
+                obj['project_name'] =  prescription.project[b].project.project_name
351
+
352
+              }else if(prescription.project[b].type == 3){
353
+                obj['statistical_classification'] = ""
354
+                obj['medical_code'] =  prescription.project[b].good_info.medical_insurance_number
355
+                obj['project_name'] =  prescription.project[b].good_info.good_name
356
+              }
357
+
342
               tempProject.push(obj)
358
               tempProject.push(obj)
343
             }
359
             }
344
             let obj = {
360
             let obj = {
353
           }
369
           }
354
         }
370
         }
355
 
371
 
356
-        console.log(this.srcPrescriptions);
357
 
372
 
358
         if(this.srcPrescriptions.length == 1){
373
         if(this.srcPrescriptions.length == 1){
359
           if(this.srcPrescriptions[0].advices.length == 0 && this.srcPrescriptions[0].project.length == 0){
374
           if(this.srcPrescriptions[0].advices.length == 0 && this.srcPrescriptions[0].project.length == 0){

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

85
         <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
85
         <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
86
       </el-table-column>
86
       </el-table-column>
87
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
87
       <el-table-column align="center" prop="statistical_classification" width="100" label="组">
88
-        <template slot-scope="scope">{{getGroup(scope.row.statistical_classification)}}</template>
88
+        <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
89
       </el-table-column>
89
       </el-table-column>
90
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
90
       <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
91
         <template slot-scope="scope">
91
         <template slot-scope="scope">
208
         input: 1,
208
         input: 1,
209
       }
209
       }
210
     },
210
     },
211
-    
211
+
212
    methods:{
212
    methods:{
213
      createFilter(queryString) {
213
      createFilter(queryString) {
214
        return (restaurant) => {
214
        return (restaurant) => {
401
       }
401
       }
402
     },mounted(){
402
     },mounted(){
403
       this.getInitData()
403
       this.getInitData()
404
-     
404
+
405
     },
405
     },
406
     watch:{
406
     watch:{
407
       // "prescription.advices":{
407
       // "prescription.advices":{
411
       //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
411
       //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
412
       //         item.total = item.single_dose * item.number_days
412
       //         item.total = item.single_dose * item.number_days
413
       //       }
413
       //       }
414
-            
415
-            
414
+
415
+
416
       //     })
416
       //     })
417
       //   },
417
       //   },
418
       //   deep:true
418
       //   deep:true
423
       //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
423
       //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
424
       //         item.total = item.single_dose * item.number_days
424
       //         item.total = item.single_dose * item.number_days
425
       //       }
425
       //       }
426
-            
426
+
427
       //     })
427
       //     })
428
       //   },
428
       //   },
429
       //   deep:true
429
       //   deep:true
430
       // }
430
       // }
431
     }
431
     }
432
-    
432
+
433
   }
433
   }
434
 </script>
434
 </script>
435
 
435
 

+ 468 - 0
src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue View File

1
+<template>
2
+    <div class="prescriptionTable">
3
+        <el-table v-if="activeType  == 1" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
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>
6
+            <el-table-column align="center" prop="drug_name" label="名称">
7
+                <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
8
+            </el-table-column>
9
+
10
+            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
11
+                <template slot-scope="scope">
12
+                    <div style="display:flex;align-items:center;">
13
+                        <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:65%;"></el-input>
14
+                        <div>{{scope.row.single_dose_unit}}</div>
15
+                    </div>
16
+                </template>
17
+            </el-table-column>
18
+            <el-table-column align="center" prop="delivery_way" width="100" label="用法">
19
+                <template slot-scope="scope">
20
+                    <el-select v-model="scope.row.delivery_way" placeholder="请选择">
21
+                        <el-option
22
+                                v-for="(item,index) in drugways"
23
+                                :key="index"
24
+                                :label="item.name"
25
+                                :value="item.name">
26
+                        </el-option>
27
+                    </el-select>
28
+                </template>
29
+            </el-table-column>
30
+            <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
31
+                <template slot-scope="scope">
32
+                    <el-select v-model="scope.row.execution_frequency" placehold er="请选择">
33
+                        <el-option
34
+                                v-for="item,index in efs"
35
+                                :key="index"
36
+                                :label="item.name"
37
+                                :value="item.name">
38
+                        </el-option>
39
+                    </el-select>
40
+                </template>
41
+            </el-table-column>
42
+
43
+
44
+            <el-table-column align="center" prop="day" width="70" label="天数">
45
+                <template slot-scope="scope">
46
+                    <div style="display:flex;align-items:center;">
47
+                        <el-input v-model="scope.row.day" @input="getDay(scope)" placeholder=""></el-input>{{'天'}}
48
+                    </div>
49
+                </template>
50
+            </el-table-column>
51
+
52
+            <el-table-column align="center" prop="prescribing_number" width="80" label="总量">
53
+                <template slot-scope="scope">
54
+                    <div style="display:flex;align-items:center;">
55
+                        <el-input v-model="scope.row.prescribing_number" style="width:60%" placeholder=""></el-input>
56
+                        <div> {{scope.row.prescribing_number_unit}}</div>
57
+                    </div>
58
+                </template>
59
+            </el-table-column>
60
+            <el-table-column align="center" prop="retail_price" width="80" label="单价">
61
+                <template slot-scope="scope">
62
+                    <div style="display:flex;align-items:center;">
63
+                        <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
64
+                        <div>{{'元'}}</div>
65
+                    </div>
66
+
67
+                </template>
68
+            </el-table-column>
69
+            <el-table-column align="center" prop="remark" width="50" label="备注">
70
+                <template slot-scope="scope">
71
+                    <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
72
+                </template>
73
+            </el-table-column>
74
+            <el-table-column align="center" width="40" prop="name" label="操作">
75
+                <template slot-scope="scope">
76
+                    <i class="el-icon-delete" @click="deleteDrug(scope.$index, scope.row)"></i>
77
+                </template>
78
+            </el-table-column>
79
+        </el-table>
80
+
81
+        <el-table v-if="activeType == 2" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
82
+                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
83
+            <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
84
+            <el-table-column align="center" prop="project_name" label="名称">
85
+                <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
86
+            </el-table-column>
87
+            <el-table-column align="center" prop="statistical_classification" width="100" label="组">
88
+                <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
89
+            </el-table-column>
90
+            <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
91
+                <template slot-scope="scope">
92
+                    <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)" placeholder=""></el-input>
93
+                    <div>{{scope.row.unit}}</div>
94
+
95
+                </template>
96
+            </el-table-column>
97
+            <el-table-column align="center" prop="delivery_way" width="80" label="用法">
98
+                <template slot-scope="scope">
99
+                    <el-autocomplete
100
+                            style="width:100%;"
101
+                            class="inline-input"
102
+                            v-model="scope.row.delivery_way"
103
+                            :fetch-suggestions="querySearch2"
104
+                            placeholder="请输入内容"
105
+                    ></el-autocomplete>
106
+                </template>
107
+            </el-table-column>
108
+            <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
109
+                <template slot-scope="scope">
110
+                    <el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>
111
+                </template>
112
+            </el-table-column>
113
+            <el-table-column align="center" prop="number_days" width="70" label="天数">
114
+                <template slot-scope="scope">
115
+                    <div style="display:flex;align-items:center;">
116
+                        <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)" placeholder=""></el-input>
117
+                        <div>{{'天'}}</div>
118
+                    </div>
119
+                </template>
120
+            </el-table-column>
121
+            <el-table-column align="center" prop="total" width="70" label="总量">
122
+                <template slot-scope="scope">
123
+                    <div style="display:flex;align-items:center;">
124
+                        <el-input v-model="scope.row.total" style="width:60%" placeholder=""></el-input>
125
+                        <div>{{scope.row.unit}}</div>
126
+
127
+                    </div>
128
+                </template>
129
+            </el-table-column>
130
+            <el-table-column align="center" prop="name" width="50" label="单价">
131
+                <template slot-scope="scope">
132
+                    <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
133
+                    <div>{{'元'}}</div>
134
+
135
+                </template>
136
+            </el-table-column>
137
+            <el-table-column align="center" prop="name" width="50" label="备注">
138
+                <template slot-scope="scope">
139
+                    <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
140
+                </template>
141
+            </el-table-column>
142
+            <el-table-column align="center" width="40" prop="name" label="操作">
143
+                <template slot-scope="scope">
144
+                    <i class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)"></i>
145
+                </template>
146
+            </el-table-column>
147
+        </el-table>
148
+
149
+        <div class="additionalBox">
150
+            <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
151
+                <span :title="item.item_name">{{item.item_name}}</span>
152
+                <el-input v-model="item.price" placeholder="" style="width:50px;"></el-input>
153
+                共
154
+                <el-input v-model="item.count" placeholder="" style="width:50px;"></el-input>
155
+                次
156
+                <i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>
157
+            </div>
158
+        </div>
159
+
160
+
161
+
162
+    </div>
163
+</template>
164
+
165
+<script>
166
+  import { getDictionaryDataConfig} from "@/utils/data";
167
+  import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
168
+  import { delHisPrescriptionAdviceTemplate,delHisPrescriptionProjectTemplate } from '@/api/his/his_config'
169
+
170
+  export default {
171
+    props: {
172
+      preDrugs: Array,
173
+      activeType: Number,
174
+      addtions_charge:Array,
175
+      prescription:{
176
+        type:Object,
177
+        default: function () {
178
+          return {
179
+            name:"",
180
+            advices:[],
181
+            project:[],
182
+            drugways:[],
183
+            efs:[],
184
+          };
185
+        }
186
+      },
187
+    },
188
+    data() {
189
+      return {
190
+        advices:[],
191
+        tableData: [],
192
+        newoptions: [{
193
+          value: '1',
194
+          label: '1'
195
+        }, {
196
+          value: '2',
197
+          label: '2'
198
+        }, {
199
+          value: '3',
200
+          label: '3'
201
+        }, {
202
+          value: '4',
203
+          label: '4'
204
+        }, {
205
+          value: '5',
206
+          label: '5'
207
+        }],
208
+        value: '1',
209
+        input: 1,
210
+      }
211
+    },
212
+
213
+    methods:{
214
+      createFilter(queryString) {
215
+        return (restaurant) => {
216
+          return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
217
+        }
218
+      },
219
+      querySearch2(queryString, cb) {
220
+        var restaurants = this.getDictionaryDataConfig("system","project_use")
221
+        restaurants.map(item => {
222
+          item.value = item.name
223
+        })
224
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
225
+        // 调用 callback 返回建议列表的数据
226
+        cb(results)
227
+      },
228
+      delAddition(index, addition){
229
+        this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
230
+          confirmButtonText: "确 定",
231
+          cancelButtonText: "取 消",
232
+          type: "warning"
233
+        }).then(() => {
234
+          this.$nextTick(function(){
235
+            if(addition.id == 0){
236
+              this.prescription.addition.splice(index, 1)
237
+            }else{
238
+              let params = {
239
+                'id': addition.id,
240
+              }
241
+              delHisAddition(params).then(response => {
242
+                if (response.data.state == 0) {
243
+                  this.$message.error(response.data.msg)
244
+                  return false
245
+                } else {
246
+                  var temp2 = this.deepClone(this.prescription.addition)
247
+                  temp2.splice(index, 1)
248
+                  this.prescription.addition = temp2
249
+                  this.$message.success(response.data.data.msg)
250
+                }
251
+              })
252
+            }
253
+          });
254
+
255
+        })
256
+          .catch(() => {});
257
+
258
+      },
259
+      getInitData(){
260
+        getInitData().then(response => {
261
+          if (response.data.state == 0) {
262
+            this.$message.error(response.data.msg)
263
+            return false
264
+          } else {
265
+            this.drugways = response.data.data.drugways
266
+            this.efs = response.data.data.efs
267
+          }
268
+        })
269
+
270
+      },deleteDrug:function(index, row){
271
+
272
+        this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
273
+          confirmButtonText: "确 定",
274
+          cancelButtonText: "取 消",
275
+          type: "warning"
276
+        }).then(() => {
277
+          this.$nextTick(function(){
278
+            if(row.advice_id == 0){
279
+              this.prescription.advices.splice(index, 1)
280
+            }else{
281
+              let params = {
282
+                'id': row.advice_id,
283
+              }
284
+              delHisPrescriptionAdviceTemplate(params).then(response => {
285
+                if (response.data.state == 0) {
286
+                  this.$message.error(response.data.msg)
287
+                  return false
288
+                } else {
289
+                  var temp2 = this.deepClone(this.prescription.advices)
290
+                  temp2.splice(index, 1)
291
+                  this.prescription.advices = temp2
292
+                  this.$message.success(response.data.data.msg)
293
+                }
294
+              })
295
+
296
+
297
+            }
298
+
299
+          });
300
+
301
+
302
+        })
303
+          .catch(() => {});
304
+
305
+
306
+
307
+
308
+
309
+      },deepClone(source) {
310
+        if (!source && typeof source !== 'object') {
311
+          throw new Error('error arguments', 'shallowClone')
312
+        }
313
+        const targetObj = source.constructor === Array ? [] : {}
314
+        Object.keys(source).forEach((keys) => {
315
+          if (source[keys] && typeof source[keys] === 'object') {
316
+            targetObj[keys] = this.deepClone(source[keys])
317
+          } else {
318
+            targetObj[keys] = source[keys]
319
+          }
320
+        })
321
+        return targetObj
322
+      },
323
+
324
+      setNewData:function(data){
325
+        this.prescription = data
326
+
327
+        // this.prescription.advices = data.advices
328
+      },
329
+      getDictionaryDataConfig(module, filed_name) {
330
+        return getDictionaryDataConfig(module, filed_name)
331
+      },
332
+      getGroup(id){
333
+        var name = ""
334
+        var statistics_category =  getDictionaryDataConfig('system','statistics_category')
335
+        console.log("2235",statistics_category)
336
+        for(let i=0;i<statistics_category.length;i++){
337
+          if(id == statistics_category[i].id){
338
+            name = statistics_category[i].name
339
+          }
340
+        }
341
+        return name
342
+      },
343
+      deleteProject(row,i){
344
+        if(this.prescription.order_status == 2){
345
+          this.$message.error('该处方已经结算,无法删除')
346
+          return
347
+        }
348
+        this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
349
+          confirmButtonText: "确 定",
350
+          cancelButtonText: "取 消",
351
+          type: "warning"
352
+        }).then(() => {
353
+          if(row.id == 0){
354
+            this.prescription.project.splice(i, 1)
355
+
356
+          }else{
357
+            let params = {
358
+              'id': row.id,
359
+            }
360
+            delHisPrescriptionProjectTemplate(params).then(response => {
361
+              if (response.data.state == 0) {
362
+                this.$message.error(response.data.msg)
363
+                return false
364
+              } else {
365
+                for (let i = 0; i < this.prescription.project.length; i++){
366
+                  if(this.prescription.project[i].id == row.id){
367
+                    this.prescription.project.splice(i, 1)
368
+                  }
369
+                }
370
+                this.$message.success(response.data.data.msg)
371
+              }
372
+            })
373
+          }
374
+        })
375
+          .catch(() => {});
376
+
377
+      },
378
+      getSingleDose(scope){
379
+        this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
380
+      },
381
+      getDay(scope){
382
+        this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
383
+      },
384
+      getProjectSingleDose(scope){
385
+        this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
386
+        if(this.prescription.project[scope.$index].total == 0){
387
+          this.prescription.project[scope.$index].total = 1
388
+        }
389
+      },
390
+      getProjectDay(scope){
391
+        this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
392
+        if(this.prescription.project[scope.$index].total == 0){
393
+          this.prescription.project[scope.$index].total = 1
394
+        }
395
+      }
396
+    },mounted(){
397
+      this.getInitData()
398
+
399
+    },
400
+    watch:{
401
+      // "prescription.advices":{
402
+      //   handler(newVal,oldVal){
403
+      //     newVal.map(item => {
404
+      //       item.prescribing_number = item.single_dose * item.day
405
+      //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
406
+      //         item.total = item.single_dose * item.number_days
407
+      //       }
408
+
409
+
410
+      //     })
411
+      //   },
412
+      //   deep:true
413
+      // },
414
+      // "prescription.project":{
415
+      //   handler(newVal,oldVal){
416
+      //     newVal.map((item,index) => {
417
+      //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
418
+      //         item.total = item.single_dose * item.number_days
419
+      //       }
420
+
421
+      //     })
422
+      //   },
423
+      //   deep:true
424
+      // }
425
+    }
426
+
427
+  }
428
+</script>
429
+
430
+<style lang="scss">
431
+    .prescriptionTable {
432
+    .el-input__inner{
433
+        padding: 0 5px;
434
+    }
435
+    .additionalBox{
436
+        margin-top: 20px;
437
+        display: flex;
438
+        flex-wrap: wrap;
439
+    .additionalOne{
440
+        margin-right:20px;
441
+        margin-bottom:10px;
442
+        display: flex;
443
+        align-items: center;
444
+    >span{
445
+        white-space: nowrap;
446
+        overflow: hidden;
447
+        text-overflow: ellipsis;
448
+        width:80px;
449
+        display: inline-block;
450
+        font-size: 14px;
451
+    }
452
+    }
453
+    .deleteIcon{
454
+        color:red;
455
+        margin-left:5px;
456
+    }
457
+    }
458
+    .el-table th .cell, .el-table td .cell {
459
+        padding: 0 2px;
460
+        white-space: pre-line;
461
+    }
462
+
463
+    .el-icon-delete {
464
+        color: red;
465
+    }
466
+
467
+    }
468
+</style>

+ 250 - 67
src/xt_pages/outpatientDoctorStation/components/saveTemplate.vue View File

1
 <template>
1
 <template>
2
     <el-dialog
2
     <el-dialog
3
-        title="模板信息"
4
-        width="600px"
5
-        :visible.sync="visible"
6
-        :before-close="_close"
3
+            title="长期处方模版"
4
+            width="600px"
5
+            :visible.sync="visible"
6
+            :before-close="_close"
7
     >
7
     >
8
         <div>
8
         <div>
9
-            <el-form :model="form"  class="adviceForm" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
10
-                <el-form-item label="创建人 : " style="width: 100%;margin-bottom:0;">
11
-                    医生
12
-                </el-form-item>
13
-                <el-form-item label="处方类型 : " style="width: 100%;margin-bottom:0;">
14
-                    药品模板
15
-                </el-form-item>
16
-                <el-form-item label="模板类型 : " style="width: 100%;margin-bottom:0;">
17
-                    <el-radio v-model="radio" label="1">临时</el-radio>
18
-                    <el-radio v-model="radio" label="2">长期</el-radio>
9
+            <el-form :model="form" class="adviceForm" ref="form" label-width="100px"
10
+                     style="display: flex;flex-wrap: wrap;justify-content: space-between;">
11
+
12
+                <!--<el-form-item label="处方模板类别 : " style="width: 100%;margin-bottom:0;">-->
13
+                <!--<el-radio v-model="radio" label="1">临时</el-radio>-->
14
+                <!--<el-radio v-model="radio" label="2">长期</el-radio>-->
15
+                <!--</el-form-item>-->
16
+                <el-form-item label="处方模板名称:" style="width: 100%;margin-bottom:0;">
17
+                    <el-input v-model="form.name" placeholder=""></el-input>
19
                 </el-form-item>
18
                 </el-form-item>
20
-                <el-form-item label="科室 : " style="width: 100%;">
21
-                    <el-select v-model="value" style="width:100%;" placeholder="请选择">
19
+                <el-form-item label="透析模式 : " style="width: 100%;">
20
+                    <el-select v-model="form.mode" style="width:100%;" placeholder="请选择">
22
                         <el-option
21
                         <el-option
23
-                        v-for="item in options"
24
-                        :key="item.value"
25
-                        :label="item.label"
26
-                        :value="item.value">
27
-                        </el-option>
22
+                                v-for="item in modeOptions"
23
+                                :key="item.id"
24
+                                :label="item.name"
25
+                                :value="item.id"
26
+                        ></el-option>
28
                     </el-select>
27
                     </el-select>
29
                 </el-form-item>
28
                 </el-form-item>
30
-                <el-form-item label="模板名称 : " style="width: 100%;">
31
-                    <el-input v-model="form.name" placeholder=""></el-input>
32
-                </el-form-item>
33
-                <el-form-item label="模板说明 : " style="width: 100%;">
34
-                    <el-input v-model="form.name" placeholder=""></el-input>
35
-                </el-form-item>
36
-                <el-form-item label="诊断信息 : " style="width: 100%;">
37
-                    <el-input v-model="form.name" placeholder=""></el-input>
38
-                </el-form-item>
39
-                <el-form-item label="医嘱说明 : " style="width: 100%;">
40
-                    <el-input v-model="form.name" placeholder=""></el-input>
41
-                </el-form-item>
42
-                <el-form-item label="备注说明 : " style="width: 100%;">
43
-                    <el-input v-model="form.name" placeholder=""></el-input>
44
-                </el-form-item>
45
             </el-form>
29
             </el-form>
30
+
31
+
32
+            <div v-for="(item,index) in allPrescription" :key="index">
33
+                <el-checkbox-group v-model="item.check_group">
34
+                    <div v-for="(subItem,index2) in item.prescriptions" :key="index2">
35
+                        <el-checkbox style="margin:10px 0;" :label="subItem.id">{{'处方' + (index2+ 1)}}</el-checkbox>
36
+                        <el-table v-if="subItem.advices.length > 0" :data="subItem.advices" border style="width: 99%;"
37
+                                  :row-style="{ color: '#303133' }"
38
+                                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
39
+                                  highlight-current-row>
40
+                            <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
41
+                            <el-table-column align="center" prop="drug_name" width="160" label="名称">
42
+                                <template slot-scope="scope">
43
+                                    <span>{{ scope.row.drug_name }}</span>
44
+                                </template>
45
+                            </el-table-column>
46
+
47
+                            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
48
+                                <template slot-scope="scope">
49
+                                    <div>{{scope.row.single_dose}}{{scope.row.single_dose_unit}}</div>
50
+                                </template>
51
+                            </el-table-column>
52
+                            <el-table-column align="center" prop="delivery_way" width="100" label="用法">
53
+                                <template slot-scope="scope">
54
+                                    {{scope.row.delivery_way}}
55
+                                </template>
56
+                            </el-table-column>
57
+                            <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
58
+                                <template slot-scope="scope">
59
+                                    {{scope.row.execution_frequency}}
60
+                                </template>
61
+                            </el-table-column>
62
+
63
+                            <el-table-column align="center" prop="day" width="60" label="天数">
64
+                                <template slot-scope="scope">
65
+                                    {{scope.row.day}}
66
+                                </template>
67
+                            </el-table-column>
68
+
69
+                            <el-table-column align="center" prop="prescribing_number" width="100" label="总量">
70
+                                <template slot-scope="scope">
71
+                                    <div>{{scope.row.prescribing_number}} {{scope.row.prescribing_number_unit}}</div>
72
+                                </template>
73
+                            </el-table-column>
74
+                            <el-table-column align="center" prop="retail_price" width="80" label="单价">
75
+                                <template slot-scope="scope">
76
+                                    <div>{{scope.row.retail_price}}</div>
77
+                                </template>
78
+                            </el-table-column>
79
+                            <el-table-column align="center" prop="remark" label="备注">
80
+                                <template slot-scope="scope">
81
+                                    <div>{{scope.row.remark}}</div>
82
+                                </template>
83
+                            </el-table-column>
84
+                        </el-table>
85
+                        <el-table v-if="subItem.project.length > 0" :data="subItem.project" border style="width: 99%;"
86
+                                  :row-style="{ color: '#303133' }"
87
+                                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
88
+                                  highlight-current-row>
89
+                            <el-table-column align="center" type="index" width="60" label="序号"></el-table-column>
90
+                            <el-table-column align="center" prop="project_name" width="160" label="名称">
91
+                                <template slot-scope="scope">
92
+                                    <span>{{ scope.row.project_name}}</span>
93
+                                </template>
94
+                            </el-table-column>
95
+                            <el-table-column align="center" prop="statistical_classification" width="100" label="组">
96
+                                <template slot-scope="scope">{{ scope.row.type == 2
97
+                                    ?getGroup(scope.row.statistical_classification):'耗材'}}
98
+                                </template>
99
+                            </el-table-column>
100
+                            <el-table-column align="center" prop="single_dose" width="90" label="单次用量">
101
+                                <template slot-scope="scope">
102
+                                    <!--<el-input v-model="scope.row.single_dose" placeholder=""></el-input>-->
103
+                                    <span>{{ scope.row.single_dose }}</span>
104
+
105
+                                </template>
106
+                            </el-table-column>
107
+                            <el-table-column align="center" prop="delivery_way" width="100" label="用法">
108
+                                <template slot-scope="scope">
109
+                                    <!--<el-input v-model="scope.row.delivery_way" placeholder=""></el-input>-->
110
+                                    <span>{{ scope.row.delivery_way }}</span>
111
+
112
+                                </template>
113
+                            </el-table-column>
114
+                            <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
115
+                                <template slot-scope="scope">
116
+                                    <!--<el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>-->
117
+                                    <span>{{ scope.row.execution_frequency }}</span>
118
+
119
+                                </template>
120
+                            </el-table-column>
121
+                            <el-table-column align="center" prop="number_days" width="70" label="天数">
122
+                                <template slot-scope="scope">
123
+                                    <!--<el-input v-model="scope.row.number_days" placeholder=""></el-input>-->
124
+                                    <span>{{ scope.row.number_days }}</span>
125
+
126
+                                </template>
127
+                            </el-table-column>
128
+                            <el-table-column align="center" prop="total" width="70" label="总量">
129
+                                <template slot-scope="scope">
130
+                                    <div>{{ scope.row.total }}{{scope.row.unit}}</div>
131
+                                </template>
132
+                            </el-table-column>
133
+                            <el-table-column align="center" prop="name" width="60" label="单价">
134
+                                <template slot-scope="scope">
135
+                                    <!--<el-input v-model="scope.row.price" placeholder="" readonly></el-input>-->
136
+                                    <span>{{ scope.row.price }}</span>
137
+
138
+                                </template>
139
+                            </el-table-column>
140
+                            <el-table-column align="center" prop="name" label="备注">
141
+                                <template slot-scope="scope">
142
+                                    <!--<el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>-->
143
+                                    <span>{{ scope.row.remark }}</span>
144
+
145
+                                </template>
146
+                            </el-table-column>
147
+                        </el-table>
148
+                    </div>
149
+                </el-checkbox-group>
150
+            </div>
151
+
152
+
46
         </div>
153
         </div>
47
         <div slot="footer" class="dialog-footer">
154
         <div slot="footer" class="dialog-footer">
48
             <el-button @click="hide">取 消</el-button>
155
             <el-button @click="hide">取 消</el-button>
49
             <el-button type="primary" @click="submitAction()">保 存</el-button>
156
             <el-button type="primary" @click="submitAction()">保 存</el-button>
50
         </div>
157
         </div>
51
-    </el-dialog>         
158
+    </el-dialog>
52
 </template>
159
 </template>
53
 
160
 
54
 <script>
161
 <script>
55
-export default {
56
-    data(){
57
-        return{
58
-            visible:false,
59
-            form:{
60
-                name:''
61
-            },
62
-            radio:"1",
63
-            options:[],
64
-            value:''
65
-        }
66
-    },
67
-    methods:{
68
-        _close: function(done) {
69
-            // this.clear()
70
-            done()
71
-        },
72
-        clear: function() {
73
-            this.form.id = 0;
74
-            this.form.name = "";
75
-            this.form.intro = "";
76
-        },
77
-        show() {
78
-            // this.clear()
79
-            this.visible = true
80
-        },
81
-        hide() {
82
-            // this.clear()
83
-            this.visible = false
162
+  import { getDictionaryDataConfig } from '@/utils/data'
163
+
164
+  export default {
165
+    data() {
166
+      return {
167
+        visible: false,
168
+        modeOptions: {},
169
+        allPrescription: [],
170
+
171
+        form: {
172
+          name: '',
173
+          mode: ''
84
         },
174
         },
175
+        radio: '1',
176
+        options: [],
177
+        value: ''
178
+      }
179
+    },
180
+    methods: {
181
+      getGroup(id) {
182
+        var name = ''
183
+        var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
184
+        for (let i = 0; i < statistics_category.length; i++) {
185
+          if (id == statistics_category[i].id) {
186
+            name = statistics_category[i].name
187
+          }
188
+        }
189
+        return name
190
+      },
191
+      _close: function(done) {
192
+        // this.clear()
193
+        done()
194
+      },
195
+      clear: function() {
196
+        this.form.id = 0
197
+        this.form.name = ''
198
+        this.form.intro = ''
199
+      }, submitAction() {
200
+
201
+        let checkGroup = []
202
+        let allPrescriptions = []
203
+        let targetPrescriptions = []
204
+        let prescriptions = []
205
+        for (let i = 0; i < this.allPrescription.length; i++) {
206
+          for (let a = 0; a < this.allPrescription[i].check_group.length; a++) {
207
+            checkGroup.push(this.allPrescription[i].check_group[a])
208
+          }
209
+          for (let a = 0; a < this.allPrescription[i].prescriptions.length; a++) {
210
+            allPrescriptions.push(this.allPrescription[i].prescriptions[a])
211
+          }
212
+        }
213
+        for (let i = 0; i < allPrescriptions.length; i++) {
214
+          for (let a = 0; a < checkGroup.length; a++) {
215
+            if (allPrescriptions[i].id == checkGroup[a]) {
216
+              targetPrescriptions.push(allPrescriptions[i])
217
+            }
218
+          }
219
+        }
220
+
221
+
222
+        for(let i = 0; i < targetPrescriptions.length; i++){
223
+          if(targetPrescriptions[i].advices.length > 0 && targetPrescriptions[i].project.length == 0){
224
+            targetPrescriptions[i]["type"] = 1
225
+          } else if(targetPrescriptions[i].advices.length == 0 && targetPrescriptions[i].project.length > 0){
226
+            targetPrescriptions[i]["type"] = 2
227
+          }
228
+          for (let b = 0; b < targetPrescriptions[i].advices.length; b++) {
229
+            targetPrescriptions[i].advices[b].single_dose = targetPrescriptions[i].advices[b].single_dose.toString()
230
+            targetPrescriptions[i].advices[b].prescribing_number =targetPrescriptions[i].advices[b].prescribing_number.toString()
231
+            targetPrescriptions[i].advices[b].retail_price = targetPrescriptions[i].advices[b].retail_price.toString()
232
+            targetPrescriptions[i].advices[b].day = parseInt(targetPrescriptions[i].advices[b].day)
233
+          }
234
+          for (let b = 0; b < targetPrescriptions[i].project.length; b++) {
235
+            targetPrescriptions[i].project[b].price =targetPrescriptions[i].project[b].price.toString()
236
+            targetPrescriptions[i].project[b].total =targetPrescriptions[i].project[b].total.toString()
237
+            targetPrescriptions[i].project[b].delivery_way =targetPrescriptions[i].project[b].delivery_way.toString()
238
+          }
239
+        }
240
+
241
+        let params = {
242
+          name: this.form.name,
243
+          mode: this.form.mode,
244
+          prescriptions: targetPrescriptions,
245
+        }
246
+        this.$emit('save_template', params)
247
+      },
248
+      show(prescriptions) {
249
+        for (let i = 0; i < prescriptions.length; i++) {
250
+          if (prescriptions[i].id == 0) {
251
+            prescriptions[i].id = Math.floor((Math.random() + Math.floor(Math.random() * 9 + 1)) * Math.pow(10, 10 - 1))
252
+          }
253
+        }
254
+
255
+        this.allPrescription = []
256
+        this.modeOptions = this.$store.getters.treatment_mode
257
+        let obj = {
258
+          check_group: [],
259
+          prescriptions: prescriptions
260
+        }
261
+        this.allPrescription.push(obj)
262
+        this.visible = true
263
+      },
264
+      hide() {
265
+        // this.clear()
266
+        this.visible = false
267
+      }
85
     }
268
     }
86
-}
269
+  }
87
 </script>
270
 </script>
88
 
271
 
89
 
272
 

File diff suppressed because it is too large
+ 2286 - 770
src/xt_pages/outpatientDoctorStation/doctorDesk.vue


+ 7 - 7
src/xt_pages/outpatientDoctorStation/pastInquiries.vue View File

22
           <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
22
           <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
23
         </el-table-column>
23
         </el-table-column>
24
         <el-table-column align="center" prop="name" label="处方日期" width="200">
24
         <el-table-column align="center" prop="name" label="处方日期" width="200">
25
-          <template slot-scope="scope"> {{scope.row.info?getTimes(scope.row.info.ctime):''}}</template>
25
+          <template slot-scope="scope"> {{getTimes(scope.row.ctime)}}</template>
26
 
26
 
27
         </el-table-column>
27
         </el-table-column>
28
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
28
         <!--<el-table-column align="center" prop="name" label="患者类型">-->
29
           <!--<template slot-scope="scope">{{}}</template>-->
29
           <!--<template slot-scope="scope">{{}}</template>-->
30
         <!--</el-table-column>-->
30
         <!--</el-table-column>-->
31
         <el-table-column align="center" prop="name" label="处方号">
31
         <el-table-column align="center" prop="name" label="处方号">
32
-          <template slot-scope="scope">{{scope.row.info?scope.row.info.prescription_number:''}}</template>
32
+          <template slot-scope="scope">{{scope.row.prescription_number}}</template>
33
         </el-table-column>
33
         </el-table-column>
34
         <el-table-column align="center" prop="name" label="开立医生">
34
         <el-table-column align="center" prop="name" label="开立医生">
35
-          <template slot-scope="scope">{{scope.row.info?scope.row.info.doctor:''}}</template>
35
+          <template slot-scope="scope">{{scope.row.doctor}}</template>
36
         </el-table-column>
36
         </el-table-column>
37
         <el-table-column align="center" prop="name" label="诊断">
37
         <el-table-column align="center" prop="name" label="诊断">
38
-          <template slot-scope="scope">{{getDiagnosis(scope.row.info.diagnosis)}}</template>
38
+          <template slot-scope="scope">{{getDiagnosis(scope.row.diagnosis)}}</template>
39
         </el-table-column>
39
         </el-table-column>
40
         <el-table-column align="center" prop="name" label="状态" width="100">
40
         <el-table-column align="center" prop="name" label="状态" width="100">
41
           <template slot-scope="scope">
41
           <template slot-scope="scope">
42
-            <div v-if=" scope.row.info && scope.row.info.id > 0">已就诊</div>
42
+            <div v-if="scope.row.id > 0">已就诊</div>
43
             <div v-else>未就诊</div>
43
             <div v-else>未就诊</div>
44
           </template>
44
           </template>
45
         </el-table-column>
45
         </el-table-column>
121
         return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
121
         return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
122
       },
122
       },
123
       handerShowDetail(row) {
123
       handerShowDetail(row) {
124
-        if(row.info.id == 0){
124
+        if(row.id == 0){
125
           this.$message.error("未就诊")
125
           this.$message.error("未就诊")
126
           return
126
           return
127
         }
127
         }
128
-        this.$refs.inquiriesDetail.show(row.info.id)
128
+        this.$refs.inquiriesDetail.show(row.id)
129
       }, getHisPrescriptionList() {
129
       }, getHisPrescriptionList() {
130
         let params = {
130
         let params = {
131
           record_date:this.record_date,
131
           record_date:this.record_date,

+ 485 - 0
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue View File

1
+<template>
2
+    <div class="main-contain new-main-contain">
3
+        <div class="position">
4
+            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+            <el-button type="primary" @click="add">新增</el-button>
6
+
7
+        </div>
8
+        <div class="app-container" style="display:flex;flex: 1;padding: 10px 20px 0px 20px;">
9
+            <div class="mainLeft">
10
+                <div class="mainCell" style="margin-bottom:10px;">
11
+                    <el-input size="small" placeholder="请输入姓名" @input="searchAction"
12
+                              @keyup.enter.native='searchAction'
13
+                              v-model="search_input" class="filter-item"/>
14
+                    <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary"
15
+                               @click="searchAction">
16
+                        搜索
17
+                    </el-button>
18
+                </div>
19
+                <div>
20
+                    <el-table :data="data" :height="tableHeight" @row-click='choosePatient'
21
+                              @current-change='currentChange' border style="width: 100%;"
22
+                              :row-style="{ color: '#303133' }"
23
+                              :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
24
+                              highlight-current-row
25
+                              ref="tab">
26
+                        <el-table-column prop="name" label="姓名">
27
+                            <template slot-scope="scope">{{scope.row.name}}</template>
28
+                        </el-table-column>
29
+                    </el-table>
30
+                </div>
31
+            </div>
32
+            <div class="mainRight">
33
+                <el-table :data="templates" :height="tableHeight" @row-click='choosePatient'
34
+                          @current-change='currentChange' border style="width: 100%;"
35
+                          :row-style="{ color: '#303133' }"
36
+                          :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
37
+                          highlight-current-row
38
+                          ref="tab"
39
+                >
40
+                    <el-table-column prop="name" label="模版名称" >
41
+                        <template slot-scope="scope">{{scope.row.name}}</template>
42
+                    </el-table-column>
43
+                    <el-table-column prop="name" label="透析模式" >
44
+                        <template slot-scope="scope">{{getMode(scope.row.mode)}}</template>
45
+                    </el-table-column>
46
+                    <el-table-column prop="name" label="操作">
47
+                        <template slot-scope="scope">
48
+                            <el-button size="mini" type="primary" @click="jumpDetail(scope.row)">编辑</el-button>
49
+                            <el-button size="mini" type="danger" @click="deleteTemplate(scope.row)">删除</el-button>
50
+                        </template>
51
+                    </el-table-column>
52
+                </el-table>
53
+
54
+
55
+                <el-pagination
56
+                        @size-change="handleSizeChange"
57
+                        @current-change="handleCurrentChange"
58
+                        :page-sizes="[10, 50, 100]"
59
+                        :page-size="10"
60
+                        background
61
+                        align="right"
62
+                        style="margin-top:20px;"
63
+                        layout="total, sizes, prev, pager, next, jumper"
64
+                        :total="total"
65
+                >
66
+                </el-pagination>
67
+            </div>
68
+        </div>
69
+    </div>
70
+</template>
71
+
72
+<script>
73
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
74
+  import { getPatientList, getPrescriptiontemplateList,delHisPrescriptionTemplate } from '@/api/his/his_config'
75
+  import { uParseTime } from '@/utils/tools'
76
+
77
+  const moment = require('moment')
78
+  export default {
79
+    components: {
80
+      BreadCrumb
81
+    },
82
+    data() {
83
+      return {
84
+        templates: [],
85
+        tableHeight: '',
86
+        fullHeight: document.documentElement.clientHeight,
87
+        isloading: false,
88
+        data: [],
89
+        page: 1,
90
+        limit: 10,
91
+        patient_id: 0
92
+      }
93
+    },
94
+    methods: {
95
+      jumpDetail(row){
96
+        this.$router.push("/outpatientDoctorStation/prescriptionTemplatedetail?id="+row.id+"&patient_id="+this.patient_id)
97
+      },
98
+      deleteTemplate(row){
99
+        this.$confirm('处方模版删除后不可恢复,是否确认删除', '删除', {
100
+          confirmButtonText: '确 定',
101
+          cancelButtonText: '取 消',
102
+          type: 'warning'
103
+        }).then(() => {
104
+          let params = {
105
+            id:row.id
106
+          }
107
+          delHisPrescriptionTemplate(params).then(response => {
108
+            if (response.data.state == 1) {
109
+              this.GetPrescriptiontemplateList()
110
+            }
111
+          })
112
+
113
+        }).catch(() => {
114
+
115
+        })
116
+
117
+
118
+      },
119
+      getMode(id){
120
+        let name = ''
121
+        this.treatment_mode = Object.values(this.$store.getters.treatment_mode)
122
+        this.treatment_mode.map(item => {
123
+          if(item.id == id){
124
+            name = item.name
125
+          }
126
+        })
127
+        return name
128
+      },
129
+      handleSizeChange(val) {
130
+        this.limit = val
131
+        this.GetPrescriptiontemplateList()
132
+      },
133
+      handleCurrentChange(val) {
134
+        this.page = val
135
+        this.GetPrescriptiontemplateList()
136
+      },
137
+      GetPrescriptiontemplateList() {
138
+        let params = {
139
+          patient_id: this.patient_id,
140
+          page: this.page,
141
+          limit: this.limit
142
+        }
143
+        getPrescriptiontemplateList(params).then(response => {
144
+          if (response.data.state == 1) {
145
+            this.templates = response.data.data.list
146
+            this.total = response.data.data.total
147
+          }
148
+        })
149
+
150
+      },
151
+      searchAction() {
152
+
153
+      },choosePatient(val) {
154
+         this.page = 1,
155
+         this.limit = 10
156
+        let params = {
157
+          patient_id: val.id,
158
+          page: this.page,
159
+          limit: this.limit
160
+        }
161
+        getPrescriptiontemplateList(params).then(response => {
162
+          if (response.data.state == 1) {
163
+            this.templates = response.data.data.list
164
+            this.total = response.data.data.total
165
+          }
166
+        })
167
+      },
168
+      getList(id) {
169
+        getPatientList().then(response => {
170
+          if (response.data.state == 1) {
171
+            this.data = response.data.data.list
172
+            this.$refs.tab.setCurrentRow(this.data[0])
173
+            this.patient_id = this.data[0].id
174
+            this.GetPrescriptiontemplateList()
175
+
176
+          }
177
+        })
178
+      },
179
+      getTime(val, temp) {
180
+        if (val != 0) {
181
+          return uParseTime(val, temp)
182
+        } else {
183
+          return ''
184
+        }
185
+      },add(){
186
+        if(this.patient_id == 0){
187
+          this.$message.error("请选择病人")
188
+          return
189
+        }
190
+        this.$router.push("/outpatientDoctorStation/prescriptionTemplatedetail?id="+0+"&patient_id="+this.patient_id)
191
+
192
+      }
193
+    },
194
+    created() {
195
+      var nowDate = new Date()
196
+      var nowYear = nowDate.getFullYear()
197
+      var nowMonth = nowDate.getMonth() + 1
198
+      var nowDay = nowDate.getDate()
199
+      this.record_date =
200
+        nowYear +
201
+        '-' +
202
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
203
+        '-' +
204
+        (nowDay < 10 ? '0' + nowDay : nowDay)
205
+      this.getList()
206
+      let tableHeight = document.body.clientHeight - 263
207
+      this.tableHeight = tableHeight
208
+
209
+    },
210
+
211
+    mounted() {
212
+      const that = this
213
+      window.onresize = () => {
214
+        return (() => {
215
+          window.fullHeight = document.documentElement.clientHeight
216
+          that.fullHeight = window.fullHeight
217
+        })()
218
+      }
219
+    },
220
+    watch: {
221
+      fullHeight(val) {
222
+        if (!this.timer) {
223
+          this.fullHeight = val
224
+          let tableHeight = val - 263
225
+          this.tableHeight = tableHeight
226
+          this.timer = true
227
+          let that = this
228
+          setTimeout(function() {
229
+            that.timer = false
230
+          }, 400)
231
+        }
232
+      }
233
+
234
+    }
235
+  }
236
+</script>
237
+
238
+<style lang="scss" scoped>
239
+    .new-main-contain {
240
+        height: 100%;
241
+        display: flex;
242
+        flex-direction: column;
243
+    }
244
+
245
+    .app-container {
246
+        height: 100%;
247
+    }
248
+
249
+    .mainCell {
250
+        height: 36px;
251
+        display: flex;
252
+        align-items: center;
253
+    }
254
+
255
+    .mainLeft {
256
+        width: 200px;
257
+        height: 100%;
258
+        display: flex;
259
+        flex-direction: column;
260
+
261
+    .el-radio {
262
+        margin-right: 5px;
263
+    }
264
+
265
+    }
266
+    .mainRight {
267
+        margin-left: 10px;
268
+        flex: 1;
269
+        height: 100%;
270
+        display: flex;
271
+        flex-direction: column;
272
+        overflow-y: auto;
273
+
274
+    .cellSpan {
275
+        min-width: 80px;
276
+        display: inline-block;
277
+        margin-right: 10px;
278
+    }
279
+
280
+    }
281
+    .mainCenter {
282
+        display: flex;
283
+        flex: 1;
284
+    }
285
+
286
+    .centerLeft {
287
+        flex: 1;
288
+        display: flex;
289
+        flex-direction: column;
290
+        position: relative;
291
+
292
+    .el-form-item {
293
+        width: 32%;
294
+        margin-right: 1%;
295
+        float: left;
296
+    }
297
+
298
+    .el-form-item__label {
299
+        text-align: left;
300
+    }
301
+
302
+    }
303
+    .backColor {
304
+        background: #f6f8f9;
305
+        height: 5px;
306
+        margin-bottom: 5px;
307
+    }
308
+
309
+    .tabsBox {
310
+        position: relative;
311
+        height: 76%;
312
+        overflow-y: auto;
313
+        margin-bottom: 60px;
314
+
315
+    .el-tabs__item {
316
+        padding: 0 10px;
317
+    }
318
+
319
+    }
320
+    .preTabs {
321
+        height: 100%;
322
+        display: flex;
323
+        flex-direction: column;
324
+
325
+    .el-tabs__content {
326
+        flex: 1;
327
+        overflow-y: auto;
328
+    }
329
+
330
+    }
331
+
332
+    .costBox {
333
+        width: 100%;
334
+        height: 60px;
335
+        background: #fff;
336
+        position: absolute;
337
+        bottom: 0;
338
+        display: flex;
339
+        align-items: center;
340
+    }
341
+
342
+    .addTab {
343
+        position: absolute;
344
+        right: 0;
345
+        top: 14px;
346
+        z-index: 20;
347
+    }
348
+
349
+    .centerRight {
350
+        width: 300px;
351
+        margin-left: 10px;
352
+        display: flex;
353
+        flex-direction: column;
354
+        position: relative;
355
+    }
356
+
357
+    .rightTab {
358
+        height: 40px;
359
+        width: 100%;
360
+        border: 1px solid #d2d2d2;
361
+        box-sizing: border-box;
362
+
363
+    p {
364
+        width: 50%;
365
+        height: 40px;
366
+        line-height: 40px;
367
+        text-align: center;
368
+        background: #eee;
369
+        float: left;
370
+    }
371
+
372
+    > p:last-child {
373
+        border-left: 1px solid #d2d2d2;
374
+        float: right;
375
+    }
376
+
377
+    .activeP {
378
+        background: #409EFF;
379
+        color: #fff;
380
+    }
381
+
382
+    }
383
+    .comfirmBox {
384
+        width: 100%;
385
+        height: 60px;
386
+        background: #fff;
387
+        position: absolute;
388
+        bottom: 0;
389
+        display: flex;
390
+        align-items: center;
391
+        justify-content: space-between;
392
+    }
393
+
394
+    .mainHeader {
395
+        width: 100%;
396
+        background: #fff;
397
+        position: fixed;
398
+        z-index: 100;
399
+        height: 36px;
400
+    }
401
+
402
+    .titleBox {
403
+        position: fixed;
404
+        z-index: 99;
405
+        background: #fff;
406
+    }
407
+
408
+    .fixedCell {
409
+        position: fixed;
410
+        z-index: 99;
411
+        right: 30px;
412
+        background: #fff;
413
+        width: 300px;
414
+        display: flex;
415
+        justify-content: space-between;
416
+    }
417
+</style>
418
+
419
+<style lang="scss">
420
+    .centerLeft {
421
+
422
+    .el-form-item__label {
423
+        text-align: left;
424
+    }
425
+
426
+    }
427
+    .tabsBox {
428
+
429
+    .el-tabs__item {
430
+        padding: 0 10px;
431
+    }
432
+
433
+    .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
434
+        padding: 0 10px;
435
+    }
436
+
437
+    .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
438
+        padding: 0 10px;
439
+    }
440
+
441
+    .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
442
+        padding: 0 10px;
443
+    }
444
+
445
+    }
446
+    .centerRight {
447
+
448
+    .el-tabs__nav-scroll {
449
+        display: flex;
450
+    }
451
+
452
+    .el-tabs__nav {
453
+        margin: 0 auto;
454
+    }
455
+
456
+    .el-table th .cell, .el-table td .cell {
457
+        padding: 0 2px;
458
+    }
459
+
460
+    }
461
+    .preTabs {
462
+
463
+    .el-tabs__content {
464
+
465
+    }
466
+
467
+    }
468
+    .rightTabs {
469
+        height: 100%;
470
+
471
+
472
+    .el-tabs__content {
473
+
474
+    }
475
+
476
+    }
477
+    .centerDialog {
478
+
479
+    .el-dialog__body {
480
+        max-height: calc(100vh - 100px) !important;
481
+        padding: 0 20px;
482
+    }
483
+
484
+    }
485
+</style>

File diff suppressed because it is too large
+ 1995 - 0
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue


+ 14 - 14
src/xt_pages/outpatientDoctorStation/template/printOne.vue View File

29
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
29
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
30
                 <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
30
                 <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
31
                </div>
31
                </div>
32
-               
32
+
33
               <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
33
               <div class="drugsBox" v-for="(it,index) in item.project" :key="index">
34
-                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{getProjectName(it.project_id)?getProjectName(it.project_id):""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
34
+                  <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.type == 2?getProjectName(it.project_id)?getProjectName(it.project_id):"":it.good_info.good_name}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.count}}{{unit}}</div>
35
                   <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
35
                   <div style="margin-left:100px;"><span>用法:{{it.single_dose}}{{it.single_dose_unit}}</span>&nbsp;&nbsp;<span>{{it.delivery_way}}</span>&nbsp;&nbsp;<span>{{it.advice_desc}}</span></div>
36
               </div>
36
               </div>
37
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
37
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
60
           <div style="page-break-after:always"></div>
60
           <div style="page-break-after:always"></div>
61
       </div>
61
       </div>
62
     </div>
62
     </div>
63
-    
63
+
64
   </div>
64
   </div>
65
 
65
 
66
-    
66
+
67
 </template>
67
 </template>
68
 <script>
68
 <script>
69
 import { jsGetAge, uParseTime } from '@/utils/tools'
69
 import { jsGetAge, uParseTime } from '@/utils/tools'
75
       record_date:String,
75
       record_date:String,
76
       prescription_id:Number,
76
       prescription_id:Number,
77
       ids:String
77
       ids:String
78
-    }, 
78
+    },
79
     data(){
79
     data(){
80
       return {
80
       return {
81
         doctorList:[],
81
         doctorList:[],
92
       }
92
       }
93
     },
93
     },
94
    methods:{
94
    methods:{
95
-     
95
+
96
      getAllDoctorList(){
96
      getAllDoctorList(){
97
       getAllDoctorList().then(response=>{
97
       getAllDoctorList().then(response=>{
98
         if(response.data.state == 1){
98
         if(response.data.state == 1){
99
                var doctor =  response.data.data.doctor
99
                var doctor =  response.data.data.doctor
100
-               
100
+
101
                this.doctorList = doctor
101
                this.doctorList = doctor
102
              }
102
              }
103
-         })   
103
+         })
104
      },
104
      },
105
 
105
 
106
       getDoctor(id){
106
       getDoctor(id){
194
             }
194
             }
195
               addtotal =  Math.floor(addtotal * 100) / 100
195
               addtotal =  Math.floor(addtotal * 100) / 100
196
         }
196
         }
197
-       
197
+
198
        }
198
        }
199
 
199
 
200
       for (let i = 0; i < this.prescriptions.length; i++) {
200
       for (let i = 0; i < this.prescriptions.length; i++) {
204
                 total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
204
                 total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
205
               }
205
               }
206
             }
206
             }
207
-          
207
+
208
             if (this.prescriptions[i].additionalcharge != null) {
208
             if (this.prescriptions[i].additionalcharge != null) {
209
               for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
209
               for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
210
                 addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
210
                 addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
216
 
216
 
217
         return total + addtotal
217
         return total + addtotal
218
       },
218
       },
219
-      
219
+
220
      getProjectName(id){
220
      getProjectName(id){
221
         var project_name = ""
221
         var project_name = ""
222
         for(let i=0;i<this.projectList.length;i++){
222
         for(let i=0;i<this.projectList.length;i++){
245
       this.getHisPatientDetail()
245
       this.getHisPatientDetail()
246
       var xtuser = this.$store.getters.xt_user;
246
       var xtuser = this.$store.getters.xt_user;
247
       this.orgname = xtuser.org.org_name;
247
       this.orgname = xtuser.org.org_name;
248
-     
248
+
249
    },
249
    },
250
    watch:{
250
    watch:{
251
      ids:function(val){
251
      ids:function(val){
260
 <style lang="scss" scoped>
260
 <style lang="scss" scoped>
261
 .prescription-print{
261
 .prescription-print{
262
   -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
262
   -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
263
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; 
263
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
264
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
264
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
265
     margin-bottom: 20px;
265
     margin-bottom: 20px;
266
     padding:20px 10px;
266
     padding:20px 10px;
320
 }
320
 }
321
 .actionBar{
321
 .actionBar{
322
     display: flex;
322
     display: flex;
323
-    justify-content: space-between; 
323
+    justify-content: space-between;
324
     line-height: 24px;
324
     line-height: 24px;
325
     padding:0 10px;
325
     padding:0 10px;
326
 }
326
 }

+ 2 - 2
src/xt_pages/outpatientDoctorStation/treatTemplate/printOne.vue View File

50
                 </tr>
50
                 </tr>
51
                 <tr v-for="(it,index) in item.project" :key="index">
51
                 <tr v-for="(it,index) in item.project" :key="index">
52
                     <td>{{index+1}}</td>
52
                     <td>{{index+1}}</td>
53
-                    <td>{{getProjectName(it.project_id)}}</td>
53
+                    <td>{{it.type == 2 ?getProjectName(it.project_id):it.good_info.good_name}}</td>
54
                     <td>{{it.single_dose}}</td>
54
                     <td>{{it.single_dose}}</td>
55
                     <td>{{getUnit(it.unit)}}</td>
55
                     <td>{{getUnit(it.unit)}}</td>
56
                     <td>{{it.price}}</td>
56
                     <td>{{it.price}}</td>
481
 .actionBar div{
481
 .actionBar div{
482
     width:150px;
482
     width:150px;
483
 }
483
 }
484
-</style>
484
+</style>

+ 132 - 132
src/xt_pages/outpatientRegistration/index.vue View File

649
         }
649
         }
650
       },
650
       },
651
       handleSelect(val) {
651
       handleSelect(val) {
652
-        this.form.id = val.id;
653
-        this.form.name = val.name;
654
-        this.form.sex = val.gender;
655
-        this.form.age = val.age;
656
-        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}');
657
-        this.form.phone = val.phone;
658
-        this.form.idCard = val.id_card_no;
659
-
660
-        var thisLen = this.form.idCard.length;
661
-        var birth = '';
652
+        this.form.id = val.id
653
+        this.form.name = val.name
654
+        this.form.sex = val.gender
655
+        this.form.age = val.age
656
+        this.form.birthday = uParseTime(val.birthday, '{y}-{m}-{d}')
657
+        this.form.phone = val.phone
658
+        this.form.idCard = val.id_card_no
659
+
660
+        var thisLen = this.form.idCard.length
661
+        var birth = ''
662
         if (thisLen == 15) {
662
         if (thisLen == 15) {
663
           birth = '19' + this.form.idCard.substr(6, 6)
663
           birth = '19' + this.form.idCard.substr(6, 6)
664
         } else {
664
         } else {
669
           '-' +
669
           '-' +
670
           birth.substr(4, 2) +
670
           birth.substr(4, 2) +
671
           '-' +
671
           '-' +
672
-          birth.substr(6, 2);
672
+          birth.substr(6, 2)
673
         this.form.age = jsGetAge(births, '-')
673
         this.form.age = jsGetAge(births, '-')
674
       },
674
       },
675
       querySearchAsync(keyword, cb) {
675
       querySearchAsync(keyword, cb) {
676
-        let key = '';
676
+        let key = ''
677
         if (keyword != undefined) {
677
         if (keyword != undefined) {
678
           key = keyword
678
           key = keyword
679
         }
679
         }
680
-        let searchArray = [];
680
+        let searchArray = []
681
         PostSearch(key).then(response => {
681
         PostSearch(key).then(response => {
682
           if (response.data.state == 1) {
682
           if (response.data.state == 1) {
683
-            searchArray = response.data.data.patient;
683
+            searchArray = response.data.data.patient
684
             cb(searchArray)
684
             cb(searchArray)
685
           } else {
685
           } else {
686
             cb([])
686
             cb([])
688
         })
688
         })
689
       },
689
       },
690
       readingSZ() {
690
       readingSZ() {
691
-        var that = this;
691
+        var that = this
692
         if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
692
         if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
693
-          this.$message.error('请先选择读卡类型');
693
+          this.$message.error('请先选择读卡类型')
694
           return
694
           return
695
         }
695
         }
696
-        this.read_loading = true;
696
+        this.read_loading = true
697
         let params = {
697
         let params = {
698
           'id_card_type': this.form.id_card_type
698
           'id_card_type': this.form.id_card_type
699
 
699
 
700
-        };
700
+        }
701
         axios.get('http://127.0.0.1:9532/sz/api/readcard', {
701
         axios.get('http://127.0.0.1:9532/sz/api/readcard', {
702
           params: params
702
           params: params
703
         })
703
         })
704
           .then(function(response) {
704
           .then(function(response) {
705
             if (response.data.state == 0) {
705
             if (response.data.state == 0) {
706
-              that.read_loading = false;
706
+              that.read_loading = false
707
 
707
 
708
-              that.$message.error(response.data.msg);
708
+              that.$message.error(response.data.msg)
709
               return false
709
               return false
710
             } else {
710
             } else {
711
-              that.read_loading = false;
711
+              that.read_loading = false
712
 
712
 
713
-              var patient = response.data.data.patient;
713
+              var patient = response.data.data.patient
714
               if (that.form.id_card_type == 1) {
714
               if (that.form.id_card_type == 1) {
715
-                that.form.id = patient.id;
716
-                that.form.name = patient.name;
717
-                that.form.sex = patient.gender;
718
-                that.form.age = patient.age;
719
-                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
720
-                that.form.phone = patient.phone;
721
-                that.form.idCard = patient.id_card_no;
715
+                that.form.id = patient.id
716
+                that.form.name = patient.name
717
+                that.form.sex = patient.gender
718
+                that.form.age = patient.age
719
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
720
+                that.form.phone = patient.phone
721
+                that.form.idCard = patient.id_card_no
722
                 that.form.medicalInsuranceCard = response.data.data.health_card_no
722
                 that.form.medicalInsuranceCard = response.data.data.health_card_no
723
               } else if (that.form.id_card_type == 2) {
723
               } else if (that.form.id_card_type == 2) {
724
-                this.form.id = patient.id;
725
-                that.form.name = patient.name;
726
-                that.form.sex = patient.gender;
727
-                that.form.age = patient.age;
728
-                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
729
-                that.form.phone = patient.phone;
724
+                this.form.id = patient.id
725
+                that.form.name = patient.name
726
+                that.form.sex = patient.gender
727
+                that.form.age = patient.age
728
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
729
+                that.form.phone = patient.phone
730
                 that.form.idCard = patient.id_card_no
730
                 that.form.idCard = patient.id_card_no
731
               }
731
               }
732
               that.$message({ message: '读卡成功', type: 'success' })
732
               that.$message({ message: '读卡成功', type: 'success' })
739
       },
739
       },
740
 
740
 
741
       reading(medicalInsuranceCard) {
741
       reading(medicalInsuranceCard) {
742
-        var that = this;
742
+        var that = this
743
         if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
743
         if (this.form.id_card_type.length == 0 || this.form.id_card_type == 0) {
744
-          this.$message.error('请先选择读卡类型');
744
+          this.$message.error('请先选择读卡类型')
745
           return
745
           return
746
         }
746
         }
747
         let params = {
747
         let params = {
748
           'id_card_type': this.form.id_card_type
748
           'id_card_type': this.form.id_card_type
749
-        };
749
+        }
750
         axios.get('http://127.0.0.1:9532/api/sscard', {
750
         axios.get('http://127.0.0.1:9532/api/sscard', {
751
           params: params
751
           params: params
752
         })
752
         })
753
           .then(function(response) {
753
           .then(function(response) {
754
             if (response.data.state == 0) {
754
             if (response.data.state == 0) {
755
-              that.$message.error(response.data.msg);
755
+              that.$message.error(response.data.msg)
756
               return false
756
               return false
757
             } else {
757
             } else {
758
-              var patient = response.data.data.patient;
758
+              var patient = response.data.data.patient
759
 
759
 
760
               if (that.form.id_card_type == 1) {
760
               if (that.form.id_card_type == 1) {
761
-                that.form.name = patient.ID;
762
-                that.form.sex = patient.gender;
763
-                that.form.age = patient.age;
764
-                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
765
-                that.form.phone = patient.phone;
766
-                that.form.idCard = patient.id_card_no;
761
+                that.form.name = patient.ID
762
+                that.form.sex = patient.gender
763
+                that.form.age = patient.age
764
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
765
+                that.form.phone = patient.phone
766
+                that.form.idCard = patient.id_card_no
767
                 that.form.medicalInsuranceCard = response.data.data.number
767
                 that.form.medicalInsuranceCard = response.data.data.number
768
 
768
 
769
               } else if (that.form.id_card_type == 2) {
769
               } else if (that.form.id_card_type == 2) {
770
-                that.form.name = patient.ID;
771
-                that.form.sex = patient.gender;
772
-                that.form.age = patient.age;
773
-                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}');
774
-                that.form.phone = patient.phone;
770
+                that.form.name = patient.ID
771
+                that.form.sex = patient.gender
772
+                that.form.age = patient.age
773
+                that.form.birthday = uParseTime(patient.birthday, '{y}-{m}-{d}')
774
+                that.form.phone = patient.phone
775
                 that.form.idCard = patient.id_card_no
775
                 that.form.idCard = patient.id_card_no
776
               }
776
               }
777
               that.$message({ message: '读卡成功', type: 'success' })
777
               that.$message({ message: '读卡成功', type: 'success' })
783
 
783
 
784
       },
784
       },
785
       getBirthday(date) {
785
       getBirthday(date) {
786
-        console.log(date);
787
-        let curTime = moment(new Date(date)).format('YYYY-MM-DD');
788
-        console.log('curTime22222', curTime);
786
+        console.log(date)
787
+        let curTime = moment(new Date(date)).format('YYYY-MM-DD')
788
+        console.log('curTime22222', curTime)
789
 
789
 
790
-        console.log(this.jsGetAge(curTime));
790
+        console.log(this.jsGetAge(curTime))
791
 
791
 
792
         this.form.age = this.jsGetAge(curTime)
792
         this.form.age = this.jsGetAge(curTime)
793
       },
793
       },
794
       jsGetAge(strBirthday) { //传入形式yyyy-MM-dd
794
       jsGetAge(strBirthday) { //传入形式yyyy-MM-dd
795
         //strBirthday = util.formatTime(strBirthday);转换成yyyy-MM-dd形式
795
         //strBirthday = util.formatTime(strBirthday);转换成yyyy-MM-dd形式
796
-        var returnAge;
797
-        var strBirthdayArr = strBirthday.split('-');
798
-        var birthYear = strBirthdayArr[0];
799
-        var birthMonth = strBirthdayArr[1];
800
-        var birthDay = strBirthdayArr[2];
801
-        var d = new Date();
802
-        var nowYear = d.getFullYear();
803
-        var nowMonth = d.getMonth() + 1;
804
-        var nowDay = d.getDate();
796
+        var returnAge
797
+        var strBirthdayArr = strBirthday.split('-')
798
+        var birthYear = strBirthdayArr[0]
799
+        var birthMonth = strBirthdayArr[1]
800
+        var birthDay = strBirthdayArr[2]
801
+        var d = new Date()
802
+        var nowYear = d.getFullYear()
803
+        var nowMonth = d.getMonth() + 1
804
+        var nowDay = d.getDate()
805
         if (nowYear == birthYear) {
805
         if (nowYear == birthYear) {
806
           returnAge = 0 //同年 则为0岁
806
           returnAge = 0 //同年 则为0岁
807
         } else {
807
         } else {
808
-          var ageDiff = nowYear - birthYear; //年之差
808
+          var ageDiff = nowYear - birthYear //年之差
809
           if (ageDiff > 0) {
809
           if (ageDiff > 0) {
810
             if (nowMonth == birthMonth) {
810
             if (nowMonth == birthMonth) {
811
-              var dayDiff = nowDay - birthDay; //日之差
811
+              var dayDiff = nowDay - birthDay //日之差
812
               if (dayDiff < 0) {
812
               if (dayDiff < 0) {
813
                 returnAge = ageDiff - 1
813
                 returnAge = ageDiff - 1
814
               } else {
814
               } else {
815
                 returnAge = ageDiff
815
                 returnAge = ageDiff
816
               }
816
               }
817
             } else {
817
             } else {
818
-              var monthDiff = nowMonth - birthMonth; //月之差
818
+              var monthDiff = nowMonth - birthMonth //月之差
819
               if (monthDiff < 0) {
819
               if (monthDiff < 0) {
820
                 returnAge = ageDiff - 1
820
                 returnAge = ageDiff - 1
821
               } else {
821
               } else {
829
         return returnAge //返回周岁年龄
829
         return returnAge //返回周岁年龄
830
       },
830
       },
831
       getForm() {
831
       getForm() {
832
-        this.form.total = this.total;
832
+        this.form.total = this.total
833
         if (localStorage.getItem('temp')) {
833
         if (localStorage.getItem('temp')) {
834
-          let a = JSON.parse(localStorage.getItem('temp'));
834
+          let a = JSON.parse(localStorage.getItem('temp'))
835
           // let arr = []
835
           // let arr = []
836
-          this.form.create_time = new Date(new Date().toLocaleDateString()).getTime() / 1000;
837
-          this.form.org_id = this.$store.getters.xt_user.org_id;
838
-          a.push(this.form);
839
-          console.log(111, a);
840
-          localStorage.setItem('temp', JSON.stringify(a));
836
+          this.form.create_time = new Date(new Date().toLocaleDateString()).getTime() / 1000
837
+          this.form.org_id = this.$store.getters.xt_user.org_id
838
+          a.push(this.form)
839
+          console.log(111, a)
840
+          localStorage.setItem('temp', JSON.stringify(a))
841
           Object.keys(this.form).forEach((key) => {
841
           Object.keys(this.form).forEach((key) => {
842
             this.form[key] = ''
842
             this.form[key] = ''
843
-          });
843
+          })
844
           this.$message({ message: '添加成功', type: 'success' })
844
           this.$message({ message: '添加成功', type: 'success' })
845
         } else {
845
         } else {
846
-          let arr = [];
847
-          this.form.create_time = new Date(new Date().toLocaleDateString()).getTime() / 1000;
848
-          this.form.org_id = this.$store.getters.xt_user.org_id;
849
-          arr.push(this.form);
850
-          localStorage.setItem('temp', JSON.stringify(arr));
846
+          let arr = []
847
+          this.form.create_time = new Date(new Date().toLocaleDateString()).getTime() / 1000
848
+          this.form.org_id = this.$store.getters.xt_user.org_id
849
+          arr.push(this.form)
850
+          localStorage.setItem('temp', JSON.stringify(arr))
851
           Object.keys(this.form).forEach((key) => {
851
           Object.keys(this.form).forEach((key) => {
852
             this.form[key] = ''
852
             this.form[key] = ''
853
-          });
853
+          })
854
           this.$message({ message: '添加成功', type: 'success' })
854
           this.$message({ message: '添加成功', type: 'success' })
855
         }
855
         }
856
       },
856
       },
858
       getAllDoctorList() {
858
       getAllDoctorList() {
859
         getAllDoctorList().then(response => {
859
         getAllDoctorList().then(response => {
860
           if (response.data.state == 1) {
860
           if (response.data.state == 1) {
861
-            var doctor = response.data.data.doctor;
862
-            console.log('doctor-----', doctor);
863
-            this.doctorList = doctor;
864
-            var department = response.data.data.department;
865
-            console.log('department', department);
861
+            var doctor = response.data.data.doctor
862
+            console.log('doctor-----', doctor)
863
+            this.doctorList = doctor
864
+            var department = response.data.data.department
865
+            console.log('department', department)
866
             this.departmentList = department
866
             this.departmentList = department
867
           }
867
           }
868
         })
868
         })
869
       }, saveHisPatient9504(formName) {
869
       }, saveHisPatient9504(formName) {
870
         if (this.form.name == '') {
870
         if (this.form.name == '') {
871
-          this.$message.error('患者姓名不能为空');
872
-          this.is_Name = true;
871
+          this.$message.error('患者姓名不能为空')
872
+          this.is_Name = true
873
           return
873
           return
874
         }
874
         }
875
 
875
 
878
         }
878
         }
879
 
879
 
880
         if (this.form.register == '') {
880
         if (this.form.register == '') {
881
-          this.$message.error('挂号类型不能为空');
882
-          this.is_Name = true;
881
+          this.$message.error('挂号类型不能为空')
882
+          this.is_Name = true
883
           return
883
           return
884
         }
884
         }
885
 
885
 
890
         // }
890
         // }
891
 
891
 
892
         if (this.form.department == '') {
892
         if (this.form.department == '') {
893
-          this.$message.error('科室不能为空');
894
-          this.is_Name = true;
893
+          this.$message.error('科室不能为空')
894
+          this.is_Name = true
895
           return
895
           return
896
         }
896
         }
897
         if (this.form.age == '') {
897
         if (this.form.age == '') {
898
-          this.$message.error('患者年龄不能为空');
899
-          this.is_Name = true;
898
+          this.$message.error('患者年龄不能为空')
899
+          this.is_Name = true
900
           return
900
           return
901
         }
901
         }
902
         if (this.form.birthday == '') {
902
         if (this.form.birthday == '') {
903
-          this.$message.error('出生日期不能为空');
904
-          this.is_Name = true;
903
+          this.$message.error('出生日期不能为空')
904
+          this.is_Name = true
905
           return
905
           return
906
         }
906
         }
907
         if (this.form.id_card_type == '') {
907
         if (this.form.id_card_type == '') {
908
-          this.$message.error('读卡类型不能为空');
909
-          this.is_Name = true;
908
+          this.$message.error('读卡类型不能为空')
909
+          this.is_Name = true
910
           return
910
           return
911
         }
911
         }
912
 
912
 
913
         if (this.form.idCard == '') {
913
         if (this.form.idCard == '') {
914
-          this.$message.error('证件号码不能为空');
915
-          this.is_Name = true;
914
+          this.$message.error('证件号码不能为空')
915
+          this.is_Name = true
916
           return
916
           return
917
         }
917
         }
918
 
918
 
943
               p_type: this.form.p_type,
943
               p_type: this.form.p_type,
944
               diagnosis: this.form.diagnosis,
944
               diagnosis: this.form.diagnosis,
945
               sick_type: this.form.sick_type
945
               sick_type: this.form.sick_type
946
-            };
947
-            params['record_time'] = this.record_date;
948
-            params['admin_user_id'] = this.$store.getters.xt_user.user.id;
949
-            this.loadingone = true;
946
+            }
947
+            params['record_time'] = this.record_date
948
+            params['admin_user_id'] = this.$store.getters.xt_user.user.id
949
+            this.loadingone = true
950
 
950
 
951
             if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
951
             if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028) {
952
-              var that = this;
952
+              var that = this
953
               axios.get('http://127.0.0.1:9532/sz/api/register/get', {
953
               axios.get('http://127.0.0.1:9532/sz/api/register/get', {
954
                 params: params,
954
                 params: params,
955
                 headers: {
955
                 headers: {
958
               })
958
               })
959
                 .then(function(response) {
959
                 .then(function(response) {
960
                   if (response.data.state == 0) {
960
                   if (response.data.state == 0) {
961
-                    that.$message.error(response.data.msg);
962
-                    that.loadingone = false;
961
+                    that.$message.error(response.data.msg)
962
+                    that.loadingone = false
963
                     return false
963
                     return false
964
                   } else {
964
                   } else {
965
                     if (response.data.data.failed_code == -10) {
965
                     if (response.data.data.failed_code == -10) {
972
                       }).catch(() => {
972
                       }).catch(() => {
973
                       })
973
                       })
974
                     } else {
974
                     } else {
975
-                      that.$message({ message: '挂号成功', type: 'success' });
976
-                      that.form.settlementValue = '';
977
-                      that.form.medicalInsuranceCard = '';
978
-                      that.form.name = '';
979
-                      that.form.sex = '';
980
-                      that.form.certificates = '';
981
-                      that.form.medicalCare = '';
982
-                      that.form.birthday = '';
983
-                      that.form.age = '';
984
-                      that.form.idCard = '';
985
-                      that.form.register = '';
986
-                      that.form.doctor = '';
987
-                      that.form.department = '';
988
-                      that.form.costChecked = false;
989
-                      that.form.registrationFee = '';
990
-                      that.form.medicalExpenses = '';
991
-                      that.form.cost = '';
992
-                      that.form.total = '';
993
-                      that.form.phone = '';
994
-                      that.form.social_type = '';
995
-                      that.loadingone = false;
996
-
997
-
998
-                      that.form.p_type = 14;
999
-                      that.form.sick_type = that.sick[0].id;
975
+                      that.$message({ message: '挂号成功', type: 'success' })
976
+                      that.form.settlementValue = ''
977
+                      that.form.medicalInsuranceCard = ''
978
+                      that.form.name = ''
979
+                      that.form.sex = ''
980
+                      that.form.certificates = ''
981
+                      that.form.medicalCare = ''
982
+                      that.form.birthday = ''
983
+                      that.form.age = ''
984
+                      that.form.idCard = ''
985
+                      that.form.register = ''
986
+                      that.form.doctor = ''
987
+                      that.form.department = ''
988
+                      that.form.costChecked = false
989
+                      that.form.registrationFee = ''
990
+                      that.form.medicalExpenses = ''
991
+                      that.form.cost = ''
992
+                      that.form.total = ''
993
+                      that.form.phone = ''
994
+                      that.form.social_type = ''
995
+                      that.loadingone = false
996
+
997
+
998
+                      that.form.p_type = 14
999
+                      that.form.sick_type = that.sick[0].id
1000
                       that.form.diagnosis = that.diagnoses[0].id
1000
                       that.form.diagnosis = that.diagnoses[0].id
1001
 
1001
 
1002
                     }
1002
                     }

+ 65 - 62
src/xt_pages/outpatientRegistration/registrationHistory.vue View File

454
 </template>
454
 </template>
455
 
455
 
456
 <script>
456
 <script>
457
-  const moment = require('moment');
457
+  const moment = require('moment')
458
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
458
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
459
   import { changePatient, getHisPatient, getHisPatientHistory } from '@/api/project/project'
459
   import { changePatient, getHisPatient, getHisPatientHistory } from '@/api/project/project'
460
   import { uParseTime } from '@/utils/tools'
460
   import { uParseTime } from '@/utils/tools'
461
   import { getDictionaryDataConfig } from '@/utils/data'
461
   import { getDictionaryDataConfig } from '@/utils/data'
462
   import axios from 'axios'
462
   import axios from 'axios'
463
 
463
 
464
+
464
   export default {
465
   export default {
465
     components: {
466
     components: {
466
       BreadCrumb
467
       BreadCrumb
604
       // this.tableData = arr
605
       // this.tableData = arr
605
       //获取所有挂号号的患者
606
       //获取所有挂号号的患者
606
 
607
 
607
-      this.creator = this.$store.getters.xt_user.user.user_name;
608
-      var today = moment().startOf('day').format('YYYY-MM-DD');
609
-      var todayUnix = Date.parse(today) / 1000;
610
-      this.startUnix = todayUnix - 28800;
608
+      this.creator = this.$store.getters.xt_user.user.user_name
609
+      var today = moment().startOf('day').format('YYYY-MM-DD')
610
+      var todayUnix = Date.parse(today) / 1000
611
+      this.startUnix = todayUnix - 28800
611
 
612
 
612
-      this.getlist();
613
+      this.getlist()
613
       this.getDictionaryDataConfig()
614
       this.getDictionaryDataConfig()
614
     },
615
     },
615
     methods: {
616
     methods: {
634
       //     this.tableData = a
635
       //     this.tableData = a
635
       // },
636
       // },
636
       changeStart(val) {
637
       changeStart(val) {
637
-        this.start_time = val;
638
+        this.start_time = val
638
         this.getlist()
639
         this.getlist()
639
       },
640
       },
640
       changeEnd(val) {
641
       changeEnd(val) {
641
-        this.end_time = val;
642
+        this.end_time = val
642
         this.getlist()
643
         this.getlist()
643
       },
644
       },
644
       changeRegister(val) {
645
       changeRegister(val) {
645
         this.getlist()
646
         this.getlist()
646
       },
647
       },
647
       handleSizeChange(val) {
648
       handleSizeChange(val) {
648
-        this.limit = val;
649
+        this.limit = val
649
         this.getlist()
650
         this.getlist()
650
       },
651
       },
651
       handleCurrentChange(val) {
652
       handleCurrentChange(val) {
652
-        this.page = val;
653
+        this.page = val
653
         this.getlist()
654
         this.getlist()
654
       },
655
       },
655
       getlist() {
656
       getlist() {
660
           register_type: this.register_type,
661
           register_type: this.register_type,
661
           limit: this.limit,
662
           limit: this.limit,
662
           page: this.page
663
           page: this.page
663
-        };
664
-        console.log('params', params);
664
+        }
665
+        console.log('params', params)
665
         getHisPatientHistory(params).then(response => {
666
         getHisPatientHistory(params).then(response => {
666
           if (response.data.state == 1) {
667
           if (response.data.state == 1) {
667
-            var history = response.data.data.history;
668
-
669
-            console.log('history', history);
670
-            this.tableData = history;
671
-            var total = response.data.data.total;
672
-            console.log('total', total);
673
-            this.total = total;
674
-            var department = response.data.data.department;
675
-            console.log('department', department);
676
-            this.departMent = department;
677
-            var doctor = response.data.data.doctor;
678
-            console.log('doctor', doctor);
668
+            var history = response.data.data.history
669
+
670
+            console.log('history', history)
671
+            this.tableData = history
672
+            var total = response.data.data.total
673
+            console.log('total', total)
674
+            this.total = total
675
+            var department = response.data.data.department
676
+            console.log('department', department)
677
+            this.departMent = department
678
+            var doctor = response.data.data.doctor
679
+            console.log('doctor', doctor)
679
             this.doctorList = doctor
680
             this.doctorList = doctor
680
           }
681
           }
681
         })
682
         })
682
 
683
 
683
       },
684
       },
684
       getDepartMent(id) {
685
       getDepartMent(id) {
685
-        var name = '';
686
+        var name = ''
686
         for (let i = 0; i < this.departMent.length; i++) {
687
         for (let i = 0; i < this.departMent.length; i++) {
687
           if (id == this.departMent[i].id) {
688
           if (id == this.departMent[i].id) {
688
             name = this.departMent[i].name
689
             name = this.departMent[i].name
691
         return name
692
         return name
692
       },
693
       },
693
       getDoctor(id) {
694
       getDoctor(id) {
694
-        var user_name = '';
695
+        var user_name = ''
695
         for (let i = 0; i < this.doctorList.length; i++) {
696
         for (let i = 0; i < this.doctorList.length; i++) {
696
           if (id == this.doctorList[i].admin_user_id) {
697
           if (id == this.doctorList[i].admin_user_id) {
697
             user_name = this.doctorList[i].user_name
698
             user_name = this.doctorList[i].user_name
700
         return user_name
701
         return user_name
701
       },
702
       },
702
       getMedicalTreatment(id) {
703
       getMedicalTreatment(id) {
703
-        var name = '';
704
+        var name = ''
704
         for (let i = 0; i < this.medicalCare.length; i++) {
705
         for (let i = 0; i < this.medicalCare.length; i++) {
705
           if (this.medicalCare[i].id == id) {
706
           if (this.medicalCare[i].id == id) {
706
             name = this.medicalCare[i].name
707
             name = this.medicalCare[i].name
714
         }
715
         }
715
         return ''
716
         return ''
716
       }, toReturnSZPatient(val) {
717
       }, toReturnSZPatient(val) {
717
-        var that = this;
718
+        var that = this
718
         this.$confirm('是否退号', '退号', {
719
         this.$confirm('是否退号', '退号', {
719
           confirmButtonText: '确 定',
720
           confirmButtonText: '确 定',
720
           cancelButtonText: '取 消',
721
           cancelButtonText: '取 消',
730
           })
731
           })
731
             .then(function(response) {
732
             .then(function(response) {
732
               if (response.data.state == 0) {
733
               if (response.data.state == 0) {
733
-                that.$message.error(response.data.msg);
734
+                that.$message.error(response.data.msg)
734
                 return false
735
                 return false
735
               } else {
736
               } else {
736
                 if (response.data.data.failed_code == -10) {
737
                 if (response.data.data.failed_code == -10) {
744
                   // that.$message.error(response.data.data.msg)
745
                   // that.$message.error(response.data.data.msg)
745
 
746
 
746
                 } else {
747
                 } else {
747
-                  that.getlist();
748
+                  that.getlist()
748
                   that.$message({ message: '退号成功', type: 'success' })
749
                   that.$message({ message: '退号成功', type: 'success' })
749
                 }
750
                 }
750
               }
751
               }
755
         })
756
         })
756
       },
757
       },
757
       toReturnPatient(row) {
758
       toReturnPatient(row) {
758
-        var that = this;
759
+        var that = this
759
         this.$confirm('确认退号吗?', '退号', {
760
         this.$confirm('确认退号吗?', '退号', {
760
           confirmButtonText: '确 定',
761
           confirmButtonText: '确 定',
761
           cancelButtonText: '取 消',
762
           cancelButtonText: '取 消',
765
           let params = {
766
           let params = {
766
             'id':row.id,
767
             'id':row.id,
767
             'patient_id': row.patient_id,
768
             'patient_id': row.patient_id,
768
-            'record_time': this.getTime(row.record_date, '{y}-{m}-{d}'),
769
+            'record_time': that.getTimes(row.record_date),
769
             'admin_user_id': this.$store.getters.xt_user.user.id
770
             'admin_user_id': this.$store.getters.xt_user.user.id
770
-          };
771
+          }
771
           axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
772
           axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
772
             params: params
773
             params: params
773
           })
774
           })
774
             .then(function(response) {
775
             .then(function(response) {
775
               if (response.data.state == 0) {
776
               if (response.data.state == 0) {
776
-                that.$message.error(response.data.msg);
777
+                that.$message.error(response.data.msg)
777
                 return false
778
                 return false
778
               } else {
779
               } else {
779
                 if (response.data.data.failed_code == -10) {
780
                 if (response.data.data.failed_code == -10) {
806
         })
807
         })
807
           .catch(() => {
808
           .catch(() => {
808
           })
809
           })
810
+      }, getTimes(time) {
811
+        return uParseTime(time, '{y}-{m}-{d}')
809
       },
812
       },
810
 
813
 
811
       querySearchAsync(keyword, cb) {
814
       querySearchAsync(keyword, cb) {
813
         if (keyword != undefined) {
816
         if (keyword != undefined) {
814
           key = keyword
817
           key = keyword
815
         }
818
         }
816
-        let searchArray = [];
819
+        let searchArray = []
817
 
820
 
818
         var params = {
821
         var params = {
819
           keyword: key
822
           keyword: key
820
-        };
821
-        console.log('params', params);
823
+        }
824
+        console.log('params', params)
822
         getHisPatient(params).then(response => {
825
         getHisPatient(params).then(response => {
823
           if (response.data.state == 1) {
826
           if (response.data.state == 1) {
824
-            searchArray = response.data.data.patient;
825
-            console.log('searcharrya', searchArray);
827
+            searchArray = response.data.data.patient
828
+            console.log('searcharrya', searchArray)
826
             cb(searchArray)
829
             cb(searchArray)
827
           }
830
           }
828
-        });
831
+        })
829
         return searchArray
832
         return searchArray
830
       },
833
       },
831
 
834
 
832
       handleSelect(val) {
835
       handleSelect(val) {
833
-        this.search_input = val.name;
836
+        this.search_input = val.name
834
         this.getlist()
837
         this.getlist()
835
       },
838
       },
836
       handleClose(done) {
839
       handleClose(done) {
837
         done()
840
         done()
838
       },
841
       },
839
       open(obj) {
842
       open(obj) {
840
-        this.dialogVisible = true;
841
-        this.form = obj;
843
+        this.dialogVisible = true
844
+        this.form = obj
842
         console.log(obj)
845
         console.log(obj)
843
       },
846
       },
844
       getDictionaryDataConfig(type) {
847
       getDictionaryDataConfig(type) {
845
-        let arr = getDictionaryDataConfig('system', 'social_type');
846
-        let str = '';
848
+        let arr = getDictionaryDataConfig('system', 'social_type')
849
+        let str = ''
847
         arr.map(item => {
850
         arr.map(item => {
848
           if (item.id == type) {
851
           if (item.id == type) {
849
             str = item.name
852
             str = item.name
850
           }
853
           }
851
-        });
854
+        })
852
         return str
855
         return str
853
       },
856
       },
854
       getCertificates(type) {
857
       getCertificates(type) {
855
-        let arr = this.certificates;
856
-        let str = '';
858
+        let arr = this.certificates
859
+        let str = ''
857
         arr.map(item => {
860
         arr.map(item => {
858
           if (item.value == type) {
861
           if (item.value == type) {
859
             str = item.label
862
             str = item.label
860
           }
863
           }
861
-        });
864
+        })
862
         return str
865
         return str
863
       },
866
       },
864
       getSettlement(type) {
867
       getSettlement(type) {
865
-        let arr = this.settlement;
866
-        let str = '';
868
+        let arr = this.settlement
869
+        let str = ''
867
         arr.map(item => {
870
         arr.map(item => {
868
           if (item.value == type) {
871
           if (item.value == type) {
869
             str = item.label
872
             str = item.label
870
           }
873
           }
871
-        });
874
+        })
872
         return str
875
         return str
873
       },
876
       },
874
       getMedicalCare(type) {
877
       getMedicalCare(type) {
875
-        let arr = this.medicalCare;
876
-        let str = '';
878
+        let arr = this.medicalCare
879
+        let str = ''
877
         arr.map(item => {
880
         arr.map(item => {
878
           if (item.id == type) {
881
           if (item.id == type) {
879
             str = item.name
882
             str = item.name
880
           }
883
           }
881
-        });
884
+        })
882
         return str
885
         return str
883
       },
886
       },
884
       getRegister(type) {
887
       getRegister(type) {
885
-        let arr = this.newRegister;
886
-        let str = '';
888
+        let arr = this.newRegister
889
+        let str = ''
887
         arr.map(item => {
890
         arr.map(item => {
888
           if (item.value == type) {
891
           if (item.value == type) {
889
             str = item.label
892
             str = item.label
890
           }
893
           }
891
-        });
894
+        })
892
         return str
895
         return str
893
       },
896
       },
894
       getDepartMent(type) {
897
       getDepartMent(type) {
895
-        let arr = this.departMent;
896
-        let str = '';
898
+        let arr = this.departMent
899
+        let str = ''
897
         arr.map(item => {
900
         arr.map(item => {
898
           if (item.id == type) {
901
           if (item.id == type) {
899
             str = item.name
902
             str = item.name
900
           }
903
           }
901
-        });
904
+        })
902
         return str
905
         return str
903
       },
906
       },
904
 
907
 
905
       getBanlance(id) {
908
       getBanlance(id) {
906
-        var label = '';
909
+        var label = ''
907
         for (let i = 0; i < this.settlement.length; i++) {
910
         for (let i = 0; i < this.settlement.length; i++) {
908
           if (id == this.settlement[i].value) {
911
           if (id == this.settlement[i].value) {
909
             label = this.settlement[i].label
912
             label = this.settlement[i].label

+ 1 - 1
src/xt_pages/qcd/dialysisTotal.vue View File

72
         >
72
         >
73
           <el-option label="全部" value></el-option>
73
           <el-option label="全部" value></el-option>
74
           <el-option
74
           <el-option
75
-            v-for="item in modeOptions"
75
+            v-for="item in "
76
             :key="item.id"
76
             :key="item.id"
77
             :label="item.name"
77
             :label="item.name"
78
             :value="item.id"
78
             :value="item.id"