Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
d3d4593a15

+ 18 - 18
src/router/modules/drugs.js View File

@@ -30,12 +30,12 @@ export default {
30 30
       name: 'drugsStockOut',
31 31
       meta: { title: 'drugsStockOut', noCache: true }
32 32
     },
33
-    {
34
-      path: '/stock/drugs/drugModifyPrice',
35
-      component: () => import('@/xt_pages/stock/drugs/drugModifyPrice'),
36
-      name: 'drugModifyPrice',
37
-      meta: { title: 'drugModifyPrice', noCache: true }
38
-    },
33
+    // {
34
+    //   path: '/stock/drugs/drugModifyPrice',
35
+    //   component: () => import('@/xt_pages/stock/drugs/drugModifyPrice'),
36
+    //   name: 'drugModifyPrice',
37
+    //   meta: { title: 'drugModifyPrice', noCache: true }
38
+    // },
39 39
     {
40 40
       path: '/stock/drugs/drugModifyPricePrint',
41 41
       component: () => import('@/xt_pages/stock/drugs/drugModifyPricePrint'),
@@ -56,18 +56,18 @@ export default {
56 56
       name: 'drugDamaged',
57 57
       meta: { title: 'drugDamaged', noCache: true }
58 58
     },
59
-    {
60
-      path: '/stock/drugs/drugWarning',
61
-      component: () => import('@/xt_pages/stock/drugs/drugWarning'),
62
-      name: 'drugWarning',
63
-      meta: { title: 'drugWarning', noCache: true }
64
-    },
65
-    {
66
-      path: '/stock/drugs/drugInventory',
67
-      component: () => import('@/xt_pages/stock/drugs/drugInventory'),
68
-      name: 'drugInventory',
69
-      meta: { title: 'drugInventory', noCache: true }
70
-    },
59
+    // {
60
+    //   path: '/stock/drugs/drugWarning',
61
+    //   component: () => import('@/xt_pages/stock/drugs/drugWarning'),
62
+    //   name: 'drugWarning',
63
+    //   meta: { title: 'drugWarning', noCache: true }
64
+    // },
65
+    // {
66
+    //   path: '/stock/drugs/drugInventory',
67
+    //   component: () => import('@/xt_pages/stock/drugs/drugInventory'),
68
+    //   name: 'drugInventory',
69
+    //   meta: { title: 'drugInventory', noCache: true }
70
+    // },
71 71
     {
72 72
       path: '/stock/drugs/inventoryPrint',
73 73
       component: () => import('@/xt_pages/stock/drugs/inventoryPrint'),

+ 18 - 18
src/router/modules/stock.js View File

@@ -42,12 +42,12 @@ export default {
42 42
       name: 'cancelStockOrder',
43 43
       meta: { title: 'cancelStockOrder', noCache: true }
44 44
     },
45
-    {
46
-      path: '/stock/stockModifyPrice',
47
-      component: () => import('@/xt_pages/stock/stockModifyPrice'),
48
-      name: 'stockModifyPrice',
49
-      meta: { title: 'stockModifyPrice', noCache: true }
50
-    },
45
+    // {
46
+    //   path: '/stock/stockModifyPrice',
47
+    //   component: () => import('@/xt_pages/stock/stockModifyPrice'),
48
+    //   name: 'stockModifyPrice',
49
+    //   meta: { title: 'stockModifyPrice', noCache: true }
50
+    // },
51 51
     {
52 52
       path: '/stock/stockModifyPricePrint',
53 53
       component: () => import('@/xt_pages/stock/stockModifyPricePrint'),
@@ -56,12 +56,12 @@ export default {
56 56
       is_menu: false,
57 57
       meta: { title: 'stockModifyPricePrint', noCache: true }
58 58
     },
59
-    {
60
-      path: '/stock/stockDamaged',
61
-      component: () => import('@/xt_pages/stock/stockDamaged'),
62
-      name: 'stockDamaged',
63
-      meta: { title: 'stockDamaged', noCache: true }
64
-    },
59
+    // {
60
+    //   path: '/stock/stockDamaged',
61
+    //   component: () => import('@/xt_pages/stock/stockDamaged'),
62
+    //   name: 'stockDamaged',
63
+    //   meta: { title: 'stockDamaged', noCache: true }
64
+    // },
65 65
     {
66 66
       path: '/stock/stockDamagePrint',
67 67
       component: () => import('@/xt_pages/stock/stockDamagePrint'),
@@ -70,12 +70,12 @@ export default {
70 70
       is_menu: false,
71 71
       meta: { title: 'stockModifyPricePrint', noCache: true }
72 72
     },
73
-    {
74
-      path: '/stock/stockWarning',
75
-      component: () => import('@/xt_pages/stock/stockWarning'),
76
-      name: 'stockWarning',
77
-      meta: { title: 'stockWarning', noCache: true }
78
-    },
73
+    // {
74
+    //   path: '/stock/stockWarning',
75
+    //   component: () => import('@/xt_pages/stock/stockWarning'),
76
+    //   name: 'stockWarning',
77
+    //   meta: { title: 'stockWarning', noCache: true }
78
+    // },
79 79
     {
80 80
       path: '/stock/stockInventory',
81 81
       component: () => import('@/xt_pages/stock/stockInventory'),

+ 20 - 19
src/xt_pages/stock/cancelStockOrderAdd.vue View File

@@ -115,7 +115,7 @@
115 115
                   v-model="scope.row.return_count"
116 116
                 ></el-input>      
117 117
               </el-form-item>
118
-              <!-- {{scope.row.packing_unit}} -->
118
+            
119 119
             </template>
120 120
           </el-table-column>
121 121
           <el-table-column width="150" align="center">
@@ -154,7 +154,7 @@
154 154
               >
155 155
                <el-select v-model="scope.row.number" filterable placeholder="请选择">
156 156
                   <el-option
157
-                    v-for="(item,index) in numberList"
157
+                    v-for="(item,index) in scope.row.xt_warehouse_info"
158 158
                     :key="index"
159 159
                     :label="item.number"
160 160
                     :value="item.id">
@@ -439,6 +439,7 @@ export default {
439 439
       tempObj["price"] = ""
440 440
       tempObj["total"] = ""
441 441
       tempObj["warehouse_info_id"] =  0
442
+      tempObj["xt_warehouse_info"] = []
442 443
       this.recordInfo.recordData.push(tempObj);
443 444
     },
444 445
     handleDelete: function(index, row) {
@@ -546,27 +547,26 @@ export default {
546 547
             this.$message.success("请添加退库商品");
547 548
             return;
548 549
           }
549
-          console.log("hhhhh2h332",this.recordInfo.recordData)
550
+   
550 551
           for(let i=0;i<this.recordInfo.recordData.length;i++){
551 552
             if(this.recordInfo.recordData[i].good_id == 0){
552 553
                this.$message.error("耗材规格不能为空")
553 554
                return
554 555
             }
555
-
556
-            for(let j=0;j<this.numberList.length;j++){
557
-              if(this.recordInfo.recordData[i].number == this.numberList[j].id){
558
-                this.recordInfo.recordData[i].number = this.numberList[j].number
559
-                this.recordInfo.recordData[i].warehouse_info_id = this.numberList[j].id
560
-              }
561
-            }
562
-            
556
+            for(let j=0;j<this.recordInfo.recordData[i].xt_warehouse_info.length;j++){
557
+               if(this.recordInfo.recordData[i].number == this.recordInfo.recordData[i].xt_warehouse_info[j].id){
558
+                  this.recordInfo.recordData[i].number = this.recordInfo.recordData[i].xt_warehouse_info[j].number
559
+                  this.recordInfo.recordData[i].warehouse_info_id = this.recordInfo.recordData[i].xt_warehouse_info[j].id
560
+               }
561
+            }     
563 562
           }
564 563
 
565 564
           const params = {
566 565
             cancelStock: this.recordInfo.recordData
567 566
           };
568
-          console.log("params",params)
569
-         
567
+        
568
+          console.log("parasm23233222332323",params)
569
+          
570 570
           postCancelStock(
571 571
             params,
572 572
             this.return_time,
@@ -622,9 +622,8 @@ export default {
622 622
       }
623 623
     postSearchGoodList(key).then(response => {
624 624
         if (response.data.state == 1) {
625
-          
626 625
             var list = response.data.data.list
627
-            
626
+           
628 627
             this.goodList = list
629 628
             var manufacturerList = response.data.data.manufacturerList
630 629
             this.manufacturerList = manufacturerList
@@ -656,17 +655,16 @@ export default {
656 655
       this.currentIndex = val
657 656
     },
658 657
     handleSelect(val){
659
-      //获取当前耗材的批号
660
-      this.getStockBatchNumber(val.id)
658
+      console.log("列表23323232332",this.recordInfo.recordData)
661 659
       for(let i=0;i<this.recordInfo.recordData.length;i++){
662 660
         if(this.currentIndex == i){
663
-          this.recordInfo.recordData[i].good_type_id = val.id
664 661
           this.recordInfo.recordData[i].good_name = val.good_name
665 662
           this.recordInfo.recordData[i].good_type_id = val.good_type_id
666 663
           this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
667
-          this.recordInfo.recordData[i].number =  val.number
664
+          this.recordInfo.recordData[i].number =  ""
668 665
           this.recordInfo.recordData[i].manufacturer = val.manufacturer
669 666
           this.recordInfo.recordData[i].remark = val.remark
667
+          this.recordInfo.recordData[i].xt_warehouse_info = val.xt_warehouse_info
670 668
           if(val.buy_price == 0){
671 669
             this.recordInfo.recordData[i].price = ""
672 670
           }else{
@@ -693,6 +691,8 @@ export default {
693 691
         if(response.data.state == 1){
694 692
           var list = response.data.data.list
695 693
           console.log("list2243444",list)
694
+
695
+          this.numberList = []
696 696
           this.numberList = list
697 697
         }
698 698
      })
@@ -722,6 +722,7 @@ export default {
722 722
     tempObj["price"] = ""
723 723
     tempObj["total"] = ""
724 724
     tempObj["warehouse_info_id"] = 0
725
+    tempObj["xt_warehouse_info"] = []
725 726
     this.recordInfo.recordData.push(tempObj);
726 727
     this.GetConfigInfo();
727 728
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 10 - 9
src/xt_pages/stock/cancelStockOrderEdit.vue View File

@@ -114,7 +114,7 @@
114 114
               >
115 115
                <el-select v-model="scope.row.number" filterable placeholder="请选择" >
116 116
                   <el-option
117
-                    v-for="(item,index) in numberList"
117
+                    v-for="(item,index) in scope.row.xt_warehouse_info"
118 118
                     :key="index"
119 119
                     :label="item.number"
120 120
                     :value="item.id">
@@ -400,6 +400,7 @@
400 400
         tempObj["remark"] = ""
401 401
         tempObj["price"] = 0
402 402
         tempObj["warehouse_info_id"] = 0
403
+        tempObj["xt_warehouse_info"] = []
403 404
         this.recordInfo.recordData.push(tempObj)
404 405
       }, handleDelete: function(index, row) {
405 406
         if (row.id == 0) {
@@ -513,18 +514,18 @@
513 514
               }
514 515
               array[i].price = array[i].price.toString()
515 516
             }
516
-
517
+            console.log("hh2332322323",this.recordInfo.recordData)
517 518
             for(let i=0;i<this.recordInfo.recordData.length;i++){
518 519
                if(this.recordInfo.recordData[i].good_id == 0){
519 520
                   this.$message.error("耗材规格不能为空")
520 521
                   return
521 522
                }
522
-             for(let j=0;j<this.numberList.length;j++){
523
-                if(this.recordInfo.recordData[i].number == this.numberList[j].id){
524
-                  this.recordInfo.recordData[i].number = this.numberList[j].number
525
-                  this.recordInfo.recordData[i].warehouse_info_id = this.numberList[j].id
523
+              for(let j=0;j<this.recordInfo.recordData[i].xt_warehouse_info.length;j++){
524
+                if(this.recordInfo.recordData[i].number == this.recordInfo.recordData[i].xt_warehouse_info[j].id){
525
+                    this.recordInfo.recordData[i].number = this.recordInfo.recordData[i].xt_warehouse_info[j].number
526
+                    this.recordInfo.recordData[i].warehouse_info_id = this.recordInfo.recordData[i].xt_warehouse_info[j].id
526 527
                 }
527
-             }
528
+              }     
528 529
             }
529 530
 
530 531
             const params = {
@@ -586,6 +587,7 @@
586 587
               response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{m}-{d}")
587 588
               response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{m}-{d}")
588 589
               response.data.data.list[i].return_count = response.data.data.list[i].count
590
+              response.data.data.list[i].xt_warehouse_info = response.data.data.list[i].xt_warehouse_info
589 591
               this.recordInfo.recordData.push(response.data.data.list[i])
590 592
             }
591 593
             this.cancelStock = response.data.data.info
@@ -655,9 +657,7 @@
655 657
         this.currentIndex = val
656 658
       },
657 659
       handleSelect(val){
658
-        console.log("val",val)
659 660
         //获取当前耗材的批号
660
-         this.getStockBatchNumber(val.id)
661 661
          for(let i=0;i<this.recordInfo.recordData.length;i++){
662 662
            if(this.currentIndex == i){
663 663
               this.recordInfo.recordData[i].good_type_id = val.id
@@ -667,6 +667,7 @@
667 667
               this.recordInfo.recordData[i].number =  val.number
668 668
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
669 669
               this.recordInfo.recordData[i].remark = val.remark
670
+              this.recordInfo.recordData[i].xt_warehouse_info = val.xt_warehouse_info
670 671
               if(val.buy_price == 0){
671 672
                this.recordInfo.recordData[i].price = ""
672 673
               }else{

+ 7 - 6
src/xt_pages/stock/drugs/cancelDrugStockOrder.vue View File

@@ -402,7 +402,7 @@ export default {
402 402
     },
403 403
     fetchAllAdminUsers() {
404 404
       fetchAllAdminUsers().then(response => {
405
-        console.log(response);
405
+      
406 406
         if (response.data.state == 1) {
407 407
           this.adminUserOptions = response.data.data.users;
408 408
           var alen = this.adminUserOptions.length;
@@ -581,18 +581,20 @@ export default {
581 581
       this.getCancelStockDetail(val.id)
582 582
     },
583 583
     getCancelStockDetail(id){
584
+      console.log("id232233223",id)
584 585
         var params = {
585 586
           id:id
586 587
         }
587 588
       getCancelStockDetail(params).then(response=>{
588 589
        if(response.data.state == 1){
589 590
          var list =  response.data.data.list
591
+         console.log("hhhh23233323223",list)
590 592
          for(let i=0;i<list.length;i++){
591 593
            list[i].product_date = this.getTime(list[i].product_date,"{y}-{h}-{d}")
592 594
            list[i].expiry_date = this.getTime(list[i].expiry_date,"{y}-{h}-{d}")
593 595
          }
594 596
          this.tableList = list
595
-         console.log("list23232",list)
597
+        //  console.log("list23232",list)
596 598
          this.showTable = true
597 599
        }
598 600
       })
@@ -621,7 +623,7 @@ export default {
621 623
      getDrugCancelExportList(params).then(response=>{
622 624
         if(response.data.state == 1){
623 625
          var list = response.data.data.list
624
-         console.log("导出数据222",list)
626
+        //  console.log("导出数据222",list)
625 627
          this.exportList = list
626 628
         }
627 629
      })
@@ -632,8 +634,7 @@ export default {
632 634
         return
633 635
       }
634 636
      import('@/vendor/Export2Excel').then(excel => {
635
-      console.log("23232323",this.exportList)
636
-      return
637
+     
637 638
       for(let i=0;i<this.exportList.length;i++){
638 639
         this.exportList[i].total_price = this.exportList[i].count * this.exportList[i].price
639 640
         this.exportList[i].drug_name = this.exportList[i].BaseDrugLib.drug_name
@@ -650,7 +651,7 @@ export default {
650 651
       }
651 652
       const tHeader = ['药品名称',  '规格&单位','退库数量','退库单价','批次','品名/注册证号(备案凭证号)','生产厂家','生产日期','有效期','退库原因']
652 653
       const filterVal = ['drug_name', 'unit','count','price','batch_number','register_account','manufacturer','product_date','expiry_date','remark']
653
-      console.log("table",this.exportList)
654
+      // console.log("table",this.exportList)
654 655
     
655 656
       const data = this.formatJson(filterVal, this.exportList)
656 657
       excel.export_json_to_excel({

+ 19 - 16
src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue View File

@@ -172,7 +172,7 @@
172 172
               >
173 173
                <el-select v-model="scope.row.batch_number" filterable placeholder="请选择">
174 174
                   <el-option
175
-                    v-for="(item,index) in numberList"
175
+                    v-for="(item,index) in scope.row.drug_warehouse_info"
176 176
                     :key="index"
177 177
                     :label="item.batch_number"
178 178
                     :value="item.id">
@@ -463,6 +463,7 @@ export default {
463 463
       tempObj["batch_number"] = ""
464 464
       tempObj["max_unit"] = ""
465 465
       tempObj["batch_number_id"] = 0
466
+      tempObj["drug_warehouse_info"] = []
466 467
       this.recordInfo.recordData.push(tempObj);
467 468
     },
468 469
     handleDelete: function(index, row) {
@@ -546,6 +547,7 @@ export default {
546 547
       this.$refs["tableForm"].validate(valid => {
547 548
         if (valid) {
548 549
           const array = this.recordInfo.recordData;
550
+          console.log("列表23323232323232",array)
549 551
           let total = 0;
550 552
           for (let i = 0; i < array.length; i++) {
551 553
 
@@ -562,19 +564,18 @@ export default {
562 564
           }
563 565
           for(let i=0;i<this.recordInfo.recordData.length;i++){
564 566
             this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
565
-            console.log("批次列表",this.numberList)
566
-             for(let j=0;j<this.numberList.length;j++){
567
-                if(this.recordInfo.recordData[i].batch_number == this.numberList[j].id){
568
-                   this.recordInfo.recordData[i].batch_number = this.numberList[j].batch_number
569
-                   this.recordInfo.recordData[i].batch_number_id = this.numberList[j].id
570
-                 
571
-                }
572
-             }
567
+            for(let j=0;j<this.recordInfo.recordData[i].drug_warehouse_info.length;j++){
568
+               
569
+               if(this.recordInfo.recordData[i].batch_number == this.recordInfo.recordData[i].drug_warehouse_info[j].id){
570
+                  this.recordInfo.recordData[i].batch_number = this.recordInfo.recordData[i].drug_warehouse_info[j].batch_number
571
+                  this.recordInfo.recordData[i].batch_number_id = this.recordInfo.recordData[i].drug_warehouse_info[j].id
572
+               }
573
+            }
573 574
           }
574 575
           const params = {
575 576
             cancelStock: this.recordInfo.recordData
576 577
           };
577
-          console.log("params2222",params,this.return_time)
578
+         console.log("params2222",params,this.return_time)
578 579
         
579 580
           postDrugCancelStock(
580 581
             params,
@@ -658,17 +659,17 @@ export default {
658 659
         this.currentIndex = val
659 660
       },
660 661
       handleSelect(val){
662
+        console.log("val345555555555555555555",val)
661 663
          var arr = []
662 664
          for(let i=0;i<this.recordInfo.recordData.length;i++){
663 665
             arr.push(this.recordInfo.recordData[i].drug_id)
664 666
          }
665 667
          var str = arr.join(",")
666
-         console.log("str",str)
667 668
          if(str.indexOf(val.id)!=-1){
668 669
             this.$message.error("该药品已存在列表中")
669 670
             return
670 671
          }
671
-         this.getDrugBatchNumber(val.id)
672
+        //  this.getDrugBatchNumber(val.id)
672 673
          for(let i=0;i<this.recordInfo.recordData.length;i++){
673 674
            if(i == this.currentIndex){
674 675
              this.recordInfo.recordData[i].drug_id  = val.id
@@ -678,9 +679,10 @@ export default {
678 679
              this.recordInfo.recordData[i].last_price = val.last_price
679 680
              this.recordInfo.recordData[i].price = val.last_price
680 681
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
681
-             this.recordInfo.recordData[i].number =  val.number
682
+           
682 683
              this.recordInfo.recordData[i].max_unit = val.max_unit
683 684
              this.recordInfo.recordData[i].min_unit = val.min_unit
685
+             this.recordInfo.recordData[i].drug_warehouse_info = val.drug_warehouse_info
684 686
              if(val.dealer == 0){
685 687
                this.recordInfo.recordData[i].dealer = ""
686 688
              }else{
@@ -689,7 +691,7 @@ export default {
689 691
             
690 692
            }
691 693
         }
692
-        console.log("333333",this.recordInfo.recordData)
694
+        // console.log("333333",this.recordInfo.recordData)
693 695
       },
694 696
       getDrugBatchNumber(id){
695 697
           var params = {
@@ -698,7 +700,7 @@ export default {
698 700
         getDrugBatchNumber(params).then(response=>{
699 701
            if(response.data.state == 1){
700 702
              var list = response.data.data.list
701
-             console.log("list2222",list)
703
+            //  console.log("list2222",list)
702 704
              for(let i=0;i<list.length;i++){
703 705
                this.numberList.push(list[i])
704 706
              }
@@ -736,8 +738,9 @@ export default {
736 738
     tempObj["batch_number"] = ""
737 739
     tempObj["batch_number_id"] = 0
738 740
     tempObj["max_unit"] = ""
741
+    tempObj["drug_warehouse_info"] = []
739 742
     this.unitList =  getDataConfig('hemodialysis','units')
740
-    console.log("单位",this.unitList)
743
+    // console.log("单位",this.unitList)
741 744
     this.recordInfo.recordData.push(tempObj);
742 745
     this.GetConfigInfo();
743 746
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 29 - 28
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue View File

@@ -164,34 +164,7 @@
164 164
             </template>
165 165
           </el-table-column>
166 166
 
167
-          <el-table-column label="生产厂家" width="140" align="center">
168
-            <template slot-scope="scope">
169
-               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
170
-                <el-option
171
-                  v-for="(option, index) in manufacturerList"
172
-                  :key="index"
173
-                  :label="option.manufacturer_name"
174
-                  :value="option.id">
175
-                </el-option>
176
-               </el-select>
177
-            </template>
178
-          </el-table-column>
179
- 
180
-
181
-          <el-table-column label="生产日期" width="180" align="center">
182
-            <template slot-scope="scope">
183
-              <el-date-picker
184
-                prefix-icon="el-icon-date"
185
-                style="width: 145px"
186
-                v-model="scope.row.product_date"
187
-                type="date"
188
-                placeholder="选择日期时间"
189
-                format="yyyy-MM-dd"
190
-                value-format="yyyy-MM-dd"
191
-              ></el-date-picker>
192
-            </template>
193
-          </el-table-column>
194
-          <el-table-column  width="180" align="center">
167
+           <el-table-column  width="180" align="center">
195 168
              <template slot="header" slot-scope="scope">
196 169
               <span>有效日期<span style="color: red">*</span></span>
197 170
             </template>
@@ -212,6 +185,34 @@
212 185
             </template>
213 186
           </el-table-column>
214 187
 
188
+      
189
+          <el-table-column label="生产日期" width="180" align="center">
190
+            <template slot-scope="scope">
191
+              <el-date-picker
192
+                prefix-icon="el-icon-date"
193
+                style="width: 145px"
194
+                v-model="scope.row.product_date"
195
+                type="date"
196
+                placeholder="选择日期时间"
197
+                format="yyyy-MM-dd"
198
+                value-format="yyyy-MM-dd"
199
+              ></el-date-picker>
200
+            </template>
201
+          </el-table-column>
202
+         
203
+         <el-table-column label="生产厂家" width="140" align="center">
204
+            <template slot-scope="scope">
205
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
206
+                <el-option
207
+                  v-for="(option, index) in manufacturerList"
208
+                  :key="index"
209
+                  :label="option.manufacturer_name"
210
+                  :value="option.id">
211
+                </el-option>
212
+               </el-select>
213
+            </template>
214
+          </el-table-column>
215
+ 
215 216
 
216 217
       <el-table-column label="经销商" width="140" align="center">
217 218
           <template slot-scope="scope">

+ 34 - 23
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue View File

@@ -226,17 +226,26 @@
226 226
               {{ calculate(scope.row.last_price * scope.row.warehousing_count) }} 
227 227
             </template>
228 228
           </el-table-column>
229
-         
230
-          <el-table-column label="生产厂家" width="140" align="center">
229
+    
230
+
231
+         <el-table-column  width="180" align="center">
232
+             <template slot="header" slot-scope="scope">
233
+              <span>有效日期<span style="color: red">*</span></span>
234
+            </template>
231 235
             <template slot-scope="scope">
232
-               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
233
-                <el-option
234
-                  v-for="(option, index) in manufacturerList"
235
-                  :key="index"
236
-                  :label="option.manufacturer_name"
237
-                  :value="option.id">
238
-                </el-option>
239
-               </el-select>
236
+              <el-form-item   :prop="'recordData.' + scope.$index + '.expiry_date'"
237
+                :rules="tableRules.expiry_date"
238
+                style="padding-top: 20px">
239
+                <el-date-picker
240
+                  prefix-icon="el-icon-date"
241
+                  style="width: 145px"
242
+                  v-model="scope.row.expiry_date"
243
+                  type="date"
244
+                  placeholder="选择日期时间"
245
+                  format="yyyy-MM-dd"
246
+                  value-format="yyyy-MM-dd"
247
+                ></el-date-picker>
248
+              </el-form-item>
240 249
             </template>
241 250
           </el-table-column>
242 251
 
@@ -254,20 +263,20 @@
254 263
             </template>
255 264
           </el-table-column>
256 265
 
257
-
258
-         <el-table-column label="有效日期" width="180" align="center">
266
+             
267
+          <el-table-column label="生产厂家" width="140" align="center">
259 268
             <template slot-scope="scope">
260
-              <el-date-picker
261
-                prefix-icon="el-icon-date"
262
-                style="width: 145px"
263
-                v-model="scope.row.expiry_date"
264
-                type="date"
265
-                placeholder="选择日期时间"
266
-                format="yyyy-MM-dd"
267
-                value-format="yyyy-MM-dd"
268
-              ></el-date-picker>
269
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
270
+                <el-option
271
+                  v-for="(option, index) in manufacturerList"
272
+                  :key="index"
273
+                  :label="option.manufacturer_name"
274
+                  :value="option.id">
275
+                </el-option>
276
+               </el-select>
269 277
             </template>
270 278
           </el-table-column>
279
+       
271 280
 
272 281
           <el-table-column label="经销商" width="140" align="center">
273 282
             <template slot-scope="scope">
@@ -399,8 +408,10 @@ export default {
399 408
         warehousing_count: [
400 409
           { required: true, message: "数量不能为空", trigge: "blur" }
401 410
         ],
402
-
403
-        good_id: [{ validator: checkGoodId, trigger: "blur" }]
411
+        good_id: [{ validator: checkGoodId, trigger: "blur" }],
412
+        expiry_date:[
413
+         {required:true,message:'有效日期不能为空',trigger:'blur'}
414
+        ],
404 415
       },
405 416
 
406 417
       total: "",

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

@@ -709,6 +709,10 @@ export default {
709 709
       }
710 710
       const ids = [];
711 711
       for (let i = 0; i < this.selectedTableData.length; i++) {
712
+        if(this.selectedTableData[i].is_sys == 1){
713
+          this.$message.error("自动出库数据不能删除!")
714
+          return false
715
+        }
712 716
         if(this.selectedTableData[i].is_sys == 0){
713 717
           ids.push(this.selectedTableData[i].id);
714 718
         }

+ 10 - 9
src/xt_pages/stock/drugs/query.vue View File

@@ -112,22 +112,26 @@
112 112
         </el-table-column>
113 113
         <el-table-column prop="drug_name" label="出库数量" align="center">
114 114
            <template slot-scope="scope">
115
-             <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id ==10028 || org_id == 10243 || org_id == 10088 || org_id == 10245">
115
+             <!-- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id ==10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919">
116 116
                 <span>
117 117
                  {{getOutFlush(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info)}}
118 118
                 </span>
119 119
              </span>
120
-             <span v-else>{{getOutCount(scope.row.id)+getAutoCount(scope.row.id)}}{{scope.row.max_unit}}</span>
120
+             <span v-else>{{getOutCount(scope.row.id)+getAutoCount(scope.row.id)}}{{scope.row.max_unit}}</span> -->
121
+              <span>
122
+                 {{getOutFlush(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number,scope.row.drug_cancel_stock_info)}}
123
+              </span>
121 124
            </template>
122 125
         </el-table-column>
123 126
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
124 127
            <template slot-scope="scope">
125 128
             <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
126
-               <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245">
129
+               <!-- <span v-if="org_id == 9671 || org_id == 9675 || org_id == 4 || org_id == 3877 || org_id == 10138 || org_id == 10028 || org_id == 10243 || org_id == 10088 || org_id == 10245 || org_id == 9919">
127 130
                 {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
128 131
                </span>
129 132
 
130
-               <span v-else>{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}}{{scope.row.max_unit}} </span>
133
+               <span v-else>{{getWarehoseInfo(scope.row.drug_warehouse_info) - getOutCount(scope.row.id) - getAutoCount(scope.row.id)}}{{scope.row.max_unit}} </span> -->
134
+                {{ getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)?getOverFlushInfo(scope.row.drug_warehouse_info,scope.row.max_unit,scope.row.min_unit,scope.row.min_number):0}}
131 135
             </div>
132 136
            </template>
133 137
         </el-table-column>
@@ -198,7 +202,7 @@ import { min } from 'moment'
198 202
       this.drugTypeList.push(...drugTypeList)
199 203
       this.org_id =  this.$store.getters.xt_user.org.id
200 204
       console.log("机构ID",this.org_id)
201
-      this.getDrugCountList()
205
+      // this.getDrugCountList()
202 206
 
203 207
 
204 208
     },
@@ -363,12 +367,10 @@ import { min } from 'moment'
363 367
       handleSizeChange(val) {
364 368
         this.limit = val
365 369
         this.getlist()
366
-        this.getDrugCountList()
367 370
       },
368 371
       handleCurrentChange(val) {
369 372
         this.page = val
370 373
         this.getlist()
371
-        this.getDrugCountList()
372 374
       },
373 375
       calculate: function(val) {
374 376
         return Math.round(parseFloat(val) * 100) / 100
@@ -429,7 +431,6 @@ import { min } from 'moment'
429 431
       },
430 432
       search: function() {
431 433
         this.getlist()
432
-        this.getDrugCountList()
433 434
       },
434 435
       setting: function() {
435 436
         this.$refs.dialog.show()
@@ -441,7 +442,7 @@ import { min } from 'moment'
441 442
            this.tableList[i].drug_type_name = this.getDrugType(this.tableList[i].drug_type)
442 443
            this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit +"*"+this.tableList[i].min_number+this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
443 444
            this.tableList[i].manufacturer_name = this.getManufacturerList(this.tableList[i].manufacturer)
444
-
445
+        
445 446
           this.tableList[i].inCount =  this.getWarehoseInfo(this.tableList[i].drug_warehouse_info)
446 447
           this.tableList[i].outCount = this.getWarehouseOutInfo(this.tableList[i].drug_warehouse_out,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
447 448
           this.tableList[i].overplusCount =  this.getOverFlushInfo(this.tableList[i].drug_warehouse_info,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)

+ 24 - 23
src/xt_pages/stock/stockInOrderAdd.vue View File

@@ -128,29 +128,6 @@
128 128
               {{calculate(scope.row.price*scope.row.warehousing_count)}}
129 129
             </template>
130 130
           </el-table-column>
131
-          
132
-          <el-table-column label="生产厂家" align="center" width="150">
133
-             <template slot-scope="scope">
134
-               <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
135
-                <el-option
136
-                  v-for="(option, index) in manufacturerList"
137
-                  :key="index"
138
-                  :label="option.manufacturer_name"
139
-                  :value="option.id">
140
-                </el-option>
141
-               </el-select>
142
-            </template>
143
-          </el-table-column>
144
-        
145
-          <el-table-column label="生产日期" align="center" width="180">
146
-            <template slot-scope="scope">
147
-              <el-date-picker prefix-icon="el-icon-date" v-model="scope.row.product_date" style="width: 145px"
148
-                              type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
149
-                              value-format="yyyy-MM-dd">
150
-              </el-date-picker>
151
-
152
-            </template>
153
-          </el-table-column>
154 131
           <el-table-column  align="center" width="180">
155 132
             <template slot="header" slot-scope="scope">
156 133
               <span>有效日期<span style="color: red">*</span></span>
@@ -165,6 +142,30 @@
165 142
              </el-form-item>
166 143
             </template>
167 144
           </el-table-column>
145
+        
146
+        
147
+          <el-table-column label="生产日期" align="center" width="180">
148
+            <template slot-scope="scope">
149
+              <el-date-picker prefix-icon="el-icon-date" v-model="scope.row.product_date" style="width: 145px"
150
+                              type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
151
+                              value-format="yyyy-MM-dd">
152
+              </el-date-picker>
153
+
154
+            </template>
155
+          </el-table-column>
156
+       
157
+         <el-table-column label="生产厂家" align="center" width="150">
158
+             <template slot-scope="scope">
159
+               <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
160
+                <el-option
161
+                  v-for="(option, index) in manufacturerList"
162
+                  :key="index"
163
+                  :label="option.manufacturer_name"
164
+                  :value="option.id">
165
+                </el-option>
166
+               </el-select>
167
+            </template>
168
+          </el-table-column>
168 169
 
169 170
          <el-table-column align="center" width="150">
170 171
             <template slot="header" slot-scope="scope">

+ 37 - 29
src/xt_pages/stock/stockInOrderEdit.vue View File

@@ -212,7 +212,38 @@
212 212
               {{ calculate(scope.row.price * scope.row.warehousing_count) }}
213 213
             </template>
214 214
           </el-table-column>
215
-          <el-table-column label="生产厂家" align="center" width="150">
215
+
216
+         <el-table-column  align="center" width="180">
217
+            <template slot="header" slot-scope="scope">
218
+              <span>有效日期<span style="color: red">*</span></span>
219
+            </template>
220
+            <template slot-scope="scope">
221
+              <el-form-item  :prop="'recordData.' + scope.$index + '.expiry_date'"
222
+                :rules="tableRules.expiry_date">
223
+                <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
224
+                                type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
225
+                                value-format="yyyy-MM-dd">
226
+                </el-date-picker>
227
+             </el-form-item>
228
+            </template>
229
+          </el-table-column>
230
+         
231
+
232
+          <el-table-column label="生产日期" width="180" align="center">
233
+            <template slot-scope="scope">
234
+              <el-date-picker
235
+                prefix-icon="el-icon-date"
236
+                style="width: 145px"
237
+                v-model="scope.row.product_date"
238
+                type="date"
239
+                placeholder="选择日期时间"
240
+                format="yyyy-MM-dd"
241
+                value-format="yyyy-MM-dd"
242
+              ></el-date-picker>
243
+            </template>
244
+          </el-table-column>
245
+
246
+           <el-table-column label="生产厂家" align="center" width="150">
216 247
              <template slot-scope="scope">
217 248
                <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
218 249
                 <el-option
@@ -238,33 +269,7 @@
238 269
               </el-form-item>
239 270
             </template>
240 271
           </el-table-column>
241
-
242
-          <el-table-column label="生产日期" width="180" align="center">
243
-            <template slot-scope="scope">
244
-              <el-date-picker
245
-                prefix-icon="el-icon-date"
246
-                style="width: 145px"
247
-                v-model="scope.row.product_date"
248
-                type="date"
249
-                placeholder="选择日期时间"
250
-                format="yyyy-MM-dd"
251
-                value-format="yyyy-MM-dd"
252
-              ></el-date-picker>
253
-            </template>
254
-          </el-table-column>
255
-          <el-table-column label="有效日期" width="180" align="center">
256
-            <template slot-scope="scope">
257
-              <el-date-picker
258
-                prefix-icon="el-icon-date"
259
-                style="width: 145px"
260
-                v-model="scope.row.expiry_date"
261
-                type="date"
262
-                placeholder="选择日期时间"
263
-                format="yyyy-MM-dd"
264
-                value-format="yyyy-MM-dd"
265
-              ></el-date-picker>
266
-            </template>
267
-          </el-table-column>
272
+        
268 273
            <el-table-column align="center" width="150">
269 274
             <template slot="header" slot-scope="scope">
270 275
               <span>批准文号</span>
@@ -394,7 +399,10 @@ export default {
394 399
           { required: true, message: "数量不能为空", trigge: "blur" }
395 400
         ],
396 401
 
397
-        good_id: [{ validator: checkGoodId, trigger: "blur" }]
402
+        good_id: [{ validator: checkGoodId, trigger: "blur" }],
403
+        expiry_date:[
404
+         { required: true, message: '有效日期不能为空', trigge: 'blur' }
405
+        ],
398 406
       },
399 407
 
400 408
       total: "",

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

@@ -1012,6 +1012,10 @@ export default {
1012 1012
       }
1013 1013
       const ids = [];
1014 1014
       for (let i = 0; i < this.selectedTableData.length; i++) {
1015
+        if(this.selectedTableData[i].is_sys == 1){
1016
+          this.$message.error("自动出库数据不能删除!")
1017
+          return false
1018
+        }
1015 1019
          if(this.selectedTableData[i].is_sys == 0){
1016 1020
            ids.push(this.selectedTableData[i].id);
1017 1021
          }

+ 2 - 19
src/xt_pages/stock/stockOutOrderAdd.vue View File

@@ -118,24 +118,7 @@
118 118
             </template>
119 119
           </el-table-column>
120 120
           
121
-          <!-- <el-table-column  width="150" align="center">
122
-             <template slot="header" slot-scope="scope">
123
-              <span>批号<span style="color: red">*</span></span>
124
-            </template>
125
-            <template slot-scope="scope">
126
-              <el-form-item  
127
-                :rules="tableRules.number">
128
-                <el-select v-model="scope.row.number" filterable placeholder="请选择" @change="changeNumberList(scope.row,scope.$index)">
129
-                  <el-option
130
-                    v-for="(item,index) in numberList"
131
-                    :key="index"
132
-                    :label="item.number"
133
-                    :value="item.id">
134
-                  </el-option>
135
-                </el-select>
136
-              </el-form-item>
137
-            </template>
138
-          </el-table-column> -->
121
+      
139 122
 
140 123
          <el-table-column  width="150" align="center">
141 124
             <template slot="header" slot-scope="scope">
@@ -463,7 +446,6 @@ export default {
463 446
       tempObj["product_date"] = ""
464 447
       tempObj["license_number"] = ""
465 448
       tempObj["warehouse_info_id"] = 0
466
-     
467 449
       this.recordInfo.recordData.push(tempObj);
468 450
     },
469 451
     handleDelete: function(index, row) {
@@ -784,6 +766,7 @@ export default {
784 766
     tempObj["dealer"] = ""
785 767
     tempObj["license_number"] = ""
786 768
     tempObj["warehouse_info_id"] = 0
769
+    
787 770
     this.recordInfo.recordData.push(tempObj);
788 771
     this.GetConfigInfo();
789 772
     this.propForm.goodUnit = this.$store.getters.good_unit;

+ 17 - 4
src/xt_pages/user/doctorAdvice.vue View File

@@ -168,7 +168,7 @@
168 168
           align="center"
169 169
         >
170 170
           <template slot-scope="scope">
171
-            <span v-if="org_id == 10215">{{ scope.row.created_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
171
+            <span v-if="org_id == 10215">{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
172 172
             <span v-else>{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
173 173
           </template>
174 174
         </el-table-column>
@@ -341,6 +341,17 @@
341 341
             >
342 342
           </template>
343 343
         </el-table-column>
344
+        <el-table-column
345
+          label="医嘱状态"
346
+          width="180"
347
+          property="stop_time"
348
+          align="center"
349
+        >
350
+          <template slot-scope="scope">
351
+             <span v-if="scope.row.stop_state == 1">已停止</span>
352
+             <span v-if="scope.row.stop_state == 2">未停止</span>
353
+          </template>
354
+        </el-table-column>
344 355
         <el-table-column
345 356
           label="终止时间"
346 357
           width="180"
@@ -4344,14 +4355,16 @@ export default {
4344 4355
     },
4345 4356
     // 获取勾选中的行
4346 4357
     getPrintInfo(ids) {
4347
-      getPrintInfo({ ids: ids }).then(response => {
4358
+      getPrintInfo({ ids: ids}).then(response => {
4348 4359
         if (response.data.state === 1) {
4349 4360
           var doctoradvice = response.data.data.doctoradvice;
4350
-          // console.log("doctoradvice", doctoradvice);
4361
+          console.log("doctoradvice", doctoradvice);
4362
+         
4351 4363
           this.dataAdvice = doctoradvice;
4352 4364
           if (this.adviceType === 3 || this.adviceType === 2 || this.adviceType == 4) {
4365
+           
4353 4366
             this.lstableData = this.dataAdvice;
4354
-            // console.log("---", this.multipleSelection);
4367
+            
4355 4368
           } else if (this.adviceType === 1) {
4356 4369
             this.cqtableData = doctoradvice;
4357 4370
           }