Browse Source

expense.vue

ggooalice 2 years ago
parent
commit
0e2b1cbab8
1 changed files with 22 additions and 0 deletions
  1. 22 0
      fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

+ 22 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -357,6 +357,9 @@
                 <span v-else>{{scope.row.totalAmount}} 元</span>
               </template> -->
           </el-form>
+          <div style="height:0;position:relative;">
+            <span class="newInvoice" @click="addNewInvoice"> <i class="el-icon-circle-plus-outline"></i> {{ $t('newinvoice') }}</span>
+          </div>
           <el-table :data="ParticularsList.invoiceList" border style="width: 100%">
             <el-table-column prop="projectId" :label="$t('other.project')" width="155">
                 <template slot-scope="scope">
@@ -943,6 +946,7 @@ export default {
     delec(ids) {
       // console.log('删除操作', ids);
       this.ParticularsList.invoiceList.splice(ids, 1)
+      this.ParticularsList.ticketNum = this.ParticularsList.invoiceList.length
       this.kan()
     },
      adds() {
@@ -1047,6 +1051,11 @@ export default {
       this.form = {happenDate: null,invoiceType:null,amount:null,invoiceNo:null,taxPercent:null,taxValue:null,remark:null,pic: null},
       this.invoiceList.push(this.form)
     },
+    addNewInvoice(){
+      this.form = {happenDate: null,invoiceType:null,amount:null,invoiceNo:null,taxPercent:null,taxValue:null,remark:null,pic: null},
+      this.ParticularsList.invoiceList.push(this.form)
+      this.ParticularsList.ticketNum = this.ParticularsList.invoiceList.length
+    },
     //获取项目列表
     getProjectList() {
         this.http.post( this.port.project.list, {},
@@ -1688,4 +1697,17 @@ export default {
 .rejected {
   color:red;
 }
+.newInvoice{
+  position: absolute;
+  right: 10px;
+  top: -20px;
+  height: 20px;
+  line-height: 20px;
+  cursor: pointer;
+  color: #20a0f7;
+  font-size: 14px;
+}
+.newInvoice:hover{
+  color: #7bbcff;
+}
 </style>