Browse Source

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

XMLWAN 3 years ago
parent
commit
cb5bc8b626

+ 1 - 1
src/xt_pages/supply/components/addGoodOrder.vue View File

@@ -872,7 +872,7 @@ export default {
872 872
     },
873 873
 
874 874
     count_arrearage() {
875
-      this.payment = this.total_price - this.arrearage;
875
+      this.payment = (this.total_price - this.arrearage).toFixed(2);
876 876
     },
877 877
     // checkPurchaseOrder() {
878 878
     //   this.$confirm("是否审核?", {

+ 26 - 19
src/xt_pages/supply/components/addGoodReturn.vue View File

@@ -454,6 +454,7 @@ export default {
454 454
       rate_of_concession: "",
455 455
       arrearage: "",
456 456
       payment: "",
457
+      total_price: 0,
457 458
       discount_amount: "",
458 459
       tableRules: {
459 460
         name: [{ required: true, message: "商品不能为空", trigger: "blur" }],
@@ -481,7 +482,9 @@ export default {
481 482
   watch: {
482 483
     total_price: function (newval, oldval) {
483 484
       if(this.rate_of_concession != ""){
485
+        console.log('00')
484 486
         this.addressChange()
487
+        this.count_payment()
485 488
       }
486 489
     }
487 490
   },
@@ -790,21 +793,18 @@ export default {
790 793
       }
791 794
       return uParseTime(time, "{y}-{m}-{d}");
792 795
     },
793
-
794
-     getAllPrice() {
796
+  getAllPrice() {
795 797
       var total_price = 0;
796 798
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
797
-        total_price +=(this.recordInfo.tableList[i].supply_price *this.recordInfo.tableList[i].supply_count - (this.recordInfo.tableList[i].supply_price * this.recordInfo.tableList[i].supply_count*this.recordInfo.tableList[i].deposit_rate/100))
799
+        total_price +=
800
+          this.recordInfo.tableList[i].supply_price *
801
+          this.recordInfo.tableList[i].supply_count;
798 802
       }
799 803
       this.total_price = total_price;
800
-      if(total_price > 0){
801
-         return total_price.toFixed(2);
802
-      }else{
803
-        return ""
804
-      }
805
-
804
+      // this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
805
+      return total_price.toFixed(2);
806 806
     },
807
-    addressChange() {
807
+     addressChange() {
808 808
       var discount_amount = 0;
809 809
       if (this.rate_of_concession > 0) {
810 810
         discount_amount = (
@@ -813,19 +813,26 @@ export default {
813 813
         ).toFixed(2);
814 814
       }
815 815
       this.discount_amount = discount_amount;
816
-
816
+      if(this.payment > 0) this.count_payment()
817 817
     },
818 818
     count_discount() {
819 819
       this.rate_of_concession = (
820
-        this.discount_amount /(this.total_price * 0.01)).toFixed(2);
820
+        this.discount_amount /
821
+        (this.total_price * 0.01)
822
+      ).toFixed(2);
823
+      if(this.payment > 0) this.count_payment()
821 824
     },
822
-      count_payment() {
823
-      let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
824
-       if(arrearage_1 > 0){
825
-          this.arrearage = arrearage_1
826
-       }else{
827
-         this.arrearage = 0
828
-       }
825
+    count_payment() {
826
+      let arrearage_1 = (
827
+        this.total_price -
828
+        this.discount_amount -
829
+        this.payment
830
+      ).toFixed(2);
831
+      if (arrearage_1 > 0) {
832
+        this.arrearage = arrearage_1;
833
+      } else {
834
+        this.arrearage = 0;
835
+      }
829 836
     },
830 837
 
831 838
     count_arrearage() {

+ 17 - 4
src/xt_pages/supply/components/addPurchaseOrder.vue View File

@@ -55,7 +55,7 @@
55 55
           ></el-date-picker>
56 56
           <span>单据编码:{{ number }}</span>
57 57
         </div>
58
-        <div>
58
+        <div style="display:flex;">
59 59
           <el-button
60 60
             size="small"
61 61
             type="primary"
@@ -449,6 +449,15 @@ 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
+
452 461
   methods: {
453 462
     getInitOrder() {
454 463
       getInitOrder().then((response) => {
@@ -874,6 +883,8 @@ export default {
874 883
         }
875 884
       });
876 885
     },
886
+
887
+
877 888
     getAllPrice() {
878 889
       var total_price = 0;
879 890
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
@@ -882,9 +893,11 @@ export default {
882 893
           this.recordInfo.tableList[i].supply_count;
883 894
       }
884 895
       this.total_price = total_price;
885
-      this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
896
+      // this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
886 897
       return total_price.toFixed(2);
887 898
     },
899
+
900
+    
888 901
     count_discount() {
889 902
       this.rate_of_concession = (
890 903
         this.discount_amount /
@@ -1127,8 +1140,8 @@ export default {
1127 1140
 }
1128 1141
 
1129 1142
 /deep/ .el-table__body-wrapper::-webkit-scrollbar {
1130
-  width: 10px;
1131
-  height: 10px;
1143
+  width: 15px !important;
1144
+  height: 15px !important;
1132 1145
 }
1133 1146
 </style>
1134 1147
 

+ 3 - 2
src/xt_pages/supply/components/editGoodOrder.vue View File

@@ -563,6 +563,7 @@ export default {
563 563
       warese_out_id: 0,
564 564
       return_remark: "",
565 565
       tableDataList: [],
566
+      total_price: 0,
566 567
     };
567 568
   },
568 569
    watch: {
@@ -880,7 +881,7 @@ export default {
880 881
       return uParseTime(time, "{y}-{m}-{d}");
881 882
     },
882 883
 
883
-    getAllPrice() {
884
+ getAllPrice() {
884 885
       var total_price = 0;
885 886
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
886 887
         total_price +=
@@ -888,7 +889,7 @@ export default {
888 889
           this.recordInfo.tableList[i].supply_count;
889 890
       }
890 891
       this.total_price = total_price;
891
-      this.addressChange();
892
+      // this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
892 893
       return total_price.toFixed(2);
893 894
     },
894 895
     addressChange() {

+ 31 - 11
src/xt_pages/supply/components/editGoodReturn.vue View File

@@ -500,8 +500,21 @@ export default {
500 500
       dialogVisible: false,
501 501
       return_remark: "",
502 502
       warehouse_out_id: 0,
503
+       total_price: 0,
503 504
     };
504 505
   },
506
+
507
+  watch: {
508
+    total_price: function (newval, oldval) {
509
+      if(this.rate_of_concession != ""){
510
+        console.log('00')
511
+        this.addressChange()
512
+        this.count_payment()
513
+      }
514
+    }
515
+  },
516
+
517
+
505 518
   methods: {
506 519
     getInitOrder() {
507 520
       getInitOrder().then((response) => {
@@ -937,21 +950,19 @@ export default {
937 950
         }
938 951
       });
939 952
     },
940
-    getAllPrice() {
953
+  getAllPrice() {
941 954
       var total_price = 0;
942 955
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
943
-        total_price +=(this.recordInfo.tableList[i].supply_price *this.recordInfo.tableList[i].supply_count - (this.recordInfo.tableList[i].supply_price * this.recordInfo.tableList[i].supply_count*this.recordInfo.tableList[i].deposit_rate/100))
956
+        total_price +=
957
+          this.recordInfo.tableList[i].supply_price *
958
+          this.recordInfo.tableList[i].supply_count;
944 959
       }
945 960
       this.total_price = total_price;
946
-      if(total_price > 0){
947
-         return total_price.toFixed(2);
948
-      }else{
949
-        return ""
950
-      }
951
-     
961
+      // this.discount_amount = (this.total_price * this.rate_of_concession * 0.01).toFixed(2);
962
+      return total_price.toFixed(2);
952 963
     },
953 964
 
954
-    addressChange() {
965
+     addressChange() {
955 966
       var discount_amount = 0;
956 967
       if (this.rate_of_concession > 0) {
957 968
         discount_amount = (
@@ -960,16 +971,25 @@ export default {
960 971
         ).toFixed(2);
961 972
       }
962 973
       this.discount_amount = discount_amount;
974
+      if(this.payment > 0) this.count_payment()
963 975
     },
976
+
977
+
964 978
     count_discount() {
965 979
       this.rate_of_concession = (
966 980
         this.discount_amount /
967 981
         (this.total_price * 0.01)
968 982
       ).toFixed(2);
969
-
983
+      if(this.payment > 0) this.count_payment()
970 984
     },
985
+
986
+
971 987
     count_payment() {
972
-      let arrearage_1 = (this.total_price - this.discount_amount - this.payment).toFixed(2);
988
+      let arrearage_1 = (
989
+        this.total_price -
990
+        this.discount_amount -
991
+        this.payment
992
+      ).toFixed(2);
973 993
       if (arrearage_1 > 0) {
974 994
         this.arrearage = arrearage_1;
975 995
       } else {

+ 1 - 1
src/xt_pages/supply/components/goodOrderPrint.vue View File

@@ -76,7 +76,7 @@
76 76
                   <td style="line-height: 18px">{{getAllPriceOne()}}</td>
77 77
                 </tr>
78 78
                  <tr>
79
-                  <td colspan="9" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
79
+                  <td colspan="9" style="line-height: 18px;text-align: left;">合计  金额大写 {{getAllPrice()}}</td>
80 80
                 </tr>
81 81
               </tbody>
82 82
             </table>

+ 1 - 1
src/xt_pages/supply/components/goodReturnPrint.vue View File

@@ -87,7 +87,7 @@
87 87
                   <td style="line-height: 18px">{{getAllPriceTwo()}}</td>
88 88
                 </tr>
89 89
                  <tr>
90
-                  <td colspan="9" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
90
+                  <td colspan="9" style="line-height: 18px;text-align: left;">合计  金额大写 {{getAllPrice()}}</td>
91 91
                 </tr>
92 92
               </tbody>
93 93
             </table>

+ 1 - 1
src/xt_pages/supply/components/purchaseOrderPrint.vue View File

@@ -74,7 +74,7 @@
74 74
                   <td colspan="2" style="line-height: 18px">{{getTotalPrice()}}</td>
75 75
                 </tr>
76 76
                  <tr>
77
-                  <td colspan="6" style="line-height: 18px">合计  金额大写 {{getAllPrice()}}</td>
77
+                  <td colspan="6" style="line-height: 18px;text-align: left;">合计  金额大写 {{getAllPrice()}}</td>
78 78
                  </tr>
79 79
               </tbody>
80 80
             </table>

+ 3 - 7
src/xt_pages/supply/goodreturn.vue View File

@@ -492,14 +492,10 @@ export default {
492 492
 }
493 493
 
494 494
 .el-table__fixed-right {
495
-  width: 150px;
496
-  bottom: 20px;
497 495
   height: 100% !important;
498 496
 }
499
-.el-table__fixed-body-wrapper {
497
+/* .el-table__fixed-body-wrapper {
500 498
   height: 100%;
501
-}
502
-.el-table__body-wrapper.is-scrolling-left {
503
-  max-height: 100% !important;
504
-}
499
+} */
500
+
505 501
 </style>

+ 2 - 5
src/xt_pages/supply/purchaseOrderQuery.vue View File

@@ -103,11 +103,9 @@
103 103
         </el-table-column>
104 104
         <el-table-column label="关联采购单号" align="center" width="150">
105 105
           <template slot-scope="scope">
106
-            <div style="width: 100%; height: 100%">
107
-              <tr class="color" v-for="(item,index) in scope.row.orderOut" :key="index">
108
-                 <td style="border-right:none;">{{item.good_number}}</td>
106
+            <tr v-for="(item,index) in scope.row.orderOut" :key="index">
107
+                 <td>{{item.good_number}}</td>
109 108
               </tr>
110
-            </div>
111 109
           </template>
112 110
         </el-table-column>
113 111
         <el-table-column label="采购金额" align="center">
@@ -212,7 +210,6 @@ export default {
212 210
   data() {
213 211
     return {
214 212
       isActive: false,
215
-      aa: ["111111", "22222"],
216 213
       Color_txt: true,
217 214
       crumbs: [
218 215
         { path: false, name: "采购管理" },