فهرست منبع

去点击input时其他input为空

17767204043 3 سال پیش
والد
کامیت
2134239250
1فایلهای تغییر یافته به همراه170 افزوده شده و 170 حذف شده
  1. 170 170
      src/views/PurchasingManage/InstockOrder/edit.vue

+ 170 - 170
src/views/PurchasingManage/InstockOrder/edit.vue

@@ -903,37 +903,37 @@ export default {
                       this.tableData.splice(index, 1, currentRow);
                       this.$forceUpdate();
                     },
-                    "on-focus": () => {
-                      if (
-                        this.$route.query.type == 6 ||
-                        this.$route.query.type == 3
-                      ) {
-                        return;
-                      }
-                      currentRow.no_tax_price = "";
-                      currentRow.no_tax_total_price = (
-                        currentRow.no_tax_price *
-                        1 *
-                        currentRow.num
-                      ).toFixed(2);
-                      currentRow.price = (
-                        currentRow.no_tax_price *
-                        1 *
-                        (1 + (currentRow.tax_rate * 1) / 100)
-                      ).toFixed(2);
-                      currentRow.total = (
-                        currentRow.no_tax_price *
-                        1 *
-                        (1 + (currentRow.tax_rate * 1) / 100) *
-                        currentRow.num *
-                        1
-                      ).toFixed(2);
-                      currentRow.tax_total_price = (
-                        currentRow.total * 1 -
-                        currentRow.no_tax_total_price * 1
-                      ).toFixed(2);
-                      this.tableData.splice(index, 1, currentRow);
-                    },
+                    // "on-focus": () => {
+                    //   if (
+                    //     this.$route.query.type == 6 ||
+                    //     this.$route.query.type == 3
+                    //   ) {
+                    //     return;
+                    //   }
+                    //   currentRow.no_tax_price = "";
+                    //   currentRow.no_tax_total_price = (
+                    //     currentRow.no_tax_price *
+                    //     1 *
+                    //     currentRow.num
+                    //   ).toFixed(2);
+                    //   currentRow.price = (
+                    //     currentRow.no_tax_price *
+                    //     1 *
+                    //     (1 + (currentRow.tax_rate * 1) / 100)
+                    //   ).toFixed(2);
+                    //   currentRow.total = (
+                    //     currentRow.no_tax_price *
+                    //     1 *
+                    //     (1 + (currentRow.tax_rate * 1) / 100) *
+                    //     currentRow.num *
+                    //     1
+                    //   ).toFixed(2);
+                    //   currentRow.tax_total_price = (
+                    //     currentRow.total * 1 -
+                    //     currentRow.no_tax_total_price * 1
+                    //   ).toFixed(2);
+                    //   this.tableData.splice(index, 1, currentRow);
+                    // },
                   },
                 });
           },
@@ -985,34 +985,34 @@ export default {
                         ).toFixed(2);
                         this.tableData.splice(index, 1, currentRow);
                       },
-                      "on-focus": () => {
-                        if (
-                          this.$route.query.type == 6 ||
-                          this.$route.query.type == 3
-                        ) {
-                          return;
-                        }
-                        currentRow.tax_rate = "";
-                        currentRow.price = (
-                          currentRow.no_tax_price *
-                          1 *
-                          (1 + (currentRow.tax_rate * 1) / 100)
-                        ).toFixed(2);
-                        currentRow.total = (
-                          currentRow.no_tax_price *
-                          1 *
-                          (1 + (currentRow.tax_rate * 1) / 100) *
-                          currentRow.num
-                        ).toFixed(2);
-                        currentRow.tax_total_price = (
-                          currentRow.no_tax_price *
-                            1 *
-                            (1 + (currentRow.tax_rate * 1) / 100) *
-                            currentRow.num -
-                          currentRow.no_tax_total_price
-                        ).toFixed(2);
-                        this.tableData.splice(index, 1, currentRow);
-                      },
+                      // "on-focus": () => {
+                      //   if (
+                      //     this.$route.query.type == 6 ||
+                      //     this.$route.query.type == 3
+                      //   ) {
+                      //     return;
+                      //   }
+                      //   currentRow.tax_rate = "";
+                      //   currentRow.price = (
+                      //     currentRow.no_tax_price *
+                      //     1 *
+                      //     (1 + (currentRow.tax_rate * 1) / 100)
+                      //   ).toFixed(2);
+                      //   currentRow.total = (
+                      //     currentRow.no_tax_price *
+                      //     1 *
+                      //     (1 + (currentRow.tax_rate * 1) / 100) *
+                      //     currentRow.num
+                      //   ).toFixed(2);
+                      //   currentRow.tax_total_price = (
+                      //     currentRow.no_tax_price *
+                      //       1 *
+                      //       (1 + (currentRow.tax_rate * 1) / 100) *
+                      //       currentRow.num -
+                      //     currentRow.no_tax_total_price
+                      //   ).toFixed(2);
+                      //   this.tableData.splice(index, 1, currentRow);
+                      // },
                     },
                   },
                   [h("span", { slot: "append" }, "%")]
@@ -1068,38 +1068,38 @@ export default {
                       ).toFixed(2);
                       this.tableData.splice(index, 1, currentRow);
                     },
-                    "on-focus": () => {
-                      if (
-                        this.$route.query.type == 6 ||
-                        this.$route.query.type == 3
-                      ) {
-                        return;
-                      }
-                      currentRow.price = "";
-                      currentRow.no_tax_price = (
-                        (currentRow.price * 1) /
-                        (1 + (currentRow.tax_rate * 1) / 100)
-                      ).toFixed(2);
-                      currentRow.no_tax_total_price = (
-                        ((currentRow.price * 1) /
-                          (1 + (currentRow.tax_rate * 1) / 100)) *
-                        currentRow.num *
-                        1
-                      ).toFixed(2);
-                      currentRow.total = (
-                        currentRow.price *
-                        1 *
-                        currentRow.num
-                      ).toFixed(2);
-                      currentRow.tax_total_price = (
-                        currentRow.price * 1 * currentRow.num -
-                        ((currentRow.price * 1) /
-                          (1 + (currentRow.tax_rate * 1) / 100)) *
-                          currentRow.num *
-                          1
-                      ).toFixed(2);
-                      this.tableData.splice(index, 1, currentRow);
-                    },
+                    // "on-focus": () => {
+                    //   if (
+                    //     this.$route.query.type == 6 ||
+                    //     this.$route.query.type == 3
+                    //   ) {
+                    //     return;
+                    //   }
+                    //   currentRow.price = "";
+                    //   currentRow.no_tax_price = (
+                    //     (currentRow.price * 1) /
+                    //     (1 + (currentRow.tax_rate * 1) / 100)
+                    //   ).toFixed(2);
+                    //   currentRow.no_tax_total_price = (
+                    //     ((currentRow.price * 1) /
+                    //       (1 + (currentRow.tax_rate * 1) / 100)) *
+                    //     currentRow.num *
+                    //     1
+                    //   ).toFixed(2);
+                    //   currentRow.total = (
+                    //     currentRow.price *
+                    //     1 *
+                    //     currentRow.num
+                    //   ).toFixed(2);
+                    //   currentRow.tax_total_price = (
+                    //     currentRow.price * 1 * currentRow.num -
+                    //     ((currentRow.price * 1) /
+                    //       (1 + (currentRow.tax_rate * 1) / 100)) *
+                    //       currentRow.num *
+                    //       1
+                    //   ).toFixed(2);
+                    //   this.tableData.splice(index, 1, currentRow);
+                    // },
                   },
                 });
           },
@@ -1167,48 +1167,48 @@ export default {
                         : 0;
                       this.tableData.splice(index, 1, currentRow);
                     },
-                    "on-focus": () => {
-                      if (
-                        this.$route.query.type == 6 ||
-                        this.$route.query.type == 3
-                      ) {
-                        return;
-                      }
-                      currentRow.no_tax_total_price = "";
-                      currentRow.no_tax_price = currentRow.num
-                        ? (
-                            (currentRow.no_tax_total_price * 1) /
-                            (currentRow.num * 1)
-                          ).toFixed(2)
-                        : 0;
-                      currentRow.price = currentRow.num
-                        ? (
-                            ((currentRow.no_tax_total_price * 1) /
-                              (currentRow.num * 1)) *
-                            (1 + (currentRow.tax_rate * 1) / 100)
-                          ).toFixed(2)
-                        : 0;
-                      currentRow.total = currentRow.num
-                        ? (
-                            ((currentRow.no_tax_total_price * 1) /
-                              (currentRow.num * 1)) *
-                            (1 + (currentRow.tax_rate * 1) / 100) *
-                            currentRow.num *
-                            1
-                          ).toFixed(2)
-                        : 0;
-                      currentRow.tax_total_price = currentRow.num
-                        ? (
-                            ((currentRow.no_tax_total_price * 1) /
-                              (currentRow.num * 1)) *
-                              (1 + (currentRow.tax_rate * 1) / 100) *
-                              currentRow.num *
-                              1 -
-                            currentRow.no_tax_total_price * 1
-                          ).toFixed(2)
-                        : 0;
-                      this.tableData.splice(index, 1, currentRow);
-                    },
+                    // "on-focus": () => {
+                    //   if (
+                    //     this.$route.query.type == 6 ||
+                    //     this.$route.query.type == 3
+                    //   ) {
+                    //     return;
+                    //   }
+                    //   currentRow.no_tax_total_price = "";
+                    //   currentRow.no_tax_price = currentRow.num
+                    //     ? (
+                    //         (currentRow.no_tax_total_price * 1) /
+                    //         (currentRow.num * 1)
+                    //       ).toFixed(2)
+                    //     : 0;
+                    //   currentRow.price = currentRow.num
+                    //     ? (
+                    //         ((currentRow.no_tax_total_price * 1) /
+                    //           (currentRow.num * 1)) *
+                    //         (1 + (currentRow.tax_rate * 1) / 100)
+                    //       ).toFixed(2)
+                    //     : 0;
+                    //   currentRow.total = currentRow.num
+                    //     ? (
+                    //         ((currentRow.no_tax_total_price * 1) /
+                    //           (currentRow.num * 1)) *
+                    //         (1 + (currentRow.tax_rate * 1) / 100) *
+                    //         currentRow.num *
+                    //         1
+                    //       ).toFixed(2)
+                    //     : 0;
+                    //   currentRow.tax_total_price = currentRow.num
+                    //     ? (
+                    //         ((currentRow.no_tax_total_price * 1) /
+                    //           (currentRow.num * 1)) *
+                    //           (1 + (currentRow.tax_rate * 1) / 100) *
+                    //           currentRow.num *
+                    //           1 -
+                    //         currentRow.no_tax_total_price * 1
+                    //       ).toFixed(2)
+                    //     : 0;
+                    //   this.tableData.splice(index, 1, currentRow);
+                    // },
                   },
                 });
           },
@@ -1442,43 +1442,43 @@ export default {
                         : 0;
                       this.tableData.splice(index, 1, currentRow);
                     },
-                    "on-focus": () => {
-                      if (
-                        this.$route.query.type == 6 ||
-                        this.$route.query.type == 3
-                      ) {
-                        return;
-                      }
-                      currentRow.total = "";
-                      currentRow.price = currentRow.num
-                        ? (
-                            (currentRow.total * 1) /
-                            (currentRow.num * 1)
-                          ).toFixed(2)
-                        : 0;
-                      currentRow.no_tax_price = (
-                        currentRow.price /
-                        (1 + (currentRow.tax_rate * 1) / 100)
-                      ).toFixed(2);
-                      currentRow.no_tax_total_price = currentRow.num
-                        ? (
-                            ((currentRow.total * 1) /
-                              (currentRow.num * 1) /
-                              (1 + (currentRow.tax_rate * 1) / 100)) *
-                            (currentRow.num * 1)
-                          ).toFixed(2)
-                        : 0;
-                      currentRow.tax_total_price = currentRow.num
-                        ? (
-                            currentRow.total * 1 -
-                            ((currentRow.total * 1) /
-                              (currentRow.num * 1) /
-                              (1 + (currentRow.tax_rate * 1) / 100)) *
-                              (currentRow.num * 1)
-                          ).toFixed(2)
-                        : 0;
-                      this.tableData.splice(index, 1, currentRow);
-                    },
+                    // "on-focus": () => {
+                    //   if (
+                    //     this.$route.query.type == 6 ||
+                    //     this.$route.query.type == 3
+                    //   ) {
+                    //     return;
+                    //   }
+                    //   currentRow.total = "";
+                    //   currentRow.price = currentRow.num
+                    //     ? (
+                    //         (currentRow.total * 1) /
+                    //         (currentRow.num * 1)
+                    //       ).toFixed(2)
+                    //     : 0;
+                    //   currentRow.no_tax_price = (
+                    //     currentRow.price /
+                    //     (1 + (currentRow.tax_rate * 1) / 100)
+                    //   ).toFixed(2);
+                    //   currentRow.no_tax_total_price = currentRow.num
+                    //     ? (
+                    //         ((currentRow.total * 1) /
+                    //           (currentRow.num * 1) /
+                    //           (1 + (currentRow.tax_rate * 1) / 100)) *
+                    //         (currentRow.num * 1)
+                    //       ).toFixed(2)
+                    //     : 0;
+                    //   currentRow.tax_total_price = currentRow.num
+                    //     ? (
+                    //         currentRow.total * 1 -
+                    //         ((currentRow.total * 1) /
+                    //           (currentRow.num * 1) /
+                    //           (1 + (currentRow.tax_rate * 1) / 100)) *
+                    //           (currentRow.num * 1)
+                    //       ).toFixed(2)
+                    //     : 0;
+                    //   this.tableData.splice(index, 1, currentRow);
+                    // },
                   },
                 });
           },