Browse Source

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

csx 2 years ago
parent
commit
88da498567
27 changed files with 3914 additions and 186 deletions
  1. 7 0
      src/api/his/his.js
  2. 87 46
      src/api/his/his_config.js
  3. 18 6
      src/api/his/his_tools.js
  4. 4 3
      src/lang/zh.js
  5. 17 1
      src/router/modules/hisTool.js
  6. 3 1
      src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue
  7. 5 2
      src/xt_pages/hospitalStation/components/deskRecord.vue
  8. 21 19
      src/xt_pages/hospitalStation/doctorDesk.vue
  9. 18 8
      src/xt_pages/hospitalStation/recordPrint.vue
  10. 5 5
      src/xt_pages/hospitalStation/recordTemplate/printTwo.vue
  11. 5 2
      src/xt_pages/outpatientDoctorStation/components/deskRecord.vue
  12. 698 0
      src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateModeTable.vue
  13. 2 1
      src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue
  14. 25 22
      src/xt_pages/outpatientDoctorStation/doctorDesk.vue
  15. 437 0
      src/xt_pages/outpatientDoctorStation/modeTemplate.vue
  16. 2228 0
      src/xt_pages/outpatientDoctorStation/modeTemplateDetail.vue
  17. 1 0
      src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue
  18. 144 9
      src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue
  19. 16 10
      src/xt_pages/outpatientDoctorStation/recordPrint.vue
  20. 8 5
      src/xt_pages/outpatientDoctorStation/recordTemplate/printTwo.vue
  21. 97 19
      src/xt_pages/outpatientTool/components/detailStatistics.vue
  22. 18 13
      src/xt_pages/outpatientTool/components/gatherStatistics.vue
  23. 9 5
      src/xt_pages/outpatientTool/statistics.vue
  24. 2 2
      src/xt_pages/stock/drugs/components/drugOutDetail.vue
  25. 19 3
      src/xt_pages/stock/stockBatchNumber.vue
  26. 17 2
      src/xt_pages/stock/stockFlow.vue
  27. 3 2
      src/xt_pages/stock/stockQuery.vue

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

@@ -653,3 +653,10 @@ export function getBatchPrint(params) {
653 653
   })
654 654
 }
655 655
 
656
+export function getPresciptionTemplateDetail(params) {
657
+  return request({
658
+    url: '/api/his/getprescriptiontemplatedetail',
659
+    method: 'get',
660
+    params: params
661
+  })
662
+}

+ 87 - 46
src/api/his/his_config.js View File

@@ -1,82 +1,123 @@
1
-import request from "@/utils/request";
2
-
3
-
1
+import request from '@/utils/request'
4 2
 
5 3
 export function getPatientList(params) {
6 4
   return request({
7
-    url: "/api/his/patient/list",
8
-    method: "get",
9
-    params:params
10
-  });
5
+    url: '/api/his/patient/list',
6
+    method: 'get',
7
+    params: params
8
+  })
11 9
 }
12 10
 
13
-
14 11
 export function getPrescriptionTemplateList(params) {
15 12
   return request({
16
-    url: "/api/his/prescriptiontemplate/list",
17
-    method: "get",
18
-    params:params
19
-  });
13
+    url: '/api/his/prescriptiontemplate/list',
14
+    method: 'get',
15
+    params: params
16
+  })
20 17
 }
21 18
 
22
-
23 19
 export function getPrescriptionTemplateInfo(params) {
24 20
   return request({
25
-    url: "/api/his/prescriptiontemplate/info",
26
-    method: "get",
27
-    params:params
28
-  });
21
+    url: '/api/his/prescriptiontemplate/info',
22
+    method: 'get',
23
+    params: params
24
+  })
29 25
 }
30 26
 
31
-
32
-
33
-export function createdTemplate(params,data) {
27
+export function getPrescriptionModeTemplateInfo(params) {
34 28
   return request({
35
-    url: "/api/his/prescriptiontemplate/create",
36
-    method: "post",
37
-    data:data,
38
-    params:params,
39
-  });
29
+    url: '/api/his/prescriptionmodetemplate/info',
30
+    method: 'get',
31
+    params: params
32
+  })
40 33
 }
41 34
 
35
+export function createdTemplate(params, data) {
36
+  return request({
37
+    url: '/api/his/prescriptiontemplate/create',
38
+    method: 'post',
39
+    data: data,
40
+    params: params
41
+  })
42
+}
42 43
 
43
-
44
+export function createdModeTemplate(params, data) {
45
+  return request({
46
+    url: '/api/his/prescriptionmodetemplate/create',
47
+    method: 'post',
48
+    data: data,
49
+    params: params
50
+  })
51
+}
44 52
 
45 53
 export function delHisPrescriptionTemplate(params) {
46 54
   return request({
47
-    url: "/api/his/prescriptiontemplate/delete",
48
-    method: "post",
49
-    params:params,
50
-  });
55
+    url: '/api/his/prescriptiontemplate/delete',
56
+    method: 'post',
57
+    params: params
58
+  })
51 59
 }
52 60
 
53
-
54
-
55 61
 export function delHisPrescriptionInfoTemplate(params) {
56 62
   return request({
57
-    url: "/api/his/prescriptioninfotemplate/delete",
58
-    method: "post",
59
-    params:params,
60
-  });
63
+    url: '/api/his/prescriptioninfotemplate/delete',
64
+    method: 'post',
65
+    params: params
66
+  })
61 67
 }
62 68
 
69
+export function delHisPrescriptionAdviceTemplate(params) {
70
+  return request({
71
+    url: '/api/his/advicetemplate/delete',
72
+    method: 'post',
73
+    params: params
74
+  })
75
+}
63 76
 
77
+export function delHisPrescriptionProjectTemplate(params) {
78
+  return request({
79
+    url: '/api/his/projecttemplate/delete',
80
+    method: 'post',
81
+    params: params
82
+  })
83
+}
64 84
 
85
+export function getModeTempaleteName(params) {
86
+  return request({
87
+    url: '/api/his/getmodetemplatename',
88
+    method: 'get',
89
+    params: params
90
+  })
91
+}
65 92
 
66
-export function delHisPrescriptionAdviceTemplate(params) {
93
+export function delHisModePrescriptionTemplate(params) {
67 94
   return request({
68
-    url: "/api/his/advicetemplate/delete",
69
-    method: "post",
70
-    params:params,
71
-  });
95
+    url: '/api/his/prescriptionmodetemplate/delete',
96
+    method: 'post',
97
+    params: params
98
+  })
72 99
 }
73 100
 
101
+export function delHisModePrescriptionProjectTemplate(params) {
102
+  return request({
103
+    url: '/api/his/projectmodetemplate/delete',
104
+    method: 'post',
105
+    params: params
106
+  })
107
+}
74 108
 
109
+export function delHisModePrescriptionAdviceTemplate(params) {
110
+  return request({
111
+    url: '/api/his/advicempdetemplate/delete',
112
+    method: 'post',
113
+    params: params
114
+  })
115
+}
75 116
 
76
-export function delHisPrescriptionProjectTemplate(params) {
117
+export function delHisModePrescriptionInfoTemplate(params) {
77 118
   return request({
78
-    url: "/api/his/projecttemplate/delete",
79
-    method: "post",
80
-    params:params,
81
-  });
119
+    url: '/api/his/prescriptioninfomodetemplate/delete',
120
+    method: 'post',
121
+    params: params
122
+  })
82 123
 }

+ 18 - 6
src/api/his/his_tools.js View File

@@ -1,12 +1,24 @@
1
-import request from "@/utils/request";
2
-
1
+import request from '@/utils/request'
3 2
 
4 3
 export function GetAllPatients() {
5 4
   return request({
6
-    url: "/api/his/patient",
7
-    method: "get",
8
-  });
5
+    url: '/api/his/patient',
6
+    method: 'get'
7
+  })
9 8
 }
10 9
 
10
+export function getHisSummaryDetailList(params) {
11
+  return request({
12
+    url: '/api/gethissummarydetaillist',
13
+    method: 'get',
14
+    params: params
15
+  })
16
+}
11 17
 
12
-
18
+export function getGatherDetailList(params) {
19
+  return request({
20
+    url: '/api/his/getgatherdetailist',
21
+    method: 'get',
22
+    params: params
23
+  })
24
+}

+ 4 - 3
src/lang/zh.js View File

@@ -176,9 +176,9 @@ export default {
176 176
     selfPreparedMedicine: '自备药管理',
177 177
     wareHouseManage: '仓库管理',
178 178
     inventoryTransfer: '库存调拨',
179
-    wareHouseManage:'仓库管理',
179
+    wareHouseManage: '仓库管理',
180 180
 
181
-    inventoryTransfer:'库存调拨',
181
+    inventoryTransfer: '库存调拨',
182 182
 
183 183
     consumablesManagement: '耗材管理',
184 184
     warehouseReceipt: '出入库',
@@ -270,11 +270,12 @@ export default {
270 270
     pastInquiries: '既往查询',
271 271
 
272 272
     prescriptionTemplate: '处方模版',
273
+    modeTemplate: '透析模式模版',
273 274
     hospitalRecord: '住院登记',
274 275
     hisTool: 'HIS工具',
275 276
     hospitalCharges: '住院收费',
276 277
 
277
-    DepositManagement:'押金管理',
278
+    DepositManagement: '押金管理',
278 279
 
279 280
     summary_tool: '项目消费明细汇总',
280 281
     labelPrint: '标签打印',

+ 17 - 1
src/router/modules/hisTool.js View File

@@ -12,6 +12,20 @@ export default {
12 12
     isChild: true
13 13
   },
14 14
   children: [
15
+    {
16
+      path: '/hisTool/modeTemplate',
17
+      component: () => import('@/xt_pages/outpatientDoctorStation/modeTemplate'),
18
+      name: 'modeTemplate',
19
+      meta: { title: 'modeTemplate', noCache: true }
20
+    },
21
+    {
22
+      path: '/hisTool/modeTemplateDetail',
23
+      component: () => import('@/xt_pages/outpatientDoctorStation/modeTemplateDetail'),
24
+      name: 'modeTemplateDetail',
25
+      meta: { title: 'modeTemplateDetail', noCache: true },
26
+      hidden: true,
27
+      is_menu: false
28
+    },
15 29
     {
16 30
       path: '/hisTool/prescriptionTemplate',
17 31
       component: () => import('@/xt_pages/outpatientDoctorStation/prescriptionTemplate'),
@@ -57,7 +71,8 @@ export default {
57 71
       component: () => import('@/xt_pages/outpatientTool/yidiClear'),
58 72
       name: 'yidiClear',
59 73
       meta: { title: 'yidiClear', noCache: true }
60
-    },{
74
+    },
75
+    {
61 76
       path: '/hisTool/statistics',
62 77
       component: () => import('@/xt_pages/outpatientTool/statistics'),
63 78
       name: 'statistics',
@@ -69,5 +84,6 @@ export default {
69 84
       name: 'zeroSummary',
70 85
       meta: { title: 'zeroSummary', noCache: true }
71 86
     }
87
+
72 88
   ]
73 89
 }

+ 3 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderFortySeven.vue View File

@@ -754,10 +754,12 @@
754 754
                             ? prescription.dialyzer_perfusion_apparatus
755 755
                             : ""
756 756
                         }}
757
+                        <span v-if="!prescription.dialysis_dialyszers&&!prescription.dialyzer_perfusion_apparatus">/</span>
758
+                        <span v-if="prescription.dialysis_dialyszers">/</span>
757 759
                         {{
758 760
                           prescription.dialysis_dialyszers
759 761
                             ? prescription.dialysis_dialyszers
760
-                            : "/"
762
+                            : ""
761 763
                         }}
762 764
                       </div>
763 765
                     </div>

+ 5 - 2
src/xt_pages/hospitalStation/components/deskRecord.vue View File

@@ -132,6 +132,7 @@
132 132
 
133 133
       <el-form-item label="体格检查: " prop="name">
134 134
         <el-input
135
+          type="textarea"
135 136
           v-model="physical_examination"
136 137
           placeholder="体格检查"
137 138
         ></el-input>
@@ -139,6 +140,7 @@
139 140
 
140 141
       <el-form-item label="专科检查: " prop="name">
141 142
         <el-input
143
+          type="textarea"
142 144
           v-model="special_inspection"
143 145
           placeholder="专科检查"
144 146
         ></el-input>
@@ -146,6 +148,7 @@
146 148
 
147 149
       <el-form-item label="实验室及器械检查: " prop="name" label-width="160px">
148 150
         <el-input
151
+          type="textarea"
149 152
           v-model="lab_apparatus"
150 153
           placeholder="实验室及器械检查"
151 154
         ></el-input>
@@ -180,13 +183,13 @@
180 183
         <el-input
181 184
           v-model="case_history.sbp"
182 185
           placeholder="血压"
183
-          style="width: 50px"
186
+          style="width: 60px"
184 187
         ></el-input>
185 188
         /
186 189
         <el-input
187 190
           v-model="case_history.dbp"
188 191
           placeholder="血压"
189
-          style="width: 50px"
192
+          style="width: 60px"
190 193
         ></el-input>
191 194
         mmHg
192 195
       </el-form-item>

+ 21 - 19
src/xt_pages/hospitalStation/doctorDesk.vue View File

@@ -3878,27 +3878,29 @@
3878 3878
 
3879 3879
       },
3880 3880
 
3881
-      opentwo(index) {
3882
-        
3883
-        if (index == 1) {
3884
-          if (this.patientInfo.id == undefined) {
3885
-            this.$message.error('请先选择病人')
3886
-            return
3887
-          }
3888
-          this.$refs.child.createCaseHistory()
3889
-        } else if (index == 2) {
3890
-          this.recordVisible = true
3891
-          this.$refs.recordPrint.show(this.patientid)
3892
-
3893
-          // this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date+"&patient_id="+this.patientid)
3894
-        } else if (index == 3) {
3895
-          var mode_status = this.$refs.saveRecordTemplate.mode_status
3896
-          this.$refs.medicalRecord.show(mode_status)
3897
-        } else if (index == 4) {
3898
-          this.$refs.saveRecordTemplate.show(this.case_history)
3881
+    // 电子病历打印
3882
+    opentwo(index) {
3883
+      if (index == 1) {
3884
+        if (this.patientInfo.id == undefined) {
3885
+          this.$message.error('请先选择病人')
3886
+          return
3899 3887
         }
3888
+        this.$refs.child.createCaseHistory()
3889
+      } else if (index == 2) {
3890
+        this.recordVisible = true
3891
+        this.$nextTick(() => {
3892
+          this.$refs.recordPrint.show(this.patientid,this.org_id)
3893
+        })
3894
+        // this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date+"&patient_id="+this.patientid)
3895
+      } else if (index == 3) {
3896
+        var mode_status = this.$refs.saveRecordTemplate.mode_status
3897
+        this.$refs.medicalRecord.show(mode_status)
3898
+      } else if (index == 4) {
3899
+        this.$refs.saveRecordTemplate.show(this.case_history)
3900
+      }
3901
+
3902
+    },
3900 3903
 
3901
-      },
3902 3904
       // changePatient(val){
3903 3905
       //   console.log("患者val",val)
3904 3906
       //   this.hisPatientInfo = val.hisPatientInfo

+ 18 - 8
src/xt_pages/hospitalStation/recordPrint.vue View File

@@ -70,10 +70,20 @@ export default {
70 70
       educationOptions:[],
71 71
       history:{},
72 72
       keyword:"",
73
-      org_id,
73
+      org_id:0,
74 74
     };
75 75
   },
76 76
   methods: {
77
+
78
+    show(val, id) {
79
+      this.org_id = id;
80
+      if (id == 10217 || id == 9675 || id == 9671 || id == 0) {
81
+        this.$refs.printTwo.show(val);
82
+      } else {
83
+        this.$refs.printOne.show(val);
84
+      }
85
+    },
86
+
77 87
     getAdminUser(id) {
78 88
       if (id == 0) {
79 89
         return "";
@@ -106,14 +116,14 @@ export default {
106 116
         "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;} .infoTitle div{width: 200px;} .infoTitle .address_slot{width: 400px;} .infoTitle .name_slot{width: 250px;}.otherInfo{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;justify-content: center;flex-direction: column;margin-top:10px;line-height: 24px;padding:0 10px;border-top: 1px solid;}.recordTitle div{width: 100%;text-align: center;} .recordTitle .recordContent{width: 100%;height: 150px;text-align: left;} .endInfo{display: flex;flex-direction: column;justify-content: end;margin-top: 10px;line-height: 24px;} .endInfo div{width: 300px;} .record_Title{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;} .record_Title div{width: 200px;}}";
107 117
       
108 118
       
109
-      if (this.org_id != 10217 && this.org_id != 0) {
119
+      if (this.org_id != 10217 && this.org_id != 0 && this.org_id != 9675) {
110 120
         printJS({
111 121
           printable: "prescription-print",
112 122
           type: "html",
113 123
           style: style,
114 124
           scanStyles: false,
115 125
         });
116
-      } else if (this.org_id == 10217 || this.org_id == 0) {
126
+      } else if (this.org_id == 10217 || this.org_id == 0|| this.org_id == 9675) {
117 127
         printJS({
118 128
           printable: "prescription-print",
119 129
           type: "html",
@@ -173,11 +183,11 @@ export default {
173 183
 
174 184
   },
175 185
   created() {
176
-    // this.getPatientList()
177
-     this.org_id = this.$store.getters.xt_user.org.id;
178
-    console.log("=====", this.org_id);
179
-    this.$refs.printOne.show(this.patientid);
180
-    this.$refs.printTwo.show(this.patientid);
186
+    // // this.getPatientList()
187
+    //  this.org_id = this.$store.getters.xt_user.org.id;
188
+    // console.log("=====", this.org_id);
189
+    // this.$refs.printOne.show(this.patientid);
190
+    // this.$refs.printTwo.show(this.patientid);
181 191
 
182 192
   },
183 193
   // computed:{

+ 5 - 5
src/xt_pages/hospitalStation/recordTemplate/printTwo.vue View File

@@ -14,7 +14,7 @@
14 14
       <div class="infoTitle" style="margin-top:20px;">
15 15
         <div class="name_slot">姓名:{{ patient.name ? patient.name : "" }}</div>
16 16
         <div class="address_slot">
17
-          家庭住址:{{ patient.home_address ? patient.home_address : "" }}深圳市南山区桃园街道新屋村东区三号楼303
17
+          家庭住址:{{ patient.home_address ? patient.home_address : "" }}
18 18
         </div>
19 19
       </div>
20 20
       <div class="infoTitle">
@@ -119,7 +119,7 @@
119 119
         <div>实验室及器械检查</div>
120 120
         <div class="recordContent" style="height:250px;">{{history.lab_apparatus}}</div>
121 121
       </div>
122
-      <div style="display: flex; justify-content: end">
122
+      <div style="display: flex; justify-content:flex-end">
123 123
         <div class="endInfo">
124 124
           <div style="height: 100px">
125 125
             诊断:{{ history.diagnostic ? history.diagnostic : "" }}
@@ -270,9 +270,9 @@ export default {
270 270
   },
271 271
   created() {
272 272
     this.educationOptions = getDataConfig("patient", "education_types");
273
-    this.getAllDoctorList();
274
-    this.getPatientCaseHistory();
275
-    this.getAccessList()
273
+    // this.getAllDoctorList();
274
+    // this.getPatientCaseHistory();
275
+    // this.getAccessList()
276 276
     var xtuser = this.$store.getters.xt_user;
277 277
     this.orgname = xtuser.org.org_name;
278 278
     var data = new Date();

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

@@ -132,6 +132,7 @@
132 132
 
133 133
       <el-form-item label="体格检查: " prop="name">
134 134
         <el-input
135
+          type="textarea"
135 136
           v-model="physical_examination"
136 137
           placeholder="体格检查"
137 138
         ></el-input>
@@ -139,6 +140,7 @@
139 140
 
140 141
       <el-form-item label="专科检查: " prop="name">
141 142
         <el-input
143
+          type="textarea"
142 144
           v-model="special_inspection"
143 145
           placeholder="专科检查"
144 146
         ></el-input>
@@ -146,6 +148,7 @@
146 148
 
147 149
       <el-form-item label="实验室及器械检查: " prop="name" label-width="160px">
148 150
         <el-input
151
+          type="textarea"
149 152
           v-model="lab_apparatus"
150 153
           placeholder="实验室及器械检查"
151 154
         ></el-input>
@@ -180,13 +183,13 @@
180 183
         <el-input
181 184
           v-model="case_history.sbp"
182 185
           placeholder="血压"
183
-          style="width: 50px"
186
+          style="width: 60px"
184 187
         ></el-input>
185 188
         /
186 189
         <el-input
187 190
           v-model="case_history.dbp"
188 191
           placeholder="血压"
189
-          style="width: 50px"
192
+          style="width: 60px"
190 193
         ></el-input>
191 194
         mmHg
192 195
       </el-form-item>

+ 698 - 0
src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateModeTable.vue View File

@@ -0,0 +1,698 @@
1
+<template>
2
+
3
+    <div class="prescriptionTable">
4
+        <el-table v-if="prescription.advices && prescription.advices.length > 0" :data="prescription.advices" border
5
+                  style="width: 99%;" :row-style="{ color: '#303133' }"
6
+                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
7
+            <el-table-column align="center" width="70" label="序号">
8
+                <template slot-scope="scope">
9
+                    <div style="display:flex;align-items:center;">
10
+                        <el-input v-model="scope.row.groupno" placeholder=""></el-input>
11
+                    </div>
12
+                </template>
13
+            </el-table-column>
14
+            <el-table-column align="center" prop="drug_name" label="名称">
15
+                <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span>
16
+                </template>
17
+            </el-table-column>
18
+
19
+          <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
20
+            <template slot-scope="scope">
21
+              <div style="display:flex;align-items:center;">
22
+                <el-input v-model="scope.row.single_dose" @input="getAllChange(scope)"
23
+                          style="width:50%;"></el-input>
24
+                <!-- <div>{{scope.row.single_dose_unit}}</div> -->
25
+                <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;"
26
+                           @change="getAllChange(scope)">
27
+                  <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
28
+                  <el-option :label="scope.row.drug.dose_unit"
29
+                             v-if="scope.row.drug.dose_unit != scope.row.drug.min_unit"
30
+                             :value="scope.row.drug.dose_unit"></el-option>
31
+                </el-select>
32
+              </div>
33
+            </template>
34
+          </el-table-column>
35
+            <el-table-column align="center" prop="delivery_way" width="100" label="用法">
36
+                <template slot-scope="scope">
37
+                    <el-select v-model="scope.row.delivery_way" placeholder="请选择">
38
+                        <el-option
39
+                                v-for="(item,index) in drugways"
40
+                                :key="index"
41
+                                :label="item.name"
42
+                                :value="item.name">
43
+                        </el-option>
44
+                    </el-select>
45
+                </template>
46
+            </el-table-column>
47
+            <el-table-column align="center" prop="execution_frequency" width="100" label="频率">
48
+                <template slot-scope="scope">
49
+                    <el-select v-model="scope.row.execution_frequency" placehold er="请选择" @change="getAllChange(scope)">
50
+                        <el-option
51
+                                v-for="item,index in efs"
52
+                                :key="index"
53
+                                :label="item.name"
54
+                                :value="item.name">
55
+                        </el-option>
56
+                    </el-select>
57
+                </template>
58
+            </el-table-column>
59
+
60
+
61
+            <el-table-column align="center" prop="day" width="70" label="天数">
62
+                <template slot-scope="scope">
63
+                    <div style="display:flex;align-items:center;">
64
+                        <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
65
+                        {{'天'}}
66
+                    </div>
67
+                </template>
68
+            </el-table-column>
69
+
70
+            <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
71
+                <template slot-scope="scope">
72
+                    <div style="display:flex;align-items:center;">
73
+                        <el-input v-model="scope.row.prescribing_number" style="width:50%"
74
+                                  @input="changePrescribingNumber(scope)" placeholder=""></el-input>
75
+                        <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
76
+                        <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;"
77
+                                   @change="getAllChange(scope)">
78
+                            <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
79
+                            <el-option :label="scope.row.drug.max_unit"
80
+                                       v-if="scope.row.drug.min_unit != scope.row.drug.max_unit"
81
+                                       :value="scope.row.drug.max_unit"></el-option>
82
+                        </el-select>
83
+                    </div>
84
+                </template>
85
+            </el-table-column>
86
+            <el-table-column align="center" prop="retail_price" width="80" label="单价">
87
+                <template slot-scope="scope">
88
+                    <div style="display:flex;align-items:center;">
89
+                        <el-input v-model="scope.row.retail_price" placeholder="" readonly></el-input>
90
+                        <div>{{'元'}}</div>
91
+                    </div>
92
+
93
+                </template>
94
+            </el-table-column>
95
+            <el-table-column align="center" prop="remark" width="50" label="备注">
96
+                <template slot-scope="scope">
97
+                    <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
98
+                </template>
99
+            </el-table-column>
100
+
101
+            <el-table-column align="center" prop="remark" width="50" label="推送频率">
102
+                <template slot-scope="scope">
103
+                    <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>
104
+                    <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>
105
+                    <div v-if="scope.row.frequency_type == 3">{{scope.row.week_day}}</div>
106
+
107
+                </template>
108
+            </el-table-column>
109
+
110
+
111
+            <el-table-column align="center" width="100" prop="name" label="操作">
112
+                <template slot-scope="scope">
113
+                    <!--<i class="el-icon-delete" @click="deleteDrug(scope.$index, scope.row)"></i>-->
114
+                    <el-button size="mini" type="primary" @click="handleEdit(scope.row,scope.$index)">推送</el-button>
115
+                    <el-button size="mini" type="danger" @click="deleteDrug(scope.row,scope.$index)">删除</el-button>
116
+                </template>
117
+            </el-table-column>
118
+        </el-table>
119
+
120
+        <el-table v-if="prescription.project &&prescription.project.length > 0" :data="prescription.project" border
121
+                  style="width: 99%;" :row-style="{ color: '#303133' }"
122
+                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
123
+            <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
124
+            <el-table-column align="center" prop="project_name" label="名称">
125
+                <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span>
126
+                </template>
127
+            </el-table-column>
128
+            <el-table-column align="center" prop="statistical_classification" width="100" label="组">
129
+                <template slot-scope="scope">{{scope.row.type ==
130
+                    2?getGroup(scope.row.statistical_classification):'耗材'}}
131
+                </template>
132
+            </el-table-column>
133
+            <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
134
+                <template slot-scope="scope">
135
+                    <div style="display:flex;align-items:center;">
136
+                        <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)"
137
+                                  placeholder=""></el-input>
138
+                        <div>{{scope.row.unit}}</div>
139
+                    </div>
140
+
141
+                </template>
142
+            </el-table-column>
143
+            <el-table-column align="center" prop="delivery_way" width="80" label="用法">
144
+                <template slot-scope="scope">
145
+                    <el-autocomplete
146
+                            style="width:100%;"
147
+                            class="inline-input"
148
+                            v-model="scope.row.delivery_way"
149
+                            :fetch-suggestions="querySearch2"
150
+                            placeholder="请输入内容"
151
+                    ></el-autocomplete>
152
+                </template>
153
+            </el-table-column>
154
+            <el-table-column align="center" prop="execution_frequency" width="80" label="频率">
155
+                <template slot-scope="scope">
156
+                    <el-input v-model="scope.row.execution_frequency" placeholder=""></el-input>
157
+                </template>
158
+            </el-table-column>
159
+            <el-table-column align="center" prop="number_days" width="70" label="天数">
160
+                <template slot-scope="scope">
161
+                    <div style="display:flex;align-items:center;">
162
+                        <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)"
163
+                                  placeholder=""></el-input>
164
+                        <div>{{'天'}}</div>
165
+                    </div>
166
+                </template>
167
+            </el-table-column>
168
+            <el-table-column align="center" prop="total" width="70" label="总量">
169
+                <template slot-scope="scope">
170
+                    <div style="display:flex;align-items:center;">
171
+                        <el-input v-model="scope.row.total" style="width:60%" placeholder=""></el-input>
172
+                        <div>{{scope.row.unit}}</div>
173
+
174
+                    </div>
175
+                </template>
176
+            </el-table-column>
177
+            <el-table-column align="center" prop="name" width="70" label="单价">
178
+                <template slot-scope="scope">
179
+                    <div style="display:flex;align-items:center;">
180
+                        <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
181
+                        <div>{{'元'}}</div>
182
+                    </div>
183
+
184
+                </template>
185
+            </el-table-column>
186
+            <el-table-column align="center" prop="name" width="50" label="备注">
187
+                <template slot-scope="scope">
188
+                    <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
189
+                </template>
190
+            </el-table-column>
191
+            <el-table-column align="center" prop="remark" width="70" label="推送频率">
192
+                <template slot-scope="scope">
193
+                    <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>
194
+                    <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>
195
+                    <div v-if="scope.row.frequency_type == 3">{{scope.row.week_day}}</div>
196
+
197
+                </template>
198
+            </el-table-column>
199
+            <el-table-column align="center" width="140" prop="name" label="操作">
200
+                <template slot-scope="scope">
201
+                    <el-button size="mini" type="primary" @click="handleEdit(scope.row,scope.$index)">推送</el-button>
202
+                    <el-button size="mini" type="danger" @click="deleteProject(scope.row,scope.$index)">删除
203
+                    </el-button>
204
+                    <!--<i class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)"></i>-->
205
+                    <!--<button class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)">删除</>-->
206
+
207
+                </template>
208
+            </el-table-column>
209
+        </el-table>
210
+
211
+        <div class="additionalBox">
212
+            <div class="additionalOne" v-for="(item,index) in prescription.addition" :key="index">
213
+                <span :title="item.item_name">{{item.item_name}}</span>
214
+                <el-input v-model="item.price" placeholder="" style="width:50px;"></el-input>
215
+                共
216
+                <el-input v-model="item.count" placeholder="" style="width:50px;"></el-input>
217
+                次
218
+                <i class="el-icon-delete deleteIcon" @click="delAddition(index,item)"></i>
219
+            </div>
220
+        </div>
221
+
222
+
223
+        <div>
224
+            <el-dialog title="推送频率设置" :visible.sync="templateFormVisible" width="854px">
225
+                <el-form
226
+                        ref="templateForm"
227
+                        label-width="90px"
228
+                >
229
+                    <el-row>
230
+                        <el-col :span="24" >
231
+                            <el-form-item label="周期提醒 :">
232
+                                <el-radio-group v-model="frequency_type">
233
+                                    <el-radio :label="1">每次必推</el-radio>
234
+                                    <el-radio :label="2">天数频率</el-radio>
235
+                                    <el-radio :label="3">星期频率</el-radio>
236
+                                </el-radio-group>
237
+                            </el-form-item>
238
+                        </el-col>
239
+
240
+
241
+                        <el-col :span="12" v-if="frequency_type == 2">
242
+                            <el-form-item prop="day_count">
243
+                                <el-input style="width: 50px" v-model="day_count"></el-input>&nbsp;
244
+                                天/一次
245
+                            </el-form-item>
246
+                        </el-col>
247
+
248
+                        <el-col :span="24" v-if="frequency_type == 3">
249
+                            <el-form-item prop="weekday">
250
+                                <el-checkbox-group v-model="week_days">
251
+                                    <el-checkbox label="周一" name="周一" key="1">周一</el-checkbox>
252
+                                    <el-checkbox label="周二" name="周二" key="2">周二</el-checkbox>
253
+                                    <el-checkbox label="周三" name="周三" key="3">周三</el-checkbox>
254
+                                    <el-checkbox label="周四" name="周四" key="4">周四</el-checkbox>
255
+                                    <el-checkbox label="周五" name="周五" key="5">周五</el-checkbox>
256
+                                    <el-checkbox label="周六" name="周六" key="6">周六</el-checkbox>
257
+                                    <el-checkbox label="周日" name="周日" key="7">周日</el-checkbox>
258
+                                </el-checkbox-group>
259
+                            </el-form-item>
260
+                        </el-col>
261
+
262
+                    </el-row>
263
+                </el-form>
264
+                <div slot="footer" class="dialog-footer">
265
+                    <el-button @click="templateFormVisible = false">取消</el-button>
266
+                    <el-button type="primary" @click="submitTemplate()">保 存</el-button>
267
+                </div>
268
+            </el-dialog>
269
+        </div>
270
+
271
+
272
+    </div>
273
+</template>
274
+
275
+<script>
276
+  import { getDictionaryDataConfig } from '@/utils/data'
277
+  import { delHisAddition, delHisAdvice, delHisProject, getInitData } from '@/api/his/his'
278
+  import { delHisModePrescriptionAdviceTemplate, delHisModePrescriptionProjectTemplate } from '@/api/his/his_config'
279
+
280
+  export default {
281
+    props: {
282
+      preDrugs: Array,
283
+      activeType: Number,
284
+      addtions_charge: Array,
285
+      prescription: {
286
+        type: Object,
287
+        default: function() {
288
+          return {
289
+            name: '',
290
+            advices: [],
291
+            project: [],
292
+            drugways: [],
293
+            efs: []
294
+          }
295
+        }
296
+      }
297
+    },
298
+    data() {
299
+      return {
300
+        week_days: [],
301
+
302
+        current_row: null,
303
+        current_index: 0,
304
+        templateFormVisible: false,
305
+        frequency_type: 1,
306
+        day_count: 0,
307
+        advices: [],
308
+        tableData: [],
309
+        newoptions: [{
310
+          value: '1',
311
+          label: '1'
312
+        }, {
313
+          value: '2',
314
+          label: '2'
315
+        }, {
316
+          value: '3',
317
+          label: '3'
318
+        }, {
319
+          value: '4',
320
+          label: '4'
321
+        }, {
322
+          value: '5',
323
+          label: '5'
324
+        }],
325
+        value: '1',
326
+        input: 1
327
+      }
328
+    },
329
+
330
+    methods: {
331
+      submitTemplate() {
332
+        console.log(this.current_index)
333
+
334
+        console.log( this.prescription.project[this.current_index])
335
+        if (this.prescription.advices && this.prescription.advices.length > 0 && this.prescription.project && this.prescription.project.length == 0) {
336
+          this.prescription.advices[this.current_index].frequency_type = this.frequency_type
337
+          this.prescription.advices[this.current_index].day_count = this.day_count
338
+          this.prescription.advices[this.current_index].week_day = this.week_days.join(",")
339
+
340
+        }
341
+
342
+        if (this.prescription.advices && this.prescription.advices.length == 0 && this.prescription.project && this.prescription.project.length > 0) {
343
+          this.prescription.project[this.current_index].frequency_type = this.frequency_type
344
+          this.prescription.project[this.current_index].day_count = this.day_count
345
+          this.prescription.project[this.current_index].week_day =this.week_days.join(",")
346
+        }
347
+        this.templateFormVisible = false
348
+      },
349
+      handleEdit(row, index) {
350
+        this.current_row = row
351
+        this.current_index = index
352
+        this.frequency_type = this.current_row.frequency_type
353
+        this.day_count = this.current_row.day_count
354
+        this.week_days = this.current_row.week_day.split(",")
355
+        this.templateFormVisible = true
356
+
357
+
358
+      },
359
+      createFilter(queryString) {
360
+        return (restaurant) => {
361
+          return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
362
+        }
363
+      },
364
+      querySearch2(queryString, cb) {
365
+        var restaurants = this.getDictionaryDataConfig('system', 'project_use')
366
+        restaurants.map(item => {
367
+          item.value = item.name
368
+        })
369
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
370
+        // 调用 callback 返回建议列表的数据
371
+        cb(results)
372
+      },
373
+      delAddition(index, addition) {
374
+        this.$confirm('附加费删除后不可恢复,是否确认删除', '删除', {
375
+          confirmButtonText: '确 定',
376
+          cancelButtonText: '取 消',
377
+          type: 'warning'
378
+        }).then(() => {
379
+          this.$nextTick(function() {
380
+            if (addition.id == 0) {
381
+              this.prescription.addition.splice(index, 1)
382
+            } else {
383
+              let params = {
384
+                'id': addition.id
385
+              }
386
+              delHisAddition(params).then(response => {
387
+                if (response.data.state == 0) {
388
+                  this.$message.error(response.data.msg)
389
+                  return false
390
+                } else {
391
+                  var temp2 = this.deepClone(this.prescription.addition)
392
+                  temp2.splice(index, 1)
393
+                  this.prescription.addition = temp2
394
+                  this.$message.success(response.data.data.msg)
395
+                }
396
+              })
397
+            }
398
+          })
399
+
400
+        })
401
+          .catch(() => {
402
+          })
403
+
404
+      },
405
+      getInitData() {
406
+        getInitData().then(response => {
407
+          if (response.data.state == 0) {
408
+            this.$message.error(response.data.msg)
409
+            return false
410
+          } else {
411
+            this.drugways = response.data.data.drugways
412
+            this.efs = response.data.data.efs
413
+          }
414
+        })
415
+
416
+      }, 
417
+      deleteDrug: function(row, index) {
418
+
419
+        this.$confirm('药品删除后不可恢复,是否确认删除', '删除', {
420
+          confirmButtonText: '确 定',
421
+          cancelButtonText: '取 消',
422
+          type: 'warning'
423
+        }).then(() => {
424
+          this.$nextTick(function() {
425
+            if (row.advice_id == 0) {
426
+              this.prescription.advices.splice(index, 1)
427
+            } else {
428
+              let params = {
429
+                'id': row.advice_id
430
+              }
431
+              console.log(row)
432
+
433
+              console.log(params)
434
+              delHisModePrescriptionAdviceTemplate(params).then(response => {
435
+                if (response.data.state == 0) {
436
+                  this.$message.error(response.data.msg)
437
+                  return false
438
+                } else {
439
+                  var temp2 = this.deepClone(this.prescription.advices)
440
+                  temp2.splice(index, 1)
441
+                  this.prescription.advices = temp2
442
+                  this.$message.success(response.data.data.msg)
443
+                }
444
+              })
445
+
446
+            }
447
+
448
+          })
449
+
450
+        })
451
+          .catch(() => {
452
+          })
453
+
454
+      }, deepClone(source) {
455
+        if (!source && typeof source !== 'object') {
456
+          throw new Error('error arguments', 'shallowClone')
457
+        }
458
+        const targetObj = source.constructor === Array ? [] : {}
459
+        Object.keys(source).forEach((keys) => {
460
+          if (source[keys] && typeof source[keys] === 'object') {
461
+            targetObj[keys] = this.deepClone(source[keys])
462
+          } else {
463
+            targetObj[keys] = source[keys]
464
+          }
465
+        })
466
+        return targetObj
467
+      },
468
+
469
+      setNewData: function(data) {
470
+        this.prescription = data
471
+
472
+        // this.prescription.advices = data.advices
473
+      },
474
+      getDictionaryDataConfig(module, filed_name) {
475
+        return getDictionaryDataConfig(module, filed_name)
476
+      },
477
+      getGroup(id) {
478
+        var name = ''
479
+        var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
480
+        console.log('2235', statistics_category)
481
+        for (let i = 0; i < statistics_category.length; i++) {
482
+          if (id == statistics_category[i].id) {
483
+            name = statistics_category[i].name
484
+          }
485
+        }
486
+        return name
487
+      },
488
+      deleteProject(row, i) {
489
+        if (this.prescription.order_status == 2) {
490
+          this.$message.error('该处方已经结算,无法删除')
491
+          return
492
+        }
493
+        this.$confirm('项目删除后不可恢复,是否确认删除', '删除', {
494
+          confirmButtonText: '确 定',
495
+          cancelButtonText: '取 消',
496
+          type: 'warning'
497
+        }).then(() => {
498
+          if (row.id == 0) {
499
+            this.prescription.project.splice(i, 1)
500
+
501
+          } else {
502
+            let params = {
503
+              'id': row.id
504
+            }
505
+            delHisModePrescriptionProjectTemplate(params).then(response => {
506
+              if (response.data.state == 0) {
507
+                this.$message.error(response.data.msg)
508
+                return false
509
+              } else {
510
+                for (let i = 0; i < this.prescription.project.length; i++) {
511
+                  if (this.prescription.project[i].id == row.id) {
512
+                    this.prescription.project.splice(i, 1)
513
+                  }
514
+                }
515
+                this.$message.success(response.data.data.msg)
516
+              }
517
+            })
518
+          }
519
+        })
520
+          .catch(() => {
521
+          })
522
+
523
+      },
524
+      getAllChange(scope) {
525
+        if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
526
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
527
+            console.log(1)
528
+            scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
529
+          } else {
530
+            console.log(12)
531
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number)
532
+          }
533
+        } else {
534
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
535
+            console.log(123)
536
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose)
537
+          } else {
538
+            console.log(1234)
539
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose / scope.row.drug.min_number)
540
+          }
541
+        }
542
+        if (scope.row.prescribing_number == 0) {
543
+          scope.row.prescribing_number = 1
544
+        }
545
+        // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
546
+        //   // scope.row.retail_price = scope.row.drug.min_price * scope.row.prescribing_number
547
+        //   if(scope.row.prescribing_number > scope.row.drug.total){
548
+        //     this.$message.error(scope.row.drug_name + '库存不足')
549
+        //   }
550
+        // }else{
551
+        //   if((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total){
552
+        //     this.$message.error(scope.row.drug_name + '库存不足')
553
+        //   }
554
+        //   // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
555
+        // }
556
+
557
+      },
558
+      changePrescribingNumber(scope) {
559
+        // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
560
+        //   if(parseInt(scope.row.prescribing_number) > scope.row.drug.total){
561
+        //     this.$message.error(scope.row.drug_name + '库存不足')
562
+        //   }
563
+        // }else{
564
+        //   if((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total){
565
+        //     this.$message.error(scope.row.drug_name + '库存不足')
566
+        //   }
567
+        // }
568
+      },      getAllChange(scope) {
569
+        if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
570
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
571
+            console.log(1)
572
+            scope.row.prescribing_number = scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)
573
+          } else {
574
+            console.log(12)
575
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1)) * (scope.row.day ? scope.row.day : 1) / scope.row.drug.min_number)
576
+          }
577
+        } else {
578
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
579
+            console.log(123)
580
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose)
581
+          } else {
582
+            console.log(1234)
583
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * (scope.row.execution_frequency ? this.getNum(scope.row.execution_frequency) : 1) * (scope.row.day ? scope.row.day : 1)) / scope.row.drug.dose / scope.row.drug.min_number)
584
+          }
585
+        }
586
+        if (scope.row.prescribing_number == 0) {
587
+          scope.row.prescribing_number = 1
588
+        }
589
+        if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
590
+          // scope.row.retail_price = scope.row.drug.min_number / scope.row.retail_price
591
+          if (scope.row.prescribing_number > scope.row.drug.total) {
592
+            this.$message.error(scope.row.drug_name + '库存不足')
593
+          }
594
+        } else {
595
+          if ((parseInt(scope.row.prescribing_number) * scope.row.drug.min_number) > scope.row.drug.total) {
596
+            this.$message.error(scope.row.drug_name + '库存不足')
597
+          }
598
+          // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
599
+        }
600
+
601
+      },
602
+
603
+      getSingleDose(scope) {
604
+        this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
605
+      },
606
+      getDay(scope) {
607
+        this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
608
+      },
609
+      getProjectSingleDose(scope) {
610
+        this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
611
+        if (this.prescription.project[scope.$index].total == 0) {
612
+          this.prescription.project[scope.$index].total = 1
613
+        }
614
+      },
615
+      getProjectDay(scope) {
616
+        this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
617
+        if (this.prescription.project[scope.$index].total == 0) {
618
+          this.prescription.project[scope.$index].total = 1
619
+        }
620
+      }
621
+    }, mounted() {
622
+      this.getInitData()
623
+
624
+    },
625
+    watch: {
626
+      // "prescription.advices":{
627
+      //   handler(newVal,oldVal){
628
+      //     newVal.map(item => {
629
+      //       item.prescribing_number = item.single_dose * item.day
630
+      //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
631
+      //         item.total = item.single_dose * item.number_days
632
+      //       }
633
+
634
+      //     })
635
+      //   },
636
+      //   deep:true
637
+      // },
638
+      // "prescription.project":{
639
+      //   handler(newVal,oldVal){
640
+      //     newVal.map((item,index) => {
641
+      //       if(item.single_dose != oldVal[index].single_dose || item.number_days != oldVal[index].number_days){
642
+      //         item.total = item.single_dose * item.number_days
643
+      //       }
644
+
645
+      //     })
646
+      //   },
647
+      //   deep:true
648
+      // }
649
+    }
650
+
651
+  }
652
+</script>
653
+
654
+<style lang="scss">
655
+    .prescriptionTable {
656
+
657
+    .el-input__inner {
658
+        padding: 0 5px;
659
+    }
660
+
661
+    .additionalBox {
662
+        margin-top: 20px;
663
+        display: flex;
664
+        flex-wrap: wrap;
665
+
666
+    .additionalOne {
667
+        margin-right: 20px;
668
+        margin-bottom: 10px;
669
+        display: flex;
670
+        align-items: center;
671
+
672
+    > span {
673
+        white-space: nowrap;
674
+        overflow: hidden;
675
+        text-overflow: ellipsis;
676
+        width: 80px;
677
+        display: inline-block;
678
+        font-size: 14px;
679
+    }
680
+
681
+    }
682
+    .deleteIcon {
683
+        color: red;
684
+        margin-left: 5px;
685
+    }
686
+
687
+    }
688
+    .el-table th .cell, .el-table td .cell {
689
+        padding: 0 2px;
690
+        white-space: pre-line;
691
+    }
692
+
693
+    .el-icon-delete {
694
+        color: red;
695
+    }
696
+
697
+    }
698
+</style>

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

@@ -413,7 +413,8 @@
413 413
           }
414 414
         })
415 415
 
416
-      }, deleteDrug: function(row, index) {
416
+      }, 
417
+      deleteDrug: function(row, index) {
417 418
 
418 419
         this.$confirm('药品删除后不可恢复,是否确认删除', '删除', {
419 420
           confirmButtonText: '确 定',

+ 25 - 22
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

@@ -305,7 +305,6 @@
305 305
         class="centerDialog"
306 306
         width="600px"
307 307
         title="打印"
308
-        destroy-on-close
309 308
         :visible.sync="recordVisible">
310 309
       <recordPrint :patientid="patientid" ref="recordPrint">
311 310
     </recordPrint>
@@ -433,10 +432,35 @@ export default {
433 432
     changeTimeTwo() {
434 433
       this.getList()
435 434
     },
435
+    // 电子处方打印
436 436
     openPrint() {
437 437
       // this.centerDialogVisible = true
438 438
       this.getPrescriptionList(this.patientInfo.id, this.record_date)
439 439
     },
440
+
441
+    // 电子病历打印
442
+    opentwo(index) {
443
+      if (index == 1) {
444
+        if (this.patientInfo.id == undefined) {
445
+          this.$message.error('请先选择病人')
446
+          return
447
+        }
448
+        this.$refs.child.createCaseHistory()
449
+      } else if (index == 2) {
450
+        this.recordVisible = true
451
+        this.$nextTick(() => {
452
+          this.$refs.recordPrint.show(this.patientid,this.org_id)
453
+        })
454
+        // this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date+"&patient_id="+this.patientid)
455
+      } else if (index == 3) {
456
+        var mode_status = this.$refs.saveRecordTemplate.mode_status
457
+        this.$refs.medicalRecord.show(mode_status)
458
+      } else if (index == 4) {
459
+        this.$refs.saveRecordTemplate.show(this.case_history)
460
+      }
461
+
462
+    },
463
+
440 464
     allCheck() {
441 465
       this.$refs.multipleTable1.toggleAllSelection()
442 466
       this.$refs.multipleTable2.toggleAllSelection()
@@ -4590,27 +4614,6 @@ export default {
4590 4614
 
4591 4615
     },
4592 4616
 
4593
-    opentwo(index) {
4594
-      if (index == 1) {
4595
-        if (this.patientInfo.id == undefined) {
4596
-          this.$message.error('请先选择病人')
4597
-          return
4598
-        }
4599
-        this.$refs.child.createCaseHistory()
4600
-      } else if (index == 2) {
4601
-
4602
-          this.recordVisible = true
4603
-        this.$refs.recordPrint.show(this.patientid)
4604
-        
4605
-        // this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date+"&patient_id="+this.patientid)
4606
-      } else if (index == 3) {
4607
-        var mode_status = this.$refs.saveRecordTemplate.mode_status
4608
-        this.$refs.medicalRecord.show(mode_status)
4609
-      } else if (index == 4) {
4610
-        this.$refs.saveRecordTemplate.show(this.case_history)
4611
-      }
4612
-
4613
-    },
4614 4617
     // changePatient(val){
4615 4618
     //   console.log("患者val",val)
4616 4619
     //   this.hisPatientInfo = val.hisPatientInfo

+ 437 - 0
src/xt_pages/outpatientDoctorStation/modeTemplate.vue View File

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

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


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

@@ -179,6 +179,7 @@
179 179
         this.limit = 10
180 180
         this.patient_id = val.id
181 181
         this.patient_name = val.name
182
+        this.id = val.id
182 183
         sessionStorage.setItem('templateIndex', val.id)
183 184
         let params = {
184 185
           patient_id: val.id,

+ 144 - 9
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

@@ -17,7 +17,8 @@
17 17
 
18 18
                         <el-form-item label="透析模式: " prop="mode_id" label-position="right">
19 19
                             <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择"
20
-                                       :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id == 0">
20
+                                       :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id == 0"
21
+                                       @change = "changeMode">
21 22
                                 <el-option
22 23
                                         v-for="item in modeOptions"
23 24
                                         :key="item.id"
@@ -26,7 +27,8 @@
26 27
                                 ></el-option>
27 28
                             </el-select>
28 29
                             <el-select v-model="tempForm.mode_id" style="width:100%;" placeholder="请选择"
29
-                                       :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id > 0">
30
+                                       :disabled="this.$route.query.id > 0 ?true:false" v-if="this.$route.query.id > 0"
31
+                                        @change = "changeMode">>
30 32
                                 <el-option
31 33
                                         v-for="item in modeOptionsTwo"
32 34
                                         :key="item.id"
@@ -239,7 +241,8 @@
239 241
     getInitData,
240 242
     getNextOrLastHisPrescription,
241 243
     getPatientInfo,
242
-    getSchedulePatientList
244
+    getSchedulePatientList,
245
+    getPresciptionTemplateDetail
243 246
   } from '@/api/his/his'
244 247
   import { getDictionaryDataConfig } from '@/utils/data'
245 248
   import prescriptionTable from './components/prescriptionTable'
@@ -389,8 +392,8 @@
389 392
         tempDrugs: [],
390 393
         dayorMonth: 'day',
391 394
 
392
-        hisList: []
393
-
395
+        hisList: [],
396
+        id:0,
394 397
       }
395 398
     },
396 399
     methods: {
@@ -441,15 +444,12 @@
441 444
             }
442 445
           }
443 446
         }
444
-
445 447
         let params = {
446 448
           name: this.tempForm.name,
447 449
           mode_id: this.tempForm.mode_id,
448 450
           patient_id: this.$route.query.patient_id,
449
-          id: this.$route.query.id
450
-
451
+          id:this.$route.query.id,
451 452
         }
452
-
453 453
         for (let i = 0; i < this.prescriptions.length; i++) {
454 454
 
455 455
           this.prescriptions[i].med_type = parseInt(this.prescriptions[i].med_type)
@@ -488,6 +488,7 @@
488 488
         let data = {
489 489
           'prescriptions': this.prescriptions
490 490
         }
491
+        
491 492
         createdTemplate(params, data).then(response => {
492 493
           if (response.data.state == 1) {
493 494
             this.$message.success('保存成功')
@@ -1926,6 +1927,140 @@
1926 1927
       },
1927 1928
       clearSelection() {
1928 1929
         this.$refs.tabProjectTeam.clearSelection()
1930
+      },
1931
+      changeMode(id){
1932
+         var params = {
1933
+           mode_id:id,
1934
+         }
1935
+        getPresciptionTemplateDetail(params).then(response=>{
1936
+          if (response.data.state == 0) {
1937
+            this.$message.error(response.data.msg)
1938
+            return false
1939
+          } else {
1940
+            this.prescriptions = []
1941
+            // console.log(this.tempForm)
1942
+
1943
+            if (response.data.data.template.id > 0) {
1944
+
1945
+              this.tempForm.name = response.data.data.template.name
1946
+              this.tempForm.mode_id = response.data.data.template.mode
1947
+              this.id = response.data.data.template.id
1948
+              for (let i = 0; i < response.data.data.prescriptions.length; i++) {
1949
+                var prescription = response.data.data.prescriptions[i]
1950
+                let tempAdvice = []
1951
+                let tempProject = []
1952
+                let tempAddition = []
1953
+
1954
+                //药品
1955
+                for (let b = 0; b < prescription.advices.length; b++) {
1956
+                  let obj = {
1957
+                    advice_id: prescription.advices[b].id,
1958
+                    drug_name: prescription.advices[b].advice_name,
1959
+                    single_dose: prescription.advices[b].single_dose,
1960
+                    delivery_way: prescription.advices[b].delivery_way,
1961
+                    execution_frequency: prescription.advices[b].execution_frequency,
1962
+                    retail_price: prescription.advices[b].price.toString(),
1963
+                    remark: prescription.advices[b].remark,
1964
+                    day: prescription.advices[b].day,
1965
+                    prescribing_number: prescription.advices[b].prescribing_number.toString(),
1966
+                    single_dose_unit: prescription.advices[b].single_dose_unit,
1967
+                    prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1968
+                    medical_insurance_number: prescription.advices[b].med_list_codg,
1969
+                    id: prescription.advices[b].drug_id,
1970
+                    drug: prescription.advices[b].drug,
1971
+                    groupno: prescription.advices[b].groupno,
1972
+                    frequency_type: prescription.advices[b].frequency_type,
1973
+                    day_count: prescription.advices[b].day_count,
1974
+                    week_day: prescription.advices[b].week_day
1975
+
1976
+                  }
1977
+                  tempAdvice.push(obj)
1978
+                }
1979
+
1980
+                //项目
1981
+                for (let b = 0; b < prescription.project.length; b++) {
1982
+                  let obj = {
1983
+                    id: prescription.project[b].id,
1984
+                    project_id: prescription.project[b].project_id,
1985
+                    project_name: prescription.project[b].project.project_name,
1986
+                    statistical_classification: prescription.project[b].project.statistical_classification,
1987
+                    single_dose: prescription.project[b].single_dose,
1988
+                    delivery_way: prescription.project[b].delivery_way,
1989
+                    execution_frequency: prescription.project[b].execution_frequency,
1990
+                    number_days: prescription.project[b].day,
1991
+                    total: prescription.project[b].count.toString(),
1992
+                    price: prescription.project[b].price,
1993
+                    remark: prescription.project[b].remark,
1994
+                    medical_code: prescription.project[b].project.medical_code,
1995
+                    unit: prescription.project[b].project.unit,
1996
+                    type: prescription.project[b].type,
1997
+                    frequency_type: prescription.project[b].frequency_type,
1998
+                    day_count: prescription.project[b].day_count,
1999
+                    week_day: prescription.project[b].week_day
2000
+
2001
+                  }
2002
+
2003
+                  if (prescription.project[b].type == 2) {
2004
+                    obj['statistical_classification'] = prescription.project[b].project.statistical_classification
2005
+                    obj['medical_code'] = prescription.project[b].project.medical_code
2006
+                    obj['project_name'] = prescription.project[b].project.project_name
2007
+                    obj['project'] = prescription.project[b].project
2008
+
2009
+                  } else if (prescription.project[b].type == 3) {
2010
+                    obj['statistical_classification'] = ''
2011
+                    obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
2012
+                    obj['project_name'] = prescription.project[b].good_info.good_name
2013
+                    obj['good_info'] = prescription.project[b].good_info
2014
+
2015
+                  }
2016
+                  tempProject.push(obj)
2017
+                }
2018
+
2019
+                // var preTime = nowTime
2020
+
2021
+                let index = i + 1
2022
+                let obj = {
2023
+                  id: prescription.id,
2024
+                  name: '处方' + index,
2025
+                  advices: tempAdvice,
2026
+                  project: tempProject,
2027
+                  addition: tempAddition,
2028
+                  order_status: 1
2029
+                  // pre_time: preTime
2030
+                }
2031
+
2032
+                if (prescription.med_type == '' || prescription.med_type == 0) {
2033
+
2034
+                  obj['med_type'] = ''
2035
+                } else {
2036
+
2037
+                  obj['med_type'] = parseInt(prescription.med_type)
2038
+
2039
+                }
2040
+
2041
+                this.prescriptions.push(obj)
2042
+              }
2043
+              this.curPrescriptions = this.prescriptions[0]
2044
+
2045
+            } else {
2046
+              let obj = {
2047
+                id: 0,
2048
+                name: '处方1',
2049
+                advices: [],
2050
+                project: [],
2051
+                addition: [],
2052
+                order_status: 0,
2053
+                med_type: ''
2054
+              }
2055
+
2056
+              obj.med_type = 14
2057
+
2058
+              this.prescriptions.push(obj)
2059
+              this.curPrescriptions = this.prescriptions[0]
2060
+            }
2061
+
2062
+          }
2063
+        })
1929 2064
       }
1930 2065
     }, created() {
1931 2066
       for(let key in this.$store.getters.treatment_mode){

+ 16 - 10
src/xt_pages/outpatientDoctorStation/recordPrint.vue View File

@@ -13,7 +13,7 @@
13 13
 
14 14
     <div class="dialysisPage" style="padding-top: 40px">
15 15
       <printOne
16
-        v-if="org_id != 9675 && org_id != 9671 && org_id != 0"
16
+        v-if="org_id && org_id != 9675 && org_id != 9671 && org_id != 0"
17 17
         ref="printOne"
18 18
         v-bind:childResponse="childResponse"
19 19
         :patient="patient"
@@ -70,16 +70,18 @@ export default {
70 70
       educationOptions: [],
71 71
       history: {},
72 72
       keyword: "",
73
-      org_id,
73
+      org_id: 0,
74 74
     };
75 75
   },
76 76
 
77
-
78 77
   methods: {
79
-    show(val) {
80
-      console.log(val,'ooooooo')
81
-      this.$refs.printOne.show(val);
82
-      this.$refs.printTwo.show(val);
78
+    show(val, id) {
79
+      this.org_id = id;
80
+      if (id == 10217 || id == 9675 || id == 9671 || id == 0) {
81
+        this.$refs.printTwo.show(val);
82
+      } else {
83
+        this.$refs.printOne.show(val);
84
+      }
83 85
     },
84 86
     getAdminUser(id) {
85 87
       if (id == 0) {
@@ -112,14 +114,18 @@ export default {
112 114
       const style1 =
113 115
         "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;} .infoTitle div{width: 200px;} .infoTitle .address_slot{width: 400px;} .infoTitle .name_slot{width: 250px;}.otherInfo{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;justify-content: center;flex-direction: column;margin-top:10px;line-height: 24px;padding:0 10px;border-top: 1px solid;}.recordTitle div{width: 100%;text-align: center;} .recordTitle .recordContent{width: 100%;height: 150px;text-align: left;} .endInfo{display: flex;flex-direction: column;justify-content: end;margin-top: 10px;line-height: 24px;} .endInfo div{width: 300px;} .record_Title{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;} .record_Title div{width: 200px;}}";
114 116
 
115
-      if (this.org_id != 10217 && this.org_id != 0) {
117
+      if (this.org_id != 10217 && this.org_id != 0 && this.org_id != 9675) {
116 118
         printJS({
117 119
           printable: "prescription-print",
118 120
           type: "html",
119 121
           style: style,
120 122
           scanStyles: false,
121 123
         });
122
-      } else if (this.org_id == 10217 || this.org_id == 0) {
124
+      } else if (
125
+        this.org_id == 10217 ||
126
+        this.org_id == 0 ||
127
+        this.org_id == 9675
128
+      ) {
123 129
         printJS({
124 130
           printable: "prescription-print",
125 131
           type: "html",
@@ -177,7 +183,7 @@ export default {
177 183
   },
178 184
   created() {
179 185
     // this.getPatientList()
180
-    this.org_id = this.$store.getters.xt_user.org.id;
186
+    // this.org_id = this.$store.getters.xt_user.org.id;
181 187
     // console.log("=====", this.org_id);
182 188
     // this.$refs.printOne.show(this.patientid);
183 189
     // this.$refs.printTwo.show(this.patientid);

+ 8 - 5
src/xt_pages/outpatientDoctorStation/recordTemplate/printTwo.vue View File

@@ -128,8 +128,11 @@
128 128
             >
129 129
             <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
130 130
           </div>
131
+           <div style="text-align:left;">
132
+          {{history.physical_examination}}
131 133
         </div>
132
-        <div></div>
134
+        </div>
135
+
133 136
       </div>
134 137
       <div class="recordTitle">
135 138
         <div>专科检查</div>
@@ -141,7 +144,7 @@
141 144
           {{ history.lab_apparatus }}
142 145
         </div>
143 146
       </div>
144
-      <div style="display: flex; justify-content: end">
147
+      <div style="display: flex; justify-content: flex-end">
145 148
         <div class="endInfo">
146 149
           <div style="height: 100px">
147 150
             诊断:{{ history.diagnostic ? history.diagnostic : "" }}
@@ -298,9 +301,9 @@ export default {
298 301
   },
299 302
   created() {
300 303
     this.educationOptions = getDataConfig("patient", "education_types");
301
-    this.getAllDoctorList();
302
-    this.getPatientCaseHistory();
303
-    this.getAccessList();
304
+    // this.getAllDoctorList();
305
+    // this.getPatientCaseHistory();
306
+    // this.getAccessList();
304 307
     var xtuser = this.$store.getters.xt_user;
305 308
     this.orgname = xtuser.org.org_name;
306 309
     var data = new Date();

+ 97 - 19
src/xt_pages/outpatientTool/components/detailStatistics.vue View File

@@ -45,36 +45,64 @@
45 45
     </div>
46 46
     <el-table :data="tableData" border :row-style="{ color: '#303133' }" ref="table"
47 47
               :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
48
-              show-summary
49 48
               max-height="600"
50 49
               v-loading="detail_loading"
51 50
               highlight-current-row>
52
-      <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
51
+      <el-table-column type="index" label="序号" width="60px" align="center">
52
+        <template slot-scope="scope">
53
+          {{scope.row.index}}
54
+        </template>
55
+      </el-table-column>
53 56
       <el-table-column align="center" prop="name" label="处方日期">
54
-        <template slot-scope="scope">{{  }}</template>
57
+        <template slot-scope="scope">{{getTime(scope.row.record_date)}}</template>
55 58
       </el-table-column>
56 59
       <el-table-column align="center" prop="name" label="费用编码">
57
-        <template slot-scope="scope">{{scope.row.code}}</template>
60
+        <template slot-scope="scope">
61
+          {{scope.row.number}}
62
+        </template>
58 63
       </el-table-column>
59 64
       <el-table-column align="center" prop="name" label="项目名称">
60
-        <template slot-scope="scope">{{scope.row.item_name}}</template>
65
+        <template slot-scope="scope">
66
+          <span v-if="scope.row.advice_id > 0">{{scope.row.advice.advice_name}}</span>
67
+          <span v-if="scope.row.project_id > 0">
68
+            <span v-if="scope.row.project.type == 2">{{scope.row.project.project.project_name}}</span>
69
+            <span v-if="scope.row.project.type == 3">{{scope.row.project.good_info.good_name}}</span>
70
+          </span>
71
+        </template>
61 72
       </el-table-column>
62 73
       <el-table-column align="center" prop="name" label="规格">
63
-        <template slot-scope="scope">{{scope.row.item_spec}}</template>
74
+        <template slot-scope="scope">
75
+          <span v-if="scope.row.advice_id > 0">{{scope.row.advice.drug.dose}}{{scope.row.advice.drug.dose_unit}}*{{scope.row.advice.drug.min_number}}{{scope.row.advice.drug.min_unit}}/{{scope.row.advice.drug.max_unit}}</span>
76
+          <span v-if="scope.row.project_id > 0">
77
+            <span v-if="scope.row.project.type == 2">{{scope.row.project.project.project_name}}</span>
78
+            <span v-if="scope.row.project.type == 3">{{scope.row.project.good_info.specification_name}}</span>
79
+          </span>
80
+        </template>
64 81
       </el-table-column>
65 82
       <el-table-column align="center" prop="name" label="数量">
66
-        <template slot-scope="scope">{{scope.row.count}}</template>
83
+        <template slot-scope="scope">
84
+          {{scope.row.cnt}}
85
+        </template>
67 86
       </el-table-column>
68 87
       <el-table-column align="center" prop="name" label="单价">
69
-        <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
88
+        <template slot-scope="scope">
89
+          {{scope.row.pric}}
90
+        </template>
70 91
       </el-table-column>
71 92
       <el-table-column align="center" prop="name" label="金额">
72 93
         <template slot-scope="scope">
73
-          <div>{{(scope.row.price.toFixed(2)*scope.row.count).toFixed(2)}}</div>
94
+          <div>
95
+            {{scope.row.total_price}}
96
+          </div>
74 97
         </template>
75 98
       </el-table-column>
76
-
99
+     
77 100
     </el-table>
101
+     <div>总费用:{{getAllPice()}}</div>
102
+     <div>个人支付:</div>
103
+     <div>基金支付记账:</div>
104
+     <div>补充医疗支付记账:</div>
105
+    <div>救助支付金额:</div>
78 106
   </div>
79 107
 
80 108
   <!-- </div> -->
@@ -83,8 +111,9 @@
83 111
 
84 112
 <script>
85 113
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
86
-import {  } from '@/api/his/his'
114
+import { getHisSummaryDetailList } from '@/api/his/his_tools'
87 115
 const moment = require('moment')
116
+import { uParseTime } from '@/utils/tools'
88 117
 export default {
89 118
   components: {
90 119
     BreadCrumb
@@ -120,17 +149,27 @@ export default {
120 149
     }
121 150
   },
122 151
   methods: {
152
+    getTime(val) {
153
+      if(val <= 0){
154
+        return ""
155
+      }
156
+      if(val == ""){
157
+      return ""
158
+      }else {
159
+      return uParseTime(val, '{y}-{m}-{d}')
160
+      }
161
+     },
123 162
     searchAction(){
124 163
 
125 164
 
126 165
     },
127 166
     changeDate() {
128
-      this.getSummaryDetailList()
167
+      this.getHisSummaryDetailList()
129 168
     },
130 169
     changeItem() {
131
-      this.getSummaryDetailList()
170
+      this.getHisSummaryDetailList()
132 171
     },
133
-    getSummaryDetailList() {
172
+    getHisSummaryDetailList() {
134 173
       let start_time = this.chargeDate[0]
135 174
       let end_time = this.chargeDate[1]
136 175
       let params = {
@@ -140,14 +179,53 @@ export default {
140 179
         type: this.item_type,
141 180
         keyword: this.keywords
142 181
       }
143
-
144
-
145
-
182
+     getHisSummaryDetailList(params).then(response=>{
183
+       if(response.data.state == 1){
184
+          var list =  response.data.data.list
185
+          this.tableData = []
186
+          console.log("list23232332232322323",list)
187
+          for(let i=0;i<list.length;i++){
188
+            for(let j=0;j<list[i].orders.length;j++){
189
+              for(let z=0;z<list[i].orders[j].order_info.length;z++){
190
+                  list[i].orders[j].order_info[z].record_date = list[i].orders[j].settle_accounts_date
191
+                  list[i].orders[j].order_info[z].number = list[i].orders[j].number
192
+                  this.tableData.push(list[i].orders[j].order_info[z])
193
+               }
194
+            }
195
+          }
196
+          var obj = {index:"合计",total_price:0,record_date:"0"}
197
+          for(let i=0;i<this.tableData.length;i++){
198
+            this.tableData[i].index = i+1
199
+            this.tableData[i].total_price = 0
200
+            this.tableData[i].total_price = (this.tableData[i].cnt * this.tableData[i].pric).toFixed(2)
201
+            obj.total_price += (this.tableData[i].cnt * this.tableData[i].pric)  
202
+          }
203
+          obj.total_price = (obj.total_price).toFixed(2)
204
+          this.tableData.push(obj)
205
+          
206
+          console.log("tabledata",this.tableData)
207
+       }
208
+     })
146 209
     },
210
+    getAllPice(){
211
+      console.log("hhhhh",this.tableData)
212
+      var total_price = 0
213
+      for(let i=0;i<this.tableData.length;i++){
214
+        if(this.tableData[i].index =="合计"){
215
+          total_price = this.tableData[i].total_price
216
+        }
217
+      }
218
+      return total_price
219
+    }
147 220
   },
148 221
   created() {
149
-    this.getSummaryDetailList()
150
-
222
+   // this.getHisSummaryDetailList()
223
+  },
224
+  watch:{
225
+    "patient_id":function(){
226
+      this.patient_id = this.patient_id
227
+      this.getHisSummaryDetailList()
228
+    }
151 229
   }
152 230
 }
153 231
 </script>

+ 18 - 13
src/xt_pages/outpatientTool/components/gatherStatistics.vue View File

@@ -51,26 +51,26 @@
51 51
               highlight-current-row>
52 52
       <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
53 53
       <el-table-column align="center" prop="name" label="处方日期">
54
-        <template slot-scope="scope">{{  }}</template>
54
+        <template slot-scope="scope"></template>
55 55
       </el-table-column>
56 56
       <el-table-column align="center" prop="name" label="费用分类">
57
-        <template slot-scope="scope">{{scope.row.code}}</template>
57
+        <template slot-scope="scope"></template>
58 58
       </el-table-column>
59 59
       <el-table-column align="center" prop="name" label="项目名称">
60
-        <template slot-scope="scope">{{scope.row.item_name}}</template>
60
+        <template slot-scope="scope"></template>
61 61
       </el-table-column>
62 62
       <el-table-column align="center" prop="name" label="规格型号">
63
-        <template slot-scope="scope">{{scope.row.item_spec}}</template>
63
+        <template slot-scope="scope"></template>
64 64
       </el-table-column>
65 65
       <el-table-column align="center" prop="name" label="数量">
66
-        <template slot-scope="scope">{{scope.row.count}}</template>
66
+        <template slot-scope="scope"></template>
67 67
       </el-table-column>
68 68
       <el-table-column align="center" prop="name" label="单价">
69
-        <template slot-scope="scope">{{scope.row.price.toFixed(2)}}</template>
69
+        <template slot-scope="scope"></template>
70 70
       </el-table-column>
71 71
       <el-table-column align="center" prop="name" label="金额">
72 72
         <template slot-scope="scope">
73
-          <div>{{(scope.row.price.toFixed(2)*scope.row.count).toFixed(2)}}</div>
73
+          <div></div>
74 74
         </template>
75 75
       </el-table-column>
76 76
       <el-table-column align="center" prop="name" label="医保类别">
@@ -79,14 +79,12 @@
79 79
 
80 80
     </el-table>
81 81
   </div>
82
-
83
-  <!-- </div> -->
84 82
 </template>
85 83
 
86 84
 
87 85
 <script>
88 86
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
89
-import {  } from '@/api/his/his'
87
+import { getGatherDetailList } from '@/api/his/his_tools'
90 88
 const moment = require('moment')
91 89
 export default {
92 90
   components: {
@@ -133,7 +131,7 @@ export default {
133 131
     changeItem() {
134 132
       this.getSummaryDetailList()
135 133
     },
136
-    getSummaryDetailList() {
134
+    getGatherDetailList() {
137 135
       let start_time = this.chargeDate[0]
138 136
       let end_time = this.chargeDate[1]
139 137
       let params = {
@@ -143,13 +141,20 @@ export default {
143 141
         type: this.item_type,
144 142
         keyword: this.keywords
145 143
       }
146
-
144
+     getGatherDetailList(params).then(response=>{
145
+       if(response.data.state == 1){
146
+         var detailList = response.data.data.detailList
147
+         console.log("detailist232323322332",detailList)
148
+         var list = response.data.data.list
149
+         console.log("list233223232323",list)
150
+       }
151
+     })
147 152
 
148 153
 
149 154
     },
150 155
   },
151 156
   created() {
152
-    this.getSummaryDetailList()
157
+    this.getGatherDetailList()
153 158
 
154 159
   }
155 160
 }

+ 9 - 5
src/xt_pages/outpatientTool/statistics.vue View File

@@ -10,8 +10,10 @@
10 10
           <el-table  :data="patientTableData" :height="tableHeight" border style="width: 100%;"
11 11
                      :row-style="{ color: '#303133' }"
12 12
                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
13
-                     highlight-current-row ref="tab"
14
-                     @current-change="handleCurrentChange">
13
+                     highlight-current-row
14
+                     ref="singleTable"
15
+                     @current-change="handleCurrentChange"
16
+                   >
15 17
             <el-table-column align="center" prop="name" label="姓名" wdith='89'>
16 18
               <template slot-scope="scope">{{ scope.row.name }}</template>
17 19
             </el-table-column>
@@ -23,8 +25,8 @@
23 25
           <el-tab-pane label="明细" name="明细"></el-tab-pane>
24 26
           <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
25 27
         </el-tabs>
26
-        <detail-statistics v-if="titleType == '明细'" :patient_id="patient_id"></detail-statistics>
27
-        <gather-statistics v-if="titleType == '汇总'" :patient_id="patient_id"></gather-statistics>
28
+        <detail-statistics v-if="titleType == '明细'" :patient_id="patient_id" ref="child"></detail-statistics>
29
+        <gather-statistics v-if="titleType == '汇总'" :patient_id="patient_id" ref="childOne"></gather-statistics>
28 30
       </div>
29 31
     </div>
30 32
   </div>
@@ -68,12 +70,14 @@ export default {
68 70
         } else {
69 71
           this.patientTableData = response.data.data.list
70 72
           this.patient_id =  this.patientTableData[0].id
73
+          this.$refs.singleTable.setCurrentRow(this.patientTableData[0])
71 74
         }
72 75
       })
73 76
     },
74 77
     handleCurrentChange(row){
75 78
       this.patient_id =  row.id
76
-
79
+      this.$refs.child.getHisSummaryDetailList()
80
+     
77 81
     },
78 82
 
79 83
   },

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

@@ -441,7 +441,7 @@ export default {
441 441
                  }
442 442
                  if(order[i].count_unit == order[i].max_unit){
443 443
                    order[i].total_price += order[i].count * order[i].price * order[i].min_number
444
-                   total_price += order[i].total_price
444
+                  //  total_price += order[i].total_price
445 445
                  }
446 446
                 
447 447
                }
@@ -456,7 +456,7 @@ export default {
456 456
                 if(order[i].count_unit == order[i].max_unit){
457 457
                    order[i].total_price += order[i].count * this.getPrice(order[i].drug_id) * order[i].min_number
458 458
                    //total_price += order[i].count * this.getPrice(order[i].drug_id)
459
-                   order[i].total_price+=order[i].total_price
459
+                  //  order[i].total_price = order[i].total_price
460 460
                    order[i].price = this.getPrice(order[i].drug_id)
461 461
                 }
462 462
                  

+ 19 - 3
src/xt_pages/stock/stockBatchNumber.vue View File

@@ -5,9 +5,9 @@
5 5
     </div>
6 6
     <div class="app-container ">
7 7
       <div class="cell clearfix">
8
-        耗材名称:{{this.$route.query.good_name}} &nbsp;
8
+        耗材名称:{{getGoodName(this.$route.query.id)}} &nbsp;
9 9
         库存:{{this.$route.query.overCount}}{{packing_unit}} &nbsp;
10
-        规格:{{this.$route.query.specification_name}} &nbsp;
10
+        规格:{{getSpecName(this.$route.query.id)}} &nbsp;
11 11
         厂家:{{this.$route.query.manufacturer}} 
12 12
       </div>
13 13
       <div class="cell clearfix">
@@ -189,6 +189,7 @@
189 189
         packing_unit:"",
190 190
         cancelCountList:[],
191 191
         houseList:[],
192
+        good:{}
192 193
       }
193 194
     },
194 195
     methods:{
@@ -259,6 +260,7 @@
259 260
            var manufacturerList = response.data.data.manufacturerList
260 261
            this.manufacturerList = manufacturerList
261 262
            this.houseList = response.data.data.houseList
263
+           this.good = response.data.data.good
262 264
          }
263 265
       })
264 266
      },
@@ -345,7 +347,21 @@
345 347
         }
346 348
         return storehouse_name
347 349
      },
348
-      
350
+     getGoodName(id){
351
+       
352
+       var good_name =  ""
353
+       if(id == this.good.id){
354
+         good_name = this.good.good_name
355
+       }
356
+       return good_name
357
+     },
358
+     getSpecName(id){
359
+       var specification_name = ""
360
+       if(id == this.good.id){
361
+         specification_name = this.good.specification_name
362
+       }
363
+       return specification_name
364
+     }
349 365
 
350 366
     }
351 367
   }

+ 17 - 2
src/xt_pages/stock/stockFlow.vue View File

@@ -5,10 +5,10 @@
5 5
     </div>
6 6
     <div class="app-container ">
7 7
       <div class="cell clearfix">
8
-       耗材名称:{{this.$route.query.good_name}} &nbsp;
8
+       耗材名称:{{getGoodName(this.$route.query.id)}} &nbsp;
9 9
        库存: {{this.$route.query.overCount}}{{packing_unit}} &nbsp;
10 10
        规格:{{this.$route.query.specification_name}} &nbsp;
11
-       厂家:{{this.$route.query.manufacturer}} 
11
+       厂家:{{getSpecName(this.$route.query.id)}}
12 12
       </div>
13 13
       <div class="cell clearfix">
14 14
         <span>日期查询:</span>
@@ -451,6 +451,21 @@
451 451
         }
452 452
         return storehouse_name
453 453
      },
454
+     getGoodName(id){
455
+       
456
+       var good_name =  ""
457
+       if(id == this.good.id){
458
+         good_name = this.good.good_name
459
+       }
460
+       return good_name
461
+     },
462
+     getSpecName(id){
463
+       var specification_name = ""
464
+       if(id == this.good.id){
465
+         specification_name = this.good.specification_name
466
+       }
467
+       return specification_name
468
+     }
454 469
     }
455 470
   }
456 471
 </script>

+ 3 - 2
src/xt_pages/stock/stockQuery.vue View File

@@ -575,7 +575,8 @@ export default {
575 575
       var overCount  = this.getOverplus(val.xt_warehouse_info)
576 576
       window.sessionStorage.setItem('start_time',this.start_time)
577 577
       window.sessionStorage.setItem('end_time',this.end_time)
578
-      this.$router.push({path:"/stock/in/stockflow?id="+val.id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name+"&specification_name="+specification_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
578
+      console.log("val3234243423324324234",val.id)
579
+      this.$router.push({path:"/stock/in/stockflow?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
579 580
     },
580 581
     toClickOne(val){
581 582
        var manufacturer_name = ""
@@ -589,7 +590,7 @@ export default {
589 590
       var overCount  = this.getOverplus(val.xt_warehouse_info)
590 591
       window.sessionStorage.setItem('start_time',this.start_time)
591 592
       window.sessionStorage.setItem('end_time',this.end_time)
592
-      this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name+"&specification_name="+specification_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
593
+      this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.id+"&manufacturer="+manufacturer_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
593 594
     },
594 595
     getStockDrugCount(){
595 596
         var params ={