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
     },
872
     },
873
 
873
 
874
     count_arrearage() {
874
     count_arrearage() {
875
-      this.payment = this.total_price - this.arrearage;
875
+      this.payment = (this.total_price - this.arrearage).toFixed(2);
876
     },
876
     },
877
     // checkPurchaseOrder() {
877
     // checkPurchaseOrder() {
878
     //   this.$confirm("是否审核?", {
878
     //   this.$confirm("是否审核?", {

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

454
       rate_of_concession: "",
454
       rate_of_concession: "",
455
       arrearage: "",
455
       arrearage: "",
456
       payment: "",
456
       payment: "",
457
+      total_price: 0,
457
       discount_amount: "",
458
       discount_amount: "",
458
       tableRules: {
459
       tableRules: {
459
         name: [{ required: true, message: "商品不能为空", trigger: "blur" }],
460
         name: [{ required: true, message: "商品不能为空", trigger: "blur" }],
481
   watch: {
482
   watch: {
482
     total_price: function (newval, oldval) {
483
     total_price: function (newval, oldval) {
483
       if(this.rate_of_concession != ""){
484
       if(this.rate_of_concession != ""){
485
+        console.log('00')
484
         this.addressChange()
486
         this.addressChange()
487
+        this.count_payment()
485
       }
488
       }
486
     }
489
     }
487
   },
490
   },
790
       }
793
       }
791
       return uParseTime(time, "{y}-{m}-{d}");
794
       return uParseTime(time, "{y}-{m}-{d}");
792
     },
795
     },
793
-
794
-     getAllPrice() {
796
+  getAllPrice() {
795
       var total_price = 0;
797
       var total_price = 0;
796
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
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
       this.total_price = total_price;
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
       var discount_amount = 0;
808
       var discount_amount = 0;
809
       if (this.rate_of_concession > 0) {
809
       if (this.rate_of_concession > 0) {
810
         discount_amount = (
810
         discount_amount = (
813
         ).toFixed(2);
813
         ).toFixed(2);
814
       }
814
       }
815
       this.discount_amount = discount_amount;
815
       this.discount_amount = discount_amount;
816
-
816
+      if(this.payment > 0) this.count_payment()
817
     },
817
     },
818
     count_discount() {
818
     count_discount() {
819
       this.rate_of_concession = (
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
     count_arrearage() {
838
     count_arrearage() {

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

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

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

563
       warese_out_id: 0,
563
       warese_out_id: 0,
564
       return_remark: "",
564
       return_remark: "",
565
       tableDataList: [],
565
       tableDataList: [],
566
+      total_price: 0,
566
     };
567
     };
567
   },
568
   },
568
    watch: {
569
    watch: {
880
       return uParseTime(time, "{y}-{m}-{d}");
881
       return uParseTime(time, "{y}-{m}-{d}");
881
     },
882
     },
882
 
883
 
883
-    getAllPrice() {
884
+ getAllPrice() {
884
       var total_price = 0;
885
       var total_price = 0;
885
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
886
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
886
         total_price +=
887
         total_price +=
888
           this.recordInfo.tableList[i].supply_count;
889
           this.recordInfo.tableList[i].supply_count;
889
       }
890
       }
890
       this.total_price = total_price;
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
       return total_price.toFixed(2);
893
       return total_price.toFixed(2);
893
     },
894
     },
894
     addressChange() {
895
     addressChange() {

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

500
       dialogVisible: false,
500
       dialogVisible: false,
501
       return_remark: "",
501
       return_remark: "",
502
       warehouse_out_id: 0,
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
   methods: {
518
   methods: {
506
     getInitOrder() {
519
     getInitOrder() {
507
       getInitOrder().then((response) => {
520
       getInitOrder().then((response) => {
937
         }
950
         }
938
       });
951
       });
939
     },
952
     },
940
-    getAllPrice() {
953
+  getAllPrice() {
941
       var total_price = 0;
954
       var total_price = 0;
942
       for (let i = 0; i < this.recordInfo.tableList.length; i++) {
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
       this.total_price = total_price;
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
       var discount_amount = 0;
966
       var discount_amount = 0;
956
       if (this.rate_of_concession > 0) {
967
       if (this.rate_of_concession > 0) {
957
         discount_amount = (
968
         discount_amount = (
960
         ).toFixed(2);
971
         ).toFixed(2);
961
       }
972
       }
962
       this.discount_amount = discount_amount;
973
       this.discount_amount = discount_amount;
974
+      if(this.payment > 0) this.count_payment()
963
     },
975
     },
976
+
977
+
964
     count_discount() {
978
     count_discount() {
965
       this.rate_of_concession = (
979
       this.rate_of_concession = (
966
         this.discount_amount /
980
         this.discount_amount /
967
         (this.total_price * 0.01)
981
         (this.total_price * 0.01)
968
       ).toFixed(2);
982
       ).toFixed(2);
969
-
983
+      if(this.payment > 0) this.count_payment()
970
     },
984
     },
985
+
986
+
971
     count_payment() {
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
       if (arrearage_1 > 0) {
993
       if (arrearage_1 > 0) {
974
         this.arrearage = arrearage_1;
994
         this.arrearage = arrearage_1;
975
       } else {
995
       } else {

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

76
                   <td style="line-height: 18px">{{getAllPriceOne()}}</td>
76
                   <td style="line-height: 18px">{{getAllPriceOne()}}</td>
77
                 </tr>
77
                 </tr>
78
                  <tr>
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
                 </tr>
80
                 </tr>
81
               </tbody>
81
               </tbody>
82
             </table>
82
             </table>

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

87
                   <td style="line-height: 18px">{{getAllPriceTwo()}}</td>
87
                   <td style="line-height: 18px">{{getAllPriceTwo()}}</td>
88
                 </tr>
88
                 </tr>
89
                  <tr>
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
                 </tr>
91
                 </tr>
92
               </tbody>
92
               </tbody>
93
             </table>
93
             </table>

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

74
                   <td colspan="2" style="line-height: 18px">{{getTotalPrice()}}</td>
74
                   <td colspan="2" style="line-height: 18px">{{getTotalPrice()}}</td>
75
                 </tr>
75
                 </tr>
76
                  <tr>
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
                  </tr>
78
                  </tr>
79
               </tbody>
79
               </tbody>
80
             </table>
80
             </table>

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

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

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

103
         </el-table-column>
103
         </el-table-column>
104
         <el-table-column label="关联采购单号" align="center" width="150">
104
         <el-table-column label="关联采购单号" align="center" width="150">
105
           <template slot-scope="scope">
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
               </tr>
108
               </tr>
110
-            </div>
111
           </template>
109
           </template>
112
         </el-table-column>
110
         </el-table-column>
113
         <el-table-column label="采购金额" align="center">
111
         <el-table-column label="采购金额" align="center">
212
   data() {
210
   data() {
213
     return {
211
     return {
214
       isActive: false,
212
       isActive: false,
215
-      aa: ["111111", "22222"],
216
       Color_txt: true,
213
       Color_txt: true,
217
       crumbs: [
214
       crumbs: [
218
         { path: false, name: "采购管理" },
215
         { path: false, name: "采购管理" },