瀏覽代碼

修改部分页面逻辑

ly 1 年之前
父節點
當前提交
cf399d8163

+ 1 - 0
src/main/java/com/liang/common/fileupload/controller/FileUploadController.java

@@ -216,6 +216,7 @@ public class FileUploadController extends BaseController {
216 216
     public void exportWord(HttpServletResponse response) throws Exception {
217 217
         // 加载模板文件
218 218
         InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("template.docx");
219
+
219 220
         XWPFDocument document = new XWPFDocument(OPCPackage.open(inputStream));
220 221
 
221 222
         // 填充占位符

+ 13 - 0
src/main/java/com/liang/controller/LsUserController.java

@@ -77,10 +77,23 @@ public class LsUserController {
77 77
 
78 78
     @RequestMapping(value = "/forAdd", method = RequestMethod.GET)
79 79
     public String forAdd(Model model) {
80
+
80 81
         List<Map<String, String>> xlList = baseEducationService.getEducationList();
82
+
81 83
         model.addAttribute("xlList", xlList);
84
+
82 85
         return "lsuserinfo/add";
83 86
     }
87
+
88
+    @RequestMapping(value = "/edit/{id}",method = RequestMethod.GET)
89
+    public String forEdit(@PathVariable Integer id){
90
+
91
+
92
+        return "lsuserinfo/add";
93
+
94
+    }
95
+
96
+
84 97
     /**
85 98
      * 保存数据
86 99
      * @param sysLsUserEntity

+ 7 - 12
src/main/resources/templates/lsuserinfo/list.html

@@ -17,12 +17,6 @@
17 17
             <div id="search-div" style="margin: 5px 10px -10px 0px">
18 18
                 <form class="layui-form" action="" lay-filter="search-form">
19 19
                     <div class="layui-form-item">
20
-                        <div class="layui-inline">
21
-                            <label class="layui-form-label" style="width: 60px">公司/单位</label>
22
-                            <div class="layui-input-inline" style="width: 300px">
23
-                                <input type="text" name="dwmc" autocomplete="off" class="layui-input">
24
-                            </div>
25
-                        </div>
26 20
                         <div class="layui-inline">
27 21
                             <label class="layui-form-label" style="width: 40px">姓名</label>
28 22
                             <div class="layui-input-inline">
@@ -52,9 +46,9 @@
52 46
                 <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="edit">
53 47
                     <i class="layui-icon layui-icon-edit" style="font-size: 10px;"></i>编辑
54 48
                 </button>
55
-                <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="view">
49
+<!--                <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="view">
56 50
                     <i class="layui-icon layui-icon-set" style="font-size: 10px;"></i>查看
57
-                </button>
51
+                </button>-->
58 52
                 <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="delete">
59 53
                     <i class="layui-icon layui-icon-delete" style="font-size: 10px;"></i>删除
60 54
                 </button>
@@ -101,16 +95,18 @@
101 95
             cols: [
102 96
                 [
103 97
                     {type: "checkbox", width: '3%', fixed: 'left'},
104
-                    {type: 'numbers', align: 'center'},
105
-                    {field: 'id', width: '8%', title: '临时人员ID', align: 'center'},
98
+                    {type: 'numbers', align: 'center',title: '序号'},
106 99
                     {field: 'name', width: '7%',title: '姓名', align: 'left'},
107 100
                     {field: 'xb', width: '5%', title: '性别', align: 'left'},
101
+                    {field: 'dept', width: '8%', title: '部门', align: 'center'},
108 102
                     {field: 'sfzh', width: '10%', title: '身份证号', align: 'left'},
109 103
                     {field: 'phone', width: '10%', title: '手机号', align: 'left'},
110 104
                     {field: 'ygzed', width: '5%', title: '月工资', align: 'left'},
111 105
                     {field: 'byxy', width: '10%', title: '毕业院校', align: 'left'},
112 106
                     {field: 'zy', width: '10%', title: '专业', align: 'left'},
113 107
                     {field: 'xl', width: '10%', title: '学历', align: 'left'},
108
+                    {field: 'st',width: '10%',title: '聘用周期(年)',align: 'center'},
109
+                    {field: 'terminal',width: '15%',title: '合同到期时间',align: 'center'},
114 110
                     {field: 'gznr', width: '20%', title: '工作内容', align: 'left'}
115 111
                 ]
116 112
             ],
@@ -195,13 +191,12 @@
195 191
                         shade: 0.2,
196 192
                         maxmin: true,
197 193
                         area: ['1000px', layerheight + 'px'],
198
-                        content: AjaxUtil.ctx + 'lsUser/up/' + data[0].id,
194
+                        content: AjaxUtil.ctx + 'lsUser/edit/'+data[0].id,
199 195
                         end: function (index) {
200 196
                             // 重载表格
201 197
                             if(updateflag == 1)
202 198
                                 currTable.reload();
203 199
                             updateflag = 0;
204
-                            layer.close(index);
205 200
                         }
206 201
                     });
207 202
                 }

+ 8 - 0
src/main/resources/templates/prjproject/add.html

@@ -1274,6 +1274,7 @@
1274 1274
 //年度预算总和
1275 1275
 
1276 1276
                     document.getElementById('rwsys').value = result.data.sum;
1277
+
1277 1278
                     document.getElementById('rwsys2').value = result.data.sum;
1278 1279
                 }
1279 1280
             });
@@ -1729,6 +1730,8 @@
1729 1730
                     }
1730 1731
                 }
1731 1732
 
1733
+
1734
+
1732 1735
                 //更新父节点的值
1733 1736
                 for (var j = 0; j < dataBudget.length; j++) {
1734 1737
                     if (fj == dataBudget[j].bm)
@@ -1776,6 +1779,8 @@
1776 1779
                             dataBudget[j].dw10 = dw10.toFixed(2);
1777 1780
 
1778 1781
                         var ysje = dw1 + dw2 + dw3 + dw4 + dw5 + dw6 + dw7 + dw8 + dw9 + dw10;
1782
+
1783
+
1779 1784
                         if(ysje == 0) {
1780 1785
                             dataBudget[j].ysje = "";
1781 1786
                         }
@@ -1818,11 +1823,14 @@
1818 1823
         }
1819 1824
         // 监听确认按钮(项目预算)
1820 1825
         $("button[lay-filter='saveBtn5']").click(function()  {
1826
+
1821 1827
             if(xmId == -1) {
1822 1828
                 Message.error("请先创建项目任务书,然后再填写项目预算",2000);
1823 1829
             } else{
1824 1830
                 var data = insTb5.options.data;
1831
+                console.log(data[3].value);
1825 1832
                 var budgets = new Array();
1833
+
1826 1834
                 for(var i = 0; i < data.length; i++) {
1827 1835
                     getBudget(budgets, data[i]);
1828 1836
                 }

+ 3 - 10
src/main/resources/templates/stafeemanage/list_approving.html

@@ -230,15 +230,6 @@
230 230
                     {field: 'xmlxmc', width: '10%', title: '项目类型'},
231 231
                     {field: 'fylbmc', width: '7%', title: '费用类别'},
232 232
                     {field: 'sqje', width: '7%', title: '申请金额(元)'},
233
-                    // {
234
-                    //     field: 'sfbyj', width: '8%', title: '是否备用金', align: 'center', templet: function (d) {
235
-                    //         if (1 == d.sfbyj) {
236
-                    //             return '<span class="layui-badge layui-bg-blue">是</span>';
237
-                    //         } else {
238
-                    //             return '<span class="layui-badge layui-bg-orange">否</span>';
239
-                    //         }
240
-                    //     }
241
-                    // },
242 233
                     {field: 'sqrxm', width: '5%', title: '申请人'},
243 234
                     {field: 'dkyfzrxm', width: '8%', title: '电科院负责人'},
244 235
                     {field: 'ssbmmc', width: '8%', title: '所属部门'},
@@ -677,7 +668,7 @@
677 668
     });
678 669
 
679 670
         //双击
680
-        table.on('rowDouble(currentTableFilter)', function (obj) {
671
+           , function (obj) {
681 672
             var data = obj.data;
682 673
             layer.open({
683 674
                 title: '浏览费用申请',
@@ -693,6 +684,8 @@
693 684
             });
694 685
         });
695 686
     });
687
+    // 监听表格选框事件
688
+    table.on
696 689
 
697 690
     function setUpdateFlag() {
698 691
         updateflag = 1;

+ 23 - 10
src/main/resources/templates/staprintingfee/add.html

@@ -68,29 +68,39 @@
68 68
 
69 69
 <script type="text/javascript" th:inline="javascript">
70 70
     AjaxUtil.ctx = /*[[@{/}]]*/'';
71
+
72
+
71 73
     layui.use(['form', 'tableSelect'], function () {
72 74
         var form = layui.form;
73
-
74 75
         var dcysInput = document.getElementById('dcys');
75 76
         var dycsInput = document.getElementById('dycs');
76 77
         var hjInput = document.getElementById('hj');
77
-
78 78
         dcysInput.addEventListener('input', updateHj);
79 79
         dycsInput.addEventListener('input', updateHj);
80 80
         var dcysValue;
81 81
         var dycsValue;
82
+
82 83
         function updateHj() {
83
-            dcysValue = parseFloat(dcysInput.value) || 0;
84
-            dycsValue = parseFloat(dycsInput.value) || 0;
84
+            var dcysValue = parseFloat(document.getElementById('dcys').value) || 0;
85
+            var dycsValue = parseFloat(document.getElementById('dycs').value) || 0;
86
+            var dcfyValue = parseFloat($("#dcfy").val()) || 0; // 获取当前选中的单页费用
87
+            if(dcysValue > 0 && dycsValue > 0 && dcfyValue > 0) {
88
+                $("#hj").val(dcysValue * dycsValue * dcfyValue); // 计算并更新合计值
89
+            }
85 90
         }
86 91
 
87
-        form.on('select(dcfy)',function (data){
88
-            if(dcysValue!=undefined&&dycsValue!=undefined){
89
-                $("#hj").val(dcysValue * dycsValue * data.value);
90
-  /*              hjInput.value = dcysValue * dycsValue * data.value;*/
91
-            }
92
-        })
93 92
 
93
+        form.on('select(dcfy)', function(data) {
94
+            var dcysValue = document.getElementById('dcys').value;
95
+            var dycsValue = document.getElementById('dycs').value;
96
+            if (!dcysValue || !dycsValue) {
97
+                alert("请先填写单册页数和打印册数!");
98
+                this.value = ''; // 重置下拉框的选中项
99
+                form.render('select'); // 重新渲染select
100
+            } else {
101
+                updateHj(); // 更新合计值
102
+            }
103
+        });
94 104
 
95 105
         //监听提交
96 106
         form.on('submit(saveBtn)', function (data) {
@@ -105,6 +115,9 @@
105 115
             var iframeIndex = parent.layer.getFrameIndex(window.name);
106 116
             parent.layer.close(iframeIndex);
107 117
         });
118
+
119
+
120
+
108 121
     });
109 122
 </script>
110 123
 </body>

二進制
target/classes/com/liang/common/fileupload/controller/FileUploadController.class


二進制
target/classes/com/liang/controller/LsUserController.class


二進制
target/classes/com/liang/controller/PrjProjectController.class


+ 7 - 12
target/classes/templates/lsuserinfo/list.html

@@ -17,12 +17,6 @@
17 17
             <div id="search-div" style="margin: 5px 10px -10px 0px">
18 18
                 <form class="layui-form" action="" lay-filter="search-form">
19 19
                     <div class="layui-form-item">
20
-                        <div class="layui-inline">
21
-                            <label class="layui-form-label" style="width: 60px">公司/单位</label>
22
-                            <div class="layui-input-inline" style="width: 300px">
23
-                                <input type="text" name="dwmc" autocomplete="off" class="layui-input">
24
-                            </div>
25
-                        </div>
26 20
                         <div class="layui-inline">
27 21
                             <label class="layui-form-label" style="width: 40px">姓名</label>
28 22
                             <div class="layui-input-inline">
@@ -52,9 +46,9 @@
52 46
                 <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="edit">
53 47
                     <i class="layui-icon layui-icon-edit" style="font-size: 10px;"></i>编辑
54 48
                 </button>
55
-                <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="view">
49
+<!--                <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="view">
56 50
                     <i class="layui-icon layui-icon-set" style="font-size: 10px;"></i>查看
57
-                </button>
51
+                </button>-->
58 52
                 <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="delete">
59 53
                     <i class="layui-icon layui-icon-delete" style="font-size: 10px;"></i>删除
60 54
                 </button>
@@ -101,16 +95,18 @@
101 95
             cols: [
102 96
                 [
103 97
                     {type: "checkbox", width: '3%', fixed: 'left'},
104
-                    {type: 'numbers', align: 'center'},
105
-                    {field: 'id', width: '8%', title: '临时人员ID', align: 'center'},
98
+                    {type: 'numbers', align: 'center',title: '序号'},
106 99
                     {field: 'name', width: '7%',title: '姓名', align: 'left'},
107 100
                     {field: 'xb', width: '5%', title: '性别', align: 'left'},
101
+                    {field: 'dept', width: '8%', title: '部门', align: 'center'},
108 102
                     {field: 'sfzh', width: '10%', title: '身份证号', align: 'left'},
109 103
                     {field: 'phone', width: '10%', title: '手机号', align: 'left'},
110 104
                     {field: 'ygzed', width: '5%', title: '月工资', align: 'left'},
111 105
                     {field: 'byxy', width: '10%', title: '毕业院校', align: 'left'},
112 106
                     {field: 'zy', width: '10%', title: '专业', align: 'left'},
113 107
                     {field: 'xl', width: '10%', title: '学历', align: 'left'},
108
+                    {field: 'st',width: '10%',title: '聘用周期(年)',align: 'center'},
109
+                    {field: 'terminal',width: '15%',title: '合同到期时间',align: 'center'},
114 110
                     {field: 'gznr', width: '20%', title: '工作内容', align: 'left'}
115 111
                 ]
116 112
             ],
@@ -195,13 +191,12 @@
195 191
                         shade: 0.2,
196 192
                         maxmin: true,
197 193
                         area: ['1000px', layerheight + 'px'],
198
-                        content: AjaxUtil.ctx + 'lsUser/up/' + data[0].id,
194
+                        content: AjaxUtil.ctx + 'lsUser/edit/'+data[0].id,
199 195
                         end: function (index) {
200 196
                             // 重载表格
201 197
                             if(updateflag == 1)
202 198
                                 currTable.reload();
203 199
                             updateflag = 0;
204
-                            layer.close(index);
205 200
                         }
206 201
                     });
207 202
                 }

+ 8 - 0
target/classes/templates/prjproject/add.html

@@ -1274,6 +1274,7 @@
1274 1274
 //年度预算总和
1275 1275
 
1276 1276
                     document.getElementById('rwsys').value = result.data.sum;
1277
+
1277 1278
                     document.getElementById('rwsys2').value = result.data.sum;
1278 1279
                 }
1279 1280
             });
@@ -1729,6 +1730,8 @@
1729 1730
                     }
1730 1731
                 }
1731 1732
 
1733
+
1734
+
1732 1735
                 //更新父节点的值
1733 1736
                 for (var j = 0; j < dataBudget.length; j++) {
1734 1737
                     if (fj == dataBudget[j].bm)
@@ -1776,6 +1779,8 @@
1776 1779
                             dataBudget[j].dw10 = dw10.toFixed(2);
1777 1780
 
1778 1781
                         var ysje = dw1 + dw2 + dw3 + dw4 + dw5 + dw6 + dw7 + dw8 + dw9 + dw10;
1782
+
1783
+
1779 1784
                         if(ysje == 0) {
1780 1785
                             dataBudget[j].ysje = "";
1781 1786
                         }
@@ -1818,11 +1823,14 @@
1818 1823
         }
1819 1824
         // 监听确认按钮(项目预算)
1820 1825
         $("button[lay-filter='saveBtn5']").click(function()  {
1826
+
1821 1827
             if(xmId == -1) {
1822 1828
                 Message.error("请先创建项目任务书,然后再填写项目预算",2000);
1823 1829
             } else{
1824 1830
                 var data = insTb5.options.data;
1831
+                console.log(data[3].value);
1825 1832
                 var budgets = new Array();
1833
+
1826 1834
                 for(var i = 0; i < data.length; i++) {
1827 1835
                     getBudget(budgets, data[i]);
1828 1836
                 }

+ 2 - 5
target/classes/templates/prjproject/list.html

@@ -223,7 +223,7 @@
223 223
             });
224 224
         });
225 225
 
226
-        if(userId != 119){
226
+        if(userId != 40){
227 227
             document.getElementById("myButton").style.display = 'none';
228 228
         }
229 229
 
@@ -488,10 +488,6 @@
488 488
                 }
489 489
             }
490 490
             else if(obj.event == 'backSpacing'){
491
-                // 这段代码尝试从Layui表格组件的缓存中获取名为"currentTableId"的表格中的数据,
492
-                // 并将这些数据存储在变量project中。然后,它检查这个project数组的长度是否为0,
493
-                // 即是否没有数据(或没有选中的行)。
494
-                // 如果没有数据,代码执行return;语句,意味着如果没有选中任何项目(或表格为空),则不执行任何后续操作。
495 491
 
496 492
                 var project = table.cache["currentTableId"];
497 493
                 if (project.length == 0){
@@ -532,6 +528,7 @@
532 528
 
533 529
             }
534 530
             else if (obj.event === 'downloadWord') {  // 监听查看操作
531
+
535 532
                 var projects = table.cache["currentTableId"];
536 533
                 if (projects.length == 0)
537 534
                     return;

+ 1 - 1
target/classes/templates/stafeemanage/list_approving.html

@@ -132,7 +132,7 @@
132 132
 <!--                </button>-->
133 133
             </div>
134 134
         </script>
135
-        <input type="hidden" id="userId" name="userId" class="layui-input" th:value="${userId}">
135
+       <!-- <input type="hidden" id="userId" name="userId" class="layui-input" th:value="${userId}">-->
136 136
         <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
137 137
     </div>
138 138
 </div>

+ 2 - 2
target/classes/templates/staprintingfee/add.html

@@ -79,8 +79,8 @@
79 79
         dycsInput.addEventListener('input', updateHj);
80 80
         var dcysValue;
81 81
         var dycsValue;
82
-        function updateHj() {
83 82
 
83
+        function updateHj() {
84 84
             var dcysValue = parseFloat(document.getElementById('dcys').value) || 0;
85 85
             var dycsValue = parseFloat(document.getElementById('dycs').value) || 0;
86 86
             var dcfyValue = parseFloat($("#dcfy").val()) || 0; // 获取当前选中的单页费用
@@ -89,7 +89,7 @@
89 89
             }
90 90
         }
91 91
 
92
-        
92
+
93 93
         form.on('select(dcfy)', function(data) {
94 94
             var dcysValue = document.getElementById('dcys').value;
95 95
             var dycsValue = document.getElementById('dycs').value;