...
|
...
|
@@ -934,7 +934,24 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist','tabl |
|
|
clone.find("select.policyparam").html(options);
|
|
|
clone.find("select.condition").html(conditionoptions);
|
|
|
clone.find("input[type=tel]").val('');
|
|
|
$(`#${id}`).after(clone).after(cond);
|
|
|
//获取最后一个添加的id
|
|
|
var doms = $(`div[id^=${id}][id$='condition'][id!=${id}]`);
|
|
|
var lastid ='';
|
|
|
console.log(doms);
|
|
|
if($(doms)&&$(doms).length>0) {
|
|
|
|
|
|
|
|
|
$(doms).each(function (i, v) {
|
|
|
var $domId = $(v).attr("id");
|
|
|
var trimdomid = $domId.substring(0,$domId.length-10)
|
|
|
if (trimdomid > lastid) {
|
|
|
lastid = trimdomid;
|
|
|
}
|
|
|
});
|
|
|
}else {
|
|
|
lastid = id;
|
|
|
}
|
|
|
$(`#${lastid}`).after(clone).after(cond);
|
|
|
form.render();
|
|
|
//渲染新增事件
|
|
|
$("i.policy-input-add").off("click").on("click",function (){
|
...
|
...
|
|