|
@@ -4,9 +4,11 @@
|
|
|
<head>
|
|
|
<title>项目管理</title>
|
|
|
<meta name="decorator" content="default"/>
|
|
|
+ <script src="${ctxp}/static/layui/layui.js"></script>
|
|
|
<script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
|
|
|
<script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
|
|
|
<link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
|
|
|
+ <link rel='layuicss' type="text/css" href="${ctxp}/static/layui/css/layui.css"/>
|
|
|
<style>
|
|
|
#projectDesc-error{
|
|
|
left:0;
|
|
@@ -357,6 +359,41 @@
|
|
|
// var idx1 = $("#workClientLinkmanList tr").length;
|
|
|
bornTemplete(list, idx, tpl, row, idx);
|
|
|
}
|
|
|
+ function addPlanRow(list, idx, tpl, row){
|
|
|
+ // var idx1 = $("#workClientLinkmanList tr").length;
|
|
|
+ bornTempletePlan(list, idx, tpl, row, idx);
|
|
|
+ }
|
|
|
+
|
|
|
+ function bornTempletePlan(list, idx, tpl, row, idx1){
|
|
|
+ $(list).append(Mustache.render(tpl, {
|
|
|
+ idx: idx, delBtn: true, row: row,
|
|
|
+ order:idx1 + 1
|
|
|
+ }));
|
|
|
+ $(list+idx).find("select").each(function(){
|
|
|
+ $(this).val($(this).attr("data-value"));
|
|
|
+ });
|
|
|
+ $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
|
|
|
+ var ss = $(this).attr("data-value").split(',');
|
|
|
+ for (var i=0; i<ss.length; i++){
|
|
|
+ if($(this).val() == ss[i]){
|
|
|
+ $(this).attr("checked","checked");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ laydate.render({
|
|
|
+ elem : (list+idx+"_beginDate"),
|
|
|
+ event: 'focus',
|
|
|
+ type : 'date',
|
|
|
+ trigger: 'click'
|
|
|
+ });
|
|
|
+ laydate.render({
|
|
|
+ elem : (list+idx+"_endDate"),
|
|
|
+ event: 'focus',
|
|
|
+ type : 'date',
|
|
|
+ trigger: 'click'
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
function bornTemplete(list, idx, tpl, row, idx1){
|
|
|
$(list).append(Mustache.render(tpl, {
|
|
@@ -765,7 +802,7 @@
|
|
|
<div class="layui-input-block">
|
|
|
<div class="layui-item nav-btns" style="padding-left:0px;">
|
|
|
<a class="nav-btn nav-btn-add"
|
|
|
- onclick="addRow('#projectPlanList', workClientBankRowIdx, workClientBankTpl);workClientBankRowIdx = workClientBankRowIdx + 1;"
|
|
|
+ onclick="addPlanRow('#projectPlanList', workClientBankRowIdx, workClientBankTpl);workClientBankRowIdx = workClientBankRowIdx + 1;"
|
|
|
title="新增"><i class="fa fa-plus"></i> 新增</a>
|
|
|
</div>
|
|
|
<table id="bankinfo" class="table table-bordered table-condensed can-edit">
|
|
@@ -788,10 +825,10 @@
|
|
|
<input id="projectPlanList{{idx}}_delFlag" name="projectPlanList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <input id="projectPlanList{{idx}}_beginDate" name="projectPlanList[{{idx}}].beginDate" type="text" value="{{row.beginDate}}" class="form-control required"/>
|
|
|
+ <input lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" id="projectPlanList{{idx}}_beginDate" name="projectPlanList[{{idx}}].beginDate" type="text" value="{{row.beginDate}}" class="form-control required datetime"/>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <input id="projectPlanList{{idx}}_endDate" name="projectPlanList[{{idx}}].endDate" type="text" value="{{row.endDate}}" class="form-control required"/>
|
|
|
+ <input lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" id="projectPlanList{{idx}}_endDate" name="projectPlanList[{{idx}}].endDate" type="text" value="{{row.endDate}}" class="form-control required datetime"/>
|
|
|
</td>
|
|
|
<td>
|
|
|
<input id="projectPlanList{{idx}}_remarks" name="projectPlanList[{{idx}}].remarks" type="text" value="{{row.remarks}}" class="form-control required"/>
|
|
@@ -1069,7 +1106,7 @@
|
|
|
var data = ${fns:toJson(projectRecords.projectPlanList)};
|
|
|
if (null!=data){
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
- addRow('#projectPlanList', workClientBankRowIdx, workClientBankTpl, data[i]);
|
|
|
+ addPlanRow('#projectPlanList', workClientBankRowIdx, workClientBankTpl, data[i]);
|
|
|
workClientBankRowIdx = workClientBankRowIdx + 1;
|
|
|
}
|
|
|
}
|