mqd 3 éve
szülő
commit
911c1428c9

+ 19 - 17
src/pages/main/advertising/materialApplication.vue

@@ -35,7 +35,7 @@
                     </el-table-column>
 					<el-table-column prop="budget" label="预算金额">
                     </el-table-column> -->
-					
+
                     <el-table-column label="操作" width="300px" align="center">
                         <template slot-scope="scope">
                             <!-- <el-button size="mini" type="primary" @click="dialogCheck(1,scope.row)">查看</el-button> -->
@@ -185,7 +185,7 @@
                 <div slot="footer" class="dialog-footer myfooter">
                     <el-button @click="dialogCli(4)">取 消</el-button>
                     <el-button type="primary" @click="dialogCli(5)">确 定</el-button>
-                    
+
                 </div>
             </div>
         </el-dialog>
@@ -341,14 +341,15 @@
                 this.params = {};
                 v[0] ? this.params.bizName = v[0] : '';
                 v[1] ? this.params.sts = v[1] : '';
-                let timeFrom = ''
-                timeFrom = this.$formatDate(v[2],"YYYY-MM-DD")+ ' 00:00:00'
-                let timeTo = ''
-                timeTo = this.$formatDate(v[2],"YYYY-MM-DD")+ ' 23:59:59'
-                // console.log(timeFrom, timeTo);
+                let timeFrom = '';
+                let timeTo = '';
+                if (v[2]){
+                    timeFrom = this.$formatDate(v[2],"YYYY-MM-DD")+ ' 00:00:00'
+                    timeTo = this.$formatDate(v[2],"YYYY-MM-DD")+ ' 23:59:59'
+                }
                 timeFrom ? this.params.opTimeFrom = timeFrom : '';
                 timeTo ? this.params.opTimeTo = timeTo : '';
-                
+                // console.log(this.params);
                 this.getList(this.params, this.pageSize);
             },
             //获取列表
@@ -366,9 +367,10 @@
                     },
                     data: v,
                 }).then((res) => {
-                    console.log(res.data.body);
-                    this.tableData = res.data.body.pageList;
-                    
+                    // console.log(res.data);
+                    this.tableData = res.data.body.pageList.data;
+                    //this.tableData = res.data.data;
+
                     // this.total = res.data.totalRecord;
                     this.loading = false;
                 });
@@ -407,12 +409,12 @@
 				    this.infolist = Object.assign({}, res.data);
                     // console.log(JSON.parse(this.infolist.params.wo));
 				    this.infoApply = JSON.parse(this.infolist.params.wo);
-                    
+
 					this.rovaList = res.data.taskList;
 				});
             },
 
-            
+
             //添加
             dialogCli(v) {
                 if (v === 1) {
@@ -425,7 +427,7 @@
                         this.infolist.dealType = '2';
                         this.infolist.dealTypeDesc = this.approvalinfolist.opinion;
                         this.applicationDialogStatus = false;
-                       
+
                         this.submitInfo("/bpm/api/submitTask", this.infolist);
                     }
                 }
@@ -643,7 +645,7 @@
 		flex-wrap: wrap;
 		width: 100% !important;
 		margin-top: 20px;
-	
+
 		div {
 			display: inline-block;
 			width: 18% !important;
@@ -655,7 +657,7 @@
 			background: #fff;
 			position: relative;
 			height: 100px;
-	
+
 			img {
 				width: 100%;
 				position: absolute;
@@ -664,7 +666,7 @@
 				margin: auto;
 				// height: 100%;
 			}
-	
+
 		}
 	}
 </style>

+ 89 - 14
src/pages/main/advertising/materialApplicationExa.vue

@@ -39,8 +39,10 @@
                     style="margin-right: 20px;margin-bottom: 20px;"
                     >任务分发</el-button
                 >
-                <h3>预计总金额:</h3>
-                <h3>总数: 1000</h3>
+                <a style="margin-right:50px; color:#169BD5; cursor:pointer" @click="attStatus = true;">下载附件</a>
+
+                <h3>预计总金额:{{ amountsum }}</h3>
+                <h3>总数: {{ countsum }}</h3>
             </div>
             <div class="tabbox">
                 <el-table
@@ -287,7 +289,7 @@
                             </el-option>
                         </el-select>
                     </el-form-item>
-                    
+
                 </div>
             </el-form>
 
@@ -393,6 +395,36 @@
                 </div>
             </div>
         </el-dialog>
+
+        <el-dialog
+            title="附件"
+            :visible.sync="attStatus"
+            width="50%"
+            :destroy-on-close="true"
+            :modal-append-to-body="false"
+            :close-on-click-modal="false"
+            :before-close="closedia"
+        >
+            <div slot="title">
+                <div>
+                    附件
+                    <i class="el-icon-full-screen" style="float: right; margin-right: 30px" @click="
+                () => {
+                  fullscreen = !fullscreen;
+                }"></i>
+                </div>
+            </div>
+            <div v-loading="loadinged">
+                <div style="margin: 10px 0">
+                    <uploadDown
+                        :datalist="datalist"
+                    ></uploadDown>
+                </div>
+                <div class="dialog-footer myfooter">
+                    <el-button @click="attStatus = false">取 消</el-button>
+                </div>
+            </div>
+        </el-dialog>
         <myMessage
             :messTit="messTit"
             @closeMessage="closeMessage"
@@ -405,18 +437,20 @@
 import mySearch from "../../../components/search.vue";
 import myMessage from "../../../components/myMessage.vue";
 import toolList from "../../../components/toolList";
-import myUpload from "../../../components/upload";
-import deptTreeOnly from "../../../components/deptTreeOnly.vue";
-import { MessageBox } from "element-ui";
+// import myUpload from "../../../components/upload";
+// import deptTreeOnly from "../../../components/deptTreeOnly.vue";
+// import { MessageBox } from "element-ui";
+import uploadDown from "../../../components/uploadDown";
 
 export default {
     components: {
         mySearch,
         myMessage,
-        deptTreeOnly,
-        MessageBox,
+        // deptTreeOnly,
+        // MessageBox,
         toolList,
-        myUpload
+        // myUpload,
+        uploadDown,
     },
     data() {
         const regionName = (rule, value, callback) => {
@@ -523,9 +557,39 @@ export default {
             fixedDialogStatus: false,
             userListOpt: [],
             cMkAdvMetirialWoInfoSubmit: {},
-            stsArr: ["待审批", "审批通过", "打回"]
+            stsArr: ["待审批", "审批通过", "打回"],
+            wo:{},
+            datalist: {
+                url: "/market/cadvBusiMetirialWo/checkExport",
+                type: 2,
+            },
+            attStatus: false,
         };
     },
+    computed: {
+        amountsum: {
+            set() {},
+            get() {
+                var sum = 0;
+                this.tableData.forEach(item => {
+                    sum += parseFloat(
+                        item.price * item.quantity * item.coefficient
+                    );
+                });
+                return sum.toFixed(2);
+            }
+        },
+        countsum: {
+            set() {},
+            get() {
+                var sum = 0;
+                this.tableData.forEach(item => {
+                    sum += parseFloat(item.quantity);
+                });
+                return sum;
+            }
+        }
+    },
     methods: {
         tableSelectionChange(val, row) {
             this.multipleSelection = val;
@@ -545,6 +609,7 @@ export default {
             this.supplierDialogStatus = false;
             // this.approvalinfolist =
             this.approvalStepDialogStatus = false;
+            this.attStatus = false;
         },
         //搜索数据
         searchInfo(v) {
@@ -571,9 +636,19 @@ export default {
             }).then(res => {
                 // console.log(res.data);
                 this.tableData = res.data.body.pageList.data;
-                this.userListOpt =
-                    res.data.body.queryCurrentAndNext.next.userList;
+                this.userListOpt = res.data.body.queryCurrentAndNext.next.userList;
                 this.total = res.data.totalRecord;
+                this.wo = res.data.body.wo;
+                this.datalist.attList = JSON.parse(this.wo.fileUrl);
+                // console.log(this.datalist.attList)
+                // this.datalist.attList.forEach((item) => {
+                //     this.fileInfo.fileList.push({
+                //         id: item.fileCode,
+                //         fileName: item.fileName,
+                //         fileCode: item.fileCode,
+                //     });
+                // });
+
                 this.loading = false;
             });
         },
@@ -666,7 +741,7 @@ export default {
         //添加
         dialogCli(v) {
             this.dialogStatus = false;
-            // 1审批 2审批轨迹 3导出 4供应商 5任务分发
+            // 1审批 2审批轨迹 3导出 4供应商 5任务分发 8附件
             if (v === 1) {
                 this.approvalDialogStatus = false;
                 // let list = {};
@@ -710,7 +785,7 @@ export default {
                 // this.multipleSelection.supplierCode = supplierChoose[0].code;
                 // console.log(this.multipleSelection);
             } else if (v === 5) {
-            } else if (v === 6) {
+            }else if (v === 6) {
                 let userListSingle = "";
                 userListSingle = this.userListOpt.filter(item => {
                     return item.loginNameStr == this.infolist.loginNameStr;

+ 17 - 7
src/pages/main/advertising/materialApplicationadd.vue

@@ -672,7 +672,7 @@ export default {
             regionOpt: [],
             preAccount: 0,
             fileInfo: {
-                type: "img",
+                // type: "img",
                 limit: 50,
                 url: "/market/cknowledgeatt/upload",
                 fileList: []
@@ -702,7 +702,8 @@ export default {
             depttype: 0,
             // 固定审批人员
             fixedDialogStatus: false,
-            userListOpt: []
+            userListOpt: [],
+            companyFlag: ''
         };
     },
     computed: {
@@ -1014,6 +1015,14 @@ export default {
                     });
                     list.mkAdvBusiMetirialWoInfoList = info;
 
+                    if (this.companyFlag == '1') {
+                        let fileList = [];
+                        this.attList.forEach(item => {
+                            fileList.push({id:item.fileCode,fileCode:item.fileCode,fileName:item.fileName});
+                        });
+                        list.fileUrl = JSON.stringify(fileList);
+                    }
+
                     if (v === 1) {
                         let userListSingle = "";
                         userListSingle = _this.userListOpt.filter(item => {
@@ -1025,17 +1034,17 @@ export default {
                         list.nextOpNo = userListSingle[0].loginNoStr;
                         list.nextOpName = userListSingle[0].loginNameStr;
                        this.fixedDialogStatus = false;
-                       
+
                         this.submitInfo("/market/cadvBusiMetirialWo/add", list);
-                        
+
                     } else if (v === 2) {
                         list.nextOpNo = this.treeListonly.leaderAuditNo;
                         list.nextOpName = this.treeListonly.leaderAuditName;
                         console.log(list);
-                        
+
                          this.checkexa = false;
                         this.submitInfo("/market/cadvBusiMetirialWo/add", list);
-                        
+
                     }
                 }
             });
@@ -1173,7 +1182,6 @@ export default {
         },
         uploadBack(v) {
             this.attList = v;
-            // console.log(v);
         },
         // verifcheck() {
         //     for (let i = 0; i < this.regionOpt.length; i++) {
@@ -1225,6 +1233,8 @@ export default {
                 // console.log(res.data.body);
                 this.infolist.reqCode = res.data.body.timestamp;
                 this.userListOpt = res.data.body.queryNext.userList;
+                // this.companyFlag = res.data.body.companyFlag;
+                this.companyFlag = '1';
             });
         }
     },