Quellcode durchsuchen

2022.6.23 ios钉钉新增项目bug

ggooalice vor 2 Jahren
Ursprung
Commit
4a89412762

+ 2 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -239,7 +239,7 @@
               <el-table-column prop="code" label="票据编号"></el-table-column>
               <el-table-column prop="totalAmount" label="金额(元)" align="center">
                 <template slot-scope="scope" >
-                  <span style="float:right;margin-right:20px">{{scope.row.totalAmount.toFixed(2)}}</span>
+                  <span style="float:right;margin-right:20px">{{scope.row.totalAmount ? scope.row.totalAmount.toFixed(2) : '0'}}</span>
                 </template>
               </el-table-column>
               <el-table-column prop="ownerName" label="报销人" ></el-table-column>
@@ -598,14 +598,8 @@ export default {
           for(let i in this.fileList){
             formData.append("files", this.fileList[i].raw);
           }
-
-          // let fileaaa = []
-          // for(let i in this.fileList){
-          //   fileaaa[i] = this.fileList[i].raw
-          // }
-          // formData.append("files", fileaaa);
           this.importingData = true
-          console.log(formData,this.fileList);
+          // console.log(formData,this.fileList);
           // return
           this.http.uploadFile( '/expense-sheet/importData', formData,
           res => {

+ 13 - 15
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

@@ -374,20 +374,13 @@
                         forbidClick: true,
                         duration: 0
                     });
-                    let formData = new FormData();
+                    let formData = new URLSearchParams();
                     formData.append("name", this.form.projectName);
                     formData.append("code", this.form.projectCode);
                     formData.append("inchargerId", this.form.inchargerId);
                     for (var j in this.form.userId) {
                         formData.append("userId", this.form.userId[j]);
                     }
-                    
-                    let form = {
-                        name: this.form.projectName,
-                        code:this.form.projectCode,
-                        inchargerId: this.form.inchargerId,
-                        userId:this.form.userId
-                    }
                     if(this.form.id != null) {
                         // form.id = this.form.id;
                         formData.append("id", this.form.id);
@@ -404,14 +397,19 @@
                     } else {
                         formData.append("associateDegrees", null);
                     }
-                    const config = {
-                        headers: {
-                        'Content-Type': 'multipart/form-data'
-                        }
-                    }    
-                    this.$axios.post("/project/editProject", formData, config)
+                    // const config = {
+                    //     // headers: {
+                    //     // 'Content-Type': 'multipart/form-data',
+                        
+                    //     // // 'Content-Type': 'application/x-www-form-urlencoded'
+                    //     // },
+                    //     // transformRequest: [function (data, headers) {
+                    //     //     return data;
+                    //     // }],
+                    // }    
+                    this.$axios.post("/project/editProject", formData)
                     .then(res => {
-                        if(res.code == "ok") {
+                        if(res.code == "ok") {    
                             this.$toast.clear();
                             this.$toast.success(this.form.id==null?'新增成功':'修改成功');
                             this.list = [];