소스 검색

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

csx 3 년 전
부모
커밋
6dbdc08a11

+ 2 - 0
src/xt_pages/hospitalStation/components/chargeDialog.vue 파일 보기

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

+ 2 - 0
src/xt_pages/outpatientCharges/components/chargeDialog.vue 파일 보기

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

+ 254 - 122
src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue 파일 보기

@@ -1,20 +1,33 @@
1 1
 <template>
2
+
2 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 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 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 17
             </el-table-column>
9 18
 
10 19
             <el-table-column align="center" prop="single_dose" width="120" label="单次用量">
11 20
                 <template slot-scope="scope">
12 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 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 31
                         </el-select>
19 32
                     </div>
20 33
                 </template>
@@ -48,7 +61,8 @@
48 61
             <el-table-column align="center" prop="day" width="70" label="天数">
49 62
                 <template slot-scope="scope">
50 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 66
                     </div>
53 67
                 </template>
54 68
             </el-table-column>
@@ -56,11 +70,15 @@
56 70
             <el-table-column align="center" prop="prescribing_number" width="120" label="总量">
57 71
                 <template slot-scope="scope">
58 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 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 82
                         </el-select>
65 83
                     </div>
66 84
                 </template>
@@ -79,28 +97,46 @@
79 97
                     <el-input v-model="scope.row.remark" :title="scope.row.remark" placeholder=""></el-input>
80 98
                 </template>
81 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 111
             <el-table-column align="center" width="40" prop="name" label="操作">
83 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 116
                 </template>
86 117
             </el-table-column>
87 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 122
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
91 123
             <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
92 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 127
             </el-table-column>
95 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 132
             </el-table-column>
98 133
             <el-table-column align="center" prop="single_dose" width="80" label="单次用量">
99 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 141
                 </template>
106 142
             </el-table-column>
@@ -123,7 +159,8 @@
123 159
             <el-table-column align="center" prop="number_days" width="70" label="天数">
124 160
                 <template slot-scope="scope">
125 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 164
                         <div>{{'天'}}</div>
128 165
                     </div>
129 166
                 </template>
@@ -140,8 +177,8 @@
140 177
             <el-table-column align="center" prop="name" width="70" label="单价">
141 178
                 <template slot-scope="scope">
142 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 182
                     </div>
146 183
 
147 184
                 </template>
@@ -151,9 +188,22 @@
151 188
                     <el-input v-model="scope.row.remark" :title="scope.row.remark"></el-input>
152 189
                 </template>
153 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 199
             <el-table-column align="center" width="40" prop="name" label="操作">
155 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 207
                 </template>
158 208
             </el-table-column>
159 209
         </el-table>
@@ -170,36 +220,91 @@
170 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 272
     </div>
175 273
 </template>
176 274
 
177 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 280
   export default {
183 281
     props: {
184 282
       preDrugs: Array,
185 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 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 298
     data() {
201 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 308
         tableData: [],
204 309
         newoptions: [{
205 310
           value: '1',
@@ -218,18 +323,43 @@
218 323
           label: '5'
219 324
         }],
220 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 356
       createFilter(queryString) {
227 357
         return (restaurant) => {
228 358
           return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
229 359
         }
230 360
       },
231 361
       querySearch2(queryString, cb) {
232
-        var restaurants = this.getDictionaryDataConfig("system","project_use")
362
+        var restaurants = this.getDictionaryDataConfig('system', 'project_use')
233 363
         restaurants.map(item => {
234 364
           item.value = item.name
235 365
         })
@@ -237,18 +367,18 @@
237 367
         // 调用 callback 返回建议列表的数据
238 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 375
         }).then(() => {
246
-          this.$nextTick(function(){
247
-            if(addition.id == 0){
376
+          this.$nextTick(function() {
377
+            if (addition.id == 0) {
248 378
               this.prescription.addition.splice(index, 1)
249
-            }else{
379
+            } else {
250 380
               let params = {
251
-                'id': addition.id,
381
+                'id': addition.id
252 382
               }
253 383
               delHisAddition(params).then(response => {
254 384
                 if (response.data.state == 0) {
@@ -262,13 +392,14 @@
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 403
         getInitData().then(response => {
273 404
           if (response.data.state == 0) {
274 405
             this.$message.error(response.data.msg)
@@ -279,19 +410,19 @@
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 419
         }).then(() => {
289
-          this.$nextTick(function(){
290
-            if(row.advice_id == 0){
420
+          this.$nextTick(function() {
421
+            if (row.advice_id == 0) {
291 422
               this.prescription.advices.splice(index, 1)
292
-            }else{
423
+            } else {
293 424
               let params = {
294
-                'id': row.advice_id,
425
+                'id': row.advice_id
295 426
               }
296 427
               delHisPrescriptionAdviceTemplate(params).then(response => {
297 428
                 if (response.data.state == 0) {
@@ -305,20 +436,15 @@
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 448
         if (!source && typeof source !== 'object') {
323 449
           throw new Error('error arguments', 'shallowClone')
324 450
         }
@@ -333,7 +459,7 @@
333 459
         return targetObj
334 460
       },
335 461
 
336
-      setNewData:function(data){
462
+      setNewData: function(data) {
337 463
         this.prescription = data
338 464
 
339 465
         // this.prescription.advices = data.advices
@@ -341,41 +467,41 @@
341 467
       getDictionaryDataConfig(module, filed_name) {
342 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 476
             name = statistics_category[i].name
351 477
           }
352 478
         }
353 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 483
           this.$message.error('该处方已经结算,无法删除')
358 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 490
         }).then(() => {
365
-          if(row.id == 0){
491
+          if (row.id == 0) {
366 492
             this.prescription.project.splice(i, 1)
367 493
 
368
-          }else{
494
+          } else {
369 495
             let params = {
370
-              'id': row.id,
496
+              'id': row.id
371 497
             }
372 498
             delHisPrescriptionProjectTemplate(params).then(response => {
373 499
               if (response.data.state == 0) {
374 500
                 this.$message.error(response.data.msg)
375 501
                 return false
376 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 505
                     this.prescription.project.splice(i, 1)
380 506
                   }
381 507
                 }
@@ -384,28 +510,29 @@
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 520
             console.log(1)
394 521
             scope.row.prescribing_number = scope.row.single_dose * this.getNum(scope.row.execution_frequency) * scope.row.day
395
-          }else{
522
+          } else {
396 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 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 531
             console.log(1234)
405 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 536
           scope.row.prescribing_number = 1
410 537
         }
411 538
         // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
@@ -419,9 +546,9 @@
419 546
         //   }
420 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 552
         // if(scope.row.prescribing_number_unit == scope.row.drug.min_unit){
426 553
         //   if(parseInt(scope.row.prescribing_number) > scope.row.drug.total){
427 554
         //     this.$message.error(scope.row.drug_name + '库存不足')
@@ -432,29 +559,29 @@
432 559
         //   }
433 560
         // }
434 561
       },
435
-      getSingleDose(scope){
562
+      getSingleDose(scope) {
436 563
         this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
437 564
       },
438
-      getDay(scope){
565
+      getDay(scope) {
439 566
         this.prescription.advices[scope.$index].prescribing_number = scope.row.single_dose * scope.row.day
440 567
       },
441
-      getProjectSingleDose(scope){
568
+      getProjectSingleDose(scope) {
442 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 571
           this.prescription.project[scope.$index].total = 1
445 572
         }
446 573
       },
447
-      getProjectDay(scope){
574
+      getProjectDay(scope) {
448 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 577
           this.prescription.project[scope.$index].total = 1
451 578
         }
452 579
       }
453
-    },mounted(){
580
+    }, mounted() {
454 581
       this.getInitData()
455 582
 
456 583
     },
457
-    watch:{
584
+    watch: {
458 585
       // "prescription.advices":{
459 586
       //   handler(newVal,oldVal){
460 587
       //     newVal.map(item => {
@@ -463,7 +590,6 @@
463 590
       //         item.total = item.single_dose * item.number_days
464 591
       //       }
465 592
 
466
-
467 593
       //     })
468 594
       //   },
469 595
       //   deep:true
@@ -486,31 +612,37 @@
486 612
 
487 613
 <style lang="scss">
488 614
     .prescriptionTable {
489
-    .el-input__inner{
615
+
616
+    .el-input__inner {
490 617
         padding: 0 5px;
491 618
     }
492
-    .additionalBox{
619
+
620
+    .additionalBox {
493 621
         margin-top: 20px;
494 622
         display: flex;
495 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 628
         display: flex;
500 629
         align-items: center;
501
-    >span{
630
+
631
+    > span {
502 632
         white-space: nowrap;
503 633
         overflow: hidden;
504 634
         text-overflow: ellipsis;
505
-        width:80px;
635
+        width: 80px;
506 636
         display: inline-block;
507 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 647
     .el-table th .cell, .el-table td .cell {
516 648
         padding: 0 2px;

+ 60 - 0
src/xt_pages/outpatientDoctorStation/doctorDesk.vue 파일 보기

@@ -1317,6 +1317,16 @@
1317 1317
 
1318 1318
             return false
1319 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 1330
             this.patientid = val.id
1321 1331
             this.isloading = false
1322 1332
 
@@ -1705,6 +1715,16 @@
1705 1715
                   this.$message.error(response.data.msg)
1706 1716
                   return false
1707 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 1728
                   this.prescriptions = []
1709 1729
 
1710 1730
                   this.month_prescriptions = []
@@ -2189,6 +2209,16 @@
2189 2209
                   this.$message.error(response.data.msg)
2190 2210
                   return false
2191 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 2222
                   this.prescriptions = []
2193 2223
 
2194 2224
                   this.month_prescriptions = []
@@ -2652,6 +2682,16 @@
2652 2682
                 this.$message.error(response.data.msg)
2653 2683
                 return false
2654 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 2695
                 this.prescriptions = []
2656 2696
 
2657 2697
                 this.month_prescriptions = []
@@ -3173,6 +3213,16 @@
3173 3213
                   this.$message.error(response.data.msg)
3174 3214
                   return false
3175 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 3226
                   for (let i = 0; i < this.all_data.length; i++) {
3177 3227
                     if (this.all_data[i].id == val.id) {
3178 3228
                       this.oldCurrentRow = this.all_data[i]
@@ -3731,6 +3781,16 @@
3731 3781
                   this.$message.error(response.data.msg)
3732 3782
                   return false
3733 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 3794
                   this.prescriptions = []
3735 3795
 
3736 3796
                   this.month_prescriptions = []

+ 28 - 12
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue 파일 보기

@@ -452,6 +452,8 @@
452 452
             this.prescriptions[i].advices[b].prescribing_number = this.prescriptions[i].advices[b].prescribing_number.toString()
453 453
             this.prescriptions[i].advices[b].retail_price = this.prescriptions[i].advices[b].retail_price.toString()
454 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,8 +1463,15 @@
1461 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 1472
             if (temp.length > 0) {
1465 1473
               for (let b = 0; b < temp.length; b++) {
1474
+                let temp_index = b + 1
1466 1475
                 let obj = {
1467 1476
                   advice_id: 0,
1468 1477
                   id: temp[b].id,
@@ -1477,7 +1486,11 @@
1477 1486
                   single_dose_unit: temp[b].dose_unit,
1478 1487
                   prescribing_number_unit: temp[b].prescribing_number_unit,
1479 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 1496
                 if (obj.prescribing_number == 0 || obj.prescribing_number.length == 0) {
@@ -1488,16 +1501,6 @@
1488 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 1505
             if (temp2.length > 0) {
1503 1506
               for (let b = 0; b < temp2.length; b++) {
@@ -1516,6 +1519,9 @@
1516 1519
                   medical_code: temp2[b].medical_code,
1517 1520
                   unit: temp2[b].unit,
1518 1521
                   type: temp2[b].type,
1522
+                  frequency_type:1,
1523
+                  day_count:0,
1524
+                  week_day:"",
1519 1525
                 }
1520 1526
                 if (temp2[b].type == 2){
1521 1527
                   obj['project'] = temp2[b].project
@@ -1591,7 +1597,13 @@
1591 1597
                     prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
1592 1598
                     medical_insurance_number: prescription.advices[b].med_list_codg,
1593 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 1608
                   tempAdvice.push(obj)
1597 1609
                 }
@@ -1613,6 +1625,10 @@
1613 1625
                     medical_code: prescription.project[b].project.medical_code,
1614 1626
                     unit: prescription.project[b].project.unit,
1615 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 1634
                   if (prescription.project[b].type == 2) {