mainqaq 2 年之前
父節點
當前提交
6591826bba

+ 1 - 0
src/xt_pages/outpatientDoctorStation/batch_delete.vue 查看文件

@@ -9,6 +9,7 @@
9 9
             <el-select
10 10
               v-model="modeOptions_value"
11 11
               placeholder="请选择"
12
+              @change="getUsername"
12 13
             >
13 14
               <el-option
14 15
                 v-for="item in modeOptions"

+ 66 - 141
src/xt_pages/outpatientDoctorStation/batch_mode_template.vue 查看文件

@@ -53,6 +53,7 @@
53 53
             </el-select>
54 54
           </div>
55 55
         </div>
56
+<!--        <el-button type="primary" @click="lili">tiaoshi</el-button>-->
56 57
         <el-button type="primary" @click="save">保存</el-button>
57 58
       </div>
58 59
 
@@ -79,18 +80,21 @@
79 80
           </el-table>
80 81
         </div>
81 82
 
83
+
82 84
         <el-main>
83 85
           <el-tabs
84 86
             v-model="editableTabsValue"
85 87
             type="border-card"
88
+
86 89
             style="min-height: 70vh;"
87
-            editable
88 90
             @tab-click="dian"
89 91
             @edit="handleTabsEdit"
92
+
90 93
           >
91 94
             <el-tab-pane
92 95
               v-for="(item, index) in editableTabs"
93 96
               :key="index"
97
+              closable
94 98
               :label="item.title"
95 99
               :name="item.name"
96 100
             >
@@ -437,145 +441,13 @@
437 441
                 </el-table-column>
438 442
               </el-table>
439 443
 
440
-<!--              <el-table-->
441
-<!--                v-if="new_type == 2"-->
442
-<!--                :data="item.project"-->
443
-<!--                style="width: 100%"-->
444
-<!--                max-height="250"-->
445
-<!--              >-->
446
-<!--                <el-table-column fixed label="新增项目名称" width="250">-->
447
-<!--                  <template slot-scope="scope2">-->
448
-<!--                    <el-select-->
449
-<!--                      v-model="scope2.row.drug_name"-->
450
-<!--                      placeholder="请选择"-->
451
-<!--                      @focus="clicktmp(item.patient_value,scope2.row,item)"-->
452
-<!--                      @change="changeid2(scope2.row,scope2.$index)"-->
453
-<!--                    >-->
454
-<!--                      <el-option-->
455
-<!--                        v-for="item in tmplist"-->
456
-<!--                        :key="item.id"-->
457
-<!--                        :label="item.name"-->
458
-<!--                        :value="item.id"-->
459
-<!--                      >-->
460
-<!--                      </el-option>-->
461
-<!--                    </el-select>-->
462
-<!--                  </template>-->
463
-<!--                </el-table-column>-->
464
-<!--                <el-table-column label="组" width="120">-->
465
-<!--                  <template slot-scope="scope2" width="100">-->
466
-<!--                    {{scope2.row.translate}}-->
467
-<!--                  </template>-->
468
-<!--                </el-table-column>-->
469
-<!--                <el-table-column label="单次用量" width="120">-->
470
-<!--                  <template slot-scope="scope2">-->
471
-<!--                    <el-input-->
472
-<!--                      v-model="scope2.row.single_dose"-->
473
-<!--                      placeholder="请输入内容"-->
474
-<!--                    ></el-input>-->
475
-<!--                    {{ scope2.row.unit }}-->
476
-<!--                  </template>-->
477
-<!--                </el-table-column>-->
478
-<!--                <el-table-column label="用法" width="120">-->
479
-<!--                  <template slot-scope="scope2">-->
480
-<!--                    <el-select-->
481
-<!--                      v-model="scope2.row.delivery_way"-->
482
-<!--                      placeholder="请选择"-->
483
-<!--                    >-->
484
-<!--                      <el-option-->
485
-<!--                        v-for="item in usage"-->
486
-<!--                        :key="item.id"-->
487
-<!--                        :label="item.name"-->
488
-<!--                        :value="item.id"-->
489
-<!--                      >-->
490
-<!--                      </el-option>-->
491
-<!--                    </el-select>-->
492
-<!--                  </template>-->
493
-<!--                </el-table-column>-->
494
-<!--                <el-table-column label="频率" width="120">-->
495
-<!--                  <template slot-scope="scope2">-->
496
-<!--                    <el-select-->
497
-<!--                      v-model="scope2.row.execution_frequency"-->
498
-<!--                      placeholder="请选择"-->
499
-<!--                    >-->
500
-<!--                      <el-option-->
501
-<!--                        v-for="item in frequency"-->
502
-<!--                        :key="item.id"-->
503
-<!--                        :label="item.name"-->
504
-<!--                        :value="item.id"-->
505
-<!--                      >-->
506
-<!--                      </el-option>-->
507
-<!--                    </el-select>-->
508
-<!--                  </template>-->
509
-<!--                </el-table-column>-->
510
-<!--                <el-table-column label="天数" width="120">-->
511
-<!--                  <template slot-scope="scope2">-->
512
-<!--                    <el-input-->
513
-<!--                      v-model="scope2.row.day"-->
514
-<!--                      placeholder="请输入内容"-->
515
-<!--                    ></el-input-->
516
-<!--                    >天-->
517
-<!--                  </template>-->
518
-<!--                </el-table-column>-->
519
-<!--                <el-table-column label="总量" width="120">-->
520
-<!--                  <template slot-scope="scope2">-->
521
-<!--                    <el-input-->
522
-<!--                      v-model="scope2.row.prescribing_number"-->
523
-<!--                      placeholder="请输入内容"-->
524
-<!--                    ></el-input>-->
525
-<!--                    {{ scope.row.unit }}-->
526
-<!--                  </template>-->
527
-<!--                </el-table-column>-->
528
-<!--                <el-table-column label="单价" width="120">-->
529
-<!--                  <template slot-scope="scope2">&lt;!&ndash;:disabled="true"&ndash;&gt;-->
530
-<!--                    <el-input-->
531
-<!--                      v-model="scope2.row.price"-->
532
-<!--                    ></el-input-->
533
-<!--                    >元-->
534
-<!--                  </template>-->
535
-<!--                </el-table-column>-->
536
-<!--                <el-table-column label="备注" width="120">-->
537
-<!--                  <template slot-scope="scope2">-->
538
-<!--                    <el-input-->
539
-<!--                      v-model="scope2.row.remark"-->
540
-<!--                      placeholder=""-->
541
-<!--                    ></el-input>-->
542
-<!--                  </template>-->
543
-<!--                </el-table-column>-->
544
-<!--                <el-table-column fixed="right" label="操作" width="120">-->
545
-<!--                  <template slot-scope="scope2">-->
546
-<!--                    <el-button-->
547
-<!--                      @click.native.prevent="addopen(scope2.$index)"-->
548
-<!--                      type="text"-->
549
-<!--                      size="small">-->
550
-<!--                      推送-->
551
-<!--                    </el-button>-->
552
-<!--                    <el-button-->
553
-<!--                      @click.native.prevent="-->
554
-<!--                        addRow2(scope2.$index, item.project)-->
555
-<!--                      "-->
556
-<!--                      type="text"-->
557
-<!--                      size="small"-->
558
-<!--                    >-->
559
-<!--                      添加-->
560
-<!--                    </el-button>-->
561
-<!--                    <el-button-->
562
-<!--                      @click.native.prevent="-->
563
-<!--                        deleteRow(scope2.$index, item.project)-->
564
-<!--                      "-->
565
-<!--                      type="text"-->
566
-<!--                      size="small"-->
567
-<!--                    >-->
568
-<!--                      移除-->
569
-<!--                    </el-button>-->
570
-<!--                  </template>-->
571
-<!--                </el-table-column>-->
572
-<!--              </el-table>-->
573 444
 
574 445
             </el-tab-pane>
575
-            <el-tab-pane name="more" closable v-if="dayorMonth == 'day'"
576
-              ><span slot="label"
577
-                ><i class="el-icon-plus" @click="addTab"></i
578
-              ></span>
446
+            <el-tab-pane name="more" disabled>
447
+              <span slot="label"><i
448
+                class="el-icon-plus"
449
+                @click="addTab"
450
+              ></i></span>
579 451
             </el-tab-pane>
580 452
           </el-tabs>
581 453
         </el-main>
@@ -614,6 +486,7 @@
614 486
         <el-button type="primary" @click="baocun">确 定</el-button>
615 487
       </span>
616 488
     </el-dialog>
489
+    <div style="background-color: #f5f7fa;width: 21px;height: 22px;border: 1px none #d3dce6;position: absolute;right: 21px;top:76px;"></div><!--#f5f7fa-->
617 490
   </div>
618 491
 </template>
619 492
 <script>
@@ -814,8 +687,9 @@ export default {
814 687
 
815 688
     lili() {
816 689
       // this.$router.replace("/hisTool/prescriptionTemplate");
817
-      console.log("this.editableTabs",this.editableTabs)
818
-      console.log("this.new_type",this.new_type)
690
+      console.log("this.editableTabsValue",this.editableTabsValue)
691
+      // this.editableTabsValue = this.editableTabs[this.editableTabs.length-1].name
692
+      // console.log("length",this.editableTabs.length)
819 693
       // console.log("this.projectlist2",this.projectlist2)
820 694
       // console.log("patient_value",this.patient_value)
821 695
     },
@@ -879,6 +753,51 @@ export default {
879 753
       this.editableTabs[this.tabhang].project[this.hang].week_days = tmp
880 754
       this.dialogVisible = false
881 755
     },
756
+    addTab(){
757
+      console.log("1111")
758
+      let newTabName = ++this.tabIndex + "";
759
+      let tmp = this.editableTabs.length + 1;
760
+      this.editableTabs.push({
761
+        title: "处方" + tmp,
762
+        name: newTabName,
763
+        patient_value: 1,
764
+        tableDatas: [
765
+          {
766
+            id: "",
767
+            drug_name: "",
768
+            single_dose: "",
769
+            single_dose_unit: "",
770
+            delivery_way: "",
771
+            execution_frequency: "",
772
+            day: "",
773
+            prescribing_number: "",
774
+            prescribing_number_unit: "",
775
+            price: "",
776
+            remark: "",
777
+          },
778
+        ],
779
+        project: [
780
+          {
781
+            id: "",
782
+            drug_name: "",
783
+            single_dose: "",
784
+            unit: "",
785
+            delivery_way: "",
786
+            execution_frequency: "",
787
+            day: "",
788
+            prescribing_number: "",
789
+            price: "",
790
+            remark: "",
791
+            frequency_type:"",
792
+            day_count:"",
793
+            week_days:"",
794
+          },
795
+        ],
796
+
797
+      });
798
+      // this.editableTabsValue = newTabName;
799
+      this.editableTabsValue = this.editableTabs[this.editableTabs.length-1].name
800
+    },
882 801
     dian(tab,event){
883 802
       console.log("tabtabtabtab",tab.index)
884 803
       this.tabhang = tab.index
@@ -910,7 +829,7 @@ export default {
910 829
           this.editableTabs[this.tabhang].tableDatas[this.hang].day = res.data.data.list[0].drug_day;
911 830
           this.editableTabs[this.tabhang].tableDatas[this.hang].prescribing_number = res.data.data.list[0].prescribing_number;
912 831
           this.editableTabs[this.tabhang].tableDatas[this.hang].prescribing_number_unit = res.data.data.list[0].prescribing_number_unit;
913
-          if (res.data.data.list[0].prescribing_number_unit == res.data.data.list[0].min_unit){
832
+          if (res.data.data.list[0].prescribing_number_unit == res.data.data.list[0].min_unit || res.data.data.list[0].prescribing_number_unit == "" || res.data.data.list[0].prescribing_number_unit == null){
914 833
             this.editableTabs[this.tabhang].tableDatas[this.hang].price = res.data.data.list[0].min_price;
915 834
           }else{
916 835
             this.editableTabs[this.tabhang].tableDatas[this.hang].price = res.data.data.list[0].retail_price;
@@ -1378,4 +1297,10 @@ export default {
1378 1297
 .el-table td .cell {
1379 1298
   padding: 0 5px !important;
1380 1299
 }
1300
+.addTab {
1301
+  position: absolute;
1302
+  right: 8px;
1303
+  top: 3px;
1304
+  z-index: 20;
1305
+}
1381 1306
 </style>

+ 342 - 271
src/xt_pages/outpatientDoctorStation/batch_replacement.vue 查看文件

@@ -6,7 +6,7 @@
6 6
         <div style="width:1000px;display: flex">
7 7
           <div>
8 8
             透析模式:
9
-            <el-select v-model="modeOptions_value" placeholder="请选择">
9
+            <el-select v-model="modeOptions_value" placeholder="请选择" @change="getUsername">
10 10
               <el-option
11 11
                 v-for="item in modeOptions"
12 12
                 :key="item.id"
@@ -137,11 +137,6 @@
137 137
               </el-select>
138 138
             </template>
139 139
           </el-table-column>
140
-          <el-table-column label="组" width="120" align="center">
141
-            <template slot-scope="scope">
142
-              {{ scope.row.translate }}
143
-            </template>
144
-          </el-table-column>
145 140
           <el-table-column label="单次用量" width="200" align="center">
146 141
             <template slot-scope="scope">
147 142
               <el-input
@@ -255,6 +250,130 @@
255 250
           <!--          </el-table-column>-->
256 251
         </el-table>
257 252
       </div>
253
+      <el-table
254
+        v-if="new_type == 2"
255
+        :data="project"
256
+        style="width: 100%"
257
+        max-height="250"
258
+        border
259
+        :row-style="{ color: '#303133' }"
260
+        :header-cell-style="{
261
+            backgroundColor: 'rgb(245, 247, 250)',
262
+            color: '#606266',
263
+          }"
264
+      >
265
+        <el-table-column fixed label="替换项目名称" width="230">
266
+          <template slot-scope="scope">
267
+            <el-select
268
+              filterable
269
+              v-model="scope.row.drug_name"
270
+              placeholder="请选择"
271
+              @change="changeid2(scope.row,scope.$index)"
272
+            >
273
+              <el-option
274
+                v-for="item in projectlist"
275
+                :key="item.id"
276
+                :label="item.name"
277
+                :value="item.id"
278
+              >
279
+              </el-option>
280
+            </el-select>
281
+          </template>
282
+        </el-table-column>
283
+        <el-table-column label="组" width="120">
284
+          <template slot-scope="scope">
285
+            {{scope.row.translate}}
286
+          </template>
287
+        </el-table-column>
288
+        <el-table-column label="单次用量" width="200">
289
+          <template slot-scope="scope">
290
+            <el-input
291
+              v-model="scope.row.single_dose"
292
+              placeholder="请输入内容"
293
+            ></el-input>
294
+            {{ scope.row.unit }}
295
+          </template>
296
+        </el-table-column>
297
+        <el-table-column label="用法" width="120">
298
+          <template slot-scope="scope">
299
+            <el-select
300
+              v-model="scope.row.delivery_way"
301
+              placeholder="请选择"
302
+            >
303
+              <el-option
304
+                v-for="item in usage"
305
+                :key="item.name"
306
+                :label="item.name"
307
+                :value="item.name"
308
+              >
309
+              </el-option>
310
+            </el-select>
311
+          </template>
312
+        </el-table-column>
313
+        <el-table-column label="频率" width="120">
314
+          <template slot-scope="scope">
315
+            <el-select
316
+              v-model="scope.row.execution_frequency"
317
+              placeholder="请选择"
318
+            >
319
+              <el-option
320
+                v-for="item in frequency"
321
+                :key="item.name"
322
+                :label="item.name"
323
+                :value="item.name"
324
+              >
325
+              </el-option>
326
+            </el-select>
327
+          </template>
328
+        </el-table-column>
329
+        <el-table-column label="天数" width="110">
330
+          <template slot-scope="scope">
331
+            <el-input
332
+              v-model="scope.row.day"
333
+              placeholder="请输入"
334
+              style="width: 75px"
335
+            ></el-input>天
336
+          </template>
337
+        </el-table-column>
338
+        <el-table-column label="总量" width="200">
339
+          <template slot-scope="scope">
340
+            <el-input
341
+              v-model="scope.row.prescribing_number"
342
+              placeholder="请输入"
343
+              style="width: 75px"
344
+            ></el-input>
345
+            {{ scope.row.unit }}
346
+          </template>
347
+        </el-table-column>
348
+        <el-table-column label="单价" width="120">
349
+          <template slot-scope="scope">
350
+            <el-input v-model="scope.row.price" style="width: 80px"></el-input
351
+            >元
352
+          </template>
353
+        </el-table-column>
354
+        <el-table-column label="备注" width="120">
355
+          <template slot-scope="scope">
356
+            <el-input v-model="scope.row.remark" placeholder=""></el-input>
357
+          </template>
358
+        </el-table-column>
359
+        <!--          <el-table-column label="推送频率" width="120">-->
360
+        <!--            <template slot-scope="scope">-->
361
+        <!--              <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>-->
362
+        <!--              <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>-->
363
+        <!--              <div v-if="scope.row.frequency_type == 3">{{scope.row.week_days}}</div>-->
364
+        <!--            </template>-->
365
+        <!--          </el-table-column>-->
366
+        <!--          <el-table-column fixed="right" label="操作" width="102">-->
367
+        <!--            <template slot-scope="scope">-->
368
+        <!--              <el-button-->
369
+        <!--                @click.native.prevent="addopen(scope.$index)"-->
370
+        <!--                type="text"-->
371
+        <!--                size="small">-->
372
+        <!--                推送-->
373
+        <!--              </el-button>-->
374
+        <!--            </template>-->
375
+        <!--          </el-table-column>-->
376
+      </el-table>
258 377
     </div>
259 378
 
260 379
     <el-dialog
@@ -270,7 +389,7 @@
270 389
         <el-radio :label="3">星期频率</el-radio>
271 390
       </el-radio-group>
272 391
       <div v-if="frequency_type == 2">
273
-        <el-input style="width: 50px" v-model="day_count"></el-input>&nbsp;
392
+        <el-input style="width: 50px" v-model="day_count"></el-input>
274 393
         天/一次
275 394
       </div>
276 395
       <div v-if="frequency_type == 3">
@@ -286,10 +405,9 @@
286 405
       </div>
287 406
 
288 407
       <span slot="footer" class="dialog-footer">
289
-        <button @click="lili">调试</button>
290
-        <el-button @click="dialogVisible = false">取 消</el-button>
291
-        <el-button type="primary" @click="baocun">确 定</el-button>
292
-      </span>
408
+    <el-button @click="dialogVisible = false">取 消</el-button>
409
+    <el-button type="primary" @click="">确 定</el-button>
410
+  </span>
293 411
     </el-dialog>
294 412
   </div>
295 413
 </template>
@@ -313,95 +431,64 @@ export default {
313 431
       tableList: [],
314 432
       editableTabsValue: "1",
315 433
       modeOptions: {},
316
-      tableDatas: [
317
-        {
318
-          id: "",
319
-          drug_name: "",
320
-          single_dose: "",
321
-          single_dose_unit: "",
322
-          delivery_way: "",
323
-          execution_frequency: "",
324
-          day: "",
325
-          prescribing_number: "",
326
-          prescribing_number_unit: "",
327
-          price: "",
328
-          remark: "",
329
-        },
330
-      ], //药品
331
-      project: [
332
-        {
333
-          id: "",
334
-          drug_name: "",
335
-          translate: "",
336
-          single_dose: "",
337
-          unit: "",
338
-          delivery_way: "",
339
-          execution_frequency: "",
340
-          day: "",
341
-          prescribing_number: "",
342
-          price: "",
343
-          remark: "",
344
-          frequency_type: 1,
345
-          day_count: "",
346
-          week_days: "",
347
-        },
348
-      ], //项目
434
+      tableDatas:[{
435
+        id: "",
436
+        drug_name: "",
437
+        single_dose: "",
438
+        single_dose_unit: "",
439
+        delivery_way: "",
440
+        execution_frequency: "",
441
+        day: "",
442
+        prescribing_number: "",
443
+        prescribing_number_unit: "",
444
+        price: "",
445
+        remark: "",
446
+      },],
447
+      project:[ {
448
+        id: "",
449
+        drug_name: "",
450
+        translate:"",
451
+        single_dose: "",
452
+        unit: "",
453
+        delivery_way: "",
454
+        execution_frequency: "",
455
+        day: "",
456
+        prescribing_number: "",
457
+        price: "",
458
+        remark: "",
459
+        frequency_type:1,
460
+        day_count:"",
461
+        week_days:"",
462
+      },],//项目
349 463
       tabIndex: 2,
350 464
       modeOptions_value: 1, //透析模式
351
-      multipleSelection: [], //选中的患者
352
-      tableData: [],
353
-      options: [
354
-        { id: 1, name: "药品" },
355
-        { id: 2, name: "项目" },
356
-      ],
357
-      options_patient: [
358
-        { id: 1, name: "是" },
359
-        { id: 2, name: "否" },
360
-      ],
361
-      options_2: [
362
-        { id: 1, name: "普通门诊" },
363
-        { id: 2, name: "门诊特殊病" },
364
-      ],
365
-      new_type: 1, //新增类型
366
-      druglist: [], //药品列表
367
-      projectlist: [], //项目列表
368
-      id: "", //药品、项目、耗材
369
-      tmplist: [], //临时
370
-      unit: [
371
-        { id: 1, name: "g" },
372
-        { id: 2, name: "mg" },
373
-        { id: 3, name: "u" },
374
-        { id: 4, name: "ml" },
375
-        { id: 5, name: "万U" },
376
-        { id: 6, name: "枚" },
377
-        { id: 7, name: "粒" },
378
-        { id: 8, name: "片" },
379
-        { id: 9, name: "支" },
380
-        { id: 10, name: "μg" },
381
-        { id: 11, name: "iu" },
382
-        { id: 12, name: "包" },
383
-        { id: 13, name: "袋" },
384
-        { id: 14, name: "万" },
385
-        { id: 15, name: "万iu" },
386
-        { id: 16, name: "丸" },
387
-        { id: 17, name: "盒" },
388
-        { id: 18, name: "瓶" },
389
-        { id: 19, name: "瓶(袋)" },
390
-        { id: 20, name: "次" },
391
-      ],
392
-      usage: [], //用法
393
-      frequency: [], //频率
394
-      frequency_type: "", //周期提醒
395
-      day_count: "", //周期提醒天
396
-      week_days: [], //周期提醒星期
397
-      tabhang: 0, //tab的下标
398
-      hang: 0, //行数
399
-    };
465
+      multipleSelection: [],//选中的患者
466
+      tableData:[],
467
+      options:[{id:1,name:"药品"},{id:2,name:"项目"}],
468
+      options_patient:[{id:1,name:"是"},{id:2,name:"否"}],
469
+      options_2:[{id:1,name:"普通门诊"},{id:2,name:"门诊特殊病"}],
470
+      new_type:1,//新增类型
471
+      druglist:[],//药品列表
472
+      projectlist:[],//项目列表
473
+      id:"",//药品、项目、耗材
474
+      tmplist:[],//临时
475
+      unit:[{id:1,name:"g"},{id:2,name:"mg"},{id:3,name:"u"},{id:4,name:"ml"},{id:5,name:"万U"},{id:6,name:"枚"},{id:7,name:"粒"},
476
+        {id:8,name:"片"},{id:9,name:"支"},{id:10,name:"μg"},{id:11,name:"iu"},{id:12,name:"包"},{id:13,name:"袋"},{id:14,name:"万"},
477
+        {id:15,name:"万iu"},{id:16,name:"丸"},{id:17,name:"盒"},{id:18,name:"瓶"},{id:19,name:"瓶(袋)"},{id:20,name:"次"}],
478
+      usage:[],//用法
479
+      frequency:[],//频率
480
+      frequency_type:"",//周期提醒
481
+      day_count:"",//周期提醒天
482
+      week_days:[],//周期提醒星期
483
+      tabhang:0,//tab的下标
484
+      hang:0,//行数
485
+
486
+    }
400 487
   },
401 488
   created() {
402 489
     // console.log("this.$store.getters.treatment_mode",this.$store.getters.treatment_mode)
403 490
     for (let key in this.$store.getters.treatment_mode) {
404
-      this.modeOptions[key] = this.$store.getters.treatment_mode[key];
491
+      this.modeOptions[key] = this.$store.getters.treatment_mode[key]
405 492
     }
406 493
     // console.log("this.modeOptions",this.modeOptions)
407 494
     this.getdrugconfigs();
@@ -412,7 +499,7 @@ export default {
412 499
     const that = this;
413 500
     window.onresize = () => {
414 501
       return (() => {
415
-        window.fullHeight = document.documentElement.clientHeight;
502
+        // window.fullHeight = document.documentElement.clientHeight;
416 503
         that.fullHeight = window.fullHeight;
417 504
       })();
418 505
     };
@@ -462,27 +549,27 @@ export default {
462 549
           }
463 550
         }
464 551
       }
465
-      if (this.new_type == 1) {
466
-        if (this.druglist != null) {
467
-          for (let d1 = 0; d1 < this.druglist.length; d1++) {
468
-            if (this.id == this.druglist[d1].id) {
469
-              tmp2 = this.druglist[d1].name;
552
+      if (this.new_type == 1){
553
+        if(this.druglist != null){
554
+          for(let d1 = 0;d1 < this.druglist.length;d1++){
555
+            if(this.id == this.druglist[d1].id){
556
+              tmp2 = this.druglist[d1].name
470 557
             }
471
-            if (this.tableDatas != null) {
472
-              if (this.tableDatas[0].id == this.druglist[d1].id) {
473
-                tmp3 = this.druglist[d1].name;
558
+            if(this.tableDatas != null){
559
+              if(this.tableDatas[0].id == this.druglist[d1].id){
560
+                tmp3 = this.druglist[d1].name
474 561
               }
475 562
             }
476 563
           }
477 564
         }
478
-        if (this.druglist2 != null) {
479
-          for (let d2 = 0; d2 < this.druglist2.length; d2++) {
480
-            if (this.id == this.druglist2[d2].id) {
481
-              tmp2 = tmp2 + this.druglist2[d2].name;
565
+        if(this.druglist2 != null){
566
+          for(let d2 = 0;d2 < this.druglist2.length;d2++){
567
+            if(this.id == this.druglist2[d2].id){
568
+              tmp2 = tmp2 + this.druglist2[d2].name
482 569
             }
483
-            if (this.tableDatas != null) {
484
-              if (this.tableDatas[0].id == this.druglist2[d2].id) {
485
-                tmp3 = this.druglist2[d2].name;
570
+            if(this.tableDatas != null){
571
+              if(this.tableDatas[0].id == this.druglist2[d2].id){
572
+                tmp3 = this.druglist2[d2].name
486 573
               }
487 574
             }
488 575
           }
@@ -490,7 +577,7 @@ export default {
490 577
       }
491 578
 
492 579
       this.$confirm(
493
-        "请确定是否保存?", //注:该操作将会把所选患者的"+tmp+"透析模式中的"+tmp2+"替换为"+tmp3+",
580
+        "请确定是否保存?",//注:该操作将会把所选患者的"+tmp+"透析模式中的"+tmp2+"替换为"+tmp3+",
494 581
         "",
495 582
         {
496 583
           confirmButtonText: "确 定",
@@ -502,107 +589,99 @@ export default {
502 589
           this.$message.error("没有选中有效信息");
503 590
           return;
504 591
         }
505
-        let st = "";
506
-        for (let i = 0; i < this.multipleSelection.length; i++) {
507
-          st = st + this.multipleSelection[i].id + ",";
592
+        let st = ""
593
+        for (let i = 0;i < this.multipleSelection.length;i++){
594
+          st = st + this.multipleSelection[i].id + ","
508 595
         }
509
-        console.log("string", st);
596
+        console.log("string",st)
510 597
         let params = {
511
-          mode_id: this.modeOptions_value,
598
+          mode_id:this.modeOptions_value,
512 599
           patient_id: st,
513
-          type: this.new_type,
600
+          type:this.new_type,
514 601
           replaced: this.id,
515
-        };
602
+        }
516 603
         let data1 = {
517
-          prescriptions: this.tableDatas,
518
-        };
604
+          "prescriptions": this.tableDatas
605
+        }
519 606
         let data2 = {
520
-          prescriptions: this.project,
521
-        };
522
-        if (this.new_type == 1) {
523
-          replacesavedrug(params, data1).then((res) => {
524
-            if (res.data.state == 1) {
525
-              this.$message.success("替换成功");
526
-              this.multipleSelection = [];
527
-              this.tableData = [];
528
-              this.tableDatas = [
529
-                {
530
-                  id: "",
531
-                  drug_name: "",
532
-                  single_dose: "",
533
-                  single_dose_unit: "",
534
-                  delivery_way: "",
535
-                  execution_frequency: "",
536
-                  day: "",
537
-                  prescribing_number: "",
538
-                  prescribing_number_unit: "",
539
-                  price: "",
540
-                  remark: "",
541
-                },
542
-              ];
543
-              this.project = [
544
-                {
545
-                  id: "",
546
-                  drug_name: "",
547
-                  translate: "",
548
-                  single_dose: "",
549
-                  unit: "",
550
-                  delivery_way: "",
551
-                  execution_frequency: "",
552
-                  day: "",
553
-                  prescribing_number: "",
554
-                  price: "",
555
-                  remark: "",
556
-                  frequency_type: 1,
557
-                  day_count: "",
558
-                  week_days: "",
559
-                },
560
-              ];
561
-            } else {
562
-              this.$message.error(res.data.msg);
607
+          "prescriptions": this.project
608
+        }
609
+        if (this.new_type == 1){
610
+          replacesavedrug(params,data1).then((res) =>{
611
+            if (res.data.state == 1){
612
+              this.$message.success('替换成功')
613
+              this.multipleSelection = []
614
+              this.tableData=[]
615
+              this.tableDatas=[{
616
+                id: "",
617
+                drug_name: "",
618
+                single_dose: "",
619
+                single_dose_unit: "",
620
+                delivery_way: "",
621
+                execution_frequency: "",
622
+                day: "",
623
+                prescribing_number: "",
624
+                prescribing_number_unit: "",
625
+                price: "",
626
+                remark: "",
627
+              },];
628
+              this.project=[ {
629
+                id: "",
630
+                drug_name: "",
631
+                translate:"",
632
+                single_dose: "",
633
+                unit: "",
634
+                delivery_way: "",
635
+                execution_frequency: "",
636
+                day: "",
637
+                prescribing_number: "",
638
+                price: "",
639
+                remark: "",
640
+                frequency_type:1,
641
+                day_count:"",
642
+                week_days:"",
643
+              },];
644
+            }else{
645
+              this.$message.error(res.data.msg)
563 646
             }
564
-          });
565
-        } else {
566
-          replacesaveproject(params, data2).then((res) => {
567
-            if (res.data.state == 1) {
568
-              this.$message.success("替换成功");
569
-              this.multipleSelection = [];
570
-              this.tableData = [];
571
-              this.tableDatas = [
572
-                {
573
-                  id: "",
574
-                  drug_name: "",
575
-                  single_dose: "",
576
-                  single_dose_unit: "",
577
-                  delivery_way: "",
578
-                  execution_frequency: "",
579
-                  day: "",
580
-                  prescribing_number: "",
581
-                  prescribing_number_unit: "",
582
-                  price: "",
583
-                  remark: "",
584
-                },
585
-              ];
586
-              this.project = [
587
-                {
588
-                  id: "",
589
-                  drug_name: "",
590
-                  translate: "",
591
-                  single_dose: "",
592
-                  unit: "",
593
-                  delivery_way: "",
594
-                  execution_frequency: "",
595
-                  day: "",
596
-                  prescribing_number: "",
597
-                  price: "",
598
-                  remark: "",
599
-                  frequency_type: 1,
600
-                  day_count: "",
601
-                  week_days: "",
602
-                },
603
-              ];
604
-            } else {
605
-              this.$message.error(res.data.msg);
647
+          })
648
+        }else{
649
+          replacesaveproject(params,data2).then((res) =>{
650
+            if (res.data.state == 1){
651
+              this.$message.success('替换成功')
652
+              this.multipleSelection = []
653
+              this.tableData=[]
654
+              this.tableDatas=[{
655
+                id: "",
656
+                drug_name: "",
657
+                single_dose: "",
658
+                single_dose_unit: "",
659
+                delivery_way: "",
660
+                execution_frequency: "",
661
+                day: "",
662
+                prescribing_number: "",
663
+                prescribing_number_unit: "",
664
+                price: "",
665
+                remark: "",
666
+              },];
667
+              this.project=[ {
668
+                id: "",
669
+                drug_name: "",
670
+                translate:"",
671
+                single_dose: "",
672
+                unit: "",
673
+                delivery_way: "",
674
+                execution_frequency: "",
675
+                day: "",
676
+                prescribing_number: "",
677
+                price: "",
678
+                remark: "",
679
+                frequency_type:1,
680
+                day_count:"",
681
+                week_days:"",
682
+              },];
683
+            }else{
684
+              this.$message.error(res.data.msg)
606 685
             }
607 686
           });
608 687
         }
@@ -611,122 +690,114 @@ export default {
611 690
 
612 691
     lili() {
613 692
       // console.log("this.multipleSelection",this.multipleSelection);
614
-      console.log("this.tableDatas", this.tableDatas);
693
+      console.log("this.modeOptions_value",this.modeOptions_value)
615 694
       // console.log("this.mode",this.modeOptions_value)
616 695
       // console.log("this.projectlist2",this.projectlist2)
617 696
       // console.log("patient_value",this.patient_value)
618 697
     },
619
-    addopen(hang) {
620
-      this.hang = hang;
698
+    addopen(hang){
699
+      this.hang = hang
621 700
       //清空
622 701
       this.week_days = [];
623 702
       this.day_count = "";
624 703
       this.frequency_type = 1;
625 704
       this.dialogVisible = true;
626 705
     },
627
-    changetype() {
628
-      console.log(">>>>>>>", this.new_type);
629
-      this.id = "";
630
-      this.tableData = [];
706
+    changetype(){
707
+      console.log(">>>>>>>",this.new_type)
708
+      this.id = ""
709
+      this.tableData = []
631 710
     },
632 711
     changeid(item, index) {
633 712
       console.log("");
634 713
       item.id = item.drug_name;
635 714
       var params = {
636
-        id: item.id,
637
-      };
638
-      getdrugsinformation(params).then((res) => {
639
-        if (res.data.state == 1) {
640
-          console.log("res??", res);
715
+        id:item.id
716
+      }
717
+      getdrugsinformation(params).then((res) =>{
718
+        if (res.data.state == 1){
719
+          console.log("res??",res)
641 720
           this.tableDatas[0].single_dose = res.data.data.list[0].single_dose;
642
-          this.tableDatas[0].single_dose_unit =
643
-            res.data.data.list[0].single_dose_unit;
721
+          this.tableDatas[0].single_dose_unit = res.data.data.list[0].single_dose_unit;
644 722
           this.tableDatas[0].delivery_way = res.data.data.list[0].delivery_way;
645
-          this.tableDatas[0].execution_frequency =
646
-            res.data.data.list[0].execution_frequency;
723
+          this.tableDatas[0].execution_frequency = res.data.data.list[0].execution_frequency;
647 724
           this.tableDatas[0].day = res.data.data.list[0].drug_day;
648
-          this.tableDatas[0].prescribing_number =
649
-            res.data.data.list[0].prescribing_number;
650
-          this.tableDatas[0].prescribing_number_unit =
651
-            res.data.data.list[0].prescribing_number_unit;
652
-          if (
653
-            res.data.data.list[0].prescribing_number_unit ==
654
-            res.data.data.list[0].min_unit
655
-          ) {
725
+          this.tableDatas[0].prescribing_number = res.data.data.list[0].prescribing_number;
726
+          this.tableDatas[0].prescribing_number_unit = res.data.data.list[0].prescribing_number_unit;
727
+          if (res.data.data.list[0].prescribing_number_unit == res.data.data.list[0].min_unit || res.data.data.list[0].prescribing_number_unit == "" || res.data.data.list[0].prescribing_number_unit == null){
656 728
             this.tableDatas[0].price = res.data.data.list[0].min_price;
657
-          } else {
729
+          }else{
658 730
             this.tableDatas[0].price = res.data.data.list[0].retail_price;
659 731
           }
660 732
           this.tableDatas[0].remark = res.data.data.list[0].remark;
661 733
         }
662
-      });
734
+      })
663 735
     },
664 736
     handleSelectionChange(val) {
665 737
       this.multipleSelection = val;
666 738
     },
667
-    changeid2(item, index) {
668
-      item.id = item.drug_name;
739
+    changeid2(item,index){
740
+      item.id = item.drug_name
669 741
       var params = {
670
-        id: item.id,
671
-      };
672
-      getdrugsinformation(params).then((res) => {
673
-        if (res.data.state == 1) {
674
-          console.log("res??", res);
742
+        id:item.id
743
+      }
744
+      getdrugsinformation(params).then((res) =>{
745
+        if (res.data.state == 1){
746
+          console.log("res??",res)
675 747
           this.project[0].single_dose = res.data.data.list[0].single_dose;
676 748
           this.project[0].translate = res.data.data.list[0].translate;
677 749
           this.project[0].delivery_way = res.data.data.list[0].delivery_way;
678
-          this.project[0].execution_frequency =
679
-            res.data.data.list[0].execution_frequency;
750
+          this.project[0].execution_frequency = res.data.data.list[0].execution_frequency;
680 751
           this.project[0].day = res.data.data.list[0].day;
681
-          this.project[0].prescribing_number =
682
-            res.data.data.list[0].prescribing_number;
752
+          this.project[0].prescribing_number = res.data.data.list[0].prescribing_number;
683 753
           this.project[0].unit = res.data.data.list[0].unit;
684
-          if (res.data.data.list[0].retail_price != null) {
754
+          if (res.data.data.list[0].retail_price != null){
685 755
             this.project[0].price = res.data.data.list[0].retail_price;
686
-          } else {
756
+          }else{
687 757
             this.project[0].price = res.data.data.list[0].price;
688 758
           }
689 759
 
690 760
           this.project[0].remark = res.data.data.list[0].remark;
691 761
         }
692
-      });
762
+      })
693 763
     },
694 764
     //获取配置
695
-    getdrugconfigs() {
696
-      var params = {};
697
-      replaceconfig(params).then((res) => {
698
-        if (res.data.state == 1) {
699
-          this.druglist = res.data.data.list;
700
-          this.projectlist = res.data.data.list2;
765
+    getdrugconfigs(){
766
+      var params = {}
767
+      replaceconfig(params).then((res) =>{
768
+        if (res.data.state == 1){
769
+          this.druglist = res.data.data.list
770
+          this.projectlist = res.data.data.list2
701 771
         }
702
-      });
703
-      getmodeconfigs(params).then((res) => {
704
-        if (res.data.state == 1) {
705
-          this.frequency = res.data.data.efs;
706
-          this.usage = res.data.data.drugways;
772
+      })
773
+      getmodeconfigs(params).then((res) =>{
774
+        if (res.data.state == 1){
775
+          this.frequency = res.data.data.efs
776
+          this.usage = res.data.data.drugways
707 777
         }
708
-      });
778
+      })
709 779
     },
710
-    getUsername() {
780
+    getUsername(){
711 781
       var params = {
712 782
         id: this.id,
713
-        mode: this.modeOptions_value,
714
-      };
715
-      replacepeoplename(params).then((res) => {
716
-        if (res.data.state == 1) {
717
-          this.tableData = res.data.data.list;
783
+        mode: this.modeOptions_value
784
+      }
785
+      replacepeoplename(params).then((res) =>{
786
+        if (res.data.state == 1){
787
+          this.tableData = res.data.data.list
718 788
         }
719
-      });
789
+      })
720 790
     },
721 791
     handleClose(done) {
722
-      this.$confirm("确认关闭?")
723
-        .then((_) => {
792
+      this.$confirm('确认关闭?')
793
+        .then(_ => {
724 794
           done();
725 795
         })
726
-        .catch((_) => {});
727
-    },
728
-  },
729
-};
796
+        .catch(_ => {});
797
+    }
798
+  }
799
+
800
+}
730 801
 </script>
731 802
 
732 803
 
@@ -1214,4 +1285,4 @@ export default {
1214 1285
     padding: 0 20px;
1215 1286
   }
1216 1287
 }
1217
-</style>
1288
+</style>

+ 5 - 4
src/xt_pages/outpatientDoctorStation/components/deskPrescription.vue 查看文件

@@ -1821,7 +1821,7 @@
1821 1821
       },
1822 1822
 
1823 1823
       tabclickEvent(val) {
1824
-
1824
+        console.log("li3333333333333li")
1825 1825
         for (let i = 0; i < this.prescriptions.length; i++) {
1826 1826
           if (this.prescriptions[i].name == val.name) {
1827 1827
             this.prescription_id = this.prescriptions[i].id
@@ -2157,10 +2157,11 @@
2157 2157
       },
2158 2158
 
2159 2159
       moreState(tab, event) {
2160
+        console.log("li222222222")
2160 2161
         if (tab == 'more') {
2161 2162
           return false
2162 2163
         }
2163
-      }, 
2164
+      },
2164 2165
       open_three() {
2165 2166
         for (let i = 0; i < this.prescriptions.length; i++) {
2166 2167
           for (let b = 0; b < this.prescriptions[i].advices.length; b++) {
@@ -2658,7 +2659,7 @@
2658 2659
       },
2659 2660
       addTab(targetName) {
2660 2661
 
2661
-        console.log("this.prescriptions",this.prescriptions)
2662
+        console.log("this.prescriptionsaaaaaa",this.prescriptions)
2662 2663
         for(let i = 0; i < this.prescriptions.length; i++){
2663 2664
           if (this.prescriptions[i].is_medicine_status) {
2664 2665
             this.$message.error('处方中包含已发药处方,无法新增')
@@ -2745,7 +2746,7 @@
2745 2746
 
2746 2747
       },
2747 2748
       removeTab(targetName) {
2748
-
2749
+        console.log("1111111111111111")
2749 2750
         if (this.curPrescriptions.order_status == 2 || this.curPrescriptions.order_status == 5 || this.curPrescriptions.is_medicine_status) {
2750 2751
           this.$message.error('该处方已经结算或者记账或者已发药,无法删除')
2751 2752
           return

+ 12 - 3
src/xt_pages/outpatientDoctorStation/components/prescriptionTemplateTable.vue 查看文件

@@ -120,7 +120,11 @@
120 120
         <el-table v-if="prescription.project &&prescription.project.length > 0" :data="prescription.project" border
121 121
                   style="width: 99%;" :row-style="{ color: '#303133' }"
122 122
                   :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
123
-            <el-table-column align="center" type="index" width="40" label="序号"></el-table-column>
123
+            <el-table-column align="center" width="40" label="序号">
124
+              <template slot-scope="scope">
125
+                {{scope.$index+1}}
126
+              </template>
127
+            </el-table-column>
124 128
             <el-table-column align="center" prop="project_name" label="名称">
125 129
                 <template slot-scope="scope"><span :title="scope.row.project_name">{{ scope.row.project_name }}</span>
126 130
                 </template>
@@ -136,6 +140,7 @@
136 140
                         <el-input v-model="scope.row.single_dose" @input="getProjectSingleDose(scope)"
137 141
                                   placeholder=""></el-input>
138 142
                         <div>{{scope.row.unit}}</div>
143
+                      <div v-if="scope.row.unit == ''">{{scope.row.good_info.default_count_unit}}</div>
139 144
                     </div>
140 145
 
141 146
                 </template>
@@ -170,7 +175,7 @@
170 175
                     <div style="display:flex;align-items:center;">
171 176
                         <el-input v-model="scope.row.total" style="width:60%" placeholder=""></el-input>
172 177
                         <div>{{scope.row.unit}}</div>
173
-
178
+                      <div v-if="scope.row.unit == ''">{{scope.row.good_info.default_count_unit}}</div>
174 179
                     </div>
175 180
                 </template>
176 181
             </el-table-column>
@@ -355,6 +360,10 @@
355 360
         this.templateFormVisible = true
356 361
 
357 362
 
363
+      },
364
+      lili(data){
365
+        console.log("data",this.prescription)
366
+
358 367
       },
359 368
       createFilter(queryString) {
360 369
         return (restaurant) => {
@@ -413,7 +422,7 @@
413 422
           }
414 423
         })
415 424
 
416
-      }, 
425
+      },
417 426
       deleteDrug: function(row, index) {
418 427
 
419 428
         this.$confirm('药品删除后不可恢复,是否确认删除', '删除', {

+ 2 - 0
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue 查看文件

@@ -1288,6 +1288,7 @@
1288 1288
           this.showOne = true
1289 1289
           this.showTwo = false
1290 1290
           this.$nextTick(() => {
1291
+            console.log("lilili1111111111111111111111111111111111111111111",this.prescriptions[this.prescriptions.length - 1])
1291 1292
             this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length - 1])
1292 1293
           })
1293 1294
           this.customTabIndex = 1
@@ -1299,6 +1300,7 @@
1299 1300
           this.showTwo = true
1300 1301
           this.showOne = false
1301 1302
           this.$nextTick(() => {
1303
+            console.log("lilili1111111111111111111111111111111111111111111",this.prescriptions[this.prescriptions.length - 1])
1302 1304
             this.$refs.prescription_tables.setNewData(this.prescriptions[this.prescriptions.length - 1])
1303 1305
           })
1304 1306
           this.customTabIndex = 2