Procházet zdrojové kódy

代办业务逻辑

zishan-an před 11 měsíci
rodič
revize
e381d707bb

+ 2 - 2
src/api/index.js

@@ -257,9 +257,9 @@ export function findBusinessInfoByNum(businessNum){
     })
 }
 
-export function findCustomInfoByNum(businessNum){
+export function findCustomInfoByHead(headInfId){
     return request({
-        url: '/business/findCustomInfoByNum/'+ businessNum ,
+        url: '/business/findCustomInfoByHead/'+ headInfId ,
         method: 'get',
     })
 }

+ 27 - 17
src/views/system/businessInfoToDo.vue

@@ -245,7 +245,7 @@ import {
   reportFileDelete,
   fileDownload,
   findBusinessInfoByNum,
-  findCustomInfoByNum,
+  findCustomInfoByHead,
   reportFileList,
   templateDel,
   fieldTemplateEdit,
@@ -301,7 +301,8 @@ export default {
       parseLen:"",
       modelLen:"",
 
-      businessNum : this.$route.query.businessNum
+      businessNum : this.$route.query.businessNum,
+      headInfId : this.$route.query.headInfId,
     }
   },
   watch: {},
@@ -318,12 +319,12 @@ export default {
           console.log(this.businessInfoData)
         }
     ),
-        // findCustomInfoByNum(this.businessNum).then(
-        //     res=>
-        //     {
-        //       this.customInfoData=res.data.custom_info;
-        //     }
-        // )
+        findCustomInfoByHead(this.headInfId).then(
+            res=>
+            {
+              this.customInfoData=res.data.custom_info;
+            }
+        )
     reportFileList(this.businessNum).then(
         res=>
         {
@@ -340,8 +341,13 @@ export default {
                 }
                 this.reportFileData1.push(litem)
               }
-            }else if(item.fileNameModel=="1"){
-              this.reportFileData2.push(item)
+            }else if(item.fileNameModel){
+              let litem = {
+                id:item.id,
+                fileNameXml:item.fileNameModel,
+                createTime:item.createTime
+              }
+              this.reportFileData2.push(litem)
             }
           }
           this.parseLen = this.reportFileData1.length
@@ -370,7 +376,8 @@ export default {
       this.isCollapse = !this.isCollapse;
     },
     handleSelectionChange(selection) {
-      this.downSelected = selection.map(item => item.fileName)
+      this.downSelected = selection.map(item => item.fileNameXml)
+      console.log(this.downSelected)
       if(this.downSelected.length!=this.parseLen){
         this.selectedAll = false
       }
@@ -382,20 +389,20 @@ export default {
       else this.selectedAll = false
       if(this.selectedAll) {
         for (let i = 0; i < this.reportFileData1.length; i++) {
-          if (!this.downSelected.includes(this.reportFileData1[i].fileName)) {
+          if (!this.downSelected.includes(this.reportFileData1[i].fileNameXml)) {
             // 回显数据里没有本条,把这条加进来(选中)
-            this.downSelected.push(this.reportFileData1[i].fileName);
+            this.downSelected.push(this.reportFileData1[i].fileNameXml);
           }
         }}
       else {
          this.reportFileData1.forEach((item, index) => {
-              this.downSelected.splice(index.fileName, 1);
+              this.downSelected.splice(index.fileNameXml, 1);
               });
     }
     },
 
     handleSelectionChange2(selection) {
-      this.downSelected2 = selection.map(item => item.fileName)
+      this.downSelected2 = selection.map(item => item.fileNameXml)
       if(this.downSelected2.length!=this.modelLen){
         this.selectedAll2 = false
       }
@@ -407,9 +414,9 @@ export default {
       else this.selectedAll2 = false
       if(this.selectedAll2) {
         for (let i = 0; i < this.reportFileData2.length; i++) {
-          if (!this.downSelected2.includes(this.reportFileData2[i].fileName)) {
+          if (!this.downSelected2.includes(this.reportFileData2[i].fileNameXml)) {
             // 回显数据里没有本条,把这条加进来(选中)
-            this.downSelected2.push(this.reportFileData2[i].fileName);
+            this.downSelected2.push(this.reportFileData2[i].fileNameXml);
           }
         }}
       else {
@@ -527,8 +534,11 @@ export default {
         }, 100));
       }, 100)
     },
+
+    //1.2 上传方法具体实现重写
     upload(){
       let fd = new FormData();
+
       this.fileList.forEach(item=>{
         //文件信息中raw才是真的文件
         fd.append("files",item.raw);

+ 3 - 1
src/views/system/businesstodo.vue

@@ -159,6 +159,7 @@ export default {
         {
           this.businessData=res.data.business_todo_list.list;
           this.businessShowData = this.businessData
+          console.log(this.businessShowData)
           var j = parseInt(res.data.business_todo_list.total)
           this.totalSize = j
           this.showSize = this.totalSize
@@ -304,7 +305,8 @@ export default {
       this.$router.push({
         path: '/businessInfoToDo',
         query: {
-          businessNum : row.businessNum
+          businessNum : row.businessNum,
+          headInfId:row.headInfId
         }
       })
     },