From 4596b749d9873b554f7fbb2033b1538e898d8703 Mon Sep 17 00:00:00 2001
From: wangjiadong <1654135867@qq.com>
Date: Tue, 7 Feb 2023 08:51:39 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../collecttype/admin/CollectTypeList.vue | 13 +++++-----
.../modules/CustomercollectgoodsForm.vue | 12 ++++++---
.../modules/CustomerShoppingCartForm.vue | 26 +++++++++++++------
.../CustomerShoppingCartController.java | 10 ++++---
4 files changed, 40 insertions(+), 21 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/collecttype/admin/CollectTypeList.vue b/ant-design-vue-jeecg/src/views/collecttype/admin/CollectTypeList.vue
index 730ad332..e34d3b5c 100644
--- a/ant-design-vue-jeecg/src/views/collecttype/admin/CollectTypeList.vue
+++ b/ant-design-vue-jeecg/src/views/collecttype/admin/CollectTypeList.vue
@@ -84,19 +84,20 @@
编辑
-
+
添加下级
-
-
+
+
handleDeleteNode(record.id)" placement="topLeft">
删除
-
+
diff --git a/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsForm.vue b/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsForm.vue
index 71068dc8..856829d8 100644
--- a/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsForm.vue
+++ b/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsForm.vue
@@ -3,7 +3,7 @@
-
+
-
+
-
+
@@ -76,6 +76,10 @@
},
confirmLoading: false,
validatorRules: {
+ goodsname: [
+ { required: true, message: '请输入商品!'},
+ ],
+
},
url: {
add: "/customercollectgoods/customercollectgoods/add",
@@ -127,7 +131,7 @@
that.confirmLoading = false;
})
}
-
+
})
},
popupCallback(value,row){
diff --git a/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartForm.vue b/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartForm.vue
index 9e8d055d..2d022f26 100644
--- a/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartForm.vue
+++ b/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartForm.vue
@@ -21,7 +21,7 @@
/>
-
+
@@ -41,17 +41,17 @@
-
+
-
+
-
+
@@ -61,12 +61,12 @@
-
+
-
+
@@ -74,6 +74,7 @@
+
\ No newline at end of file
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/controller/CustomerShoppingCartController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/controller/CustomerShoppingCartController.java
index f7f19a02..3f1a2cbb 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/controller/CustomerShoppingCartController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/controller/CustomerShoppingCartController.java
@@ -118,9 +118,13 @@ public class CustomerShoppingCartController extends JeecgController add(@RequestBody CustomerShoppingCart customerShoppingCart) {
- customerShoppingCart.setZj(customerShoppingCart.getNumber() * customerShoppingCart.getPrice());
- customerShoppingCartService.save(customerShoppingCart);
- return Result.OK("添加成功!");
+ if(customerShoppingCart.getPrice()==null){
+ return Result.error("商品无单价");
+ } else {
+ customerShoppingCart.setZj(customerShoppingCart.getNumber() * customerShoppingCart.getPrice());
+ customerShoppingCartService.save(customerShoppingCart);
+ return Result.OK("添加成功!");
+ }
}
/**