wangguangping преди 3 години
родител
ревизия
88c9aa4b77
променени са 2 файла, в които са добавени 111 реда и са изтрити 20 реда
  1. 56 10
      src/pages/main/meetingDeclaration/marketDecisionMeeting.vue
  2. 55 10
      src/pages/main/meetingDeclaration/specialReport.vue

+ 56 - 10
src/pages/main/meetingDeclaration/marketDecisionMeeting.vue

@@ -21,7 +21,7 @@
                             :key="i"
                             :label="`${i}月`"
                             :value="`${i}`"
-                        > 
+                        >
                         </el-option>
                     </el-select>
                 </div>
@@ -124,7 +124,12 @@
                     </el-table-column>
                     <el-table-column prop="reporting" label="汇报时长(小时)">
                     </el-table-column>
-                    <el-table-column label="操作" width="150px" align="center" fixed="right">
+                    <el-table-column
+                        label="操作"
+                        width="150px"
+                        align="center"
+                        fixed="right"
+                    >
                         <template slot-scope="scope">
                             <el-button
                                 size="mini"
@@ -549,16 +554,16 @@ export default {
 
                 this.getInfo(n.id);
                 this.mId = n.id;
-
             } else if (v === 2) {
                 this.titname = "上传";
                 this.uploadDialogStatus = true;
-
+                
+                this.attList = [];
+                this.fileInfo.fileList = [];
                 this.infolist.serialNumber = this.$formatDate(
                     new Date().getTime(),
                     "YYYYMMDDHHmmss"
                 );
-
                 if (this.personInfo.length === 2) {
                     this.$set(this.infolist, "dept", this.personInfo[1]);
                 } else if (this.personInfo.length === 3) {
@@ -570,8 +575,44 @@ export default {
             } else if (v === 3) {
                 this.titname = "编辑";
                 this.editDialogStatus = true;
-                
+
                 this.editInfolist = n;
+                //                 this.editInfolist.attList = [
+                //     {
+                //         "id": "202202180519593136",
+                //         "fileName": "2021年广告宣传费台账-全省汇总.xlsx",
+                //         "fileCode": "202202180519593136",
+                //         "opName": "admin",
+                //         "opNo": "admin",
+                //         "opTime": "2022-02-18 17:19:59"
+                //     }
+                // ]
+                this.attList = [];
+                this.editInfolist.attList.forEach(item => {
+                    this.fileInfo.fileList.push({
+                        name: item.fileName,
+                        url: "",
+                        id: item.id,
+                        fileName: item.fileName,
+                        fileCode: item.fileCode,
+                        opName: item.opName,
+                        opNo: item.opNo,
+                        opTime: item.opTime,
+                    });
+                    this.attList.push({
+                        name: item.fileName,
+                        url: "",
+                        id: item.id,
+                        fileName: item.fileName,
+                        fileCode: item.fileCode,
+                        opName: item.opName,
+                        opNo: item.opNo,
+                        opTime: item.opTime,
+                    });
+                });
+
+
+                // console.log(this.editInfolist);
             } else if (v === 4) {
                 this.loadinged = true;
                 this.$http({
@@ -633,7 +674,7 @@ export default {
                       "-" +
                       this.month)
                 : "";
-            
+
             this.getList(this.params, this.pageSize);
         },
         //获取列表
@@ -643,7 +684,8 @@ export default {
             this.loading = true;
             this.tableData = [];
             this.$http({
-                url: "/market/cMeetingDeclaration/queryMkMeetingDeclarationPageForType2",
+                url:
+                    "/market/cMeetingDeclaration/queryMkMeetingDeclarationPageForType2",
                 method: "post",
                 headers: {
                     "Content-Type": "application/json",
@@ -697,9 +739,9 @@ export default {
                         window.URL.revokeObjectURL(href);
                     }
                 });
-            } 
+            }
             // else if (v === 2) {
-            // } 
+            // }
             else if (v === 3) {
                 this.$refs.infolist.validate(valid => {
                     if (valid) {
@@ -713,6 +755,7 @@ export default {
                         });
 
                         this.infolist.attList = this.fileList;
+
                         this.submitInfo(
                             "market/cMeetingDeclaration/addInfo",
                             this.infolist
@@ -720,6 +763,7 @@ export default {
                     }
                 });
             } else if (v === 4) {
+                
                 this.$refs.editInfolist.validate(valid => {
                     if (valid) {
                         this.attList.forEach(item => {
@@ -811,7 +855,9 @@ export default {
         },
         //文件返回值
         uploadBack(v) {
+           // this.fileInfo.fileList=v;
             this.attList = v;
+            // console.log(v);
         },
         //功能栏
         iconCli(v) {

+ 55 - 10
src/pages/main/meetingDeclaration/specialReport.vue

@@ -21,7 +21,7 @@
                             :key="i"
                             :label="`${i}月`"
                             :value="`${i}`"
-                        > 
+                        >
                         </el-option>
                     </el-select>
                 </div>
@@ -124,7 +124,12 @@
                     </el-table-column>
                     <el-table-column prop="reporting" label="汇报时长(小时)">
                     </el-table-column>
-                    <el-table-column label="操作" width="150px" align="center" fixed="right">
+                    <el-table-column
+                        label="操作"
+                        width="150px"
+                        align="center"
+                        fixed="right"
+                    >
                         <template slot-scope="scope">
                             <el-button
                                 size="mini"
@@ -549,16 +554,16 @@ export default {
 
                 this.getInfo(n.id);
                 this.mId = n.id;
-
             } else if (v === 2) {
                 this.titname = "上传";
                 this.uploadDialogStatus = true;
-
+                
+                this.attList = [];
+                this.fileInfo.fileList = [];
                 this.infolist.serialNumber = this.$formatDate(
                     new Date().getTime(),
                     "YYYYMMDDHHmmss"
                 );
-
                 if (this.personInfo.length === 2) {
                     this.$set(this.infolist, "dept", this.personInfo[1]);
                 } else if (this.personInfo.length === 3) {
@@ -570,8 +575,44 @@ export default {
             } else if (v === 3) {
                 this.titname = "编辑";
                 this.editDialogStatus = true;
-                
+
                 this.editInfolist = n;
+                //                 this.editInfolist.attList = [
+                //     {
+                //         "id": "202202180519593136",
+                //         "fileName": "2021年广告宣传费台账-全省汇总.xlsx",
+                //         "fileCode": "202202180519593136",
+                //         "opName": "admin",
+                //         "opNo": "admin",
+                //         "opTime": "2022-02-18 17:19:59"
+                //     }
+                // ]
+                this.attList = [];
+                this.editInfolist.attList.forEach(item => {
+                    this.fileInfo.fileList.push({
+                        name: item.fileName,
+                        url: "",
+                        id: item.id,
+                        fileName: item.fileName,
+                        fileCode: item.fileCode,
+                        opName: item.opName,
+                        opNo: item.opNo,
+                        opTime: item.opTime,
+                    });
+                    this.attList.push({
+                        name: item.fileName,
+                        url: "",
+                        id: item.id,
+                        fileName: item.fileName,
+                        fileCode: item.fileCode,
+                        opName: item.opName,
+                        opNo: item.opNo,
+                        opTime: item.opTime,
+                    });
+                });
+
+
+                // console.log(this.editInfolist);
             } else if (v === 4) {
                 this.loadinged = true;
                 this.$http({
@@ -633,7 +674,7 @@ export default {
                       "-" +
                       this.month)
                 : "";
-            
+
             this.getList(this.params, this.pageSize);
         },
         //获取列表
@@ -643,7 +684,8 @@ export default {
             this.loading = true;
             this.tableData = [];
             this.$http({
-                url: "/market/cMeetingDeclaration/queryMkMeetingDeclarationPage",
+                url:
+                    "/market/cMeetingDeclaration/queryMkMeetingDeclarationPage",
                 method: "post",
                 headers: {
                     "Content-Type": "application/json",
@@ -697,9 +739,9 @@ export default {
                         window.URL.revokeObjectURL(href);
                     }
                 });
-            } 
+            }
             // else if (v === 2) {
-            // } 
+            // }
             else if (v === 3) {
                 this.$refs.infolist.validate(valid => {
                     if (valid) {
@@ -721,6 +763,7 @@ export default {
                     }
                 });
             } else if (v === 4) {
+                
                 this.$refs.editInfolist.validate(valid => {
                     if (valid) {
                         this.attList.forEach(item => {
@@ -812,7 +855,9 @@ export default {
         },
         //文件返回值
         uploadBack(v) {
+           // this.fileInfo.fileList=v;
             this.attList = v;
+            // console.log(v);
         },
         //功能栏
         iconCli(v) {