Browse Source

项目经费管理

ly 10 months ago
parent
commit
b2b1cfee9c

+ 12 - 3
src/main/java/com/liang/controller/PrjAnnualbudgetController.java

@@ -150,18 +150,27 @@ public class PrjAnnualbudgetController extends BaseController {
150 150
                            @RequestParam(required = false, defaultValue = "", value = "sortName") String sortName,
151 151
                            @RequestParam(required = false, defaultValue = "", value = "sortOrder") String sortOrder) {
152 152
         PageHelper.startPage(pageNum, pageSize);
153
-
154 153
         Map<String, String> paraMap = new HashMap<>();
154
+        if (nf != null && !nf.isEmpty()){
155
+            String[] nfs = nf.split(",");
156
+            if (nfs.length >1){
157
+                paraMap.put("nf",nfs[1]);
158
+
159
+            }else {
160
+                paraMap.put("nf", nf);
161
+            }
162
+
163
+        }
164
+
155 165
         paraMap.put("sortName", sortName);
156 166
         paraMap.put("sortOrder", sortOrder);
157 167
         paraMap.put("xmmc", xmmc);
158 168
         paraMap.put("erpbh", erpbh);
159 169
         paraMap.put("xmlx", xmlx);
160
-
161 170
         paraMap.put("ssbmmc", ssbmmc);
162 171
         paraMap.put("spzt", spzt);
163 172
         paraMap.put("rwsmc", rwsmc);
164
-        paraMap.put("nf", nf);
173
+
165 174
         List<PrjAnnualbudget> list = prjAnnualbudgetService.getNdysList(paraMap);
166 175
 
167 176
         PageInfo<PrjAnnualbudget> pageinfo = new PageInfo<>(list);

+ 39 - 5
src/main/java/com/liang/controller/StaBudgetapprovalController.java

@@ -182,7 +182,8 @@ public class StaBudgetapprovalController extends BaseController {
182 182
                                  @RequestParam(required = false, defaultValue = "", value = "dkyfzr") String dkyfzr,
183 183
                                  @RequestParam(required = false, defaultValue = "", value = "nf") String nf,
184 184
                                  @RequestParam(required = false, defaultValue = "", value = "sortName") String sortName,
185
-                                 @RequestParam(required = false, defaultValue = "", value = "sortOrder") String sortOrder) {
185
+                                 @RequestParam(required = false, defaultValue = "", value = "sortOrder") String sortOrder,
186
+                                 @RequestParam(required = false, defaultValue = "", value = "xmmc")String xmmc) {
186 187
         SysUserInfo userInfo = getSysUserInfo();
187 188
         List<String> postName = sysUserInfoService.getPostNameByUserId(userInfo.getUserId());
188 189
         String post = "";
@@ -196,6 +197,15 @@ public class StaBudgetapprovalController extends BaseController {
196 197
         PageHelper.startPage(pageNum, pageSize);
197 198
 
198 199
         Map<String, String> paraMap = new HashMap<>();
200
+
201
+        if (nf != null && !nf.isEmpty()){
202
+            String[] nfs = nf.split(",");
203
+            if (nfs.length>1){
204
+                paraMap.put("nf", nfs[1]);
205
+            }else {
206
+                paraMap.put("nf", nf);
207
+            }
208
+        }
199 209
         paraMap.put("sortName", sortName);
200 210
         paraMap.put("sortOrder", sortOrder);
201 211
         paraMap.put("sqmc", sqmc);
@@ -207,7 +217,7 @@ public class StaBudgetapprovalController extends BaseController {
207 217
         paraMap.put("xmlx", xmlx);
208 218
         paraMap.put("ssbmmc", ssbmmc);
209 219
         paraMap.put("dkyfzr", dkyfzr);
210
-        paraMap.put("nf", nf);
220
+        paraMap.put("xmmc",xmmc);
211 221
 
212 222
         if (!userInfo.getAccount().equals("admin")) {
213 223
             if (!"过".equals(post)) {
@@ -949,6 +959,14 @@ public class StaBudgetapprovalController extends BaseController {
949 959
         PageHelper.startPage(pageNum, pageSize);
950 960
 
951 961
         Map<String, String> paraMap = new HashMap<>();
962
+        if (nf != null && !nf.isEmpty()){
963
+            String[] nfs = nf.split(",");
964
+            if (nfs.length>1){
965
+                paraMap.put("nf",nfs[1]);
966
+            }else {
967
+                paraMap.put("nf",nf);
968
+            }
969
+        }
952 970
         paraMap.put("sortName", sortName);
953 971
         paraMap.put("sortOrder", sortOrder);
954 972
         paraMap.put("bh", bh);
@@ -957,7 +975,6 @@ public class StaBudgetapprovalController extends BaseController {
957 975
         paraMap.put("sfbyj", sfbyj);
958 976
         paraMap.put("xmmc", xmmc);
959 977
         paraMap.put("ssbmmc", ssbmmc);
960
-        paraMap.put("nf", nf);
961 978
         paraMap.put("spzt", spzt);
962 979
         paraMap.put("sfbz", sfbz);
963 980
         paraMap.put("dkyfzr", dkyfzr);
@@ -1310,6 +1327,10 @@ public class StaBudgetapprovalController extends BaseController {
1310 1327
         List<String> yearList = staBudgetapprovalService.getYearList();
1311 1328
         model.addAttribute("yearList", yearList);
1312 1329
 
1330
+        //审批状态
1331
+        List<Map<String, String>> approveList = sysDictInfoService.queryByCode("pay_status");
1332
+        model.addAttribute("approveList", approveList);
1333
+
1313 1334
         return "stafeemanage/list_feemanage";
1314 1335
     }
1315 1336
 
@@ -1324,10 +1345,21 @@ public class StaBudgetapprovalController extends BaseController {
1324 1345
                                      @RequestParam(required = false, defaultValue = "", value = "ssbmmc") String ssbmmc,
1325 1346
                                      @RequestParam(required = false, defaultValue = "", value = "nf") String nf,
1326 1347
                                      @RequestParam(required = false, defaultValue = "", value = "sortName") String sortName,
1327
-                                     @RequestParam(required = false, defaultValue = "", value = "sortOrder") String sortOrder) {
1348
+                                     @RequestParam(required = false, defaultValue = "", value = "sortOrder") String sortOrder,
1349
+                                     @RequestParam(required = false, defaultValue = "", value = "spzt")String spzt,
1350
+                                     @RequestParam(required = false, defaultValue = "", value = "bh")String bh
1351
+    ) {
1328 1352
         PageHelper.startPage(pageNum, pageSize);
1329 1353
 
1330 1354
         Map<String, String> paraMap = new HashMap<>();
1355
+        if (nf != null && !nf.isEmpty()){
1356
+            String[] nfs = nf.split(",");
1357
+            if (nfs.length>1){
1358
+                paraMap.put("nf", nfs[1]);
1359
+            }else {
1360
+                paraMap.put("nf", nf);
1361
+            }
1362
+        }
1331 1363
         paraMap.put("sortName", sortName);
1332 1364
         paraMap.put("sortOrder", sortOrder);
1333 1365
         paraMap.put("xmmc", xmmc);
@@ -1335,7 +1367,9 @@ public class StaBudgetapprovalController extends BaseController {
1335 1367
         paraMap.put("xmlx", xmlx);
1336 1368
         paraMap.put("xmfzrxm", xmfzrxm);
1337 1369
         paraMap.put("ssbmmc", ssbmmc);
1338
-        paraMap.put("nf", nf);
1370
+        paraMap.put("spzt",spzt);
1371
+        paraMap.put("bh",bh);
1372
+
1339 1373
         List<FeeManagemant> list = prjProjectService.getFyglList(paraMap);
1340 1374
 
1341 1375
         PageInfo<FeeManagemant> pageinfo = new PageInfo<>(list);

+ 20 - 3
src/main/java/com/liang/controller/StaPayapprovalController.java

@@ -8,6 +8,7 @@ import com.liang.common.base.BaseResult;
8 8
 import com.liang.common.enums.PostInfoEnum;
9 9
 import com.liang.common.exception.CustomException;
10 10
 import com.liang.common.utils.ExcelPoiUtil;
11
+import com.liang.dao.StaReimbursementDao;
11 12
 import com.liang.entity.*;
12 13
 import com.liang.service.*;
13 14
 //import com.liang.vo.service.*;
@@ -91,6 +92,9 @@ public class StaPayapprovalController extends BaseController {
91 92
         return ResponseEntity.ok(this.staPayapprovalService.deleteById(id));
92 93
     }
93 94
 
95
+
96
+    @Resource
97
+    private StaReimbursementDao staReimbursementDao;
94 98
     /**
95 99
      * 列表初始化
96 100
      *
@@ -105,6 +109,9 @@ public class StaPayapprovalController extends BaseController {
105 109
         model.addAttribute("approveList", approveList);
106 110
         //当前用户ID
107 111
         model.addAttribute("userId", getSysUserId());
112
+        //年份
113
+        List<String> yearList = staReimbursementDao.getYearList();
114
+        model.addAttribute("yearList", yearList);
108 115
 
109 116
         return "payapply/list";
110 117
     }
@@ -122,7 +129,9 @@ public class StaPayapprovalController extends BaseController {
122 129
                            @RequestParam(required = false, defaultValue = "", value = "cjsj2") String cjsj2,
123 130
                            @RequestParam(required = false, defaultValue = "", value = "sortName") String sortName,
124 131
                            @RequestParam(required = false, defaultValue = "", value = "sortOrder") String sortOrder,
125
-                           @RequestParam(required = false, defaultValue = "", value = "rwsmc") String rwsmc) {
132
+                           @RequestParam(required = false, defaultValue = "", value = "rwsmc") String rwsmc,
133
+                           @RequestParam(required = false, defaultValue = "", value = "nf") String nf,
134
+                           @RequestParam(required = false, defaultValue = "", value = "xmmc")String xmmc) {
126 135
         PageHelper.startPage(pageNum, pageSize);
127 136
         if (cjsj1 != "" && cjsj2 != "" && cjsj1.compareTo(cjsj2) > 0) {
128 137
             String cjsj = cjsj1;
@@ -131,6 +140,14 @@ public class StaPayapprovalController extends BaseController {
131 140
         }
132 141
 
133 142
         Map<String, String> paraMap = new HashMap<>();
143
+        if (nf != null && !nf.isEmpty()){
144
+            String[] nfs = nf.split(",");
145
+            if (nfs.length>1){
146
+                paraMap.put("nf",nfs[1]);
147
+            }else {
148
+                paraMap.put("nf",nf);
149
+            }
150
+        }
134 151
         paraMap.put("sortName", sortName);
135 152
         paraMap.put("sortOrder", sortOrder);
136 153
         paraMap.put("fysqmc", fysqmc);
@@ -141,8 +158,9 @@ public class StaPayapprovalController extends BaseController {
141 158
         paraMap.put("cjsj2", cjsj2);
142 159
         paraMap.put("cjr", cjr);
143 160
         paraMap.put("rwsmc", rwsmc);
144
-        List<StaPayapproval> list = staPayapprovalService.getFksqList(paraMap);
161
+        paraMap.put("xmmc",xmmc);
145 162
 
163
+        List<StaPayapproval> list = staPayapprovalService.getFksqList(paraMap);
146 164
         PageInfo<StaPayapproval> pageinfo = new PageInfo<>(list);
147 165
         //取出查询结果
148 166
         List<StaPayapproval> rows = pageinfo.getList();
@@ -150,7 +168,6 @@ public class StaPayapprovalController extends BaseController {
150 168
         Map<String, Object> result = new HashMap<>();
151 169
         result.put(RESULT_ROWS, rows);
152 170
         result.put(RESULT_TOTAL, total);
153
-
154 171
         return BaseResult.success(result);
155 172
     }
156 173
 

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

@@ -128,6 +128,7 @@ public class StaReimbursementController extends BaseController {
128 128
         List<Map<String, String>> approveList = sysDictInfoService.queryByCode("xm_status");
129 129
         model.addAttribute("approveList", approveList);
130 130
         model.addAttribute("userId", getUserId());
131
+
131 132
         //年份
132 133
         List<String> yearList = staReimbursementDao.getYearList();
133 134
         model.addAttribute("yearList", yearList);

+ 19 - 0
src/main/java/com/liang/entity/FeeManagemant.java

@@ -43,6 +43,25 @@ public class FeeManagemant implements Serializable {
43 43
     private Double byjye;//备用金余额
44 44
     private Double rzbfb;//入账百分比
45 45
 
46
+    private String spzt;
47
+    private String bh;
48
+
49
+    public String getSpzt() {
50
+        return spzt;
51
+    }
52
+
53
+    public void setSpzt(String spzt) {
54
+        this.spzt = spzt;
55
+    }
56
+
57
+    public String getBh() {
58
+        return bh;
59
+    }
60
+
61
+    public void setBh(String bh) {
62
+        this.bh = bh;
63
+    }
64
+
46 65
     public Integer getId() {
47 66
         return id;
48 67
     }

+ 30 - 0
src/main/java/com/liang/entity/StaPayapproval.java

@@ -80,6 +80,36 @@ public class StaPayapproval implements Serializable {
80 80
     private String sqmc;
81 81
     private String bh;
82 82
 
83
+    private String xmmc;
84
+
85
+    private String erpbh;
86
+
87
+    private String nf;
88
+
89
+    public String getNf() {
90
+        return nf;
91
+    }
92
+
93
+    public void setNf(String nf) {
94
+        this.nf = nf;
95
+    }
96
+
97
+    public String getErpbh() {
98
+        return erpbh;
99
+    }
100
+
101
+    public void setErpbh(String erpbh) {
102
+        this.erpbh = erpbh;
103
+    }
104
+
105
+    public String getXmmc() {
106
+        return xmmc;
107
+    }
108
+
109
+    public void setXmmc(String xmmc) {
110
+        this.xmmc = xmmc;
111
+    }
112
+
83 113
     public String getBh() {
84 114
         return bh;
85 115
     }

+ 10 - 0
src/main/java/com/liang/entity/StaReimbursement.java

@@ -83,6 +83,16 @@ public class StaReimbursement implements Serializable {
83 83
 
84 84
     private String nf;
85 85
 
86
+    private String erpbh;
87
+
88
+    public String getErpbh() {
89
+        return erpbh;
90
+    }
91
+
92
+    public void setErpbh(String erpbh) {
93
+        this.erpbh = erpbh;
94
+    }
95
+
86 96
     public String getNf() {
87 97
         return nf;
88 98
     }

+ 17 - 8
src/main/resources/mapper/PrjAnnualbudgetDao.xml

@@ -337,14 +337,23 @@
337 337
 
338 338
     <!--获取年度预算列表-->
339 339
     <select id="getNdysList" resultMap="PrjAnnualbudgetMap" parameterType="map">
340
-        select a.*, t.XMLXMC, r.XM as XMFZRXM, d.dept_name as SSBMMC, u.name as SQRXM, bd.XMZYS
341
-        from prj_AnnualBudget a
342
-        left join base_ProjectType t on t.XMLX = a.XMLX
343
-        left join base_Person r on r.ID = a.XMFZR
344
-        left join sys_user_info u on u.user_id = a.SQR
345
-        left join sys_dept_info d on d.dept_id = a.SSBM
346
-        left join prj_AnnualBudgetDetail bd on bd.NYS = a.ID and bd.FJ = ''
347
-        where 1 = 1
340
+        SELECT
341
+        a.*,
342
+        t.XMLXMC,
343
+        r.XM AS XMFZRXM,
344
+        d.dept_name AS SSBMMC,
345
+        u.name AS SQRXM,
346
+        bd.XMZYS
347
+        FROM
348
+        prj_AnnualBudget a
349
+        LEFT JOIN base_ProjectType t ON t.XMLX = a.XMLX
350
+        LEFT JOIN base_Person r ON r.ID = a.XMFZR
351
+        LEFT JOIN sys_user_info u ON u.user_id = a.SQR
352
+        LEFT JOIN sys_dept_info d ON d.dept_id = a.SSBM
353
+        LEFT JOIN prj_AnnualBudgetDetail bd ON bd.NYS = a.ID
354
+        AND bd.FJ = ''
355
+        WHERE
356
+        1 = 1
348 357
         <if test="userId != null and userId != ''">
349 358
             and (a.SQR = #{userId} or #{userId} in (select SHR from prj_ApproveRecord where XMID = a.ID))
350 359
         </if>

+ 119 - 26
src/main/resources/mapper/PrjProjectDao.xml

@@ -60,6 +60,8 @@
60 60
         <result property="ye" column="YE" jdbcType="NUMERIC"/>
61 61
         <result property="byjye" column="BYJYE" jdbcType="NUMERIC"/>
62 62
         <result property="rzbfb" column="RZBFB" jdbcType="NUMERIC"/>
63
+        <result property="bh" column="BH" jdbcType="VARCHAR"/>
64
+        <result property="spzt" column="SPZT" jdbcType="VARCHAR"/>
63 65
     </resultMap>
64 66
 
65 67
     <!--查询单个-->
@@ -710,32 +712,123 @@
710 712
     </select>
711 713
     <!--     获取费用管理列表 -->
712 714
     <select id="getFyglList" resultMap="FeeManagementMap" parameterType="map">
713
-        select * from(
714
-        select p.ID,p.ZWMC,p.ERPBH,p.XMLX,t.XMLXMC,b.XMFZRXM,d.dept_name as SSBMMC,b.NF, case when aa.NF=b.NF then
715
-        aa.YSJE else 0 end as YSJE, case when aa.NF=b.NF then aa.XMZ else 0 end as XMZ, (SUM(case when b.BZJE is null
716
-        and b.SFBYJ =0 then b.SQJE else 0 end)/10000+SUM(case when b.BZJE is not null and b.SFBYJ =0 then b.BZJE else 0
717
-        end)/10000) as SQJE, (SUM(case when b.BZJE is not null and b.SFBYJ =0 then b.BZJE else 0 end)/10000) as BZJE,
718
-        case when aa.NF=b.NF then aa.BYJ else 0 end as BYJ, (SUM(case when b.BZJE is null and b.SFBYJ =1 then b.SQJE
719
-        else 0 end)/10000+SUM(case when b.BZJE is not null and b.SFBYJ =1 then b.BZJE else 0 end)/10000) as BYJSQJE,
720
-        (SUM(case when b.BZJE is not null and b.SFBYJ =1 then b.BZJE else 0 end)/10000) as BYJBZJE, ((case when
721
-        aa.NF=b.NF then aa.XMZ else 0 end)-(SUM(case when b.BZJE is null and b.SFBYJ =0 then b.SQJE else 0
722
-        end)/10000+SUM(case when b.BZJE is not null and b.SFBYJ =0 then b.BZJE else 0 end)/10000)) as YE, ((case when
723
-        aa.NF=b.NF then aa.BYJ else 0 end)-(SUM(case when b.BZJE is null and b.SFBYJ =1 then b.SQJE else 0
724
-        end)/10000+SUM(case when b.BZJE is not null and b.SFBYJ =1 then b.BZJE else 0 end)/10000)) as BYJYE, (((SUM(case
725
-        when b.BZJE is not null and b.NYS=aa.ID and b.SFBYJ =0 then b.BZJE else 0 end)/10000)+(SUM(case when b.BZJE is
726
-        not null and b.NYS=aa.ID and b.SFBYJ =1 then b.BZJE else 0 end)/10000))/(case when aa.NF=b.NF then aa.YSJE else
727
-        1 end)) as RZBFB from prj_Project p left join (select s.*,r.XM as XMFZRXM from sta_BudgetApproval s left join
728
-        base_Person r on r.ID=s.XMFZR where s.SPZT != '作废') b on b.XMID=p.ID left join base_ProjectType t on
729
-        t.XMLX=p.XMLX left join sys_dept_info d on d.dept_id=p.SSBM left join (select a.*,bd.YSJE,bd.XMZ,bd.BYJ from
730
-        prj_AnnualBudget a left join prj_AnnualBudgetDetail bd on bd.NYS = a.ID and bd.FJ = '' where a.SPZT != '作废')
731
-        aa
732
-        on aa.RWS=p.ID where 1 = 1
733
-        <if test="xmmc != null and xmmc != ''">and p.ZWMC like '%'+#{xmmc}+'%'</if>
734
-        <if test="erpbh != null and erpbh != ''">and p.ERPBH like '%'+#{erpbh}+'%'</if>
735
-        <if test="xmlx != null and xmlx != ''">and p.XMLX = #{xmlx}</if>
736
-        <if test="xmfzrxm != null and xmfzrxm != ''">and b.XMFZRXM like '%'+#{xmfzrxm}+'%'</if>
737
-        <if test="ssbmmc != null and ssbmmc != ''">and d.dept_name like '%'+#{ssbmmc}+'%'</if>
738
-        <if test="nf != null and nf != ''">and b.NF = #{nf}</if>
715
+        SELECT
716
+        *
717
+        FROM
718
+        (
719
+        SELECT
720
+        p.ID,
721
+        p.ZWMC,
722
+        p.ERPBH,
723
+        p.XMLX,
724
+        t.XMLXMC,
725
+        b.XMFZRXM,
726
+        d.dept_name AS SSBMMC,
727
+        b.NF,
728
+        CASE
729
+
730
+        WHEN aa.NF= b.NF THEN
731
+        aa.YSJE ELSE 0
732
+        END AS YSJE,
733
+        CASE
734
+        WHEN aa.NF= b.NF THEN
735
+        aa.XMZ ELSE 0
736
+        END AS XMZ,
737
+        (
738
+        SUM ( CASE WHEN b.BZJE IS NULL AND b.SFBYJ = 0 THEN b.SQJE ELSE 0 END ) / 10000+SUM ( CASE WHEN b.BZJE IS NOT NULL AND b.SFBYJ = 0 THEN b.BZJE ELSE 0 END ) / 10000
739
+        ) AS SQJE,
740
+        ( SUM ( CASE WHEN b.BZJE IS NOT NULL AND b.SFBYJ = 0 THEN b.BZJE ELSE 0 END ) / 10000 ) AS BZJE,
741
+        CASE
742
+
743
+        WHEN aa.NF= b.NF THEN
744
+        aa.BYJ ELSE 0
745
+        END AS BYJ,
746
+        (
747
+        SUM ( CASE WHEN b.BZJE IS NULL AND b.SFBYJ = 1 THEN b.SQJE ELSE 0 END ) / 10000+SUM ( CASE WHEN b.BZJE IS NOT NULL AND b.SFBYJ = 1 THEN b.BZJE ELSE 0 END ) / 10000
748
+        ) AS BYJSQJE,
749
+        ( SUM ( CASE WHEN b.BZJE IS NOT NULL AND b.SFBYJ = 1 THEN b.BZJE ELSE 0 END ) / 10000 ) AS BYJBZJE,
750
+        (
751
+        ( CASE WHEN aa.NF= b.NF THEN aa.XMZ ELSE 0 END ) - (
752
+        SUM ( CASE WHEN b.BZJE IS NULL AND b.SFBYJ = 0 THEN b.SQJE ELSE 0 END ) / 10000+SUM ( CASE WHEN b.BZJE IS NOT NULL AND b.SFBYJ = 0 THEN b.BZJE ELSE 0 END ) / 10000
753
+        )
754
+        ) AS YE,
755
+        (
756
+        ( CASE WHEN aa.NF= b.NF THEN aa.BYJ ELSE 0 END ) - (
757
+        SUM ( CASE WHEN b.BZJE IS NULL AND b.SFBYJ = 1 THEN b.SQJE ELSE 0 END ) / 10000+SUM ( CASE WHEN b.BZJE IS NOT NULL AND b.SFBYJ = 1 THEN b.BZJE ELSE 0 END ) / 10000
758
+        )
759
+        ) AS BYJYE,
760
+        (
761
+        (
762
+        (
763
+        SUM (
764
+        CASE
765
+
766
+        WHEN b.BZJE IS NOT NULL
767
+        AND b.NYS= aa.ID
768
+        AND b.SFBYJ = 0 THEN
769
+        b.BZJE ELSE 0
770
+        END
771
+        ) / 10000
772
+        ) + (
773
+        SUM (
774
+        CASE
775
+
776
+        WHEN b.BZJE IS NOT NULL
777
+        AND b.NYS= aa.ID
778
+        AND b.SFBYJ = 1 THEN
779
+        b.BZJE ELSE 0
780
+        END
781
+        ) / 10000
782
+        )
783
+        ) / ( CASE WHEN aa.NF= b.NF THEN aa.YSJE ELSE 1 END )
784
+        ) AS RZBFB
785
+        FROM
786
+        prj_Project p
787
+        LEFT JOIN (
788
+        SELECT
789
+        s.*,
790
+        r.XM AS XMFZRXM
791
+        FROM
792
+        sta_BudgetApproval s
793
+        LEFT JOIN base_Person r ON r.ID= s.XMFZR
794
+        WHERE
795
+        s.SPZT != '作废'
796
+        ) b ON b.XMID= p.ID
797
+        LEFT JOIN base_ProjectType t ON t.XMLX= p.XMLX
798
+        LEFT JOIN sys_dept_info d ON d.dept_id= p.SSBM
799
+        LEFT JOIN (
800
+        SELECT
801
+        a.*,
802
+        bd.YSJE,
803
+        bd.XMZ,
804
+        bd.BYJ
805
+        FROM
806
+        prj_AnnualBudget a
807
+        LEFT JOIN prj_AnnualBudgetDetail bd ON bd.NYS = a.ID
808
+        AND bd.FJ = ''
809
+        WHERE
810
+        a.SPZT != '作废'
811
+        ) aa ON aa.RWS= p.ID
812
+        WHERE
813
+        1 = 1
814
+        <if test="xmmc != null and xmmc != ''">
815
+          and p.ZWMC like '%'+#{xmmc}+'%'</if>
816
+        <if test="erpbh != null and erpbh != ''">
817
+          and p.ERPBH like '%'+#{erpbh}+'%'</if>
818
+        <if test="xmlx != null and xmlx != ''">
819
+          and p.XMLX = #{xmlx}</if>
820
+        <if test="xmfzrxm != null and xmfzrxm != ''">
821
+          and b.XMFZRXM like '%'+#{xmfzrxm}+'%'</if>
822
+        <if test="ssbmmc != null and ssbmmc != ''">
823
+          and d.dept_name like '%'+#{ssbmmc}+'%'</if>
824
+        <if test="nf != null and nf != ''">
825
+          and b.NF = #{nf}</if>
826
+        <if test="bh != null and bh != ''">
827
+            and s.BH like '%'+#{bh}+'%'
828
+        </if>
829
+        <if test="spzt != null and spzt != ''">
830
+            and s.SPZT = #{spzt}
831
+        </if>
739 832
         group by p.ID,p.ZWMC,p.ERPBH,p.XMLX,t.XMLXMC,b.XMFZRXM,d.dept_name,b.NF,aa.NF,aa.YSJE,aa.XMZ,aa.BYJ
740 833
         <choose>
741 834
             <when test="sortName != null and sortName != '' and sortOrder != null and sortOrder != ''">order by</when>

+ 56 - 13
src/main/resources/mapper/StaBudgetapprovalDao.xml

@@ -388,19 +388,59 @@
388 388
 
389 389
     <!--获取费用申请列表-->
390 390
     <select id="getFysqList" resultMap="StaBudgetapprovalMap" parameterType="map">
391
-        select b.*, t.XMLXMC, d.dept_name as SSBMMC, g.FYMC as FYLBMC, r.XM as XMFZRXM,
392
-        (SELECT STUFF((SELECT ','+XM from (select xm from base_Person
393
-        where id in (select dkyfzrid from
394
-        (select DISTINCT zwmc,SUBSTRING(dkyfzr, number,CHARINDEX(',',dkyfzr+',',number)-number) as dkyfzrid
395
-        from prj_Project WITH(nolock) ,master..spt_values with(nolock) where number >= 1 and len(DKYFZR) > number
396
-        and SUBSTRING(','+DKYFZR,number,1)=',' and ID = b.XMID) t)) B for xml path('')),1,1,'')) as DKYFZRXM
397
-        from sta_BudgetApproval b
398
-        left join base_ProjectType t on t.XMLX = b.XMLX
399
-        left join prj_Project p on p.ID = b.XMID
400
-        left join sys_dept_info d on d.dept_id = b.SSBM
401
-        left join prj_AnnualBudgetDetail g on g.ID = b.FYLB
402
-        left join base_Person r on r.ID = b.XMFZR
403
-        where b.SFBYJ = 0
391
+        SELECT
392
+        b.*,
393
+        t.XMLXMC,
394
+        d.dept_name AS SSBMMC,
395
+        g.FYMC AS FYLBMC,
396
+        r.XM AS XMFZRXM,
397
+        (
398
+        SELECT
399
+        STUFF(
400
+        (
401
+        SELECT
402
+        ',' + XM
403
+        FROM
404
+        (
405
+        SELECT
406
+        xm
407
+        FROM
408
+        base_Person
409
+        WHERE
410
+        id IN (
411
+        SELECT
412
+        dkyfzrid
413
+        FROM
414
+        (
415
+        SELECT DISTINCT
416
+        zwmc,
417
+        SUBSTRING ( dkyfzr, number, CHARINDEX( ',', dkyfzr + ',', number ) - number ) AS dkyfzrid
418
+        FROM
419
+        prj_Project WITH ( nolock ),
420
+        master..spt_values WITH ( nolock )
421
+        WHERE
422
+        number >= 1
423
+        AND len( DKYFZR ) > number
424
+        AND SUBSTRING ( ',' + DKYFZR, number, 1 ) = ','
425
+        AND ID = b.XMID
426
+        ) t
427
+        )
428
+        ) B FOR xml path ( '' )
429
+        ),
430
+        1,
431
+        1,
432
+        ''
433
+        )
434
+        ) AS DKYFZRXM
435
+        FROM
436
+        sta_BudgetApproval b
437
+        LEFT JOIN base_ProjectType t ON t.XMLX = b.XMLX
438
+        LEFT JOIN prj_Project p ON p.ID = b.XMID
439
+        LEFT JOIN sys_dept_info d ON d.dept_id = b.SSBM
440
+        LEFT JOIN prj_AnnualBudgetDetail g ON g.ID = b.FYLB
441
+        LEFT JOIN base_Person r ON r.ID = b.XMFZR
442
+        WHERE
443
+        b.SFBYJ = 0
404 444
         -- and b.SPZT != '审批结束'
405 445
         <if test="userId != null and userId != ''">
406 446
             and (b.SQR = #{userId} or #{userId} in (select SHR from prj_ApproveRecord where XMID = b.ID))
@@ -435,6 +475,9 @@
435 475
         <if test="nf != null and nf != ''">
436 476
             and b.NF = #{nf}
437 477
         </if>
478
+        <if test="xmmc != null and xmmc != ''">
479
+            and b.XMMC = #{xmmc}
480
+        </if>
438 481
         <choose>
439 482
             <when test="sortName != null and sortName != '' and sortOrder != null and sortOrder != ''">
440 483
                 order by ${sortName} ${sortOrder}

+ 31 - 9
src/main/resources/mapper/StaPayapprovalDao.xml

@@ -16,6 +16,9 @@
16 16
         <result property="fkjh" column="FKJH" jdbcType="INTEGER"/>
17 17
         <result property="sqmc" column="SQMC" jdbcType="VARCHAR"/>
18 18
         <result property="bh" column="BH" jdbcType="VARCHAR"/>
19
+        <result property="erpbh" column="ERPBH" jdbcType="VARCHAR"/>
20
+        <result property="xmmc" column="XMMC" jdbcType="VARCHAR"/>
21
+        <result property="nf" column="NF" jdbcType="VARCHAR"/>
19 22
     </resultMap>
20 23
 
21 24
     <!--查询单个-->
@@ -202,14 +205,27 @@
202 205
 
203 206
     <!--获取付款申请列表-->
204 207
     <select id="getFksqList" resultMap="StaPayapprovalMap" parameterType="map">
205
-        select b.*,g.bh, u.name as CJRXM, FORMAT(b.CJSJ, 'yyyy-MM-dd') as CJRQ, c.HTMC, c.WJ as HTWJ, p.JHMC as FKJHMC,
206
-        g.SQMC as FYSQMC, g.XMMC as RWSMC
207
-        from sta_PayApproval b
208
-        left join prj_PayPlan p on p.ID = b.FKJH
209
-        left join prj_Contract c on c.ID = b.HT
210
-        left join sta_BudgetApproval g on g.ID = b.FYSQ
211
-        left join sys_user_info u on u.user_id = b.CJR
212
-        where 1 = 1
208
+        SELECT
209
+        b.*,
210
+        g.BH,
211
+        g.XMMC,
212
+        g.ERPBH,
213
+        g.NF,
214
+        u.name AS CJRXM,
215
+        b.CJSJ AS CJRQ,
216
+        c.HTMC,
217
+        c.WJ AS HTWJ,
218
+        p.JHMC AS FKJHMC,
219
+        g.SQMC AS FYSQMC,
220
+        g.XMMC AS RWSMC
221
+        FROM
222
+        sta_PayApproval b
223
+        LEFT JOIN prj_PayPlan p ON p.ID = b.FKJH
224
+        LEFT JOIN prj_Contract c ON c.ID = b.HT
225
+        LEFT JOIN sta_BudgetApproval g ON g.ID = b.FYSQ
226
+        LEFT JOIN sys_user_info u ON u.user_id = b.CJR
227
+        WHERE
228
+        1 = 1
213 229
         <if test=" rwsmc != null and rwsmc != ''">
214 230
             and g.XMMC like '%'+#{rwsmc}+'%'
215 231
         </if>
@@ -237,6 +253,12 @@
237 253
         <if test="cjsj2 != null and cjsj2 != ''">
238 254
             and b.CJSJ &lt;= #{cjsj2}
239 255
         </if>
256
+        <if test="xmmc != null and xmmc != ''">
257
+            and g.XMMC like '%'+#{xmmc}+'%'
258
+        </if>
259
+        <if test="nf != null and nf != ''">
260
+            and g.nf = #{nf}
261
+        </if>
240 262
         <choose>
241 263
             <when test="sortName != null and sortName != '' and sortOrder != null and sortOrder != ''">
242 264
                 order by ${sortName} ${sortOrder}
@@ -256,7 +278,7 @@
256 278
         WHEN b.SPZT = '作废' THEN 999
257 279
         END
258 280
         ASC,
259
-        p.CJSJ DESC
281
+            b.CJSJ DESC
260 282
     </select>
261 283
 
262 284
     <!--批量删除付款申请-->

+ 19 - 6
src/main/resources/mapper/StaReimbursementDao.xml

@@ -16,6 +16,7 @@
16 16
         <result property="spzt" column="SPZT" jdbcType="VARCHAR"/>
17 17
         <result property="sfbyj" column="SFBYJ" jdbcType="VARCHAR"/>
18 18
         <result property="nf" column="NF" jdbcType="VARCHAR"/>
19
+        <result property="erpbh" column="ERPBH" jdbcType="VARCHAR"/>
19 20
     </resultMap>
20 21
 
21 22
     <!--id查询单个-->
@@ -172,14 +173,26 @@
172 173
 
173 174
     <!--获取报账列表-->
174 175
     <select id="getReimburseList" resultMap="StaReimbursementMap" parameterType="map">
175
-        select r.*, a.BH as FYSQBH, a.SQMC as FYSQMC, u.name as BZRXM, a.XMID, a.XMMC,a.NF,
176
+        SELECT
177
+        r.*,
178
+        a.BH AS FYSQBH,
179
+        a.SQMC AS FYSQMC,
180
+        u.name AS BZRXM,
181
+        a.XMID,
182
+        a.XMMC,
183
+        a.NF,
184
+        a.ERPBH,
176 185
         CASE
177
-        WHEN a.SFBYJ = 1 THEN '是' ELSE '否'
186
+
187
+        WHEN a.SFBYJ = 1 THEN
188
+        '是' ELSE '否'
178 189
         END AS SFBYJ
179
-        from sta_Reimbursement r
180
-        inner join sta_BudgetApproval a on a.ID = r.FYSQ
181
-        left join sys_user_info u on u.user_id = r.BZR
182
-        where 1 = 1
190
+        FROM
191
+        sta_Reimbursement r
192
+        INNER JOIN sta_BudgetApproval a ON a.ID = r.FYSQ
193
+        LEFT JOIN sys_user_info u ON u.user_id = r.BZR
194
+        WHERE
195
+        1 = 1
183 196
         <if test="nf != null and nf != ''">
184 197
             and a.NF = #{nf}
185 198
         </if>

+ 36 - 18
src/main/resources/templates/annualbudget/list.html

@@ -17,20 +17,20 @@
17 17
                 <form class="layui-form" action="" lay-filter="search-form">
18 18
                     <div class="layui-form-item">
19 19
                         <div class="layui-inline">
20
-                            <label class="layui-form-label" style="width: 60px">项目名称</label>
21
-                            <div class="layui-input-inline" style="width: 300px">
20
+                            <label class="layui-form-label" style="width: 70px">项目名称</label>
21
+                            <div class="layui-input-inline" style="width: 140px">
22 22
                                 <input type="text" id="xmmc" name="xmmc" autocomplete="off" class="layui-input">
23 23
                             </div>
24 24
                         </div>
25 25
                         <div class="layui-inline">
26
-                            <label class="layui-form-label" style="width: 60px">ERP编号</label>
27
-                            <div class="layui-input-inline" style="width: 150px">
26
+                            <label class="layui-form-label" style="width: 70px">ERP编号</label>
27
+                            <div class="layui-input-inline" style="width: 140px">
28 28
                                 <input type="text" id="erpbh" name="erpbh" autocomplete="off" class="layui-input">
29 29
                             </div>
30 30
                         </div>
31 31
                         <div class="layui-inline">
32
-                            <label class="layui-form-label" style="width: 30px">年份</label>
33
-                            <div class="layui-input-inline" style="width: 150px">
32
+                            <label class="layui-form-label" style="width: 70px">年份</label>
33
+                            <div class="layui-input-inline" style="width: 140px">
34 34
                                 <select name="nf" id="nf" lay-filter="status">
35 35
                                     <option value="">全部</option>
36 36
                                     <option th:each="item:${yearList}" th:text="${item.nf}" th:value="${item.nf}"></option>
@@ -38,8 +38,8 @@
38 38
                             </div>
39 39
                         </div>
40 40
                         <div class="layui-inline">
41
-                            <label class="layui-form-label" style="width: 60px">审批状态</label>
42
-                            <div class="layui-input-inline" style="width: 150px">
41
+                            <label class="layui-form-label" style="width: 70px">审批状态</label>
42
+                            <div class="layui-input-inline" style="width: 140px">
43 43
                                 <select name="spzt" id="spzt" lay-filter="status">
44 44
                                     <option value="">全部</option>
45 45
                                     <option th:each="item:${approveList}" th:text="${item.name}" th:value="${item.name}"></option>
@@ -47,8 +47,8 @@
47 47
                             </div>
48 48
                         </div>
49 49
                         <div class="layui-inline">
50
-                            <label class="layui-form-label" style="width: 60px">项目类型</label>
51
-                            <div class="layui-input-inline" style="width: 150px">
50
+                            <label class="layui-form-label" style="width: 70px">项目类型</label>
51
+                            <div class="layui-input-inline" style="width: 140px">
52 52
                                 <select name="xmlx" id="xmlx" lay-filter="status">
53 53
                                     <option value="">全部</option>
54 54
                                     <option th:each="item:${xmlxList}" th:text="${item.name}" th:value="${item.code}"></option>
@@ -57,15 +57,15 @@
57 57
                         </div>
58 58
 
59 59
                         <div class="layui-inline">
60
-                            <label class="layui-form-label" style="width: 60px">所属部门</label>
61
-                            <div class="layui-input-inline" style="width: 150px">
60
+                            <label class="layui-form-label" style="width: 70px">所属部门</label>
61
+                            <div class="layui-input-inline" style="width: 140px">
62 62
                                 <input type="text" id="ssbmmc" name="ssbmmc" autocomplete="off" class="layui-input">
63 63
                             </div>
64 64
                         </div>
65 65
 
66 66
                         <div class="layui-inline">
67
-                            <label class="layui-form-label" style="width: 60px">任务书</label>
68
-                            <div class="layui-input-inline" style="width: 300px">
67
+                            <label class="layui-form-label" style="width: 70px">任务书名称</label>
68
+                            <div class="layui-input-inline" style="width: 140px">
69 69
                                 <input type="text" id="rwsmc" name="rwsmc" autocomplete="off" class="layui-input">
70 70
                             </div>
71 71
                         </div>
@@ -118,6 +118,24 @@
118 118
                 </button>
119 119
             </div>
120 120
         </script>
121
+        <script>
122
+            // 当文档加载完成后执行以下操作
123
+            document.addEventListener('DOMContentLoaded', function() {
124
+                // 获取下拉框元素
125
+                var selectElement = document.getElementById('nf');
126
+                // 获取当前年份并转换为字符串
127
+                var currentYear = new Date().getFullYear().toString();
128
+
129
+                // 遍历下拉框选项
130
+                for (var i = 0; i < selectElement.options.length; i++) {
131
+                    // 如果选项的值与当前年份相匹配,则将该选项设为被选中状态并结束循环
132
+                    if (selectElement.options[i].value === currentYear) {
133
+                        selectElement.options[i].selected = true;
134
+                        break;
135
+                    }
136
+                }
137
+            });
138
+        </script>
121 139
 
122 140
         <input type="hidden" id="userId" name="userId" class="layui-input" th:value="${userId}">
123 141
         <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
@@ -137,10 +155,10 @@
137 155
         var form = layui.form
138 156
         table = layui.table;
139 157
         var userId = $("#userId").val();
140
-
158
+        var selectedYear = $('#nf').val();
141 159
         var currTable = table.render({
142 160
             elem: '#currentTableId',
143
-            url: AjaxUtil.ctx + 'prjAnnualbudget/list',
161
+            url: AjaxUtil.ctx + 'prjAnnualbudget/list/?nf='+selectedYear,
144 162
             method: 'post',
145 163
             toolbar: '#toolbarDemo',
146 164
             // defaultToolbar: ['filter', 'print'],
@@ -148,9 +166,9 @@
148 166
                 [
149 167
                     {type: "checkbox", fixed: 'left'},
150 168
                     {type: 'numbers', align: 'center'},
151
-                    {field: 'spzt', width: '13%', title: '审批状态'},
169
+                    {field: 'spzt', width: '7%', title: '审批状态'},
152 170
                     {field: 'xmmc', width: '20%', title: '项目名称'},
153
-                    // {field: 'mc', width: '20%', title: '名称'},
171
+                    {field: 'rwsmc', width: '20%', title: '任务书名称'},
154 172
                     {field: 'mc', width: '20%', title: '年度预算名称'},
155 173
                     {field: 'erpbh', width: '8%', title: 'ERP编号'},
156 174
                     {field: 'xmlxmc', width: '12%', title: '项目类型'},

+ 86 - 41
src/main/resources/templates/payapply/list.html

@@ -16,61 +16,86 @@
16 16
             <div id="search-div" style="margin: 5px 10px -10px 0px">
17 17
                 <form class="layui-form" action="" lay-filter="search-form">
18 18
                     <div class="layui-form-item">
19
+                        <div class="layui-inline">
20
+                            <label class="layui-form-label" style="width: 70px;">项目名称</label>
21
+                            <div class="layui-input-inline" style="width: 140px;">
22
+                                <input type="text" name="rwsmc" autocomplete="off" class="layui-input">
23
+                            </div>
24
+                        </div>
19 25
 
20
-                        <label class="layui-form-label" style="width: 60px">项目名称</label>
21
-                        <div class="layui-input-inline"  style="width: 250px">
22
-                            <input type="text" name="rwsmc" autocomplete="off" class="layui-input">
26
+                        <div class="layui-inline">
27
+                            <label class="layui-form-label" style="width: 70px;">ERP编号</label>
28
+                            <div class="layui-input-inline" style="width: 140px;">
29
+                                <input type="text" name="erpbh" autocomplete="off" class="layui-input">
30
+                            </div>
23 31
                         </div>
24
-                        <label class="layui-form-label" style="width: 60px">ERP编号</label>
25
-                        <div class="layui-input-inline"  style="width: 200px">
26
-                            <input type="text" name="erpbh" autocomplete="off" class="layui-input">
32
+
33
+                        <div class="layui-inline">
34
+                            <label class="layui-form-label" style="width: 90px;">编号</label>
35
+                            <div class="layui-input-inline" style="width: 140px;">
36
+                                <input type="text" name="bh" autocomplete="off" class="layui-input">
37
+                            </div>
27 38
                         </div>
28
-                        <label class="layui-form-label" style="width: 90px;left: 5px">费用申请编号</label>
29
-                        <div class="layui-input-inline"  style="width: 225px">
30
-                            <input type="text" name="bh" autocomplete="off" class="layui-input">
39
+
40
+                        <div class="layui-inline">
41
+                            <label class="layui-form-label" style="width: 70px;">年份</label>
42
+                            <div class="layui-input-inline" style="width: 140px;">
43
+                                <select name="nf" id="nf" lay-filter="status" class="layui-select">
44
+                                    <option value="">全部</option>
45
+                                    <!-- Assume 'yearList' is populated with options -->
46
+                                    <option th:each="item: ${yearList}" th:text="${item}" th:value="${item}"></option>
47
+                                </select>
48
+                            </div>
31 49
                         </div>
32
-                        <label class="layui-form-label" style="width: 60px">审批状态</label>
33
-                        <div class="layui-input-inline" style="width: 150px">
34
-                            <select name="spzt" lay-filter="status">
35
-                                <option value="">全部</option>
36
-                                <option th:each="item:${approveList}" th:text="${item.name}"
37
-                                        th:value="${item.name}"></option>
38
-                            </select>
50
+
51
+                        <div class="layui-inline">
52
+                            <label class="layui-form-label" style="width: 60px;">审批状态</label>
53
+                            <div class="layui-input-inline" style="width: 150px;">
54
+                                <select name="spzt" lay-filter="status" class="layui-select">
55
+                                    <option value="">全部</option>
56
+                                    <!-- Assume 'approveList' is populated with options -->
57
+                                    <option th:each="item: ${approveList}" th:text="${item.name}" th:value="${item.name}"></option>
58
+                                </select>
59
+                            </div>
39 60
                         </div>
40
-                        <tr>
41
-                        <div class="layui-inline" style="top: 10px;left: 0px">
42
-                            <label class="layui-form-label" style="width: 60px">费用申请</label>
43
-                            <div class="layui-input-inline"  style="width: 250px">
61
+
62
+                        <div class="layui-inline">
63
+                            <label class="layui-form-label" style="width: 70px;">费用申请</label>
64
+                            <div class="layui-input-inline" style="width: 140px;">
44 65
                                 <input type="text" name="fysqmc" autocomplete="off" class="layui-input">
45 66
                             </div>
46
-                        <label class="layui-form-label" style="width: 60px">创建人</label>
47
-                        <div class="layui-input-inline"  style="width: 200px">
48
-                            <input type="text" name="cjr" autocomplete="off" class="layui-input">
49 67
                         </div>
50 68
 
51
-
52
-
53
-                            <div class="layui-inline">
54
-                                <label class="layui-form-label" style="width: 90px">创建时间</label>
55
-                                <div class="layui-input-inline" style="width: 100px">
56
-                                    <input type="text" name="cjsj1" id="cjsj1" placeholder="开始日期" class="layui-input" readonly>
57
-                                </div>
58
-                                <div class="layui-form-mid">-</div>
59
-                                <div class="layui-input-inline" style="width: 100px">
60
-                                    <input type="text" name="cjsj2" id="cjsj2" placeholder="结束日期" class="layui-input" readonly>
61
-                                </div>
69
+                        <div class="layui-inline">
70
+                            <label class="layui-form-label" style="width: 70px;">创建人</label>
71
+                            <div class="layui-input-inline" style="width: 140px;">
72
+                                <input type="text" name="cjr" autocomplete="off" class="layui-input">
62 73
                             </div>
74
+                        </div>
63 75
 
64
-
65
-                        <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
66
-                        <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-reset-btn"><i class="layui-icon layui-icon-refresh"></i> 重 置 </button>
76
+                        <div class="layui-inline" style="margin-left: 20px">
77
+                            <label class="layui-form-label" style="width: 70px;">创建时间</label>
78
+                            <div class="layui-input-inline" style="width: 140px;">
79
+                                <input type="text" name="cjsj1" id="cjsj1" placeholder="开始日期" class="layui-input" readonly>
80
+                            </div>
81
+                            <div class="layui-form-mid">-</div>
82
+                            <div class="layui-input-inline" style="width: 140px;">
83
+                                <input type="text" name="cjsj2" id="cjsj2" placeholder="结束日期" class="layui-input" readonly>
84
+                            </div>
67 85
                         </div>
68
-                        </tr>
86
+
87
+                        <div class="layui-inline">
88
+                            <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn"><i class="layui-icon">&#xe615;</i> 搜索</button>
89
+                            <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-reset-btn"><i class="layui-icon layui-icon-refresh"></i> 重置</button>
69 90
                         </div>
91
+                    </div>
92
+
70 93
                 </form>
71 94
             </div>
72 95
         </fieldset>
73 96
 
97
+
98
+
74 99
         <script type="text/html" id="toolbarDemo">
75 100
             <div class="layui-btn-container">
76 101
 
@@ -108,6 +133,24 @@
108 133
         <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
109 134
     </div>
110 135
 </div>
136
+<script>
137
+    // 当文档加载完成后执行以下操作
138
+    document.addEventListener('DOMContentLoaded', function() {
139
+        // 获取下拉框元素
140
+        var selectElement = document.getElementById('nf');
141
+        // 获取当前年份并转换为字符串
142
+        var currentYear = new Date().getFullYear().toString();
143
+
144
+        // 遍历下拉框选项
145
+        for (var i = 0; i < selectElement.options.length; i++) {
146
+            // 如果选项的值与当前年份相匹配,则将该选项设为被选中状态并结束循环
147
+            if (selectElement.options[i].value === currentYear) {
148
+                selectElement.options[i].selected = true;
149
+                break;
150
+            }
151
+        }
152
+    });
153
+</script>
111 154
 <script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
112 155
 <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
113 156
 <script th:src="@{/lib/coco-message/coco-message.js}" charset="utf-8"></script>
@@ -123,7 +166,7 @@
123 166
             laydate = layui.laydate,
124 167
             table = layui.table;
125 168
         var userId = $("#userId").val();
126
-
169
+        var selectYear = $("#nf").val();
127 170
 
128 171
 
129 172
         //日期
@@ -136,7 +179,7 @@
136 179
 
137 180
         var currTable = table.render({
138 181
             elem: '#currentTableId',
139
-            url: AjaxUtil.ctx + 'staPayapproval/list',
182
+            url: AjaxUtil.ctx + 'staPayapproval/list/?nf='+ selectYear,
140 183
             method: 'post',
141 184
             toolbar: '#toolbarDemo',
142 185
             // defaultToolbar: ['filter', 'print'],
@@ -145,8 +188,10 @@
145 188
                     {type: "checkbox", fixed: 'left'},
146 189
                     {type: 'numbers', fixed: 'left'},
147 190
                     {field: 'spzt', width: '11%',title: '审批状态', fixed: 'left'},
148
-                    {field: 'rwsmc', width: '11%', title: '项目名称'},
191
+                    {field: 'rwsmc', width: '11%', title: '项目名称', fixed: 'left'},
149 192
                     {field: 'bh', width: '11%', title: '费用申请编号'},
193
+                    {field: 'erpbh', width: '10%', title: 'ERP编号'},
194
+                    {field: 'nf',width: '7%',title: '年份'},
150 195
                     {field: 'htmc', width: '11%', title: '合同'},
151 196
                     {field: 'fysqmc', width: '15%',title: '费用申请'},
152 197
                     {field: 'bcfkje', width: '10%', title: '本次付款金额(万元)'},

+ 62 - 26
src/main/resources/templates/reimburse/list.html

@@ -16,40 +16,73 @@
16 16
             <div id="search-div" style="margin: 5px 10px -10px 0px">
17 17
                 <form class="layui-form" action="" lay-filter="search-form">
18 18
                     <div class="layui-form-item">
19
-                        <label class="layui-form-label" style="width: 60px">报账名称</label>
20
-                        <div class="layui-input-inline"  style="width: 200px">
21
-                            <input type="text" name="mc" autocomplete="off" class="layui-input">
19
+                        <div class="layui-inline">
20
+                            <label class="layui-form-label" style="width: 70px;">项目名称</label>
21
+                            <div class="layui-input-inline" style="width: 140px;">
22
+                                <input type="text" name="xmmc" autocomplete="off" class="layui-input">
23
+                            </div>
22 24
                         </div>
23
-                        <label class="layui-form-label" style="width: 90px">费用申请编号</label>
24
-                        <div class="layui-input-inline"  style="width: 200px">
25
-                            <input type="text" name="fysqbh" autocomplete="off" class="layui-input">
25
+
26
+                        <div class="layui-inline">
27
+                            <label class="layui-form-label" style="width: 70px;">ERP编号</label>
28
+                            <div class="layui-input-inline" style="width: 140px;">
29
+                                <input type="text" name="erpbh" autocomplete="off" class="layui-input">
30
+                            </div>
26 31
                         </div>
27
-                        <label class="layui-form-label" style="width: 30px">年份</label>
28
-                        <div class="layui-input-inline" style="width: 150px">
29
-                            <select name="nf" id="nf" lay-filter="status">
30
-                                <option value="">全部</option>
31
-                                <option th:each="item:${yearList}" th:text="${item}" th:value="${item}"></option>
32
-                            </select>
32
+
33
+                        <div class="layui-inline">
34
+                            <label class="layui-form-label" style="width: 100px;">费用申请编号</label>
35
+                            <div class="layui-input-inline" style="width: 140px;">
36
+                                <input type="text" name="fysqbh" autocomplete="off" class="layui-input">
37
+                            </div>
33 38
                         </div>
34
-                        <label class="layui-form-label" style="width: 60px">审批状态</label>
35
-                        <div class="layui-input-inline" style="width: 150px">
36
-                            <select name="spzt" lay-filter="status">
37
-                                <option value="">全部</option>
38
-                                <option th:each="item:${approveList}" th:text="${item.name}"
39
-                                        th:value="${item.name}"></option>
40
-                            </select>
39
+
40
+                        <div class="layui-inline">
41
+                            <label class="layui-form-label" style="width: 70px;">年份</label>
42
+                            <div class="layui-input-inline" style="width: 140px;">
43
+                                <select name="nf" id="nf" lay-filter="status" class="layui-select">
44
+                                    <option value="">全部</option>
45
+                                    <!-- Assume 'yearList' is populated with options -->
46
+                                    <option th:each="item: ${yearList}" th:text="${item}" th:value="${item}"></option>
47
+                                </select>
48
+                            </div>
41 49
                         </div>
42 50
 
43
-                        <label class="layui-form-label" style="width: 60px">报账人</label>
44
-                        <div class="layui-input-inline"  style="width: 150px">
45
-                            <input type="text" name="bzr" autocomplete="off" class="layui-input">
51
+                        <div class="layui-inline">
52
+                            <label class="layui-form-label" style="width: 70px;">审批状态</label>
53
+                            <div class="layui-input-inline" style="width: 140px;">
54
+                                <select name="spzt" lay-filter="status" class="layui-select">
55
+                                    <option value="">全部</option>
56
+                                    <!-- Assume 'approveList' is populated with options -->
57
+                                    <option th:each="item: ${approveList}" th:text="${item.name}" th:value="${item.name}"></option>
58
+                                </select>
59
+                            </div>
46 60
                         </div>
47 61
 
62
+                        <div class="layui-inline">
63
+                            <label class="layui-form-label" style="width: 70px;">报账名称</label>
64
+                            <div class="layui-input-inline" style="width: 140px;">
65
+                                <input type="text" name="mc" autocomplete="off" class="layui-input">
66
+                            </div>
67
+                        </div>
48 68
 
69
+                        <div class="layui-inline">
70
+                            <label class="layui-form-label" style="width: 70px;">报账人</label>
71
+                            <div class="layui-input-inline" style="width: 140px;">
72
+                                <input type="text" name="bzr" autocomplete="off" class="layui-input">
73
+                            </div>
74
+                        </div>
49 75
 
50
-                        <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
51
-                        <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-reset-btn"><i class="layui-icon layui-icon-refresh"></i> 重 置 </button>
76
+                        <div class="layui-inline">
77
+                            <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn">
78
+                                <i class="layui-icon">&#xe615;</i> 搜索
79
+                            </button>
80
+                            <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-reset-btn">
81
+                                <i class="layui-icon layui-icon-refresh"></i> 重置
82
+                            </button>
83
+                        </div>
52 84
                     </div>
85
+
53 86
                 </form>
54 87
             </div>
55 88
         </fieldset>
@@ -121,9 +154,12 @@
121 154
                 [
122 155
                     {type: "radio", fixed: 'left'},
123 156
                     {type: 'numbers', fixed: 'left',title: '序号'},
157
+                    {field: 'spzt', width: '10%',title: '审批状态',fixed: 'left'},
158
+                    {field: 'xmmc', width: '20%', title: '项目名称', fixed: 'left'},
124 159
                     {field: 'mc', width: '20%', title: '报账名称', fixed: 'left'},
125
-                    {field: 'spzt', width: '10%',title: '审批状态'},
126 160
                     {field: 'fysqbh', width: '10%',title: '费用申请编号'},
161
+                    {field: 'nf',title: '年份',width: '10%'},
162
+                    {field: 'erpbh', width: '10%',title: 'ERP编号'},
127 163
                     {field: 'bzje', width: '8%', title: '报账金额(元)'},
128 164
                     {field: 'bhsje', width: '8%', title: '不含税金额(元)'},
129 165
                     {field: 'sf', width: '6%', title: '税费(元)'},
@@ -131,7 +167,7 @@
131 167
                     {field: 'cjsj', width: '8%', title: '创建时间', align: 'center'},
132 168
                     {field: 'fysqmc', title: '费用申请'},
133 169
                     {field: 'sfbyj', title: '是否备用金',width: '6%'},
134
-                    {field: 'nf',title: '年份',width: '10%'}
170
+
135 171
                 ]
136 172
             ],
137 173
             autoSort: false,

+ 62 - 35
src/main/resources/templates/reimburse/mylist.html

@@ -16,47 +16,73 @@
16 16
             <div id="search-div" style="margin: 5px 10px -10px 0px">
17 17
                 <form class="layui-form" action="" lay-filter="search-form">
18 18
                     <div class="layui-form-item">
19
-                        <label class="layui-form-label" style="width: 60px">项目名称</label>
20
-                        <div class="layui-input-inline"  style="width: 200px">
21
-                            <input type="text" name="xmmc" autocomplete="off" class="layui-input">
22
-                        </div>
23
-                        <label class="layui-form-label" style="width: 60px">审批状态</label>
24
-                        <div class="layui-input-inline" style="width: 100px">
25
-                            <select name="spzt" lay-filter="status">
26
-                                <option value="">全部</option>
27
-                                <option th:each="item:${approveList}" th:text="${item.name}"
28
-                                        th:value="${item.name}"></option>
29
-                            </select>
19
+                        <div class="layui-inline">
20
+                            <label class="layui-form-label" style="width: 70px;">项目名称</label>
21
+                            <div class="layui-input-inline" style="width: 140px;">
22
+                                <input type="text" name="xmmc" autocomplete="off" class="layui-input">
23
+                            </div>
30 24
                         </div>
31
-                        <label class="layui-form-label" style="width: 60px">申请编号</label>
32
-                        <div class="layui-input-inline"  style="width: 150px">
33
-                            <input type="text" name="fysqbh" autocomplete="off" class="layui-input">
25
+
26
+                        <div class="layui-inline">
27
+                            <label class="layui-form-label" style="width: 70px;">ERP编号</label>
28
+                            <div class="layui-input-inline" style="width: 140px;">
29
+                                <input type="text" name="erpbh" autocomplete="off" class="layui-input">
30
+                            </div>
34 31
                         </div>
35
-                        <label class="layui-form-label" style="width: 50px">报账人</label>
36
-                        <div class="layui-input-inline"  style="width: 100px">
37
-                            <input type="text" name="bzr" autocomplete="off" class="layui-input">
32
+
33
+                        <div class="layui-inline">
34
+                            <label class="layui-form-label" style="width: 70px;">编号</label>
35
+                            <div class="layui-input-inline" style="width: 140px;">
36
+                                <input type="text" name="fysqbh" autocomplete="off" class="layui-input">
37
+                            </div>
38 38
                         </div>
39
-                        <label class="layui-form-label" style="width: 60px">报账名称</label>
40
-                        <div class="layui-input-inline"  style="width: 200px">
41
-                            <input type="text" name="mc" autocomplete="off" class="layui-input">
39
+
40
+                        <div class="layui-inline">
41
+                            <label class="layui-form-label" style="width: 70px;">年份</label>
42
+                            <div class="layui-input-inline" style="width: 140px;">
43
+                                <select name="nf" id="nf" lay-filter="status" class="layui-select">
44
+                                    <option value="">全部</option>
45
+                                    <!-- Assume 'yearList' is populated with options -->
46
+                                    <option th:each="item: ${yearList}" th:text="${item}" th:value="${item}"></option>
47
+                                </select>
48
+                            </div>
42 49
                         </div>
50
+
43 51
                         <div class="layui-inline">
44
-                            <label class="layui-form-label" style="width: 30px">年份</label>
45
-                            <div class="layui-input-inline" style="width: 150px">
46
-                                <select name="nf" id="nf" lay-filter="status">
52
+                            <label class="layui-form-label" style="width: 70px;">审批状态</label>
53
+                            <div class="layui-input-inline" style="width: 140px;">
54
+                                <select name="spzt" lay-filter="status" class="layui-select">
47 55
                                     <option value="">全部</option>
48
-                                    <option th:each="item:${yearList}" th:text="${item}"
49
-                                            th:value="${item}"></option>
56
+                                    <!-- Assume 'approveList' is populated with options -->
57
+                                    <option th:each="item: ${approveList}" th:text="${item.name}" th:value="${item.name}"></option>
50 58
                                 </select>
51 59
                             </div>
52 60
                         </div>
53
-                        <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn"><i
54
-                                class="layui-icon"></i> 搜 索
55
-                        </button>
56
-                        <button type="submit" class="layui-btn layui-btn-primary" lay-submit
57
-                                lay-filter="data-reset-btn"><i class="layui-icon layui-icon-refresh"></i> 重 置
58
-                        </button>
61
+
62
+                        <div class="layui-inline">
63
+                            <label class="layui-form-label" style="width: 70px;">报账名称</label>
64
+                            <div class="layui-input-inline" style="width: 140px;">
65
+                                <input type="text" name="mc" autocomplete="off" class="layui-input">
66
+                            </div>
67
+                        </div>
68
+
69
+                        <div class="layui-inline">
70
+                            <label class="layui-form-label" style="width: 70px;">报账人</label>
71
+                            <div class="layui-input-inline" style="width: 140px;">
72
+                                <input type="text" name="bzr" autocomplete="off" class="layui-input">
73
+                            </div>
74
+                        </div>
75
+
76
+                        <div class="layui-inline">
77
+                            <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn">
78
+                                <i class="layui-icon">&#xe6b2;</i> 搜索
79
+                            </button>
80
+                            <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-reset-btn">
81
+                                <i class="layui-icon layui-icon-refresh"></i> 重置
82
+                            </button>
83
+                        </div>
59 84
                     </div>
85
+
60 86
                 </form>
61 87
             </div>
62 88
         </fieldset>
@@ -126,16 +152,17 @@
126 152
                 [
127 153
                     {type: "checkbox", fixed: 'left'},
128 154
                     {type: 'numbers', fixed: 'left',title: '序号'},
129
-                    {field: 'mc', width: '15%', title: '报账名称', fixed: 'left'},
155
+                    {field: 'spzt', width: '10%',title: '审批状态',fixed: 'left'},
130 156
                     {field: 'xmmc',width: '15%',title: '项目名称',fixed: 'left'},
131
-                    {field: 'spzt', width: '10%',title: '审批状态'},
132
-                    {field: 'fysqbh', width: '10%',title: '费用申请编号'},
157
+                    {field: 'mc', width: '15%', title: '报账名称'},
158
+                    {field: 'erpbh',width: '10%',title: 'ERP编号'},
159
+                    {field: 'fysqbh', width: '10%',title: '编号'},
133 160
                     {field: 'bzje', width: '8%', title: '报账金额(元)'},
134 161
                     {field: 'bhsje', width: '8%', title: '不含税金额(元)'},
135 162
                     {field: 'sf', width: '6%', title: '税费(元)'},
136 163
                     {field: 'bzrxm', width: '7%', title: '报账人'},
137 164
                     {field: 'cjsj', width: '8%', title: '创建时间', align: 'center'},
138
-                    {field: 'fysqmc', title: '费用申请'}
165
+                    {field: 'fysqmc', title: '费用申请',width: '18%'}
139 166
                 ]
140 167
             ],
141 168
             autoSort: false,

+ 100 - 66
src/main/resources/templates/stabudgetapproval/list_apply.html

@@ -7,6 +7,29 @@
7 7
     <link rel="stylesheet" th:href="@{/lib/layui/css/layui.css}" media="all">
8 8
     <link rel="stylesheet" th:href="@{/css/public.css}" media="all">
9 9
     <link rel="stylesheet" th:href="@{/lib/font-awesome-4.7.0/css/font-awesome.min.css}" media="all">
10
+<style>
11
+    .layui-form-item {
12
+        margin-bottom: 10px; /* 调整每个表单项之间的间距 */
13
+    }
14
+
15
+    .layui-inline {
16
+        display: inline-block;
17
+        margin-bottom: 10px; /* 调整每行表单项之间的间距 */
18
+    }
19
+
20
+    .layui-form-label {
21
+        width: 70px;
22
+        text-align: right; /* 标签右对齐 */
23
+        margin-right: 10px; /* 调整标签和输入框之间的距离 */
24
+    }
25
+
26
+    .layui-input-inline {
27
+        width: 140px;
28
+        margin-right: 10px; /* 调整输入框之间的距离 */
29
+    }
30
+</style>
31
+
32
+
10 33
 </head>
11 34
 <body>
12 35
 <div class="layuimini-container">
@@ -17,29 +40,36 @@
17 40
                 <form class="layui-form" action="" lay-filter="search-form">
18 41
                     <div class="layui-form-item">
19 42
                         <div class="layui-inline">
20
-                            <label class="layui-form-label" style="width: 60px">申请名称</label>
21
-                            <div class="layui-input-inline" style="width: 450px">
22
-                                <input type="text" id="sqmc" name="sqmc" autocomplete="off" class="layui-input">
23
-
43
+                            <label class="layui-form-label" style="width: 70px;">项目名称</label>
44
+                            <div class="layui-input-inline" style="width: 140px;">
45
+                                <input type="text" id="xmmc" name="xmmc" autocomplete="off" class="layui-input">
24 46
                             </div>
25 47
                         </div>
26
-                        <div class="layui-inline">
27
-                            <label class="layui-form-label" style="width: 60px; margin-left: -10px">费用类别</label>
28
-                            <div class="layui-input-inline" style="width: 150px">
29
-                                <input type="text" id="fylb" name="fylb" autocomplete="off" class="layui-input">
30
-
48
+                        <div class="layui-inline" style="margin-left: -10px;">
49
+                            <label class="layui-form-label" style="width: 70px;">ERP编号</label>
50
+                            <div class="layui-input-inline" style="width: 140px;">
51
+                                <input type="text" id="erpbh" name="erpbh" autocomplete="off" class="layui-input">
31 52
                             </div>
32 53
                         </div>
33 54
                         <div class="layui-inline">
34
-                            <label class="layui-form-label" style="width: 60px;margin-left: -10px">申请人</label>
35
-                            <div class="layui-input-inline" style="width: 150px">
36
-                                <input type="text" id="sqr" name="sqr" autocomplete="off" class="layui-input">
37
-
55
+                            <label class="layui-form-label" style="width: 70px;">编号</label>
56
+                            <div class="layui-input-inline" style="width: 140px;">
57
+                                <input type="text" id="bh" name="bh" autocomplete="off" class="layui-input">
58
+                            </div>
59
+                        </div>
60
+                        <div class="layui-inline" style="margin-left: -10px;">
61
+                            <label class="layui-form-label" style="width: 70px;">年份</label>
62
+                            <div class="layui-input-inline" style="width: 140px;">
63
+                                <select name="nf" id="nf" lay-filter="status">
64
+                                    <option value="">全部</option>
65
+                                    <option th:each="item:${yearList}" th:text="${item.nf}"
66
+                                            th:value="${item.nf}"></option>
67
+                                </select>
38 68
                             </div>
39 69
                         </div>
40 70
                         <div class="layui-inline">
41
-                            <label class="layui-form-label" style="width: 60px; margin-left: -10px">审批状态</label>
42
-                            <div class="layui-input-inline" style="width: 180px">
71
+                            <label class="layui-form-label" style="width: 70px; margin-left: -10px;">审批状态</label>
72
+                            <div class="layui-input-inline" style="width: 140px;">
43 73
                                 <select name="spzt" id="spzt" lay-filter="status">
44 74
                                     <option value="">全部</option>
45 75
                                     <option th:each="item:${approveList}" th:text="${item.name}"
@@ -47,73 +77,58 @@
47 77
                                 </select>
48 78
                             </div>
49 79
                         </div>
80
+                    </div>
81
+
82
+                    <div class="layui-form-item">
50 83
                         <div class="layui-inline">
51
-                            <label class="layui-form-label" style="width: 60px;">编号</label>
52
-                            <div class="layui-input-inline" style="width: 150px">
53
-                                <input type="text" id="bh" name="bh" autocomplete="off" class="layui-input">
84
+                            <label class="layui-form-label" style="width: 70px;">所属部门</label>
85
+                            <div class="layui-input-inline" style="width: 140px;">
86
+                                <input type="text" id="ssbmmc" name="ssbmmc" autocomplete="off" class="layui-input">
54 87
                             </div>
55 88
                         </div>
56
-                        <div class="layui-inline">
57
-                            <label class="layui-form-label" style="width: 95px;">电科院负责人</label>
58
-                            <div class="layui-input-inline" style="width: 150px">
59
-                                <input type="hidden" id="dkyfzr" name="dkyfzr" class="layui-input">
60
-                                <input type="text" id="dkyfzrxm" name="dkyfzrxm" placeholder="可多选" autocomplete="off"
61
-                                       class="layui-input" readonly>
89
+                        <div class="layui-inline" style="margin-left: -10px;">
90
+                            <label class="layui-form-label" style="width: 70px;">项目类型</label>
91
+                            <div class="layui-input-inline" style="width: 140px;">
92
+                                <select name="xmlx" id="xmlx" lay-filter="status">
93
+                                    <option value="">全部</option>
94
+                                    <option th:each="item:${xmlxList}" th:text="${item.name}"
95
+                                            th:value="${item.code}"></option>
96
+                                </select>
62 97
                             </div>
63 98
                         </div>
64
-                        <br>
99
+
65 100
                         <div class="layui-inline">
66
-                            <label class="layui-form-label" style="width: 60px">所属部门</label>
67
-                            <div class="layui-input-inline" style="width: 150px">
68
-                                <input type="text" id="ssbmmc" name="ssbmmc" autocomplete="off" class="layui-input">
101
+                            <label class="layui-form-label" style="width: 70px;">申请名称</label>
102
+                            <div class="layui-input-inline" style="width: 140px;">
103
+                                <input type="text" id="sqmc" name="sqmc" autocomplete="off" class="layui-input">
69 104
                             </div>
70 105
                         </div>
71 106
                         <div class="layui-inline">
72
-                            <label class="layui-form-label" style="width: 95px;">ERP编号</label>
73
-                            <div class="layui-input-inline" style="width: 150px">
74
-                                <input type="text" id="erpbh" name="erpbh" autocomplete="off" class="layui-input">
107
+                            <label class="layui-form-label" style="width: 70px; margin-left: -10px;">费用类别</label>
108
+                            <div class="layui-input-inline" style="width: 140px;">
109
+                                <input type="text" id="fylb" name="fylb" autocomplete="off" class="layui-input">
75 110
                             </div>
76 111
                         </div>
77 112
                         <div class="layui-inline">
78
-                            <label class="layui-form-label" style="width: 60px; margin-left: -10px">项目类型</label>
79
-                            <div class="layui-input-inline" style="width: 150px">
80
-                                <select name="xmlx" id="xmlx" lay-filter="status">
81
-                                    <option value="">全部</option>
82
-                                    <option th:each="item:${xmlxList}" th:text="${item.name}"
83
-                                            th:value="${item.code}"></option>
84
-                                </select>
113
+                            <label class="layui-form-label" style="width: 70px; margin-left: -10px;">申请人</label>
114
+                            <div class="layui-input-inline" style="width: 140px;">
115
+                                <input type="text" id="sqr" name="sqr" autocomplete="off" class="layui-input">
85 116
                             </div>
86 117
                         </div>
87
-                        <div class="layui-inline">
88
-                            <label class="layui-form-label" style="width: 60px; margin-left: -10px">年份</label>
89
-                            <div class="layui-input-inline" style="width: 150px">
90
-                                <select name="nf" id="nf" lay-filter="status">
91
-                                    <option value="">全部</option>
92
-                                    <option th:each="item:${yearList}" th:text="${item.nf}"
93
-                                            th:value="${item.nf}"></option>
94
-                                </select>
118
+                        <div class="layui-inline" style="margin-left: -20px;margin-top: 10px">
119
+                            <label class="layui-form-label" style="width: 90px;">电科院负责人</label>
120
+                            <div class="layui-input-inline" style="width: 140px;">
121
+                                <input type="hidden" id="dkyfzr" name="dkyfzr" class="layui-input">
122
+                                <input type="text" id="dkyfzrxm" name="dkyfzrxm" placeholder="可多选" autocomplete="off" class="layui-input" readonly>
95 123
                             </div>
96 124
                         </div>
97
-                        <!--                        <div class="layui-inline">-->
98
-                        <!--                            <label class="layui-form-label" style="width: 60px; margin-left: -12px">是否报账</label>-->
99
-                        <!--                            <div class="layui-input-inline" style="width: 100px">-->
100
-                        <!--                                <select name="sfbz" id="sfbz" lay-filter="status">-->
101
-                        <!--                                    <option value="">全部</option>-->
102
-                        <!--                                    <option value="1">是</option>-->
103
-                        <!--                                    <option value="0">否</option>-->
104
-                        <!--                                </select>-->
105
-                        <!--                            </div>-->
106
-                        <!--                        </div>-->
107
-
108 125
                         <div class="layui-inline">
109
-                            <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn"><i
110
-                                    class="layui-icon"></i> 搜 索
111
-                            </button>
112
-                            <button type="submit" class="layui-btn layui-btn-primary" lay-submit
113
-                                    lay-filter="data-reset-btn"><i class="layui-icon layui-icon-refresh"></i> 重 置
114
-                            </button>
126
+                            <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn"><i class="layui-icon">&#xe615;</i> 搜 索</button>
127
+                            <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-reset-btn"><i class="layui-icon layui-icon-refresh"></i> 重 置</button>
115 128
                         </div>
116 129
                     </div>
130
+
131
+
117 132
                 </form>
118 133
             </div>
119 134
         </fieldset>
@@ -157,11 +172,29 @@
157 172
                 </button>
158 173
             </div>
159 174
         </script>
160
-
161 175
         <input type="hidden" id="userId" name="userId" class="layui-input" th:value="${userId}">
162 176
         <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
163 177
     </div>
164 178
 </div>
179
+<script>
180
+    // 当文档加载完成后执行以下操作
181
+    document.addEventListener('DOMContentLoaded', function() {
182
+        // 获取下拉框元素
183
+        var selectElement = document.getElementById('nf');
184
+        // 获取当前年份并转换为字符串
185
+        var currentYear = new Date().getFullYear().toString();
186
+
187
+        // 遍历下拉框选项
188
+        for (var i = 0; i < selectElement.options.length; i++) {
189
+            // 如果选项的值与当前年份相匹配,则将该选项设为被选中状态并结束循环
190
+            if (selectElement.options[i].value === currentYear) {
191
+                selectElement.options[i].selected = true;
192
+                break;
193
+            }
194
+        }
195
+    });
196
+</script>
197
+
165 198
 <script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
166 199
 <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
167 200
 <script th:src="@{/lib/coco-message/coco-message.js}" charset="utf-8"></script>
@@ -206,10 +239,10 @@
206 239
                 $("#dkyfzr").val(NEWJSON1.join(","));
207 240
             }
208 241
         });
209
-
242
+        var selectedYear = $('#nf').val();
210 243
         var currTable = table.render({
211 244
             elem: '#currentTableId',
212
-            url: AjaxUtil.ctx + 'staBudgetapproval/list_apply',
245
+            url: AjaxUtil.ctx + 'staBudgetapproval/list_apply/?nf='+selectedYear,
213 246
             method: 'post',
214 247
             toolbar: '#toolbarDemo',
215 248
             // defaultToolbar: ['filter', 'print'],
@@ -219,6 +252,7 @@
219 252
                     {type: 'numbers', align: 'center', fixed: 'left'},
220 253
                     {field: 'spzt', width: '10%', title: '审批状态', sort: true},
221 254
                     {field: 'bh', width: '8%', title: '编号'},
255
+                    {field: 'xmmc', width: '25%', title: '项目名称'},
222 256
                     {field: 'sqmc', width: '25%', title: '申请名称'},
223 257
                     {field: 'erpbh', width: '10%', title: 'ERP编号'},
224 258
                     {field: 'fylbmc', width: '8%', title: '费用类别'},

+ 23 - 19
src/main/resources/templates/stabudgetapproval/list_imprest.html

@@ -17,36 +17,26 @@
17 17
                 <form class="layui-form" action="" lay-filter="search-form">
18 18
                     <div class="layui-form-item">
19 19
                         <div class="layui-inline">
20
-                            <label class="layui-form-label" style="width: 60px">项目名称</label>
21
-                            <div class="layui-input-inline" style="width: 300px">
20
+                            <label class="layui-form-label" style="width: 70px">项目名称</label>
21
+                            <div class="layui-input-inline" style="width: 140px">
22 22
                                 <input type="text" id="xmmc" name="xmmc" autocomplete="off" class="layui-input">
23 23
                             </div>
24 24
                         </div>
25 25
                         <div class="layui-inline">
26
-                            <label class="layui-form-label" style="width: 60px; margin-left: -10px">审批状态</label>
27
-                            <div class="layui-input-inline" style="width: 180px">
28
-                                <select name="spzt" id="spzt" lay-filter="status">
29
-                                    <option value="">全部</option>
30
-                                    <option th:each="item:${approveList}" th:text="${item.name}"
31
-                                            th:value="${item.name}"></option>
32
-                                </select>
33
-                            </div>
34
-                        </div>
35
-                        <div class="layui-inline">
36
-                            <label class="layui-form-label" style="width: 60px; margin-left: -10px">ERP编号</label>
37
-                            <div class="layui-input-inline" style="width: 150px">
26
+                            <label class="layui-form-label" style="width: 70px; margin-left: -10px">ERP编号</label>
27
+                            <div class="layui-input-inline" style="width: 140px">
38 28
                                 <input type="text" id="erpbh" name="erpbh" autocomplete="off" class="layui-input">
39 29
                             </div>
40 30
                         </div>
41 31
                         <div class="layui-inline">
42
-                            <label class="layui-form-label" style="width: 30px; margin-left: -10px">编号</label>
43
-                            <div class="layui-input-inline" style="width: 150px">
32
+                            <label class="layui-form-label" style="width: 70px; margin-left: -10px">编号</label>
33
+                            <div class="layui-input-inline" style="width: 140px">
44 34
                                 <input type="text" id="bh" name="bh" autocomplete="off" class="layui-input">
45 35
                             </div>
46 36
                         </div>
47 37
                         <div class="layui-inline">
48
-                            <label class="layui-form-label" style="width: 30px; margin-left: -10px">年份</label>
49
-                            <div class="layui-input-inline" style="width: 100px">
38
+                            <label class="layui-form-label" style="width: 70px; margin-left: -10px">年份</label>
39
+                            <div class="layui-input-inline" style="width: 140px">
50 40
                                 <select name="nf" id="nf" lay-filter="status">
51 41
                                     <option value="">全部</option>
52 42
                                     <option th:each="item:${yearList}" th:text="${item.nf}"
@@ -54,6 +44,19 @@
54 44
                                 </select>
55 45
                             </div>
56 46
                         </div>
47
+                        <div class="layui-inline">
48
+                            <label class="layui-form-label" style="width: 70px; margin-left: -10px">审批状态</label>
49
+                            <div class="layui-input-inline" style="width: 140px">
50
+                                <select name="spzt" id="spzt" lay-filter="status">
51
+                                    <option value="">全部</option>
52
+                                    <option th:each="item:${approveList}" th:text="${item.name}"
53
+                                            th:value="${item.name}"></option>
54
+                                </select>
55
+                            </div>
56
+                        </div>
57
+
58
+
59
+
57 60
 
58 61
                         <div class="layui-inline" style="margin-left: 0px">
59 62
                             <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn"><i
@@ -144,13 +147,14 @@
144 147
                     {type: 'numbers', align: 'center', fixed: 'left'},
145 148
                     {field: 'spzt', width: '10%', title: '审批状态', sort: true},
146 149
                     {field: 'bh', width: '9%', title: '编号'},
150
+                    {field: 'xmmc', width: '20%', title: '项目名称'},
147 151
                     {field: 'sqmc', width: '25%', title: '申请名称'},
148 152
                     {field: 'nf', width: '5%', title: '年份'},
149 153
                     {field: 'sqje', width: '7%', title: '申请金额(元)'},
150 154
                     {field: 'bzje', width: '7%', title: '报账金额(元)'},
151 155
                     // {field: 'bhsje', width: '9%', title: '不含税金额(元)'},
152 156
                     {field: 'erpbh', width: '9%', title: 'ERP编号'},
153
-                    {field: 'xmmc', width: '20%', title: '项目名称'},
157
+
154 158
                     {field: 'fylbmc', width: '7%', title: '费用类别'},
155 159
                     {field: 'sqrxm', width: '8%', title: '申请人'},
156 160
                     {field: 'sqsj', width: '8%', title: '申请时间', align: 'center'}

+ 28 - 9
src/main/resources/templates/stafeemanage/list_allapply.html

@@ -90,19 +90,19 @@
90 90
 
91 91
                         <br>
92 92
                         <div class="layui-inline">
93
-                            <label class="layui-form-label required" style="width: 60px">所属部门</label>
94
-                            <div class="layui-input-block" style="width: 200px;left:-20px">
93
+                            <label class="layui-form-label" style="width: 60px">所属部门</label>
94
+                            <div class="layui-input-inline" style="width: 200px;">
95 95
                                 <input type="text" id="ssbmmc" name="ssbmmc">
96 96
                             </div>
97 97
                         </div>
98 98
                         <div class="layui-inline" style="left: -10px">
99
-                            <label class="layui-form-label" style="width: 60px">申请时间</label>
100
-                            <div class="layui-input-inline" style="width: 100px">
99
+                            <label class="layui-form-label" style="width: 70px">申请时间</label>
100
+                            <div class="layui-input-inline" style="width: 140px">
101 101
                                 <input type="text" name="sqsj1" id="sqsj1" placeholder="开始时间" class="layui-input"
102 102
                                        readonly>
103 103
                             </div>
104 104
                             <div class="layui-form-mid">-</div>
105
-                            <div class="layui-input-inline" style="width: 100px">
105
+                            <div class="layui-input-inline" style="width: 140px">
106 106
                                 <input type="text" name="sqsj2" id="sqsj2" placeholder="终止时间" class="layui-input"
107 107
                                        readonly>
108 108
                             </div>
@@ -205,6 +205,24 @@
205 205
         <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
206 206
     </div>
207 207
 </div>
208
+<script>
209
+    // 当文档加载完成后执行以下操作
210
+    document.addEventListener('DOMContentLoaded', function() {
211
+        // 获取下拉框元素
212
+        var selectElement = document.getElementById('nf');
213
+        // 获取当前年份并转换为字符串
214
+        var currentYear = new Date().getFullYear().toString();
215
+
216
+        // 遍历下拉框选项
217
+        for (var i = 0; i < selectElement.options.length; i++) {
218
+            // 如果选项的值与当前年份相匹配,则将该选项设为被选中状态并结束循环
219
+            if (selectElement.options[i].value === currentYear) {
220
+                selectElement.options[i].selected = true;
221
+                break;
222
+            }
223
+        }
224
+    });
225
+</script>
208 226
 <script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
209 227
 <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
210 228
 <script th:src="@{/lib/coco-message/coco-message.js}" charset="utf-8"></script>
@@ -318,10 +336,11 @@
318 336
                 $("#dkyfzr").val(NEWJSON1.join(","));
319 337
             }
320 338
         });
321
-
339
+        var getYear = document.getElementById('nf').value;
322 340
         var currTable = table.render({
341
+
323 342
             elem: '#currentTableId',
324
-            url: AjaxUtil.ctx + 'staBudgetapproval/list_allApply',
343
+            url: AjaxUtil.ctx + 'staBudgetapproval/list_allApply/?nf='+getYear,
325 344
             method: 'post',
326 345
             toolbar: '#toolbarDemo',
327 346
             // defaultToolbar: ['filter', 'print'],
@@ -329,10 +348,10 @@
329 348
                 [
330 349
                     {type: "radio", fixed: 'left'},
331 350
                     {type: 'numbers', align: 'center', fixed: 'left'},
351
+                    {field: 'xmmc', width: '20%', title: '项目名称',fixed: "left"},
332 352
                     {field: 'spzt', width: '9%', title: '审批状态', sort: true},
333 353
                     {field: 'bh', width: '8%', title: '编号'},
334
-                    {field: 'xmmc', width: '20%', title: '项目名称'},
335
-                    // {field: 'sqmc', width: '25%', title: '申请名称'},
354
+                    {field: 'sqmc', width: '25%', title: '申请名称'},
336 355
                     {field: 'erpbh', width: '9%', title: 'ERP编号'},
337 356
                     {field: 'xmlxmc', width: '10%', title: '项目类型'},
338 357
                     {field: 'fylbmc', width: '7%', title: '费用类别'},

+ 57 - 22
src/main/resources/templates/stafeemanage/list_feemanage.html

@@ -15,22 +15,28 @@
15 15
             <legend>搜索信息(<b>收起-展开</b>)</legend>
16 16
             <div id="search-div" style="margin: 5px 10px -10px 0px">
17 17
                 <form class="layui-form" action="" lay-filter="search-form">
18
-                    <div class="layui-form-item" >
18
+                    <div class="layui-form-item">
19 19
                         <div class="layui-inline">
20
-                            <label class="layui-form-label" style="width: 60px">项目名称</label>
21
-                            <div class="layui-input-inline" style="width: 415px">
20
+                            <label class="layui-form-label" style="width: 70px">项目名称</label>
21
+                            <div class="layui-input-inline" style="width: 140px">
22 22
                                 <input type="text" id="xmmc" name="xmmc" autocomplete="off" class="layui-input">
23 23
                             </div>
24 24
                         </div>
25 25
                         <div class="layui-inline">
26
-                            <label class="layui-form-label" style="width: 60px">ERP编号</label>
27
-                            <div class="layui-input-inline" style="width: 150px">
26
+                            <label class="layui-form-label" style="width: 70px">ERP编号</label>
27
+                            <div class="layui-input-inline" style="width: 140px">
28 28
                                 <input type="text" id="erpbh" name="erpbh" autocomplete="off" class="layui-input">
29 29
                             </div>
30 30
                         </div>
31 31
                         <div class="layui-inline">
32
-                            <label class="layui-form-label" style="width: 60px">年份</label>
33
-                            <div class="layui-input-inline" style="width: 150px">
32
+                            <label class="layui-form-label" style="width: 70px">编号</label>
33
+                            <div class="layui-input-inline" style="width: 140px">
34
+                                <input type="text" id="bh" name="bh" autocomplete="off" class="layui-input">
35
+                            </div>
36
+                        </div>
37
+                        <div class="layui-inline">
38
+                            <label class="layui-form-label" style="width: 70px">年份</label>
39
+                            <div class="layui-input-inline" style="width: 140px">
34 40
                                 <select name="nf" id="nf" lay-filter="status">
35 41
                                     <option value="">全部</option>
36 42
                                     <option th:each="item:${yearList}" th:text="${item.nf}" th:value="${item.nf}"></option>
@@ -38,34 +44,42 @@
38 44
                             </div>
39 45
                         </div>
40 46
                         <div class="layui-inline">
41
-                            <label class="layui-form-label" style="width: 60px">项目类型</label>
42
-                            <div class="layui-input-inline" style="width: 150px">
47
+                            <label class="layui-form-label" style="width: 70px">审批状态</label>
48
+                            <div class="layui-input-inline" style="width: 140px">
49
+                                <select name="spzt" id="spzt" lay-filter="status">
50
+                                    <option value="">全部</option>
51
+                                    <option th:each="item:${approveList}" th:text="${item.name}" th:value="${item.code}"></option>
52
+                                </select>
53
+                            </div>
54
+                        </div>
55
+                        <div class="layui-inline">
56
+                            <label class="layui-form-label" style="width: 70px">项目类型</label>
57
+                            <div class="layui-input-inline" style="width: 140px">
43 58
                                 <select name="xmlx" id="xmlx" lay-filter="status">
44 59
                                     <option value="">全部</option>
45 60
                                     <option th:each="item:${xmlxList}" th:text="${item.name}" th:value="${item.code}"></option>
46 61
                                 </select>
47 62
                             </div>
48 63
                         </div>
49
-                        <div class="layui-inline" style="left: -35px">
50
-                            <label class="layui-form-label" style="width: 95px">项目负责人</label>
51
-                            <div class="layui-input-inline" style="width: 150px">
64
+                        <div class="layui-inline">
65
+                            <label class="layui-form-label" style="width: 70px">项目负责人</label>
66
+                            <div class="layui-input-inline" style="width: 140px">
52 67
                                 <input type="hidden" id="xmfzr" name="xmfzr" class="layui-input">
53 68
                                 <input type="text" id="xmfzrxm" name="xmfzrxm" placeholder="可多选" autocomplete="off" class="layui-input" readonly>
54 69
                             </div>
55 70
                         </div>
56
-                        <div class="layui-inline" style="left: -35px">
57
-                            <label class="layui-form-label" style="width: 60px">所属部门</label>
58
-                            <div class="layui-input-inline" style="width: 150px">
71
+                        <div class="layui-inline">
72
+                            <label class="layui-form-label" style="width: 70px">所属部门</label>
73
+                            <div class="layui-input-inline" style="width: 140px">
59 74
                                 <input type="text" id="ssbmmc" name="ssbmmc" autocomplete="off" class="layui-input">
60 75
                             </div>
61 76
                         </div>
62
-
63
-                        <div class="layui-inline" style="margin-left: 0px">
64
-                            <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn">
65
-                                <i class="layui-icon"></i> 搜 索</button>
77
+                        <div class="layui-inline">
78
+                            <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
66 79
                             <button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-reset-btn"><i class="layui-icon layui-icon-refresh"></i> 重 置 </button>
67 80
                         </div>
68 81
                     </div>
82
+
69 83
                 </form>
70 84
             </div>
71 85
         </fieldset>
@@ -82,6 +96,25 @@
82 96
         </button>
83 97
     </div>
84 98
 </script>
99
+
100
+<script>
101
+    // 当文档加载完成后执行以下操作
102
+    document.addEventListener('DOMContentLoaded', function() {
103
+        // 获取下拉框元素
104
+        var selectElement = document.getElementById('nf');
105
+        // 获取当前年份并转换为字符串
106
+        var currentYear = new Date().getFullYear().toString();
107
+
108
+        // 遍历下拉框选项
109
+        for (var i = 0; i < selectElement.options.length; i++) {
110
+            // 如果选项的值与当前年份相匹配,则将该选项设为被选中状态并结束循环
111
+            if (selectElement.options[i].value === currentYear) {
112
+                selectElement.options[i].selected = true;
113
+                break;
114
+            }
115
+        }
116
+    });
117
+</script>
85 118
 <script th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}" charset="utf-8"></script>
86 119
 <script th:src="@{/lib/layui/layui.js}" charset="utf-8"></script>
87 120
 <script th:src="@{/lib/coco-message/coco-message.js}" charset="utf-8"></script>
@@ -94,10 +127,10 @@
94 127
         var form = layui.form,
95 128
             table = layui.table,
96 129
             tableSelect = layui.tableSelect;
97
-
130
+        var year = document.getElementById('nf').value;
98 131
         var currTable = table.render({
99 132
             elem: '#currentTableId',
100
-            url: AjaxUtil.ctx + 'staBudgetapproval/list_feemanage',
133
+            url: AjaxUtil.ctx + 'staBudgetapproval/list_feemanage/?nf='+year,
101 134
             method: 'post',
102 135
             toolbar: '#toolbarDemo', // 自定义模板
103 136
             // toolbar: '#toolbarDemo',
@@ -107,10 +140,12 @@
107 140
                     {type: "radio", title:'😊' ,fixed: 'left'},
108 141
                     {type: 'numbers', align: 'center', fixed: 'left',title: '序号'},
109 142
                     // {field: 'id', title: 'ID',hide:true},
110
-                    {field: 'zwmc', width: '20%', title: '项目名称'},
143
+                    {field: 'zwmc', width: '20%', title: '项目名称',fixed: "left"},
111 144
                     {field: 'erpbh', width: '8%', title: 'ERP编号'},
112 145
                     {field: 'xmlxmc', width: '10%', title: '项目类型'},
113 146
                     {field: 'xmfzrxm', width: '6%', title: '项目负责人'},
147
+                    {field: 'bh', width: '10%', title: '编号' },
148
+                    {field: 'spzt', width: '10%', title: '状态'},
114 149
                     {field: 'ssbmmc', width: '8%', title: '所属部门'},
115 150
                     {field: 'nf', width: '5%', title: '年份', align: 'center'},
116 151
                     {field: 'ysje', width: '6%', title: '可用预算'},