XMLWAN 3 years ago
parent
commit
98a8a5feaf

+ 3 - 20
src/xt_pages/stock/Dialog/goodInfoDailog.vue View File

15
             <el-form-item label="耗材名称 : " prop="good_name" style="width:100%">
15
             <el-form-item label="耗材名称 : " prop="good_name" style="width:100%">
16
               <el-input v-model="form.good_name" placeholder="" maxlength="30"></el-input>
16
               <el-input v-model="form.good_name" placeholder="" maxlength="30"></el-input>
17
             </el-form-item>
17
             </el-form-item>
18
-            <!-- <el-form-item label="拼音 : " prop="pinyin" style="width:50%">
19
-              <el-input v-model="form.pinyin" placeholder="" maxlength="30"></el-input>
20
-            </el-form-item>
21
-            <el-form-item label="五笔 : " prop="wubi" style="width:50%">
22
-              <el-input v-model="form.wubi" placeholder="" maxlength="30"></el-input>
23
-            </el-form-item> -->
24
             <el-form-item label="耗材种类 : " prop="good_kind">
18
             <el-form-item label="耗材种类 : " prop="good_kind">
25
               <el-select v-model="form.good_kind" style="width:160px;" placeholder="请选择">
19
               <el-select v-model="form.good_kind" style="width:160px;" placeholder="请选择">
26
                 <el-option
20
                 <el-option
63
                 <el-form-item prop="min_number" class="noMargin">
57
                 <el-form-item prop="min_number" class="noMargin">
64
                   <el-input v-model="form.min_number" :disabled="showMinNumber" style="width:100px" type="number" placeholder="拆零"> </el-input>
58
                   <el-input v-model="form.min_number" :disabled="showMinNumber" style="width:100px" type="number" placeholder="拆零"> </el-input>
65
                 </el-form-item>
59
                 </el-form-item>
66
-                <!-- <el-form-item prop="min_unit" class="noMargin">
67
-                  <el-select v-model="form.min_unit" style="width:160px;"  placeholder="拆零单位"  @change="changeMinUnit">
60
+                <el-form-item prop="packing_unit" class="noMargin">
61
+                  <el-select v-model="form.packing_unit" style="width:160px;" placeholder="包装单位" @change="changePackingUnit">
68
                     <el-option
62
                     <el-option
69
                       v-for="(item,index) in getDataConfig('hemodialysis','units')"
63
                       v-for="(item,index) in getDataConfig('hemodialysis','units')"
70
                       :key="index"
64
                       :key="index"
72
                       :value="item.name">
66
                       :value="item.name">
73
                     </el-option>
67
                     </el-option>
74
                   </el-select>
68
                   </el-select>
75
-              </el-form-item> -->
76
-
77
-              <el-form-item prop="packing_unit" class="noMargin">
78
-                <el-select v-model="form.packing_unit" style="width:160px;" placeholder="包装单位" @change="changePackingUnit">
79
-                  <el-option
80
-                    v-for="(item,index) in getDataConfig('hemodialysis','units')"
81
-                    :key="index"
82
-                    :label="item.name"
83
-                    :value="item.name">
84
-                  </el-option>
85
-                </el-select>
86
-              </el-form-item>
69
+                </el-form-item>
87
             </div>
70
             </div>
88
 
71
 
89
             <el-form-item label="生产厂商 : " prop="manufacturer" style="width:100%">
72
             <el-form-item label="生产厂商 : " prop="manufacturer" style="width:100%">

+ 14 - 5
src/xt_pages/stock/drugs/drugStockInOrder.vue View File

1
 <template>
1
 <template>
2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
-      <!--<bread-crumb :crumbs='crumbs'></bread-crumb>-->
5
       <bread-crumb :crumbs="crumbs"></bread-crumb>
4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
6
       <el-button
5
       <el-button
7
         size="small"
6
         size="small"
71
           @change="changeAllSelected"
70
           @change="changeAllSelected"
72
           >全选</el-checkbox
71
           >全选</el-checkbox
73
         >
72
         >
74
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
75
-          >删除</el-button
76
-        >
73
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
74
+        <el-button size="small" type="primary" @click="drugPrint()">打印</el-button>
77
       </div>
75
       </div>
78
 
76
 
79
       <el-table
77
       <el-table
478
       dialogVisible:false,
476
       dialogVisible:false,
479
       showOne:false,
477
       showOne:false,
480
       drugTypeList:[],
478
       drugTypeList:[],
481
-      manufacturerList:[]
479
+      manufacturerList:[],
480
+      order_id:""
482
     };
481
     };
483
   },
482
   },
484
   methods: {
483
   methods: {
735
       }
734
       }
736
     },
735
     },
737
     select(selection) {
736
     select(selection) {
737
+      console.log("selection",selection)
738
+      this.order_id = selection[0].id
738
       this.selectedTableData = selection;
739
       this.selectedTableData = selection;
739
     },
740
     },
740
     batchDelete() {
741
     batchDelete() {
823
      getDictionaryDataConfig(module, filed_name) {
824
      getDictionaryDataConfig(module, filed_name) {
824
         return getDictionaryDataConfig(module, filed_name)
825
         return getDictionaryDataConfig(module, filed_name)
825
       },
826
       },
827
+    drugPrint(){
828
+      if(this.order_id == 0){
829
+         this.$message.error("请选择入库单")
830
+      }else{
831
+        this.$router.push({path:"/stock/drugStockInOrderDetailPrint?id="+this.order_id})
832
+      }
833
+      
834
+    }
826
   }
835
   }
827
 };
836
 };
828
 </script>
837
 </script>

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue View File

2
   <div class="main-contain">
2
   <div class="main-contain">
3
     <div class="position">
3
     <div class="position">
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-      <el-button :loading="loading" size="small" icon="el-icon-printer" @click="printThisPage" type="primary">打印
5
+      <el-button  size="small" icon="el-icon-printer" @click="printThisPage" type="primary">打印
6
       </el-button>
6
       </el-button>
7
     </div>
7
     </div>
8
     <div class="app-container ">
8
     <div class="app-container ">

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

68
           @change="changeAllSelected"
68
           @change="changeAllSelected"
69
           >全选</el-checkbox
69
           >全选</el-checkbox
70
         >
70
         >
71
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
72
-          >删除</el-button
73
-        >
71
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
72
+        <el-button size="small" type="primary" @click="toPrint">打印</el-button>
74
       </div>
73
       </div>
75
 
74
 
76
       <el-table
75
       <el-table
594
       tableShow:false,
593
       tableShow:false,
595
       manufacturerList:[],
594
       manufacturerList:[],
596
       drugDialogVisible:false,
595
       drugDialogVisible:false,
596
+      order_id:0,
597
     };
597
     };
598
   },
598
   },
599
   methods: {
599
   methods: {
827
       }
827
       }
828
     },
828
     },
829
     select(selection) {
829
     select(selection) {
830
+      this.order_id = selection[0].id
830
       this.selectedTableData = selection;
831
       this.selectedTableData = selection;
831
     },
832
     },
832
     batchDelete() {
833
     batchDelete() {
1068
        }
1069
        }
1069
      })
1070
      })
1070
    },
1071
    },
1071
-
1072
+   toPrint(){
1073
+     if(this.order_id == 0){
1074
+        this.$message.error("请选择出库单")
1075
+     }else{
1076
+       this.$router.push({path:"/stock/drugStockOutOrderDetailPrint?id="+this.order_id})
1077
+     }
1078
+   }
1072
     
1079
     
1073
   }
1080
   }
1074
 };
1081
 };

+ 0 - 12
src/xt_pages/stock/stockInOrder.vue View File

113
           </template>
113
           </template>
114
         </el-table-column>
114
         </el-table-column>
115
 
115
 
116
-        <el-table-column label="厂家" align="center">
117
-          <template slot-scope="scope">
118
-            {{ getManufactuerName(scope.row.manufacturer) }}
119
-          </template>
120
-        </el-table-column>
121
-
122
-        <el-table-column label="经销商" align="center">
123
-          <template slot-scope="scope">
124
-            {{ getDealerName(scope.row.dealer) }}
125
-          </template>
126
-        </el-table-column>
127
-
128
         <el-table-column label="操作" align="center" width="260px">
116
         <el-table-column label="操作" align="center" width="260px">
129
           <template slot-scope="scope">
117
           <template slot-scope="scope">
130
             <!-- <el-tooltip
118
             <!-- <el-tooltip

+ 30 - 8
src/xt_pages/stock/stockInOrderAdd.vue View File

186
 
186
 
187
             </template>
187
             </template>
188
           </el-table-column>
188
           </el-table-column>
189
-         
189
+           <el-table-column label="经销商" align="center" width="150">
190
+             <template slot-scope="scope">
191
+               <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
192
+                <el-option
193
+                  v-for="(option, index) in manufacturerList"
194
+                  :key="index"
195
+                  :label="option.manufacturer_name"
196
+                  :value="option.id">
197
+                </el-option>
198
+               </el-select>
199
+            </template>
200
+          </el-table-column>
190
 
201
 
191
           <el-table-column label="备注" align="center" width="150">
202
           <el-table-column label="备注" align="center" width="150">
192
             <template slot-scope="scope">
203
             <template slot-scope="scope">
348
         },
359
         },
349
 
360
 
350
         manufacturer: [],
361
         manufacturer: [],
351
-        dealer: [],
362
+        dealerList: [],
352
         goodType: [],
363
         goodType: [],
353
         manufacturerList:[],
364
         manufacturerList:[],
354
         goodList:[]
365
         goodList:[]
636
           if (valid) {
647
           if (valid) {
637
             const array = this.recordInfo.recordData
648
             const array = this.recordInfo.recordData
638
             console.log("array9999999",array)
649
             console.log("array9999999",array)
639
-           
640
             for (let i = 0; i < array.length; i++) {
650
             for (let i = 0; i < array.length; i++) {
641
               if (array[i].good_type_id == 0) {
651
               if (array[i].good_type_id == 0) {
642
                 this.$message.error('商品类型不能为空')
652
                 this.$message.error('商品类型不能为空')
649
               this.$message.success('请添加入库商品')
659
               this.$message.success('请添加入库商品')
650
               return
660
               return
651
             }
661
             }
652
-          
662
+            for(let i=0;i<this.recordInfo.recordData.length;i++){
663
+              for(let j=0;j<this.manufacturerList.length;j++){
664
+                 if(this.recordInfo.recordData[i].manufacturer == this.manufacturerList[j].manufacturer_name){
665
+               
666
+                  this.recordInfo.recordData[i].manufacturer = this.manufacturerList[j].id
667
+                 }
668
+              }
669
+            }
653
             const params = {
670
             const params = {
654
               'stockIn': this.recordInfo.recordData
671
               'stockIn': this.recordInfo.recordData
655
             }
672
             }
673
+            console.log("stockIn",this.recordInfo.recordData)
656
            
674
            
657
             postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
675
             postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
658
               if (response.data.state == 0) {
676
               if (response.data.state == 0) {
672
       ,
690
       ,
673
       changeManufacturer(val) {
691
       changeManufacturer(val) {
674
 
692
 
675
-      }, changeDealer(val) {
693
+      }, 
694
+      changeDealer(val) {
676
 
695
 
677
       },
696
       },
678
       getDataConfig(module, filed_name){
697
       getDataConfig(module, filed_name){
683
         if (keyword != undefined) {
702
         if (keyword != undefined) {
684
           key = keyword
703
           key = keyword
685
         }
704
         }
686
-        console.log("keyrowrd",key)
687
         postSearchGoodList(key).then(response => {
705
         postSearchGoodList(key).then(response => {
688
           if (response.data.state == 1) {
706
           if (response.data.state == 1) {
689
            
707
            
690
              var list = response.data.data.list
708
              var list = response.data.data.list
709
+             
691
              this.goodList = list
710
              this.goodList = list
692
              var manufacturerList = response.data.data.manufacturerList
711
              var manufacturerList = response.data.data.manufacturerList
693
              this.manufacturerList = manufacturerList
712
              this.manufacturerList = manufacturerList
713
+             var dealer =  response.data.data.dealer
714
+             this.dealerList = dealer
694
              for(let i=0;i<this.goodList.length;i++){
715
              for(let i=0;i<this.goodList.length;i++){
695
                 for(let j=0;j<this.manufacturerList.length;j++){
716
                 for(let j=0;j<this.manufacturerList.length;j++){
696
                   if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
717
                   if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
715
               this.recordInfo.recordData[i].good_type_id = val.id
736
               this.recordInfo.recordData[i].good_type_id = val.id
716
               this.recordInfo.recordData[i].good_name = val.good_name
737
               this.recordInfo.recordData[i].good_name = val.good_name
717
               this.recordInfo.recordData[i].good_type_id = val.good_type_id
738
               this.recordInfo.recordData[i].good_type_id = val.good_type_id
718
-              this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.min_unit
739
+              this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.packing_unit
719
               this.recordInfo.recordData[i].number =  val.number
740
               this.recordInfo.recordData[i].number =  val.number
720
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
741
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
721
               this.recordInfo.recordData[i].remark = val.remark
742
               this.recordInfo.recordData[i].remark = val.remark
722
               this.recordInfo.recordData[i].price = val.buy_price
743
               this.recordInfo.recordData[i].price = val.buy_price
723
               this.recordInfo.recordData[i].specification_name = val.specification_name
744
               this.recordInfo.recordData[i].specification_name = val.specification_name
724
               this.recordInfo.recordData[i].good_id = val.id
745
               this.recordInfo.recordData[i].good_id = val.id
725
-              this.recordInfo.recordData[i].min_unit = val.min_unit
746
+              this.recordInfo.recordData[i].packing_unit = val.packing_unit
747
+
726
            }
748
            }
727
          }
749
          }
728
       }
750
       }