XMLWAN 3 lat temu
rodzic
commit
98a8a5feaf

+ 3 - 20
src/xt_pages/stock/Dialog/goodInfoDailog.vue Wyświetl plik

@@ -15,12 +15,6 @@
15 15
             <el-form-item label="耗材名称 : " prop="good_name" style="width:100%">
16 16
               <el-input v-model="form.good_name" placeholder="" maxlength="30"></el-input>
17 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 18
             <el-form-item label="耗材种类 : " prop="good_kind">
25 19
               <el-select v-model="form.good_kind" style="width:160px;" placeholder="请选择">
26 20
                 <el-option
@@ -63,8 +57,8 @@
63 57
                 <el-form-item prop="min_number" class="noMargin">
64 58
                   <el-input v-model="form.min_number" :disabled="showMinNumber" style="width:100px" type="number" placeholder="拆零"> </el-input>
65 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 62
                     <el-option
69 63
                       v-for="(item,index) in getDataConfig('hemodialysis','units')"
70 64
                       :key="index"
@@ -72,18 +66,7 @@
72 66
                       :value="item.name">
73 67
                     </el-option>
74 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 70
             </div>
88 71
 
89 72
             <el-form-item label="生产厂商 : " prop="manufacturer" style="width:100%">

+ 14 - 5
src/xt_pages/stock/drugs/drugStockInOrder.vue Wyświetl plik

@@ -1,7 +1,6 @@
1 1
 <template>
2 2
   <div class="main-contain">
3 3
     <div class="position">
4
-      <!--<bread-crumb :crumbs='crumbs'></bread-crumb>-->
5 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
6 5
       <el-button
7 6
         size="small"
@@ -71,9 +70,8 @@
71 70
           @change="changeAllSelected"
72 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 75
       </div>
78 76
 
79 77
       <el-table
@@ -478,7 +476,8 @@ export default {
478 476
       dialogVisible:false,
479 477
       showOne:false,
480 478
       drugTypeList:[],
481
-      manufacturerList:[]
479
+      manufacturerList:[],
480
+      order_id:""
482 481
     };
483 482
   },
484 483
   methods: {
@@ -735,6 +734,8 @@ export default {
735 734
       }
736 735
     },
737 736
     select(selection) {
737
+      console.log("selection",selection)
738
+      this.order_id = selection[0].id
738 739
       this.selectedTableData = selection;
739 740
     },
740 741
     batchDelete() {
@@ -823,6 +824,14 @@ export default {
823 824
      getDictionaryDataConfig(module, filed_name) {
824 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 837
 </script>

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderDetailPrint.vue Wyświetl plik

@@ -2,7 +2,7 @@
2 2
   <div class="main-contain">
3 3
     <div class="position">
4 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 6
       </el-button>
7 7
     </div>
8 8
     <div class="app-container ">

+ 11 - 4
src/xt_pages/stock/drugs/drugStockOutOrder.vue Wyświetl plik

@@ -68,9 +68,8 @@
68 68
           @change="changeAllSelected"
69 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 73
       </div>
75 74
 
76 75
       <el-table
@@ -594,6 +593,7 @@ export default {
594 593
       tableShow:false,
595 594
       manufacturerList:[],
596 595
       drugDialogVisible:false,
596
+      order_id:0,
597 597
     };
598 598
   },
599 599
   methods: {
@@ -827,6 +827,7 @@ export default {
827 827
       }
828 828
     },
829 829
     select(selection) {
830
+      this.order_id = selection[0].id
830 831
       this.selectedTableData = selection;
831 832
     },
832 833
     batchDelete() {
@@ -1068,7 +1069,13 @@ export default {
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 Wyświetl plik

@@ -113,18 +113,6 @@
113 113
           </template>
114 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 116
         <el-table-column label="操作" align="center" width="260px">
129 117
           <template slot-scope="scope">
130 118
             <!-- <el-tooltip

+ 30 - 8
src/xt_pages/stock/stockInOrderAdd.vue Wyświetl plik

@@ -186,7 +186,18 @@
186 186
 
187 187
             </template>
188 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 202
           <el-table-column label="备注" align="center" width="150">
192 203
             <template slot-scope="scope">
@@ -348,7 +359,7 @@
348 359
         },
349 360
 
350 361
         manufacturer: [],
351
-        dealer: [],
362
+        dealerList: [],
352 363
         goodType: [],
353 364
         manufacturerList:[],
354 365
         goodList:[]
@@ -636,7 +647,6 @@
636 647
           if (valid) {
637 648
             const array = this.recordInfo.recordData
638 649
             console.log("array9999999",array)
639
-           
640 650
             for (let i = 0; i < array.length; i++) {
641 651
               if (array[i].good_type_id == 0) {
642 652
                 this.$message.error('商品类型不能为空')
@@ -649,10 +659,18 @@
649 659
               this.$message.success('请添加入库商品')
650 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 670
             const params = {
654 671
               'stockIn': this.recordInfo.recordData
655 672
             }
673
+            console.log("stockIn",this.recordInfo.recordData)
656 674
            
657 675
             postWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
658 676
               if (response.data.state == 0) {
@@ -672,7 +690,8 @@
672 690
       ,
673 691
       changeManufacturer(val) {
674 692
 
675
-      }, changeDealer(val) {
693
+      }, 
694
+      changeDealer(val) {
676 695
 
677 696
       },
678 697
       getDataConfig(module, filed_name){
@@ -683,14 +702,16 @@
683 702
         if (keyword != undefined) {
684 703
           key = keyword
685 704
         }
686
-        console.log("keyrowrd",key)
687 705
         postSearchGoodList(key).then(response => {
688 706
           if (response.data.state == 1) {
689 707
            
690 708
              var list = response.data.data.list
709
+             
691 710
              this.goodList = list
692 711
              var manufacturerList = response.data.data.manufacturerList
693 712
              this.manufacturerList = manufacturerList
713
+             var dealer =  response.data.data.dealer
714
+             this.dealerList = dealer
694 715
              for(let i=0;i<this.goodList.length;i++){
695 716
                 for(let j=0;j<this.manufacturerList.length;j++){
696 717
                   if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
@@ -715,14 +736,15 @@
715 736
               this.recordInfo.recordData[i].good_type_id = val.id
716 737
               this.recordInfo.recordData[i].good_name = val.good_name
717 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 740
               this.recordInfo.recordData[i].number =  val.number
720 741
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
721 742
               this.recordInfo.recordData[i].remark = val.remark
722 743
               this.recordInfo.recordData[i].price = val.buy_price
723 744
               this.recordInfo.recordData[i].specification_name = val.specification_name
724 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
       }