lxf 3 miesięcy temu
rodzic
commit
98c982d07d
1 zmienionych plików z 79 dodań i 89 usunięć
  1. 79 89
      src/views/finance/fundManage/depExpenses/index.vue

+ 79 - 89
src/views/finance/fundManage/depExpenses/index.vue

@@ -125,6 +125,19 @@
 
     <el-dialog title="高级检索" v-if="openSearch" v-model="openSearch" width="600" :before-close="cancelSearch">
       <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
+        <template #deptId>
+          <div>
+            <el-tree-select
+              v-model="sourceList.pagination.deptId"
+              :data="deptTreeData"
+              check-strictly
+              :render-after-expand="false"
+              node-key="deptId"
+              style="width: 100%"
+              :props="defaultProps"
+              clearable />
+          </div>
+        </template>
         <template #time>
           <div style="width: 100%">
             <el-row :gutter="10">
@@ -162,6 +175,7 @@ import { ElMessage } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import { computed, ref } from "vue";
+import useUserStore from "@/store/modules/user";
 
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -197,16 +211,6 @@ const status = ref([
     value: "20",
   },
 ]);
-const type = ref([
-  {
-    label: "是",
-    value: 1,
-  },
-  {
-    label: "否",
-    value: 0,
-  },
-]);
 const accountCurrency = ref([]);
 import Cookies from "js-cookie";
 const { proxy } = getCurrentInstance();
@@ -215,8 +219,8 @@ const config = computed(() => {
   return [
     {
       attrs: {
-        label: "资金账户",
-        prop: "accountManagementName",
+        label: "部门",
+        prop: "deptName",
       },
     },
     {
@@ -231,65 +235,66 @@ const config = computed(() => {
         slot: "amount",
       },
     },
-    {
-      attrs: {
-        prop: "accountOpening",
-        label: "对方账户",
-      },
-    },
-    {
-      attrs: {
-        prop: "openingBank",
-        label: "对方银行",
-      },
-    },
-    {
-      attrs: {
-        prop: "name",
-        label: "对方账号",
-      },
-    },
+    // {
+    //   attrs: {
+    //     prop: "accountOpening",
+    //     label: "对方账户",
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     prop: "openingBank",
+    //     label: "对方银行",
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     prop: "name",
+    //     label: "对方账号",
+    //   },
+    // },
     {
       attrs: {
         prop: "remarks",
         label: "摘要",
+        "min-width": "200",
       },
     },
-    {
-      attrs: {
-        label: "操作",
-        width: "200",
-        align: "right",
-      },
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "调整部门",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              depModal.value = true;
-              dtlData.value = row;
-              departmentId.value = [];
-            },
-          },
-          {
-            attrs: {
-              label: "分拆",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row);
-            },
-          },
-        ];
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     width: "200",
+    //     align: "right",
+    //   },
+    //   renderHTML(row) {
+    //     return [
+    //       {
+    //         attrs: {
+    //           label: "调整部门",
+    //           type: "primary",
+    //           text: true,
+    //         },
+    //         el: "button",
+    //         click() {
+    //           depModal.value = true;
+    //           dtlData.value = row;
+    //           departmentId.value = [];
+    //         },
+    //       },
+    //       {
+    //         attrs: {
+    //           label: "分拆",
+    //           type: "primary",
+    //           text: true,
+    //         },
+    //         el: "button",
+    //         click() {
+    //           getDtl(row);
+    //         },
+    //       },
+    //     ];
+    //   },
+    // },
   ];
 });
 const dtlData = ref({});
@@ -507,17 +512,10 @@ const handleRemove = (index) => {
   });
 };
 getList();
-const companyData = ref([]);
-proxy.post("/corporation/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
-  if (res.rows && res.rows.length > 0) {
-    companyData.value = res.rows.map((item) => {
-      return {
-        label: item.name,
-        value: item.id,
-      };
-    });
-  }
-});
+const defaultProps = {
+  children: "children",
+  label: "deptName",
+};
 const openSearch = ref(false);
 const formSearchConfig = computed(() => {
   return [
@@ -536,23 +534,15 @@ const formSearchConfig = computed(() => {
       clearable: true,
     },
     {
-      type: "select",
-      prop: "type",
-      label: "是否拆分",
-      data: type.value,
-      clearable: true,
-    },
-    {
-      type: "select",
-      prop: "corporationId",
-      label: "归属公司",
-      data: companyData.value,
-      clearable: true,
+      type: "slot",
+      slotName: "deptId",
+      label: "归属部门",
+      itemWidth: 50,
     },
     {
       type: "slot",
       slotName: "time",
-      label: "请款时间",
+      label: "交易时间",
     },
     {
       type: "input",