Browse Source

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

csx 3 years ago
parent
commit
6dbdc08a11

+ 2 - 0
src/xt_pages/hospitalStation/components/chargeDialog.vue View File

120
           {value: 2, label: '银行卡'},
120
           {value: 2, label: '银行卡'},
121
           {value: 3, label: '微信'},
121
           {value: 3, label: '微信'},
122
           {value: 4, label: '支付宝'},
122
           {value: 4, label: '支付宝'},
123
+          {value: 5, label: '医保卡'},
124
+
123
         ],
125
         ],
124
         total:"",
126
         total:"",
125
 
127
 

+ 2 - 0
src/xt_pages/outpatientCharges/components/chargeDialog.vue View File

121
           {value: 2, label: '银行卡'},
121
           {value: 2, label: '银行卡'},
122
           {value: 3, label: '微信'},
122
           {value: 3, label: '微信'},
123
           {value: 4, label: '支付宝'},
123
           {value: 4, label: '支付宝'},
124
+          {value: 5, label: '医保卡'},
125
+
124
         ],
126
         ],
125
         total:"",
127
         total:"",
126
 
128
 

+ 254 - 122
src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue View File

1
 <template>
1
 <template>
2
+
2
     <div class="prescriptionTable">
3
     <div class="prescriptionTable">
3
-        <el-table v-if="prescription.advices && prescription.advices.length > 0" :data="prescription.advices" border style="width: 99%;" :row-style="{ color: '#303133' }"
4
+        <el-table v-if="prescription.advices && prescription.advices.length > 0" :data="prescription.advices" border
5
+                  style="width: 99%;" :row-style="{ color: '#303133' }"
4
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
6
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
5
-            <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
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>
6
             <el-table-column align="center" prop="drug_name" label="名称">
14
             <el-table-column align="center" prop="drug_name" label="名称">
7
-                <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span></template>
15
+                <template slot-scope="scope"><span :title="scope.row.drug_name">{{ scope.row.drug_name }}</span>
16
+                </template>
8
             </el-table-column>
17
             </el-table-column>
9
 
18
 
10
             <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
19
             <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
11
                 <template slot-scope="scope">
20
                 <template slot-scope="scope">
12
                     <div style="display:flex;align-items:center;">
21
                     <div style="display:flex;align-items:center;">
13
-                        <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)" style="width:50%;"></el-input>
22
+                        <el-input v-model="scope.row.single_dose" @input="getSingleDose(scope)"
23
+                                  style="width:50%;"></el-input>
14
                         <!-- <div>{{scope.row.single_dose_unit}}</div> -->
24
                         <!-- <div>{{scope.row.single_dose_unit}}</div> -->
15
-                        <el-select v-model="scope.row.single_dose_unit" placeholder="请选择" style="width:50%;" @change="getAllChange(scope)">
16
-                          <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
17
-                          <el-option :label="scope.row.drug.dose_unit" v-if="scope.row.drug.dose_unit != scope.row.drug.min_unit" :value="scope.row.drug.dose_unit"></el-option>
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>
18
                         </el-select>
31
                         </el-select>
19
                     </div>
32
                     </div>
20
                 </template>
33
                 </template>
48
             <el-table-column align="center" prop="day" width="70" label="天数">
61
             <el-table-column align="center" prop="day" width="70" label="天数">
49
                 <template slot-scope="scope">
62
                 <template slot-scope="scope">
50
                     <div style="display:flex;align-items:center;">
63
                     <div style="display:flex;align-items:center;">
51
-                        <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>{{'天'}}
64
+                        <el-input v-model="scope.row.day" @input="getAllChange(scope)" placeholder=""></el-input>
65
+                        {{'天'}}
52
                     </div>
66
                     </div>
53
                 </template>
67
                 </template>
54
             </el-table-column>
68
             </el-table-column>
56
             <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
70
             <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
57
                 <template slot-scope="scope">
71
                 <template slot-scope="scope">
58
                     <div style="display:flex;align-items:center;">
72
                     <div style="display:flex;align-items:center;">
59
-                        <el-input v-model="scope.row.prescribing_number" style="width:50%" @input="changePrescribingNumber(scope)" placeholder=""></el-input>
73
+                        <el-input v-model="scope.row.prescribing_number" style="width:50%"
74
+                                  @input="changePrescribingNumber(scope)" placeholder=""></el-input>
60
                         <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
75
                         <!-- <div> {{scope.row.prescribing_number_unit}}</div> -->
61
-                        <el-select v-model="scope.row.prescribing_number_unit" placeholder="请选择" style="width:50%;" @change="getAllChange(scope)">
62
-                          <el-option :label="scope.row.drug.min_unit" :value="scope.row.drug.min_unit"></el-option>
63
-                          <el-option :label="scope.row.drug.max_unit" v-if="scope.row.drug.min_unit != scope.row.drug.max_unit" :value="scope.row.drug.max_unit"></el-option>
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>
64
                         </el-select>
82
                         </el-select>
65
                     </div>
83
                     </div>
66
                 </template>
84
                 </template>
79
                     <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
97
                     <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
80
                 </template>
98
                 </template>
81
             </el-table-column>
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
+
82
             <el-table-column align="center" width="40" prop="name" label="操作">
111
             <el-table-column align="center" width="40" prop="name" label="操作">
83
                 <template slot-scope="scope">
112
                 <template slot-scope="scope">
84
-                    <i class="el-icon-delete" @click="deleteDrug(scope.$index, scope.row)"></i>
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.id,scope.$index)">删除</el-button>
85
                 </template>
116
                 </template>
86
             </el-table-column>
117
             </el-table-column>
87
         </el-table>
118
         </el-table>
88
 
119
 
89
-        <el-table v-if="prescription.project &&prescription.project.length > 0" :data="prescription.project" border style="width: 99%;" :row-style="{ color: '#303133' }"
120
+        <el-table v-if="prescription.project &&prescription.project.length > 0" :data="prescription.project" border
121
+                  style="width: 99%;" :row-style="{ color: '#303133' }"
90
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
122
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
91
             <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
123
             <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
92
             <el-table-column align="center" prop="project_name" label="名称">
124
             <el-table-column align="center" prop="project_name" label="名称">
93
-                <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span></template>
125
+                <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span>
126
+                </template>
94
             </el-table-column>
127
             </el-table-column>
95
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
128
             <el-table-column align="center" prop="statistical_classification" width="100" label="组">
96
-                <template slot-scope="scope">{{scope.row.type == 2?getGroup(scope.row.statistical_classification):"耗材"}}</template>
129
+                <template slot-scope="scope">{{scope.row.type ==
130
+                    2?getGroup(scope.row.statistical_classification):'耗材'}}
131
+                </template>
97
             </el-table-column>
132
             </el-table-column>
98
             <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
133
             <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
99
                 <template slot-scope="scope">
134
                 <template slot-scope="scope">
100
-                  <div style="display:flex;align-items:center;">
101
-                    <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)" placeholder=""></el-input>
102
-                    <div>{{scope.row.unit}}</div>
103
-                  </div>
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>
104
 
140
 
105
                 </template>
141
                 </template>
106
             </el-table-column>
142
             </el-table-column>
123
             <el-table-column align="center" prop="number_days" width="70" label="天数">
159
             <el-table-column align="center" prop="number_days" width="70" label="天数">
124
                 <template slot-scope="scope">
160
                 <template slot-scope="scope">
125
                     <div style="display:flex;align-items:center;">
161
                     <div style="display:flex;align-items:center;">
126
-                        <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)" placeholder=""></el-input>
162
+                        <el-input v-model="scope.row.number_days" @input="getProjectDay(scope)"
163
+                                  placeholder=""></el-input>
127
                         <div>{{'天'}}</div>
164
                         <div>{{'天'}}</div>
128
                     </div>
165
                     </div>
129
                 </template>
166
                 </template>
140
             <el-table-column align="center" prop="name" width="70" label="单价">
177
             <el-table-column align="center" prop="name" width="70" label="单价">
141
                 <template slot-scope="scope">
178
                 <template slot-scope="scope">
142
                     <div style="display:flex;align-items:center;">
179
                     <div style="display:flex;align-items:center;">
143
-                      <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
144
-                      <div>{{'元'}}</div>
180
+                        <el-input v-model="scope.row.price" placeholder="" readonly></el-input>
181
+                        <div>{{'元'}}</div>
145
                     </div>
182
                     </div>
146
 
183
 
147
                 </template>
184
                 </template>
151
                     <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
188
                     <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
152
                 </template>
189
                 </template>
153
             </el-table-column>
190
             </el-table-column>
191
+            <el-table-column align="center" prop="remark" width="50" 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>
154
             <el-table-column align="center" width="40" prop="name" label="操作">
199
             <el-table-column align="center" width="40" prop="name" label="操作">
155
                 <template slot-scope="scope">
200
                 <template slot-scope="scope">
156
-                    <i class="el-icon-delete" @click="deleteProject(scope.row,scope.$index)"></i>
201
+                    <el-button size="mini" type="primary" @click="handleEdit(scope.row)">推送</el-button>
202
+                    <el-button size="mini" type="danger" @click="deleteProject(scope.row.id,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
+
157
                 </template>
207
                 </template>
158
             </el-table-column>
208
             </el-table-column>
159
         </el-table>
209
         </el-table>
170
         </div>
220
         </div>
171
 
221
 
172
 
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" v-if="frequency_type">
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
+
173
 
271
 
174
     </div>
272
     </div>
175
 </template>
273
 </template>
176
 
274
 
177
 <script>
275
 <script>
178
-  import { getDictionaryDataConfig} from "@/utils/data";
179
-  import { getInitData,delHisAdvice,delHisProject,delHisAddition } from '@/api/his/his'
180
-  import { delHisPrescriptionAdviceTemplate,delHisPrescriptionProjectTemplate } from '@/api/his/his_config'
276
+  import { getDictionaryDataConfig } from '@/utils/data'
277
+  import { delHisAddition, delHisAdvice, delHisProject, getInitData } from '@/api/his/his'
278
+  import { delHisPrescriptionAdviceTemplate, delHisPrescriptionProjectTemplate } from '@/api/his/his_config'
181
 
279
 
182
   export default {
280
   export default {
183
     props: {
281
     props: {
184
       preDrugs: Array,
282
       preDrugs: Array,
185
       activeType: Number,
283
       activeType: Number,
186
-      addtions_charge:Array,
187
-      prescription:{
188
-        type:Object,
189
-        default: function () {
284
+      addtions_charge: Array,
285
+      prescription: {
286
+        type: Object,
287
+        default: function() {
190
           return {
288
           return {
191
-            name:"",
192
-            advices:[],
193
-            project:[],
194
-            drugways:[],
195
-            efs:[],
196
-          };
289
+            name: '',
290
+            advices: [],
291
+            project: [],
292
+            drugways: [],
293
+            efs: []
294
+          }
197
         }
295
         }
198
-      },
296
+      }
199
     },
297
     },
200
     data() {
298
     data() {
201
       return {
299
       return {
202
-        advices:[],
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: [],
203
         tableData: [],
308
         tableData: [],
204
         newoptions: [{
309
         newoptions: [{
205
           value: '1',
310
           value: '1',
218
           label: '5'
323
           label: '5'
219
         }],
324
         }],
220
         value: '1',
325
         value: '1',
221
-        input: 1,
326
+        input: 1
222
       }
327
       }
223
     },
328
     },
224
 
329
 
225
-    methods:{
330
+    methods: {
331
+      submitTemplate() {
332
+        if (this.prescription.advices && this.prescription.advices.length > 0 && this.prescription.project && this.prescription.project.length == 0) {
333
+          this.prescription.advices[this.current_index].frequency_type = this.frequency_type
334
+          this.prescription.advices[this.current_index].day_count = this.day_count
335
+          this.prescription.advices[this.current_index].week_day = this.week_day
336
+
337
+        }
338
+
339
+        if (this.prescription.advices && this.prescription.advices.length == 0 && this.prescription.project && this.prescription.project.length > 0) {
340
+          this.prescription.project[this.current_index].frequency_type = this.frequency_type
341
+          this.prescription.project[this.current_index].day_count = this.day_count
342
+          this.prescription.project[this.current_index].week_day = this.week_day
343
+        }
344
+        this.templateFormVisible = false
345
+      },
346
+      handleEdit(row, index) {
347
+        this.current_row = row
348
+        this.current_index = index
349
+        this.frequency_type = this.current_row.frequency_type
350
+        this.day_count = this.current_row.day_count
351
+        this.week_day = this.current_row.week_day
352
+        this.templateFormVisible = true
353
+
354
+
355
+      },
226
       createFilter(queryString) {
356
       createFilter(queryString) {
227
         return (restaurant) => {
357
         return (restaurant) => {
228
           return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
358
           return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
229
         }
359
         }
230
       },
360
       },
231
       querySearch2(queryString, cb) {
361
       querySearch2(queryString, cb) {
232
-        var restaurants = this.getDictionaryDataConfig("system","project_use")
362
+        var restaurants = this.getDictionaryDataConfig('system', 'project_use')
233
         restaurants.map(item => {
363
         restaurants.map(item => {
234
           item.value = item.name
364
           item.value = item.name
235
         })
365
         })
237
         // 调用 callback 返回建议列表的数据
367
         // 调用 callback 返回建议列表的数据
238
         cb(results)
368
         cb(results)
239
       },
369
       },
240
-      delAddition(index, addition){
241
-        this.$confirm("附加费删除后不可恢复,是否确认删除", "删除", {
242
-          confirmButtonText: "确 定",
243
-          cancelButtonText: "取 消",
244
-          type: "warning"
370
+      delAddition(index, addition) {
371
+        this.$confirm('附加费删除后不可恢复,是否确认删除', '删除', {
372
+          confirmButtonText: '确 定',
373
+          cancelButtonText: '取 消',
374
+          type: 'warning'
245
         }).then(() => {
375
         }).then(() => {
246
-          this.$nextTick(function(){
247
-            if(addition.id == 0){
376
+          this.$nextTick(function() {
377
+            if (addition.id == 0) {
248
               this.prescription.addition.splice(index, 1)
378
               this.prescription.addition.splice(index, 1)
249
-            }else{
379
+            } else {
250
               let params = {
380
               let params = {
251
-                'id': addition.id,
381
+                'id': addition.id
252
               }
382
               }
253
               delHisAddition(params).then(response => {
383
               delHisAddition(params).then(response => {
254
                 if (response.data.state == 0) {
384
                 if (response.data.state == 0) {
262
                 }
392
                 }
263
               })
393
               })
264
             }
394
             }
265
-          });
395
+          })
266
 
396
 
267
         })
397
         })
268
-          .catch(() => {});
398
+          .catch(() => {
399
+          })
269
 
400
 
270
       },
401
       },
271
-      getInitData(){
402
+      getInitData() {
272
         getInitData().then(response => {
403
         getInitData().then(response => {
273
           if (response.data.state == 0) {
404
           if (response.data.state == 0) {
274
             this.$message.error(response.data.msg)
405
             this.$message.error(response.data.msg)
279
           }
410
           }
280
         })
411
         })
281
 
412
 
282
-      },deleteDrug:function(index, row){
413
+      }, deleteDrug: function(index, row) {
283
 
414
 
284
-        this.$confirm("药品删除后不可恢复,是否确认删除", "删除", {
285
-          confirmButtonText: "确 定",
286
-          cancelButtonText: "取 消",
287
-          type: "warning"
415
+        this.$confirm('药品删除后不可恢复,是否确认删除', '删除', {
416
+          confirmButtonText: '确 定',
417
+          cancelButtonText: '取 消',
418
+          type: 'warning'
288
         }).then(() => {
419
         }).then(() => {
289
-          this.$nextTick(function(){
290
-            if(row.advice_id == 0){
420
+          this.$nextTick(function() {
421
+            if (row.advice_id == 0) {
291
               this.prescription.advices.splice(index, 1)
422
               this.prescription.advices.splice(index, 1)
292
-            }else{
423
+            } else {
293
               let params = {
424
               let params = {
294
-                'id': row.advice_id,
425
+                'id': row.advice_id
295
               }
426
               }
296
               delHisPrescriptionAdviceTemplate(params).then(response => {
427
               delHisPrescriptionAdviceTemplate(params).then(response => {
297
                 if (response.data.state == 0) {
428
                 if (response.data.state == 0) {
305
                 }
436
                 }
306
               })
437
               })
307
 
438
 
308
-
309
             }
439
             }
310
 
440
 
311
-          });
312
-
441
+          })
313
 
442
 
314
         })
443
         })
315
-          .catch(() => {});
316
-
317
-
444
+          .catch(() => {
445
+          })
318
 
446
 
319
-
320
-
321
-      },deepClone(source) {
447
+      }, deepClone(source) {
322
         if (!source && typeof source !== 'object') {
448
         if (!source && typeof source !== 'object') {
323
           throw new Error('error arguments', 'shallowClone')
449
           throw new Error('error arguments', 'shallowClone')
324
         }
450
         }
333
         return targetObj
459
         return targetObj
334
       },
460
       },
335
 
461
 
336
-      setNewData:function(data){
462
+      setNewData: function(data) {
337
         this.prescription = data
463
         this.prescription = data
338
 
464
 
339
         // this.prescription.advices = data.advices
465
         // this.prescription.advices = data.advices
341
       getDictionaryDataConfig(module, filed_name) {
467
       getDictionaryDataConfig(module, filed_name) {
342
         return getDictionaryDataConfig(module, filed_name)
468
         return getDictionaryDataConfig(module, filed_name)
343
       },
469
       },
344
-      getGroup(id){
345
-        var name = ""
346
-        var statistics_category =  getDictionaryDataConfig('system','statistics_category')
347
-        console.log("2235",statistics_category)
348
-        for(let i=0;i<statistics_category.length;i++){
349
-          if(id == statistics_category[i].id){
470
+      getGroup(id) {
471
+        var name = ''
472
+        var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
473
+        console.log('2235', statistics_category)
474
+        for (let i = 0; i < statistics_category.length; i++) {
475
+          if (id == statistics_category[i].id) {
350
             name = statistics_category[i].name
476
             name = statistics_category[i].name
351
           }
477
           }
352
         }
478
         }
353
         return name
479
         return name
354
       },
480
       },
355
-      deleteProject(row,i){
356
-        if(this.prescription.order_status == 2){
481
+      deleteProject(row, i) {
482
+        if (this.prescription.order_status == 2) {
357
           this.$message.error('该处方已经结算,无法删除')
483
           this.$message.error('该处方已经结算,无法删除')
358
           return
484
           return
359
         }
485
         }
360
-        this.$confirm("项目删除后不可恢复,是否确认删除", "删除", {
361
-          confirmButtonText: "确 定",
362
-          cancelButtonText: "取 消",
363
-          type: "warning"
486
+        this.$confirm('项目删除后不可恢复,是否确认删除', '删除', {
487
+          confirmButtonText: '确 定',
488
+          cancelButtonText: '取 消',
489
+          type: 'warning'
364
         }).then(() => {
490
         }).then(() => {
365
-          if(row.id == 0){
491
+          if (row.id == 0) {
366
             this.prescription.project.splice(i, 1)
492
             this.prescription.project.splice(i, 1)
367
 
493
 
368
-          }else{
494
+          } else {
369
             let params = {
495
             let params = {
370
-              'id': row.id,
496
+              'id': row.id
371
             }
497
             }
372
             delHisPrescriptionProjectTemplate(params).then(response => {
498
             delHisPrescriptionProjectTemplate(params).then(response => {
373
               if (response.data.state == 0) {
499
               if (response.data.state == 0) {
374
                 this.$message.error(response.data.msg)
500
                 this.$message.error(response.data.msg)
375
                 return false
501
                 return false
376
               } else {
502
               } else {
377
-                for (let i = 0; i < this.prescription.project.length; i++){
378
-                  if(this.prescription.project[i].id == row.id){
503
+                for (let i = 0; i < this.prescription.project.length; i++) {
504
+                  if (this.prescription.project[i].id == row.id) {
379
                     this.prescription.project.splice(i, 1)
505
                     this.prescription.project.splice(i, 1)
380
                   }
506
                   }
381
                 }
507
                 }
384
             })
510
             })
385
           }
511
           }
386
         })
512
         })
387
-          .catch(() => {});
513
+          .catch(() => {
514
+          })
388
 
515
 
389
       },
516
       },
390
-      getAllChange(scope){
391
-        if(scope.row.drug.min_unit == scope.row.single_dose_unit){
392
-          if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
517
+      getAllChange(scope) {
518
+        if (scope.row.drug.min_unit == scope.row.single_dose_unit) {
519
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
393
             console.log(1)
520
             console.log(1)
394
             scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
521
             scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
395
-          }else{
522
+          } else {
396
             console.log(12)
523
             console.log(12)
397
-            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number) 
524
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency)) * scope.row.day / scope.row.drug.min_number)
398
           }
525
           }
399
-        }else{
400
-          if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
526
+        } else {
527
+          if (scope.row.prescribing_number_unit == scope.row.drug.min_unit) {
401
             console.log(123)
528
             console.log(123)
402
-            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose) 
403
-          }else{
529
+            scope.row.prescribing_number = Math.ceil((scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day) / scope.row.drug.dose)
530
+          } else {
404
             console.log(1234)
531
             console.log(1234)
405
             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)
532
             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)
406
           }
533
           }
407
         }
534
         }
408
-        if(scope.row.prescribing_number == 0){
535
+        if (scope.row.prescribing_number == 0) {
409
           scope.row.prescribing_number = 1
536
           scope.row.prescribing_number = 1
410
         }
537
         }
411
         // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
538
         // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
419
         //   }
546
         //   }
420
         //   // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
547
         //   // scope.row.retail_price = scope.row.drug.retail_price * scope.row.prescribing_number
421
         // }
548
         // }
422
-        
549
+
423
       },
550
       },
424
-      changePrescribingNumber(scope){
551
+      changePrescribingNumber(scope) {
425
         // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
552
         // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
426
         //   if(parseInt(scope.row.prescribing_number) > scope.row.drug.total){
553
         //   if(parseInt(scope.row.prescribing_number) > scope.row.drug.total){
427
         //     this.$message.error(scope.row.drug_name + '库存不足')
554
         //     this.$message.error(scope.row.drug_name + '库存不足')
432
         //   }
559
         //   }
433
         // }
560
         // }
434
       },
561
       },
435
-      getSingleDose(scope){
562
+      getSingleDose(scope) {
436
         this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
563
         this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
437
       },
564
       },
438
-      getDay(scope){
565
+      getDay(scope) {
439
         this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
566
         this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
440
       },
567
       },
441
-      getProjectSingleDose(scope){
568
+      getProjectSingleDose(scope) {
442
         this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
569
         this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
443
-        if(this.prescription.project[scope.$index].total == 0){
570
+        if (this.prescription.project[scope.$index].total == 0) {
444
           this.prescription.project[scope.$index].total = 1
571
           this.prescription.project[scope.$index].total = 1
445
         }
572
         }
446
       },
573
       },
447
-      getProjectDay(scope){
574
+      getProjectDay(scope) {
448
         this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
575
         this.prescription.project[scope.$index].total = scope.row.single_dose * scope.row.number_days
449
-        if(this.prescription.project[scope.$index].total == 0){
576
+        if (this.prescription.project[scope.$index].total == 0) {
450
           this.prescription.project[scope.$index].total = 1
577
           this.prescription.project[scope.$index].total = 1
451
         }
578
         }
452
       }
579
       }
453
-    },mounted(){
580
+    }, mounted() {
454
       this.getInitData()
581
       this.getInitData()
455
 
582
 
456
     },
583
     },
457
-    watch:{
584
+    watch: {
458
       // "prescription.advices":{
585
       // "prescription.advices":{
459
       //   handler(newVal,oldVal){
586
       //   handler(newVal,oldVal){
460
       //     newVal.map(item => {
587
       //     newVal.map(item => {
463
       //         item.total = item.single_dose * item.number_days
590
       //         item.total = item.single_dose * item.number_days
464
       //       }
591
       //       }
465
 
592
 
466
-
467
       //     })
593
       //     })
468
       //   },
594
       //   },
469
       //   deep:true
595
       //   deep:true
486
 
612
 
487
 <style lang="scss">
613
 <style lang="scss">
488
     .prescriptionTable {
614
     .prescriptionTable {
489
-    .el-input__inner{
615
+
616
+    .el-input__inner {
490
         padding: 0 5px;
617
         padding: 0 5px;
491
     }
618
     }
492
-    .additionalBox{
619
+
620
+    .additionalBox {
493
         margin-top: 20px;
621
         margin-top: 20px;
494
         display: flex;
622
         display: flex;
495
         flex-wrap: wrap;
623
         flex-wrap: wrap;
496
-    .additionalOne{
497
-        margin-right:20px;
498
-        margin-bottom:10px;
624
+
625
+    .additionalOne {
626
+        margin-right: 20px;
627
+        margin-bottom: 10px;
499
         display: flex;
628
         display: flex;
500
         align-items: center;
629
         align-items: center;
501
-    >span{
630
+
631
+    > span {
502
         white-space: nowrap;
632
         white-space: nowrap;
503
         overflow: hidden;
633
         overflow: hidden;
504
         text-overflow: ellipsis;
634
         text-overflow: ellipsis;
505
-        width:80px;
635
+        width: 80px;
506
         display: inline-block;
636
         display: inline-block;
507
         font-size: 14px;
637
         font-size: 14px;
508
     }
638
     }
639
+
509
     }
640
     }
510
-    .deleteIcon{
511
-        color:red;
512
-        margin-left:5px;
641
+    .deleteIcon {
642
+        color: red;
643
+        margin-left: 5px;
513
     }
644
     }
645
+
514
     }
646
     }
515
     .el-table th .cell, .el-table td .cell {
647
     .el-table th .cell, .el-table td .cell {
516
         padding: 0 2px;
648
         padding: 0 2px;

+ 60 - 0
src/xt_pages/outpatientDoctorStation/doctorDesk.vue View File

1317
 
1317
 
1318
             return false
1318
             return false
1319
           } else {
1319
           } else {
1320
+            for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
1321
+              if(response.data.data.sch_prescriptions[i].advices == null){
1322
+                response.data.data.sch_prescriptions[i].advices = []
1323
+              }
1324
+
1325
+              if(response.data.data.sch_prescriptions[i].project == null){
1326
+                response.data.data.sch_prescriptions[i].project = []
1327
+              }
1328
+
1329
+            }
1320
             this.patientid = val.id
1330
             this.patientid = val.id
1321
             this.isloading = false
1331
             this.isloading = false
1322
 
1332
 
1705
                   this.$message.error(response.data.msg)
1715
                   this.$message.error(response.data.msg)
1706
                   return false
1716
                   return false
1707
                 } else {
1717
                 } else {
1718
+                  for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
1719
+                    if(response.data.data.sch_prescriptions[i].advices == null){
1720
+                      response.data.data.sch_prescriptions[i].advices = []
1721
+                    }
1722
+
1723
+                    if(response.data.data.sch_prescriptions[i].project == null){
1724
+                      response.data.data.sch_prescriptions[i].project = []
1725
+                    }
1726
+
1727
+                  }
1708
                   this.prescriptions = []
1728
                   this.prescriptions = []
1709
 
1729
 
1710
                   this.month_prescriptions = []
1730
                   this.month_prescriptions = []
2189
                   this.$message.error(response.data.msg)
2209
                   this.$message.error(response.data.msg)
2190
                   return false
2210
                   return false
2191
                 } else {
2211
                 } else {
2212
+                  for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
2213
+                    if(response.data.data.sch_prescriptions[i].advices == null){
2214
+                      response.data.data.sch_prescriptions[i].advices = []
2215
+                    }
2216
+
2217
+                    if(response.data.data.sch_prescriptions[i].project == null){
2218
+                      response.data.data.sch_prescriptions[i].project = []
2219
+                    }
2220
+
2221
+                  }
2192
                   this.prescriptions = []
2222
                   this.prescriptions = []
2193
 
2223
 
2194
                   this.month_prescriptions = []
2224
                   this.month_prescriptions = []
2652
                 this.$message.error(response.data.msg)
2682
                 this.$message.error(response.data.msg)
2653
                 return false
2683
                 return false
2654
               } else {
2684
               } else {
2685
+                for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
2686
+                  if(response.data.data.sch_prescriptions[i].advices == null){
2687
+                    response.data.data.sch_prescriptions[i].advices = []
2688
+                  }
2689
+
2690
+                  if(response.data.data.sch_prescriptions[i].project == null){
2691
+                    response.data.data.sch_prescriptions[i].project = []
2692
+                  }
2693
+
2694
+                }
2655
                 this.prescriptions = []
2695
                 this.prescriptions = []
2656
 
2696
 
2657
                 this.month_prescriptions = []
2697
                 this.month_prescriptions = []
3173
                   this.$message.error(response.data.msg)
3213
                   this.$message.error(response.data.msg)
3174
                   return false
3214
                   return false
3175
                 } else {
3215
                 } else {
3216
+                  for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
3217
+                    if(response.data.data.sch_prescriptions[i].advices == null){
3218
+                      response.data.data.sch_prescriptions[i].advices = []
3219
+                    }
3220
+
3221
+                    if(response.data.data.sch_prescriptions[i].project == null){
3222
+                      response.data.data.sch_prescriptions[i].project = []
3223
+                    }
3224
+
3225
+                  }
3176
                   for (let i = 0; i < this.all_data.length; i++) {
3226
                   for (let i = 0; i < this.all_data.length; i++) {
3177
                     if (this.all_data[i].id == val.id) {
3227
                     if (this.all_data[i].id == val.id) {
3178
                       this.oldCurrentRow = this.all_data[i]
3228
                       this.oldCurrentRow = this.all_data[i]
3731
                   this.$message.error(response.data.msg)
3781
                   this.$message.error(response.data.msg)
3732
                   return false
3782
                   return false
3733
                 } else {
3783
                 } else {
3784
+                  for(let i = 0;i < response.data.data.sch_prescriptions.length; i++){
3785
+                    if(response.data.data.sch_prescriptions[i].advices == null){
3786
+                      response.data.data.sch_prescriptions[i].advices = []
3787
+                    }
3788
+
3789
+                    if(response.data.data.sch_prescriptions[i].project == null){
3790
+                      response.data.data.sch_prescriptions[i].project = []
3791
+                    }
3792
+
3793
+                  }
3734
                   this.prescriptions = []
3794
                   this.prescriptions = []
3735
 
3795
 
3736
                   this.month_prescriptions = []
3796
                   this.month_prescriptions = []

+ 28 - 12
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

452
             this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
452
             this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
453
             this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
453
             this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
454
             this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
454
             this.prescriptions[i].advices[b].day = parseInt(this.prescriptions[i].advices[b].day)
455
+            this.prescriptions[i].advices[b].groupno = parseInt(this.prescriptions[i].advices[b].groupno)
456
+
455
 
457
 
456
           }
458
           }
457
 
459
 
1461
               this.curStatus = 1
1463
               this.curStatus = 1
1462
             }
1464
             }
1463
 
1465
 
1466
+            let index = 0
1467
+
1468
+            if (this.prescriptions[i].advices.length > 0) {
1469
+              index = this.prescriptions[i].advices.length
1470
+            }
1471
+
1464
             if (temp.length > 0) {
1472
             if (temp.length > 0) {
1465
               for (let b = 0; b < temp.length; b++) {
1473
               for (let b = 0; b < temp.length; b++) {
1474
+                let temp_index = b + 1
1466
                 let obj = {
1475
                 let obj = {
1467
                   advice_id: 0,
1476
                   advice_id: 0,
1468
                   id: temp[b].id,
1477
                   id: temp[b].id,
1477
                   single_dose_unit: temp[b].dose_unit,
1486
                   single_dose_unit: temp[b].dose_unit,
1478
                   prescribing_number_unit: temp[b].prescribing_number_unit,
1487
                   prescribing_number_unit: temp[b].prescribing_number_unit,
1479
                   medical_insurance_number: temp[b].medical_insurance_number,
1488
                   medical_insurance_number: temp[b].medical_insurance_number,
1480
-                  drug: temp[b]
1489
+                  drug: temp[b],
1490
+                  groupno: index + temp_index,
1491
+                  frequency_type:1,
1492
+                  day_count:0,
1493
+                  week_day:"",
1481
                 }
1494
                 }
1482
 
1495
 
1483
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
1496
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
1488
               this.curStatus = 1
1501
               this.curStatus = 1
1489
             }
1502
             }
1490
 
1503
 
1491
-            // if(this.activeName == 2){
1492
-            //
1493
-            //    for(let i = 0; i<temp2.length;i++){
1494
-            //     for(let j=0;j<this.hisList.length;j++){
1495
-            //         if(temp2[i].id == this.hisList[j].project_id){
1496
-            //            temp2[i].total =  this.hisList[j].number
1497
-            //         }
1498
-            //     }
1499
-            //    }
1500
-            //  }
1501
 
1504
 
1502
             if (temp2.length > 0) {
1505
             if (temp2.length > 0) {
1503
               for (let b = 0; b < temp2.length; b++) {
1506
               for (let b = 0; b < temp2.length; b++) {
1516
                   medical_code: temp2[b].medical_code,
1519
                   medical_code: temp2[b].medical_code,
1517
                   unit: temp2[b].unit,
1520
                   unit: temp2[b].unit,
1518
                   type: temp2[b].type,
1521
                   type: temp2[b].type,
1522
+                  frequency_type:1,
1523
+                  day_count:0,
1524
+                  week_day:"",
1519
                 }
1525
                 }
1520
                 if (temp2[b].type == 2){
1526
                 if (temp2[b].type == 2){
1521
                   obj['project'] = temp2[b].project
1527
                   obj['project'] = temp2[b].project
1591
                     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1597
                     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1592
                     medical_insurance_number: prescription.advices[b].med_list_codg,
1598
                     medical_insurance_number: prescription.advices[b].med_list_codg,
1593
                     id: prescription.advices[b].drug_id,
1599
                     id: prescription.advices[b].drug_id,
1594
-                    drug: prescription.advices[b].drug
1600
+                    drug: prescription.advices[b].drug,
1601
+                    groupno:prescription.advices[b].groupno,
1602
+                    frequency_type:prescription.advices[b].frequency_type,
1603
+                    day_count:prescription.advices[b].day_count,
1604
+                    week_day:prescription.advices[b].week_day
1605
+
1606
+
1595
                   }
1607
                   }
1596
                   tempAdvice.push(obj)
1608
                   tempAdvice.push(obj)
1597
                 }
1609
                 }
1613
                     medical_code: prescription.project[b].project.medical_code,
1625
                     medical_code: prescription.project[b].project.medical_code,
1614
                     unit: prescription.project[b].project.unit,
1626
                     unit: prescription.project[b].project.unit,
1615
                     type: prescription.project[b].type,
1627
                     type: prescription.project[b].type,
1628
+                    frequency_type:prescription.project[b].frequency_type,
1629
+                    day_count:prescription.project[b].day_count,
1630
+                    week_day:prescription.project[b].week_day
1631
+
1616
                   }
1632
                   }
1617
 
1633
 
1618
                   if (prescription.project[b].type == 2) {
1634
                   if (prescription.project[b].type == 2) {