mainqaq 2 年 前
コミット
6c20a6fde5
共有2 個のファイルを変更した80 個の追加52 個の削除を含む
  1. 38 33
      src/xt_pages/Pharmacy/DrugDispensing.vue
  2. 42 19
      src/xt_pages/Pharmacy/PatientDispensing.vue

+ 38 - 33
src/xt_pages/Pharmacy/DrugDispensing.vue ファイルの表示

@@ -114,34 +114,34 @@
114 114
       </div>
115 115
       <div class="mainRight">
116 116
         <div class="titlelist">
117
-<!--          班次:-->
118
-<!--          <el-select v-model="shift" placeholder="请选择" @change="getdrugsdetails02">-->
119
-<!--            <el-option-->
120
-<!--              v-for="item in banshift"-->
121
-<!--              :key="item.value"-->
122
-<!--              :label="item.text"-->
123
-<!--              :value="item.value">-->
124
-<!--            </el-option>-->
125
-<!--          </el-select>-->
126
-<!--          分区:-->
127
-<!--          <el-select v-model="partition" placeholder="请选择" @change="getdrugsdetails">-->
128
-<!--            <el-option-->
129
-<!--              v-for="item in fen"-->
130
-<!--              :key="item.id"-->
131
-<!--              :label="item.name"-->
132
-<!--              :value="item.id">-->
133
-<!--            </el-option>-->
134
-<!--          </el-select>-->
135
-<!--          给药途径:-->
136
-<!--          <el-select v-model="deliveryway" placeholder="请选择" @change="getdruglist02">-->
137
-<!--            <el-option-->
138
-<!--              v-for="item in routeofadministration"-->
139
-<!--              :key="item.name"-->
140
-<!--              :label="item.name"-->
141
-<!--              :value="item.name">-->
142
-<!--            </el-option>-->
143
-<!--          </el-select>-->
144
-<!--          <el-button type="primary" @click="toExport" v-if="state == 2">导出</el-button>-->
117
+          班次:
118
+          <el-select v-model="shift" placeholder="请选择" @change="getdrugsdetails02">
119
+            <el-option
120
+              v-for="item in banshift"
121
+              :key="item.value"
122
+              :label="item.text"
123
+              :value="item.value">
124
+            </el-option>
125
+          </el-select>
126
+          分区:
127
+          <el-select v-model="partition" placeholder="请选择" @change="getdrugsdetails">
128
+            <el-option
129
+              v-for="item in fen"
130
+              :key="item.id"
131
+              :label="item.name"
132
+              :value="item.id">
133
+            </el-option>
134
+          </el-select>
135
+          给药途径:
136
+          <el-select v-model="deliveryway" placeholder="请选择" @change="getdruglist02">
137
+            <el-option
138
+              v-for="item in routeofadministration"
139
+              :key="item.name"
140
+              :label="item.name"
141
+              :value="item.name">
142
+            </el-option>
143
+          </el-select>
144
+          <el-button type="primary" @click="toExport" v-if="state == 2">导出</el-button>
145 145
           <!--          <el-button type="primary" @click="tt">调试</el-button>-->
146 146
           <el-button type="primary" @click="dispense" v-if="state == 1"
147 147
             >发药</el-button
@@ -347,8 +347,8 @@
347 347
             </el-table-column>
348 348
           </el-table>
349 349
         </div>
350
-<!--        <div style="background-color: #f5f7fa;display:flex;padding: 10px;justify-content:space-around;position:absolute;width:75.6%;margin-top: 27.5%;-->
351
-<!--"><div style="width: 40%;padding-left:3%">合计 </div> <div style="width: 40%;display: flex;justify-content:center;padding-left: 37%">{{total}}</div></div>-->
350
+        <div style="background-color: #f5f7fa;display:flex;padding: 10px;justify-content:space-around;position:absolute;width:75.6%;margin-top: 27.5%;
351
+"><div style="width: 40%;padding-left:3%">合计 </div> <div style="width: 40%;display: flex;justify-content:center;padding-left: 37%">{{total}}</div></div>
352 352
         <div style="margin-top: 25px" v-if="state == 1">
353 353
           领药人:
354 354
           <el-select v-model="admin_user_id" placeholder="请选择">
@@ -808,7 +808,7 @@ export default {
808 808
     },
809 809
     //获取药品列表
810 810
     getdruglist02() {
811
-      var tps = this.currentRow.id;
811
+      // var tps = this.currentRow.id;
812 812
       this.tableData = [];
813 813
       var params = {
814 814
         keyword: this.keywords,
@@ -827,10 +827,10 @@ export default {
827 827
       });
828 828
       if(this.state == 2){
829 829
         this.handleCurrentChange(this.currentRow);
830
-        this.fun5(tps);
830
+        // this.fun5(tps);
831 831
       }else{
832 832
         this.handleCurrentChange(this.currentRow);
833
-        this.fun4(tps);
833
+        // this.fun4(tps);
834 834
       }
835 835
     },
836 836
     //获取药品列表
@@ -938,6 +938,11 @@ export default {
938 938
       });
939 939
     },
940 940
     getdrugsdetails(val) {
941
+      if(this.state == 1){
942
+        val = 0
943
+      }else{
944
+        val = 1
945
+      }
941 946
       var params = {
942 947
         drug_id: this.currentRow.id,
943 948
         is_medicine: val,

+ 42 - 19
src/xt_pages/Pharmacy/PatientDispensing.vue ファイルの表示

@@ -112,25 +112,25 @@
112 112
       </div>
113 113
       <div class="mainRight">
114 114
         <div class="titlelist">
115
-<!--          班次:-->
116
-<!--          <el-select v-model="shift" placeholder="请选择" @change="searchAction">-->
117
-<!--            <el-option-->
118
-<!--              v-for="item in banshift"-->
119
-<!--              :key="item.value"-->
120
-<!--              :label="item.text"-->
121
-<!--              :value="item.value">-->
122
-<!--            </el-option>-->
123
-<!--          </el-select>-->
124
-<!--          分区:-->
125
-<!--          <el-select v-model="partition" placeholder="请选择" @change="searchAction">-->
126
-<!--            <el-option-->
127
-<!--              v-for="item in fen"-->
128
-<!--              :key="item.id"-->
129
-<!--              :label="item.name"-->
130
-<!--              :value="item.id">-->
131
-<!--            </el-option>-->
132
-<!--          </el-select>-->
133
-<!--          <el-button type="primary" @click="toExport" v-if="state == 2">导出</el-button>-->
115
+          班次:
116
+          <el-select v-model="shift" placeholder="请选择" @change="searchAction">
117
+            <el-option
118
+              v-for="item in banshift"
119
+              :key="item.value"
120
+              :label="item.text"
121
+              :value="item.value">
122
+            </el-option>
123
+          </el-select>
124
+          分区:
125
+          <el-select v-model="partition" placeholder="请选择" @change="searchAction">
126
+            <el-option
127
+              v-for="item in fen"
128
+              :key="item.id"
129
+              :label="item.name"
130
+              :value="item.id">
131
+            </el-option>
132
+          </el-select>
133
+          <el-button type="primary" @click="toExport" v-if="state == 2">导出</el-button>
134 134
           <el-button type="primary" @click="dispense" v-if="state == 1"
135 135
             >发药</el-button
136 136
           >
@@ -322,7 +322,12 @@ export default {
322 322
       })
323 323
     },
324 324
     tiaoshi() {
325
+      console.log("this.shift", this.shift);
325 326
       console.log("this.partition", this.partition);
327
+      console.log("this.waitmount_data", this.waitmount_data);
328
+      console.log("this.alreadmount_data", this.alreadmount_data);
329
+      console.log("this.waitmount", this.waitmount);
330
+      console.log("this.alreadmount", this.alreadmount);
326 331
     },
327 332
     async fun3() {
328 333
       console.log("fun3");
@@ -443,11 +448,25 @@ export default {
443 448
       waitingdrug(params).then((res) => {
444 449
         if (res.data.state == 1) {
445 450
           this.waitmount_data = res.data.data.list;
451
+          if(this.shift != 0 || this.partition != 0){
452
+            if(this.waitmount_data == null){
453
+              this.waitmount = 0
454
+            }else{
455
+              this.waitmount = this.waitmount_data.length
456
+            }
457
+          }
446 458
         }
447 459
       });
448 460
       issueddrugs(params).then((res) => {
449 461
         if (res.data.state == 1) {
450 462
           this.alreadmount_data = res.data.data.list;
463
+          if(this.shift != 0 || this.partition != 0){
464
+            if (this.alreadmount_data == null){
465
+              this.alreadmount = 0
466
+            }else{
467
+              this.alreadmount = this.alreadmount_data.length
468
+            }
469
+          }
451 470
         }
452 471
       });
453 472
     },
@@ -560,6 +579,10 @@ export default {
560 579
     searchAction() {
561 580
       this.tableData = null;
562 581
       this.getwaitmount();
582
+      if(this.shift != 0 || this.partition != 0){
583
+      }else{
584
+        this.gettodaynumber();
585
+      }
563 586
     },
564 587
 
565 588
     // 药品发药