From a7640afbc0ecc04ee7a5ccf7f4beba712b6f7708 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98mahaoran=E2=80=99?= <2570310046@qq.com>
Date: Thu, 21 Nov 2024 10:26:28 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=98=BE=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/product/info.js | 2 +-
src/views/product/category/index.vue | 11 +++++------
src/views/product/info/index.vue | 29 ++++++++++++++++------------
3 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/src/api/product/info.js b/src/api/product/info.js
index e15e6f7..0f1cf09 100644
--- a/src/api/product/info.js
+++ b/src/api/product/info.js
@@ -36,7 +36,7 @@ export function addInfo(data) {
// 修改商品信息
export function updateInfo(data) {
return request({
- url: '/product/info/'+data.id,
+ url: '/product/info/'+data.projectAddModel.id,
method: 'put',
data: data
})
diff --git a/src/views/product/category/index.vue b/src/views/product/category/index.vue
index 1cbcb67..a348143 100644
--- a/src/views/product/category/index.vue
+++ b/src/views/product/category/index.vue
@@ -153,14 +153,15 @@
-
+
-
+ {{form}}
+
-
-
+
+
@@ -723,6 +723,11 @@ export default {
const id = row.id || this.ids
getInfo(id).then(response => {
this.form = response.data;
+ this.categoryOptionValue = [
+ this.form.mianType ,
+ this.form.parentType ,
+ this.form.type ,
+ ]
this.open = true;
this.title = "修改商品信息";
});
@@ -733,11 +738,11 @@ export default {
if (valid) {
let attrValueList = [];
for (const templateAttributeGroup of this.categoryCommonElement.templateAttributeGroupList) {
- templateAttributeGroup.attributeList.map(attribute => attrValueList.push({id: attribute.id, value: attribute.value}))
+ templateAttributeGroup.attributeList.map(attribute => attrValueList.push({id: attribute.id, name: attribute.name}))
}
- this.categoryCommonElement.templateAttributeList.map(attribute => attrValueList.push({id: attribute.id, value: attribute.value}))
- this.attributeCheckedList.map(attribute => attrValueList.push({id: attribute.id, value: attribute.value}))
+ this.categoryCommonElement.templateAttributeList.map(attribute => attrValueList.push({id: attribute.id, name: attribute.name}))
+ this.attributeCheckedList.map(attribute => attrValueList.push({id: attribute.id, name: attribute.name}))
let ruleInfo = this.ruleList.find(ruleInfo => ruleInfo.id === this.form.ruleId);
const {ruleAttrList} = ruleInfo;
let ruleAttrSize = ruleAttrList.length;
@@ -766,13 +771,13 @@ export default {
console.log(productAddReq)
if (this.form.id != null) {
updateInfo(productAddReq).then(response => {
- this.$modal.msgSuccess("修改成功");
+ this.$modal.msgSuccess(response.msg);
this.open = false;
this.getList();
});
} else {
addInfo(productAddReq).then(response => {
- this.$modal.msgSuccess("新增成功");
+ this.$modal.msgSuccess(response.msg);
this.open = false;
this.getList();
});