From ec80a41c3ef56cd88743b7a025d45392d791d1cd Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Mon, 03 Jun 2024 16:09:18 +0800 Subject: [PATCH] 退款时,退最后一个商品才退运费 --- src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html b/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html index 2f7fe0f..a6e5ded 100644 --- a/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html +++ b/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html @@ -57,6 +57,7 @@ <label class="layui-form-label febs-form-item-require">单位:</label> <div class="layui-input-block"> <input type="text" name="unit" lay-verify="required" placeholder="" autocomplete="off" class="layui-input"> + <div class="layui-form-mid layui-word-aux">例如:个、克。</div> </div> </div> <div class="layui-col-lg6"> @@ -375,7 +376,28 @@ validate = layui.validate, element = layui.element; + //验证输入数字 + form.verify({ + isNum: function(value, item){ //value:表单的值、item:表单的DOM对象 + if(!new RegExp("^[0-9]+$").test(value)){ + return '该字段只能填写数字!'; + } + } + }); + + // 验证汉字数量不超过100个 + form.verify({ + chineseCharCount: function(value, item){ //value:表单的值、item:表单的DOM对象 + // 使用正则表达式匹配汉字,并计算数量 + var chineseCharCount = (value.match(/[\u4e00-\u9fa5]/g) || []).length; + if(chineseCharCount > 100){ + return '汉字数量不能超过100个!'; + } + } + }); + form.render(); + const E = window.wangEditor; const editor = new E('#toolbar-container', '#text-container'); // 传入两个元素 editor.config.showLinkImg = false; -- Gitblit v1.9.1