huangyw 2 years ago
parent
commit
80cc1b5fd1

+ 40 - 28
src/xt_pages/Pharmacy/DrugDispensing.vue View File

114
       </div>
114
       </div>
115
       <div class="mainRight">
115
       <div class="mainRight">
116
         <div class="titlelist">
116
         <div class="titlelist">
117
-          <!-- <div>
117
+          <div>
118
             班次:
118
             班次:
119
             <el-select
119
             <el-select
120
               v-model="shift"
120
               v-model="shift"
157
               >
157
               >
158
               </el-option>
158
               </el-option>
159
             </el-select>
159
             </el-select>
160
-          </div> -->
160
+          </div>
161
           <div>
161
           <div>
162
-            <!-- <el-button type="primary" @click="toExport" v-if="state == 2"
162
+            <el-button type="primary" @click="toExport" v-if="state == 2"
163
               >导出</el-button
163
               >导出</el-button
164
-            > -->
164
+            >
165
             <!-- <el-button type="primary" @click="tt">调试</el-button>-->
165
             <!-- <el-button type="primary" @click="tt">调试</el-button>-->
166
             <el-button type="primary" @click="dispense" v-if="state == 1"
166
             <el-button type="primary" @click="dispense" v-if="state == 1"
167
               >发药</el-button
167
               >发药</el-button
173
 
173
 
174
         <el-divider></el-divider>
174
         <el-divider></el-divider>
175
         <div class="right_table">
175
         <div class="right_table">
176
-          <!-- :summary-method="getSummaries"
177
-            show-summary -->
178
           <el-table
176
           <el-table
179
             ref="table_01"
177
             ref="table_01"
180
             :height="tableHeight"
178
             :height="tableHeight"
181
             :data="tableData"
179
             :data="tableData"
182
-            
180
+            :summary-method="getSummaries_t1"
181
+            show-summary
183
             border
182
             border
184
             highlight-current-row
183
             highlight-current-row
185
             style="width: 100%"
184
             style="width: 100%"
272
             </el-table-column>
271
             </el-table-column>
273
           </el-table>
272
           </el-table>
274
         </div>
273
         </div>
275
-        <div>
276
-          <!-- :summary-method="getSummaries"
277
-            show-summarys -->
274
+        <div class="right_table">
278
           <el-table
275
           <el-table
279
             ref="table_01"
276
             ref="table_01"
280
-            v-if="state == 2"
281
             :height="tableHeight"
277
             :height="tableHeight"
282
             :data="tableData"
278
             :data="tableData"
283
-            
279
+            :summary-method="getSummaries_t2"
280
+            show-summary
284
             border
281
             border
285
             highlight-current-row
282
             highlight-current-row
286
             style="width: 100%"
283
             style="width: 100%"
290
               color: '#606266',
287
               color: '#606266',
291
             }"
288
             }"
292
             @selection-change="handleSelectionChange"
289
             @selection-change="handleSelectionChange"
293
-            
290
+            v-if="state == 2"
294
           >
291
           >
295
             <!-- <el-table-column type="selection" width="55"> </el-table-column>-->
292
             <!-- <el-table-column type="selection" width="55"> </el-table-column>-->
296
             <el-table-column
293
             <el-table-column
502
   },
499
   },
503
 
500
 
504
   methods: {
501
   methods: {
505
-    tt() {
506
-      console.log("this.state", this.state);
507
-      console.log("this.tableData", this.tableData);
508
-      console.log("this.deliveryway", this.deliveryway);
509
-    },
502
+    tt() {},
510
     async fun3() {
503
     async fun3() {
511
-      console.log("fun3");
512
       this.fun1().then((val) => {
504
       this.fun1().then((val) => {
513
         this.fun2();
505
         this.fun2();
514
       });
506
       });
515
     },
507
     },
516
     async fun4(tps) {
508
     async fun4(tps) {
517
-      console.log("fun3", tps);
518
       this.fun1().then((val) => {
509
       this.fun1().then((val) => {
519
-        console.log("this.issued_drug", this.issued_drug);
520
         for (let i = 0; i < this.issued_drug.length; i++) {
510
         for (let i = 0; i < this.issued_drug.length; i++) {
521
           if (tps == this.issued_drug[i].id) {
511
           if (tps == this.issued_drug[i].id) {
522
             this.$refs.table02.setCurrentRow(this.issued_drug[i]);
512
             this.$refs.table02.setCurrentRow(this.issued_drug[i]);
528
     async fun5(tps) {
518
     async fun5(tps) {
529
       console.log("fun3", tps);
519
       console.log("fun3", tps);
530
       this.fun1().then((val) => {
520
       this.fun1().then((val) => {
531
-        console.log("this.issued_drug", this.waiting_drug);
532
         for (let i = 0; i < this.waiting_drug.length; i++) {
521
         for (let i = 0; i < this.waiting_drug.length; i++) {
533
           if (tps == this.waiting_drug[i].id) {
522
           if (tps == this.waiting_drug[i].id) {
534
             this.$refs.table01.setCurrentRow(this.waiting_drug[i]);
523
             this.$refs.table01.setCurrentRow(this.waiting_drug[i]);
537
         }
526
         }
538
       });
527
       });
539
     },
528
     },
540
-    getSummaries(param) {
541
-      console.log(param, "pram");
529
+    getSummaries_t1(param) {
542
       const { columns, data } = param;
530
       const { columns, data } = param;
543
       const sums = [];
531
       const sums = [];
544
       columns.forEach((column, index) => {
532
       columns.forEach((column, index) => {
555
       return sums;
543
       return sums;
556
     },
544
     },
557
 
545
 
546
+    getSummaries_t2(param) {
547
+      const { columns, data } = param;
548
+      const sums = [];
549
+      columns.forEach((column, index) => {
550
+        if (index === 0) {
551
+          sums[index] = "合计";
552
+          return;
553
+        }
554
+        if (index === 6) {
555
+          sums[index] = this.total;
556
+          return;
557
+        }
558
+      });
559
+      return sums;
560
+    },
561
+
558
     changeTimes() {
562
     changeTimes() {
559
       // alert("aa")
563
       // alert("aa")
560
       // this.getdruglist();
564
       // this.getdruglist();
1033
   },
1037
   },
1034
   updated() {
1038
   updated() {
1035
     this.$nextTick(() => {
1039
     this.$nextTick(() => {
1036
-      this.$refs["table_01"].doLayout();
1040
+      if (this.$refs["table_01"]) {
1041
+        this.$refs["table_01"].doLayout();
1042
+      } else if (this.$refs["table_02"]) {
1043
+        this.$refs["table_02"].doLayout();
1044
+      }
1037
     });
1045
     });
1038
   },
1046
   },
1039
 };
1047
 };
1076
     white-space: nowrap;
1084
     white-space: nowrap;
1077
     color: #909399;
1085
     color: #909399;
1078
     font-size: 14px;
1086
     font-size: 14px;
1087
+
1088
+    /deep/ .el-input__inner {
1089
+      font-size: 13px !important;
1090
+    }
1079
   }
1091
   }
1080
   .el-button {
1092
   .el-button {
1081
     height: 34px;
1093
     height: 34px;
1094
   overflow-y: auto;
1106
   overflow-y: auto;
1095
   overflow-x: hidden;
1107
   overflow-x: hidden;
1096
 }
1108
 }
1097
-.right_table {
1098
-  /deep/ .el-table--scrollable-x .el-table__body-wrapper {
1109
+/deep/ .right_table {
1110
+  .el-table__body-wrapper {
1099
     overflow-y: auto;
1111
     overflow-y: auto;
1100
-    overflow-x: scroll;
1112
+    overflow-x: scroll !important;
1101
   }
1113
   }
1102
   // /deep/ .el-table__footer-wrapper {
1114
   // /deep/ .el-table__footer-wrapper {
1103
   //   margin-top: -2px !important;
1115
   //   margin-top: -2px !important;

+ 7 - 4
src/xt_pages/Pharmacy/PatientDispensing.vue View File

112
       </div>
112
       </div>
113
       <div class="mainRight">
113
       <div class="mainRight">
114
         <div class="titlelist">
114
         <div class="titlelist">
115
-          <!-- <div>
115
+          <div>
116
             班次:
116
             班次:
117
             <el-select
117
             <el-select
118
               v-model="shift"
118
               v-model="shift"
141
               >
141
               >
142
               </el-option>
142
               </el-option>
143
             </el-select>
143
             </el-select>
144
-          </div> -->
144
+          </div>
145
 
145
 
146
           <div>
146
           <div>
147
-            <!-- <el-button type="primary" @click="toExport" v-if="state == 2"
147
+            <el-button type="primary" @click="toExport" v-if="state == 2"
148
               >导出</el-button
148
               >导出</el-button
149
-            > -->
149
+            >
150
 
150
 
151
             <el-button type="primary" @click="dispense" v-if="state == 1"
151
             <el-button type="primary" @click="dispense" v-if="state == 1"
152
               >发药</el-button
152
               >发药</el-button
729
     white-space: nowrap;
729
     white-space: nowrap;
730
     color: #909399;
730
     color: #909399;
731
     font-size: 14px;
731
     font-size: 14px;
732
+    /deep/ .el-input__inner {
733
+      font-size: 13px !important;
734
+    }
732
   }
735
   }
733
   .el-table {
736
   .el-table {
734
     margin-top: -13px;
737
     margin-top: -13px;