产品信息修改
parent
0198254927
commit
fa3c8634c2
|
@ -51,18 +51,17 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品类型:</label>
|
<label class="col-sm-3 control-label is-required">产品类型:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select name="type" class="form-control" th:with="type=${@dict.getType('product_type')}" required>
|
<select name="type" class="form-control" th:with="type=${@dict.getType('product_type')}" onchange="changeType()" required>
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12" id="valueBox" style="display: none">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品类型值:</label>
|
<label class="col-sm-3 control-label is-required">维保年限:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="value" class="form-control" type="number" required>
|
<input name="value" class="form-control" type="number" required>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -107,6 +106,14 @@
|
||||||
minView: "month",
|
minView: "month",
|
||||||
autoclose: true
|
autoclose: true
|
||||||
});
|
});
|
||||||
|
function changeType(){
|
||||||
|
let type=$('[name="type"]').val()
|
||||||
|
if(type=='11'||type=='22'){
|
||||||
|
$('#valueBox').show()
|
||||||
|
}else{
|
||||||
|
$('#valueBox').hide()
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -51,15 +51,15 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品类型:</label>
|
<label class="col-sm-3 control-label is-required">产品类型:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<select th:field="*{type}" name="type" class="form-control" th:with="type=${@dict.getType('product_type')}" required>
|
<select th:field="*{type}" name="type" class="form-control" th:with="type=${@dict.getType('product_type')}" onchange="changeType()" required>
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12" id="valueBox">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品类型值:</label>
|
<label class="col-sm-3 control-label is-required">维保年限:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="value" th:field="*{value}" class="form-control" type="number" required>
|
<input name="value" th:field="*{value}" class="form-control" type="number" required>
|
||||||
</div>
|
</div>
|
||||||
|
@ -87,6 +87,19 @@
|
||||||
$.operate.save(prefix + "/edit", $('#form-product-edit').serialize());
|
$.operate.save(prefix + "/edit", $('#form-product-edit').serialize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function changeType(){
|
||||||
|
let type=$('[name="type"]').val()
|
||||||
|
if(type=='11'||type=='22'){
|
||||||
|
$('#valueBox').show()
|
||||||
|
}else{
|
||||||
|
$('#valueBox').hide()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$(function (){
|
||||||
|
if([[${productInfo.type}]]!=11&&[[${productInfo.type}]]!=22){
|
||||||
|
$('#valueBox').hide()
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue