From 83b3448e36a5d20b1e9fa80e54f2ddbc47e934da Mon Sep 17 00:00:00 2001
From: "382696293@qq.com" <382696293@qq.com>
Date: Tue, 9 Jan 2024 17:16:41 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=AA=E5=99=A8=E7=AE=A1=E7=90=86=20?=
=?UTF-8?q?=E9=80=89=E9=A1=B9=E5=88=87=E6=8D=A2=EF=BC=8C=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E9=87=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/WxInstrumentController.java | 8 ++++++
.../src/views/system/instrument/index.vue | 25 ++++++++++++++++---
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentController.java
index a60cfb7..42f320b 100644
--- a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentController.java
+++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxInstrumentController.java
@@ -73,6 +73,9 @@ public class WxInstrumentController extends BaseController {
|| wxInstrumentSaveReq.getExtraClockTimeRange().size() != 2) {
throw new ServiceException("请输入额外打卡奖励或者选择额外打卡时间");
}
+ } else {
+ wxInstrumentSaveReq.setExtraClockCredit(null);
+ wxInstrumentSaveReq.setExtraClockTimeRange(null);
}
// 仪器类型:IOT仪器
@@ -80,6 +83,8 @@ public class WxInstrumentController extends BaseController {
if (StringUtils.isBlank(wxInstrumentSaveReq.getModel())) {
throw new ServiceException("请选择仪器类型");
}
+ } else {
+ wxInstrumentSaveReq.setModel(null);
}
// 支持购买
@@ -88,6 +93,9 @@ public class WxInstrumentController extends BaseController {
|| StringUtils.isBlank(wxInstrumentSaveReq.getShoppingPath())) {
throw new ServiceException("请输入购买商城APPID和商城PATH");
}
+ } else {
+ wxInstrumentSaveReq.setShoppingAppid(null);
+ wxInstrumentSaveReq.setShoppingPath(null);
}
WxInstrument wxInstrument = new WxInstrument();
BeanUtils.copyProperties(wxInstrumentSaveReq, wxInstrument);
diff --git a/flossom-ui/src/views/system/instrument/index.vue b/flossom-ui/src/views/system/instrument/index.vue
index b009e2d..0ae8837 100644
--- a/flossom-ui/src/views/system/instrument/index.vue
+++ b/flossom-ui/src/views/system/instrument/index.vue
@@ -295,7 +295,7 @@
+ inactive-color="#DCDCDC" @change="isExtraClockChange">
@@ -313,7 +313,7 @@
-
+
@@ -363,7 +363,7 @@
-
+
@@ -900,6 +900,25 @@ export default {
this.$message.error('图片插入失败')
}
},
+ /* 是否开启额外打卡奖励 */
+ isExtraClockChange() {
+ if (this.form.isExtraClock == 0) {
+ this.form.extraClockCredit = 0;
+ this.form.extraClockTimeRange = [];
+ }
+ },
+ /* 仪器类型切换 */
+ typeChange() {
+ if (this.form.type == 1) {
+ this.form.model = "WL200";
+ }
+ },
+ isPurchaseChang() {
+ if (this.form.isPurchase == 0) {
+ this.form.shoppingAppid = null;
+ this.form.shoppingPath = null;
+ }
+ }
}
};