瀏覽代碼

调整费用报销的税额

Lijy 3 年之前
父節點
當前提交
f1ab801e9b

+ 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

+ 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";