Browse Source

登录页面、项目转移bug 修改

ly 1 month ago
parent
commit
917dc69436

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

@@ -171,7 +171,7 @@ public class HomeController extends BaseController {
171
 
171
 
172
             return BaseResult.success("登录成功!");
172
             return BaseResult.success("登录成功!");
173
         } else {
173
         } else {
174
-            return BaseResult.success("登录失败!");
174
+            return BaseResult.failure(1,"密码错误,登录失败!");
175
         }
175
         }
176
     }
176
     }
177
 
177
 

+ 24 - 22
src/main/java/com/liang/controller/StaBudgetapprovalController.java

@@ -2077,38 +2077,40 @@ public class StaBudgetapprovalController extends BaseController {
2077
     @RequestMapping(value = "bgbm",method = RequestMethod.POST)
2077
     @RequestMapping(value = "bgbm",method = RequestMethod.POST)
2078
     public BaseResult bgbm(@RequestBody String formData){
2078
     public BaseResult bgbm(@RequestBody String formData){
2079
 
2079
 
2080
+        // 解析JSON 为对象
2080
         StaBudgetapproval sta = JsonTool.parseObject(formData,StaBudgetapproval.class);
2081
         StaBudgetapproval sta = JsonTool.parseObject(formData,StaBudgetapproval.class);
2081
         StaBudgetapproval staBudgetapproval = staBudgetapprovalService.queryById(sta.getId());
2082
         StaBudgetapproval staBudgetapproval = staBudgetapprovalService.queryById(sta.getId());
2082
         // 增加审批列表留痕选项
2083
         // 增加审批列表留痕选项
2083
         // 获取当前系统时间
2084
         // 获取当前系统时间
2084
-        Date data = new Date();
2085
         // 转换时间格式
2085
         // 转换时间格式
2086
+        Date data = new Date();
2086
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
2087
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
2087
         // 审批列表记录
2088
         // 审批列表记录
2088
-        PrjApproverecord prjApproverecord = new PrjApproverecord();
2089
-        prjApproverecord.setTablename("sta_BudgetApproval");
2090
-        prjApproverecord.setXmid(staBudgetapproval.getXmid());
2091
-        prjApproverecord.setYj( "项目名称:"+staBudgetapproval.getXmmc()+",ERP编号:"+staBudgetapproval.getErpbh()+","+"'部门'从'"+
2092
-                staBudgetapproval.getSsbmmc()+"'转移至'"+sta.getSsbmmc()+","+
2093
-                ",操作员:"+
2094
-                sysUserInfoService.queryById(getSysUserId()).getName());
2095
-        prjApproverecord.setSfsjsh(true);
2096
-        prjApproverecord.setSjshr(getSysUserId());
2097
-        prjApproverecord.setShsj(format.format(data));
2098
-        prjApproverecord.setTjsj(format.format(data));
2099
-        prjApproverecord.setTjr(getSysUserId());
2100
-        prjApproverecord.setShr(getSysUserId());
2101
-        prjApproverecord.setSpcz("项目转移");
2102
-        prjApproverecord.setXm(staBudgetapproval.getXmmc());
2103
-        prjApproverecord.setZt("已完成");
2104
-        prjApproverecord.setWc(true);
2105
         if (staBudgetapproval != null){
2089
         if (staBudgetapproval != null){
2106
-            staBudgetapproval.setSsbm(staBudgetapproval.getSsbm());
2107
-            int num = staBudgetapprovalService.update(staBudgetapproval);
2090
+            staBudgetapproval.setSsbm(Integer.parseInt(sta.getSsbmmc()));
2091
+            int num = staBudgetapprovalService.updatebmbg(staBudgetapproval);
2108
             if (num > 0){
2092
             if (num > 0){
2093
+                PrjApproverecord prjApproverecord = new PrjApproverecord();
2094
+                prjApproverecord.setTablename("sta_BudgetApproval");
2095
+                prjApproverecord.setXmid(staBudgetapproval.getXmid());
2096
+                prjApproverecord.setYj( "项目名称:"+staBudgetapproval.getXmmc()+",ERP编号:"+staBudgetapproval.getErpbh()+","+"'部门'从'"+
2097
+                        staBudgetapproval.getSsbmmc()+"'转移至'"+sta.getSsbmmc()+","+
2098
+                        ",操作员:"+
2099
+                        sysUserInfoService.queryById(getSysUserId()).getName());
2100
+                prjApproverecord.setSfsjsh(true);
2101
+                prjApproverecord.setSjshr(getSysUserId());
2102
+                prjApproverecord.setShsj(format.format(data));
2103
+                prjApproverecord.setTjsj(format.format(data));
2104
+                prjApproverecord.setTjr(getSysUserId());
2105
+                prjApproverecord.setShr(getSysUserId());
2106
+                prjApproverecord.setSpcz("项目转移");
2107
+                prjApproverecord.setXm(staBudgetapproval.getXmmc());
2108
+                prjApproverecord.setZt("已完成");
2109
+                prjApproverecord.setWc(true);
2109
                 int muns = prjApproverecordService.insert(prjApproverecord);
2110
                 int muns = prjApproverecordService.insert(prjApproverecord);
2110
-                return  BaseResult.success("'"+staBudgetapproval.getErpbh()+"'部门转移成功!");
2111
-
2111
+                if (muns > 0){
2112
+                    return  BaseResult.success("'"+staBudgetapproval.getErpbh()+"'部门转移成功!");
2113
+                }
2112
             }
2114
             }
2113
         }
2115
         }
2114
             return BaseResult.failure(-1, "数据转移失败!");
2116
             return BaseResult.failure(-1, "数据转移失败!");

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

@@ -82,6 +82,8 @@ public interface StaBudgetapprovalDao {
82
      * @return 影响行数
82
      * @return 影响行数
83
      */
83
      */
84
     int update(StaBudgetapproval staBudgetapproval);
84
     int update(StaBudgetapproval staBudgetapproval);
85
+
86
+    int updatebmbg(StaBudgetapproval staBudgetapproval);
85
     int updateImprest(StaBudgetapproval staBudgetapproval);
87
     int updateImprest(StaBudgetapproval staBudgetapproval);
86
     int ImprestConnect(StaBudgetapproval staBudgetapproval);
88
     int ImprestConnect(StaBudgetapproval staBudgetapproval);
87
 
89
 

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

@@ -142,7 +142,9 @@ public class StaBudgetapproval implements Serializable {
142
     /**
142
     /**
143
      * 所属部门
143
      * 所属部门
144
      */
144
      */
145
+
145
     private Integer ssbm;
146
     private Integer ssbm;
147
+
146
     @JsonProperty("ssbmmc")
148
     @JsonProperty("ssbmmc")
147
     private String ssbmmc;
149
     private String ssbmmc;
148
     /**
150
     /**

+ 2 - 0
src/main/java/com/liang/service/StaBudgetapprovalService.java

@@ -50,6 +50,8 @@ public interface StaBudgetapprovalService {
50
      * @return 实例对象
50
      * @return 实例对象
51
      */
51
      */
52
     int update(StaBudgetapproval staBudgetapproval);
52
     int update(StaBudgetapproval staBudgetapproval);
53
+
54
+    int updatebmbg(StaBudgetapproval staBudgetapproval);
53
     int updateImprest(StaBudgetapproval staBudgetapproval);
55
     int updateImprest(StaBudgetapproval staBudgetapproval);
54
     int ImprestConnect(StaBudgetapproval staBudgetapproval);
56
     int ImprestConnect(StaBudgetapproval staBudgetapproval);
55
 
57
 

+ 4 - 0
src/main/java/com/liang/service/impl/StaBudgetapprovalServiceImpl.java

@@ -279,5 +279,9 @@ public class StaBudgetapprovalServiceImpl implements StaBudgetapprovalService {
279
         return this.staBudgetapprovalDao.getSqe(map);
279
         return this.staBudgetapprovalDao.getSqe(map);
280
     }
280
     }
281
 
281
 
282
+    @Override
283
+    public int updatebmbg(StaBudgetapproval staBudgetapproval){
284
+        return this.staBudgetapprovalDao.updatebmbg(staBudgetapproval);
285
+    };
282
 
286
 
283
 }
287
 }

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

@@ -352,6 +352,12 @@
352
             ,SF = #{sf}
352
             ,SF = #{sf}
353
         where ID = #{id}
353
         where ID = #{id}
354
     </update>
354
     </update>
355
+    <update id="updatebmbg">
356
+        update sta_BudgetApproval
357
+        set SSBM = #{ssbm}
358
+        where ID = #{id}
359
+    </update>
360
+
355
     <!--    修改方法-->
361
     <!--    修改方法-->
356
     <!--通过主键修改基础数据-->
362
     <!--通过主键修改基础数据-->
357
     <update id="updateImprest">
363
     <update id="updateImprest">

+ 12 - 2
src/main/resources/templates/login/login.html

@@ -356,7 +356,13 @@
356
         var layer = layui.layer;
356
         var layer = layui.layer;
357
         var loginStatus = [[${loginStatus}]];
357
         var loginStatus = [[${loginStatus}]];
358
         if (loginStatus === 'redirect') {
358
         if (loginStatus === 'redirect') {
359
-            layer.alert("会话已过期,请重新登录")
359
+            Message.error("会话已过期,请重新登录!");/*
360
+            layNotify.notice({
361
+                title: "登录提示",
362
+                type: "warning",
363
+                message: "会话已过期,请重新登录"
364
+            });*/
365
+            return false;
360
         }
366
         }
361
         // 登录过期的时候,跳出ifram框架
367
         // 登录过期的时候,跳出ifram框架
362
         if (top.location != self.location) {
368
         if (top.location != self.location) {
@@ -469,7 +475,11 @@
469
                             message: res.message
475
                             message: res.message
470
                         });
476
                         });
471
                         // document.getElementById("ver_btn").click();
477
                         // document.getElementById("ver_btn").click();
472
-                        document.getElementById("captcha").value = '';
478
+                        // 验证码刷新
479
+                       /* document.getElementById("captcha").value = '';*/
480
+                        document.getElementById("password").value = '';
481
+                        console.log(res.message);
482
+                        // 阻止后续操作
473
                     }
483
                     }
474
                 },
484
                 },
475
                 error: function (error) {
485
                 error: function (error) {

+ 2 - 1
src/main/resources/templates/stabudgetapproval/bmbg.html

@@ -249,7 +249,8 @@
249
                             setTimeout(function () {
249
                             setTimeout(function () {
250
                                 var index = parent.layer.getFrameIndex(window.name);
250
                                 var index = parent.layer.getFrameIndex(window.name);
251
                                 parent.layer.close(index);
251
                                 parent.layer.close(index);
252
-                            },1000);
252
+                            },500);
253
+
253
 
254
 
254
                         });
255
                         });
255
                         // 获取弹框 并关闭弹
256
                         // 获取弹框 并关闭弹

+ 4 - 4
src/main/resources/templates/stabudgetapproval/update_approve.html

@@ -239,10 +239,10 @@
239
                     url: AjaxUtil.ctx + 'sysUserPost/postUserlist/' + postId,
239
                     url: AjaxUtil.ctx + 'sysUserPost/postUserlist/' + postId,
240
                     cols: [
240
                     cols: [
241
                         [
241
                         [
242
-                            {type: "radio", fixed: 'left'},
243
-                            {type: 'numbers', align: 'center'},
244
-                            {field: 'name', width: '40%', title: '姓名', align: 'left'},
245
-                            {field: 'account', title: '账号', align: 'left'}
242
+                            {type: "radio", fixed: 'left',title: '😊'},
243
+                            {type: 'numbers', align: 'center',title: '序号',width: '7%'},
244
+                            {field: 'name', width: '40%', title: '姓名', align: 'left',},
245
+                            {field: 'account', title: '账号', align: 'left',width: '40%'}
246
                         ]
246
                         ]
247
                     ]
247
                     ]
248
                 },
248
                 },

+ 3 - 6
src/main/resources/templates/stafeemanage/list_allapply.html

@@ -850,8 +850,6 @@
850
 
850
 
851
                     }
851
                     }
852
                 });
852
                 });
853
-
854
-
855
             } else if (obj.event === 'xmzy') {
853
             } else if (obj.event === 'xmzy') {
856
                 var project = table.cache['currentTableId'];//  绑定表格元素 cache 表示缓存的意思
854
                 var project = table.cache['currentTableId'];//  绑定表格元素 cache 表示缓存的意思
857
                 // 判断缓存是否为空
855
                 // 判断缓存是否为空
@@ -876,13 +874,12 @@
876
                         shadeClose: true,
874
                         shadeClose: true,
877
                         area: ['1090px', layerheight + 'px'],
875
                         area: ['1090px', layerheight + 'px'],
878
                         content: AjaxUtil.ctx + 'staBudgetapproval/updateSsbm?id=' + data[0].id,
876
                         content: AjaxUtil.ctx + 'staBudgetapproval/updateSsbm?id=' + data[0].id,
879
-                        success: function (layero, index) {
880
-                        },
881
                         end: function (index) {
877
                         end: function (index) {
882
                             // 刷新表格
878
                             // 刷新表格
883
-                            if (updateflag == 1)
879
+                            if (updateflag == 1){
884
                                 currTable.reload();
880
                                 currTable.reload();
885
-                            updateflag = 0;
881
+                                updateflag = 0;
882
+                            }
886
                         }
883
                         }
887
                     });
884
                     });
888
                 }
885
                 }