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; + } + } } };