From af954da9234a18abb087bb64c362e1955315615e Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 25 九月 2023 19:06:12 +0800
Subject: [PATCH] 产品类别-产品列表
---
src/views/productManage/productCategory/AddProductCategoryDialog.vue | 40 +++++++++++++++++++++++++++-------------
1 files changed, 27 insertions(+), 13 deletions(-)
diff --git a/src/views/productManage/productCategory/AddProductCategoryDialog.vue b/src/views/productManage/productCategory/AddProductCategoryDialog.vue
index a73afb8..ef39125 100644
--- a/src/views/productManage/productCategory/AddProductCategoryDialog.vue
+++ b/src/views/productManage/productCategory/AddProductCategoryDialog.vue
@@ -15,13 +15,15 @@
<span>鎵撳嵃</span>
</span> -->
<span class="btn" style="margin-left: 15px">
- <el-button
+ <i class="el-icon-s-tools"></i>
+ <span>鍔ㄤ綔</span>
+ <!-- <el-button
plain
size="mini"
style="margin-left: 15px"
@click="deleteClick"
>鍒犻櫎</el-button
- >
+ > -->
</span>
<el-button
v-if="showEdit"
@@ -48,7 +50,7 @@
<div class="basic-info-view">
<el-row>
<el-col :span="24">
- <div style="margin-left: 20px">绫诲埆</div>
+ <div style="margin-left: 20px"><span class="color_F56C6C">*</span>绫诲埆</div>
<el-form-item label="" prop="name" label-width="20px">
<el-input
v-model="editConfig.infomation.name"
@@ -191,6 +193,7 @@
updateProductCategory,
deleteProductCategory,
} from "@/api/product/productCategory";
+
import { getDataByType } from "@/api/data";
export default {
name: "AddProductCategoryDialog",
@@ -259,9 +262,11 @@
deleteProductCategory({ id: data.id }).then((res) => {
if (res.code === 200) {
this.editConfig.visible = false;
- this.$message.success("鍒櫎鎴愬姛");
+ this.$message.success("鍒櫎鎴愬姛!");
this.$emit("refresh");
- }
+ } else {
+ this.$message.warning(res.msg?res.msg:"鍒犻櫎澶辫触!")
+ }
});
},
// 缂栬緫
@@ -294,17 +299,21 @@
addProductCategory(params).then((res) => {
if (res.code === 200) {
this.editConfig.visible = false;
- this.$message.success("娣诲姞鎴愬姛");
+ this.$message.success("娣诲姞鎴愬姛!");
this.$emit("refresh");
- }
+ } else {
+ this.$message.warning(res.msg?res.msg:"娣诲姞澶辫触!")
+ }
});
} else {
updateProductCategory(params).then((res) => {
if (res.code === 200) {
this.editConfig.visible = false;
- this.$message.success("缂栬緫鎴愬姛");
+ this.$message.success("缂栬緫鎴愬姛!");
this.$emit("refresh");
- }
+ } else {
+ this.$message.warning(res.msg?res.msg:"缂栬緫澶辫触!")
+ }
});
}
} else {
@@ -317,10 +326,15 @@
delClick() {},
// 浜у搧
productClick() {
- this.$router.push({
- path: "/productManage/productList",
- query: { name: "浜у搧" },
- });
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ this.$router.push({
+ path: "/productManage/product",
+ query: { categoryName:this.editConfig.infomation.name, id: this.editConfig.title === "鏂板缓"?'':this.editConfig.infomation.id},
+ });
+ }
+ })
+
},
},
};
--
Gitblit v1.8.0