From e7745f6fe00efea5b14861b36e15fe4f7964e1e3 Mon Sep 17 00:00:00 2001
From: guoxing <1369478551@qq.com>
Date: Mon, 20 May 2024 15:57:15 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=BF=85=E5=A1=AB=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/goods/brands/brandsAdd.vue | 288 ++++++++--------
.../src/views/goods/category/categoryAdd.vue | 304 ++++++++++-------
.../src/views/goods/factory/factoryAdd.vue | 238 ++++++++------
yxt-as-ui/src/views/goods/goods/goodsAdd2.vue | 75 +++--
yxt-as-ui/src/views/goods/unit/unitAdd.vue | 215 +++++-------
.../goodsShelves/goodsShelvesAdd.vue | 290 +++++++++-------
.../warehouseArea/warehouseAreaAdd.vue | 310 +++++++++++-------
.../warehouseAreaTypeAdd.vue | 194 ++++++-----
8 files changed, 1032 insertions(+), 882 deletions(-)
diff --git a/yxt-as-ui/src/views/goods/brands/brandsAdd.vue b/yxt-as-ui/src/views/goods/brands/brandsAdd.vue
index 1c77572048..4e68570c93 100644
--- a/yxt-as-ui/src/views/goods/brands/brandsAdd.vue
+++ b/yxt-as-ui/src/views/goods/brands/brandsAdd.vue
@@ -15,6 +15,61 @@
+
+
+
+
+
+
+ * 品牌名称
+
+
+
+
+
+
+ * 品牌代码
+
+
+
+
+
+
+ * 首字母大写
+
+
+
+
+
+
+
+
+
+
+ 品牌备注
+
+
+
+
+
+
+
+
+
+
+ 品牌Logo
+
+
+
+
+
+
+
+
+
+
-
-
品牌Logo:
-
-
+ -->
@@ -96,7 +128,24 @@
},
hideUploadBtn: false,
- hideUploadBtn2: false
+ hideUploadBtn2: false,
+ rules: {
+ brandName: [{
+ required: true,
+ message: '品牌名称不能为空',
+ trigger: 'blur'
+ }],
+ brandCode: [{
+ required: true,
+ message: '品牌代码不能为空',
+ trigger: 'blur'
+ }],
+ letter: [{
+ required: true,
+ message: '首字母大写不能为空',
+ trigger: 'blur'
+ }],
+ }
}
},
created() {
@@ -122,48 +171,53 @@
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
- if (this.formobj.brandName == '') {
- this.$message({
- showClose: true,
- type: 'warning',
- message: "品牌名称不能为空"
- })
- return
- }
+ // if (this.formobj.brandName == '') {
+ // this.$message({
+ // showClose: true,
+ // type: 'warning',
+ // message: "品牌名称不能为空"
+ // })
+ // return
+ // }
+
+ // if (this.formobj.brandCode == '') {
+ // this.$message({
+ // showClose: true,
+ // type: 'warning',
+ // message: "品牌代码不能为空"
+ // })
+ // return
+ // }
+
+ // if (this.formobj.letter == '') {
+ // this.$message({
+ // showClose: true,
+ // type: 'warning',
+ // message: "首字母大写不能为空"
+ // })
+ // return
+ // }
+ this.$refs['form_obj'].validate((valid) => {
+ if (valid) {
+ req.saveBrands(this.formobj)
+ .then(resp => {
+ if (resp.success) {
+ this.$message({
+ showClose: true,
+ type: 'success',
+ message: resp.msg
+ })
+ this.handleReturn('true')
+ } else {
+ // 根据resp.code进行异常情况处理
+ }
+ })
+ .catch(() => {})
+ }
+ })
- if (this.formobj.brandCode == '') {
- this.$message({
- showClose: true,
- type: 'warning',
- message: "品牌代码不能为空"
- })
- return
- }
-
- if (this.formobj.letter == '') {
- this.$message({
- showClose: true,
- type: 'warning',
- message: "首字母大写不能为空"
- })
- return
- }
- req.saveBrands(this.formobj)
- .then(resp => {
- if (resp.success) {
- this.$message({
- showClose: true,
- type: 'success',
- message: resp.msg
- })
- this.handleReturn('true')
- } else {
- // 根据resp.code进行异常情况处理
- }
- })
- .catch(() => {})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
@@ -211,93 +265,37 @@
}
}
-
diff --git a/yxt-as-ui/src/views/goods/category/categoryAdd.vue b/yxt-as-ui/src/views/goods/category/categoryAdd.vue
index 8583893cd6..fac57fb20c 100644
--- a/yxt-as-ui/src/views/goods/category/categoryAdd.vue
+++ b/yxt-as-ui/src/views/goods/category/categoryAdd.vue
@@ -3,7 +3,7 @@