Przeglądaj źródła

518合并代码

XMLWAN 2 lat temu
rodzic
commit
f218062c74

+ 7 - 0
src/api/his/his.js Wyświetl plik

@@ -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 Wyświetl plik

@@ -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
 }

+ 11 - 7
src/api/his/his_tools.js Wyświetl plik

@@ -1,12 +1,16 @@
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
 
11
-
12
-
10
+export function getHisSummaryDetailList(params) {
11
+  return request({
12
+    url: '/api/gethissummarydetaillist',
13
+    method: 'get',
14
+    params: params
15
+  })
16
+}

+ 4 - 3
src/lang/zh.js Wyświetl plik

@@ -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 Wyświetl plik

@@ -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
 }

+ 698 - 0
src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateModeTable.vue Wyświetl plik

@@ -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 Wyświetl plik

@@ -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: '确 定',

+ 437 - 0
src/xt_pages/outpatientDoctorStation/modeTemplate.vue Wyświetl plik

@@ -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>

Plik diff jest za duży
+ 2228 - 0
src/xt_pages/outpatientDoctorStation/modeTemplateDetail.vue


+ 1 - 0
src/xt_pages/outpatientDoctorStation/prescriptionTemplate.vue Wyświetl plik

@@ -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 Wyświetl plik

@@ -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){

+ 99 - 17
src/xt_pages/outpatientTool/components/detailStatistics.vue Wyświetl plik

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

+ 9 - 5
src/xt_pages/outpatientTool/statistics.vue Wyświetl plik

@@ -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
   },