From c7e79aa777774415a56c76f63b82b295dd795bd1 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期二, 26 十二月 2023 11:00:45 +0800 Subject: [PATCH] 修改供应商更新传参 --- src/views/supplierManage/supplier/AddNewProduct.vue | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/views/supplierManage/supplier/AddNewProduct.vue b/src/views/supplierManage/supplier/AddNewProduct.vue index d5e590c..c06cabd 100644 --- a/src/views/supplierManage/supplier/AddNewProduct.vue +++ b/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 -- Gitblit v1.8.0