Kaynağa Gözat

税金,甲供

Enford 5 yıl önce
ebeveyn
işleme
6509518187

+ 27 - 0
src/main/java/com/jeeplus/modules/sg/project/web/ProjectController.java

@@ -266,6 +266,33 @@ public class ProjectController extends BaseController {
         return "modules/sg/project/withholdForm";
     }
 
+    /**
+     * 甲供调整页面
+     */
+    @RequestMapping("materialOffsetForm")
+    public String materialOffsetForm(String id,Model model){
+        WbsProject wbsProject = projectService.get(id);
+        List<WbsItem> list = null;
+        if(wbsProject != null){
+            list = wbsProject.getWbsItems();
+        }
+        model.addAttribute("list",list);
+        return "modules/sg/project/materialOffsetForm";
+    }
+
+    /**
+     * 税金页面
+     */
+    @RequestMapping("taxDeductionsForm")
+    public String taxDeductionsForm(String id,Model model){
+        WbsProject wbsProject = projectService.get(id);
+        List<WbsItem> list = null;
+        if(wbsProject != null){
+            list = wbsProject.getWbsItems();
+        }
+        model.addAttribute("list",list);
+        return "modules/sg/project/taxDeductionsForm";
+    }
 
     /**
      * 诚信扣款

+ 47 - 2
src/main/webapp/webpage/modules/sg/project/management.js

@@ -45,7 +45,7 @@ layui.config({
                 {field:'xmsl',width:145,title:"结算书数量"},
                 {field:'cjsq',width:145,title: '创建时期'},
                 {field:'djr',width:130,title:'登记人'},
-                {field:'op',align:'center',title:"操作",minWidth:400,maxWidth:600,templet:function(d){
+                {field:'op',align:'center',title:"操作",minWidth:600,maxWidth:800,templet:function(d){
                         ////对操作进行初始化
                         var xml = "";
                         if(d.status==1){ //工程按钮
@@ -55,7 +55,9 @@ layui.config({
                                 +"<a style='margin-top: 3px;' class='layui-btn layui-btn-xs layui-btn-danger' id=delPro"+d.id+" onclick=\"deleteProject('"+d.id+"')\">删除</a>"
                                 // +"<br>"
                                 +"<a style='margin-top: 3px;' class='layui-btn layui-btn-warm layui-btn-xs' lay-event=''href=\"${ctx}/project/exportone?id=" + d.id+"\">导出wbs工程</a>"
-                                +"<a style='margin-top: 3px;' class='layui-btn layui-btn-normal layui-btn-xs'onclick=\"withhold( '${ctx}/project/withholdform?id=" + d.id + "&tabId=1')\">诚信扣款</a><div>";
+                                +"<a style='margin-top: 3px;' class='layui-btn layui-btn-normal layui-btn-xs'onclick=\"withhold( '${ctx}/project/withholdform?id=" + d.id + "&tabId=1')\">诚信扣款</a>"
+                                +"<a style='margin-top: 3px;' class='layui-btn layui-btn-warm layui-btn-xs'onclick=\"materialOffset( '${ctx}/project/materialOffsetForm?id=" + d.id + "&tabId=1')\">甲供材抵扣</a>"
+                                +"<a style='margin-top: 3px;' class='layui-btn layui-btn-warm layui-btn-xs'onclick=\"taxDeductions( '${ctx}/project/taxDeductionsForm?id=" + d.id + "&tabId=1')\">税额扣减</a></div>";
 
                         }
                         if(d.status==2){ //项目表头操作
@@ -217,7 +219,50 @@ function look(url) { //工程 查看
 
     })
 }
+    function materialOffset(url) { //甲供材扣抵
+    layer.open({
+        type: 2,
+        title: '甲供材扣抵',
+        area: ['70%', '90%'],
+        offset:['7%','14%'],
+        shade: 0.8,
+        shadeClose: true,
+        fixed: true, //不固定
+        maxmin: true,
+        content: url,//查看的路径
+        btn: ['确定','关闭'],
+        yes: function(index, layero){
+            var bodyparent = layer.getChildFrame('body', index); //获取子类页面body下内容
+            bodyparent.find('#updatebtn').click(); // 点击修改页面隐藏的按钮
+        }
+        ,btn2: function(index, layero){
+            layer.close(index);
+        }
+
+    })
+}
 
+    function taxDeductions(url) { //税金处理
+    layer.open({
+        type: 2,
+        title: '税金处理',
+        area: ['70%', '90%'],
+        offset:['7%','14%'],
+        shade: 0.8,
+        shadeClose: true,
+        fixed: true, //不固定
+        maxmin: true,
+        content: url,//查看的路径
+        btn: ['确定','关闭'],
+        yes: function(index, layero){
+            var bodyparent = layer.getChildFrame('body', index); //获取子类页面body下内容
+            bodyparent.find('#updatebtn').click(); // 点击修改页面隐藏的按钮
+        }
+        ,btn2: function(index, layero){
+            layer.close(index);
+        }
+    })
+}
 function update(url) { //修改
     layer.open({
         type: 2,

+ 73 - 0
src/main/webapp/webpage/modules/sg/project/materialOffsetForm.js

@@ -0,0 +1,73 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<script type="text/javascript">
+    var str = ''
+    layui.use(['table','form','layedit', 'laydate'], function(){
+        var table = layui.table //生产数据表格
+        ,form = layui.form;
+        form.render();//表格渲染
+        table.render({
+        elem: '#longtable'
+        ,title: '甲供材抵扣'
+        ,id:'checktable'
+        ,limit:Number.MAX_VALUE
+        ,cols: [[ //生产表头
+            {field:'itemName',title:'项目名称'}
+            ,{field:'unitType',title:'扣抵工程款',edit: 'text'}
+
+        ]]
+        ,data:[ //数据导入
+        <c:if test="${ not empty list}">
+        <c:forEach items="${list}" var="data" varStatus="index">
+        {
+            "id":"${data.id}",
+            "unitType": "${data.unitType}",
+            "itemName": "${data.itemName}"
+        },
+        </c:forEach>
+        </c:if>
+        ]
+        ,page: false
+        ,done: function(res, curr, count){
+            for(var p in res.data){
+                str = str+res.data[p].id+',';
+            }
+         }
+        });
+
+        table.on('edit(longtable)', function(obj){ //注:edit是固定事件名,test是table原始容器的属性 lay-filter="对应的值"
+            var field = obj.field;
+            if(field == 'unitType'){
+               var value = obj.value;
+               if(isNaN(value)){ //判断输入是否是数字
+                    layer.msg('请输入有效数字',{icon: 5,offset:['40%','40%']});
+                     return false;
+               }
+            }
+        });
+    });
+    function updateProject(){
+        var nameString = "";
+        $('table tr').each(function () {
+            var unitType = $(this).find('td:eq(1)').text();
+            if(unitType == ''){
+                unitType = null
+            }
+            nameString += unitType+",";
+        })
+        var unitTypes = nameString.substring(5,nameString.length);
+        var ids = str.substring(0,str.length-1);
+         $.ajax({
+            type:"post",
+            url:"${ctx}/project/withhold",
+            data:{'ids':ids,'unitTypes':unitTypes},
+            success:function(result){
+                layer.msg(result.msg, {icon: 6,offset:['38%','38%']},function () {
+                parent.location.reload();
+        });
+    }
+    });
+}
+
+
+
+</script>

+ 38 - 0
src/main/webapp/webpage/modules/sg/project/materialOffsetForm.jsp

@@ -0,0 +1,38 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>甲供材扣抵</title>
+    <link rel="stylesheet" href="${ctxp}/static/plugin/assets/layui/css/layui.css">
+    <link rel="stylesheet" href="${ctxp}/static/plugin/assets/common.css"/>
+    <script type="text/javascript" src="${ctxp}/static/plugin/assets/jquery-3.2.1.min.js"></script>
+    <script src="${ctxp}/static/plugin/assets/layui/layui.js"></script>
+    <%@include file="materialOffsetForm.js"%>
+</head>
+<style>
+    .layui-table-view .layui-table {width:100%}
+    .layui-table-cell .layui-form-checkbox[lay-skin="primary"]{top: 50%;transform: translateY(-50%);}
+    .mydiv{padding: 5px 7px;border: whitesmoke;line-height: 98%;margin-top: 2px}
+</style>
+<body>
+<div class="layui-btn-group suretable" style="display: none;">
+    <button class="layui-btn"  data-type="getCheckData" id="freenl">确定</button>
+</div>
+<input id="updatebtn" type="button" onclick="updateProject()" style="display: none" />
+    <%--<div class="layui-form-item">--%>
+        <%--<div class="" style="margin-left: 10px;margin-top: 10px;">--%>
+            <%--<span id="mylable2">项目调整</span>--%>
+            <%--<span>:</span>--%>
+            <%--<span id="readid2">200</span>--%>
+        <%--</div>--%>
+        <%--<div class="" style="margin-left: 10px;">--%>
+            <%--<input type="radio" name="mydiv" value="1" title="增加" checked="">--%>
+            <%--<input type="radio" name="mydiv" value="2" title="减少">--%>
+        <%--</div>--%>
+    <%--</div>--%>
+
+<div style="margin-left: 7px;margin-right: 7px">
+<table class="layui-hide" id="longtable" lay-filter="longtable"></table>
+</div>
+</body>
+</html>

+ 73 - 0
src/main/webapp/webpage/modules/sg/project/taxDeductionsForm.js

@@ -0,0 +1,73 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<script type="text/javascript">
+    var str = ''
+    layui.use(['table','form','layedit', 'laydate'], function(){
+        var table = layui.table //生产数据表格
+        ,form = layui.form;
+        form.render();//表格渲染
+        table.render({
+        elem: '#longtable'
+        ,title: '税金处理'
+        ,id:'checktable'
+        ,limit:Number.MAX_VALUE
+        ,cols: [[ //生产表头
+            {field:'itemName',title:'项目名称'}
+            ,{field:'unitType',title:'税额扣减',edit: 'text'}
+
+        ]]
+        ,data:[ //数据导入
+        <c:if test="${ not empty list}">
+        <c:forEach items="${list}" var="data" varStatus="index">
+        {
+            "id":"${data.id}",
+            "unitType": "${data.unitType}",
+            "itemName": "${data.itemName}"
+        },
+        </c:forEach>
+        </c:if>
+        ]
+        ,page: false
+        ,done: function(res, curr, count){
+            for(var p in res.data){
+                str = str+res.data[p].id+',';
+            }
+         }
+        });
+
+        table.on('edit(longtable)', function(obj){ //注:edit是固定事件名,test是table原始容器的属性 lay-filter="对应的值"
+            var field = obj.field;
+            if(field == 'unitType'){
+               var value = obj.value;
+               if(isNaN(value)){ //判断输入是否是数字
+                    layer.msg('请输入有效数字',{icon: 5,offset:['40%','40%']});
+                     return false;
+               }
+            }
+        });
+    });
+    function updateProject(){
+        var nameString = "";
+        $('table tr').each(function () {
+            var unitType = $(this).find('td:eq(1)').text();
+            if(unitType == ''){
+                unitType = null
+            }
+            nameString += unitType+",";
+        })
+        var unitTypes = nameString.substring(5,nameString.length);
+        var ids = str.substring(0,str.length-1);
+         $.ajax({
+            type:"post",
+            url:"${ctx}/project/withhold",
+            data:{'ids':ids,'unitTypes':unitTypes},
+            success:function(result){
+                layer.msg(result.msg, {icon: 6,offset:['38%','38%']},function () {
+                parent.location.reload();
+        });
+    }
+    });
+}
+
+
+
+</script>

+ 38 - 0
src/main/webapp/webpage/modules/sg/project/taxDeductionsForm.jsp

@@ -0,0 +1,38 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>税金扣减</title>
+    <link rel="stylesheet" href="${ctxp}/static/plugin/assets/layui/css/layui.css">
+    <link rel="stylesheet" href="${ctxp}/static/plugin/assets/common.css"/>
+    <script type="text/javascript" src="${ctxp}/static/plugin/assets/jquery-3.2.1.min.js"></script>
+    <script src="${ctxp}/static/plugin/assets/layui/layui.js"></script>
+    <%@include file="taxDeductionsForm.js"%>
+</head>
+<style>
+    .layui-table-view .layui-table {width:100%}
+    .layui-table-cell .layui-form-checkbox[lay-skin="primary"]{top: 50%;transform: translateY(-50%);}
+    .mydiv{padding: 5px 7px;border: whitesmoke;line-height: 98%;margin-top: 2px}
+</style>
+<body>
+<div class="layui-btn-group suretable" style="display: none;">
+    <button class="layui-btn"  data-type="getCheckData" id="freenl">确定</button>
+</div>
+<input id="updatebtn" type="button" onclick="updateProject()" style="display: none" />
+    <%--<div class="layui-form-item">--%>
+        <%--<div class="" style="margin-left: 10px;margin-top: 10px;">--%>
+            <%--<span id="mylable2">项目调整</span>--%>
+            <%--<span>:</span>--%>
+            <%--<span id="readid2">200</span>--%>
+        <%--</div>--%>
+        <%--<div class="" style="margin-left: 10px;">--%>
+            <%--<input type="radio" name="mydiv" value="1" title="增加" checked="">--%>
+            <%--<input type="radio" name="mydiv" value="2" title="减少">--%>
+        <%--</div>--%>
+    <%--</div>--%>
+
+<div style="margin-left: 7px;margin-right: 7px">
+<table class="layui-hide" id="longtable" lay-filter="longtable"></table>
+</div>
+</body>
+</html>

+ 31 - 26
src/main/webapp/webpage/modules/sg/project/withholdForm.js

@@ -88,32 +88,37 @@
     });
     });
     function updateProject(){
-    var nameString = "";
-    var nameString1 = "";
-    $('table tr').each(function () {
-        var unitType = $(this).find('td:eq(1)').text();
-        var fee = $(this).find('td:eq(2)').text();
-        if(unitType == ''){
-           unitType = null
-        }
-        if(fee == ''){
-            fee = null
-        }
-        nameString += unitType+",";
-        nameString1 += fee+",";
-    })
-    var unitTypes = nameString.substring(5,nameString.length);
-    var fees = nameString1.substring(5,nameString1.length);
-    var ids = str.substring(0,str.length-1);
-    $.ajax({
-    type:"post",
-    url:"${ctx}/project/withhold",
-    data:{'ids':ids,'fees':fees,'unitTypes':unitTypes},
-    success:function(result){
-       layer.msg(result.msg, {icon: 6,offset:['38%','38%']},function () {
-        parent.location.reload();
-     });
-     }
+        var nameString = "";
+        var nameString1 = "";
+        $('table tr').each(function () {
+            var unitType = $(this).find('td:eq(1)').text();
+            var fee = $(this).find('td:eq(2)').text();
+            if(unitType == ''){
+               unitType = null
+            }else{
+              if(fee == ''){
+                layer.msg('您已输入单位工程,该诚信扣款不能为空',{icon: 5,offset:['40%','40%']});
+                throw SyntaxError;
+              }
+            }
+            if(fee == ''){
+                fee = null
+            }
+            nameString += unitType+",";
+            nameString1 += fee+",";
+        })
+        var unitTypes = nameString.substring(5,nameString.length);
+        var fees = nameString1.substring(5,nameString1.length);
+        var ids = str.substring(0,str.length-1);
+        $.ajax({
+        type:"post",
+        url:"${ctx}/project/withhold",
+        data:{'ids':ids,'fees':fees,'unitTypes':unitTypes},
+        success:function(result){
+           layer.msg(result.msg, {icon: 6,offset:['38%','38%']},function () {
+            parent.location.reload();
+         });
+         }
     });
 }
 

+ 48 - 2
src/main/webapp/webpage/modules/sg/projecttem/manageList.js

@@ -25,14 +25,16 @@
         {field:'xmsl',width:180,title:"结算书数量"},
         {field:'cjsq',width:200,title: '创建时期'},
         {field:'djr',width:200,title:'登记人'},
-        {field:'op',align:'center',title:"操作",minWidth:200,templet:function(d){
+        {field:'op',align:'center',title:"操作",minWidth:500,templet:function(d){
     ////对操作进行初始化
     var xml = "";
     if(d.status==1){ //工程 表头
     xml += "<div><a class='layui-btn layui-btn-primary layui-btn-xs' onclick=\"look( '${ctx}/project/tem/form?id=" + d.id + "&tabId=1')\">查看</a>"
         +"<a class='layui-btn layui-btn-xs'  onclick=\"update( '${ctx}/project/tem/form?id=" + d.id + "&tabId=2')\">修改</a>"
         +"<a class='layui-btn layui-btn-normal layui-btn-xs' lay-event='add'>添加结算书</a>"
-    +"<a  class='layui-btn layui-btn-warm layui-btn-xs'onclick=\"withhold( '${ctx}/project/withholdform?id=" + d.id + "&tabId=1')\">诚信扣款</a></div>";
+        +"<a  class='layui-btn layui-btn-warm layui-btn-xs'onclick=\"withhold( '${ctx}/project/withholdform?id=" + d.id + "&tabId=1')\">诚信扣款</a>"
+        +"<a  class='layui-btn layui-btn-warm layui-btn-xs'onclick=\"materialOffset( '${ctx}/project/materialOffsetForm?id=" + d.id + "&tabId=1')\">甲供材抵扣</a>"
+        +"<a  class='layui-btn layui-btn-warm layui-btn-xs'onclick=\"taxDeductions( '${ctx}/project/taxDeductionsForm?id=" + d.id + "&tabId=1')\">税额扣减</a></div>";
     }
     if(d.status==2){
         xml +="<span class='myspan'>操作</span>";
@@ -192,5 +194,49 @@ function update(url) {//修改工程下项目
 
     })
 }
+    function materialOffset(url) { //甲供材扣抵
+    layer.open({
+        type: 2,
+        title: '甲供材扣抵',
+        area: ['70%', '90%'],
+        offset:['7%','14%'],
+        shade: 0.8,
+        shadeClose: true,
+        fixed: true, //不固定
+        maxmin: true,
+        content: url,//查看的路径
+        btn: ['确定','关闭'],
+        yes: function(index, layero){
+            var bodyparent = layer.getChildFrame('body', index); //获取子类页面body下内容
+            bodyparent.find('#updatebtn').click(); // 点击修改页面隐藏的按钮
+        }
+        ,btn2: function(index, layero){
+            layer.close(index);
+        }
+
+    })
+}
+
+    function taxDeductions(url) { //税金处理
+    layer.open({
+        type: 2,
+        title: '税金处理',
+        area: ['70%', '90%'],
+        offset:['7%','14%'],
+        shade: 0.8,
+        shadeClose: true,
+        fixed: true, //不固定
+        maxmin: true,
+        content: url,//查看的路径
+        btn: ['确定','关闭'],
+        yes: function(index, layero){
+            var bodyparent = layer.getChildFrame('body', index); //获取子类页面body下内容
+            bodyparent.find('#updatebtn').click(); // 点击修改页面隐藏的按钮
+        }
+        ,btn2: function(index, layero){
+            layer.close(index);
+        }
+    })
+}
 </script>