提交 a901188c 编写于 作者: doc_wei's avatar doc_wei

新增必选评审人标识

上级 bb30e629
......@@ -61,13 +61,20 @@ layui.config({
}
}},
{ field: 'isActive', title: '状态', align: 'center', width: 100, templet: function(d){
if(!d.isActive){
return "<span class='state-up'>已评审</span>";
}else{
if(d.type != 1) {
if(!isNull(d.isActive + "")){
if (!d.isActive) {
return "<span class='state-up'>已评审</span>";
} else {
return "<span class='state-down'>未评审</span>";
}
}
return "<span class='state-down'>未评审</span>";
}
return "-";
}},
{ field: 'email', title: '邮箱', align: 'left', width: 200}
{ field: 'email', title: '邮箱', align: 'left', width: 200},
{ field: 'test', title: '必选评审人', align: 'center', width: 140, templet: '#checkboxTpl', unresize: true }
]],
done: function(res){
for (var i = 0; i < res.rows.length; i++) {
......@@ -81,6 +88,19 @@ layui.config({
}
});
form.on('checkbox(lockDemo)', function(obj) {
var rowIndex = $(this).val();
var tem = chooseUserList[rowIndex];
delete tem["echo"];
if(obj.elem.checked){
tem["isMandatory"] = 1;
}else{
delete tem["isMandatory"];
}
chooseUserList[rowIndex] = tem;
table.reload("messageTable", {data: chooseUserList});
});
function disabledRow(index) {
// 第index行复选框不可选
let t = $(".layui-table tr[data-index=" + index + "] input[type='checkbox']");
......
......@@ -47,6 +47,10 @@
</form>
</div>
<script type="text/html" id="checkboxTpl">
<input type="checkbox" name="lock" value="{{d.LAY_TABLE_INDEX}}" title="" lay-filter="lockDemo" {{d.isMandatory == 1 ? 'checked': ''}}>
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册