yuanyiming 2 年之前
父節點
當前提交
c3227c7541

+ 7 - 7
src/views/projectApply/projectApplicationApply.vue

@@ -106,7 +106,7 @@
                 :on-preview="handlePreview"
                 :on-remove="handleRemove"
                 :file-list="data.fileList"
-                :limit="1"
+                :multiple="false"
                 style="width: 40%;margin-top: -25px;"
                 list-type="picture">
                 <!-- <el-button size="small" style="position: absolute;top: -8px;right: 0;width: 100px;box-sizing: border-box;padding: 9px 0;font-size: 16px;background-color: #0e72e6;border-radius:5px" type="primary">上传封面</el-button> -->
@@ -310,16 +310,16 @@
       methods:{
         getFile(val) {
             console.log( val);
-            let data={
+            let data=[{
               name:val.fileName,
               url:val.url
-            }
-            this.data.fileList.push(data)
+            }]
+            this.data.fileList=data
             console.log(this.data.fileList);
         },
-        submitUpload() {
-          this.$refs.upload.submit();
-        },
+        // submitUpload() {
+        //   this.$refs.upload.submit();
+        // },
         handleRemove(file, fileList) {
           console.log(file, fileList);
         },

+ 2 - 6
src/views/projectApply/projectApplicationApply3.vue

@@ -154,7 +154,7 @@
         </div>
         <div class="dagInpS1">
           <div class="dagSpan">金额(元)</div>
-          <el-input v-model="data.dialog.fund" placeholder="请输入内容"></el-input>
+          <el-input v-model.number="data.dialog.fund" placeholder="请输入内容"></el-input>
         </div>
       </div>
 
@@ -312,11 +312,7 @@ import { VueEditor } from "vue2-editor";
         },
         finish(){    //添加经费明细对话框完成按钮
             if(this.data2.select.fund == '' || this.data2.select.fund==undefined )return this.$message.error('请输入项目预算总经费')
-            let oldMoney = 0;
-            this.data.tableData2.reduce((pre,cur)=>{
-              pre+=cur.fund;
-            },oldMoney);
-            console.log(oldMoney)
+            let oldMoney = this.data.tableData2.reduce((prev,cur)=>prev=prev+cur["fund"],0)
             oldMoney+=this.data.dialog.fund;
             if(oldMoney>(this.data2.select.fund)*10000)return this.$message.error('经费明细超出预算总金额');
             this.addFundDetail();

+ 2 - 2
src/views/projectApply/projectApplicationApplyMain.vue

@@ -35,7 +35,7 @@
           class="projectApplicationfundAddDialog"
           :before-close="init">
           <div class="addDialogLogo">LOGO</div>
-          <div class="deleteContent">确定提交“×××”项目立项?</div>
+          <div class="deleteContent">确定提交“{{projectApplicationApply1.select.projectName}}”项目立项?</div>
           <span slot="footer" class="dialog-footer">
             <el-button type="primary" @click="submitAll" class="btn5">确认提交</el-button>
             <el-button @click="init" class="btn5" style="background:#cccccc" size="small">取消</el-button>
@@ -137,7 +137,7 @@
                 tableData2:[],// 经费明细列表数据
                
                 dialog:{     //经费明细添加对话框
-                  fund:'',  //金额
+                  fund:0,  //金额
                   type:'',  //支出类别
                   disburseProject:'',  //支出项目
                   textarea:'',  //备注