Browse Source

11月14日 库存扣减更新

XMLWAN 3 years ago
parent
commit
d3d4593a15

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

30
       name: 'drugsStockOut',
30
       name: 'drugsStockOut',
31
       meta: { title: 'drugsStockOut', noCache: true }
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
       path: '/stock/drugs/drugModifyPricePrint',
40
       path: '/stock/drugs/drugModifyPricePrint',
41
       component: () => import('@/xt_pages/stock/drugs/drugModifyPricePrint'),
41
       component: () => import('@/xt_pages/stock/drugs/drugModifyPricePrint'),
56
       name: 'drugDamaged',
56
       name: 'drugDamaged',
57
       meta: { title: 'drugDamaged', noCache: true }
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
       path: '/stock/drugs/inventoryPrint',
72
       path: '/stock/drugs/inventoryPrint',
73
       component: () => import('@/xt_pages/stock/drugs/inventoryPrint'),
73
       component: () => import('@/xt_pages/stock/drugs/inventoryPrint'),

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

42
       name: 'cancelStockOrder',
42
       name: 'cancelStockOrder',
43
       meta: { title: 'cancelStockOrder', noCache: true }
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
       path: '/stock/stockModifyPricePrint',
52
       path: '/stock/stockModifyPricePrint',
53
       component: () => import('@/xt_pages/stock/stockModifyPricePrint'),
53
       component: () => import('@/xt_pages/stock/stockModifyPricePrint'),
56
       is_menu: false,
56
       is_menu: false,
57
       meta: { title: 'stockModifyPricePrint', noCache: true }
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
       path: '/stock/stockDamagePrint',
66
       path: '/stock/stockDamagePrint',
67
       component: () => import('@/xt_pages/stock/stockDamagePrint'),
67
       component: () => import('@/xt_pages/stock/stockDamagePrint'),
70
       is_menu: false,
70
       is_menu: false,
71
       meta: { title: 'stockModifyPricePrint', noCache: true }
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
       path: '/stock/stockInventory',
80
       path: '/stock/stockInventory',
81
       component: () => import('@/xt_pages/stock/stockInventory'),
81
       component: () => import('@/xt_pages/stock/stockInventory'),

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

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

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

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

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

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

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

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

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

164
             </template>
164
             </template>
165
           </el-table-column>
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
              <template slot="header" slot-scope="scope">
168
              <template slot="header" slot-scope="scope">
196
               <span>有效日期<span style="color: red">*</span></span>
169
               <span>有效日期<span style="color: red">*</span></span>
197
             </template>
170
             </template>
212
             </template>
185
             </template>
213
           </el-table-column>
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
       <el-table-column label="经销商" width="140" align="center">
217
       <el-table-column label="经销商" width="140" align="center">
217
           <template slot-scope="scope">
218
           <template slot-scope="scope">

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

226
               {{ calculate(scope.row.last_price * scope.row.warehousing_count) }} 
226
               {{ calculate(scope.row.last_price * scope.row.warehousing_count) }} 
227
             </template>
227
             </template>
228
           </el-table-column>
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
             <template slot-scope="scope">
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
             </template>
249
             </template>
241
           </el-table-column>
250
           </el-table-column>
242
 
251
 
254
             </template>
263
             </template>
255
           </el-table-column>
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
             <template slot-scope="scope">
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
             </template>
277
             </template>
270
           </el-table-column>
278
           </el-table-column>
279
+       
271
 
280
 
272
           <el-table-column label="经销商" width="140" align="center">
281
           <el-table-column label="经销商" width="140" align="center">
273
             <template slot-scope="scope">
282
             <template slot-scope="scope">
399
         warehousing_count: [
408
         warehousing_count: [
400
           { required: true, message: "数量不能为空", trigge: "blur" }
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
       total: "",
417
       total: "",

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

709
       }
709
       }
710
       const ids = [];
710
       const ids = [];
711
       for (let i = 0; i < this.selectedTableData.length; i++) {
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
         if(this.selectedTableData[i].is_sys == 0){
716
         if(this.selectedTableData[i].is_sys == 0){
713
           ids.push(this.selectedTableData[i].id);
717
           ids.push(this.selectedTableData[i].id);
714
         }
718
         }

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

112
         </el-table-column>
112
         </el-table-column>
113
         <el-table-column prop="drug_name" label="出库数量" align="center">
113
         <el-table-column prop="drug_name" label="出库数量" align="center">
114
            <template slot-scope="scope">
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
                 <span>
116
                 <span>
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)}}
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
                 </span>
118
                 </span>
119
              </span>
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
            </template>
124
            </template>
122
         </el-table-column>
125
         </el-table-column>
123
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
126
         <el-table-column prop="drug_name" label="剩余库存量" align="center">
124
            <template slot-scope="scope">
127
            <template slot-scope="scope">
125
             <div v-if="getWarehoseInfo(scope.row.drug_warehouse_info)!=0">
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
                 {{ 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}}
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
                </span>
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
             </div>
135
             </div>
132
            </template>
136
            </template>
133
         </el-table-column>
137
         </el-table-column>
198
       this.drugTypeList.push(...drugTypeList)
202
       this.drugTypeList.push(...drugTypeList)
199
       this.org_id =  this.$store.getters.xt_user.org.id
203
       this.org_id =  this.$store.getters.xt_user.org.id
200
       console.log("机构ID",this.org_id)
204
       console.log("机构ID",this.org_id)
201
-      this.getDrugCountList()
205
+      // this.getDrugCountList()
202
 
206
 
203
 
207
 
204
     },
208
     },
363
       handleSizeChange(val) {
367
       handleSizeChange(val) {
364
         this.limit = val
368
         this.limit = val
365
         this.getlist()
369
         this.getlist()
366
-        this.getDrugCountList()
367
       },
370
       },
368
       handleCurrentChange(val) {
371
       handleCurrentChange(val) {
369
         this.page = val
372
         this.page = val
370
         this.getlist()
373
         this.getlist()
371
-        this.getDrugCountList()
372
       },
374
       },
373
       calculate: function(val) {
375
       calculate: function(val) {
374
         return Math.round(parseFloat(val) * 100) / 100
376
         return Math.round(parseFloat(val) * 100) / 100
429
       },
431
       },
430
       search: function() {
432
       search: function() {
431
         this.getlist()
433
         this.getlist()
432
-        this.getDrugCountList()
433
       },
434
       },
434
       setting: function() {
435
       setting: function() {
435
         this.$refs.dialog.show()
436
         this.$refs.dialog.show()
441
            this.tableList[i].drug_type_name = this.getDrugType(this.tableList[i].drug_type)
442
            this.tableList[i].drug_type_name = this.getDrugType(this.tableList[i].drug_type)
442
            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
            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
            this.tableList[i].manufacturer_name = this.getManufacturerList(this.tableList[i].manufacturer)
444
            this.tableList[i].manufacturer_name = this.getManufacturerList(this.tableList[i].manufacturer)
444
-
445
+        
445
           this.tableList[i].inCount =  this.getWarehoseInfo(this.tableList[i].drug_warehouse_info)
446
           this.tableList[i].inCount =  this.getWarehoseInfo(this.tableList[i].drug_warehouse_info)
446
           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
           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
           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)
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
               {{calculate(scope.row.price*scope.row.warehousing_count)}}
128
               {{calculate(scope.row.price*scope.row.warehousing_count)}}
129
             </template>
129
             </template>
130
           </el-table-column>
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
           <el-table-column  align="center" width="180">
131
           <el-table-column  align="center" width="180">
155
             <template slot="header" slot-scope="scope">
132
             <template slot="header" slot-scope="scope">
156
               <span>有效日期<span style="color: red">*</span></span>
133
               <span>有效日期<span style="color: red">*</span></span>
165
              </el-form-item>
142
              </el-form-item>
166
             </template>
143
             </template>
167
           </el-table-column>
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
          <el-table-column align="center" width="150">
170
          <el-table-column align="center" width="150">
170
             <template slot="header" slot-scope="scope">
171
             <template slot="header" slot-scope="scope">

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

212
               {{ calculate(scope.row.price * scope.row.warehousing_count) }}
212
               {{ calculate(scope.row.price * scope.row.warehousing_count) }}
213
             </template>
213
             </template>
214
           </el-table-column>
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
              <template slot-scope="scope">
247
              <template slot-scope="scope">
217
                <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
248
                <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
218
                 <el-option
249
                 <el-option
238
               </el-form-item>
269
               </el-form-item>
239
             </template>
270
             </template>
240
           </el-table-column>
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
            <el-table-column align="center" width="150">
273
            <el-table-column align="center" width="150">
269
             <template slot="header" slot-scope="scope">
274
             <template slot="header" slot-scope="scope">
270
               <span>批准文号</span>
275
               <span>批准文号</span>
394
           { required: true, message: "数量不能为空", trigge: "blur" }
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
       total: "",
408
       total: "",

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

1012
       }
1012
       }
1013
       const ids = [];
1013
       const ids = [];
1014
       for (let i = 0; i < this.selectedTableData.length; i++) {
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
          if(this.selectedTableData[i].is_sys == 0){
1019
          if(this.selectedTableData[i].is_sys == 0){
1016
            ids.push(this.selectedTableData[i].id);
1020
            ids.push(this.selectedTableData[i].id);
1017
          }
1021
          }

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

118
             </template>
118
             </template>
119
           </el-table-column>
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
          <el-table-column  width="150" align="center">
123
          <el-table-column  width="150" align="center">
141
             <template slot="header" slot-scope="scope">
124
             <template slot="header" slot-scope="scope">
463
       tempObj["product_date"] = ""
446
       tempObj["product_date"] = ""
464
       tempObj["license_number"] = ""
447
       tempObj["license_number"] = ""
465
       tempObj["warehouse_info_id"] = 0
448
       tempObj["warehouse_info_id"] = 0
466
-     
467
       this.recordInfo.recordData.push(tempObj);
449
       this.recordInfo.recordData.push(tempObj);
468
     },
450
     },
469
     handleDelete: function(index, row) {
451
     handleDelete: function(index, row) {
784
     tempObj["dealer"] = ""
766
     tempObj["dealer"] = ""
785
     tempObj["license_number"] = ""
767
     tempObj["license_number"] = ""
786
     tempObj["warehouse_info_id"] = 0
768
     tempObj["warehouse_info_id"] = 0
769
+    
787
     this.recordInfo.recordData.push(tempObj);
770
     this.recordInfo.recordData.push(tempObj);
788
     this.GetConfigInfo();
771
     this.GetConfigInfo();
789
     this.propForm.goodUnit = this.$store.getters.good_unit;
772
     this.propForm.goodUnit = this.$store.getters.good_unit;

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

168
           align="center"
168
           align="center"
169
         >
169
         >
170
           <template slot-scope="scope">
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
             <span v-else>{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
172
             <span v-else>{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span> 
173
           </template>
173
           </template>
174
         </el-table-column>
174
         </el-table-column>
341
             >
341
             >
342
           </template>
342
           </template>
343
         </el-table-column>
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
         <el-table-column
355
         <el-table-column
345
           label="终止时间"
356
           label="终止时间"
346
           width="180"
357
           width="180"
4344
     },
4355
     },
4345
     // 获取勾选中的行
4356
     // 获取勾选中的行
4346
     getPrintInfo(ids) {
4357
     getPrintInfo(ids) {
4347
-      getPrintInfo({ ids: ids }).then(response => {
4358
+      getPrintInfo({ ids: ids}).then(response => {
4348
         if (response.data.state === 1) {
4359
         if (response.data.state === 1) {
4349
           var doctoradvice = response.data.data.doctoradvice;
4360
           var doctoradvice = response.data.data.doctoradvice;
4350
-          // console.log("doctoradvice", doctoradvice);
4361
+          console.log("doctoradvice", doctoradvice);
4362
+         
4351
           this.dataAdvice = doctoradvice;
4363
           this.dataAdvice = doctoradvice;
4352
           if (this.adviceType === 3 || this.adviceType === 2 || this.adviceType == 4) {
4364
           if (this.adviceType === 3 || this.adviceType === 2 || this.adviceType == 4) {
4365
+           
4353
             this.lstableData = this.dataAdvice;
4366
             this.lstableData = this.dataAdvice;
4354
-            // console.log("---", this.multipleSelection);
4367
+            
4355
           } else if (this.adviceType === 1) {
4368
           } else if (this.adviceType === 1) {
4356
             this.cqtableData = doctoradvice;
4369
             this.cqtableData = doctoradvice;
4357
           }
4370
           }