Quellcode durchsuchen

1.进账记录增加撤销操作
2.调整转账记录页面字段

haizhouwang vor 2 Jahren
Ursprung
Commit
92efac7c63

+ 28 - 1
src/views/FinancialManagement/ExpenseManagement/PaymentManagement.vue

@@ -434,7 +434,11 @@
         :data="expendPageResult"
         :columns="expendColumns"
         :showBatchDelete="false"
-        :showOperation="false"
+        :showOperation="true"
+        button3Name="撤销"
+        button3Icon="fa fa-trash"
+        button3Background="#f56c6c"
+        @handleButton3="handleTableRepeal"
         @findPage="getRecordData"
         :isshowpagination="true"
       ></kt-common-table>
@@ -725,6 +729,29 @@ export default {
     },
   },
   methods: {
+    /**
+     * 撤销转账记录
+     */
+     handleTableRepeal(index) {
+      let row = index.row;
+      console.log(row);
+      this.$confirm("确认撤销该  “"+row.revenueOutlayName+"”  记录吗?", "提示", {
+        type: "warning",
+      })
+        .then(() => {
+          this.$api.expense
+            .accountOperateDelete(row.accountOperateId)
+            .then((res) => {
+              if (res.code == 200) {
+                this.$message.success("撤销成功");
+                this.getRecordData();
+              } else {
+                this.$message.error(res.msg);
+              }
+            });
+        })
+        .catch(() => {});
+    },
     //记录弹框取消重置
     expendResetForm() {
       this.expendDialogVisible = false;

+ 15 - 9
src/views/FinancialManagement/ExpenseManagement/TransferRecord.vue

@@ -83,14 +83,16 @@ export default {
     return {
       operationWidth: 100, //操作列宽度
       pageResult: {}, //表格参数
-      pageRequest: {  // 列表查询条件
+      pageRequest: {
+        // 列表查询条件
         pageNo: 1,
         pageSize: 10,
         company: "",
         fundUse: "",
         revenueOutlay: "",
       },
-      columns: [  // 数据列
+      columns: [
+        // 数据列
         {
           prop: "revenueOutlayName",
           label: "转账类型",
@@ -98,9 +100,9 @@ export default {
           sortable: false,
         },
         {
-          prop: "company",
-          label: "支出单位",
-          minWidth: 350,
+          prop: "createTime",
+          label: "创建时间",
+          minWidth: 100,
           sortable: false,
         },
         { prop: "fundFlow", label: "资金流向", minWidth: 350, sortable: false },
@@ -131,12 +133,16 @@ export default {
     /**
      * 撤销转账记录
      */
-     handleTableDelete(index) {
+    handleTableDelete(index) {
       let row = index.row;
       console.log(row);
-      this.$confirm("确认撤销该  “"+row.revenueOutlayName+"”  记录吗?", "提示", {
-        type: "warning",
-      })
+      this.$confirm(
+        "确认撤销该  “" + row.revenueOutlayName + "”  记录吗?",
+        "提示",
+        {
+          type: "warning",
+        }
+      )
         .then(() => {
           this.$api.expense
             .accountOperateDelete(row.accountOperateId)