选择项调整

master
wangjiuyun 2025-05-23 14:58:12 +08:00
parent 947948502a
commit 38f2930d61
3 changed files with 27 additions and 4 deletions

View File

@ -31,6 +31,19 @@
<label>联系人:</label>
<input type="text" name="contactPerson"/>
</li>
<li>
<label>联系电话:</label>
<input type="text" name="contactPhone"/>
</li>
<li>
<label>所属行业:</label>
<select name="industryType" class="form-control"
th:with="type=${@dict.getType('industry_code')}" required>
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</li>
<li style="width: 46%;text-align: right;">
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
class="fa fa-search"></i>&nbsp;搜索</a>
@ -48,8 +61,6 @@
</div>
<th:block th:include="include :: footer"/>
<script>
var prefix = ctx + "system/customer";
$(function () {
@ -95,7 +106,17 @@
},
{
field: 'industryType',
title: '所属行业'
title: '所属行业',
formatter:(value,row)=>{
const arr=[]
$('[name="industryType"] option').each((index,item)=>{
arr.push({
text:$(item).text(),
value:$(item).val()
})
})
return arr.find((ele)=>ele.value==value)?.text
}
},
{
field: 'remark',

View File

@ -87,10 +87,11 @@
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="col-sm-4 control-label">所属行业:</label>
<label class="col-sm-4 control-label is-required">所属行业:</label>
<div class="col-sm-8">
<select name="industryType" class="form-control"
th:with="type=${@dict.getType('industry_code')}" required>
<option value="">请选择</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>

View File

@ -55,6 +55,7 @@
<label>所属行业:</label>
<select name="industryType" class="form-control"
th:with="type=${@dict.getType('industry_code')}" required>
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>