Browse Source

Merge branch 'dev-lgl'

# Conflicts:
#	src/main/java/com/liang/dao/StaBudgetapprovalDao.java
#	src/main/resources/templates/reimburse/mylist.html
lgl 11 months ago
parent
commit
c2c4745843
25 changed files with 385 additions and 153 deletions
  1. 2 0
      src/main/java/com/liang/KYGKApplication.java
  2. 2 0
      src/main/java/com/liang/common/config/SFTYProperties.java
  3. 3 2
      src/main/java/com/liang/controller/PrjApproverecordController.java
  4. 68 41
      src/main/java/com/liang/controller/StaBudgetapprovalController.java
  5. 2 1
      src/main/java/com/liang/controller/StaPayapprovalController.java
  6. 6 2
      src/main/java/com/liang/controller/StaReimbursementController.java
  7. 11 2
      src/main/java/com/liang/controller/SysUserInfoController.java
  8. 9 0
      src/main/java/com/liang/dao/StaBudgetapprovalDao.java
  9. 3 0
      src/main/java/com/liang/dao/StaReimbursementDao.java
  10. 6 0
      src/main/java/com/liang/entity/StaBudgetapproval.java
  11. 132 0
      src/main/java/com/liang/scheduled/ScheduledEvent.java
  12. 2 1
      src/main/resources/application.yml
  13. 17 0
      src/main/resources/mapper/StaBudgetapprovalDao.xml
  14. 7 0
      src/main/resources/mapper/StaReimbursementDao.xml
  15. 1 3
      src/main/resources/mapper/SysUserPostDao.xml
  16. 1 1
      src/main/resources/static/js/lay-module/cascader/cascader.css
  17. 7 0
      src/main/resources/templates/home/user_password.html
  18. 4 2
      src/main/resources/templates/prjapproverecord/list.html
  19. 1 1
      src/main/resources/templates/reimburse/list.html
  20. 54 51
      src/main/resources/templates/reimburse/mylist.html
  21. 1 1
      src/main/resources/templates/stabudgetapproval/connect_project.html
  22. 8 0
      src/main/resources/templates/stabudgetapproval/view_apply.html
  23. 37 36
      src/main/resources/templates/stafeemanage/list_allapply.html
  24. 1 1
      src/main/resources/templates/stasourcefee/add_apply.html
  25. 0 8
      src/main/resources/templates/userinfo/add.html

+ 2 - 0
src/main/java/com/liang/KYGKApplication.java

@@ -8,6 +8,7 @@ import org.springframework.context.ConfigurableApplicationContext;
8 8
 import org.springframework.core.env.Environment;
9 9
 import org.springframework.data.redis.repository.configuration.EnableRedisRepositories;
10 10
 import org.springframework.scheduling.annotation.EnableAsync;
11
+import org.springframework.scheduling.annotation.EnableScheduling;
11 12
 import org.springframework.transaction.annotation.EnableTransactionManagement;
12 13
 import org.mybatis.spring.annotation.MapperScan;
13 14
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
@@ -20,6 +21,7 @@ import java.net.UnknownHostException;
20 21
 @SpringBootApplication
21 22
 @EnableTransactionManagement
22 23
 @MapperScan("com.liang.dao")
24
+@EnableScheduling
23 25
 public class KYGKApplication {
24 26
     final static Logger logger = LoggerFactory.getLogger(KYGKApplication.class);
25 27
 

+ 2 - 0
src/main/java/com/liang/common/config/SFTYProperties.java

@@ -17,5 +17,7 @@ public class SFTYProperties {
17 17
 
18 18
     private String uploadFilePath;
19 19
 
20
+    private String initPassword;
21
+
20 22
 
21 23
 }

+ 3 - 2
src/main/java/com/liang/controller/PrjApproverecordController.java

@@ -358,7 +358,7 @@ public class PrjApproverecordController extends BaseController {
358 358
         record1.setId(approverecord.getId());
359 359
         record1.setSpcz(approverecord.getSpcz());
360 360
         record1.setShr(approverecord.getShr());
361
-        record1.setShsj(approverecord.getShsj());
361
+        record1.setShsj(DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN));
362 362
         double dmoney = approverecord.getSqje();
363 363
 
364 364
         if (approverecord.getSpcz().equals("返回修改")) {
@@ -366,8 +366,9 @@ public class PrjApproverecordController extends BaseController {
366 366
             record1.setYj(approverecord.getYj());
367 367
         } else {
368 368
             record1.setSffh(false);//是否返回
369
-            if (!approverecord.getSpcz().equals("提交审批"))
369
+            if (!approverecord.getSpcz().equals("提交审批")) {
370 370
                 record1.setYj(approverecord.getYj());
371
+            }
371 372
             //是否需要上级审核
372 373
             if (approverecord.getZt().equals(PostInfoEnum.YZ.postName() + "审批") || approverecord.getZt().equals(PostInfoEnum.ZGYLD.postName() + "审批") && dmoney < 1000000) {
373 374
                 record1.setSfsjsh(false);

+ 68 - 41
src/main/java/com/liang/controller/StaBudgetapprovalController.java

@@ -1,11 +1,14 @@
1 1
 package com.liang.controller;
2 2
 
3
+import cn.hutool.core.util.StrUtil;
3 4
 import com.fasterxml.jackson.databind.ObjectMapper;
4 5
 import com.github.pagehelper.PageHelper;
5 6
 import com.github.pagehelper.PageInfo;
6 7
 import com.liang.common.JsonTool;
7 8
 import com.liang.common.base.BaseController;
8 9
 import com.liang.common.base.BaseResult;
10
+import com.liang.common.enums.PostInfoEnum;
11
+import com.liang.common.exception.CustomException;
9 12
 import com.liang.entity.*;
10 13
 import com.liang.service.*;
11 14
 import io.swagger.annotations.ApiOperation;
@@ -250,6 +253,64 @@ public class StaBudgetapprovalController extends BaseController {
250 253
         }
251 254
     }
252 255
 
256
+    @ResponseBody
257
+    @RequestMapping(value = "/bathUpdate/{xmid}/{sqje}", method = RequestMethod.GET)
258
+    public Map<Object, Object> bathUpdate(@PathVariable Integer xmid, @PathVariable Double sqje, @RequestParam String spzt) {
259
+        Map<Object, Object> res = new HashMap<>();
260
+        //系统当前用户
261
+        SysUserInfo userInfo = getSysUserInfo();
262
+        res.put("userInfo", userInfo);
263
+
264
+        Map<String, String> paraMap1 = new HashMap<>();
265
+        paraMap1.put("xmid", xmid.toString());
266
+        paraMap1.put("zt", spzt);
267
+        paraMap1.put("wc", "0");
268
+        List<PrjApproverecord> approveList = prjApproverecordService.getApproveByXmId(paraMap1);
269
+        if (approveList.size() == 1) {
270
+            PrjApproverecord approveInfo = approveList.get(0);
271
+            approveInfo.setSqje(sqje);
272
+
273
+            if (spzt.equals(PostInfoEnum.YZ.postName() + "审批") || spzt.equals(PostInfoEnum.ZGYLD.postName() + "审批") && sqje < 1000000) {
274
+                approveInfo.setSpcz("批量审批");
275
+                approveInfo.setYj("通过");
276
+            } else {
277
+                //岗位
278
+                Map<String, String> paraMap2 = new HashMap<>();
279
+                if ((PostInfoEnum.BMZR.postName() + "审批").equals(spzt)) {
280
+                    paraMap2.put("postName", PostInfoEnum.KJXMGLZZ.postName());
281
+                } else if ((PostInfoEnum.KJXMGLZZ.postName() + "审批").equals(spzt)) {
282
+                    paraMap2.put("postName", PostInfoEnum.KJBBMZR.postName());
283
+                } else if ((PostInfoEnum.KJBBMZR.postName() + "审批").equals(spzt)) {
284
+                    paraMap2.put("postName", PostInfoEnum.ZGYLD.postName());
285
+                } else if ((PostInfoEnum.ZGYLD.postName() + "审批").equals(spzt)) {
286
+                    paraMap2.put("postName", PostInfoEnum.YZ.postName());
287
+                } else {
288
+                    paraMap2.put("postName", PostInfoEnum.BMZR.postName());
289
+                }
290
+                SysPostInfo postInfo = sysPostInfoService.getSysPostInfo(paraMap2);
291
+                if (postInfo == null) {
292
+                    throw new CustomException("没有改岗位");
293
+                }
294
+                Map<String, String> paraMap = new HashMap<>();
295
+                paraMap.put("postId", String.valueOf(postInfo.getPostId()));
296
+                List<SysUserPost> list = sysUserPostService.getPostUserList(paraMap);
297
+                approveInfo.setSpcz("批量审批");
298
+                approveInfo.setSjshgw(postInfo.getPostId());
299
+                approveInfo.setSjshgwmc(postInfo.getPostName());
300
+                approveInfo.setSjshr(list.get(0).getUserId());
301
+                approveInfo.setSjshrxm(list.get(0).getName());
302
+                approveInfo.setYj("同意");
303
+            }
304
+            res.put("approveInfo", approveInfo);
305
+        } else {
306
+            throw new CustomException("费用申请批量审批ERROR:数据不匹配,xmid:", xmid);
307
+        }
308
+        return res;
309
+
310
+    }
311
+
312
+    @Resource
313
+    private SysUserPostService sysUserPostService;
253 314
 
254 315
     /**
255 316
      * 编辑数据(费用申请)
@@ -931,24 +992,6 @@ public class StaBudgetapprovalController extends BaseController {
931 992
     public BaseResult updateSpzt(@RequestBody String strData) {
932 993
         StaBudgetapproval fysq = JsonTool.parseObject(strData, StaBudgetapproval.class);
933 994
         if (fysq.getSpzt().equals("审批结束")) {
934
-            DateFormat dateFormat = new SimpleDateFormat("yyyy");
935
-            PrjProject project = prjProjectService.queryById(fysq.getXmid());
936
-            if (project != null && project.getXmlxmc().indexOf("政府") > 0) {
937
-                String partBh = "结转类(" + dateFormat.format(new Date()) + ")";
938
-                String bh = GetApproveRecordBH(partBh);
939
-                fysq.setBh(bh);
940
-            } else {
941
-                if (fysq.getSqje() < 1000000) {
942
-                    String partBh = "科研类(" + dateFormat.format(new Date()) + ")";
943
-                    String bh = GetApproveRecordBH(partBh);
944
-                    fysq.setBh(bh);
945
-                } else {
946
-                    String partBh = "大额科研类(" + dateFormat.format(new Date()) + ")";
947
-                    String bh = GetApproveRecordBH(partBh);
948
-                    fysq.setBh(bh);
949
-                }
950
-            }
951
-        } else {
952 995
             fysq.setBh("");
953 996
         }
954 997
         int num = staBudgetapprovalService.updateSpzt(fysq);
@@ -1244,13 +1287,14 @@ public class StaBudgetapprovalController extends BaseController {
1244 1287
 
1245 1288
         return resultMap;
1246 1289
     }
1290
+
1247 1291
     @ResponseBody
1248
-    @RequestMapping(value = "/getAll",method = RequestMethod.GET)
1249
-    public BaseResult getAll(){
1292
+    @RequestMapping(value = "/getAll", method = RequestMethod.GET)
1293
+    public BaseResult getAll() {
1250 1294
         Map<String, String> paraMap = new HashMap<>();
1251 1295
         List<FeeManagemant> list = prjProjectService.getFyglList(paraMap);
1252 1296
 
1253
-    return BaseResult.success(list);
1297
+        return BaseResult.success(list);
1254 1298
     }
1255 1299
 
1256 1300
 
@@ -1336,24 +1380,6 @@ public class StaBudgetapprovalController extends BaseController {
1336 1380
     public BaseResult doByjConnect(@RequestBody String strData) {
1337 1381
         StaBudgetapproval fysq = JsonTool.parseObject(strData, StaBudgetapproval.class);
1338 1382
         if (fysq.getSpzt().equals("审批结束")) {
1339
-            DateFormat dateFormat = new SimpleDateFormat("yyyy");
1340
-            PrjProject project = prjProjectService.queryById(fysq.getXmid());
1341
-            if (project != null && project.getXmlxmc().indexOf("政府") > 0) {
1342
-                String partBh = "结转类(" + dateFormat.format(new Date()) + ")";
1343
-                String bh = GetApproveRecordBH(partBh);
1344
-                fysq.setBh(bh);
1345
-            } else {
1346
-                if (fysq.getSqje() < 1000000) {
1347
-                    String partBh = "科研类(" + dateFormat.format(new Date()) + ")";
1348
-                    String bh = GetApproveRecordBH(partBh);
1349
-                    fysq.setBh(bh);
1350
-                } else {
1351
-                    String partBh = "大额科研类(" + dateFormat.format(new Date()) + ")";
1352
-                    String bh = GetApproveRecordBH(partBh);
1353
-                    fysq.setBh(bh);
1354
-                }
1355
-            }
1356
-        } else {
1357 1383
             fysq.setBh("");
1358 1384
         }
1359 1385
         int num = staBudgetapprovalService.updateSpzt(fysq);
@@ -1374,10 +1400,10 @@ public class StaBudgetapprovalController extends BaseController {
1374 1400
     public Object getSubNode(@PathVariable Integer nys,
1375 1401
                              @RequestParam Integer page,
1376 1402
                              @RequestParam Integer limit,
1377
-                             @RequestParam(required = false ,value = "mc") String mc
1403
+                             @RequestParam(required = false, value = "mc") String mc
1378 1404
     ) {
1379 1405
         Integer count = prjAnnualbudgetdetailService.getSubNodeCount(nys, page, limit);
1380
-        List<PrjAnnualbudgetdetail> list = prjAnnualbudgetdetailService.getSubNode(nys, page, limit,mc);
1406
+        List<PrjAnnualbudgetdetail> list = prjAnnualbudgetdetailService.getSubNode(nys, page, limit, mc);
1381 1407
 
1382 1408
         Map<String, Object> resultMap = new HashMap<>();
1383 1409
         resultMap.put("code", 0);
@@ -1390,6 +1416,7 @@ public class StaBudgetapprovalController extends BaseController {
1390 1416
 
1391 1417
     /**
1392 1418
      * 未关联项目备用金列表
1419
+     *
1393 1420
      * @return
1394 1421
      */
1395 1422
     @ResponseBody

+ 2 - 1
src/main/java/com/liang/controller/StaPayapprovalController.java

@@ -474,7 +474,7 @@ public class StaPayapprovalController extends BaseController {
474 474
             PrjApproverecord approverecord = approveList.get(0);
475 475
             if ((PostInfoEnum.KJBBMZR.postName()+"审批").equals(spzt)) {
476 476
                 approverecord.setSpcz("批量审批");
477
-                approverecord.setYj("通过");
477
+                approverecord.setYj("同意");
478 478
             } else {
479 479
                 Map<String, String> paraMap2 = new HashMap<>();
480 480
                 if ((PostInfoEnum.KJXMGLZZ1.postName() + "审批").equals(spzt)) {
@@ -494,6 +494,7 @@ public class StaPayapprovalController extends BaseController {
494 494
                 paraMap.put("postId", String.valueOf(postInfo.getPostId()));
495 495
                 List<SysUserPost> list = sysUserPostService.getPostUserList(paraMap);
496 496
                 approverecord.setSpcz("批量审批");
497
+                approverecord.setYj("同意");
497 498
                 approverecord.setSjshgw(postInfo.getPostId());
498 499
                 approverecord.setSjshgwmc(postInfo.getPostName());
499 500
                 approverecord.setSjshr(list.get(0).getUserId());

+ 6 - 2
src/main/java/com/liang/controller/StaReimbursementController.java

@@ -109,7 +109,7 @@ public class StaReimbursementController extends BaseController {
109 109
         //当前用户ID
110 110
         model.addAttribute("userId", getSysUserId());
111 111
         //年份
112
-        List<String> yearList = prjAnnualbudgetService.getYearList();
112
+        List<String> yearList = staReimbursementDao.getYearList();
113 113
         model.addAttribute("yearList", yearList);
114 114
 
115 115
         return "reimburse/list";
@@ -128,9 +128,11 @@ 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
+        //年份
132
+        List<String> yearList = staReimbursementDao.getYearList();
133
+        model.addAttribute("yearList", yearList);
131 134
         return "reimburse/mylist";
132 135
     }
133
-
134 136
     @ResponseBody
135 137
     @RequestMapping(value = "/list", method = RequestMethod.POST)
136 138
     public BaseResult list(@RequestParam("page") Integer pageNum,
@@ -172,6 +174,7 @@ public class StaReimbursementController extends BaseController {
172 174
                              @RequestParam(required = false, defaultValue = "", value = "fysqbh") String fysqbh,
173 175
                              @RequestParam(required = false, defaultValue = "", value = "spzt") String spzt,
174 176
                              @RequestParam(required = false, defaultValue = "", value = "mc") String mc,
177
+                             @RequestParam(required = false, defaultValue = "", value = "nf") String nf,
175 178
                              @RequestParam(required = false, defaultValue = "", value = "bzr") String bzr,
176 179
                              @RequestParam(required = false, defaultValue = "", value = "sortName") String sortName,
177 180
                              @RequestParam(required = false, defaultValue = "", value = "sortOrder") String sortOrder,
@@ -195,6 +198,7 @@ public class StaReimbursementController extends BaseController {
195 198
         paraMap.put("fysqbh", fysqbh);
196 199
         paraMap.put("spzt", spzt);
197 200
         paraMap.put("mc", mc);
201
+        paraMap.put("nf", nf);
198 202
         paraMap.put("bzr", bzr);
199 203
         paraMap.put("xmmc",xmmc);
200 204
 

+ 11 - 2
src/main/java/com/liang/controller/SysUserInfoController.java

@@ -1,11 +1,13 @@
1 1
 package com.liang.controller;
2 2
 
3
+import cn.hutool.crypto.digest.MD5;
3 4
 import com.github.pagehelper.PageHelper;
4 5
 import com.github.pagehelper.PageInfo;
5 6
 import com.liang.common.base.BaseResult;
6 7
 import com.liang.common.JsonTool;
7 8
 import com.liang.common.annotation.LogAround;
8 9
 import com.liang.common.base.BaseController;
10
+import com.liang.common.config.SFTYProperties;
9 11
 import com.liang.common.utils.ExcelPoiUtil;
10 12
 import com.liang.common.utils.SHA256Utils;
11 13
 import com.liang.common.utils.StringUtils;
@@ -22,6 +24,7 @@ import org.apache.poi.xssf.usermodel.XSSFCell;
22 24
 import org.apache.poi.xssf.usermodel.XSSFRow;
23 25
 import org.apache.poi.xssf.usermodel.XSSFSheet;
24 26
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
27
+import org.bouncycastle.jce.provider.JDKMessageDigest;
25 28
 import org.slf4j.Logger;
26 29
 import org.slf4j.LoggerFactory;
27 30
 import org.springframework.core.io.ResourceLoader;
@@ -32,6 +35,7 @@ import org.springframework.stereotype.Controller;
32 35
 import org.springframework.ui.Model;
33 36
 import org.springframework.web.bind.annotation.*;
34 37
 import org.springframework.web.multipart.MultipartFile;
38
+import sun.misc.BASE64Encoder;
35 39
 
36 40
 import javax.annotation.Resource;
37 41
 import javax.servlet.ServletOutputStream;
@@ -41,6 +45,7 @@ import java.io.IOException;
41 45
 import java.io.InputStream;
42 46
 import java.net.URLEncoder;
43 47
 import java.nio.charset.StandardCharsets;
48
+import java.security.MessageDigest;
44 49
 import java.util.*;
45 50
 
46 51
 /**
@@ -54,7 +59,7 @@ import java.util.*;
54 59
 @Api(value = "系统用户管理控制器", tags = "系统用户管理控制器")
55 60
 public class SysUserInfoController extends BaseController {
56 61
     final static Logger logger = LoggerFactory.getLogger(SysUserInfoController.class);
57
-
62
+    final static String salt = "323@#@$1234da";
58 63
     /**
59 64
      * 服务对象
60 65
      */
@@ -173,6 +178,9 @@ public class SysUserInfoController extends BaseController {
173 178
         return "userinfo/add";
174 179
     }
175 180
 
181
+    @Resource
182
+    private SFTYProperties sftyProperties;
183
+
176 184
     /**
177 185
      * 新增
178 186
      *
@@ -185,7 +193,8 @@ public class SysUserInfoController extends BaseController {
185 193
     public BaseResult doAdd(SysUserInfo userInfo,
186 194
                             @RequestParam(required = false, defaultValue = "", value = "postStr") String postStr) {
187 195
         // 再进行加密两次,才是正确密码
188
-        String password = SHA256Utils.SHA256Encode(userInfo.getPassword());
196
+        String digestHex = MD5.create().digestHex(salt + sftyProperties.getInitPassword());
197
+        String password = SHA256Utils.SHA256Encode(digestHex);
189 198
         userInfo.setPassword(password);
190 199
         userInfo.setCreateUser(getSysUserId());
191 200
         int num = sysUserInfoService.insert(userInfo);

+ 9 - 0
src/main/java/com/liang/dao/StaBudgetapprovalDao.java

@@ -211,6 +211,15 @@ public interface StaBudgetapprovalDao {
211 211
 
212 212
     String getBhById(String id);
213 213
 
214
+    /**
215
+     * 获取审批结束且科研编号为null的费用申请
216
+     * @return
217
+     */
218
+    List<StaBudgetapproval> listSPJS();
219
+
220
+    int updateBatchBh(@Param("entities")List<StaBudgetapproval> staBudgetapprovals);
221
+
222
+
214 223
     StaBudgetapproval getBayID(Integer ID);
215 224
 }
216 225
 

+ 3 - 0
src/main/java/com/liang/dao/StaReimbursementDao.java

@@ -130,5 +130,8 @@ public interface StaReimbursementDao {
130 130
     int updateBZJE(StaReimbursement staReimbursement);
131 131
 
132 132
     Integer getRwsIdByBzId(Integer bzID);
133
+
134
+    List<String> getYearList();
135
+
133 136
 }
134 137
 

+ 6 - 0
src/main/java/com/liang/entity/StaBudgetapproval.java

@@ -159,5 +159,11 @@ public class StaBudgetapproval implements Serializable {
159 159
      */
160 160
     private String xmndjfysq;
161 161
 
162
+
163
+    /**
164
+     * 批量审批新增字段
165
+     */
166
+    private String operations;
167
+
162 168
 }
163 169
 

+ 132 - 0
src/main/java/com/liang/scheduled/ScheduledEvent.java

@@ -0,0 +1,132 @@
1
+package com.liang.scheduled;
2
+
3
+import cn.hutool.core.collection.CollUtil;
4
+import com.liang.common.utils.SpringUtil;
5
+import com.liang.dao.StaBudgetapprovalDao;
6
+import com.liang.entity.PrjProject;
7
+import com.liang.entity.StaBudgetapproval;
8
+import com.liang.service.PrjProjectService;
9
+import com.liang.service.StaBudgetapprovalService;
10
+import lombok.extern.slf4j.Slf4j;
11
+import org.springframework.scheduling.annotation.EnableScheduling;
12
+import org.springframework.scheduling.annotation.Scheduled;
13
+import org.springframework.stereotype.Component;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RestController;
16
+
17
+import javax.annotation.Resource;
18
+import java.text.DateFormat;
19
+import java.text.SimpleDateFormat;
20
+import java.util.*;
21
+
22
+
23
+@Component
24
+@EnableScheduling // 开启定时任务功能
25
+@Slf4j
26
+@RestController
27
+@RequestMapping("ScheduledEvent")
28
+public class ScheduledEvent {
29
+
30
+    @Resource
31
+    private StaBudgetapprovalDao staBudgetapprovalDao;
32
+    @Resource
33
+    private PrjProjectService prjProjectService;
34
+    @Resource
35
+    private StaBudgetapprovalService staBudgetapprovalService;
36
+
37
+    /**
38
+     * 更新审批结束的费用申请的科研编号
39
+     */
40
+    @Scheduled(cron = "0 0/1 * * * ? ")
41
+    public void updateStaBudgetApprovalBh() {
42
+        log.info("============================开始更新费用申请的科研编号======================");
43
+        log.info("===================================================================");
44
+
45
+        List<StaBudgetapproval> staBudgetapprovals = staBudgetapprovalDao.listSPJS();
46
+        if (CollUtil.isNotEmpty(staBudgetapprovals)) {
47
+            log.info("============================待更新费用申请:{}======================", staBudgetapprovals);
48
+            //设置编号
49
+            staBudgetapprovals.forEach(item -> {
50
+                DateFormat dateFormat = new SimpleDateFormat("yyyy");
51
+                PrjProject project = prjProjectService.queryById(item.getXmid());
52
+                if (project != null && project.getXmlxmc().indexOf("政府") > 0) {
53
+                    String partBh = "结转类(" + dateFormat.format(new Date()) + ")";
54
+                    if (BH.get(partBh) != null) {
55
+                        BH.put(partBh, (BH.get(partBh) + 1));
56
+                        item.setBh(partBh + (BH.get(partBh)));
57
+                    } else {
58
+                        BH.put(partBh,1001);
59
+                        item.setBh(partBh + 1001);
60
+                    }
61
+                } else {
62
+                    if (item.getSqje() < 1000000) {
63
+                        String partBh = "科研类(" + dateFormat.format(new Date()) + ")";
64
+                        if (BH.get(partBh) != null) {
65
+                            BH.put(partBh, (BH.get(partBh) + 1));
66
+                            item.setBh(partBh + (BH.get(partBh)));
67
+                        } else {
68
+                            BH.put(partBh,1001);
69
+                            item.setBh(partBh + 1001);
70
+                        }
71
+                    } else {
72
+                        String partBh = "大额科研类(" + dateFormat.format(new Date()) + ")";
73
+                        if (BH.get(partBh) != null) {
74
+                            BH.put(partBh, (BH.get(partBh) + 1));
75
+                            item.setBh(partBh + (BH.get(partBh)));
76
+                        } else {
77
+                            BH.put(partBh,1001);
78
+                            item.setBh(partBh + 1001);
79
+                        }
80
+                    }
81
+                }
82
+            });
83
+            //更新编号
84
+            try {
85
+                staBudgetapprovalDao.updateBatchBh(staBudgetapprovals);
86
+            } catch (Exception e) {
87
+                log.error("ERROR:更新审批结束的费用申请的科研编号时出错,错误信息:" + e.getMessage());
88
+            }
89
+        } else {
90
+            log.info("============================暂无科研编号需要更新======================");
91
+        }
92
+
93
+    }
94
+
95
+    static Map<String, Integer> BH = new HashMap<>();
96
+
97
+    static {
98
+        DateFormat dateFormat = new SimpleDateFormat("yyyy");
99
+        String partBhZjl = "结转类(" + dateFormat.format(new Date()) + ")";
100
+        String partBhKyl = "科研类(" + dateFormat.format(new Date()) + ")";
101
+        String partBhDekyl = "大额科研类(" + dateFormat.format(new Date()) + ")";
102
+        List<String> bhName = new ArrayList<>();
103
+        Collections.addAll(bhName, partBhZjl, partBhKyl, partBhDekyl);
104
+        bhName.forEach(ScheduledEvent::getApproveRecordBH);
105
+
106
+    }
107
+
108
+    private static void getApproveRecordBH(String partBh) {
109
+        StaBudgetapprovalService staBudgetapprovalService = SpringUtil.getBean("staBudgetapprovalService");
110
+        List<StaBudgetapproval> bhList = staBudgetapprovalService.queryByBH(partBh);
111
+        List<Integer> bh_List = new ArrayList();
112
+        if (bhList != null && bhList.size() > 0) {
113
+            for (int i = 0; i < bhList.size(); i++) {
114
+                int _tmpBh = Integer.parseInt(bhList.get(i).getBh().substring(bhList.get(i).getBh().length() - 4));
115
+                bh_List.add(_tmpBh);
116
+            }
117
+            if (bh_List.size() > 0) {
118
+                try {
119
+                    Integer max = Collections.max(bh_List);
120
+                    BH.put(partBh, max);
121
+                } catch (Exception er) {
122
+                    BH.put(partBh, 1001);
123
+                }
124
+            } else {
125
+                BH.put(partBh, 1001);
126
+            }
127
+        } else {
128
+            BH.put(partBh, 1001);
129
+        }
130
+    }
131
+
132
+}

+ 2 - 1
src/main/resources/application.yml

@@ -103,4 +103,5 @@ redisson:
103 103
   timeout: 5000
104 104
 sfty:
105 105
   #映射服务器本地文件
106
-  upload-file-path: D:\upload\
106
+  upload-file-path: D:\upload\
107
+  init-password: 1234.com

+ 17 - 0
src/main/resources/mapper/StaBudgetapprovalDao.xml

@@ -828,6 +828,15 @@
828 828
             #{item}
829 829
         </foreach>
830 830
     </update>
831
+    <update id="updateBatchBh">
832
+        <foreach collection="entities" item="entity" separator=";">
833
+            update sta_BudgetApproval
834
+            set
835
+            BH=#{entity.bh}
836
+            where
837
+            id = #{entity.id}
838
+        </foreach>
839
+    </update>
831 840
 
832 841
     <!--批量作废费用申请-->
833 842
     <delete id="batchNullify" parameterType="java.util.ArrayList">
@@ -913,6 +922,14 @@
913 922
     <select id="getBhById" resultType="java.lang.String">
914 923
         SELECT BH FROM sta_BudgetApproval where ID = #{id}
915 924
     </select>
925
+    <select id="listSPJS" resultType="com.liang.entity.StaBudgetapproval">
926
+        SELECT
927
+            *
928
+        from  sta_BudgetApproval sba
929
+        where
930
+            sba.SPZT = '审批结束'
931
+          and sba.BH = ''
932
+    </select>
916 933
 
917 934
     <select id="getBayID" resultMap="StaBudgetapprovalMap">
918 935
         SELECT * FROM sta_BudgetApproval where ID = #{id}

+ 7 - 0
src/main/resources/mapper/StaReimbursementDao.xml

@@ -228,6 +228,13 @@
228 228
                  left join sta_BudgetApproval sb on sb.id = sr.fysq
229 229
         where sr.id = #{bzID}
230 230
     </select>
231
+    <select id="getYearList" resultType="java.lang.String">
232
+        SELECT NF
233
+        from
234
+            sta_BudgetApproval
235
+        group by NF
236
+        order by nf DESC
237
+    </select>
231 238
 
232 239
     <!--批量删除报账-->
233 240
     <delete id="batchDelete" parameterType="java.util.ArrayList">

+ 1 - 3
src/main/resources/mapper/SysUserPostDao.xml

@@ -164,9 +164,7 @@
164 164
         <if test="userName!= null and userName!= ''">
165 165
             and u.name like '%'+#{userName}+'%'
166 166
         </if>
167
-        <if test="postName == '主管院领导'">
168
-            ORDER BY u.user_id DESC
169
-        </if>
167
+            ORDER BY u.order_code DESC
170 168
     </select>
171 169
 
172 170
     <!--用户岗位列表-->

+ 1 - 1
src/main/resources/static/js/lay-module/cascader/cascader.css

@@ -1649,5 +1649,5 @@
1649 1649
 }
1650 1650
 
1651 1651
 ::-webkit-scrollbar {
1652
-    width: 0;
1652
+    /*width: 0;*/
1653 1653
 }

+ 7 - 0
src/main/resources/templates/home/user_password.html

@@ -35,6 +35,7 @@
35 35
                 <div class="layui-input-block">
36 36
                     <input type="password" name="new_password" lay-verify="required|pass" lay-reqtext="新的密码不能为空"
37 37
                            placeholder="请输入新的密码" value="" class="layui-input">
38
+                    <tip>密码需包含大写字母,小写字母,特殊符号(@、$、!、%、*、?、&),且密码长度不能少于8位,密码范例(Zhangsan@123456)</tip>
38 39
                 </div>
39 40
             </div>
40 41
             <div class="layui-form-item">
@@ -78,6 +79,12 @@
78 79
                     layer.msg('两次输入密码不一致!');
79 80
                     return false;
80 81
                 }
82
+                const regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&]).{8,}$/;
83
+
84
+                if (!regex.test(new_password)) {
85
+                    layer.msg('密码强度较弱!')
86
+                    return false;
87
+                }
81 88
 
82 89
                 data.field.old_password = md5.MD5(data.field.old_password);
83 90
                 data.field.new_password = md5.MD5(data.field.new_password);

+ 4 - 2
src/main/resources/templates/prjapproverecord/list.html

@@ -556,7 +556,9 @@
556 556
                             //更新审批状态
557 557
                             var project = {
558 558
                                 "id": xmApprovalBath.xmid,
559
-                                "spzt": ''
559
+                                "spzt": '',
560
+                                "sqje": xmApprovalBath.sqje,
561
+                                "operations":"bathsp"
560 562
                             }
561 563
                             if (bathUpdateRes.approveInfo.spcz == '返回修改') {
562 564
                                 project.spzt = '未提交(返回)';
@@ -580,7 +582,7 @@
580 582
                                 contentType: "application/json",
581 583
                                 data: JSON.stringify(project),
582 584
                                 success: function (res) {
583
-                                    return true;
585
+
584 586
                                 },
585 587
                                 error: function (error) {
586 588
                                 }

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

@@ -28,7 +28,7 @@
28 28
                         <div class="layui-input-inline" style="width: 150px">
29 29
                             <select name="nf" id="nf" lay-filter="status">
30 30
                                 <option value="">全部</option>
31
-                                <option th:each="item:${yearList}" th:text="${item.nf}" th:value="${item.nf}"></option>
31
+                                <option th:each="item:${yearList}" th:text="${item}" th:value="${item}"></option>
32 32
                             </select>
33 33
                         </div>
34 34
                         <label class="layui-form-label" style="width: 60px">审批状态</label>

+ 54 - 51
src/main/resources/templates/reimburse/mylist.html

@@ -40,8 +40,22 @@
40 40
                         <div class="layui-input-inline"  style="width: 200px">
41 41
                             <input type="text" name="mc" autocomplete="off" class="layui-input">
42 42
                         </div>
43
-                        <button type="submit" class="layui-btn" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
44
-                        <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>
43
+                        <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">
47
+                                    <option value="">全部</option>
48
+                                    <option th:each="item:${yearList}" th:text="${item}"
49
+                                            th:value="${item}"></option>
50
+                                </select>
51
+                            </div>
52
+                        </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>
45 59
                     </div>
46 60
                 </form>
47 61
             </div>
@@ -64,9 +78,9 @@
64 78
                 <button class="layui-btn layui-btn-sm data-add-btn" lay-event="tjrevokeApprove">
65 79
                     <i class="layui-icon layui-icon-edit" style="font-size: 10px;"></i>撤销审批
66 80
                 </button>
67
-<!--                <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="spOption">-->
68
-<!--                    <i class="layui-icon layui-icon-edit" style="font-size: 10px;"></i>审核-->
69
-<!--                </button>-->
81
+                <!--                <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="spOption">-->
82
+                <!--                    <i class="layui-icon layui-icon-edit" style="font-size: 10px;"></i>审核-->
83
+                <!--                </button>-->
70 84
                 <button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="spList">
71 85
                     <i class="layui-icon layui-icon-list" style="font-size: 10px;"></i>审批列表
72 86
                 </button>
@@ -79,9 +93,9 @@
79 93
                 <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="nullify">
80 94
                     <i class="layui-icon layui-icon-delete" style="font-size: 10px;"></i>作废
81 95
                 </button>
82
-<!--                <button class="layui-btn layui-btn-sm" lay-event="exportExcel">-->
83
-<!--                    <i class="layui-icon layui-icon-export" style="font-size: 10px;"></i>导出列表-->
84
-<!--                </button>-->
96
+                <!--                <button class="layui-btn layui-btn-sm" lay-event="exportExcel">-->
97
+                <!--                    <i class="layui-icon layui-icon-export" style="font-size: 10px;"></i>导出列表-->
98
+                <!--                </button>-->
85 99
             </div>
86 100
         </script>
87 101
         <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
@@ -99,8 +113,8 @@
99 113
 
100 114
     layui.use(['form', 'table', 'tableSelect', 'laydate'], function () {
101 115
         var form = layui.form
102
-            table = layui.table;
103
-         var userId = $("#userId").val();
116
+        table = layui.table;
117
+        var userId = $("#userId").val();
104 118
 
105 119
         var currTable = table.render({
106 120
             elem: '#currentTableId',
@@ -129,7 +143,7 @@
129 143
             limit: 10,
130 144
             page: true,
131 145
             skin: 'grid',
132
-            parseData: function(res){ //res 即为原始返回的数据
146
+            parseData: function (res) { //res 即为原始返回的数据
133 147
                 return {
134 148
                     "code": res.code, //解析接口状态
135 149
                     "msg": res.message, //解析提示文本
@@ -137,7 +151,7 @@
137 151
                     "data": res.data.rows //解析数据列表
138 152
                 };
139 153
             },
140
-            done: function(res, curr, count) { // done为数据渲染完的回调
154
+            done: function (res, curr, count) { // done为数据渲染完的回调
141 155
                 // 测试打印出后端返回的权限列表
142 156
                 // let permissionSet = [[${permissionSet}]];
143 157
                 // console.log(JSON.stringify(permissionSet));
@@ -160,7 +174,7 @@
160 174
         table.on('toolbar(currentTableFilter)', function (obj) {
161 175
             if (obj.event == 'edit') {
162 176
                 var dataBudget = table.cache["currentTableId"];
163
-                if(dataBudget.length == 0)
177
+                if (dataBudget.length == 0)
164 178
                     return;
165 179
 
166 180
                 var checkStatus = table.checkStatus('currentTableId')
@@ -174,7 +188,7 @@
174 188
                 } else if (data[0].spzt == "审批结束") {
175 189
                     Message.warning("该报账已审批结束,不能修改!", 2000);
176 190
                 } else if (data[0].spzt != null && data[0].spzt.indexOf("未提交") < 0) {
177
-                        Message.warning("该报账审批中,不能修改!", 2000);
191
+                    Message.warning("该报账审批中,不能修改!", 2000);
178 192
                 } else {
179 193
                     var index = layer.open({
180 194
                         title: '编辑报账',
@@ -183,7 +197,7 @@
183 197
                         // maxmin: true,
184 198
                         shadeClose: true,
185 199
                         area: ['1250px', '750px'],
186
-                        content: AjaxUtil.ctx + "staReimbursement/forUpdate/" +data[0].id,
200
+                        content: AjaxUtil.ctx + "staReimbursement/forUpdate/" + data[0].id,
187 201
                         end: function () {
188 202
                             if (updateflag == 1)
189 203
                                 currTable.reload();
@@ -192,10 +206,9 @@
192 206
                         }
193 207
                     });
194 208
                 }
195
-            }
196
-            else if (obj.event == 'view') {
209
+            } else if (obj.event == 'view') {
197 210
                 var dataBudget = table.cache["currentTableId"];
198
-                if(dataBudget.length == 0)
211
+                if (dataBudget.length == 0)
199 212
                     return;
200 213
 
201 214
                 var checkStatus = table.checkStatus('currentTableId')
@@ -212,28 +225,26 @@
212 225
                         // maxmin: true,
213 226
                         shadeClose: true,
214 227
                         area: ['1250px', '750px'],
215
-                        content: AjaxUtil.ctx + "staReimbursement/forView/" +data[0].id,
228
+                        content: AjaxUtil.ctx + "staReimbursement/forView/" + data[0].id,
216 229
                         end: function () {
217 230
                             layer.close(index);
218 231
                         }
219 232
                     });
220 233
                 }
221
-            }
222
-            else if (obj.event === 'delete') {  // 监听删除操作
234
+            } else if (obj.event === 'delete') {  // 监听删除操作
223 235
                 var dataBudget = table.cache["currentTableId"];
224
-                if(dataBudget.length == 0)
236
+                if (dataBudget.length == 0)
225 237
                     return;
226 238
 
227 239
                 var checkStatus = table.checkStatus('currentTableId')
228
-                    ,data = checkStatus.data;
240
+                    , data = checkStatus.data;
229 241
                 if (data == null || data.length === 0) {
230 242
                     Message.warning("请选择要删除的报账!", 1000);
231 243
                     return;
232
-                }
233
-                else {
234
-                    for(let item of data) {
235
-                        if(item.spzt != "未提交") {
236
-                            if(item.spzt == "审批结束")
244
+                } else {
245
+                    for (let item of data) {
246
+                        if (item.spzt != "未提交") {
247
+                            if (item.spzt == "审批结束")
237 248
                                 Message.warning("存在已审批结束的报账,不能直接删除!", 2000);
238 249
                             else if (data[0].spzt == "作废")
239 250
                                 Message.warning("存在已作废的报账,不能直接删除!", 2000);
@@ -263,8 +274,7 @@
263 274
                         }
264 275
                     });
265 276
                 });
266
-            }
267
-            else if (obj.event === 'tjApprove') {
277
+            } else if (obj.event === 'tjApprove') {
268 278
                 var dataBudget = table.cache["currentTableId"];
269 279
                 if (dataBudget.length == 0)
270 280
                     return;
@@ -288,7 +298,7 @@
288 298
                         "zt": data[0].spzt,
289 299
                         "bzje": data[0].bzje
290 300
                     };
291
-                    if(data[0].spzt == null) {
301
+                    if (data[0].spzt == null) {
292 302
                         xmApproval.zt = "未提交";
293 303
                         data[0].spzt = "未提交";
294 304
                     }
@@ -313,8 +323,7 @@
313 323
                         }
314 324
                     });
315 325
                 }
316
-            }
317
-            else if (obj.event === 'spOption') {
326
+            } else if (obj.event === 'spOption') {
318 327
                 var dataBudget = table.cache["currentTableId"];
319 328
                 if (dataBudget.length == 0)
320 329
                     return;
@@ -354,8 +363,7 @@
354 363
                         }
355 364
                     });
356 365
                 }
357
-            }
358
-            else if (obj.event === 'spList') {
366
+            } else if (obj.event === 'spList') {
359 367
                 var dataBudget = table.cache["currentTableId"];
360 368
                 if (dataBudget.length == 0)
361 369
                     return;
@@ -386,8 +394,7 @@
386 394
                         }
387 395
                     });
388 396
                 }
389
-            }
390
-            else if (obj.event === 'payRequest') {
397
+            } else if (obj.event === 'payRequest') {
391 398
                 var projects = table.cache["currentTableId"];
392 399
                 if (projects.length == 0)
393 400
                     return;
@@ -428,8 +435,7 @@
428 435
                         }
429 436
                     });
430 437
                 }
431
-            }
432
-            else if (obj.event === 'updateBZJE') {                 //
438
+            } else if (obj.event === 'updateBZJE') {                 //
433 439
                 var projects = table.cache["currentTableId"];
434 440
                 if (projects.length == 0)
435 441
                     return;
@@ -442,8 +448,7 @@
442 448
                     Message.warning("请选择一条记录进行付款修改!", 1500);
443 449
                 } else if (data[0].spzt == "作废") {
444 450
                     Message.warning("该报账已作废!", 1500);
445
-                }
446
-                 else {
451
+                } else {
447 452
                     xmApproval = {
448 453
                         "fysq": data[0].fysq,
449 454
                         "fysqmc": data[0].fysqmc,
@@ -458,7 +463,7 @@
458 463
                         maxmin: true,
459 464
                         shadeClose: true,
460 465
                         area: ['1000px', '750px'],
461
-                        content: AjaxUtil.ctx + "staReimbursement/forUpdate/" +data[0].id,
466
+                        content: AjaxUtil.ctx + "staReimbursement/forUpdate/" + data[0].id,
462 467
                         end: function () {
463 468
                             if (updateflag == 1)
464 469
                                 currTable.reload();
@@ -467,8 +472,7 @@
467 472
                         }
468 473
                     });
469 474
                 }
470
-            }
471
-            else if (obj.event === 'nullify') {  // 监听删除操作
475
+            } else if (obj.event === 'nullify') {  // 监听删除操作
472 476
                 var projects = table.cache["currentTableId"];
473 477
                 if (projects.length == 0)
474 478
                     return;
@@ -511,8 +515,7 @@
511 515
                         });
512 516
                     });
513 517
                 }
514
-            }
515
-            else if (obj.event === 'exportExcel') {
518
+            } else if (obj.event === 'exportExcel') {
516 519
                 var projects = table.cache["currentTableId"];
517 520
                 if (projects.length == 0)
518 521
                     return;
@@ -521,8 +524,7 @@
521 524
                 a.href = AjaxUtil.ctx + 'staReimbursement/exportExcel';
522 525
                 a.click();
523 526
                 a.parentNode.removeChild(a);
524
-            }
525
-            else if(obj.event==='tjrevokeApprove'){
527
+            } else if (obj.event === 'tjrevokeApprove') {
526 528
                 var projects = table.cache["currentTableId"];
527 529
                 if (projects.length == 0)
528 530
                     return;
@@ -535,16 +537,16 @@
535 537
                 } else if (data[0].spzt == "审批结束") {
536 538
                     Message.warning("该报账已审批结束!", 1500);
537 539
                 }
538
-                //else if (data[0].cjr!= userId) {
540
+                    //else if (data[0].cjr!= userId) {
539 541
 
540
-                    //Message.error("您不是改报账的创建人!", 1500);}
542
+                //Message.error("您不是改报账的创建人!", 1500);}
541 543
                 else {
542 544
                     xmApproval = {
543 545
                         "xmid": data[0].id,
544 546
                         "xm": data[0].zwmc,
545 547
                         "zt": "未提交"
546 548
                     };
547
-                    if(data[0].spzt == null) {
549
+                    if (data[0].spzt == null) {
548 550
                         xmApproval.zt = "未提交";
549 551
                         data[0].spzt = "未提交";
550 552
                     }
@@ -592,6 +594,7 @@
592 594
             });
593 595
         });
594 596
     });
597
+
595 598
     function getXmApproval() {
596 599
         return xmApproval;
597 600
     }

+ 1 - 1
src/main/resources/templates/stabudgetapproval/connect_project.html

@@ -513,7 +513,7 @@
513 513
                 searchPlaceholder: '搜索费用名称',
514 514
                 table: {
515 515
                     url: AjaxUtil.ctx + 'staBudgetapproval/getSubNode/' + ysId,
516
-                    method: 'post',
516
+                    method: 'get',
517 517
                     cols: [
518 518
                         [
519 519
                             {type: "radio", fixed: 'left'},

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

@@ -89,6 +89,14 @@
89 89
                                        readonly>
90 90
                             </div>
91 91
                         </div>
92
+                        <div class="layui-form-item layui-inline">
93
+                            <label class="layui-form-label" style="width: 80px; margin-left: -5px">不含税金额(元)</label>
94
+                            <div class="layui-input-inline" style="width: 380px">
95
+                                <input type="number" id="bhsje" name="bhsje" class="layui-input" lay-verify="required"
96
+                                       lay-reqtext="不含税金额不能为空" autocomplete="off" th:value="${budgetapproval.bhsje}"
97
+                                       readonly>
98
+                            </div>
99
+                        </div>
92 100
                         <div class="layui-form-item layui-inline" style="width: 100%; display: none" id="clfDiv">
93 101
                             <label class="layui-form-label" style="width: 75px">差旅费</label>
94 102
                             <div class="layuimini-container" style="width: 855px; margin-left: 103px">

+ 37 - 36
src/main/resources/templates/stafeemanage/list_allapply.html

@@ -92,7 +92,7 @@
92 92
                         <div class="layui-inline">
93 93
                             <label class="layui-form-label required" style="width: 60px">所属部门</label>
94 94
                             <div class="layui-input-block" style="width: 200px;left:-20px">
95
-                                <input type="text" id="ssbmmc" name="ssbmmc" >
95
+                                <input type="text" id="ssbmmc" name="ssbmmc">
96 96
                             </div>
97 97
                         </div>
98 98
                         <div class="layui-inline" style="left: -10px">
@@ -172,32 +172,32 @@
172 172
                 <!--                <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="nullify">-->
173 173
                 <!--                    <i class="layui-icon layui-icon-delete" style="font-size: 10px;"></i>作废-->
174 174
                 <!--                </button>-->
175
-<!--                                <button class="layui-btn layui-btn-sm" lay-event="exportExcel">-->
176
-<!--                                    <i class="layui-icon layui-icon-export" style="font-size: 10px;"></i>导出-->
177
-<!--                                </button>-->
178
-<!--                else if (obj.event === 'exportExcel') {  // 监听查看操作-->
179
-<!--                var projects = table.cache["currentTableId"];-->
180
-<!--                if (projects.length == 0)-->
181
-<!--                return;-->
182
-
183
-<!--                var checkStatus = table.checkStatus('currentTableId')-->
184
-<!--                , data = checkStatus.data;-->
185
-<!--                if (data == null || data.length === 0) {-->
186
-<!--                Message.warning("请选择要导出的费用申请!", 1500);-->
187
-<!--                } else if (data.length > 1) {-->
188
-<!--                Message.warning("请选择一条记录进行导出!", 1500)-->
189
-<!--                } else {-->
190
-<!--                layer.confirm('是否确定导出费用申请——'+data[0].zwmc+'?', {-->
191
-<!--                btn: ['导出', '取消']-->
192
-<!--                }, function(index, layero){-->
193
-<!--                window.location.href=AjaxUtil.ctx + "staBudgetapproval/exportWord/" + data[0].id;-->
194
-<!--                layer.close(index);-->
195
-
196
-<!--                }, function(index){-->
197
-
198
-<!--                });-->
199
-<!--                }-->
200
-<!--                }-->
175
+                <!--                                <button class="layui-btn layui-btn-sm" lay-event="exportExcel">-->
176
+                <!--                                    <i class="layui-icon layui-icon-export" style="font-size: 10px;"></i>导出-->
177
+                <!--                                </button>-->
178
+                <!--                else if (obj.event === 'exportExcel') {  // 监听查看操作-->
179
+                <!--                var projects = table.cache["currentTableId"];-->
180
+                <!--                if (projects.length == 0)-->
181
+                <!--                return;-->
182
+
183
+                <!--                var checkStatus = table.checkStatus('currentTableId')-->
184
+                <!--                , data = checkStatus.data;-->
185
+                <!--                if (data == null || data.length === 0) {-->
186
+                <!--                Message.warning("请选择要导出的费用申请!", 1500);-->
187
+                <!--                } else if (data.length > 1) {-->
188
+                <!--                Message.warning("请选择一条记录进行导出!", 1500)-->
189
+                <!--                } else {-->
190
+                <!--                layer.confirm('是否确定导出费用申请——'+data[0].zwmc+'?', {-->
191
+                <!--                btn: ['导出', '取消']-->
192
+                <!--                }, function(index, layero){-->
193
+                <!--                window.location.href=AjaxUtil.ctx + "staBudgetapproval/exportWord/" + data[0].id;-->
194
+                <!--                layer.close(index);-->
195
+
196
+                <!--                }, function(index){-->
197
+
198
+                <!--                });-->
199
+                <!--                }-->
200
+                <!--                }-->
201 201
             </div>
202 202
         </script>
203 203
 
@@ -215,14 +215,14 @@
215 215
     var updateflag = 0;
216 216
     var fyApproval = {};
217 217
 
218
-    layui.use(['form', 'table', 'tableSelect', 'laydate','layCascader'], function () {
218
+    layui.use(['form', 'table', 'tableSelect', 'laydate', 'layCascader'], function () {
219 219
         var form = layui.form,
220 220
             tableSelect = layui.tableSelect,
221 221
             laydate = layui.laydate,
222 222
             table = layui.table;
223
-            layCascader = layui.layCascader;
223
+        layCascader = layui.layCascader;
224 224
         var userId = $("#userId").val();
225
-
225
+        var cascader;
226 226
         var sqsj1 = '',
227 227
             sqsj2 = '';
228 228
         //申请时间
@@ -264,12 +264,11 @@
264 264
                     item.label = item.deptName;
265 265
                     datalist.push(item);
266 266
                 }
267
-                console.log(datalist)
268 267
                 // 扁平数据转树
269 268
                 var options = arrayToTree(datalist, "0");
270 269
 
271 270
                 // 初始化cascader实例
272
-                var cascader = layCascader({
271
+                cascader = layCascader({
273 272
                     elem: '#ssbmmc',
274 273
                     clearable: true,
275 274
                     showAllLevels: false, // 配置仅显示最后一级
@@ -284,7 +283,6 @@
284 283
                     // 主动关闭面板
285 284
                     cascader.close();
286 285
                     $("#deptId").val(value);
287
-                    console.log(node);
288 286
                 });
289 287
             },
290 288
             error: function (error) {
@@ -362,7 +360,7 @@
362 360
             limit: 10,
363 361
             page: true,
364 362
             skin: 'grid',
365
-            parseData: function (res)   { //res 即为原始返回的数据
363
+            parseData: function (res) { //res 即为原始返回的数据
366 364
                 return {
367 365
                     "code": res.code, //解析接口状态
368 366
                     "msg": res.message, //解析提示文本
@@ -402,9 +400,10 @@
402 400
                 "spzt": '',
403 401
                 "sfbz": '',
404 402
                 "dkyfzr": '',
405
-                "sqsj1":'',
406
-                "sqsj2":''
403
+                "sqsj1": '',
404
+                "sqsj2": ''
407 405
             });
406
+            cascader.reload();
408 407
             // 执行搜索重载
409 408
             currTable.reload({
410 409
                 page: {
@@ -840,11 +839,13 @@
840 839
     function getXmApproval() {
841 840
         return xmApproval;
842 841
     }
842
+
843 843
     function arrayToTree(data, firstPid) {
844 844
         const result = [];
845 845
         getChildren(data, result, firstPid)
846 846
         return result;
847 847
     }
848
+
848 849
     function getChildren(data, result, parentId) {
849 850
         for (const item of data) {
850 851
             if (item.parentId === parentId) {

+ 1 - 1
src/main/resources/templates/stasourcefee/add_apply.html

@@ -610,7 +610,7 @@
610 610
             searchPlaceholder: '搜索费用名称',
611 611
             table: {
612 612
                 url: AjaxUtil.ctx + 'staBudgetapproval/getSubNode/' + ysId,
613
-                method: 'post',
613
+                method: 'get',
614 614
                 cols: [
615 615
                     [
616 616
                         {type: "radio", fixed: 'left'},

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

@@ -24,14 +24,6 @@
24 24
             <tip>此为用于登陆的账号</tip>
25 25
         </div>
26 26
     </div>
27
-    <div class="layui-form-item">
28
-        <label class="layui-form-label required">密码</label>
29
-        <div class="layui-input-block">
30
-            <input type="password" name="password" lay-verify="required" lay-reqtext="密码不能为空" autocomplete="off"
31
-                   class="layui-input">
32
-            <tip font-color="red">此为用于登陆的密码</tip>
33
-        </div>
34
-    </div>
35 27
 
36 28
     <div class="layui-form-item">
37 29
         <label class="layui-form-label required">姓名</label>