|
@@ -10,6 +10,10 @@
|
|
|
top:80px;
|
|
|
left:0;
|
|
|
}
|
|
|
+ #workInvoiceProjectRelationList tr td{
|
|
|
+ padding-left: 0px;
|
|
|
+ padding-right: 0px;
|
|
|
+ }
|
|
|
</style>
|
|
|
<script type="text/javascript">
|
|
|
var validateForm;
|
|
@@ -297,6 +301,29 @@
|
|
|
var number = c+timestamp;
|
|
|
$("#" + a ).val(number);
|
|
|
}
|
|
|
+ function addRow1(list, idx, tpl, row){
|
|
|
+ var idx1 = $("#workInvoiceProjectRelationList tr").length;
|
|
|
+ if(list == '#workInvoiceProjectRelationList'){
|
|
|
+ bornTemplete1(list, idx, tpl, row, idx1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function bornTemplete1(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");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
</script>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -309,43 +336,57 @@
|
|
|
|
|
|
<div class="form-group layui-row first">
|
|
|
<div class="form-group-label"><h2>基本信息</h2></div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workInvoice.project.projectName}"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label"><span class="require-item">*</span>发票申请编号:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <div class="input-group">
|
|
|
- <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workInvoice.number}"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label"><span class="require-item">*</span>合同名称:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workInvoice.project.workContractInfo.name}"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label"><span class="require-item">*</span>项目编号:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workInvoice.project.projectId}"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label"><span class="require-item">*</span>委托方:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workInvoice.project.workContractInfo.client.name}"/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="layui-item layui-col-sm6">
|
|
|
- <label class="layui-form-label">报告号:</label>
|
|
|
- <div class="layui-input-block">
|
|
|
- <input htmlEscape="false" readonly="true" class="form-control layui-input" value="${workInvoice.project.reportData.number}"/>
|
|
|
- </div>
|
|
|
+ <div class="layui-table-body layui-item layui-col-xs12 form-table-container" style="padding:0px">
|
|
|
+ <table id="contentTables" class="table table-bordered table-condensed can-edit no-bottom-margin details">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th width="200px"><font color="red">*</font>项目名称</th>
|
|
|
+ <th width="200px">合同名称</th>
|
|
|
+ <th width="200px">项目编号</th>
|
|
|
+ <th width="200px">委托方</th>
|
|
|
+ <th width="200px">报告号</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody id="workInvoiceProjectRelationList">
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <script type="text/template" id="workInvoiceProjectRelationListTpl">//<!--
|
|
|
+ <tr id="workInvoiceProjectRelationList{{idx}}">
|
|
|
+ <td class="hide">
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_invoiceId" name="workInvoiceProjectRelationList[{{idx}}].invoiceId" type="hidden" value="{{row.invoiceId}}"/>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_projectId" name="workInvoiceProjectRelationList[{{idx}}].projectId" type="hidden" value="{{row.projectId}}"/>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_delFlag" name="workInvoiceProjectRelationList[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_projectName" type="text" value="{{row.projectName}}" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_workContractName" type="text" value="{{row.workContractName}}" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ <td style="text-align:center;">
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_projectNum" type="text" value="{{row.projectNum}}" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_clientName" type="text" value="{{row.clientName}}" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input id="workInvoiceProjectRelationList{{idx}}_reportDataNum" type="text" value="{{row.reportDataNum}}" readonly="readonly" class="form-control"/>
|
|
|
+ </td>
|
|
|
+ </tr>//-->
|
|
|
+ </script>
|
|
|
+ <script type="text/javascript">
|
|
|
+ var workInvoiceProjectRelationListRowIdx = 0, workInvoiceProjectRelationListTpl = $("#workInvoiceProjectRelationListTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
|
|
|
+ /*if($("#id").val()){
|
|
|
+ workInvoiceProjectRelationListRowIdx = ${fn:length(workInvoice.workInvoiceProjectRelationList)};
|
|
|
+ }*/
|
|
|
+ $(document).ready(function() {
|
|
|
+ var data = ${fns:toJson(workInvoice.workInvoiceProjectRelationList)};
|
|
|
+ for (var i=0; i<data.length; i++){
|
|
|
+ addRow1('#workInvoiceProjectRelationList', workInvoiceProjectRelationListRowIdx, workInvoiceProjectRelationListTpl, data[i])
|
|
|
+ workInvoiceProjectRelationListRowIdx = workInvoiceProjectRelationListRowIdx + 1;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ </script>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group layui-row first">
|
|
@@ -506,4 +547,4 @@
|
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
-</html>
|
|
|
+</html>
|