Browse Source

hah阿凡达

28169 2 months ago
parent
commit
021ec545dc

+ 2 - 1
src/api/drug/drug_stock.js View File

@@ -679,4 +679,5 @@ export function ModityDrugCodeWarehouseInfo(data){
679 679
     method:"post",
680 680
     data:data,
681 681
   })
682
-}
682
+}
683
+

+ 2 - 1
src/xt_pages/stock/detail/print.vue View File

@@ -182,7 +182,8 @@
182 182
           type: this.$route.query.type,
183 183
           limit:this.$route.query.limit,
184 184
           page:this.$route.query.page,
185
-          good_id:this.good_id,
185
+          good_id:this.$route.query.good_id,
186
+          order_way:this.$route.query.order_way
186 187
         },
187 188
         totalPrice: 0,
188 189
         stockDatas: [],

+ 4 - 1
src/xt_pages/stock/detail/stockInDetail.vue View File

@@ -480,6 +480,7 @@ export default {
480 480
         keywords: this.searchKey,
481 481
         storehouse_id:this.storehouse_id,
482 482
         good_id:this.good_id,
483
+        order_way:0
483 484
       };
484 485
       this.cancelStockDate = [];
485 486
       const loading = this.$loading({
@@ -770,6 +771,7 @@ export default {
770 771
           page:this.page,
771 772
           keywords:this.$router.keywords,
772 773
           good_id:this.good_id,
774
+          order_way:0,
773 775
         }
774 776
       });
775 777
       }
@@ -785,7 +787,8 @@ export default {
785 787
           page:this.page,
786 788
           keywords:this.searchKey,
787 789
           storehouse_id:this.storehouse_id,
788
-          
790
+          good_id:this.good_id,
791
+          order_way:0,
789 792
         }
790 793
        });
791 794
       }

+ 4 - 0
src/xt_pages/stock/detail/stockOutDetail.vue View File

@@ -851,6 +851,8 @@ export default {
851 851
             end_time: this.end_time,
852 852
             limit:this.limit,
853 853
             page:this.page,
854
+            good_id:this.good_id,
855
+            order_way:this.order_way
854 856
           }
855 857
         });
856 858
       }
@@ -865,6 +867,8 @@ export default {
865 867
             page:this.page,
866 868
             storehouse_id:this.storehouse_id,
867 869
             keyword:this.searchKey,
870
+            good_id:this.good_id,
871
+            order_way:this.order_way
868 872
           }
869 873
         });
870 874
       }

+ 82 - 1
src/xt_pages/stock/drugs/components/drugCancelDetail.vue View File

@@ -76,6 +76,38 @@
76 76
       </div>
77 77
     </div>
78 78
 
79
+    <div  style="margin-bottom: 20px;">
80
+      <label class="title"><span class="name">药品名称</span> :</label>
81
+      <el-autocomplete
82
+          class="checkSearch"
83
+          popper-class="my-autocomplete"
84
+          v-model="drug_name"
85
+          :fetch-suggestions="querySearchAsync"
86
+          :trigger-on-focus="true"
87
+          placeholder="请输入药品名称"
88
+          @select="handleSelect"
89
+          style="width: 300px"
90
+        >
91
+          <i class="el-icon-search el-input__icon" slot="suffix"></i>
92
+          <template slot-scope="{ item }">
93
+            <div class="name">
94
+              {{
95
+                item.drug_name +
96
+                item.dose +
97
+                item.dose_unit +
98
+                "*" +
99
+                item.min_number +
100
+                item.min_unit +
101
+                "/" +
102
+                item.max_unit +
103
+                "  " +
104
+                item.manufacturer
105
+              }}
106
+            </div>
107
+          </template>
108
+      </el-autocomplete>
109
+    </div>
110
+
79 111
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
80 112
       <el-table class="eltable"
81 113
         :data="tableData"
@@ -188,6 +220,7 @@ import { uParseTime } from "@/utils/tools";
188 220
 import { fetchAllAdminUsers} from "@/api/doctor";
189 221
 import {  GetAllConfig} from "@/api/stock";
190 222
 import { getDrugCancelDetail } from "@/api/drug/drug_stock";
223
+import {  postSearchDrugList } from "@/api/data";
191 224
 export default {
192 225
   name: "cancelStockDetail",
193 226
 
@@ -260,10 +293,57 @@ export default {
260 293
       drugTypeList:[],
261 294
       dealerList:[],
262 295
       manufacturerList:[],
263
-      patientsList:[]
296
+      patientsList:[],
297
+      drug_name:"",
298
+      drug_id:0
264 299
     };
265 300
   },
266 301
   methods: {
302
+    querySearchAsync(keyword, cb) {
303
+      let key = "";
304
+      if (keyword != undefined) {
305
+        key = keyword;
306
+      }
307
+      let searchArray = [];
308
+      postSearchDrugList(key, this.storehouse_id).then((response) => {
309
+        if (response.data.state == 1) {
310
+          searchArray = response.data.data.list;
311
+
312
+          var list = response.data.data.list;
313
+
314
+          this.drugList = list;
315
+          var manufacturerList = response.data.data.manufacturerList;
316
+          this.manufacturerList = manufacturerList;
317
+          var dealerList = response.data.data.dealerList;
318
+          this.dealerList = dealerList;
319
+          for (let i = 0; i < this.drugList.length; i++) {
320
+            for (let j = 0; j < this.manufacturerList.length; j++) {
321
+              if (
322
+                this.drugList[i].manufacturer == this.manufacturerList[j].id
323
+              ) {
324
+                this.drugList[i].manufacturer =
325
+                  this.manufacturerList[j].manufacturer_name;
326
+              }
327
+            }
328
+
329
+            for (let z = 0; z < dealerList.length; z++) {
330
+              if (this.drugList[i].dealer == this.dealerList[z].id) {
331
+                this.drugList[i].dealer = this.dealerList[z].dealer_name;
332
+              }
333
+            }
334
+          }
335
+
336
+          cb(this.drugList);
337
+        } else {
338
+          cb([]);
339
+        }
340
+      });
341
+    },
342
+    handleSelect(val) {
343
+      this.drug_name = val.drug_name
344
+      this.drug_id = val.id
345
+      this.getlist()
346
+    },
267 347
     PrintAction() {
268 348
         window.sessionStorage.setItem('start_cancel_time',this.start_time)
269 349
         window.sessionStorage.setItem('end_cancel_time',this.end_time)
@@ -372,6 +452,7 @@ export default {
372 452
         keyword:this.searchKey,
373 453
         limit:this.limit,
374 454
         page:this.page,
455
+        drug_id:this.drug_id,
375 456
        }
376 457
        const loading = this.$loading({
377 458
           lock: true,

+ 89 - 2
src/xt_pages/stock/drugs/components/drugInOrder.vue View File

@@ -86,6 +86,40 @@
86 86
       >
87 87
     </div>
88 88
 
89
+    <div  style="margin-bottom: 20px;">
90
+      <label class="title"><span class="name">药品名称</span> :</label>
91
+      <el-autocomplete
92
+        class="checkSearch"
93
+        popper-class="my-autocomplete"
94
+        v-model="drug_name"
95
+        :fetch-suggestions="querySearchAsync"
96
+        :trigger-on-focus="true"
97
+        placeholder="请输入药品名称"
98
+        @select="handleSelect"
99
+        style="width: 300px"
100
+      >
101
+        <i class="el-icon-search el-input__icon" slot="suffix"></i>
102
+        <template slot-scope="{ item }">
103
+          <div class="name">
104
+            {{
105
+              item.drug_name +
106
+              item.dose +
107
+              item.dose_unit +
108
+              "*" +
109
+              item.min_number +
110
+              item.min_unit +
111
+              "/" +
112
+              item.max_unit +
113
+              "  " +
114
+              item.manufacturer
115
+            }}
116
+          </div>
117
+        </template>
118
+      </el-autocomplete>
119
+    
120
+    </div>
121
+   
122
+
89 123
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
90 124
       <el-table class="eltable"
91 125
         :data="cancelStockDate"
@@ -219,6 +253,7 @@ import { uParseTime } from "@/utils/tools";
219 253
 import { fetchAllAdminUsers } from "@/api/doctor";
220 254
 import { GetAllConfig } from "@/api/stock";
221 255
 import { getDrugIndetail,getDrugWarehouseInfoPrint,ModityDrugCodeWarehouseInfo} from "@/api/drug/drug_stock"
256
+import {  postSearchDrugList } from "@/api/data";
222 257
 export default {
223 258
   name: "stockInDetail",
224 259
 
@@ -302,9 +337,60 @@ export default {
302 337
       currentIndex:0,
303 338
       textarea:"",
304 339
       id:0,
340
+      drug_name:"",
341
+      drug_id:0,
305 342
     };
306 343
   },
307 344
   methods: {
345
+    querySearchAsync(keyword, cb) {
346
+      let key = "";
347
+      if (keyword != undefined) {
348
+        key = keyword;
349
+      }
350
+      let searchArray = [];
351
+      postSearchDrugList(key, this.storehouse_id).then((response) => {
352
+        if (response.data.state == 1) {
353
+          searchArray = response.data.data.list;
354
+
355
+          var list = response.data.data.list;
356
+
357
+          this.drugList = list;
358
+          var manufacturerList = response.data.data.manufacturerList;
359
+          this.manufacturerList = manufacturerList;
360
+          var dealerList = response.data.data.dealerList;
361
+          this.dealerList = dealerList;
362
+          for (let i = 0; i < this.drugList.length; i++) {
363
+            for (let j = 0; j < this.manufacturerList.length; j++) {
364
+              if (
365
+                this.drugList[i].manufacturer == this.manufacturerList[j].id
366
+              ) {
367
+                this.drugList[i].manufacturer =
368
+                  this.manufacturerList[j].manufacturer_name;
369
+              }
370
+            }
371
+
372
+            for (let z = 0; z < dealerList.length; z++) {
373
+              if (this.drugList[i].dealer == this.dealerList[z].id) {
374
+                this.drugList[i].dealer = this.dealerList[z].dealer_name;
375
+              }
376
+            }
377
+          }
378
+
379
+          cb(this.drugList);
380
+        } else {
381
+          cb([]);
382
+        }
383
+      });
384
+    },
385
+    changeDrugName(val) {
386
+      this.currentIndex = val;
387
+    },
388
+    handleSelect(val) {
389
+      this.drug_name = val.drug_name
390
+      this.drug_id = val.id
391
+      this.getlist()
392
+      this.getDrugWarehouseInfoPrint()
393
+    },
308 394
     changeText(event){
309 395
       // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
310 396
       if (event.key === 'Enter') {
@@ -327,7 +413,6 @@ export default {
327 413
            id:this.id,
328 414
            drug_code:this.textarea,
329 415
         }
330
-        // console.log("params=-==---",params)
331 416
        ModityDrugCodeWarehouseInfo(params).then(response=>{
332 417
           if(response.data.state == 1){
333 418
             var info =  response.data.data.info
@@ -445,6 +530,7 @@ export default {
445 530
         limit:this.limit,
446 531
         page:this.page,
447 532
         storehouse_id:this.storehouse_id,
533
+        drug_id:this.drug_id,
448 534
        }
449 535
        const loading = this.$loading({
450 536
           lock: true,
@@ -536,6 +622,7 @@ export default {
536 622
         end_time:this.end_time,
537 623
         order_type:this.order_type,
538 624
         storehouse_id:this.storehouse_id,
625
+        drug_id:this.drug_id,
539 626
       }
540 627
     
541 628
      getDrugWarehouseInfoPrint(params).then(response=>{
@@ -551,7 +638,7 @@ export default {
551 638
     PrintAction(){
552 639
       window.sessionStorage.setItem('drug_start_in_time',this.start_time)
553 640
       window.sessionStorage.setItem('drug_end_in_time',this.end_time)
554
-      this.$router.push("/stock/drugprint?start_time="+this.start_time+"&end_time="+this.end_time+"&order_type="+this.order_type+"&manufacturer_id="+this.manufacturer_id+"&keyword="+this.keyword+"&limit="+this.limit+"&page="+this.page)
641
+      this.$router.push("/stock/drugprint?start_time="+this.start_time+"&end_time="+this.end_time+"&order_type="+this.order_type+"&manufacturer_id="+this.manufacturer_id+"&keyword="+this.keyword+"&limit="+this.limit+"&page="+this.page+"&drug_id="+this.drug_id)
555 642
     },
556 643
     select(){
557 644
 

+ 108 - 4
src/xt_pages/stock/drugs/components/drugOutDetail.vue View File

@@ -102,6 +102,48 @@
102 102
 
103 103
     </div>
104 104
 
105
+    <div  style="margin-bottom: 20px;">
106
+      <label class="title"><span class="name">药品名称</span> :</label>
107
+        <el-autocomplete
108
+          class="checkSearch"
109
+          popper-class="my-autocomplete"
110
+          v-model="drug_name"
111
+          :fetch-suggestions="querySearchAsync"
112
+          :trigger-on-focus="true"
113
+          placeholder="请输入药品名称"
114
+          @select="handleSelect"
115
+          style="width: 300px"
116
+        >
117
+          <i class="el-icon-search el-input__icon" slot="suffix"></i>
118
+          <template slot-scope="{ item }">
119
+            <div class="name">
120
+              {{
121
+                item.drug_name +
122
+                item.dose +
123
+                item.dose_unit +
124
+                "*" +
125
+                item.min_number +
126
+                item.min_unit +
127
+                "/" +
128
+                item.max_unit +
129
+                "  " +
130
+                item.manufacturer
131
+              }}
132
+            </div>
133
+          </template>
134
+        </el-autocomplete>
135
+
136
+        <label class="title"><span class="name">出库方式</span> : </label>
137
+        <el-select size="small" v-model="order_way" filterable placeholder="请选择仓库" style="width:200px" @change="changeOrderWayList">
138
+              <el-option
139
+                v-for="(option, index) in orderWay"
140
+                :key="index"
141
+                :label="option.label"
142
+                :value="option.value">
143
+              </el-option>
144
+          </el-select>
145
+   </div>
146
+
105 147
 
106 148
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
107 149
       <el-table class="eltable"
@@ -228,7 +270,8 @@ import { uParseTime } from "@/utils/tools";
228 270
 import { fetchAllAdminUsers } from "@/api/doctor";
229 271
 import {GetAllConfig } from "@/api/stock";
230 272
 import {getDrugOutDetail,getDrugOutOrderPrint } from "@/api/drug/drug_stock"
231
- import {getBaseDrugLibList} from '@/api/data'
273
+import {getBaseDrugLibList} from '@/api/data'
274
+import {  postSearchDrugList } from "@/api/data";
232 275
 export default {
233 276
   name: "stockOutDetail",
234 277
 
@@ -281,7 +324,11 @@ export default {
281 324
       manufacturer_id: "",
282 325
       dealer_id: "",
283 326
       order_type:"",
284
-
327
+      orderWay:[
328
+        {value:0,label:"全部"},
329
+        {value:1,label:"手动出库"},
330
+        {value:2,label:"自动出库"},
331
+      ],
285 332
       searchKey: "",
286 333
       type: 2,
287 334
       page: 1,
@@ -311,10 +358,63 @@ export default {
311 358
       houseList:[],
312 359
       dealerList:[],
313 360
       manufacturerList:[],
314
-      patientsList:[]
361
+      patientsList:[],
362
+      drug_name:"",
363
+      drug_id:0,
364
+      order_way:"",
315 365
     };
316 366
   },
317 367
   methods: {
368
+    changeOrderWayList(){
369
+      this.getlist()
370
+      this.getDrugOutOrderPrint()
371
+    },
372
+    querySearchAsync(keyword, cb) {
373
+      let key = "";
374
+      if (keyword != undefined) {
375
+        key = keyword;
376
+      }
377
+      let searchArray = [];
378
+      postSearchDrugList(key, this.storehouse_id).then((response) => {
379
+        if (response.data.state == 1) {
380
+          searchArray = response.data.data.list;
381
+
382
+          var list = response.data.data.list;
383
+
384
+          this.drugList = list;
385
+          var manufacturerList = response.data.data.manufacturerList;
386
+          this.manufacturerList = manufacturerList;
387
+          var dealerList = response.data.data.dealerList;
388
+          this.dealerList = dealerList;
389
+          for (let i = 0; i < this.drugList.length; i++) {
390
+            for (let j = 0; j < this.manufacturerList.length; j++) {
391
+              if (
392
+                this.drugList[i].manufacturer == this.manufacturerList[j].id
393
+              ) {
394
+                this.drugList[i].manufacturer =
395
+                  this.manufacturerList[j].manufacturer_name;
396
+              }
397
+            }
398
+
399
+            for (let z = 0; z < dealerList.length; z++) {
400
+              if (this.drugList[i].dealer == this.dealerList[z].id) {
401
+                this.drugList[i].dealer = this.dealerList[z].dealer_name;
402
+              }
403
+            }
404
+          }
405
+
406
+          cb(this.drugList);
407
+        } else {
408
+          cb([]);
409
+        }
410
+      });
411
+    },
412
+    handleSelect(val) {
413
+      this.drug_name = val.drug_name
414
+      this.drug_id = val.id
415
+      this.getlist()
416
+      this.getDrugOutOrderPrint()
417
+    },
318 418
     changeType: function(val) {
319 419
       this.order_type = val;
320 420
       this.getlist()
@@ -445,7 +545,7 @@ export default {
445 545
     PrintAction: function() {
446 546
       //  window.sessionStorage.setItem('start_out_time',this.start_time)
447 547
       //  window.sessionStorage.setItem('end_out_time',this.end_time)
448
-       this.$router.push("/stock/drugoutorderprint?start_time="+this.start_time+"&end_time="+this.end_time+"&order_type="+2+"&manufacturer_id="+this.manufacturer_id+"&keyword="+this.keyword+"&limit="+this.limit+"&page="+this.page+"&storehouse_id="+this.storehouse_id)
548
+       this.$router.push("/stock/drugoutorderprint?start_time="+this.start_time+"&end_time="+this.end_time+"&order_type="+2+"&manufacturer_id="+this.manufacturer_id+"&keyword="+this.keyword+"&limit="+this.limit+"&page="+this.page+"&storehouse_id="+this.storehouse_id+"&drug_id="+this.drug_id+"&order_way="+this.order_way)
449 549
     },
450 550
     getlist(){
451 551
       var params = {
@@ -457,6 +557,8 @@ export default {
457 557
          page:this.page,
458 558
          limit:this.limit,
459 559
          storehouse_id:this.storehouse_id,
560
+         drug_id:this.drug_id,
561
+         order_way:this.order_way,
460 562
       }
461 563
       const loading = this.$loading({
462 564
           lock: true,
@@ -974,6 +1076,8 @@ export default {
974 1076
          end_time:this.end_time,
975 1077
          order_type:2,
976 1078
          storehouse_id:this.storehouse_id,
1079
+         drug_id:this.drug_id,
1080
+         order_way:this.order_way,
977 1081
       }
978 1082
      getDrugOutOrderPrint(params).then(response=>{
979 1083
         if(response.data.state == 1){

+ 4 - 0
src/xt_pages/stock/drugs/drugOutOrderPrint.vue View File

@@ -140,6 +140,8 @@
140 140
         limit:this.$route.query.limit,
141 141
         page:this.$route.query.page,
142 142
         storehouse_id:this.$route.query.storehouse_id,
143
+        drug_id:this.$route.query.drug_id,
144
+        order_way:this.$route.query.order_way,
143 145
         cancelStockDate:[],
144 146
         drugList:[],
145 147
         org_id:0,
@@ -232,6 +234,8 @@
232 234
           end_time:this.end_time,
233 235
           order_type:parseInt(this.order_type),
234 236
           storehouse_id:parseInt(this.storehouse_id),
237
+          drug_id:this.drug_id,
238
+          order_way:this.order_way
235 239
         }
236 240
       
237 241
         getDrugOutOrderPrint(params).then(response=>{

+ 2 - 0
src/xt_pages/stock/drugs/drugPrint.vue View File

@@ -119,6 +119,7 @@
119 119
         keyword:this.$route.query.keyword,
120 120
         limit:this.$route.query.limit,
121 121
         page:this.$route.query.page,
122
+        drug_id:this.$route.query.drug_id,
122 123
         cancelStockDate:[],
123 124
         minCount:[],
124 125
       }
@@ -233,6 +234,7 @@
233 234
           start_time:this.start_time,
234 235
           end_time:this.end_time,
235 236
           order_type:this.order_type,
237
+          drug_id:this.drug_id
236 238
          }
237 239
          console.log("params2222",params)
238 240
         getDrugWarehouseInfoPrint(params).then(response=>{