ly 10 місяців тому
батько
коміт
58f0551169

+ 1 - 1
src/main/java/com/liang/controller/PrjApproverecordController.java

@@ -97,7 +97,7 @@ public class PrjApproverecordController extends BaseController {
97 97
     public BaseResult list(@RequestParam("page") Integer pageNum,
98 98
                            @RequestParam("limit") Integer pageSize,
99 99
                            @RequestParam(required = false, defaultValue = "", value = "xm") String xm,
100
-                           @RequestParam(required = false, defaultValue = "", value = "zt") String zt,
100
+                           @RequestParam(required = false, defaultValue = "", value = "spzt") String zt,
101 101
                            @RequestParam(required = false, defaultValue = "", value = "wc") String wc,
102 102
                            @RequestParam(required = false, defaultValue = "", value = "tablename") String tablename,
103 103
                            @RequestParam(required = false, defaultValue = "", value = "sortName") String sortName,

+ 1 - 1
src/main/java/com/liang/controller/StaBudgetapprovalController.java

@@ -591,7 +591,7 @@ public class StaBudgetapprovalController extends BaseController {
591 591
      * @return
592 592
      */
593 593
     @RequestMapping(value = "/forApplyView/{id}", method = RequestMethod.GET)
594
-    public String forApplyView(Model model, @PathVariable Integer id) {
594
+    public String   forApplyView(Model model, @PathVariable Integer id) {
595 595
         StaBudgetapproval budgetapproval = staBudgetapprovalService.getFysqById(id);
596 596
         model.addAttribute("budgetapproval", budgetapproval);
597 597
         //费用信息

+ 1 - 0
src/main/java/com/liang/controller/StaReimbursementController.java

@@ -612,6 +612,7 @@ public class StaReimbursementController extends BaseController {
612 612
                 postInfo = new SysPostInfo();
613 613
             }
614 614
             model.addAttribute("postInfo", postInfo);
615
+            model.addAttribute("xmid",xmid);
615 616
 
616 617
             return "reimburse/back_approve";
617 618
         } else {

+ 9 - 0
src/main/java/com/liang/entity/PrjApproverecord.java

@@ -180,6 +180,15 @@ public class PrjApproverecord implements Serializable {
180 180
     private double kysje;
181 181
     private double rysje;
182 182
 
183
+    private String fymc;
184
+
185
+    public String getFymc() {
186
+        return fymc;
187
+    }
188
+
189
+    public void setFymc(String fymc) {
190
+        this.fymc = fymc;
191
+    }
183 192
 
184 193
     public Integer getId() {
185 194
         return id;

+ 73 - 21
src/main/resources/mapper/PrjApproverecordDao.xml

@@ -31,6 +31,7 @@
31 31
         <result property="cyy" column="CYY" jdbcType="VARCHAR"/>
32 32
         <result property="dbr" column="DBR" jdbcType="VARCHAR"/>
33 33
         <result property="xzcyy" column="XZCYY" jdbcType="INTEGER"/>
34
+        <result property="fymc" column="FYMC" jdbcType="VARCHAR"/>
34 35
     </resultMap>
35 36
 
36 37
     <!--查询单个-->
@@ -421,29 +422,80 @@
421 422
 
422 423
     <!--获取待审批列表-->
423 424
     <select id="getApproveList" resultMap="PrjApproverecordMap" parameterType="map">
424
-        SELECT * from  (
425
-        select a.*, u.name as TJRXM, kb.YSJE as KYSJE, pb.YSJE as RYSJE, nb.XMZYS, b.SQJE, r.BZJE, f.BCFKJE
426
-        ,case when TABLENAME = 'sta_FeasibilityReport' then '可研报告' when TABLENAME = 'prj_Project' then '任务书'
427
-        when TABLENAME = 'prj_AnnualBudget' then '年度预算' when TABLENAME = 'sta_BudgetApproval' then '费用申请'
428
-        when TABLENAME = 'sta_Reimbursement' then '报账' when TABLENAME = 'sta_PayApproval' then '付款申请' end as XMLXMC
429
-        ,case when TABLENAME = 'sta_FeasibilityReport' then k.SPZT when TABLENAME = 'prj_Project' then p.SPZT
430
-        when TABLENAME = 'prj_AnnualBudget' then n.SPZT when TABLENAME = 'sta_BudgetApproval' then b.SPZT
431
-        when TABLENAME = 'sta_Reimbursement' then r.SPZT when TABLENAME = 'sta_PayApproval' then f.SPZT end as SPZT,
425
+        SELECT
426
+        *
427
+        FROM
428
+        (
429
+        SELECT
430
+        a.*,
431
+        u.name AS TJRXM,
432
+        kb.YSJE AS KYSJE,
433
+        pb.YSJE AS RYSJE,
434
+        nb.FYMC,
435
+        nb.XMZYS,
436
+        b.SQJE,
437
+        r.BZJE,
438
+        f.BCFKJE,
439
+
440
+        CASE
441
+
442
+        WHEN TABLENAME = 'sta_FeasibilityReport' THEN
443
+        '可研报告'
444
+        WHEN TABLENAME = 'prj_Project' THEN
445
+        '任务书'
446
+        WHEN TABLENAME = 'prj_AnnualBudget' THEN
447
+        '年度预算'
448
+        WHEN TABLENAME = 'sta_BudgetApproval' THEN
449
+        '费用申请'
450
+        WHEN TABLENAME = 'sta_Reimbursement' THEN
451
+        '报账'
452
+        WHEN TABLENAME = 'sta_PayApproval' THEN
453
+        '付款申请'
454
+        END AS XMLXMC,
455
+        CASE
456
+
457
+        WHEN TABLENAME = 'sta_FeasibilityReport' THEN
458
+        k.SPZT
459
+        WHEN TABLENAME = 'prj_Project' THEN
460
+        p.SPZT
461
+        WHEN TABLENAME = 'prj_AnnualBudget' THEN
462
+        n.SPZT
463
+        WHEN TABLENAME = 'sta_BudgetApproval' THEN
464
+        b.SPZT
465
+        WHEN TABLENAME = 'sta_Reimbursement' THEN
466
+        r.SPZT
467
+        WHEN TABLENAME = 'sta_PayApproval' THEN
468
+        f.SPZT
469
+        END AS SPZT,
432 470
         f.htje,
433
-        ROW_NUMBER()over(partition by a.xmid ,a.TABLENAME order by a.tjsj desc , a.wc ASC) as rn
434
-        from prj_ApproveRecord a
435
-        inner join sys_user_info u on a.TJR = u.user_id
436
-        left join sta_FeasibilityReport k on a.XMID = k.ID and a.ZT = k.SPZT
437
-        left join sta_Budget kb on kb.XM = k.ID and kb.FJ = ''
438
-        left join prj_Project p on a.XMID = p.ID and a.ZT = p.SPZT
439
-        left join prj_Budget pb on pb.XM = p.ID and pb.FJ = ''
440
-        left join prj_AnnualBudget n on a.XMID = n.ID and a.ZT = n.SPZT
441
-        left join prj_AnnualBudgetDetail nb on n.ID = nb.NYS and (nb.FJ is NULL or nb.FJ = '')
442
-        left join sta_BudgetApproval b on a.XMID = b.ID and a.ZT = b.SPZT
443
-        left join sta_Reimbursement r on a.XMID = r.ID and a.ZT = r.SPZT
444
-        left join sta_PayApproval f on a.XMID = f.ID and a.ZT = f.SPZT
471
+        ROW_NUMBER ( ) OVER ( partition BY a.xmid , a.TABLENAME ORDER BY a.tjsj DESC, a.wc ASC ) AS rn
472
+        FROM
473
+        prj_ApproveRecord a
474
+        INNER JOIN sys_user_info u ON a.TJR = u.user_id
475
+        LEFT JOIN sta_FeasibilityReport k ON a.XMID = k.ID
476
+        AND a.ZT = k.SPZT
477
+        LEFT JOIN sta_Budget kb ON kb.XM = k.ID
478
+        AND kb.FJ = ''
479
+        LEFT JOIN prj_Project p ON a.XMID = p.ID
480
+        AND a.ZT = p.SPZT
481
+        LEFT JOIN prj_Budget pb ON pb.XM = p.ID
482
+        AND pb.FJ = ''
483
+        LEFT JOIN prj_AnnualBudget n ON a.XMID = n.ID
484
+        AND a.ZT = n.SPZT
485
+        LEFT JOIN prj_AnnualBudgetDetail nb ON n.ID = nb.NYS
486
+        AND ( nb.FJ IS NULL OR nb.FJ = '' )
487
+        LEFT JOIN sta_BudgetApproval b ON a.XMID = b.ID
488
+        AND a.ZT = b.SPZT
489
+        LEFT JOIN sta_Reimbursement r ON a.XMID = r.ID
490
+        AND a.ZT = r.SPZT
491
+        LEFT JOIN sta_PayApproval f ON a.XMID = f.ID
492
+        AND a.ZT = f.SPZT
445 493
         ) a
446
-        where a.rn =1 and a.wc = 0 and a.zt != '未提交' and a.zt != '未提交(返回)'
494
+        WHERE
495
+        a.rn = 1
496
+        AND a.wc = 0
497
+        AND a.zt != '未提交'
498
+        AND a.zt != '未提交(返回)'
447 499
 
448 500
         <if test="userId != null and userId != ''">
449 501
             and a.SHR = #{userId}

+ 48 - 6
src/main/resources/templates/prjapproverecord/list.html

@@ -33,9 +33,6 @@
33 33
                                     <option value="prj_AnnualBudget">年度预算</option>
34 34
                                     <option value="sta_Reimbursement">报账列表</option>
35 35
                                     <option value="sta_PayApproval">付款申请</option>
36
-                                    <!--                                    <option value="4">科学技术进步奖</option>-->
37
-                                    <!--                                    <option value="5">标准创新贡献奖</option>-->
38
-                                    <!--                                    <option value="6">专利奖</option>-->
39 36
                                 </select>
40 37
                             </div>
41 38
                         </div>
@@ -156,7 +153,8 @@
156 153
                 "xm": '',
157 154
                 "erpbh": '',
158 155
                 "xmlx": '',
159
-                "spzt": ''
156
+                "spzt": '',
157
+                "tablename":''
160 158
             });
161 159
             // 执行搜索重载
162 160
             currTable.reload({
@@ -326,7 +324,7 @@
326 324
 
327 325
         //双击
328 326
         table.on('rowDouble(currentTableFilter)', function (obj) {
329
-            var data = obj.data;
327
+/*            var data = obj.data;
330 328
             xmApproval = {
331 329
                 "xmid": data.xmid,
332 330
                 "xm": data.xm
@@ -364,7 +362,51 @@
364 362
                 end: function (index) {
365 363
                     layer.close(index);
366 364
                 }
367
-            });
365
+            });*/
366
+
367
+
368
+            var projects = table.cache["currentTableId"];
369
+            if (projects.length == 0)
370
+                return;
371
+
372
+            var checkStatus = table.checkStatus('currentTableId')
373
+                , data = checkStatus.data;
374
+            if (data == null || data.length === 0) {
375
+                Message.warning("请选择要审批的记录!", 1500);
376
+            } else if (data.length > 1) {
377
+                for (var index in data) {
378
+                    bathSP(data[index])
379
+                    if (index == (data.length - 1)) {
380
+                        var tc = layer.alert('操作成功', function (index) {
381
+                            // 执行搜索重载
382
+                            currTable.reload({
383
+                                page: {
384
+                                    curr: 1
385
+                                },
386
+                                where: form.val("search-form")
387
+                            });
388
+                            layer.close(tc);
389
+                        });
390
+                    }
391
+                }
392
+
393
+            } else {
394
+                var content = oneSP(data)
395
+                layer.open({
396
+                    title: '审批意见',
397
+                    type: 2,
398
+                    shade: 0.3,
399
+                    maxmin: true,
400
+                    shadeClose: true,
401
+                    area: ['1025px', layerheight + 'px'],
402
+                    content: content,
403
+                    end: function () {
404
+                        if (updateflag == 1)
405
+                            currTable.reload();
406
+                        updateflag = 0;
407
+                    }
408
+                });
409
+            }
368 410
         });
369 411
     });
370 412
 

+ 9 - 6
src/main/resources/templates/reimburse/finish_approve.html

@@ -115,6 +115,7 @@
115 115
             </button>
116 116
         </div>
117 117
     </div>
118
+    <input type="hidden" th:value="${xmid}" style="display: none">
118 119
 </form>
119 120
 
120 121
 <script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
@@ -207,16 +208,18 @@
207 208
         });
208 209
 
209 210
         // 监听查看可研报告按钮
210
-        $("button[lay-filter='viewRwsBtn']").click(function () {
211
+        $("button[lay-filter='viewFybzBtn']").click(function () {
212
+            var xmid = document.getElementById('xmid').value;
213
+            console.log(xmid)
211 214
             parent.layer.open({
212
-                title: '查看项目任务书',
215
+                title: '查看报账',
213 216
                 type: 2,
214 217
                 shade: 0.3,
215
-                maxmin: true,
218
+                // maxmin: true,
216 219
                 shadeClose: true,
217
-                area: ['1080px', layerheight + 'px'],
218
-                content: AjaxUtil.ctx + 'staReimbursement/view/' + xmApproval.xmid,
219
-                end: function (index) {
220
+                area: ['1250px', '750px'],
221
+                content: AjaxUtil.ctx + "staReimbursement/forView/" +xmid,
222
+                end: function () {
220 223
                     layer.close(index);
221 224
                 }
222 225
             });

+ 2 - 2
src/main/resources/templates/reimburse/list.html

@@ -242,7 +242,7 @@
242 242
                         title: '编辑报账',
243 243
                         type: 2,
244 244
                         shade: 0.3,
245
-                        // maxmin: true,
245
+                        maxmin: true,
246 246
                         shadeClose: true,
247 247
                         area: ['1250px', '750px'],
248 248
                         content: AjaxUtil.ctx + "staReimbursement/forUpdate/" +data[0].id,
@@ -271,7 +271,7 @@
271 271
                         title: '查看报账',
272 272
                         type: 2,
273 273
                         shade: 0.3,
274
-                        // maxmin: true,
274
+                        maxmin: true,
275 275
                         shadeClose: true,
276 276
                         area: ['1250px', '750px'],
277 277
                         content: AjaxUtil.ctx + "staReimbursement/forView/" +data[0].id,

+ 6 - 4
src/main/resources/templates/reimburse/view.html

@@ -70,10 +70,6 @@
70 70
             <div class="layui-col-md6">
71 71
                 <div class="layui-form-label" style="width: 70px">报销凭证</div>
72 72
             </div>
73
-            <div class="layui-btn-container">
74
-                <button type="button" class="layui-btn layui-btn-primary" lay-on="test-tips-photos" id="ckwj">查看文件
75
-                </button>
76
-            </div>
77 73
         </div>
78 74
         <div class="layui-form-item" style="margin-left: 20px; margin-right: 20px; margin-top: -20px">
79 75
             <input type="hidden" id="bxpz" name="bxpz" class="layui-input" th:value="${reimbursement.bxpz}">
@@ -83,6 +79,9 @@
83 79
 
84 80
         <!-- 右侧悬浮按钮 -->
85 81
         <div class="right-bottom-btn">
82
+            <button type="button" class="layui-btn" lay-on="test-tips-photos" id="ckwj">
83
+                <i class="layui-icon layui-icon-up">批量查看报销凭证</i>
84
+            </button>
86 85
             <button type="button" class="layui-btn" lay-filter="viewFysqBtn">
87 86
                 <i class="layui-icon layui-icon-ok"></i>查看费用申请
88 87
             </button>
@@ -239,8 +238,11 @@
239 238
                 success: function (res) {
240 239
                     console.log(res)
241 240
                     layer.tab({
241
+                        title:'查看报销凭证',
242 242
                         area: ['1150px', '750px'],
243 243
                         tab: res.data,
244
+                        maxmin: true,
245
+                        shadeClose: true,
244 246
                         success: function (index, layero) {//打开tab后的执行的内容
245 247
                             //你的代码
246 248
                             $(".layui-layer-title").attr("style", "width: 1150px; height: 85px; overflow-y: scroll;  white-space: nowrap; border: 1px solid #ccc;");

+ 47 - 0
src/main/resources/templates/stabudgetapproval/view_apply.html

@@ -214,6 +214,9 @@
214 214
 
215 215
                         <!-- 右侧悬浮按钮 -->
216 216
                         <div class="right-bottom-btn">
217
+                            <!--<button type="button" class="layui-btn" lay-filter="spOption">
218
+                                <i class="layui-icon layui-icon-edit"></i>审核
219
+                            </button>-->
217 220
                             <button type="button" class="layui-btn" lay-filter="viewRwsBtn">
218 221
                                 <i class="layui-icon layui-icon-ok"></i>查看任务书
219 222
                             </button>
@@ -270,6 +273,7 @@
270 273
 
271 274
                         <!-- 右侧悬浮按钮 -->
272 275
                         <div class="right-bottom-btn">
276
+
273 277
                             <button type="button" class="layui-btn" lay-filter="viewRwsBtn">
274 278
                                 <i class="layui-icon layui-icon-file"></i>查看任务书
275 279
                             </button>
@@ -286,6 +290,9 @@
286 290
             <!--其它信息结束-->
287 291
         </div>
288 292
     </div>
293
+    <div style="display: none">
294
+        <input type="hidden" th:value="${budgetapproval}" id="budgetapproval">
295
+    </div>
289 296
 </form>
290 297
 
291 298
 <script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
@@ -1273,6 +1280,46 @@
1273 1280
             });
1274 1281
         });
1275 1282
 
1283
+        // 监听审核操作
1284
+        $("button[lay-filter='spOption']").click(function () {
1285
+            var budgetApproval = document.getElementById('budgetapproval').value;
1286
+            var sqje = document.getElementById('sqje').value;
1287
+
1288
+            const regex = /(\w+)=(?:([^,"]*?)|("[^"]*?"))(?:,|$)/g;
1289
+            let match;
1290
+            const parsedData = {};
1291
+            while ((match = regex.exec(budgetApproval)) !== null) {
1292
+                const key = match[1];
1293
+                const value = match[2] !== undefined ? match[2] : match[3];
1294
+                parsedData[key] = value;
1295
+            }
1296
+
1297
+/*            var iframeIndex = parent.layer.getFrameIndex(window.name);
1298
+            parent.layer.close(iframeIndex); // 关闭当前弹框*/
1299
+
1300
+            var content = AjaxUtil.ctx + 'staBudgetapproval/forApproveAdd';
1301
+            if (parsedData.spzt !== "未提交") {
1302
+                content = AjaxUtil.ctx + 'staBudgetapproval/forApproveUpdate/' + parsedData.id + '/' + sqje + '?spzt=' + parsedData.spzt;
1303
+            }
1304
+
1305
+            console.log("打开新弹框的内容:" + content); // 调试信息,确保 content 的值正确
1306
+
1307
+            layer.open({
1308
+                title: '审批意见',
1309
+                type: 2,
1310
+                shade: 0.3,
1311
+                maxmin: true,
1312
+                shadeClose: true,
1313
+                area: ['1025px', layerheight + 'px'],
1314
+                content: content,
1315
+                end: function (index) {
1316
+                    if (updateflag == 1) {
1317
+                        currTable.reload();
1318
+                    }
1319
+                    updateflag = 0;
1320
+                }
1321
+            });
1322
+        });
1276 1323
         // 监听查看年度预算按钮
1277 1324
         $("button[lay-filter='viewNdysBtn']").click(function () {
1278 1325
             var index = parent.layer.open({

+ 1 - 33
src/main/resources/templates/stafeemanage/list_allapply.html

@@ -166,38 +166,7 @@
166 166
                 <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="spList">
167 167
                     <i class="layui-icon layui-icon-list" style="font-size: 10px;"></i>审批列表
168 168
                 </button>
169
-                <!--                <button class="layui-btn layui-btn-sm data-add-btn" lay-event="reimburse">-->
170
-                <!--                    <i class="layui-icon layui-icon-ok" style="font-size: 10px;"></i>报账-->
171
-                <!--                </button>-->
172
-                <!--                <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="nullify">-->
173
-                <!--                    <i class="layui-icon layui-icon-delete" style="font-size: 10px;"></i>作废-->
174
-                <!--                </button>-->
175
-                <!--                                <button class="layui-btn layui-btn-sm" lay-event="exportExcel">-->
176
-                <!--                                    <i class="layui-icon layui-icon-export" style="font-size: 10px;"></i>导出-->
177
-                <!--                                </button>-->
178
-                <!--                else if (obj.event === 'exportExcel') {  // 监听查看操作-->
179
-                <!--                var projects = table.cache["currentTableId"];-->
180
-                <!--                if (projects.length == 0)-->
181
-                <!--                return;-->
182
-
183
-                <!--                var checkStatus = table.checkStatus('currentTableId')-->
184
-                <!--                , data = checkStatus.data;-->
185
-                <!--                if (data == null || data.length === 0) {-->
186
-                <!--                Message.warning("请选择要导出的费用申请!", 1500);-->
187
-                <!--                } else if (data.length > 1) {-->
188
-                <!--                Message.warning("请选择一条记录进行导出!", 1500)-->
189
-                <!--                } else {-->
190
-                <!--                layer.confirm('是否确定导出费用申请——'+data[0].zwmc+'?', {-->
191
-                <!--                btn: ['导出', '取消']-->
192
-                <!--                }, function(index, layero){-->
193
-                <!--                window.location.href=AjaxUtil.ctx + "staBudgetapproval/exportWord/" + data[0].id;-->
194
-                <!--                layer.close(index);-->
195
-
196
-                <!--                }, function(index){-->
197
-
198
-                <!--                });-->
199
-                <!--                }-->
200
-                <!--                }-->
169
+
201 170
             </div>
202 171
         </script>
203 172
 
@@ -625,7 +594,6 @@
625 594
                 var projects = table.cache["currentTableId"];
626 595
                 if (projects.length == 0)
627 596
                     return;
628
-
629 597
                 var checkStatus = table.checkStatus('currentTableId')
630 598
                     , data = checkStatus.data;
631 599
                 if (data == null || data.length === 0) {