Browse Source

h5费用报销

ggooalice 2 years ago
parent
commit
4fe4c367ce
1 changed files with 20 additions and 10 deletions
  1. 20 10
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/expense/index.vue

+ 20 - 10
fhKeeper/formulahousekeeper/timesheet_h5/src/views/expense/index.vue

@@ -82,7 +82,7 @@
                         </van-field>
                     </div>
                 </div>
-                <div class="addinvoice"><van-button size="mini" icon="plus" type="info" plain hairline @click="addInvoice">添加发票</van-button></div>
+                <div class="addinvoice"><van-button size="small" icon="plus" type="info" plain hairline @click="addInvoice">添加发票</van-button></div>
                 <!-- 发票-popup -->
                 <span>
                     <!-- 所属项目 -->
@@ -456,15 +456,25 @@ export default {
 
         // 单据列表
         deleteBill(pid){
-            this.$axios.post("/expense-sheet/delete", {id: pid})
-            .then(res => {
-                if(res.code == "ok") {
-                    this.$toast.success('删除成功')
-                    this.getBillList()
-                } else {
-                    this.$toast.fail('获取失败');
-                }
-            }).catch(err=> {this.$toast.clear();console.log(err)});
+            this.$dialog.confirm({
+                message: '确认删除?',
+            })
+            .then(() => {
+                // on confirm
+                this.$axios.post("/expense-sheet/delete", {id: pid})
+                .then(res => {
+                    if(res.code == "ok") {
+                        this.$toast.success('删除成功')
+                        this.getBillList()
+                    } else {
+                        this.$toast.fail('获取失败');
+                    }
+                }).catch(err=> {this.$toast.clear();console.log(err)});
+            })
+            .catch(() => {
+                // on cancel
+            });
+            
         },
 
         // 单据审核