Quellcode durchsuchen

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper into master

seyason vor 3 Jahren
Ursprung
Commit
cc3a007bba

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

@@ -145,7 +145,7 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column label="费用金额" width="135px">
+            <el-table-column label="费用金额(含税)" width="135px">
               <template slot-scope="scope">
                 <el-input size="small" :id="'upam'+scope.$index" v-model="scope.row.amount" @input="zhi(scope.$index)" @change="shiqu(scope.row.amount)" @keyup.native="restrictNumber('upam'+scope.$index)"></el-input>
               </template>
@@ -982,7 +982,10 @@ export default {
         return
       }
       this.invoiceList[i].taxValue = this.invoiceList[i].amount * this.invoiceList[i].taxPercent / 100
-      this.invoiceList[i].taxValue = this.invoiceList[i].taxValue.toFixed(2)
+      console.log(this.invoiceList[i].amount, this.invoiceList[i].taxPercent)
+      var shui =  this.invoiceList[i].taxPercent / 100 // 税率
+      var zhi = this.invoiceList[i].amount / (1 + shui) * shui
+      this.invoiceList[i].taxValue = zhi.toFixed(2)
     },
     zhis(e) {
       var i = e

+ 26 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -100,7 +100,9 @@
                 widthHtval: document.body.clientWidth - 230,
                 users: [],
                 jichu: [],
-                namess: ''
+                namess: '',
+                timers: null, // 点击的时间
+                zhishin: 0
             };
         },
         methods: {
@@ -395,7 +397,17 @@
                 console.log('触发')
             },
             getEchart(){
-                console.log(this.radio, this.namess)
+                var that = this
+                that.timers = setTimeout(()=>{
+                    clearTimeout(that.timers)
+                    console.log(that.timers)
+                    that.jieliu()
+                },800);
+                // this.jieliu()
+            },
+            // 脱离出来的方法
+            jieliu() {
+                console.log('触发了')
                 sessionStorage.radio = this.radio;
                 var _this = this;
                 var param = {};
@@ -439,21 +451,22 @@
                         var xList = []
                         var yList = []
                         var list
+                        var totalMoneyCost
                         if(this.radio == '项目' || this.radio == '人员' || this.radio=='部门') {
                             list = res.data.costList
-                            var totalMoneyCost = ((this.radio=='项目' || this.radio=='人员')?res.data.totalMoneyCost:res.data.totalCostMoney);
+                            totalMoneyCost = ((this.radio=='项目' || this.radio=='人员')?res.data.totalMoneyCost:res.data.totalCostMoney);
                             for(var i in list) {
                                 if(this.radio=='项目' || this.radio == '人员') {
                                     xList.push(this.radio=='项目'?list[i].project:list[i].name);
                                     yList.push({
-                                        "value": list[i].costMoney.toFixed(2),
+                                        "value": list[i].costMoney.toFixed(2) || list[i].costMoney,
                                         "id": list[i].id || i,
                                         "cost": list[i].cost
                                     });
                                 } else {
                                     xList.push(list[i].departmentName);
                                     yList.push({
-                                        "value": list[i].costMoney.toFixed(2),
+                                        "value": list[i].costMoney.toFixed(2) || list[i].costMoney,
                                         "id": list[i].departmentId,
                                         "cost": list[i].costTime
                                     });
@@ -466,7 +479,7 @@
                                 console.log(list[i].name, list[i].costMoney, list[i].cost)
                                 xList.push(list[i].name);
                                 yList.push({
-                                    "value": list[i].costMoney.toFixed(2),
+                                    "value": list[i].costMoney.toFixed(2) || list[i].costMoney,
                                     "id": list[i].id || i,
                                     "cost": list[i].cost
                                 });
@@ -507,10 +520,15 @@
                             width: this.widthHtval
                         })
                         _this.myChart = myChart;
+                        // console.log(totalMoneyCost.toFixed(2), '看看', totalMoneyCost)
+                        // var chengbentongji = totalMoneyCost.toFixed(2) || totalMoneyCost
+                        if(totalMoneyCost) {
+                            this.zhishin = totalMoneyCost.toFixed(2)
+                        } 
                         if(this.radio == '项目' || this.radio == '人员' || this.radio=='部门') {
                             var option = {
                                 title: {
-                                    text: '工时成本总计' + totalMoneyCost.toFixed(2) + '元',
+                                    text: '工时成本总计' + this.zhishin + '元',
                                     left:'left',
                                 },
                                 // 工具箱
@@ -719,7 +737,7 @@
                         type: "error"
                     });
                 });
-            },
+            }
         },
         created() {
         },

+ 25 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -58,10 +58,26 @@
                     </template>
             </el-table-column>
             <el-table-column prop="projectCode" label="项目编码" sortable width="150"></el-table-column>
-            <el-table-column prop="projectName" label="项目名称" sortable>
+            <el-table-column prop="projectName" label="项目名称" width="250" sortable>
                  <template slot-scope="scope">
-                    <el-link type="primary" v-if="user.company.packageProject==1" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
-                    <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
+                     <!-- <div class="kans">
+                         <el-link type="primary" v-if="user.company.packageProject==1" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
+                         <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
+                     </div> -->
+                     <el-popover placement="top" width="400" trigger="hover" v-if="scope.row.projectName.length > 15">
+                         <div>
+                             <el-link type="primary" v-if="user.company.packageProject==1" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
+                             <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
+                         </div>
+                         <div slot="reference" class="kans">
+                            <el-link type="primary" v-if="user.company.packageProject==1" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
+                            <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
+                         </div>
+                     </el-popover>
+                     <div v-else>
+                         <el-link type="primary" v-if="user.company.packageProject==1" :href="'#/projectInside/'+scope.row.id">{{scope.row.projectName}}</el-link>
+                            <span v-if="user.company.packageProject==0" >{{scope.row.projectName}}</span>
+                     </div>
                 </template>
             </el-table-column>
             <el-table-column prop="inchargerName" label="负责人" sortable width="150">
@@ -443,6 +459,12 @@
 .line span:nth-child(even){
     float:right;
 }
+.kans {
+    width: 230px;
+    overflow:hidden;
+	white-space:nowrap;
+	text-overflow: ellipsis;
+}
 </style>
 <script>
     import util from "../../common/js/util";

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -331,6 +331,7 @@
                         
                         if (that.isIOSystem) {
                             var retArray = [];
+                            
                             for (var i=0;i<localIds.length; i++) {
                                 wx.getLocalImgData({
                                     localId: localIds[i], // 图片的localID