XMLWAN 3 лет назад
Родитель
Сommit
3c55dcc120
3 измененных файлов: 23 добавлений и 18 удалений
  1. 1 0
      src/xt_pages/data/components/drugs.vue
  2. 15 9
      src/xt_pages/stock/drugs/query.vue
  3. 7 9
      src/xt_pages/stock/stockQuery.vue

+ 1 - 0
src/xt_pages/data/components/drugs.vue Просмотреть файл

734
             return false
734
             return false
735
           } else {
735
           } else {
736
             this.total = response.data.data.total;
736
             this.total = response.data.data.total;
737
+            console.log("total22222",total)
737
             this.list = [];
738
             this.list = [];
738
             for (let i = 0; i < response.data.data.list.length; i++) {
739
             for (let i = 0; i < response.data.data.list.length; i++) {
739
               this.list.push(response.data.data.list[i])
740
               this.list.push(response.data.data.list[i])

+ 15 - 9
src/xt_pages/stock/drugs/query.vue Просмотреть файл

191
   export default {
191
   export default {
192
     name: 'stockIn',
192
     name: 'stockIn',
193
     created() {
193
     created() {
194
-      //  this.GetAllDrugStockQueryList()
195
       var drugCategory = getDictionaryDataConfig('system','drug_category')
194
       var drugCategory = getDictionaryDataConfig('system','drug_category')
196
       this.drugCategory.push(...drugCategory)
195
       this.drugCategory.push(...drugCategory)
197
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
196
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
346
       },
345
       },
347
       handleSizeChange(val) {
346
       handleSizeChange(val) {
348
         this.limit = val
347
         this.limit = val
349
-        this.GetAllDrugStockQueryList()
348
+        // this.GetAllDrugStockQueryList()
349
+        this.getlist()
350
       },
350
       },
351
       handleCurrentChange(val) {
351
       handleCurrentChange(val) {
352
         this.page = val
352
         this.page = val
353
-        this.GetAllDrugStockQueryList()
353
+        // this.GetAllDrugStockQueryList()
354
+        this.getlist()
354
       },
355
       },
355
       calculate: function(val) {
356
       calculate: function(val) {
356
         return Math.round(parseFloat(val) * 100) / 100
357
         return Math.round(parseFloat(val) * 100) / 100
363
         this.$message.error("开始时间不能大于结束时间");
364
         this.$message.error("开始时间不能大于结束时间");
364
         this.start_time = "";
365
         this.start_time = "";
365
       } else {
366
       } else {
366
-        this.GetAllDrugStockQueryList();
367
+        // this.GetAllDrugStockQueryList();
368
+        this.getlist()
367
       }
369
       }
368
     },
370
     },
369
     endTimeChange: function(val) {
371
     endTimeChange: function(val) {
372
         this.$message.error("结束时间不能小于开始时间");
374
         this.$message.error("结束时间不能小于开始时间");
373
         this.end_time = "";
375
         this.end_time = "";
374
       } else {
376
       } else {
375
-        this.GetAllDrugStockQueryList();
377
+        // this.GetAllDrugStockQueryList();
378
+        this.getlist()
376
       }
379
       }
377
      
380
      
378
     },
381
     },
415
       showCancelStockDetailDialog: function() {
418
       showCancelStockDetailDialog: function() {
416
       },
419
       },
417
       search: function() {
420
       search: function() {
418
-        this.GetAllDrugStockQueryList()
421
+        // this.GetAllDrugStockQueryList()
422
+        this.getlist()
419
       }, 
423
       }, 
420
       setting: function() {
424
       setting: function() {
421
         this.$refs.dialog.show()
425
         this.$refs.dialog.show()
447
         return (new Date(time)).getTime() / 1000
451
         return (new Date(time)).getTime() / 1000
448
       },
452
       },
449
       changeDrug(){
453
       changeDrug(){
450
-       this.GetAllDrugStockQueryList()
454
+     
455
+      this.getlist()
451
       },
456
       },
452
       printOrder(){
457
       printOrder(){
453
         this.$router.push({
458
         this.$router.push({
466
           start_time:this.start_time,
471
           start_time:this.start_time,
467
           end_time:this.end_time,
472
           end_time:this.end_time,
468
         }
473
         }
469
-       
474
+        
470
         getDrugStockList(params).then(response=>{
475
         getDrugStockList(params).then(response=>{
471
           if(response.data.state == 1){
476
           if(response.data.state == 1){
472
              var list = response.data.data.list
477
              var list = response.data.data.list
473
-             console.log("list",list)
478
+             console.log("list99999",list)
474
              this.tableList = list
479
              this.tableList = list
475
              var total = response.data.data.total
480
              var total = response.data.data.total
481
+             console.log("total",total)
476
              this.total = total
482
              this.total = total
477
              this.manufacturerList = response.data.data.manufacturerList
483
              this.manufacturerList = response.data.data.manufacturerList
478
            
484
            

+ 7 - 9
src/xt_pages/stock/stockQuery.vue Просмотреть файл

46
             style="width: 200px;margin-left:10px;"
46
             style="width: 200px;margin-left:10px;"
47
             class="filter-item"
47
             class="filter-item"
48
             v-model.trim="keywords"
48
             v-model.trim="keywords"
49
-            placeholder="耗材名称/商品编码/商品名称/规格名称"
49
+            placeholder="耗材名称"
50
           />
50
           />
51
           <el-button
51
           <el-button
52
             size="small"
52
             size="small"
288
       },
288
       },
289
       options:[],
289
       options:[],
290
       value:"",
290
       value:"",
291
-      type_name:"",
291
+      type_name:0,
292
       types:[],
292
       types:[],
293
       tableList:[],
293
       tableList:[],
294
       manufacturerList:[]
294
       manufacturerList:[]
391
     },
391
     },
392
     handleSizeChange(val) {
392
     handleSizeChange(val) {
393
       this.limit = val;
393
       this.limit = val;
394
-      // this.GetAllStockQuery();
394
+     
395
       this.getlist()
395
       this.getlist()
396
     },
396
     },
397
     handleCurrentChange(val) {
397
     handleCurrentChange(val) {
398
       this.page = val;
398
       this.page = val;
399
-      // this.GetAllStockQuery();
400
        this.getlist()
399
        this.getlist()
401
     },
400
     },
402
     calculate: function(val) {
401
     calculate: function(val) {
410
         this.start_time = "";
409
         this.start_time = "";
411
       } else {
410
       } else {
412
         this.start_time = val
411
         this.start_time = val
413
-        // this.GetAllStockQuery();
414
          this.getlist()
412
          this.getlist()
415
       }
413
       }
416
     },
414
     },
421
         this.end_time = "";
419
         this.end_time = "";
422
       } else {
420
       } else {
423
         this.end_time = val
421
         this.end_time = val
424
-        // this.GetAllStockQuery();
425
          this.getlist()
422
          this.getlist()
426
       }
423
       }
427
      
424
      
460
     showStockOutDetailDialog: function() {},
457
     showStockOutDetailDialog: function() {},
461
     showCancelStockDetailDialog: function() {},
458
     showCancelStockDetailDialog: function() {},
462
     search: function() {
459
     search: function() {
463
-      // this.GetAllStockQuery();
464
       this.getlist()
460
       this.getlist()
465
     },
461
     },
466
 
462
 
519
       const params = {
515
       const params = {
520
         page: this.page,
516
         page: this.page,
521
         limit: this.limit,
517
         limit: this.limit,
522
-        keyword: this.keywords,
518
+        keywords: this.keywords,
523
         start_time:this.start_time,
519
         start_time:this.start_time,
524
         end_time:this.end_time,
520
         end_time:this.end_time,
525
         type_name:this.type_name,
521
         type_name:this.type_name,
526
       };
522
       };
527
-
523
+     console.log("params",params)
528
       getAllStockList(params).then(response=>{
524
       getAllStockList(params).then(response=>{
529
          if(response.data.state == 1){
525
          if(response.data.state == 1){
530
           var list = response.data.data.list
526
           var list = response.data.data.list
531
           console.log("list22222",list)
527
           console.log("list22222",list)
532
           this.tableList = list
528
           this.tableList = list
533
           var total = response.data.data.total
529
           var total = response.data.data.total
530
+          console.log("total",total)
531
+          this.total = total
534
            var manufacturerList = response.data.data.manufacturerList
532
            var manufacturerList = response.data.data.manufacturerList
535
            this.manufacturerList = manufacturerList
533
            this.manufacturerList = manufacturerList
536
          }
534
          }