Просмотр исходного кода

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

XMLWAN 3 лет назад
Родитель
Сommit
d5e7c2704a

+ 2 - 2
src/views/layout/Layout.vue Просмотреть файл

@@ -19,8 +19,8 @@
19 19
 
20 20
        <div v-if="caigouShow" :class="index == 5 ? 'navOne navActive' : 'navOne'" @click="clickActive(5,'采购管理')">
21 21
          <i class="iconfont icon-kccx navIcon"></i>
22
-        <p>采购管理</p>
23
-       </div>
22
+         <p>采购管理</p>
23
+      </div>
24 24
 
25 25
         <div v-if="kucunShow" :class="index == 3 ? 'navOne navActive' : 'navOne'" @click="clickActive(3,'库房管理')">
26 26
           <i class="iconfont icon-kccx navIcon"></i>

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

@@ -43,7 +43,7 @@
43 43
       <el-form-item label="职位 : ">
44 44
         <el-input v-model="form.user_title_name" placeholder="输入职位"></el-input>
45 45
       </el-form-item>
46
-      
46
+
47 47
       <el-form-item label="介绍 : ">
48 48
         <Tinymce :height="400" menubar ref="editor" v-model="form.intro" :show_upload_img="false"/>
49 49
       </el-form-item>

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

@@ -60,7 +60,7 @@
60 60
         </div>
61 61
       </div>
62 62
 
63
-      
63
+
64 64
 
65 65
       <div class="cell clearfix">
66 66
         <el-checkbox
@@ -135,8 +135,8 @@
135 135
 
136 136
         <el-table-column label="操作" align="center" width="240">
137 137
           <template slot-scope="scope">
138
-           
139
-         
138
+
139
+
140 140
             <el-tooltip
141 141
               class="item"
142 142
               effect="dark"
@@ -261,7 +261,7 @@
261 261
           </el-table-column>
262 262
           <el-table-column label="批准文号" align="center">
263 263
             <template slot-scope="scope">
264
-             <span v-if="scope.row.number!=''">{{scope.row.number}}</span> 
264
+             <span v-if="scope.row.number!=''">{{scope.row.number}}</span>
265 265
              <span v-if="scope.row.number == '0'"></span>
266 266
             </template>
267 267
           </el-table-column>
@@ -323,7 +323,7 @@
323 323
               <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
324 324
             </template>
325 325
           </el-table-column>
326
-      
326
+
327 327
         </el-table>
328 328
       </span>
329 329
       <span slot="footer" class="dialog-footer">
@@ -538,7 +538,7 @@ export default {
538 538
           for (let i = 0; i < response.data.data.list.length; i++) {
539 539
             this.warehouseOutDate.push(response.data.data.list[i]);
540 540
           }
541
-         
541
+
542 542
         }
543 543
       });
544 544
     },
@@ -627,11 +627,11 @@ export default {
627 627
     },
628 628
 
629 629
     handleEdit: function(index, row) {
630
-   
630
+
631 631
       this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type+"&is_sys="+row.is_sys+"&supply_cancel_out_id="+row.supply_cancel_out_id})
632 632
     },
633 633
     handleSearch(val){
634
-      
634
+
635 635
        this.getInitializtion()
636 636
        this.getSinleOrderDetail(val.id,val.warehouse_out_time,val.is_sys)
637 637
        this.list = []
@@ -688,7 +688,7 @@ export default {
688 688
       }
689 689
     },
690 690
     select(selection) {
691
-     
691
+
692 692
       var ids= []
693 693
       for(let i=0;i<selection.length;i++){
694 694
          ids.push(selection[i].id)
@@ -699,7 +699,7 @@ export default {
699 699
     },
700 700
     batchDelete() {
701 701
       console.log("232322323",this.selectedTableData)
702
-      
702
+
703 703
       if (this.selectedTableData.length <= 0) {
704 704
         this.$message.error("请选择要删除的记录");
705 705
         return;
@@ -718,7 +718,7 @@ export default {
718 718
       }
719 719
       if(idsOne.length > 0){
720 720
         this.$message.error("采购出库数据不能删除!")
721
-        return 
721
+        return
722 722
       }
723 723
       const idStr = ids.join(",");
724 724
       const params = {
@@ -755,7 +755,7 @@ export default {
755 755
     },
756 756
 
757 757
     jump(id){
758
-    
758
+
759 759
       this.GetOrderDetailTwo(id)
760 760
       this.userList=[]
761 761
       this.dialogVisibleTwo = true
@@ -779,13 +779,13 @@ export default {
779 779
               this.userList.push(obj)
780 780
               total = total + response.data.data.list[i].count
781 781
             }
782
-           
782
+
783 783
             this.userList.push({
784 784
               is_total: 1,
785 785
               total: total,
786 786
             })
787 787
 
788
-            
788
+
789 789
           }
790 790
         })
791 791
       },
@@ -845,7 +845,7 @@ export default {
845 845
            var list =   response.data.data.list
846 846
            this.list = list
847 847
            var drugConfig =  response.data.data.drugConfig
848
-         
848
+
849 849
            this.drugConfig = drugConfig
850 850
            var drugList = response.data.data.drugList
851 851
            this.drugList = drugList
@@ -855,8 +855,8 @@ export default {
855 855
       })
856 856
     },
857 857
     getDrugCount(id){
858
-      
859
-      var count = 0 
858
+
859
+      var count = 0
860 860
       for(let i=0;i<this.list.length;i++){
861 861
          if(this.list[i].drug_id == id){
862 862
             count = this.list[i].Total
@@ -897,7 +897,7 @@ export default {
897 897
      for(let i=0;i<this.drugTypeList.length;i++){
898 898
        if(id == this.drugTypeList[i].value){
899 899
            name = this.drugTypeList[i].name
900
-       } 
900
+       }
901 901
      }
902 902
      return name
903 903
    },
@@ -924,13 +924,13 @@ export default {
924 924
          id:id,
925 925
          start_time:start_time,
926 926
        }
927
-      console.log("is_sys22222",is_sys) 
927
+      console.log("is_sys22222",is_sys)
928 928
      getSinleOrderDetail(params).then(response=>{
929 929
         if(response.data.state == 1){
930 930
           this.tableShow = true
931 931
           this.tableList = []
932 932
           var list =  response.data.data.list
933
-         
933
+
934 934
          this.manufacturerList = response.data.data.manufacturerList
935 935
          this.dealerList = response.data.data.dealerList
936 936
          var drugFlowList = response.data.data.drugFlowList
@@ -940,7 +940,7 @@ export default {
940 940
                   drugFlowList[i].count = drugFlowList[i].count * drugFlowList[i].XtBaseDrug.min_number
941 941
               }
942 942
               if(drugFlowList[i].count_unit == drugFlowList[i].XtBaseDrug.min_unit){
943
-                  drugFlowList[i].count = drugFlowList[i].count 
943
+                  drugFlowList[i].count = drugFlowList[i].count
944 944
               }
945 945
 
946 946
            }
@@ -954,7 +954,7 @@ export default {
954 954
                   flowlist[i].count = flowlist[i].count * list[i].min_number
955 955
               }
956 956
               if(flowlist[i].count_unit == flowlist[i].min_unit){
957
-                  flowlist[i].count = flowlist[i].count 
957
+                  flowlist[i].count = flowlist[i].count
958 958
               }
959 959
             }
960 960
             this.drugFlowList = flowlist
@@ -985,15 +985,15 @@ export default {
985 985
     //  console.log("使用明细",params)
986 986
      getAutoDrugDetail(params).then(response=>{
987 987
        if(response.data.state == 1){
988
-        
988
+
989 989
         this.userList = response.data.data.list
990 990
         console.log("自动出库数据",this.userList)
991 991
         if(val.is_sys == 1){
992
-        
992
+
993 993
           this.drugDialogVisible = true
994 994
         }
995 995
         if(val.is_sys == 0){
996
-         
996
+
997 997
           this.drugDialogVisibleTwo = true
998 998
         }
999 999
          var userListOne = response.data.data.outList
@@ -1019,7 +1019,7 @@ export default {
1019 1019
           start_time:this.start_time,
1020 1020
           end_time:this.end_time,
1021 1021
          }
1022
-       
1022
+
1023 1023
         getDrugCountList(params).then(response=>{
1024 1024
           if(response.data.state == 1){
1025 1025
             var countlist =  response.data.data.countList
@@ -1045,7 +1045,7 @@ export default {
1045 1045
           }
1046 1046
         })
1047 1047
       },
1048
-    
1048
+
1049 1049
       getCount(drug_id,min_number,max_unit,min_unit){
1050 1050
         var count= 0
1051 1051
         var str = ""
@@ -1082,12 +1082,12 @@ export default {
1082 1082
               min_str =  total%min_number + min_unit
1083 1083
             }
1084 1084
          }
1085
-        
1085
+
1086 1086
         if (total < min_number){
1087 1087
             str = ""
1088 1088
             min_str = total + min_unit
1089 1089
         }
1090
-       
1090
+
1091 1091
          return str + min_str
1092 1092
       },
1093 1093
       getTotalCountOne(id,min_number,max_unit,min_unit){
@@ -1112,7 +1112,7 @@ export default {
1112 1112
             min_str =  total%min_number + min_unit
1113 1113
           }
1114 1114
         }
1115
-        return str + min_str 
1115
+        return str + min_str
1116 1116
       },
1117 1117
 
1118 1118
       getAllPrice(drug_id,price,min_price){
@@ -1131,9 +1131,9 @@ export default {
1131 1131
             }
1132 1132
            }
1133 1133
          }
1134
-         strprice = str * price 
1135
-         minstrprice = min_str * min_price 
1136
-       
1134
+         strprice = str * price
1135
+         minstrprice = min_str * min_price
1136
+
1137 1137
          total_price = strprice + minstrprice
1138 1138
          return  total_price
1139 1139
       },
@@ -1149,7 +1149,7 @@ export default {
1149 1149
         }
1150 1150
         return arr.join(",")
1151 1151
       },
1152
-    
1152
+
1153 1153
       getExportOutOrderDrugList(){
1154 1154
 
1155 1155
          var params = {
@@ -1194,9 +1194,9 @@ export default {
1194 1194
                 this.exportList[i].dealer = this.dealerList[z].dealer_name
1195 1195
             }
1196 1196
           }
1197
-         
1197
+
1198 1198
         }
1199
-      
1199
+
1200 1200
        import('@/vendor/Export2Excel').then(excel => {
1201 1201
         for(let i=0;i<this.exportList.length;i++){
1202 1202
           for(let j=0;j<this.drugTypeList.length;j++){
@@ -1209,7 +1209,7 @@ export default {
1209 1209
         const filterVal = ['drug_name','drug_type','unit','batch_number', 'count','price','retail_price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
1210 1210
 
1211 1211
         // console.log("table",this.exportList)
1212
-         
1212
+
1213 1213
         const data = this.formatJson(filterVal, this.exportList)
1214 1214
         excel.export_json_to_excel({
1215 1215
           header: tHeader,
@@ -1231,7 +1231,7 @@ export default {
1231 1231
           }
1232 1232
         }
1233 1233
         all_price = total * price
1234
-      
1234
+
1235 1235
         return  all_price
1236 1236
       },
1237 1237
   }

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

@@ -130,7 +130,7 @@
130 130
                   </el-select>
131 131
                 </div>
132 132
               </el-form-item>
133
-              
133
+
134 134
             </template>
135 135
           </el-table-column>
136 136
          <el-table-column width="120" align="center">
@@ -138,7 +138,7 @@
138 138
               <span>出货价<span style="color: red">*</span></span>
139 139
             </template>
140 140
             <template slot-scope="scope">
141
-            
141
+
142 142
               <el-form-item
143 143
                 :prop="'recordData.' + scope.$index + '.price'"
144 144
                 :rules="tableRules.price"
@@ -380,7 +380,7 @@
380 380
         this.propForm.goods = [];
381 381
 
382 382
         this.propForm.goodType = [];
383
-      }, 
383
+      },
384 384
       GetConfigInfo: function() {
385 385
         const loading = this.$loading({
386 386
           lock: true,
@@ -419,7 +419,7 @@
419 419
         return name;
420 420
       },
421 421
       specificationName: function(drug_id) {
422
-      
422
+
423 423
         let name = "";
424 424
         for (let i = 0; i < this.goodInfo.length; i++) {
425 425
           if (this.goodInfo[i].id == drug_id) {
@@ -432,7 +432,7 @@
432 432
         if(row.supply_cancel_out_id >0){
433 433
          this.$message.error("采购出库数据不能新增!")
434 434
          return
435
-        } 
435
+        }
436 436
         this.unitShow = false
437 437
         if(this.drug_show == true){
438 438
           this.$message.error("自动出库数据不能编辑")
@@ -458,7 +458,7 @@
458 458
          this.$message.error("采购出库数据不能删除!")
459 459
          return
460 460
         }
461
-       
461
+
462 462
         if(this.drug_show == true){
463 463
           this.$message.error("采购出库数据不能编辑")
464 464
           return
@@ -487,7 +487,7 @@
487 487
           }).catch(() => {
488 488
           })
489 489
         }
490
-      }, 
490
+      },
491 491
       // getTime(val, temp) {
492 492
       //   if (val != 0) {
493 493
       //     return uParseTime(val, temp)
@@ -555,7 +555,7 @@
555 555
 
556 556
       back() {
557 557
         this.$router.go(-1)
558
-      }, 
558
+      },
559 559
       submit() {
560 560
         this.$refs['tableForm'].validate((valid) => {
561 561
           if (valid) {
@@ -581,7 +581,7 @@
581 581
                     this.recordInfo.recordData[i].dealer = this.dealerList[z].id
582 582
                  }
583 583
                }
584
-               
584
+
585 585
                for(let y=0;y<this.numberList.length;y++){
586 586
                   if(this.recordInfo.recordData[i].batch_number == this.numberList[y].id){
587 587
                      this.recordInfo.recordData[i].batch_number = this.numberList[y].batch_number
@@ -603,7 +603,7 @@
603 603
               'stockOut': this.recordInfo.recordData
604 604
             }
605 605
             console.log("param23322323233222323",params)
606
-           
606
+
607 607
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
608 608
               if (response.data.state == 0) {
609 609
                 this.$message.error(response.data.msg)
@@ -618,7 +618,7 @@
618 618
                 var min_unit =  response.data.data.min_unit
619 619
                 var max_unit =  response.data.data.max_unit
620 620
                 var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
621
-               loading.close()  
621
+               loading.close()
622 622
               if(msg == 1){
623 623
                 this.$message.error(str + "库存不足,请入库")
624 624
                 loading.close()
@@ -634,7 +634,7 @@
634 634
             return false
635 635
           }
636 636
         })
637
-      }, 
637
+      },
638 638
       GetOrderDetail: function(order_id) {
639 639
         const params = {
640 640
           'id': order_id
@@ -644,7 +644,7 @@
644 644
             this.$message.error(response.data.msg)
645 645
             return false
646 646
           } else {
647
-            
647
+
648 648
 
649 649
             var manulist = response.data.data.manulist
650 650
             this.manufacturerList = manulist
@@ -658,13 +658,13 @@
658 658
               }else{
659 659
                 response.data.data.list[i].number = response.data.data.list[i].number
660 660
               }
661
-              
661
+
662 662
               if(response.data.data.list[i].manufacturer == "0" || response.data.data.list[i].manufacturer == 0){
663 663
                 response.data.data.list[i].manufacturer = ""
664 664
               }else{
665 665
                 response.data.data.list[i].manufacturer = response.data.data.list[i].drug.manufacturer
666 666
               }
667
-              
667
+
668 668
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
669 669
               response.data.data.list[i].retail_price = response.data.data.list[i].price.toString()
670 670
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
@@ -673,7 +673,7 @@
673 673
               }else{
674 674
                 response.data.data.list[i].dealer = response.data.data.list[i].dealer
675 675
               }
676
-             
676
+
677 677
               response.data.data.list[i].product_date = this.getTime(response.data.data.list[i].product_date,"{y}-{h}-{d}")
678 678
               response.data.data.list[i].expiry_date = this.getTime(response.data.data.list[i].expiry_date,"{y}-{h}-{d}")
679 679
               this.recordInfo.recordData.push(response.data.data.list[i])
@@ -693,7 +693,7 @@
693 693
 
694 694
             this.warehouseOut = response.data.data.info
695 695
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
696
-          
696
+
697 697
 
698 698
           }
699 699
 
@@ -729,22 +729,22 @@
729 729
         postSearchDrugList(key).then(response => {
730 730
           if (response.data.state == 1) {
731 731
             searchArray = response.data.data.list;
732
-            
732
+
733 733
              var list = response.data.data.list
734
-            
734
+
735 735
 
736 736
              this.drugList = list
737 737
              var manufacturerList = response.data.data.manufacturerList
738 738
              this.manufacturerList = manufacturerList
739 739
              for(let i=0;i<this.drugList.length;i++){
740
-             
740
+
741 741
                 for(let j=0;j<this.manufacturerList.length;j++){
742 742
                   if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
743 743
                      this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
744 744
                   }
745 745
                 }
746 746
              }
747
-           
747
+
748 748
              cb(this.drugList)
749 749
           } else {
750 750
             cb([])
@@ -784,7 +784,7 @@
784 784
              }
785 785
            }
786 786
         }
787
- 
787
+
788 788
       },
789 789
       getDictionaryDataConfig(module, filed_name) {
790 790
         return getDictionaryDataConfig(module, filed_name)
@@ -799,14 +799,14 @@
799 799
         getDrugBatchNumber(params).then(response=>{
800 800
            if(response.data.state == 1){
801 801
              var list = response.data.data.list
802
-           
802
+
803 803
              this.numberList = list
804 804
            }
805 805
         })
806 806
       }
807 807
     },
808 808
     created() {
809
-      this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
809
+      this.drugTypeList = getDictionaryDataConfig('system','drug_type')
810 810
       this.GetConfigInfo()
811 811
       this.propForm.goodUnit = this.$store.getters.good_unit
812 812
       const order_id = this.$route.query.id

+ 54 - 22
src/xt_pages/supply/components/addGoodOrder.vue Просмотреть файл

@@ -16,7 +16,7 @@
16 16
           <span style="color: red">*</span><span>供应商:</span>
17 17
           <el-select
18 18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20 20
             placeholder="请选择"
21 21
             :disabled="disabled"
22 22
           >
@@ -76,7 +76,6 @@
76 76
           <el-button size="small" type="primary" @click="checkGoodOrder" v-if="is_check == 2" >审核</el-button>
77 77
           <el-button size="small" type="primary" @click="MofyGoodOrder" v-if="is_check == 1">反审核</el-button>
78 78
           <el-button size="small" type="primary" @click="toClick" v-if="is_check == 1" >生成采购退货单</el-button>
79
-          <el-button size="small" type="primary" @click="toPrint" v-show="showSix" >打印</el-button>
80 79
         </div>
81 80
       </div>
82 81
 
@@ -396,6 +395,13 @@
396 395
           >
397 396
           </el-input>
398 397
         </div>
398
+         <!-- 审核水印 -->
399
+        <img
400
+          src="@/assets/purchase/Reviewed.png"
401
+          alt="正在加载..."
402
+          class="reviewImg"
403
+          v-show="Reviewed == true"
404
+        />
399 405
       </el-form>
400 406
       <div>
401 407
         <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
@@ -484,6 +490,7 @@ export default {
484 490
   },
485 491
   data() {
486 492
     return {
493
+      Reviewed: false,
487 494
       crumbs: [
488 495
         { path: false, name: "采购单" },
489 496
         { path: "/supply/good/order/query", name: "新增采购单" },
@@ -554,14 +561,14 @@ export default {
554 561
       warese_out_id: 0,
555 562
       return_remark: "",
556 563
       is_warehouse:0,
557
-      tableDataList:[],
558
-      showSix:false,
564
+      tableDataList:[]
559 565
     };
560 566
   },
561 567
    watch: {
562 568
     total_price: function (newval, oldval) {
563 569
       if(this.rate_of_concession != ""){
564 570
         this.addressChange()
571
+        this.count_payment()
565 572
       }
566 573
     }
567 574
   },
@@ -706,7 +713,7 @@ export default {
706 713
           this.recordInfo.tableList[i].supply_type = val.supply_type;
707 714
           this.recordInfo.tableList[i].supply_specification_name = val.supply_specification_name;
708 715
           this.recordInfo.tableList[i].supply_total = val.supply_total;
709
-          this.recordInfo.tableList[i].min_price = val.min_price  
716
+          this.recordInfo.tableList[i].min_price = val.min_price
710 717
           if (val.supply_count == NaN) {
711 718
             this.recordInfo.tableList[i].supply_count = "";
712 719
           } else {
@@ -792,9 +799,9 @@ export default {
792 799
           min_str = (total % min_number) + min_unit;
793 800
         }
794 801
       }
795
-     
802
+
796 803
       return max_str + min_str;
797
-    
804
+
798 805
     },
799 806
     getTotalStockCount(arr) {
800 807
       var total_count = 0;
@@ -806,7 +813,7 @@ export default {
806 813
       }else{
807 814
         return ""
808 815
       }
809
-     
816
+
810 817
     },
811 818
 
812 819
     calculate: function (val) {
@@ -845,13 +852,15 @@ export default {
845 852
         ).toFixed(2);
846 853
       }
847 854
       this.discount_amount = discount_amount;
848
-     
855
+      if(this.payment > 0) this.count_payment()
856
+
849 857
     },
850 858
     count_discount() {
851 859
       this.rate_of_concession = (
852 860
         this.discount_amount /
853 861
         (this.total_price * 0.01)
854 862
       ).toFixed(2);
863
+      if(this.payment > 0) this.count_payment()
855 864
     },
856 865
     count_payment() {
857 866
       let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
@@ -947,7 +956,7 @@ export default {
947 956
           this.tableDataList = []
948 957
           this.tableDataList = orderInfo
949 958
           console.log("changed23323232233232",this.tableDataList)
950
-         
959
+
951 960
         }
952 961
       });
953 962
     },
@@ -1003,7 +1012,7 @@ export default {
1003 1012
               this.number = ""
1004 1013
              }
1005 1014
           }
1006
-          
1015
+
1007 1016
           var params = {
1008 1017
             stockIn: this.recordInfo.tableList,
1009 1018
             return_remake: this.return_remark,
@@ -1015,7 +1024,6 @@ export default {
1015 1024
               this.$message.success("保存成功!");
1016 1025
               this.showOne = false;
1017 1026
               this.showTwo = true;
1018
-              this.showSix = true
1019 1027
               var orderInfo = response.data.data.list;
1020 1028
               var warehouseOut = response.data.data.warehouseOut;
1021 1029
               this.is_check = 2
@@ -1153,6 +1161,7 @@ export default {
1153 1161
       getGoodOrderCountList(id, warehousing_id).then((response) => {
1154 1162
         if (response.data.state == 1) {
1155 1163
           this.$message.success("审核成功!");
1164
+          this.Reviewed = true;
1156 1165
           this.disabled = true
1157 1166
           this.is_check = 1
1158 1167
           this.showOne = false;
@@ -1162,7 +1171,7 @@ export default {
1162 1171
           var purcaseOrder = response.data.data.purcaseOrder;
1163 1172
           var goodOrder = response.data.data.goodOrder;
1164 1173
           var drugList = response.data.data.drugList;
1165
-     
1174
+
1166 1175
           var is_warehouse = 0;
1167 1176
           for (let i = 0; i < purcaseOrder.length; i++) {
1168 1177
             for (let j = 0; j < drugList.length; j++) {
@@ -1277,7 +1286,7 @@ export default {
1277 1286
             this.is_check = 2
1278 1287
             this.disabled = false
1279 1288
             this.Reviewed = false
1280
-           
1289
+
1281 1290
           }
1282 1291
           if (msg == 2) {
1283 1292
             var cancelList = response.data.data.cancelList
@@ -1365,13 +1374,13 @@ export default {
1365 1374
                   }
1366 1375
                 }
1367 1376
               }
1368
-            
1377
+
1369 1378
               console.log("arr233232233232",arr)
1370 1379
              if (arr.length == 0) {
1371 1380
                 //未入库
1372 1381
                 var is_warehouse = 2;
1373 1382
                 this.ModefySupplyWarehousing(is_warehouse, this.id);
1374
-                
1383
+
1375 1384
               }
1376 1385
               if (arr.length > 0) {
1377 1386
                 //部分入库
@@ -1442,7 +1451,7 @@ export default {
1442 1451
                }
1443 1452
             }
1444 1453
 
1445
-          
1454
+
1446 1455
 
1447 1456
             let objInfo = {};
1448 1457
             if(cancelOrderList.length >0){
@@ -1457,7 +1466,7 @@ export default {
1457 1466
                 }
1458 1467
               });
1459 1468
               let newArr = Object.values(objInfo)
1460
-            
1469
+
1461 1470
               for (let i = 0; i < cancelOrderList.length; i++) {
1462 1471
                 for (let j = 0; j < newArr.length; j++) {
1463 1472
                   if (cancelOrderList[i].project_id == newArr[j].project_id) {
@@ -1545,9 +1554,32 @@ export default {
1545 1554
 </script>
1546 1555
 
1547 1556
 <style rel="stylesheet/css" lang="scss" scoped>
1557
+.reviewImg {
1558
+  position: fixed;
1559
+  left: 50%;
1560
+  transform: translateX(-50%);
1561
+  top: 30%;
1562
+}
1563
+
1564
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1565
+  overflow: auto;
1566
+}
1567
+/deep/ .gutter {
1568
+  width: 15px !important;
1569
+  display: inline-block !important;
1570
+}
1571
+/deep/ .el-table__fixed-right-patch {
1572
+  width: 15px !important;
1573
+}
1574
+
1575
+/deep/ .el-table__fixed-right {
1576
+  bottom: 0 !important;
1577
+  left: auto;
1578
+  right: 0;
1579
+}
1548 1580
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1549
-  width: 10px;
1550
-  height: 10px;
1581
+  width: 15px !important;
1582
+  height: 15px !important;
1551 1583
 }
1552 1584
 .information {
1553 1585
   border: 1px #dcdfe6 solid;
@@ -1598,10 +1630,10 @@ export default {
1598 1630
 .el-table::before {
1599 1631
   background-color: #d0d3da;
1600 1632
 }
1601
-.el-table__fixed-right {
1633
+/* .el-table__fixed-right {
1602 1634
   width: 150px;
1603 1635
   bottom: 20px;
1604 1636
   height: 100%;
1605
-}
1637
+} */
1606 1638
 
1607 1639
 </style>

+ 59 - 34
src/xt_pages/supply/components/addGoodReturn.vue Просмотреть файл

@@ -16,7 +16,7 @@
16 16
           <span style="color: red">*</span><span>供应商:</span>
17 17
           <el-select
18 18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20 20
             placeholder="请选择"
21 21
             :disabled="disabled"
22 22
           >
@@ -42,7 +42,7 @@
42 42
             value-format="yyyy-MM-dd"
43 43
             :disabled="disabled"
44 44
           ></el-date-picker>
45
-         
45
+
46 46
           <span>单据编码:{{ number }}</span>
47 47
         </div>
48 48
         <div>
@@ -68,7 +68,7 @@
68 68
             >打印</el-button
69 69
           >
70 70
           <el-button size="small" type="primary" v-if="is_check == 2" @click="checkReturnOrder">审核</el-button>
71
-          <el-button size="small" type="primary" v-if="is_check == 1" @click="modefyReturnOrder">反审核</el-button> 
71
+          <el-button size="small" type="primary" v-if="is_check == 1" @click="modefyReturnOrder">反审核</el-button>
72 72
         </div>
73 73
       </div>
74 74
 
@@ -398,7 +398,7 @@
398 398
         ></span>
399 399
       </div>
400 400
     </div>
401
-    
401
+
402 402
   </div>
403 403
 </template>
404 404
 
@@ -616,7 +616,7 @@ export default {
616 616
             for (let j = 0; j < goodList[i].unitList.length; j++) {
617 617
               goodList[i].unitList[0].name = goodList[i].packing_unit;
618 618
             }
619
-        
619
+
620 620
             goodList[i].sum_count = this.getTotalStockCountTwo(
621 621
               goodList[i].good_warehouse_info
622 622
             );
@@ -727,7 +727,7 @@ export default {
727 727
           total += parseInt(arr[i].stock_max_number+ arr[i].stock_min_number);
728 728
         }
729 729
       }
730
-    
730
+
731 731
       if (total < min_number) {
732 732
         min_str = total + min_unit;
733 733
       }
@@ -765,7 +765,7 @@ export default {
765 765
       }else{
766 766
         return ""
767 767
       }
768
-      
768
+
769 769
     },
770 770
     getTotalStockCountTwo(arr) {
771 771
       var total_count = 0;
@@ -773,7 +773,7 @@ export default {
773 773
         total_count += arr[i].stock_count;
774 774
       }
775 775
       return total_count
776
-    
776
+
777 777
     },
778 778
     calculate: function (val) {
779 779
       if (isNaN(val)) {
@@ -802,7 +802,7 @@ export default {
802 802
       }else{
803 803
         return ""
804 804
       }
805
-     
805
+
806 806
     },
807 807
     addressChange() {
808 808
       var discount_amount = 0;
@@ -813,7 +813,7 @@ export default {
813 813
         ).toFixed(2);
814 814
       }
815 815
       this.discount_amount = discount_amount;
816
-     
816
+
817 817
     },
818 818
     count_discount() {
819 819
       this.rate_of_concession = (
@@ -860,7 +860,7 @@ export default {
860 860
           this.supplier_name = out.supplier_id;
861 861
           this.rate_of_concession = out.rate_of_concession;
862 862
           this.discount_amount = out.discount_amount;
863
-      
863
+
864 864
           this.start_time = this.getTimes(out.document_date);
865 865
           var orderInfo = response.data.data.list;
866 866
           console.log("orderINFO233232232332", orderInfo);
@@ -883,7 +883,7 @@ export default {
883 883
             }
884 884
             orderInfo[i].id = orderInfo[i].id;
885 885
             orderInfo[i].supply_count = orderInfo[i].supply_count;
886
-            
886
+
887 887
             orderInfo[i].supply_price = orderInfo[i].price;
888 888
             orderInfo[i].supply_remake = orderInfo[i].remark;
889 889
             orderInfo[i].type = orderInfo[i].is_source;
@@ -898,7 +898,7 @@ export default {
898 898
             orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
899 899
             orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
900 900
             orderInfo[i].deposit_rate = ""
901
-           
901
+
902 902
             if (orderInfo[i].is_source == 1) {
903 903
               for (let j = 0; j < drugList.length; j++) {
904 904
                 if (orderInfo[i].project_id == drugList[j].id) {
@@ -925,7 +925,7 @@ export default {
925 925
                   orderInfo[i].max_unit =drugList[j].max_unit
926 926
                   orderInfo[i].min_unit =drugList[j].min_unit
927 927
                 }
928
-               
928
+
929 929
               }
930 930
               orderInfo[i].count = orderInfo[i].count + orderInfo[i].supply_unit
931 931
             }
@@ -962,8 +962,8 @@ export default {
962 962
       var warehouse_out_id = this.$route.query.id
963 963
       this.$refs["tableForm"].validate((valid)=>{
964 964
         if(valid){
965
-        
966
-        
965
+
966
+
967 967
           for(let i=0;i<this.recordInfo.tableList.length;i++){
968 968
             if(this.recordInfo.tableList[i].count == ""){
969 969
               this.$message.error(this.recordInfo.tableList[i].name+"无可退库数量,保存失败!")
@@ -990,7 +990,7 @@ export default {
990 990
               }
991 991
 
992 992
             }
993
-          } 
993
+          }
994 994
            //判断是否在采购单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
995 995
            if(this.recordInfo.tableList.length < this.tableDataList.length){
996 996
              warehouse_out_id = 0
@@ -1008,7 +1008,7 @@ export default {
1008 1008
             return_marke:this.return_remark,
1009 1009
            }
1010 1010
            console.log("2323323232",params)
1011
-          
1011
+
1012 1012
            saveGoodReturnOrder(params,warehouse_out_id,this.start_time,this.rate_of_concession,this.discount_amount,this.arrearage,this.payment,this.supplier_name).then(response=>{
1013 1013
              if(response.data.state == 1){
1014 1014
                 this.loading = false
@@ -1037,16 +1037,16 @@ export default {
1037 1037
                 }else{
1038 1038
                   this.payment = out.payment
1039 1039
                 }
1040
-               
1040
+
1041 1041
                 if(out.arrearage == 0){
1042 1042
                    this.arrearage = ""
1043 1043
                 }else{
1044 1044
                   this.arrearage = out.arrearage
1045 1045
                 }
1046
-               
1046
+
1047 1047
                 this.start_time = this.getTimes(out.document_date)
1048 1048
                 var orderInfo = response.data.data.list
1049
-                
1049
+
1050 1050
                 for(let i=0;i< orderInfo.length;i++){
1051 1051
                   orderInfo[i].name = orderInfo[i].name
1052 1052
                   orderInfo[i].id = orderInfo[i].id
@@ -1079,7 +1079,7 @@ export default {
1079 1079
                             orderInfo[i].unitList[0].name = this.drugList[j].max_unit
1080 1080
                            }
1081 1081
 
1082
-                          
1082
+
1083 1083
 
1084 1084
                         }
1085 1085
                      }
@@ -1098,7 +1098,7 @@ export default {
1098 1098
                 this.recordInfo.tableList = orderInfo
1099 1099
              }
1100 1100
            })
1101
-          
1101
+
1102 1102
         }
1103 1103
       })
1104 1104
     },
@@ -1112,8 +1112,8 @@ export default {
1112 1112
       var warehouse_out_id = this.id;
1113 1113
       this.$refs["tableForm"].validate((valid)=>{
1114 1114
         if(valid){
1115
-         
1116
-        
1115
+
1116
+
1117 1117
           for(let i=0;i<this.recordInfo.tableList.length;i++){
1118 1118
             if(this.recordInfo.tableList[i].count == ""){
1119 1119
               this.$message.error(this.recordInfo.tableList[i].name+"无可退库数量,保存失败!")
@@ -1160,7 +1160,7 @@ export default {
1160 1160
      console.log("审核2322323232323",params)
1161 1161
      checkReturnOrder(params).then(response=>{
1162 1162
        if(response.data.state == 1){
1163
-      
1163
+
1164 1164
         var msg = response.data.data.msg
1165 1165
         if(msg == 1){
1166 1166
           this.loading = false
@@ -1188,7 +1188,7 @@ export default {
1188 1188
               var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
1189 1189
               this.$message.error(str + "库存不足,审核失败!")
1190 1190
           }
1191
-       
1191
+
1192 1192
        }
1193 1193
      })
1194 1194
     },
@@ -1212,7 +1212,7 @@ export default {
1212 1212
     getSupplyCount(supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit,index){
1213 1213
      console.log("val23322323",supply_count,sum_count,supply_unit,type,min_number,max_unit,min_unit)
1214 1214
       var total_count = 0
1215
-      
1215
+
1216 1216
       if(type == 1){
1217 1217
        if(supply_unit == max_unit){
1218 1218
           total_count = supply_count * min_number
@@ -1237,7 +1237,7 @@ export default {
1237 1237
           }
1238 1238
          }
1239 1239
       }
1240
-       
1240
+
1241 1241
       if(type == 2){
1242 1242
          if(supply_count > sum_count){
1243 1243
           this.$message.error("数量不能大于可退数量!")
@@ -1254,7 +1254,7 @@ export default {
1254 1254
           }
1255 1255
          }
1256 1256
       }
1257
-    
1257
+
1258 1258
     },
1259 1259
     toPrint() {
1260 1260
       this.$router.push({ path: "/good/return/print?&id=" + this.id });
@@ -1293,7 +1293,7 @@ export default {
1293 1293
     tempObj["max_unit"] = ""
1294 1294
     tempObj["min_unit"] = ""
1295 1295
     this.recordInfo.tableList.push(tempObj);
1296
-   
1296
+
1297 1297
     this.getInitOrder();
1298 1298
     if(parseInt(this.$route.query.id) > 0){
1299 1299
 
@@ -1306,6 +1306,13 @@ export default {
1306 1306
 </script>
1307 1307
 
1308 1308
 <style rel="stylesheet/css" lang="scss" scoped>
1309
+
1310
+.reviewImg {
1311
+  position: fixed;
1312
+  left: 50%;
1313
+  transform: translateX(-50%);
1314
+  top: 30%;
1315
+}
1309 1316
 .information {
1310 1317
   border: 1px #dcdfe6 solid;
1311 1318
   padding: 30px 20px 30px 20px;
@@ -1331,9 +1338,25 @@ export default {
1331 1338
   margin-bottom: 15px;
1332 1339
 }
1333 1340
 
1341
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1342
+  overflow: auto;
1343
+}
1344
+/deep/ .gutter {
1345
+  width: 15px !important;
1346
+  display: inline-block !important;
1347
+}
1348
+/deep/ .el-table__fixed-right-patch {
1349
+  width: 15px !important;
1350
+}
1351
+
1352
+/deep/ .el-table__fixed-right {
1353
+  bottom: 0 !important;
1354
+  left: auto;
1355
+  right: 0;
1356
+}
1334 1357
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1335
-  width: 10px;
1336
-  height: 10px;
1358
+  width: 15px !important;
1359
+  height: 15px !important;
1337 1360
 }
1338 1361
 </style>
1339 1362
 
@@ -1360,9 +1383,11 @@ export default {
1360 1383
 .el-table::before {
1361 1384
   background-color: #d0d3da;
1362 1385
 }
1363
-.el-table__fixed-right {
1386
+/* .el-table__fixed-right {
1364 1387
   width: 150px;
1365 1388
   bottom: 20px;
1366 1389
   height: 100%;
1367 1390
 }
1391
+ */
1392
+
1368 1393
 </style>

+ 21 - 39
src/xt_pages/supply/components/addPurchaseOrder.vue Просмотреть файл

@@ -16,7 +16,7 @@
16 16
           <span style="color: red">*</span><span>供应商:</span>
17 17
           <el-select
18 18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20 20
             placeholder="请选择"
21 21
           >
22 22
             <el-option
@@ -76,7 +76,7 @@
76 76
             @click="checkPurchaseOrder"
77 77
             v-show="showOne">审核
78 78
          </el-button>
79
-        
79
+
80 80
         <el-button
81 81
             size="small"
82 82
             type="primary"
@@ -89,7 +89,7 @@
89 89
             @click="checkReturnOrder"
90 90
             v-if="is_check == 1">反审核
91 91
          </el-button>
92
-         
92
+
93 93
           <el-button
94 94
             size="small"
95 95
             type="primary"
@@ -449,15 +449,6 @@ export default {
449 449
       is_check: 2,
450 450
     };
451 451
   },
452
-
453
-  watch: {
454
-    total_price: function (newval, oldval) {
455
-      if(this.rate_of_concession != ""){
456
-        this.addressChange()
457
-      }
458
-    }
459
-  },
460
-
461 452
   methods: {
462 453
     getInitOrder() {
463 454
       getInitOrder().then((response) => {
@@ -807,12 +798,7 @@ export default {
807 798
       for (let i = 0; i < arr.length; i++) {
808 799
         total_count += arr[i].stock_count;
809 800
       }
810
-      if(total_count > 0){
811
-        return total_count;
812
-      }else{
813
-        return ""
814
-      }
815
-    
801
+      return total_count;
816 802
     },
817 803
     calculate: function (val) {
818 804
       if (isNaN(val)) {
@@ -888,7 +874,17 @@ export default {
888 874
         }
889 875
       });
890 876
     },
891
-  
877
+    getAllPrice() {
878
+      var total_price = 0;
879
+      for (let i = 0; i < this.recordInfo.tableList.length; i++) {
880
+        total_price +=
881
+          this.recordInfo.tableList[i].supply_price *
882
+          this.recordInfo.tableList[i].supply_count;
883
+      }
884
+      this.total_price = total_price;
885
+      this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
886
+      return total_price.toFixed(2);
887
+    },
892 888
     count_discount() {
893 889
       this.rate_of_concession = (
894 890
         this.discount_amount /
@@ -924,19 +920,7 @@ export default {
924 920
     getDataConfig(module, filed_name) {
925 921
       return getDataConfig(module, filed_name);
926 922
     },
927
-
928
-     getAllPrice() {
929
-      var total_price = 0;
930
-      for (let i = 0; i < this.recordInfo.tableList.length; i++) {
931
-        total_price +=
932
-          this.recordInfo.tableList[i].supply_price *
933
-          this.recordInfo.tableList[i].supply_count;
934
-      }
935
-      this.total_price = total_price;
936
-      // this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
937
-      return total_price.toFixed(2);
938
-    },
939
-     addressChange() {
923
+    addressChange() {
940 924
       var discount_amount = 0;
941 925
       if (this.rate_of_concession > 0) {
942 926
         discount_amount = (
@@ -945,7 +929,6 @@ export default {
945 929
         ).toFixed(2);
946 930
       }
947 931
       this.discount_amount = discount_amount;
948
-     
949 932
     },
950 933
     checkReturnOrder() {
951 934
       var id = this.id;
@@ -955,7 +938,6 @@ export default {
955 938
           this.disabled = false;
956 939
           this.showOne = true;
957 940
           this.is_check = 2;
958
-          this.Reviewed = false
959 941
           this.$message.success("反审核成功!");
960 942
         }
961 943
       });
@@ -971,9 +953,9 @@ export default {
971 953
           var purcaseOrder = response.data.data.purcaseOrder;
972 954
 
973 955
           var goodOrder = response.data.data.goodOrder;
974
-         
956
+
975 957
           var drugList = response.data.data.drugList;
976
-      
958
+
977 959
           var ids = "";
978 960
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
979 961
           if (goodOrder.length == 0) {
@@ -1020,7 +1002,7 @@ export default {
1020 1002
                 }
1021 1003
               }
1022 1004
             }
1023
-     
1005
+
1024 1006
 
1025 1007
             for (let i = 0; i < newArr.length; i++) {
1026 1008
               for (let j = 0; j < newArr[i].child.length; j++) {
@@ -1081,7 +1063,7 @@ export default {
1081 1063
               }
1082 1064
             }
1083 1065
            }
1084
-     
1066
+
1085 1067
           }
1086 1068
         }
1087 1069
       });
@@ -1178,4 +1160,4 @@ export default {
1178 1160
   bottom: 20px;
1179 1161
   height: 100%;
1180 1162
 }
1181
-</style>
1163
+</style>

+ 35 - 18
src/xt_pages/supply/components/addSupply.vue Просмотреть файл

@@ -1,5 +1,10 @@
1 1
 <template>
2
-  <el-dialog :title="title" :visible.sync="dialogVisible" width="40%" :before-close="closePop" >
2
+  <el-dialog
3
+    :title="title"
4
+    :visible.sync="dialogVisible"
5
+    width="40%"
6
+    :before-close="closePop"
7
+  >
3 8
     <!-- :before-close="handleClose" 如需要可添加进上方 -->
4 9
     <div>
5 10
       <el-form
@@ -32,10 +37,7 @@
32 37
                 @select="handleSelect"
33 38
               ></el-autocomplete> -->
34 39
 
35
-              <el-select
36
-                v-model="supplier.supplierType"
37
-                @select="handleSelect"
38
-              >
40
+              <el-select v-model="supplier.supplierType" @select="handleSelect">
39 41
                 <el-option
40 42
                   v-for="item in supplierType"
41 43
                   :key="item.name"
@@ -51,7 +53,8 @@
51 53
               <el-input
52 54
                 v-model="supplier.vatRate"
53 55
                 @keyup.native="supplier.vatRate = oninput(supplier.vatRate)"
54
-              ></el-input>%
56
+              ></el-input
57
+              >%
55 58
             </el-form-item>
56 59
           </el-col>
57 60
         </el-row>
@@ -318,9 +321,9 @@ export default {
318 321
         this.title = "编辑供应商";
319 322
         this.supplier.supplierCode = data.SupplierCode;
320 323
         this.supplier.supplierName = data.SupplierName;
321
-        if (data.SupplierType == 0){
322
-          this.supplier.supplierType = ""
323
-        }else {
324
+        if (data.SupplierType == 0) {
325
+          this.supplier.supplierType = "";
326
+        } else {
324 327
           this.supplier.supplierType = data.SupplierType;
325 328
         }
326 329
         this.supplier.vatRate = data.VatRate;
@@ -432,7 +435,7 @@ export default {
432 435
                     this.closePop();
433 436
                     this.$emit("init");
434 437
                   } else {
435
-                    this.$message.error("新增失败:"+res.data.msg);
438
+                    this.$message.error("新增失败:" + res.data.msg);
436 439
                     setTimeout(() => {
437 440
                       this.closePop();
438 441
                     }, 2000);
@@ -480,7 +483,7 @@ export default {
480 483
                     this.closePop();
481 484
                     this.$emit("init");
482 485
                   } else {
483
-                    this.$message.error("修改失败:"+res.data.msg);
486
+                    this.$message.error("修改失败:" + res.data.msg);
484 487
                     setTimeout(() => {
485 488
                       this.closePop();
486 489
                     }, 2000);
@@ -565,9 +568,9 @@ export default {
565 568
       let params = {
566 569
         id: data.id,
567 570
       };
568
-      if (params.id==undefined||params.id=="undefined") {
571
+      if (params.id == undefined || params.id == "undefined") {
569 572
         this.recordInfo.contacts.splice(index, 1);
570
-      }else {
573
+      } else {
571 574
         if (this.show_type == 1) {
572 575
           if (this.recordInfo.contacts.length <= 1) {
573 576
             return;
@@ -577,7 +580,7 @@ export default {
577 580
         } else if (this.show_type == 2) {
578 581
           delcontactone(params).then((res) => {
579 582
             if (res.data.state == 1) {
580
-              this.$message.success("删除成功!!:",index);
583
+              this.$message.success("删除成功!!:", index);
581 584
               this.getcontacts(this.supplier_ids);
582 585
             } else {
583 586
               this.$message.error(res.data.data.list);
@@ -661,12 +664,26 @@ export default {
661 664
 /deep/ .el-form-item__error {
662 665
   // display: none !important;
663 666
 }
664
-/deep/ .el-table__body-wrapper::-webkit-scrollbar {
665
-  width: 10px;
666
-  height: 10px;
667
+// /deep/ .el-table__body-wrapper::-webkit-scrollbar {
668
+//   width: 10px;
669
+//   height: 10px;
670
+// }
671
+
672
+
673
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
674
+  overflow: auto;
675
+}
676
+/deep/ .gutter {
677
+  width: 22px !important;
678
+  display: inline-block !important;
679
+}
680
+/deep/ .el-table__fixed-right-patch {
681
+  width: 22px !important;
667 682
 }
668 683
 
669
-/deep/ .el-table__fixed-right{
684
+/deep/ .el-table__fixed-right {
670 685
   bottom: 0 !important;
686
+  left: auto;
687
+  right: 22px;
671 688
 }
672 689
 </style>

+ 30 - 10
src/xt_pages/supply/components/editGoodOrder.vue Просмотреть файл

@@ -17,7 +17,7 @@
17 17
           <!-- <div>供应商:</div> -->
18 18
           <el-select
19 19
             v-model="supplier_name"
20
-            style="width: 140px; margin-right: 10px"
20
+            style="width: 220px; margin-right: 10px"
21 21
             placeholder="请选择"
22 22
             :disabled="disabled"
23 23
           >
@@ -565,11 +565,13 @@ export default {
565 565
       tableDataList: [],
566 566
     };
567 567
   },
568
-
569
-  watch() {
570
-    // total_price:function(newval,oldval){
571
-    //   console.log(newval,'op')
572
-    // }
568
+   watch: {
569
+    total_price: function (newval, oldval) {
570
+      if(this.rate_of_concession != ""){
571
+        this.addressChange()
572
+        this.count_payment()
573
+      }
574
+    }
573 575
   },
574 576
 
575 577
   methods: {
@@ -898,12 +900,14 @@ export default {
898 900
         ).toFixed(2);
899 901
       }
900 902
       this.discount_amount = discount_amount;
903
+      if(this.payment > 0) this.count_payment()
901 904
     },
902 905
     count_discount() {
903 906
       this.rate_of_concession = (
904 907
         this.discount_amount /
905 908
         (this.total_price * 0.01)
906 909
       ).toFixed(2);
910
+      if(this.payment > 0) this.count_payment()
907 911
     },
908 912
     count_payment() {
909 913
       let arrearage_1 = (
@@ -1577,9 +1581,25 @@ export default {
1577 1581
   margin-top: 15px;
1578 1582
   margin-bottom: 15px;
1579 1583
 }
1584
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1585
+  overflow: auto;
1586
+}
1587
+/deep/ .gutter {
1588
+  width: 15px !important;
1589
+  display: inline-block !important;
1590
+}
1591
+/deep/ .el-table__fixed-right-patch {
1592
+  width: 15px !important;
1593
+}
1594
+
1595
+/deep/ .el-table__fixed-right {
1596
+  bottom: 0 !important;
1597
+  left: auto;
1598
+  right: 0;
1599
+}
1580 1600
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1581
-  width: 10px;
1582
-  height: 10px;
1601
+  width: 15px !important;
1602
+  height: 15px !important;
1583 1603
 }
1584 1604
 </style>
1585 1605
 
@@ -1606,11 +1626,11 @@ export default {
1606 1626
 .el-table::before {
1607 1627
   background-color: #d0d3da;
1608 1628
 }
1609
-.el-table__fixed-right {
1629
+/* .el-table__fixed-right {
1610 1630
   width: 150px;
1611 1631
   bottom: 20px;
1612 1632
   height: 100%;
1613
-}
1633
+} */
1614 1634
 .reviewImg {
1615 1635
   position: fixed;
1616 1636
   left: 50%;

+ 21 - 5
src/xt_pages/supply/components/editGoodReturn.vue Просмотреть файл

@@ -16,7 +16,7 @@
16 16
           <span style="color: red">*</span><span>供应商:</span>
17 17
           <el-select
18 18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20 20
             placeholder="请选择"
21 21
             :disabled ="disabled"
22 22
           >
@@ -1342,9 +1342,25 @@ export default {
1342 1342
   margin-bottom: 15px;
1343 1343
 }
1344 1344
 
1345
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1346
+  overflow: auto;
1347
+}
1348
+/deep/ .gutter {
1349
+  width: 15px !important;
1350
+  display: inline-block !important;
1351
+}
1352
+/deep/ .el-table__fixed-right-patch {
1353
+  width: 15px !important;
1354
+}
1355
+
1356
+/deep/ .el-table__fixed-right {
1357
+  bottom: 0 !important;
1358
+  left: auto;
1359
+  right: 0;
1360
+}
1345 1361
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1346
-  width: 10px;
1347
-  height: 10px;
1362
+  width: 15px !important;
1363
+  height: 15px !important;
1348 1364
 }
1349 1365
 </style>
1350 1366
 
@@ -1371,11 +1387,11 @@ export default {
1371 1387
 .el-table::before {
1372 1388
   background-color: #d0d3da;
1373 1389
 }
1374
-.el-table__fixed-right {
1390
+/* .el-table__fixed-right {
1375 1391
   width: 150px;
1376 1392
   bottom: 20px;
1377 1393
   height: 100%;
1378
-}
1394
+} */
1379 1395
 .reviewImg {
1380 1396
   position: fixed;
1381 1397
   left: 50%;

+ 216 - 157
src/xt_pages/supply/components/editPurchaseOrder.vue Просмотреть файл

@@ -12,11 +12,11 @@
12 12
           align-items: center;
13 13
         "
14 14
       >
15
-        <div style="display:flex;align-items: center;">
15
+        <div style="display: flex; align-items: center">
16 16
           <span style="color: red">*</span><span>供应商:</span>
17 17
           <el-select
18 18
             v-model="supplier_name"
19
-            style="width: 140px; margin-right: 10px"
19
+            style="width: 220px; margin-right: 10px"
20 20
             placeholder="请选择"
21 21
             @change="changeTypeName"
22 22
             :disabled="disabled"
@@ -60,7 +60,7 @@
60 60
           ></el-date-picker>
61 61
           <span>单据编码:{{ number }}</span>
62 62
         </div>
63
-        <div style="display: flex;">
63
+        <div style="display: flex">
64 64
           <el-button size="small" type="primary" @click="toAdd" v-show="showOne"
65 65
             >生成采购单</el-button
66 66
           >
@@ -348,6 +348,7 @@
348 348
             v-model="discount_amount"
349 349
             :disabled="disabled"
350 350
             placeholder="请输入优惠金额"
351
+            @input="count_discount"
351 352
           ></el-input
352 353
         ></span>
353 354
       </div>
@@ -367,12 +368,20 @@
367 368
     <el-button @click="dialogVisible = false">取 消</el-button>
368 369
   </span>
369 370
   </el-dialog> -->
370
-  <popup ref="Popup" :content="content" :content_1="content_1" :content_2="content_2" :number="number" :orderList ="orderList" :type="type"></popup>
371
+    <popup
372
+      ref="Popup"
373
+      :content="content"
374
+      :content_1="content_1"
375
+      :content_2="content_2"
376
+      :number="number"
377
+      :orderList="orderList"
378
+      :type="type"
379
+    ></popup>
371 380
   </div>
372 381
 </template>
373 382
 
374 383
 <script>
375
-import popup from "./Popup"
384
+import popup from "./Popup";
376 385
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
377 386
 import { uParseTime } from "@/utils/tools";
378 387
 import {
@@ -384,20 +393,20 @@ import {
384 393
   getGoodOrderList,
385 394
   getReturnOrder,
386 395
   deletePurchaseOrder,
387
-  deletePurchOder
396
+  deletePurchOder,
388 397
 } from "@/api/supply";
389 398
 export default {
390 399
   name: "addPurchaseOrder",
391 400
   components: {
392 401
     BreadCrumb,
393
-    popup
402
+    popup,
394 403
   },
395 404
   data() {
396 405
     return {
397
-      content_2:"采购单",
398
-      content:"采购订单",
399
-      content_1:"已有以下关联数据,不能反审核",
400
-      type:1,
406
+      content_2: "采购单",
407
+      content: "采购订单",
408
+      content_1: "已有以下关联数据,不能反审核",
409
+      type: 1,
401 410
       Reviewed: false,
402 411
       crumbs: [
403 412
         { path: false, name: "采购订单" },
@@ -454,9 +463,16 @@ export default {
454 463
       showThree: false,
455 464
       orderList: [],
456 465
       return_remark: "",
457
-      
458 466
     };
459 467
   },
468
+
469
+  watch: {
470
+    total_price: function (newval, oldval) {
471
+      if (this.rate_of_concession != "") {
472
+        this.addressChange();
473
+      }
474
+    },
475
+  },
460 476
   methods: {
461 477
     getInitOrder() {
462 478
       getInitOrder().then((response) => {
@@ -559,15 +575,23 @@ export default {
559 575
                 goodList[i].good_type_id = this.goodTypeList[y].type_name;
560 576
               }
561 577
             }
562
-            goodList[i].supply_name =goodList[i].good_name +" " +goodList[i].specification_name +" " + goodList[i].manufacturer;
578
+            goodList[i].supply_name =
579
+              goodList[i].good_name +
580
+              " " +
581
+              goodList[i].specification_name +
582
+              " " +
583
+              goodList[i].manufacturer;
563 584
             goodList[i].supply_type = goodList[i].good_type_id;
564
-            goodList[i].supply_specification_name =goodList[i].specification_name;
585
+            goodList[i].supply_specification_name =
586
+              goodList[i].specification_name;
565 587
             goodList[i].supply_price = goodList[i].buy_price;
566
-            goodList[i].supply_total = this.getTotalStockCount(goodList[i].good_warehouse_info);
588
+            goodList[i].supply_total = this.getTotalStockCount(
589
+              goodList[i].good_warehouse_info
590
+            );
567 591
             goodList[i].supply_count = "";
568 592
             goodList[i].supply_total_price = "";
569 593
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
570
-            goodList[i].supply_license_number = goodList[i].number
594
+            goodList[i].supply_license_number = goodList[i].number;
571 595
             goodList[i].supply_remake = "";
572 596
             goodList[i].type = 2;
573 597
             goodList[i].name = goodList[i].good_name;
@@ -579,7 +603,6 @@ export default {
579 603
             this.tabList.push(goodList[i]);
580 604
           }
581 605
           this.goodList = goodList;
582
-          
583 606
         }
584 607
       });
585 608
     },
@@ -594,7 +617,8 @@ export default {
594 617
           this.recordInfo.tableList[i].name = val.name;
595 618
           this.recordInfo.tableList[i].supply_name = val.supply_name;
596 619
           this.recordInfo.tableList[i].supply_type = val.supply_type;
597
-          this.recordInfo.tableList[i].supply_specification_name =val.supply_specification_name;
620
+          this.recordInfo.tableList[i].supply_specification_name =
621
+            val.supply_specification_name;
598 622
           this.recordInfo.tableList[i].supply_total = val.supply_total;
599 623
           if (val.supply_count == NaN) {
600 624
             this.recordInfo.tableList[i].supply_count = "";
@@ -604,10 +628,15 @@ export default {
604 628
               : "";
605 629
           }
606 630
 
607
-          this.recordInfo.tableList[i].supply_price = val.supply_price? val.supply_price: "";
608
-          this.recordInfo.tableList[i].supply_total_price =val.supply_total_price ? val.supply_total_price : "";
609
-          this.recordInfo.tableList[i].supply_manufacturer =val.supply_manufacturer;
610
-          this.recordInfo.tableList[i].supply_license_number =val.supply_license_number;
631
+          this.recordInfo.tableList[i].supply_price = val.supply_price
632
+            ? val.supply_price
633
+            : "";
634
+          this.recordInfo.tableList[i].supply_total_price =
635
+            val.supply_total_price ? val.supply_total_price : "";
636
+          this.recordInfo.tableList[i].supply_manufacturer =
637
+            val.supply_manufacturer;
638
+          this.recordInfo.tableList[i].supply_license_number =
639
+            val.supply_license_number;
611 640
           this.recordInfo.tableList[i].supply_remake = val.supply_remake;
612 641
           this.recordInfo.tableList[i].is_total = val.is_total;
613 642
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
@@ -641,42 +670,40 @@ export default {
641 670
       this.recordInfo.tableList.push(tempObj);
642 671
     },
643 672
     handleDelete: function (index, row) {
644
-      
645
-      if(this.is_check == 1){
646
-         this.$message.error("已审核单据,不能删除!")
647
-         return false
673
+      if (this.is_check == 1) {
674
+        this.$message.error("已审核单据,不能删除!");
675
+        return false;
648 676
       }
649
-      if(row.id == 0){
677
+      if (row.id == 0) {
650 678
         if (this.recordInfo.tableList.length <= 1) {
651 679
           this.$message.error("只有一条记录的时候无法删除");
652 680
           return;
653 681
         } else {
654 682
           this.recordInfo.tableList.splice(index, 1);
655 683
         }
656
-      }else{
657
-          const params = {
658
-            id: row.id
659
-          }
660
-          this.$confirm('确认删除吗?', {
661
-            confirmButtonText: '确定',
662
-            cancelButtonText: '取消',
663
-            type: 'warning'
664
-          }).then(() => {
665
-            deletePurchOder(params).then(response => {
684
+      } else {
685
+        const params = {
686
+          id: row.id,
687
+        };
688
+        this.$confirm("确认删除吗?", {
689
+          confirmButtonText: "确定",
690
+          cancelButtonText: "取消",
691
+          type: "warning",
692
+        })
693
+          .then(() => {
694
+            deletePurchOder(params).then((response) => {
666 695
               if (response.data.state == 0) {
667
-                this.$message.error(response.data.msg)
668
-                return false
696
+                this.$message.error(response.data.msg);
697
+                return false;
669 698
               } else {
670
-                this.$message.success('删除成功')
699
+                this.$message.success("删除成功");
671 700
 
672
-                this.recordInfo.tableList.splice(index, 1)
701
+                this.recordInfo.tableList.splice(index, 1);
673 702
               }
674
-            })
675
-          }).catch(() => {
676
-        })
677
-        
703
+            });
704
+          })
705
+          .catch(() => {});
678 706
       }
679
-      
680 707
     },
681 708
 
682 709
     changeTypeName() {},
@@ -715,12 +742,11 @@ export default {
715 742
       for (let i = 0; i < arr.length; i++) {
716 743
         total_count += arr[i].stock_count;
717 744
       }
718
-      if(total_count >0){
745
+      if (total_count > 0) {
719 746
         return total_count;
720
-      }else{
721
-        return ""
747
+      } else {
748
+        return "";
722 749
       }
723
-     
724 750
     },
725 751
     calculate: function (val) {
726 752
       if (isNaN(val)) {
@@ -746,13 +772,21 @@ export default {
746 772
       this.$refs["tableForm"].validate((valid) => {
747 773
         if (valid) {
748 774
           this.loading = true;
749
-         
775
+
750 776
           for (let i = 0; i < this.recordInfo.tableList.length; i++) {
751
-            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
752
-            this.recordInfo.tableList[i].supply_license_number =this.recordInfo.tableList[i].supply_license_number.toString();
753
-            this.recordInfo.tableList[i].supply_total_price = (this.recordInfo.tableList[i].supply_count *this.recordInfo.tableList[i].supply_price).toString();
754
-            this.recordInfo.tableList[i].supply_total =this.recordInfo.tableList[i].supply_total.toString();
755
-            this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString();
777
+            this.recordInfo.tableList[i].supply_count = parseInt(
778
+              this.recordInfo.tableList[i].supply_count
779
+            );
780
+            this.recordInfo.tableList[i].supply_license_number =
781
+              this.recordInfo.tableList[i].supply_license_number.toString();
782
+            this.recordInfo.tableList[i].supply_total_price = (
783
+              this.recordInfo.tableList[i].supply_count *
784
+              this.recordInfo.tableList[i].supply_price
785
+            ).toString();
786
+            this.recordInfo.tableList[i].supply_total =
787
+              this.recordInfo.tableList[i].supply_total.toString();
788
+            this.recordInfo.tableList[i].supply_price =
789
+              this.recordInfo.tableList[i].supply_price.toString();
756 790
             for (let j = 0; j < this.manufactuerList.length; j++) {
757 791
               if (
758 792
                 this.recordInfo.tableList[i].supply_manufacturer ==
@@ -776,8 +810,8 @@ export default {
776 810
             stockIn: this.recordInfo.tableList,
777 811
             return_remake: this.return_remark,
778 812
           };
779
-          console.log("哈哈哈哈哈哈",params)
780
-          
813
+          console.log("哈哈哈哈哈哈", params);
814
+
781 815
           updatePurchaseOrder(
782 816
             params,
783 817
             this.supplier_name,
@@ -792,7 +826,7 @@ export default {
792 826
               this.loading = false;
793 827
               var warehousingInfo = response.data.data.warehousingInfo;
794 828
               this.$message.success("保存成功!");
795
-              this.getPurchaseOrderDetail()
829
+              this.getPurchaseOrderDetail();
796 830
             }
797 831
           });
798 832
         }
@@ -807,7 +841,7 @@ export default {
807 841
           this.recordInfo.tableList[i].supply_count;
808 842
       }
809 843
       this.total_price = total_price;
810
-      this.addressChange()
844
+      // this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
811 845
       return total_price.toFixed(2);
812 846
     },
813 847
 
@@ -816,7 +850,8 @@ export default {
816 850
         confirmButtonText: "确 定",
817 851
         cancelButtonText: "取 消",
818 852
         type: "warning",
819
-      }).then(() => {
853
+      })
854
+        .then(() => {
820 855
           checkPurchaseOrder(this.id).then((response) => {
821 856
             if (response.data.state == 1) {
822 857
               var info = response.data.data.info;
@@ -872,11 +907,11 @@ export default {
872 907
             this.showTwo = false;
873 908
             this.showThree = true;
874 909
           }
875
-         
910
+
876 911
           var drugList = response.data.data.baseList;
877 912
           var goodList = response.data.data.goodList;
878 913
           for (let i = 0; i < orderInfo.length; i++) {
879
-            orderInfo[i].id = orderInfo[i].id
914
+            orderInfo[i].id = orderInfo[i].id;
880 915
             orderInfo[i].supply_count = orderInfo[i].count;
881 916
             orderInfo[i].supply_price = orderInfo[i].price;
882 917
             orderInfo[i].supply_remake = orderInfo[i].remark;
@@ -910,32 +945,31 @@ export default {
910 945
               }
911 946
             }
912 947
           }
913
-         
948
+
914 949
           this.recordInfo.tableList = [];
915
-          if(orderInfo.length == 0){
916
-              const tempObj = {};
917
-              tempObj["id"] = 0;
918
-              tempObj["name"] = "";
919
-              tempObj["supply_name"] = "";
920
-              tempObj["supply_type"] = "";
921
-              tempObj["supply_specification_name"] = "";
922
-              tempObj["supply_total"] = "";
923
-              tempObj["supply_count"] = "";
924
-              tempObj["supply_price"] = "";
925
-              tempObj["supply_total_price"] = "";
926
-              tempObj["supply_manufacturer"] = "";
927
-              tempObj["supply_license_number"] = "";
928
-              tempObj["supply_remake"] = "";
929
-              tempObj["type"] = 0;
930
-              tempObj["is_total"] = 1;
931
-              tempObj["project_id"] = 0;
932
-              tempObj["supply_unit"] = "";
933
-              tempObj["manufacturer_id"] = "";
934
-              this.recordInfo.tableList.push(tempObj);
935
-          }else{
950
+          if (orderInfo.length == 0) {
951
+            const tempObj = {};
952
+            tempObj["id"] = 0;
953
+            tempObj["name"] = "";
954
+            tempObj["supply_name"] = "";
955
+            tempObj["supply_type"] = "";
956
+            tempObj["supply_specification_name"] = "";
957
+            tempObj["supply_total"] = "";
958
+            tempObj["supply_count"] = "";
959
+            tempObj["supply_price"] = "";
960
+            tempObj["supply_total_price"] = "";
961
+            tempObj["supply_manufacturer"] = "";
962
+            tempObj["supply_license_number"] = "";
963
+            tempObj["supply_remake"] = "";
964
+            tempObj["type"] = 0;
965
+            tempObj["is_total"] = 1;
966
+            tempObj["project_id"] = 0;
967
+            tempObj["supply_unit"] = "";
968
+            tempObj["manufacturer_id"] = "";
969
+            this.recordInfo.tableList.push(tempObj);
970
+          } else {
936 971
             this.recordInfo.tableList = orderInfo;
937 972
           }
938
-         
939 973
         }
940 974
       });
941 975
     },
@@ -955,21 +989,23 @@ export default {
955 989
           var purcaseOrder = response.data.data.purcaseOrder;
956 990
 
957 991
           var goodOrder = response.data.data.goodOrder;
958
-         
992
+
959 993
           var drugList = response.data.data.drugList;
960
-      
994
+
961 995
           var ids = "";
962 996
           // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
963 997
           if (goodOrder.length == 0) {
964
-            this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + ids});
998
+            this.$router.push({
999
+              path: "/good/order/add?id=" + id + "&ids=" + ids,
1000
+            });
965 1001
           }
966
-       
967
-          
1002
+
968 1003
           for (let i = 0; i < purcaseOrder.length; i++) {
969 1004
             for (let j = 0; j < drugList.length; j++) {
970 1005
               if (purcaseOrder[i].is_source == 1) {
971 1006
                 if (purcaseOrder[i].supply_unit == drugList[j].max_unit) {
972
-                  purcaseOrder[i].count = purcaseOrder[i].count * drugList[j].min_number;
1007
+                  purcaseOrder[i].count =
1008
+                    purcaseOrder[i].count * drugList[j].min_number;
973 1009
                 }
974 1010
               }
975 1011
             }
@@ -979,7 +1015,8 @@ export default {
979 1015
             for (let j = 0; j < drugList.length; j++) {
980 1016
               if (goodOrder[i].is_source == 1) {
981 1017
                 if (goodOrder[i].supply_unit == drugList[j].max_unit) {
982
-                    goodOrder[i].count = goodOrder[i].count * drugList[j].min_number;
1018
+                  goodOrder[i].count =
1019
+                    goodOrder[i].count * drugList[j].min_number;
983 1020
                 }
984 1021
               }
985 1022
             }
@@ -1006,7 +1043,6 @@ export default {
1006 1043
                 }
1007 1044
               }
1008 1045
             }
1009
-     
1010 1046
 
1011 1047
             for (let i = 0; i < newArr.length; i++) {
1012 1048
               for (let j = 0; j < newArr[i].child.length; j++) {
@@ -1014,95 +1050,104 @@ export default {
1014 1050
               }
1015 1051
             }
1016 1052
 
1017
-            var arr = []; 
1053
+            var arr = [];
1018 1054
             var total = 0;
1019 1055
             var str = "";
1020
-            console.log("newArr2323223323223",newArr)
1021
-            console.log("newArr2323223323223",purcaseOrder)
1022
-            
1056
+            console.log("newArr2323223323223", newArr);
1057
+            console.log("newArr2323223323223", purcaseOrder);
1023 1058
 
1024
-           console.log("长度1",goodOrder.length)
1025
-           console.log("长度2",purcaseOrder.length)
1059
+            console.log("长度1", goodOrder.length);
1060
+            console.log("长度2", purcaseOrder.length);
1026 1061
 
1027
-          if(purcaseOrder.length <=goodOrder.length){
1028
-            //如果采购单有数据,则需要比较数量
1029
-            if (newArr.length > 0) {
1030
-              for (let i = 0; i < purcaseOrder.length; i++) {
1031
-                for (let j = 0; j < newArr.length; j++) {
1032
-                  if (purcaseOrder[i].project_id == newArr[j].project_id) {
1033
-                    //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,可以继续生成采购单
1034
-                    if (purcaseOrder[i].count > newArr[j].count) {
1035
-                      arr.push(purcaseOrder[i].project_id);
1062
+            if (purcaseOrder.length <= goodOrder.length) {
1063
+              //如果采购单有数据,则需要比较数量
1064
+              if (newArr.length > 0) {
1065
+                for (let i = 0; i < purcaseOrder.length; i++) {
1066
+                  for (let j = 0; j < newArr.length; j++) {
1067
+                    if (purcaseOrder[i].project_id == newArr[j].project_id) {
1068
+                      //根据商品ID比较数量大小,把数量不足的商品ID储存,表示采购单的数量未满足采购订单的数据,可以继续生成采购单
1069
+                      if (purcaseOrder[i].count > newArr[j].count) {
1070
+                        arr.push(purcaseOrder[i].project_id);
1071
+                      }
1036 1072
                     }
1037 1073
                   }
1038 1074
                 }
1039
-              }
1040
-              //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1041
-             
1042
-              if (arr.length == 0) {
1043
-                this.$message.error("该订单已全部生成采购单,请知悉!");
1044
-                return;
1045
-              }
1075
+                //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1046 1076
 
1047
-              if (arr.length >0) {
1048
-                str = arr.join(",");
1049
-                this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + str});
1050
-              }
1077
+                if (arr.length == 0) {
1078
+                  this.$message.error("该订单已全部生成采购单,请知悉!");
1079
+                  return;
1080
+                }
1051 1081
 
1082
+                if (arr.length > 0) {
1083
+                  str = arr.join(",");
1084
+                  this.$router.push({
1085
+                    path: "/good/order/add?id=" + id + "&ids=" + str,
1086
+                  });
1087
+                }
1088
+              }
1052 1089
             }
1053
-
1054
-          }
1055
-          //如果采购订单的商品个数不等与 采购单里面的商品个数
1056
-          if(purcaseOrder.length>goodOrder.length){
1057
-           var arrList = []
1058
-           var str = "";
1059
-            if (newArr.length > 0) {
1060
-              for (let i = 0; i < purcaseOrder.length; i++) {
1061
-                for (let j = 0; j < newArr.length; j++) {
1062
-                  //如果采购订单的商品个数不等与 采购单里面的商品个数
1063
-                  if(purcaseOrder[i].project_id != newArr[j].project_id){
1064
-                     arrList.push(purcaseOrder[i].project_id)
1090
+            //如果采购订单的商品个数不等与 采购单里面的商品个数
1091
+            if (purcaseOrder.length > goodOrder.length) {
1092
+              var arrList = [];
1093
+              var str = "";
1094
+              if (newArr.length > 0) {
1095
+                for (let i = 0; i < purcaseOrder.length; i++) {
1096
+                  for (let j = 0; j < newArr.length; j++) {
1097
+                    //如果采购订单的商品个数不等与 采购单里面的商品个数
1098
+                    if (purcaseOrder[i].project_id != newArr[j].project_id) {
1099
+                      arrList.push(purcaseOrder[i].project_id);
1100
+                    }
1065 1101
                   }
1066 1102
                 }
1067
-              }
1068
-              //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1069
-              console.log("are232323323223322323",arrList)
1070
-              if(arrList.length > 0){
1071
-                str = arrList.join(",");
1072
-                this.$router.push({path: "/good/order/add?id=" + id + "&ids=" + str});
1103
+                //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
1104
+                console.log("are232323323223322323", arrList);
1105
+                if (arrList.length > 0) {
1106
+                  str = arrList.join(",");
1107
+                  this.$router.push({
1108
+                    path: "/good/order/add?id=" + id + "&ids=" + str,
1109
+                  });
1110
+                }
1073 1111
               }
1074 1112
             }
1075
-           }
1076 1113
           }
1077 1114
         }
1078 1115
       });
1079 1116
     },
1080 1117
     addressChange() {
1118
+      var discount_amount = 0;
1081 1119
       if (this.rate_of_concession > 0) {
1082
-        this.discount_amount = (
1120
+        discount_amount = (
1083 1121
           (this.rate_of_concession / 100) *
1084 1122
           this.total_price
1085 1123
         ).toFixed(2);
1086 1124
       }
1125
+      this.discount_amount = discount_amount;
1126
+    },
1127
+    count_discount() {
1128
+      this.rate_of_concession = (
1129
+        this.discount_amount /
1130
+        (this.total_price * 0.01)
1131
+      ).toFixed(2);
1087 1132
     },
1088 1133
     checkReturnOrder() {
1089 1134
       var id = this.$route.query.id;
1090 1135
       //获取购货订单号
1091 1136
       getGoodOrderList(id).then((response) => {
1092 1137
         if (response.data.state == 1) {
1093
-          var list = response.data.data.list
1094
-        
1095
-          this.orderList = list
1138
+          var list = response.data.data.list;
1139
+
1140
+          this.orderList = list;
1096 1141
           //如果长度大于0,有购货单不能反审核
1097 1142
           if (list.length > 0) {
1098
-            this.$refs.Popup.dialogVisible = true
1099
-            return 
1143
+            this.$refs.Popup.dialogVisible = true;
1144
+            return;
1100 1145
           }
1101 1146
           if (list.length == 0) {
1102
-            this.getReturnOrder()
1103
-            this.showOne = false
1104
-            this.showTwo = true
1105
-            this.showThree = false
1147
+            this.getReturnOrder();
1148
+            this.showOne = false;
1149
+            this.showTwo = true;
1150
+            this.showThree = false;
1106 1151
           }
1107 1152
         }
1108 1153
       });
@@ -1113,14 +1158,14 @@ export default {
1113 1158
         if (response.data.state == 1) {
1114 1159
           var msg = response.data.data.msg;
1115 1160
           this.disabled = false;
1116
-          this.Reviewed = false
1161
+          this.Reviewed = false;
1117 1162
           this.$message.success("反审核成功!");
1118 1163
           this.getPurchaseOrderDetail();
1119 1164
         }
1120 1165
       });
1121 1166
     },
1122 1167
     toClick(id) {
1123
-      this.$router.push({path:"/good/order/edit?id=" + id});
1168
+      this.$router.push({ path: "/good/order/edit?id=" + id });
1124 1169
     },
1125 1170
   },
1126 1171
   created() {
@@ -1174,9 +1219,25 @@ export default {
1174 1219
   margin-top: 15px;
1175 1220
   margin-bottom: 15px;
1176 1221
 }
1222
+/deep/ .el-table--scrollable-x .el-table__body-wrapper {
1223
+  overflow: auto;
1224
+}
1225
+/deep/ .gutter {
1226
+  width: 15px !important;
1227
+  display: inline-block !important;
1228
+}
1229
+/deep/ .el-table__fixed-right-patch {
1230
+  width: 15px !important;
1231
+}
1232
+
1233
+/deep/ .el-table__fixed-right {
1234
+  bottom: 0 !important;
1235
+  left: auto;
1236
+  right: 0;
1237
+}
1177 1238
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1178
-  width: 10px;
1179
-  height: 10px;
1239
+  width: 15px !important;
1240
+  height: 15px !important;
1180 1241
 }
1181 1242
 </style>
1182 1243
 
@@ -1203,17 +1264,15 @@ export default {
1203 1264
 .el-table::before {
1204 1265
   background-color: #d0d3da;
1205 1266
 }
1206
-.el-table__fixed-right {
1267
+/* .el-table__fixed-right {
1207 1268
   width: 150px;
1208 1269
   bottom: 20px;
1209 1270
   height: 100%;
1210
-}
1271
+} */
1211 1272
 .reviewImg {
1212 1273
   position: fixed;
1213 1274
   left: 50%;
1214 1275
   transform: translateX(-50%);
1215 1276
   top: 30%;
1216 1277
 }
1217
-
1218
-
1219 1278
 </style>

+ 3 - 3
src/xt_pages/supply/components/editSupply.vue Просмотреть файл

@@ -916,9 +916,9 @@ border-color: #d0d3da;
916 916
 .el-table::before {
917 917
 background-color: #d0d3da;
918 918
 }
919
-.el-table__fixed-right{
919
+/* .el-table__fixed-right{
920 920
   width:150px;
921
-  /* bottom: 20px; */
921
+  bottom: 20px;
922 922
   height: 100%;
923
-}
923
+} */
924 924
 </style>

+ 9 - 8
src/xt_pages/supply/goodreturn.vue Просмотреть файл

@@ -87,7 +87,7 @@
87 87
         border
88 88
         style="width: 100%"
89 89
       >
90
-        <el-table-column label="单据日期" align="center" width="200">
90
+        <el-table-column label="单据日期" align="center" width="100">
91 91
           <template slot-scope="scope">
92 92
             <span>{{ getTimes(scope.row.document_date) }}</span>
93 93
           </template>
@@ -124,14 +124,14 @@
124 124
             >
125 125
           </template>
126 126
         </el-table-column>
127
-        <el-table-column label="采购金额" align="center" width="200">
127
+        <el-table-column label="采购金额" align="center" width="130">
128 128
           <template slot-scope="scope">
129 129
             <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
130 130
               getAllBuyPrice(scope.row.cancelOrder)
131 131
             }}</span>
132 132
           </template>
133 133
         </el-table-column>
134
-        <el-table-column label="优惠后金额" align="center" width="200">
134
+        <el-table-column label="优惠后金额" align="center" width="130">
135 135
           <template slot-scope="scope">
136 136
             <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
137 137
               getAllBuyPriceOne(
@@ -141,34 +141,35 @@
141 141
             }}</span>
142 142
           </template>
143 143
         </el-table-column>
144
-        <el-table-column label="已退款" align="center" width="200">
144
+        <el-table-column label="已退款" align="center" width="130">
145 145
           <template slot-scope="scope">
146 146
             <span v-if="scope.row.payment > 0">{{ scope.row.payment }}</span>
147 147
           </template>
148 148
         </el-table-column>
149
-        <el-table-column label="数量" align="center" width="200">
149
+        <el-table-column label="数量" align="center" width="120">
150 150
           <template slot-scope="scope">
151 151
             {{ getCount(scope.row.cancelOrder) }}
152 152
           </template>
153 153
         </el-table-column>
154 154
 
155
-        <el-table-column label="退款状态" align="center" width="200">
155
+        <el-table-column label="退款状态" align="center" width="120">
156 156
           <template slot-scope="scope">
157 157
             <!-- <span v-if="scope.row.is_check == 2">未审核</span>
158 158
            <span v-if="scope.row.is_check == 1">已审核</span> -->
159
+          
159 160
            <span v-if="scope.row.payment == 0">未退款</span>
160 161
            <span v-if="scope.row.payment > 0 && scope.row.payment< getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">部分退款</span>
161 162
            <span v-if="scope.row.payment > 0 && scope.row.payment == getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)">全部退款</span>
162 163
           </template>
163 164
         </el-table-column>
164 165
 
165
-        <el-table-column label="制单人" align="center" width="200">
166
+        <el-table-column label="制单人" align="center" width="120">
166 167
           <template slot-scope="scope">
167 168
             {{ getDocName(scope.row.creater) }}
168 169
           </template>
169 170
         </el-table-column>
170 171
 
171
-        <el-table-column label="审核人" align="center" width="200">
172
+        <el-table-column label="审核人" align="center" width="120">
172 173
           <template slot-scope="scope">
173 174
             {{ getDocName(scope.row.checker) }}
174 175
           </template>

+ 1 - 1
src/xt_pages/supply/supplyQuery.vue Просмотреть файл

@@ -15,7 +15,7 @@
15 15
         <div>
16 16
           <el-select
17 17
             v-model="type_name"
18
-            style="width: 170px; margin-right: 10px"
18
+            style="width: 220px; margin-right: 10px"
19 19
             clearable
20 20
             placeholder="请选择供应商类别"
21 21
             @change="changeTypeName"

+ 27 - 27
src/xt_pages/user/doctorAdvice.vue Просмотреть файл

@@ -160,7 +160,7 @@
160 160
         </el-table-column>
161 161
 
162 162
163
-        
163
+
164 164
         <el-table-column
165 165
           label="开嘱时间"
166 166
           width="180"
@@ -168,8 +168,8 @@
168 168
           align="center"
169 169
         >
170 170
           <template slot-scope="scope">
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> 
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>
173 173
           </template>
174 174
         </el-table-column>
175 175
         <el-table-column
@@ -968,7 +968,7 @@
968 968
             <el-col :span="14">
969 969
               <el-form-item label="药品规格 :" prop="advice_desc">
970 970
                 <el-col :span="6">
971
-               
971
+
972 972
                 <el-autocomplete
973 973
                   style="width:100px;"
974 974
                   class="inline-input"
@@ -1049,7 +1049,7 @@
1049 1049
                     >
1050 1050
                     </el-option>
1051 1051
                   </el-select>
1052
-                
1052
+
1053 1053
                 </el-col>
1054 1054
               </el-form-item>
1055 1055
             </el-col>
@@ -1518,7 +1518,7 @@
1518 1518
             </li>
1519 1519
             <li v-if="currentPatient.user_org_id!=10090">
1520 1520
               <span class="name">科别:</span>
1521
-             
1521
+
1522 1522
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1523 1523
             </li>
1524 1524
             <li>
@@ -1650,17 +1650,17 @@
1650 1650
             </li>
1651 1651
             <li v-if="currentPatient.user_org_id!=10090">
1652 1652
               <span class="name" style="width:30px;">科:</span>
1653
-             
1653
+
1654 1654
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1655 1655
             </li>
1656 1656
             <li v-if="currentPatient.user_org_id!=10090">
1657 1657
               <span class="name" style="width:30px;">区:</span>
1658
-             
1658
+
1659 1659
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1660 1660
             </li>
1661 1661
             <li v-if="currentPatient.user_org_id!=10090">
1662 1662
               <span class="name" style="width:30px;">房:</span>
1663
-              
1663
+
1664 1664
               <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
1665 1665
             </li>
1666 1666
             <li v-if="currentPatient.user_org_id!=10090">
@@ -2223,7 +2223,7 @@ export default {
2223 2223
           }
2224 2224
 
2225 2225
           console.log("2323223",this.adviceForm)
2226
-        
2226
+
2227 2227
           EditNewDoctorAdvice(
2228 2228
             this.patientID,
2229 2229
             this.adviceForm.id,
@@ -2277,7 +2277,7 @@ export default {
2277 2277
       });
2278 2278
     },
2279 2279
     submitgroupAdvice(formName) {
2280
-     
2280
+
2281 2281
       this.addLoading = true;
2282 2282
       this.$refs[formName].validate(valid => {
2283 2283
         if (valid) {
@@ -2290,8 +2290,8 @@ export default {
2290 2290
             remark: this.groupForm.remark,
2291 2291
             parent_id: this.groupForm.parent_id,
2292 2292
           };
2293
-        
2294
-         
2293
+
2294
+
2295 2295
           var adviceNames = [];
2296 2296
           for (const index in this.groupForm.adviceNames) {
2297 2297
             this.groupForm.adviceNames[
@@ -2312,7 +2312,7 @@ export default {
2312 2312
             mode = "1-3"
2313 2313
           }
2314 2314
         console.log("长期医嘱3333",submitForm)
2315
-       
2315
+
2316 2316
         if(this.private_drug_config != null&&this.private_drug_config.drug_start == 1){
2317 2317
               for(let index=0;index<submitForm.adviceNames.length;index++){
2318 2318
                   for(let i=0;i<this.medicals.length;i++){
@@ -2324,7 +2324,7 @@ export default {
2324 2324
               }
2325 2325
           }
2326 2326
           console.log("模板数据",submitForm)
2327
-        
2327
+
2328 2328
           CreateNewGroupAdvice(this.patientID, 0, submitForm, mode).then(
2329 2329
             response => {
2330 2330
               if (response.data.state == 0) {
@@ -2417,7 +2417,7 @@ export default {
2417 2417
               this.adviceForm.advice_name = arr[0]
2418 2418
           }
2419 2419
           console.log("222222",this.adviceForm)
2420
-         
2420
+
2421 2421
           CreateNewDoctorAdvice(this.patientID, this.adviceForm, mode).then(
2422 2422
             response => {
2423 2423
               if (response.data.state == 0) {
@@ -3028,7 +3028,7 @@ export default {
3028 3028
           row_key: this.rowKey,
3029 3029
           table: []
3030 3030
         };
3031
-      
3031
+
3032 3032
         if (item.id in childMap) {
3033 3033
           for (const key in childMap[item.id]) {
3034 3034
             this.rowKey++;
@@ -3068,7 +3068,7 @@ export default {
3068 3068
     },
3069 3069
 
3070 3070
     openEdit(index, row) {
3071
-      
3071
+
3072 3072
       this.currentIndex = index;
3073 3073
       (this.dialogTitle = "修改医嘱"), (this.isEdit = true);
3074 3074
 
@@ -4038,7 +4038,7 @@ export default {
4038 4038
       });
4039 4039
     },
4040 4040
     submitNameForm(formName) {
4041
-       
4041
+
4042 4042
        if(this.src_type == ""){
4043 4043
           this.nameForm.way = 0
4044 4044
           this.nameForm.drug_id = 0
@@ -4049,7 +4049,7 @@ export default {
4049 4049
           this.nameForm.advice_name = arr[0]
4050 4050
        }
4051 4051
       console.log("医嘱2222",this.nameForm)
4052
-     
4052
+
4053 4053
       var _this = this;
4054 4054
       this.$refs[formName].validate(valid => {
4055 4055
         if (valid) {
@@ -4355,17 +4355,17 @@ export default {
4355 4355
     // 获取勾选中的行
4356 4356
     getPrintInfo(ids) {
4357 4357
       console.log("23332332323232",this.adviceType,"33333333",this.stopType)
4358
-     
4358
+
4359 4359
       getPrintInfo({ids:ids},this.adviceType,this.stopType).then(response => {
4360 4360
         if (response.data.state === 1) {
4361 4361
           var doctoradvice = response.data.data.doctoradvice;
4362 4362
           console.log("doctoradvice", doctoradvice);
4363
-         
4363
+
4364 4364
           this.dataAdvice = doctoradvice;
4365 4365
           if (this.adviceType === 3 || this.adviceType === 2 || this.adviceType == 4) {
4366
-           
4366
+
4367 4367
             this.lstableData = this.dataAdvice;
4368
-            
4368
+
4369 4369
           } else if (this.adviceType === 1) {
4370 4370
             this.cqtableData = doctoradvice;
4371 4371
           }
@@ -4503,7 +4503,7 @@ export default {
4503 4503
             this.private_drug_config = response.data.data.private_drug_config
4504 4504
             console.log("medicals",medicalList)
4505 4505
             this.medicals = medicalList
4506
-          
4506
+
4507 4507
       })
4508 4508
     },
4509 4509
     changeDrugNameTwo(name){
@@ -4514,7 +4514,7 @@ export default {
4514 4514
         if (this.all_drug[i].drug_name == name) {
4515 4515
             this.drugSpec = this.all_drug[i].drug_specs
4516 4516
           }
4517
-       }   
4517
+       }
4518 4518
     },
4519 4519
    changeDrugDescTwo(name){
4520 4520
       this.current_drug_spec = name
@@ -4611,7 +4611,7 @@ export default {
4611 4611
 
4612 4612
       handleSelect1(val){
4613 4613
         this.drug_id = val.drug_id
4614
-        
4614
+
4615 4615
       },
4616 4616
       handleSelect(val){
4617 4617
         this.src_type = 1