zuozhengqing
2023-12-26 c7e79aa777774415a56c76f63b82b295dd795bd1
src/views/supplierManage/supplier/AddNewProduct.vue
@@ -96,14 +96,18 @@
            if (this.editConfig.title === "添加") {
              createProduct({
                list: this.tableData
              }).then((res) => {
                console.log(res)
                this.editConfig.visible = false
                if (res.code === 200) {
                  this.$message.success("添加成功")
                  this.$parent.getProductList()
                }
              })
                .then((res) => {
                  console.log(res)
                  this.editConfig.visible = false
                  if (res.code === 200) {
                    this.$message.success("添加成功")
                    this.$parent.getProductList()
                  }
                })
                .catch((e) => {
                  console.log(e)
                })
            } else {
              const params = this.saveParams()
              updateProduct(params).then((res) => {
@@ -152,17 +156,17 @@
            number: "",
            price: 0,
            total: 0,
            supplierId: this.supplierId
            supplierId:this.supplierId
          }
        ]
      } else {
        this.tableData = [{ ...this.editConfig.infomation }]
        this.tableData = [{ ...this.editConfig.infomation}]
        this.detailEnter = true
      }
      this.productTableList = {
        tableData: this.tableData,
        tableColumn: [
          { label: "产品名称", prop: "name", productName: true, isRequird: true },
          { label: "产品名称", prop: "name", productName: true, isRequird: true, width: 250 },
          { label: "产品编码", prop: "number" },
          { label: "计量单位", prop: "unit" },
          { label: "规格型号", prop: "specifications" },
@@ -181,7 +185,7 @@
      this.tableData.map((item) => {
        if (item.productId === row.productId) {
          item[prop] = val
          item.supplierId = this.supplierId
          item.supplierId =Number(this.supplierId)
          item.deliveryTime = this.deliveryTime
          item.shippingDuration = this.shippingDuration
          item.purchasePrice = this.purchasePrice