Переглянути джерело

fix:开票管理多次开票bug修复

刘恒 1 рік тому
батько
коміт
031b3df39b

+ 148 - 117
src/views/FinancialManagement/ExpenseManagement/PaymentManagement.vue

@@ -423,7 +423,7 @@
       </div>
       </div>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
         <el-button @click="resetForm" size="small">取 消</el-button>
         <el-button @click="resetForm" size="small">取 消</el-button>
-        <el-button @click="submitInfo" type="primary" size="small">{{
+        <el-button @click="submitInfo" type="primary" :disabled="confirmDisabled" size="small">{{
           modelText
           modelText
         }}</el-button>
         }}</el-button>
       </div>
       </div>
@@ -522,8 +522,8 @@ export default {
       }
       }
     };
     };
     return {
     return {
-      tableForm:{},
-      detailDialogVisible:false,
+      tableForm: {},
+      detailDialogVisible: false,
       affiliationData: [], //归属字典数据
       affiliationData: [], //归属字典数据
       affiliationData2: [], //归属字典数据
       affiliationData2: [], //归属字典数据
       allNumObj: {}, //合计对象
       allNumObj: {}, //合计对象
@@ -539,7 +539,7 @@ export default {
         //查询条件
         //查询条件
       },
       },
       pageResult: {
       pageResult: {
-        content: [],
+        content: []
       }, //表格参数
       }, //表格参数
       pageRequest: {
       pageRequest: {
         // 列表查询条件
         // 列表查询条件
@@ -549,30 +549,35 @@ export default {
         applyTime: "", //进账日期
         applyTime: "", //进账日期
         invoiceBy: "", //开票方
         invoiceBy: "", //开票方
         biller: "", //开票员
         biller: "", //开票员
-        invoiceType: "", //开票类型
+        invoiceType: "" //开票类型
       },
       },
       columns: [
       columns: [
         { prop: "invoiceId", label: "发票号码", type: "text", minWidth: 160 },
         { prop: "invoiceId", label: "发票号码", type: "text", minWidth: 160 },
         { prop: "invoiceNum", label: "发票数", type: "text", minWidth: 60 },
         { prop: "invoiceNum", label: "发票数", type: "text", minWidth: 60 },
         { prop: "invoiceBy", label: "开票方", type: "text", minWidth: 360 },
         { prop: "invoiceBy", label: "开票方", type: "text", minWidth: 360 },
-        { prop: "businessQuality", label: "公司类型", type: "text", minWidth: 80 },
+        {
+          prop: "businessQuality",
+          label: "公司类型",
+          type: "text",
+          minWidth: 80
+        },
         {
         {
           prop: "otherUnit",
           prop: "otherUnit",
           label: "对方单位名称",
           label: "对方单位名称",
           type: "text",
           type: "text",
-          minWidth: 360,
+          minWidth: 360
         },
         },
         {
         {
           prop: "invoiceTypeName",
           prop: "invoiceTypeName",
           label: "发票类型",
           label: "发票类型",
           type: "text",
           type: "text",
-          minWidth: 80,
+          minWidth: 80
         },
         },
         {
         {
           prop: "invoiceMoney",
           prop: "invoiceMoney",
           label: "开票金额",
           label: "开票金额",
           type: "text",
           type: "text",
-          minWidth: 100,
+          minWidth: 100
         },
         },
         { prop: "invoiceTime", label: "开票日期", type: "text", minWidth: 100 },
         { prop: "invoiceTime", label: "开票日期", type: "text", minWidth: 100 },
         { prop: "biller", label: "开票员", type: "text", minWidth: 70 },
         { prop: "biller", label: "开票员", type: "text", minWidth: 70 },
@@ -580,54 +585,54 @@ export default {
           prop: "invoiceSubjects",
           prop: "invoiceSubjects",
           label: "开票科目",
           label: "开票科目",
           type: "text",
           type: "text",
-          minWidth: 120,
+          minWidth: 120
         },
         },
         {
         {
           prop: "payoutMoney",
           prop: "payoutMoney",
           label: "进账金额",
           label: "进账金额",
           type: "text",
           type: "text",
-          minWidth: 100,
+          minWidth: 100
         },
         },
         {
         {
           prop: "notPayoutMoney",
           prop: "notPayoutMoney",
           label: "未进账金额",
           label: "未进账金额",
           type: "text",
           type: "text",
-          minWidth: 100,
+          minWidth: 100
         },
         },
         {
         {
           prop: "rate",
           prop: "rate",
           label: "税率(%)",
           label: "税率(%)",
           type: "text",
           type: "text",
-          minWidth: 70,
+          minWidth: 70
         },
         },
         {
         {
           prop: "tax",
           prop: "tax",
           label: "税额",
           label: "税额",
           type: "text",
           type: "text",
-          minWidth: 100,
+          minWidth: 100
         },
         },
         {
         {
           prop: "noHasTax",
           prop: "noHasTax",
           label: "不含税金额",
           label: "不含税金额",
           type: "text",
           type: "text",
-          minWidth: 100,
+          minWidth: 100
         },
         },
         {
         {
           prop: "clearFlagName",
           prop: "clearFlagName",
           label: "转账状态",
           label: "转账状态",
           type: "text",
           type: "text",
-          minWidth: 100,
-        },
+          minWidth: 100
+        }
       ],
       ],
       detailData: [],
       detailData: [],
       detailParams: {
       detailParams: {
         pageNo: 1,
         pageNo: 1,
         pageSize: 20,
         pageSize: 20,
-        teamOrUserFlag: "2",
+        teamOrUserFlag: "2"
       },
       },
       modelText: "提 交",
       modelText: "提 交",
       formData: {
       formData: {
-        accountName:"",
+        accountName: "",
         revBankCardNum: "", //收入卡号
         revBankCardNum: "", //收入卡号
         outBankCardNum: "", //支出卡号
         outBankCardNum: "", //支出卡号
         biller: "", //开票员
         biller: "", //开票员
@@ -644,55 +649,55 @@ export default {
         rate: 0, //税率
         rate: 0, //税率
         payoutTime: "", //进账日期
         payoutTime: "", //进账日期
         payMethod: [], //支付方式
         payMethod: [], //支付方式
-        fundUse: "", //资金用途
+        fundUse: "" //资金用途
       },
       },
       rules: {
       rules: {
         //内部表单规则
         //内部表单规则
         invoiceBy: [
         invoiceBy: [
-          { required: true, message: "请选择开票方", trigger: "change" },
+          { required: true, message: "请选择开票方", trigger: "change" }
         ],
         ],
         invoiceMoney: [
         invoiceMoney: [
-          { required: true, message: "开票金额不能为空", trigger: "change" },
+          { required: true, message: "开票金额不能为空", trigger: "change" }
         ],
         ],
         invoiceNum: [
         invoiceNum: [
-          { required: true, message: "发票数不能为空", trigger: "blur" },
+          { required: true, message: "发票数不能为空", trigger: "blur" }
         ],
         ],
         invoiceSubjects1: [
         invoiceSubjects1: [
-          { required: true, message: "开票科目不能为空", trigger: "change" },
+          { required: true, message: "开票科目不能为空", trigger: "change" }
         ],
         ],
         invoiceSubjectsValue: [
         invoiceSubjectsValue: [
-          { validator: invoiceSubjectsRules, trigger: "blur" },
+          { validator: invoiceSubjectsRules, trigger: "blur" }
         ],
         ],
         invoiceType: [
         invoiceType: [
-          { required: true, message: "请选择发票类型", trigger: "blur" },
+          { required: true, message: "请选择发票类型", trigger: "blur" }
         ],
         ],
         otherUnit: [
         otherUnit: [
-          { required: true, message: "对方单位不能为空", trigger: "blur" },
+          { required: true, message: "对方单位不能为空", trigger: "blur" }
         ],
         ],
         payoutMoney: [
         payoutMoney: [
-          { required: true, message: "进账金额不能为空", trigger: "blur" },
+          { required: true, message: "进账金额不能为空", trigger: "blur" }
         ],
         ],
         rate: [{ required: true, message: "税率不能为空", trigger: "blur" }],
         rate: [{ required: true, message: "税率不能为空", trigger: "blur" }],
         payoutTime: [
         payoutTime: [
           {
           {
             required: true,
             required: true,
             message: "请选择进账日期",
             message: "请选择进账日期",
-            trigger: "change",
-          },
+            trigger: "change"
+          }
         ],
         ],
         payMethod: [
         payMethod: [
-          { required: true, message: "请选择支付方式", trigger: "change" },
+          { required: true, message: "请选择支付方式", trigger: "change" }
         ],
         ],
         fundUse: [
         fundUse: [
-          { required: true, message: "请选择资金用途", trigger: "change" },
+          { required: true, message: "请选择资金用途", trigger: "change" }
         ],
         ],
         invoiceTime: [
         invoiceTime: [
           {
           {
             required: true,
             required: true,
             message: "请选择开票日期",
             message: "请选择开票日期",
-            trigger: "change",
-          },
-        ],
+            trigger: "change"
+          }
+        ]
       },
       },
       collectionData: [], //所有内部账户信息列表
       collectionData: [], //所有内部账户信息列表
       allCollectionData: [], //所有账户信息列表
       allCollectionData: [], //所有账户信息列表
@@ -708,48 +713,49 @@ export default {
           prop: "revenueOutlayName",
           prop: "revenueOutlayName",
           label: "转账类型",
           label: "转账类型",
           minWidth: 80,
           minWidth: 80,
-          sortable: false,
+          sortable: false
         },
         },
         {
         {
           prop: "company",
           prop: "company",
           label: "支出单位",
           label: "支出单位",
           minWidth: 350,
           minWidth: 350,
-          sortable: false,
+          sortable: false
         },
         },
         {
         {
           prop: "payMethod",
           prop: "payMethod",
           label: "支付方式",
           label: "支付方式",
           minWidth: 100,
           minWidth: 100,
-          sortable: false,
+          sortable: false
         },
         },
         {
         {
           prop: "payoutTime",
           prop: "payoutTime",
           label: "支付时间",
           label: "支付时间",
           minWidth: 100,
           minWidth: 100,
-          sortable: false,
+          sortable: false
         },
         },
         { prop: "applyAmount", label: "金额", minWidth: 100, sortable: false },
         { prop: "applyAmount", label: "金额", minWidth: 100, sortable: false },
         {
         {
           prop: "fundUse",
           prop: "fundUse",
           label: "资金用途",
           label: "资金用途",
           minWidth: 150,
           minWidth: 150,
-          sortable: false,
+          sortable: false
         },
         },
         {
         {
           prop: "fundFen",
           prop: "fundFen",
           label: "资金用途分项",
           label: "资金用途分项",
           minWidth: 150,
           minWidth: 150,
-          sortable: false,
-        },
+          sortable: false
+        }
       ],
       ],
       expendDialogVisible: false, //记录弹框显示状态
       expendDialogVisible: false, //记录弹框显示状态
       expendPageResult: {
       expendPageResult: {
         //记录表格参数
         //记录表格参数
         pageNo: 1,
         pageNo: 1,
-        pageSize: 20,
+        pageSize: 20
       },
       },
       invoiceId: "", //记录id
       invoiceId: "", //记录id
       num: 1,
       num: 1,
+      confirmDisabled: false //开票确认按钮防止多次点击
     };
     };
   },
   },
   watch: {
   watch: {
@@ -774,13 +780,13 @@ export default {
           payoutMoney: 0, //进账金额
           payoutMoney: 0, //进账金额
           rate: 0, //税率
           rate: 0, //税率
           payoutTime: "", //进账日期
           payoutTime: "", //进账日期
-          payMethod: [], //支付方式
+          payMethod: [] //支付方式
         };
         };
         //支出收入资金归属值清空
         //支出收入资金归属值清空
-        this.affiliationData.forEach((item) => {
+        this.affiliationData.forEach(item => {
           item.profit = 0;
           item.profit = 0;
         });
         });
-        this.affiliationData2.forEach((item) => {
+        this.affiliationData2.forEach(item => {
           item.profit = 0;
           item.profit = 0;
         });
         });
         //支出收入资金归属值清空
         //支出收入资金归属值清空
@@ -789,36 +795,40 @@ export default {
           this.$refs.formData.clearValidate();
           this.$refs.formData.clearValidate();
         });
         });
       }
       }
-    },
+    }
   },
   },
   methods: {
   methods: {
-    handleTablerecordDetail({row}){
-     for (let key in row.entProfit) {
-          this.affiliationData.forEach((item) => {
-            if (item.profitEng == key) {
-              item.profit = convertPositive(row.entProfit[key]);
-            }
-          });
-        }
-        this.detailDialogVisible=true
+    handleTablerecordDetail({ row }) {
+      for (let key in row.entProfit) {
+        this.affiliationData.forEach(item => {
+          if (item.profitEng == key) {
+            item.profit = convertPositive(row.entProfit[key]);
+          }
+        });
+      }
+      this.detailDialogVisible = true;
     },
     },
     /**
     /**
      * 撤销转账记录
      * 撤销转账记录
      */
      */
-     handleTableRepeal(index) {
+    handleTableRepeal(index) {
       let row = index.row;
       let row = index.row;
       console.log(row);
       console.log(row);
-      this.$confirm("确认撤销该  “"+row.revenueOutlayName+"”  记录吗?", "提示", {
-        type: "warning",
-      })
+      this.$confirm(
+        "确认撤销该  “" + row.revenueOutlayName + "”  记录吗?",
+        "提示",
+        {
+          type: "warning"
+        }
+      )
         .then(() => {
         .then(() => {
           this.$api.expense
           this.$api.expense
             .accountOperateDelete(row.accountOperateId)
             .accountOperateDelete(row.accountOperateId)
-            .then((res) => {
+            .then(res => {
               if (res.code == 200) {
               if (res.code == 200) {
                 this.$message.success("撤销成功");
                 this.$message.success("撤销成功");
                 this.getRecordData();
                 this.getRecordData();
-                this.expendDialogVisible=false;
+                this.expendDialogVisible = false;
                 this.findPage();
                 this.findPage();
               } else {
               } else {
                 this.$message.error(res.msg);
                 this.$message.error(res.msg);
@@ -840,12 +850,12 @@ export default {
       let obj = {
       let obj = {
         pageNo: this.expendPageResult.pageNo,
         pageNo: this.expendPageResult.pageNo,
         pageSize: this.expendPageResult.pageSize,
         pageSize: this.expendPageResult.pageSize,
-        invoiceId: this.invoiceId,
+        invoiceId: this.invoiceId
       };
       };
       this.$api.expense
       this.$api.expense
         .getAccountOperate(obj)
         .getAccountOperate(obj)
-        .then((res) => {
-          res.data.records.forEach((item) => {
+        .then(res => {
+          res.data.records.forEach(item => {
             if (
             if (
               item.revenueOutlay != null &&
               item.revenueOutlay != null &&
               item.revenueOutlay != undefined &&
               item.revenueOutlay != undefined &&
@@ -860,7 +870,7 @@ export default {
             pageNo: res.data.current,
             pageNo: res.data.current,
             pageSize: res.data.size,
             pageSize: res.data.size,
             totalPages: res.data.pages,
             totalPages: res.data.pages,
-            totalSize: res.data.total,
+            totalSize: res.data.total
           };
           };
         })
         })
         .then(data != null ? data.callback : "");
         .then(data != null ? data.callback : "");
@@ -878,7 +888,7 @@ export default {
     },
     },
     //转换
     //转换
     businessZh(data, label, value) {
     businessZh(data, label, value) {
-      let obj = data.find((item) => item[value] == label);
+      let obj = data.find(item => item[value] == label);
       if (obj) {
       if (obj) {
         return obj;
         return obj;
       } else {
       } else {
@@ -887,9 +897,9 @@ export default {
     },
     },
     //获取归属数据
     //获取归属数据
     getAffiliationData() {
     getAffiliationData() {
-      this.$api.expense.getList().then((res) => {
+      this.$api.expense.getList().then(res => {
         if (res.code == 200) {
         if (res.code == 200) {
-          res.data.forEach((item) => {
+          res.data.forEach(item => {
             item.profit = 0;
             item.profit = 0;
           });
           });
           this.affiliationData = JSON.parse(JSON.stringify(res.data));
           this.affiliationData = JSON.parse(JSON.stringify(res.data));
@@ -902,7 +912,7 @@ export default {
     //导出开票记录
     //导出开票记录
     expentData() {
     expentData() {
       let params = {
       let params = {
-        ...JSON.parse(JSON.stringify(this.pageRequest)),
+        ...JSON.parse(JSON.stringify(this.pageRequest))
       };
       };
       if (params.invoiceTime != null && params.invoiceTime.length > 0) {
       if (params.invoiceTime != null && params.invoiceTime.length > 0) {
         params.invoiceTimeStart = params.invoiceTime[0];
         params.invoiceTimeStart = params.invoiceTime[0];
@@ -916,7 +926,7 @@ export default {
       delete params.invoiceTime;
       delete params.invoiceTime;
       delete params.pageNo;
       delete params.pageNo;
       delete params.pageSize;
       delete params.pageSize;
-      this.$api.expense.invAccountExcel(params).then((res) => {
+      this.$api.expense.invAccountExcel(params).then(res => {
         if (res.code == 200) {
         if (res.code == 200) {
           if (res.data == null) {
           if (res.data == null) {
             this.$message.error("暂无导出数据,请重试!");
             this.$message.error("暂无导出数据,请重试!");
@@ -937,7 +947,7 @@ export default {
     },
     },
     //获取资金用途树数据
     //获取资金用途树数据
     getTreeList() {
     getTreeList() {
-      this.$api.expense.getAccountExpensesTreeList().then((res) => {
+      this.$api.expense.getAccountExpensesTreeList().then(res => {
         if (res.code == 200) {
         if (res.code == 200) {
           this.fundFlowData = res.data;
           this.fundFlowData = res.data;
           this.fundFlowSet();
           this.fundFlowSet();
@@ -961,23 +971,21 @@ export default {
     handleTableDelete(index) {
     handleTableDelete(index) {
       let row = index.row;
       let row = index.row;
       this.$confirm("确认撤销该记录吗?", "提示", {
       this.$confirm("确认撤销该记录吗?", "提示", {
-        type: "warning",
+        type: "warning"
       })
       })
         .then(() => {
         .then(() => {
-          this.$api.expense
-            .deleteInvAccountIncoice(row.invoiceId)
-            .then((res) => {
-              if (res.code == 200) {
-                this.$message.success("撤销成功");
-                this.findPage();
-              } else {
-                this.$message.error(res.msg);
-              }
-            });
+          this.$api.expense.deleteInvAccountIncoice(row.invoiceId).then(res => {
+            if (res.code == 200) {
+              this.$message.success("撤销成功");
+              this.findPage();
+            } else {
+              this.$message.error(res.msg);
+            }
+          });
         })
         })
         .catch(() => {});
         .catch(() => {});
     },
     },
-    invoiceTypeChange(item){
+    invoiceTypeChange(item) {
       // if(item==2){
       // if(item==2){
       //   this.formData.rate='6'
       //   this.formData.rate='6'
       // }
       // }
@@ -987,10 +995,10 @@ export default {
     },
     },
     //选择开票方change事件
     //选择开票方change事件
     companyChange(item) {
     companyChange(item) {
-        if(item.accountName=="太原天勤保险代理有限公司"){
-          this.formData.invoiceSubjects1 ='经纪代理服务'
-          this.formData.invoiceSubjects2 ='保险代理手续费'
-        }
+      if (item.accountName == "太原天勤保险代理有限公司") {
+        this.formData.invoiceSubjects1 = "经纪代理服务";
+        this.formData.invoiceSubjects2 = "保险代理手续费";
+      }
       // else{
       // else{
       //   this.formData.invoiceSubjects1 =''
       //   this.formData.invoiceSubjects1 =''
       //   this.formData.invoiceSubjects2 =''
       //   this.formData.invoiceSubjects2 =''
@@ -1006,12 +1014,12 @@ export default {
     },
     },
     //获取所有内部账户信息
     //获取所有内部账户信息
     getAllUser() {
     getAllUser() {
-      this.$api.expense.getAccountByAccountName().then((res) => {
+      this.$api.expense.getAccountByAccountName().then(res => {
         if (res.code == 200) {
         if (res.code == 200) {
           let arr = [];
           let arr = [];
           res.data.forEach((item, index) => {
           res.data.forEach((item, index) => {
             if (item.invAccountCardList != null) {
             if (item.invAccountCardList != null) {
-              item.invAccountCardList.forEach((it) => {
+              item.invAccountCardList.forEach(it => {
                 it = { ...it, ...item };
                 it = { ...it, ...item };
                 it.name =
                 it.name =
                   (it.outerFlag == 0 ? "内部用户" : "外部用户") +
                   (it.outerFlag == 0 ? "内部用户" : "外部用户") +
@@ -1030,7 +1038,7 @@ export default {
               });
               });
             }
             }
           });
           });
-          let outArr = arr.filter((item) => item.outerFlag == 0);
+          let outArr = arr.filter(item => item.outerFlag == 0);
           this.allCollectionData = arr;
           this.allCollectionData = arr;
           this.collectionData = outArr;
           this.collectionData = outArr;
         }
         }
@@ -1038,7 +1046,7 @@ export default {
     },
     },
     //数据字典
     //数据字典
     business(typeName) {
     business(typeName) {
-      this.$api.dict.findByLableName(typeName).then((res) => {
+      this.$api.dict.findByLableName(typeName).then(res => {
         this[typeName + "Data"] = res.data;
         this[typeName + "Data"] = res.data;
         if (
         if (
           (typeName == "account_quality" || typeName == "invoice_type") &&
           (typeName == "account_quality" || typeName == "invoice_type") &&
@@ -1051,8 +1059,8 @@ export default {
     //新增开票
     //新增开票
     addPayment() {
     addPayment() {
       this.title = "开票新增";
       this.title = "开票新增";
-      this.formData={
-        accountName:"",
+      this.formData = {
+        accountName: "",
         revBankCardNum: "", //收入卡号
         revBankCardNum: "", //收入卡号
         outBankCardNum: "", //支出卡号
         outBankCardNum: "", //支出卡号
         biller: "", //开票员
         biller: "", //开票员
@@ -1069,35 +1077,37 @@ export default {
         rate: 0, //税率
         rate: 0, //税率
         payoutTime: "", //进账日期
         payoutTime: "", //进账日期
         payMethod: [], //支付方式
         payMethod: [], //支付方式
-        fundUse: "", //资金用途
-      }
-      this.formData.invoiceTime= this.getTodayDate()
+        fundUse: "" //资金用途
+      };
+      this.formData.invoiceTime = this.getTodayDate();
       this.detailDialog = true;
       this.detailDialog = true;
-     
     },
     },
     getTodayDate() {
     getTodayDate() {
       const today = new Date();
       const today = new Date();
       const year = today.getFullYear();
       const year = today.getFullYear();
       const month = today.getMonth() + 1; // 月份是从0开始的
       const month = today.getMonth() + 1; // 月份是从0开始的
       const day = today.getDate();
       const day = today.getDate();
-      return `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
+      return `${year}-${month
+        .toString()
+        .padStart(2, "0")}-${day.toString().padStart(2, "0")}`;
     },
     },
     //新增编辑开票信息
     //新增编辑开票信息
     submitInfo() {
     submitInfo() {
+      this.confirmDisabled = true;
       let params = JSON.parse(JSON.stringify(this.formData));
       let params = JSON.parse(JSON.stringify(this.formData));
-      this.$refs.formData.validate((valid) => {
+      this.$refs.formData.validate(valid => {
         if (valid) {
         if (valid) {
           //进账
           //进账
           if (this.formDataId && this.typeStatus == 2) {
           if (this.formDataId && this.typeStatus == 2) {
-            console.log(params.payoutTime)
+            console.log(params.payoutTime);
             //转化资金归属
             //转化资金归属
             params.entProfit = {};
             params.entProfit = {};
             params.outProfit = {};
             params.outProfit = {};
-            this.affiliationData.forEach((item) => {
+            this.affiliationData.forEach(item => {
               params.entProfit[item.profitEng] =
               params.entProfit[item.profitEng] =
                 item.profit == null ? 0 : item.profit;
                 item.profit == null ? 0 : item.profit;
             });
             });
-            this.affiliationData2.forEach((item) => {
+            this.affiliationData2.forEach(item => {
               params.outProfit[item.profitEng] =
               params.outProfit[item.profitEng] =
                 item.profit == 0 || item.profit == null ? 0 : item.profit * -1;
                 item.profit == 0 || item.profit == null ? 0 : item.profit * -1;
             });
             });
@@ -1120,14 +1130,20 @@ export default {
               fundFen: this.formData.fundUse[this.formData.fundUse.length - 1], //资金用途分项
               fundFen: this.formData.fundUse[this.formData.fundUse.length - 1], //资金用途分项
               payoutTime: params.payoutTime, //进账日期
               payoutTime: params.payoutTime, //进账日期
               entProfit: params.entProfit, //收入方资金归属
               entProfit: params.entProfit, //收入方资金归属
-              outProfit: params.outProfit, //支出方资金归属
+              outProfit: params.outProfit //支出方资金归属
             };
             };
-            this.$api.expense.putInvAccountIncoice(obj).then((res) => {
+            this.$api.expense.putInvAccountIncoice(obj).then(res => {
               if (res.code == 200) {
               if (res.code == 200) {
                 this.detailDialog = false;
                 this.detailDialog = false;
+                setTimeout(() => {
+                  this.confirmDisabled = false;
+                }, 500);
                 this.findPage();
                 this.findPage();
               } else {
               } else {
                 this.$message.error(res.msg);
                 this.$message.error(res.msg);
+                setTimeout(() => {
+                  this.confirmDisabled = false;
+                }, 500);
               }
               }
             });
             });
             //编辑
             //编辑
@@ -1140,12 +1156,18 @@ export default {
             params.company = params.otherUnit; //单位
             params.company = params.otherUnit; //单位
             delete params.payMethod;
             delete params.payMethod;
             delete params.payoutTime;
             delete params.payoutTime;
-            this.$api.expense.updateIncoice(params).then((res) => {
+            this.$api.expense.updateIncoice(params).then(res => {
               if (res.code == 200) {
               if (res.code == 200) {
                 this.detailDialog = false;
                 this.detailDialog = false;
+                setTimeout(() => {
+                  this.confirmDisabled = false;
+                }, 500);
                 this.findPage();
                 this.findPage();
               } else {
               } else {
                 this.$message.error(res.msg);
                 this.$message.error(res.msg);
+                setTimeout(() => {
+                  this.confirmDisabled = false;
+                }, 500);
               }
               }
             });
             });
             //新增
             //新增
@@ -1158,16 +1180,25 @@ export default {
             params.company = params.otherUnit; //单位
             params.company = params.otherUnit; //单位
             delete params.payMethod;
             delete params.payMethod;
             delete params.payoutTime;
             delete params.payoutTime;
-            this.$api.expense.addInvAccountIncoice(params).then((res) => {
+            this.$api.expense.addInvAccountIncoice(params).then(res => {
               if (res.code == 200) {
               if (res.code == 200) {
                 this.detailDialog = false;
                 this.detailDialog = false;
+                setTimeout(() => {
+                  this.confirmDisabled = false;
+                }, 500);
                 this.findPage();
                 this.findPage();
               } else {
               } else {
                 this.$message.error(res.msg);
                 this.$message.error(res.msg);
+                setTimeout(() => {
+                  this.confirmDisabled = false;
+                }, 500);
               }
               }
             });
             });
           }
           }
         } else {
         } else {
+          setTimeout(() => {
+            this.confirmDisabled = false;
+          }, 500);
           return false;
           return false;
         }
         }
       });
       });
@@ -1183,7 +1214,7 @@ export default {
       }
       }
     },
     },
     // 换页刷新
     // 换页刷新
-    refreshPageRequest: function (pageNum) {
+    refreshPageRequest: function(pageNum) {
       this.detailParams.pageNo = pageNum;
       this.detailParams.pageNo = pageNum;
       this.getDetailData();
       this.getDetailData();
     },
     },
@@ -1213,13 +1244,13 @@ export default {
     },
     },
     // 详情接口
     // 详情接口
     getDetailData(id) {
     getDetailData(id) {
-      this.$api.expense.detailInvAccountIncoice(id).then((res) => {
+      this.$api.expense.detailInvAccountIncoice(id).then(res => {
         if (res.code == 200) {
         if (res.code == 200) {
           let obj = this.collectionData.find(
           let obj = this.collectionData.find(
-            (item) => item.bankCardNum == res.data.revBankCardNum
+            item => item.bankCardNum == res.data.revBankCardNum
           );
           );
           let obj2 = this.collectionData.find(
           let obj2 = this.collectionData.find(
-            (item) => item.bankCardNum == res.data.outBankCardNum
+            item => item.bankCardNum == res.data.outBankCardNum
           );
           );
           if (obj) {
           if (obj) {
             res.data.invoiceBy = obj;
             res.data.invoiceBy = obj;
@@ -1257,9 +1288,9 @@ export default {
       delete params.applyTime;
       delete params.applyTime;
       this.$api.expense
       this.$api.expense
         .getInvAccountIncoice(params)
         .getInvAccountIncoice(params)
-        .then((res) => {
+        .then(res => {
           if (res.code == 200) {
           if (res.code == 200) {
-            res.data.records.forEach((item) => {
+            res.data.records.forEach(item => {
               item.clearFlagName = item.clearFlag == 0 ? "未清" : "已清";
               item.clearFlagName = item.clearFlag == 0 ? "未清" : "已清";
               item.invoiceTypeName = this.businessZh(
               item.invoiceTypeName = this.businessZh(
                 this.invoice_typeData,
                 this.invoice_typeData,
@@ -1279,7 +1310,7 @@ export default {
               pageNum: res.data.current,
               pageNum: res.data.current,
               pageSize: res.data.size,
               pageSize: res.data.size,
               totalPages: res.data.pages,
               totalPages: res.data.pages,
-              totalSize: res.data.total,
+              totalSize: res.data.total
             };
             };
             this.allNumObj = {
             this.allNumObj = {
               invoiceMoneySum: res.data.invoiceMoneySum,
               invoiceMoneySum: res.data.invoiceMoneySum,
@@ -1287,7 +1318,7 @@ export default {
               noHasTaxSum: res.data.noHasTaxSum,
               noHasTaxSum: res.data.noHasTaxSum,
               notPayoutMoneySum: res.data.notPayoutMoneySum,
               notPayoutMoneySum: res.data.notPayoutMoneySum,
               payoutMoneySum: res.data.payoutMoneySum,
               payoutMoneySum: res.data.payoutMoneySum,
-              taxSum: res.data.taxSum,
+              taxSum: res.data.taxSum
             };
             };
             this.loading = false;
             this.loading = false;
           } else {
           } else {
@@ -1301,8 +1332,8 @@ export default {
       this.pageRequest.pageNo = 1;
       this.pageRequest.pageNo = 1;
       this.pageRequest.pageSize = 20;
       this.pageRequest.pageSize = 20;
       this.findPage();
       this.findPage();
-    },
-  },
+    }
+  }
 };
 };
 </script>
 </script>