|
@@ -25,6 +25,8 @@
|
|
width: 50%;
|
|
width: 50%;
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .layui-table-view .layui-table {width:100%}
|
|
</style>
|
|
</style>
|
|
<body style="background-color: white">
|
|
<body style="background-color: white">
|
|
<sys:message content="${message}"/>
|
|
<sys:message content="${message}"/>
|
|
@@ -51,95 +53,22 @@
|
|
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
|
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
|
<legend>未识别部分</legend>
|
|
<legend>未识别部分</legend>
|
|
</fieldset>
|
|
</fieldset>
|
|
- <div class="layui-form div_main_form" >
|
|
|
|
- <table class="layui-table">
|
|
|
|
- <colgroup>
|
|
|
|
- <col width="200">
|
|
|
|
- <col width="150">
|
|
|
|
- <col width="200">
|
|
|
|
- </colgroup>
|
|
|
|
- <thead>
|
|
|
|
- <tr>
|
|
|
|
- <th>项目名称</th>
|
|
|
|
- <th>费用金额</th>
|
|
|
|
- <th>操作</th>
|
|
|
|
- </tr>
|
|
|
|
- </thead>
|
|
|
|
- <tbody>
|
|
|
|
- <c:if test="${ not empty map.list2}">
|
|
|
|
- <c:forEach items="${map.list2}" var="data2" varStatus="index">
|
|
|
|
- <tr>
|
|
|
|
-
|
|
|
|
- <td id=""><c:if test="${data2.type eq '1'}">补增值税税率调整差额</c:if><c:if test="${data2.type eq '2'}">扣减甲供材超供材料费</c:if></td>
|
|
|
|
- <td>${data2.fee}</td>
|
|
|
|
- <td>
|
|
|
|
- <%--<input id="type1" hidden value="${data2.type}">--%>
|
|
|
|
- <input id ="id1" hidden value="${data2.id}">
|
|
|
|
- <input type="button" class="layui-btn layui-btn-primary layui-btn-xs" value="调整" onclick="wbsup(${data2.type});"/>
|
|
|
|
- </td>
|
|
|
|
- </tr>
|
|
|
|
- </c:forEach>
|
|
|
|
- </c:if>
|
|
|
|
- <%--<tr>--%>
|
|
|
|
- <%--<td>扣减甲供材超供材料费</td>--%>
|
|
|
|
- <%--<td>500</td>--%>
|
|
|
|
- <%--<td>--%>
|
|
|
|
- <%--<input type="button" class="layui-btn layui-btn-primary layui-btn-xs" value="调整" onclick="wbsup();"/>--%>
|
|
|
|
- <%--</td>--%>
|
|
|
|
- <%--</tr>--%>
|
|
|
|
- </tbody>
|
|
|
|
- </table>
|
|
|
|
- </div>
|
|
|
|
- <%----------------jsjdjs-----------%>
|
|
|
|
- <div id="motaikuang" style="display: none;">
|
|
|
|
- <div class="layui-form" style="margin-left: 1px;">
|
|
|
|
- <table class="layui-table" id="mytble">
|
|
|
|
- <colgroup>
|
|
|
|
- <col width="100">
|
|
|
|
- <col width="100">
|
|
|
|
- <col width="50">
|
|
|
|
- <col width="100">
|
|
|
|
- <col>
|
|
|
|
- </colgroup>
|
|
|
|
- <thead>
|
|
|
|
- <tr>
|
|
|
|
- <th>WBS要素</th>
|
|
|
|
- <th>WBS识别码</th>
|
|
|
|
- <th>比例</th>
|
|
|
|
- <th>分摊金额</th>
|
|
|
|
- </tr>
|
|
|
|
- </thead>
|
|
|
|
- <tbody id="mytbody">
|
|
|
|
- <tr>
|
|
|
|
- <td>基础工程</td>
|
|
|
|
- <td>xxx</td>
|
|
|
|
- <td>20%</td>
|
|
|
|
- <td>20</td>
|
|
|
|
- </tr>
|
|
|
|
-
|
|
|
|
- </tbody>
|
|
|
|
- </table>
|
|
|
|
- </div>
|
|
|
|
- <div style="margin-top: 30px;margin-left: 70px;">
|
|
|
|
- <table>
|
|
|
|
- <thead>
|
|
|
|
- <tr>
|
|
|
|
- <th>
|
|
|
|
- <button style="width: 110px" class="layui-btn layui-btn-primary layui-btn-xs">按占比分摊</button>
|
|
|
|
- </th>
|
|
|
|
- <th>
|
|
|
|
- <button style="margin-left: 60px;width: 110px" type="button" class="layui-btn layui-btn-primary layui-btn-xs">平均分摊</button>
|
|
|
|
- </th>
|
|
|
|
- <th>
|
|
|
|
- <button style="margin-left: 60px;width: 110px"type="button" class="layui-btn layui-btn-primary layui-btn-xs" onclick="sure();">确认</button>
|
|
|
|
- </th>
|
|
|
|
- </tr>
|
|
|
|
- </thead>
|
|
|
|
- </table>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div style="height: 100px;width: 100%;">
|
|
|
|
- </div>
|
|
|
|
|
|
+ <table class="layui-table" lay-data="{ url:'json/xmmc.json', page:false, id:'idTest'}" lay-filter="freestr">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <!--<th lay-data="{type:'checkbox', fixed: 'left'}"></th>-->
|
|
|
|
+ <th lay-data="{field:'xmmc', width:200}">项目名称</th>
|
|
|
|
+ <th lay-data="{field:'fyje', width:200}">费用金额</th>
|
|
|
|
+ <th lay-data="{width:178, align:'center', toolbar: '#barDemo'}"></th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ </table>
|
|
|
|
+ <table class="layui-table" id="layui_table_id" lay-filter="dataTable"></table>
|
|
|
|
+ <script type="text/html" id="barDemo">
|
|
|
|
+ <a class="layui-btn layui-btn-xs" lay-event="fttz">分摊调整</a>
|
|
|
|
+ <a class="layui-btn layui-btn-xs" lay-event="ddtz">单独调整</a>
|
|
|
|
+ <!--<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>-->
|
|
|
|
+ </script>
|
|
</body>
|
|
</body>
|
|
<script src="${ctxp}/static/plugin/assets/layui/layui.js"></script>
|
|
<script src="${ctxp}/static/plugin/assets/layui/layui.js"></script>
|
|
<script>
|
|
<script>
|
|
@@ -306,72 +235,35 @@
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
<script>
|
|
<script>
|
|
- function wbsup(type){
|
|
|
|
- var id = $("#id1").val();
|
|
|
|
- // var type = $("#type1").val();
|
|
|
|
- $.post(
|
|
|
|
- // type : "post",
|
|
|
|
- "${ctx}/jkxl/gettz",
|
|
|
|
- {"id":id},
|
|
|
|
- function(result) {
|
|
|
|
- var trlue="";
|
|
|
|
- if(type == '1') {
|
|
|
|
- for (var i = 0; i < result.length; i++) {
|
|
|
|
- trlue = trlue + "<tr><td>" + result[i].describe + "</td><td>" + result[i].wbsCode + "</td><td>" + result[i].originalRate + "</td><td>" + result[i].bzFee + "</td></tr>";
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- for (var i = 0; i < result.length; i++) {
|
|
|
|
- trlue = trlue + "<tr><td>" + result[i].describe + "</td><td>" + result[i].wbsCode + "</td><td>" + result[i].originalRate + "</td><td>" + result[i].jkFee + "</td></tr>";
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- trlue=trlue+"<tr><td>合计</td><td></td><td>100%</td><td></td></tr>";
|
|
|
|
- $("#mytbody").html(trlue);
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
-// var trlue="";
|
|
|
|
-// for(var i=0;i<=3;i++){
|
|
|
|
-// trlue = trlue + "<tr><td>基础工程</td><td>xxx</td><td>20%</td><td>20</td></tr>";
|
|
|
|
-// }
|
|
|
|
-// trlue=trlue+"<tr><td>合计</td><td></td><td>100%</td><td>500</td></tr>";
|
|
|
|
-// $("#mytbody").html(trlue);
|
|
|
|
- layer.open({
|
|
|
|
- type:1,
|
|
|
|
- area:['600px','400px'],
|
|
|
|
- title:['调整','color:#fff;background-color:#999999;'],
|
|
|
|
- shadeClose:false,
|
|
|
|
- content: $('#motaikuang'),
|
|
|
|
|
|
+ layui.use('table', function(){
|
|
|
|
+ var table = layui.table;
|
|
|
|
+ //监听表格复选框选择
|
|
|
|
+ table.on('checkbox(freestr)', function(obj){
|
|
|
|
+ console.log(obj)
|
|
});
|
|
});
|
|
- }
|
|
|
|
- function sure(){
|
|
|
|
- var tr = $("#mytble tr");
|
|
|
|
- var result = []; // 数组
|
|
|
|
- for (var i = 0; i < tr.length; i++) {
|
|
|
|
- var tds = $(tr[i]).find("td");
|
|
|
|
- if (tds.length > 0) {
|
|
|
|
- result.push({
|
|
|
|
- "wbsys" : $(tds[0]).val(),
|
|
|
|
- "wbssbm" : $(tds[1]).val(),
|
|
|
|
- "bili" : $(tds[2]).val(),
|
|
|
|
- "ftje" : $(tds[3]).val()
|
|
|
|
- })
|
|
|
|
|
|
+ //监听工具条
|
|
|
|
+ table.on('tool(freestr)', function(obj){
|
|
|
|
+ var datacount="";
|
|
|
|
+ var data = obj.data;
|
|
|
|
+ alert(data);
|
|
|
|
+ if(obj.event === 'fttz'){
|
|
|
|
+ datacount=JSON.stringify(data);
|
|
|
|
+// layer.msg('ID:'+JSON.stringify(data));
|
|
|
|
+ } else if(obj.event === 'ddtz'){
|
|
|
|
+ datacount=JSON.stringify(data);
|
|
|
|
+// layer.alert('编辑行:<br>'+ JSON.stringify(data));
|
|
}
|
|
}
|
|
- }
|
|
|
|
-
|
|
|
|
- var jsonData = {
|
|
|
|
- "personLst" : result
|
|
|
|
- }
|
|
|
|
- // alert(jsonData);
|
|
|
|
|
|
+ $.ajax({
|
|
|
|
+ type : "post",
|
|
|
|
+ url : "#",
|
|
|
|
+ contentType : "application/json;charset=UTF-8",
|
|
|
|
+ data:datacount,
|
|
|
|
+ success : function(result) {
|
|
|
|
+ window.location.reload();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
|
|
- // $.ajax({
|
|
|
|
- // type : "post",
|
|
|
|
- // url : "#",
|
|
|
|
- // contentType : "application/json;charset=UTF-8",
|
|
|
|
- // data:JSON.stringify(jsonData),
|
|
|
|
- // success : function(result) {
|
|
|
|
- // window.location.reload();
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
- }
|
|
|
|
|
|
+ });
|
|
</script>
|
|
</script>
|
|
</html>
|
|
</html>
|