蔡德晨 5 år sedan
förälder
incheckning
e44e1b83c8

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/mapper/xml/JkxlMapper.xml

@@ -117,7 +117,7 @@
 
 
 
-    <update id="updateData" parameterType="com.jeeplus.modules.sg.entity.WbsProject">
+    <update id="updateDate" parameterType="com.jeeplus.modules.sg.entity.WbsProject">
           update sg_wbs_fee set
              <if test="rgFtFee != null and rgFtFee != ''">
 				 rg_fee_ft = #{rgFtFee},

+ 7 - 0
src/main/java/com/jeeplus/modules/sg/service/JkxlService.java

@@ -50,6 +50,13 @@ public class JkxlService {
 
     @Transactional
    public void  updateFee(TzData tzData){
+       String type  = tzData.getType();
+       if(type.equals("补增值税税率调整差额")){
+           type = "1";
+       } else {
+           type = "2";
+       }
+       tzData.setType(type);
        tzData.setFee(0.00);
        jkxlMapper.updateTzFee(tzData);
    }

+ 1 - 0
src/main/resources/j2cache/j2cache.properties

@@ -89,6 +89,7 @@ redis.namespace =
 
 ## connection
 redis.hosts = 192.168.2.4:6379
+#redis.hosts = 127.0.0.1:6379
 redis.timeout = 2000
 redis.password =
 redis.database = 0

+ 1 - 0
src/main/resources/properties/jeeplus.properties

@@ -14,6 +14,7 @@
 #mysql database setting
 jdbc.type=mysql
 jdbc.driver=com.mysql.jdbc.Driver
+#jdbc.url=jdbc:mysql://localhost:3306/guowang?useUnicode=true&characterEncoding=utf-8
 jdbc.url=jdbc:mysql://192.168.2.4:3306/guowang?useUnicode=true&characterEncoding=utf-8
 jdbc.username=root
 jdbc.password=root

+ 27 - 30
src/main/webapp/webpage/modules/sg/free/avgpage.jsp

@@ -6,6 +6,7 @@
   To change this template use File | Settings | File Templates.
 --%>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
 <html>
 <head>
     <title>分摊</title>
@@ -18,10 +19,10 @@
     </style>
 </head>
 <body>
-<form class="layui-form" action="">
-    <input hidden="hidden" name="" id="newid2" value=""/>
-    <input hidden="hidden" name="" id="xmmc2" value=""/>
-    <input hidden="hidden" name="" id="fyje2" value=""/>
+<form:form id="inputForm" class="layui-form" action="${ctx}/jkxl/fttz" method="post">
+    <input hidden="hidden" name="id" id="newid2" value=""/>
+    <input hidden="hidden" name="type" id="xmmc2" value=""/>
+    <input hidden="hidden" name="fee" id="fyje2" value=""/>
     <div class="layui-form-item">
 
     </div>
@@ -31,49 +32,49 @@
             <input type="text" value="5000" id="readid" readonly="readonly" class="layui-input" style="width:20%;border:none;">
         </div>
         <div class="layui-input-block">
-            <input type="radio" name="mydiv" value="" title="增加" checked="">
-            <input type="radio" name="mydiv" value="" title="减少">
+            <input  type="radio" name="state" value="1" title="增加" checked="checked"/>
+            <input  type="radio" name="state" value="2" title="减少" checked=""/>
         </div>
     </div>
     <div class="layui-form-item">
         <div class="layui-input-block">
-            <input type="radio" name="myradio" value="" title="人工费" checked="">
+            <input type="radio" name="code" value="1" title="人工费" checked="checked">
         </div>
         <div class="layui-input-block">
-            <input type="radio" name="myradio" value="" title="承包分采购">
+            <input type="radio" name="code" value="2" title="承包分采购">
         </div>
         <div class="layui-input-block">
-            <input type="radio" name="myradio" value="" title="发包人采购">
+            <input type="radio" name="code" value="3" title="发包人采购">
         </div>
         <div class="layui-input-block">
-            <input type="radio" name="myradio" value="" title="机械费">
+            <input type="radio" name="code" value="4" title="机械费">
         </div>
         <div class="layui-input-block">
-            <input type="radio" name="myradio" value="" title="措施费-1">
+            <input type="radio" name="code" value="5" title="措施费-1">
         </div>
         <div class="layui-input-block">
-            <input type="radio" name="myradio" value="" title="措施费-2">
+            <input type="radio" name="code" value="6" title="措施费-2">
         </div>
         <div class="layui-input-block">
-            <input type="radio" name="myradio" value="" title="措施费二">
+            <input type="radio" name="code" value="7" title="措施费二">
         </div>
         <div class="layui-input-block">
-            <input type="radio" name="myradio" value="" title="其他费">
+            <input type="radio" name="code" value="8" title="其他费">
         </div>
         <div class="layui-input-block">
-            <input type="radio" name="myradio" value="规费" title="规费">
+            <input type="radio" name="code" value="9" title="规费">
         </div>
         <div class="layui-input-block">
-            <input type="radio" name="myradio" value="" title="税费">
+            <input type="radio" name="code" value="10" title="税费">
         </div>
     </div>
-    <div class="layui-form-item">
-        <div class="layui-input-block">
-            <button class="layui-btn" lay-submit="" lay-filter="demo1">确定</button>
+    <%--<div class="layui-form-item">--%>
+        <%--<div class="layui-input-block">--%>
+            <%--<button class="layui-btn" lay-submit="" lay-filter="demo1">确定</button>--%>
             <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
-        </div>
-    </div>
-</form>
+        <%--</div>--%>
+    <%--</div>--%>
+</form:form>
 </body>
 <script>
     layui.use(['form', 'layedit', 'laydate'], function(){
@@ -91,14 +92,10 @@
         $("#fyje2").val(fyje2);
         $("#mylable").text(xmmc2);
         $("#readid").val(fyje2);
-
-//		  form.val('example', {
-//		  	"title":"500",
-//		  	"mydiv": "增加",
-//		    "myradio": "人工费"
-//		  })
-
-
     });
+
+    function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            $("#inputForm").submit();
+    }
 </script>
 </html>

+ 21 - 19
src/main/webapp/webpage/modules/sg/free/wbslist.jsp

@@ -237,10 +237,7 @@
 
         table.render({
             elem: '#xmmc'
-//  ,url:'/test/table/demo1.json'
-//  ,toolbar: '#toolbarDemo'
             ,title: '为标识'
-//  ,totalRow: true
             ,cols: [[
                 {field:'xmmc', width:200,title:'项目名称'}
                 ,{field:'fyje', width:178,title:'费用金额'}
@@ -268,40 +265,45 @@
             } else if(obj.event === 'ddtz'){
                 datacount=JSON.stringify(data);
             }
-            alert(datacount);
+            // alert(datacount);
         });
     });
 </script>
 <script>
-    function sureradio(data){
+    function sureradio(data,target){
         var newid = data.id;
         var xmmc = data.xmmc;
         var fyje = data.fyje;
         $("#newid").val(newid);
         $("#xmmc1").val(xmmc);
         $("#fyje1").val(fyje);
-//		alert(fyje);
         layui.use(['table','layer'],function(){
 
-            layer.open({
+           layer.open({
                 type: 2,
                 title: xmmc,
-                area: ['400px', '300px'],
+                area: ['450px', '400px'],
                 shade: 0.8,
-//		  closeBtn: 0,
                 shadeClose: true,
                 content: '${ctxp}/webpage/modules/sg/free/avgpage.jsp'
-                , btn: ['确定','关闭']
-                ,success: function(index, layero){
-//		  	alert(newid);
-                    var bodyparent = layer.getChildFrame('body', index);
-                    bodyparent.find('#newid').test('qq');
-//				layer.close(index);
-                }
-                ,btn2: function(index, layero){
-//		  		alert(layero);
-                    layer.close(index);
+                , btn: ['调整','关闭']
+                ,yes: function(index, layero){
+                    var body = layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    iframeWin.contentWindow.doSubmit();
+
+                    layer.close(index);//关闭对话框。
+
                 }
+
             })
         })
     }