28169 4 mesi fa
parent
commit
021ec545dc

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

679
     method:"post",
679
     method:"post",
680
     data:data,
680
     data:data,
681
   })
681
   })
682
-}
682
+}
683
+

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

182
           type: this.$route.query.type,
182
           type: this.$route.query.type,
183
           limit:this.$route.query.limit,
183
           limit:this.$route.query.limit,
184
           page:this.$route.query.page,
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
         totalPrice: 0,
188
         totalPrice: 0,
188
         stockDatas: [],
189
         stockDatas: [],

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

480
         keywords: this.searchKey,
480
         keywords: this.searchKey,
481
         storehouse_id:this.storehouse_id,
481
         storehouse_id:this.storehouse_id,
482
         good_id:this.good_id,
482
         good_id:this.good_id,
483
+        order_way:0
483
       };
484
       };
484
       this.cancelStockDate = [];
485
       this.cancelStockDate = [];
485
       const loading = this.$loading({
486
       const loading = this.$loading({
770
           page:this.page,
771
           page:this.page,
771
           keywords:this.$router.keywords,
772
           keywords:this.$router.keywords,
772
           good_id:this.good_id,
773
           good_id:this.good_id,
774
+          order_way:0,
773
         }
775
         }
774
       });
776
       });
775
       }
777
       }
785
           page:this.page,
787
           page:this.page,
786
           keywords:this.searchKey,
788
           keywords:this.searchKey,
787
           storehouse_id:this.storehouse_id,
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 Vedi File

851
             end_time: this.end_time,
851
             end_time: this.end_time,
852
             limit:this.limit,
852
             limit:this.limit,
853
             page:this.page,
853
             page:this.page,
854
+            good_id:this.good_id,
855
+            order_way:this.order_way
854
           }
856
           }
855
         });
857
         });
856
       }
858
       }
865
             page:this.page,
867
             page:this.page,
866
             storehouse_id:this.storehouse_id,
868
             storehouse_id:this.storehouse_id,
867
             keyword:this.searchKey,
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 Vedi File

76
       </div>
76
       </div>
77
     </div>
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
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
111
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
80
       <el-table class="eltable"
112
       <el-table class="eltable"
81
         :data="tableData"
113
         :data="tableData"
188
 import { fetchAllAdminUsers} from "@/api/doctor";
220
 import { fetchAllAdminUsers} from "@/api/doctor";
189
 import {  GetAllConfig} from "@/api/stock";
221
 import {  GetAllConfig} from "@/api/stock";
190
 import { getDrugCancelDetail } from "@/api/drug/drug_stock";
222
 import { getDrugCancelDetail } from "@/api/drug/drug_stock";
223
+import {  postSearchDrugList } from "@/api/data";
191
 export default {
224
 export default {
192
   name: "cancelStockDetail",
225
   name: "cancelStockDetail",
193
 
226
 
260
       drugTypeList:[],
293
       drugTypeList:[],
261
       dealerList:[],
294
       dealerList:[],
262
       manufacturerList:[],
295
       manufacturerList:[],
263
-      patientsList:[]
296
+      patientsList:[],
297
+      drug_name:"",
298
+      drug_id:0
264
     };
299
     };
265
   },
300
   },
266
   methods: {
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
     PrintAction() {
347
     PrintAction() {
268
         window.sessionStorage.setItem('start_cancel_time',this.start_time)
348
         window.sessionStorage.setItem('start_cancel_time',this.start_time)
269
         window.sessionStorage.setItem('end_cancel_time',this.end_time)
349
         window.sessionStorage.setItem('end_cancel_time',this.end_time)
372
         keyword:this.searchKey,
452
         keyword:this.searchKey,
373
         limit:this.limit,
453
         limit:this.limit,
374
         page:this.page,
454
         page:this.page,
455
+        drug_id:this.drug_id,
375
        }
456
        }
376
        const loading = this.$loading({
457
        const loading = this.$loading({
377
           lock: true,
458
           lock: true,

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

86
       >
86
       >
87
     </div>
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
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
123
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
90
       <el-table class="eltable"
124
       <el-table class="eltable"
91
         :data="cancelStockDate"
125
         :data="cancelStockDate"
219
 import { fetchAllAdminUsers } from "@/api/doctor";
253
 import { fetchAllAdminUsers } from "@/api/doctor";
220
 import { GetAllConfig } from "@/api/stock";
254
 import { GetAllConfig } from "@/api/stock";
221
 import { getDrugIndetail,getDrugWarehouseInfoPrint,ModityDrugCodeWarehouseInfo} from "@/api/drug/drug_stock"
255
 import { getDrugIndetail,getDrugWarehouseInfoPrint,ModityDrugCodeWarehouseInfo} from "@/api/drug/drug_stock"
256
+import {  postSearchDrugList } from "@/api/data";
222
 export default {
257
 export default {
223
   name: "stockInDetail",
258
   name: "stockInDetail",
224
 
259
 
302
       currentIndex:0,
337
       currentIndex:0,
303
       textarea:"",
338
       textarea:"",
304
       id:0,
339
       id:0,
340
+      drug_name:"",
341
+      drug_id:0,
305
     };
342
     };
306
   },
343
   },
307
   methods: {
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
     changeText(event){
394
     changeText(event){
309
       // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
395
       // 检查是否为特定的按键,例如回车键,来确认扫码枪输入完成
310
       if (event.key === 'Enter') {
396
       if (event.key === 'Enter') {
327
            id:this.id,
413
            id:this.id,
328
            drug_code:this.textarea,
414
            drug_code:this.textarea,
329
         }
415
         }
330
-        // console.log("params=-==---",params)
331
        ModityDrugCodeWarehouseInfo(params).then(response=>{
416
        ModityDrugCodeWarehouseInfo(params).then(response=>{
332
           if(response.data.state == 1){
417
           if(response.data.state == 1){
333
             var info =  response.data.data.info
418
             var info =  response.data.data.info
445
         limit:this.limit,
530
         limit:this.limit,
446
         page:this.page,
531
         page:this.page,
447
         storehouse_id:this.storehouse_id,
532
         storehouse_id:this.storehouse_id,
533
+        drug_id:this.drug_id,
448
        }
534
        }
449
        const loading = this.$loading({
535
        const loading = this.$loading({
450
           lock: true,
536
           lock: true,
536
         end_time:this.end_time,
622
         end_time:this.end_time,
537
         order_type:this.order_type,
623
         order_type:this.order_type,
538
         storehouse_id:this.storehouse_id,
624
         storehouse_id:this.storehouse_id,
625
+        drug_id:this.drug_id,
539
       }
626
       }
540
     
627
     
541
      getDrugWarehouseInfoPrint(params).then(response=>{
628
      getDrugWarehouseInfoPrint(params).then(response=>{
551
     PrintAction(){
638
     PrintAction(){
552
       window.sessionStorage.setItem('drug_start_in_time',this.start_time)
639
       window.sessionStorage.setItem('drug_start_in_time',this.start_time)
553
       window.sessionStorage.setItem('drug_end_in_time',this.end_time)
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
     select(){
643
     select(){
557
 
644
 

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

102
 
102
 
103
     </div>
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
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
148
     <!-- <el-row :gutter="12" style="margin-top: 10px"> -->
107
       <el-table class="eltable"
149
       <el-table class="eltable"
228
 import { fetchAllAdminUsers } from "@/api/doctor";
270
 import { fetchAllAdminUsers } from "@/api/doctor";
229
 import {GetAllConfig } from "@/api/stock";
271
 import {GetAllConfig } from "@/api/stock";
230
 import {getDrugOutDetail,getDrugOutOrderPrint } from "@/api/drug/drug_stock"
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
 export default {
275
 export default {
233
   name: "stockOutDetail",
276
   name: "stockOutDetail",
234
 
277
 
281
       manufacturer_id: "",
324
       manufacturer_id: "",
282
       dealer_id: "",
325
       dealer_id: "",
283
       order_type:"",
326
       order_type:"",
284
-
327
+      orderWay:[
328
+        {value:0,label:"全部"},
329
+        {value:1,label:"手动出库"},
330
+        {value:2,label:"自动出库"},
331
+      ],
285
       searchKey: "",
332
       searchKey: "",
286
       type: 2,
333
       type: 2,
287
       page: 1,
334
       page: 1,
311
       houseList:[],
358
       houseList:[],
312
       dealerList:[],
359
       dealerList:[],
313
       manufacturerList:[],
360
       manufacturerList:[],
314
-      patientsList:[]
361
+      patientsList:[],
362
+      drug_name:"",
363
+      drug_id:0,
364
+      order_way:"",
315
     };
365
     };
316
   },
366
   },
317
   methods: {
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
     changeType: function(val) {
418
     changeType: function(val) {
319
       this.order_type = val;
419
       this.order_type = val;
320
       this.getlist()
420
       this.getlist()
445
     PrintAction: function() {
545
     PrintAction: function() {
446
       //  window.sessionStorage.setItem('start_out_time',this.start_time)
546
       //  window.sessionStorage.setItem('start_out_time',this.start_time)
447
       //  window.sessionStorage.setItem('end_out_time',this.end_time)
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
     getlist(){
550
     getlist(){
451
       var params = {
551
       var params = {
457
          page:this.page,
557
          page:this.page,
458
          limit:this.limit,
558
          limit:this.limit,
459
          storehouse_id:this.storehouse_id,
559
          storehouse_id:this.storehouse_id,
560
+         drug_id:this.drug_id,
561
+         order_way:this.order_way,
460
       }
562
       }
461
       const loading = this.$loading({
563
       const loading = this.$loading({
462
           lock: true,
564
           lock: true,
974
          end_time:this.end_time,
1076
          end_time:this.end_time,
975
          order_type:2,
1077
          order_type:2,
976
          storehouse_id:this.storehouse_id,
1078
          storehouse_id:this.storehouse_id,
1079
+         drug_id:this.drug_id,
1080
+         order_way:this.order_way,
977
       }
1081
       }
978
      getDrugOutOrderPrint(params).then(response=>{
1082
      getDrugOutOrderPrint(params).then(response=>{
979
         if(response.data.state == 1){
1083
         if(response.data.state == 1){

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

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

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

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