Преглед на файлове

-修复了用户主管修改申请时页面不刷新的问题
-修复了当用户主管修改申请时该申请人不再是承包商的问题

jiangbiao преди 3 години
родител
ревизия
c82bf3c6e1

+ 4 - 2
master/src/main/java/com/ruoyi/project/invoice/controller/TApproveReserveInvoiceController.java

@@ -119,14 +119,15 @@ public class TApproveReserveInvoiceController extends BaseController {
         Long userid = getUserId();
         tApproveReserveInvoice.setUserId(userid);
         tApproveReserveInvoice.setApNo(DateUtils.dateTimeNow() + userid);
-        Authentication.setAuthenticatedUserId(userid.toString());
         tApproveReserveInvoiceService.insertTApproveReserveInvoice(tApproveReserveInvoice);
         long bussniseeKey = tApproveReserveInvoice.getId();
         String[] ids;
         ids = tApproveReserveInvoice.getInvoiceId().split(",");
         String devSupId = "";
+        String applyUser = "";
         for (String id : ids) {
             TInvoiceBookingworkticket invoice = workService.getById(id);
+            applyUser=invoice.getCreaterCode().toString();
             invoice.setStatus(0L);
             workService.updateById(invoice);
             switch (invoice.getWorkArea()) {
@@ -166,8 +167,9 @@ public class TApproveReserveInvoiceController extends BaseController {
             }
         }
         //开始工作流、监听
+        Authentication.setAuthenticatedUserId(applyUser);
         Map<String, Object> variables = new HashMap<>();
-        variables.put("applyUser", userid.toString());
+        variables.put("applyUser", applyUser);
         variables.put("yhzgusers", tApproveReserveInvoice.getUserSupId().toString());//用户主管
         variables.put("zzzgusers", devSupId);//装置主管
         SysUser sysUser = new SysUser();

+ 4 - 4
ui/src/views/approve/approveDetail/invoice-detail.vue

@@ -781,7 +781,6 @@ export default {
       handleApprove(this.taskForm).then(response => {
         this.submitDisabled = false
         this.msgSuccess(this.$t('处理成功'));
-        this.$emit('refreshDataList')
         //多重校验
         Promise.all(arr.map(this.getFormPromise)).then(res => {
           const validateResult = res.every(item => !!item);
@@ -811,11 +810,12 @@ export default {
                 addInvoice(this.approveForm).then(response => {
                   // this.msgSuccess(this.$t('预约成功'));
                   this.msgSuccess("已提交申请");
+
+                  this.open = false;
+                  this.visible = false;
+                  this.$emit('refreshDataList')
                 })
                 this.msgSuccess("修改成功");
-                this.open = false;
-                this.visible = false;
-                this.getList();
               });
             }
           } else {