From 8380b537474be9b9aa24efcd65c730e2907b9b8b Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期六, 26 八月 2023 18:07:48 +0800 Subject: [PATCH] 服务商相关接口联调 --- src/views/supplierManage/supplier/AddNewProduct.vue | 47 ++++++++++++++++++++++------------------------- 1 files changed, 22 insertions(+), 25 deletions(-) diff --git a/src/views/supplierManage/supplier/AddNewProduct.vue b/src/views/supplierManage/supplier/AddNewProduct.vue index f1d305e..b9a1812 100644 --- a/src/views/supplierManage/supplier/AddNewProduct.vue +++ b/src/views/supplierManage/supplier/AddNewProduct.vue @@ -31,7 +31,7 @@ </template> <script> -// import { getAddContact, getUpdateContact } from "@/api/client/contacts" +// import { createProduct, updateProduct } from "@/api/productManage/product" import CommonFormTableView from "@/components/makepager/CommonFormTableView" export default { name: "AddNewProduct", @@ -75,7 +75,7 @@ const params = this.saveParams() console.log(params) if (this.editConfig.title === "娣诲姞") { - // getAddContact(params).then((res) => { + // createProduct(params).then((res) => { // console.log(res) // this.editConfig.visible = false // if (res.code === 200) { @@ -84,7 +84,7 @@ // } // }) } else { - // getUpdateContact(params).then((res) => { + // updateProduct(params).then((res) => { // console.log(res) // this.editConfig.visible = false // if (res.code === 200) { @@ -95,24 +95,21 @@ } }, saveParams() { - let data = this.editConfig.infomation + // let data = this.editConfig.infomation let params = { - id: this.editConfig.title === "娣诲姞" ? 0 : data.id, - birthday: data.birthday || "", - city_id: data.city_id || 0, - client_id: this.clientId || 0, - country_id: data.country_id || 0, - desc: data.desc || "", - email: data.email || "", - is_first: data.is_first || false, - member_id: data.member_id || 0, - name: data.name || "", - number: data.number || "", - phone: data.phone || "", - position: data.position || "", - province_id: data.province_id || 0, - region_id: data.region_id || 0, - wechat: data.wechat || "" + deliveryTime: 0, + id: 0, + maximumStock: 0, + minimumStock: 0, + name: "string", + number: "string", + productType: "string", + purchasePrice: 0, + remark: "string", + shippingDuration: 0, + specifications: "string", + supplierId: 0, + unit: "string" } return params }, @@ -141,11 +138,11 @@ tableColumn: [ { label: "浜у搧鍚嶇О", prop: "name", productName: true, isRequird: true }, { label: "浜у搧缂栫爜", prop: "number" }, - { label: "璁¢噺鍗曚綅", prop: "number" }, - { label: "瑙勬牸鍨嬪彿", prop: "number" }, - { label: "閲囪喘浠锋牸", prop: "amount", inputFloat: true, isRequird: true }, - { label: "渚涜揣鏃堕暱", prop: "price", inputNumber: true, isRequird: true }, - { label: "鐗╂祦鏃堕暱", prop: "total", inputNumber: true, isRequird: true } + { label: "璁¢噺鍗曚綅", prop: "unit" }, + { label: "瑙勬牸鍨嬪彿", prop: "specifications" }, + { label: "閲囪喘浠锋牸", prop: "purchasePrice", inputFloat: true, isRequird: true }, + { label: "渚涜揣鏃堕暱", prop: "deliveryTime", inputNumber: true, isRequird: true }, + { label: "鐗╂祦鏃堕暱", prop: "shippingDuration", inputNumber: true, isRequird: true } ] } }, -- Gitblit v1.8.0