|  | @@ -2962,6 +2962,7 @@ export default {
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      init() {
 | 
	
		
			
				|  |  | +      this.approVal = false;
 | 
	
		
			
				|  |  |        this.resetForm("form");
 | 
	
		
			
				|  |  |        this.resetForm("importList");
 | 
	
		
			
				|  |  |        this.detailList = [];
 | 
	
	
		
			
				|  | @@ -2973,6 +2974,10 @@ export default {
 | 
	
		
			
				|  |  |        if (this.dataShowcar == "1") {
 | 
	
		
			
				|  |  |          this.detailsHidden2 = false;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +      if (this.$route.query.id) {
 | 
	
		
			
				|  |  | +        this.approVal = true;
 | 
	
		
			
				|  |  | +        this.$router.push({ query: {} });
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |        this.getForm();
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      reset() {
 | 
	
	
		
			
				|  | @@ -3111,8 +3116,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      returnData() {
 | 
	
		
			
				|  |  |        this.addOrUpdateVisib = false;
 | 
	
		
			
				|  |  | -      this.open = false;
 | 
	
		
			
				|  |  | -      this.cancelTwo();
 | 
	
		
			
				|  |  | +      this.$router.push({ path: "/index" });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      addOrUpdateHandle(form) {
 | 
	
		
			
				|  |  |        this.addOrUpdateVisible = true;
 | 
	
	
		
			
				|  | @@ -3849,34 +3853,6 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    // 付款合计
 | 
	
		
			
				|  |  | -    warehouseDrSummaries(param) {
 | 
	
		
			
				|  |  | -      const { columns, data } = param;
 | 
	
		
			
				|  |  | -      const sums = [];
 | 
	
		
			
				|  |  | -      columns.forEach((column, index) => {
 | 
	
		
			
				|  |  | -        if (index === 0) {
 | 
	
		
			
				|  |  | -          sums[index] = "合计";
 | 
	
		
			
				|  |  | -          return;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        const values = data.map((item) => Number(item[column.property]));
 | 
	
		
			
				|  |  | -        if (
 | 
	
		
			
				|  |  | -          column.property === "fUnitprice" ||
 | 
	
		
			
				|  |  | -          column.property === "fAmount" ||
 | 
	
		
			
				|  |  | -          column.property === "fQty"
 | 
	
		
			
				|  |  | -        ) {
 | 
	
		
			
				|  |  | -          sums[index] = values.reduce((prev, curr) => {
 | 
	
		
			
				|  |  | -            const value = Number(curr);
 | 
	
		
			
				|  |  | -            if (!isNaN(value)) {
 | 
	
		
			
				|  |  | -              return prev + curr;
 | 
	
		
			
				|  |  | -            } else {
 | 
	
		
			
				|  |  | -              return prev;
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -          }, 0);
 | 
	
		
			
				|  |  | -          sums[index] = sums[index].toFixed(2);
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | -      return sums;
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  |      // 收款信息新行
 | 
	
		
			
				|  |  |      addCollection() {
 | 
	
		
			
				|  |  |        this.$refs["form"].validate((valid) => {
 | 
	
	
		
			
				|  | @@ -4095,6 +4071,8 @@ export default {
 | 
	
		
			
				|  |  |              this.importList.fQty = this.Printinglist[0].fQty;
 | 
	
		
			
				|  |  |              this.importList.fGrossweight = this.Printinglist[0].fGrossweight;
 | 
	
		
			
				|  |  |              this.importList.fNetweight = this.Printinglist[0].fNetweight;
 | 
	
		
			
				|  |  | +            this.tfNetweightnum2 = (this.importList.fNetweight / 1000).toFixed(2);
 | 
	
		
			
				|  |  | +            this.tfGrossweightnum2 = (this.importList.fGrossweight / 1000).toFixed(2);
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |            console.log(this.importList);
 | 
	
		
			
				|  |  |            this.weightList = true;
 | 
	
	
		
			
				|  | @@ -4306,42 +4284,6 @@ export default {
 | 
	
		
			
				|  |  |          this.isrequired2 = 2;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    // 数量计算
 | 
	
		
			
				|  |  | -    changeContractAmt(row) {
 | 
	
		
			
				|  |  | -      let fQty = 0;
 | 
	
		
			
				|  |  | -      let fUnitprice = 0;
 | 
	
		
			
				|  |  | -      if (row.fUnitprice) {
 | 
	
		
			
				|  |  | -        fUnitprice = row.fUnitprice;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (row.fQty) {
 | 
	
		
			
				|  |  | -        fQty = row.fQty;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    // 变更计价单位
 | 
	
		
			
				|  |  | -    changeFeeUnit(row) {
 | 
	
		
			
				|  |  | -      if (!row.fFeeUnitid) {
 | 
	
		
			
				|  |  | -        return false;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (row.fFeeUnitid === "2") {
 | 
	
		
			
				|  |  | -        this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
 | 
	
		
			
				|  |  | -      } else if (row.fFeeUnitid === "1") {
 | 
	
		
			
				|  |  | -        this.$set(row, "fQty", this.fQty.toFixed(2));
 | 
	
		
			
				|  |  | -      } else if (row.fFeeUnitid === "3") {
 | 
	
		
			
				|  |  | -        this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
 | 
	
		
			
				|  |  | -      } else if (row.fFeeUnitid === "7") {
 | 
	
		
			
				|  |  | -        this.$set(row, "fQty", this.fCntqty);
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        this.$set(row, "fQty", 0);
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -      if (row.fUnitprice) {
 | 
	
		
			
				|  |  | -        this.$set(
 | 
	
		
			
				|  |  | -          row,
 | 
	
		
			
				|  |  | -          "fAmount",
 | 
	
		
			
				|  |  | -          parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
 | 
	
		
			
				|  |  | -        );
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  |      //打印
 | 
	
		
			
				|  |  |      addprint(status) {
 | 
	
		
			
				|  |  |        if (status == "zyd") {
 | 
	
	
		
			
				|  | @@ -4434,6 +4376,9 @@ export default {
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      cancel() {
 | 
	
		
			
				|  |  | +      if (this.$route.query.id) {
 | 
	
		
			
				|  |  | +        this.$router.push({ query: {} });
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |        this.resetForm("form");
 | 
	
		
			
				|  |  |        this.resetForm("importList");
 | 
	
		
			
				|  |  |        this.detailList = [];
 |