Browse Source

张丁 测试作业票流程3.0

zhangding 3 years ago
parent
commit
67cfa8ac69

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

@@ -154,7 +154,7 @@ public class TApproveReserveInvoiceController extends BaseController {
                 case " 维修厂房":
                 case "危废车库":
 //                    devSupId="20332,20250,20276";
-                    devSupId = "10081,10082";
+                    devSupId = "10081";
                     break;
             }
         }

+ 14 - 2
master/src/main/java/com/ruoyi/project/listener/invoiceApprove/InvoiceEndSuccessListener.java

@@ -260,14 +260,14 @@ public class InvoiceEndSuccessListener implements Serializable, ExecutionListene
             if(tApproveReserveInvoice.getDevEngineerId()!=null) {
                 if (!params.containsKey("zjgcs")) {
                     SysUser sysUser = sysUserService.selectUserById(tApproveReserveInvoice.getDevEngineerId());
-                    params.put("zjgcs",sysUser.getSignUrl());
+                    params.put("zjgcs",fileName(sysUser.getSignUrl()));
                 }
             }
             //装置经理(副)  如果涉及
             if(tApproveReserveInvoice.getManagerconId()!=null) {
                 if (!params.containsKey("zzjl")) {
                     SysUser sysUser = sysUserService.selectUserById(tApproveReserveInvoice.getManagerconId());
-                    params.put("zzjl",sysUser.getSignUrl());
+                    params.put("zzjl",fileName(sysUser.getSignUrl()));
                 }
             }
             content.delete(0, content.length());
@@ -309,4 +309,16 @@ public class InvoiceEndSuccessListener implements Serializable, ExecutionListene
         String pathFileName = FileUploadUtils.getPathFileName(RuoYiConfig.getFilePath("/"+ "ticketWord"), fileName);
         return pathFileName;
     }
+
+    /**
+     *
+     * @param
+     * @return  映射签名的文件名
+     * @throws IOException
+     */
+    public String fileName(String filepath) {
+        String newFilePath=filepath.replace("/profile","");
+        String pathName=RuoYiConfig.getProfile()+newFilePath;
+        return pathName;
+    }
 }

BIN
master/src/main/resources/static/word/invoice/book.docx


+ 14 - 8
ui/src/views/invoice/approveinvoice/index.vue

@@ -231,7 +231,6 @@ export default {
     })
     // this.getList();
     this.getTreeselect();
-    this.getTreeselect();
 
   },
   methods: {
@@ -289,20 +288,24 @@ export default {
       this.form.devSupId=10081;
       this.form.devEngineerId=10082;
       this.form.managerconId=10084;
-      console.log(rows)
+      console.log(this.form)
       this.devList = rows;
       console.log(this.devList)
-      if (rows[0].workStartTime === rows[0].createdate)
-        this.isToday = true;
+      if (rows[0].bookingworkticket.workStartTime === rows[0].createdate){
+          this.isToday = true;
+          this.form.isToday = 1;
+      }
+   
       if (rows[0].workType === 1 || rows[0].workType === 2 || rows[0].workType === 15) {
         this.isSpecial = true;
+         this.form.isSpecial = 1;
       }
       this.form.invoiceId=rows[0].bookingticketId;
       listPostUser({
         // postCode: 'wxjl'
       }).then(response => {
         this.managerOptions = response;
-        console.log(this.managerOptions)
+    //    console.log(this.managerOptions)
       });
       this.visible = true
     },
@@ -318,15 +321,18 @@ export default {
               this.form.files.push(obj)
             }
           }
-          if (this.form.workStartTime && this.form.workStartTime === this.form.createdate)
-            this.form.isToday = 1;
+
+          if (this.form.workStartTime && this.form.workStartTime === this.form.createdate){
+               this.form.isToday = 1;
+          }
+      
           if (this.form.workType === 1 || this.form.workType === 2 || this.form.workType === 15) {
             this.form.isSpecial = 1;
           }
           addInvoice(this.form).then(response => {
             this.msgSuccess(this.$t('新增成功'));
             this.visible = false;
-            // this.getList();
+             this.getList();
           })
         }
       });

+ 7 - 7
ui/src/views/invoice/bookingworkticket/index.vue

@@ -504,6 +504,7 @@ export default {
         userMg: null,
          userUnit: null
       },
+      //申请的参数
       approveForm:{},
       // 表单参数
       form: {  },
@@ -608,15 +609,14 @@ export default {
         }
       }
       this.$nextTick(() => {
-
         this.approveForm.invoiceId=row.bookingticketId;
-        if (row.bookingworkticket.workStartTime && row.bookingworkticket.workStartTime === row.createdate)
-          this.approveForm.isToday = 1;
-        this.ruleForm.forEach(item=>{
-          if (item.workType===1||item.workType===2||item.workType===3||item.workType===15){
-            this.approveForm.isSpecial = 1;
+        if (row.bookingworkticket.workStartTime && row.bookingworkticket.workStartTime === row.createdate){
+              this.approveForm.isToday = 1;
+        }
+         //判断是否涉及 动火 和当日 
+          if (row.workType===1||row.workType===2||row.workType===3||row.workType===15){
+            this.approveForm.isSpecial = 1
           }
-        })
 
         this.approveForm.userSupId=10000;
         this.approveForm.devSupId=10081;