From 6b8f073df16ed45ec9e710abe18d1f4ffde30540 Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期五, 19 十二月 2025 08:49:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cwxt_master' into cwxt_master
---
ui/admin-ui3/src/views/cwgl/bankAccountConfig/index.vue | 456 +++++++++++++++++++++++++++++++++++---------------------
1 files changed, 282 insertions(+), 174 deletions(-)
diff --git a/ui/admin-ui3/src/views/cwgl/bankAccountConfig/index.vue b/ui/admin-ui3/src/views/cwgl/bankAccountConfig/index.vue
index 4374f2f..1473fd8 100644
--- a/ui/admin-ui3/src/views/cwgl/bankAccountConfig/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/bankAccountConfig/index.vue
@@ -1,193 +1,301 @@
<template>
- <basicContainer >
- <avue-crud
- :option="option"
- :table-loading="pageF.loading"
- :data="tableData"
- :page="page"
- :permission="permissionList"
- :before-open="beforeOpen"
- v-model="form"
- ref="crudRef"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @refresh-change="refreshChange"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @on-load="onLoad"
- >
+ <basicContainer>
+ <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
+ :permission="permissionList" :before-open="beforeOpen" v-model="form" ref="crudRef" @row-update="rowUpdate"
+ @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" @search-change="searchChange"
+ @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+ @size-change="sizeChange" @on-load="onLoad">
<template #menu-left>
- <el-button
- type="success"
- icon="Edit"
- :disabled="pageF.single"
- v-hasPermi="['cwgl:bankAccountConfig:edit']"
- @click="handleUpdate">淇敼
+ <el-button type="primary" icon="Plus" v-hasPermi="['cwgl:bankAccountConfig:add']" @click="handleAdd">鏂板
</el-button>
- <el-button
- type="danger"
- icon="Delete"
- :disabled="pageF.multiple"
- @click="handleDelete"
- v-hasPermi="['cwgl:bankAccountConfig:remove']"
- >鍒犻櫎
+ <!-- <el-button type="success" icon="Edit" :disabled="pageF.single" v-hasPermi="['cwgl:bankAccountConfig:edit']"
+ @click="handleUpdate">淇敼
+ </el-button> -->
+ <!-- <el-button type="danger" icon="Delete" :disabled="pageF.multiple" @click="handleDelete"
+ v-hasPermi="['cwgl:bankAccountConfig:remove']">鍒犻櫎
+ </el-button> -->
+ <el-button type="warning" plain icon="Download" @click="handleExport"
+ v-hasPermi="['cwgl:bankAccountConfig:export']">瀵煎嚭
</el-button>
- <el-button
- type="warning"
- plain
- icon="Download"
- @click="handleExport"
- v-hasPermi="['cwgl:bankAccountConfig:export']"
- >瀵煎嚭
- </el-button>
+ </template>
+ <template #menu="{ size, row, index }">
+ <el-link class="link-btn" type="primary" icon="Edit" :underline="false" plain :size="size"
+ @click="handleFy(row)" v-hasPermi="['cwgl:bankAccountConfig:edit']"> 缂栬緫
+ </el-link>
</template>
</avue-crud>
</basicContainer>
+ <bankCardCate ref="invoiceFormRef" @submit="handleFormSubmit" />
</template>
<script setup name="bankAccountConfig" lang="ts">
- import {BankAccountConfigI,addBankAccountConfig, delBankAccountConfig, exportBankAccountConfig, getBankAccountConfig, listBankAccountConfig, updateBankAccountConfig} from "@/api/cwgl/bankAccountConfig";
- import useCurrentInstance from "@/utils/useCurrentInstance";
- import {computed,reactive, ref, toRefs} from "vue";
- import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
- import {usePagePlus} from "@/hooks/usePagePlus";
- import {hasPermission} from "@/utils/permissionUtils";
+import { BankAccountConfigI, addBankAccountConfig, delBankAccountConfig, exportBankAccountConfig, getBankAccountConfig, listBankAccountConfig, updateBankAccountConfig } from "@/api/cwgl/bankAccountConfig";
+import useCurrentInstance from "@/utils/useCurrentInstance";
+import { computed, reactive, ref, toRefs } from "vue";
+import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { hasPermission } from "@/utils/permissionUtils";
+import bankCardCate from "@/components/bankCardCate/index.vue";
+const { proxy } = useCurrentInstance();
+const crudRef = ref();
+const {
+ customer_type, sys_invoice_type, sys_currency, sys_account_type, sys_bank_type
+} =
+ proxy.useDict(
+ 'customer_type', 'sys_invoice_type', 'sys_currency', 'sys_account_type', 'sys_bank_type'
+ );
+const dictFormat = (dict: any, value: any) => {
+ return proxy.selectDictLabel(dict, value);
+}
+const permissionList = computed(() => {
+ return {
+ addBtn: hasPermission(["cwgl:bankAccountConfig:add"]),
+ delBtn: hasPermission(["cwgl:bankAccountConfig:remove"]),
+ editBtn: hasPermission(["cwgl:bankAccountConfig:edit"]),
+ viewBtn: hasPermission(["cwgl:bankAccountConfig:query"]),
+ }
+})
- const { proxy } = useCurrentInstance();
- const crudRef = ref();
-
- const permissionList = computed(()=>{
- return {
- addBtn: hasPermission(["cwgl:bankAccountConfig:add"]),
- delBtn: hasPermission(["cwgl:bankAccountConfig:remove"]),
- editBtn: hasPermission(["cwgl:bankAccountConfig:edit"]),
- viewBtn: hasPermission(["cwgl:bankAccountConfig:query"]),
- }
- })
-
- const data = reactive({
- form:<BankAccountConfigI>{},
- queryParams:<BankAccountConfigI&PageQueryInterface>{},
- page: <PagesInterface>{
- pageSize: 10,
- total: 0,
- currentPage: 1,
+const data = reactive({
+ form: <BankAccountConfigI>{},
+ queryParams: <BankAccountConfigI & PageQueryInterface>{},
+ page: <PagesInterface>{
+ pageSize: 10,
+ total: 0,
+ currentPage: 1,
+ },
+ selectionList: [],
+})
+const { queryParams, form, page, selectionList } = toRefs(data);
+const option = ref({
+ pageKey: 'BankAccountConfig',
+ rowKey: 'id',
+ addBtn: false,
+ editBtn: false,
+ searchSpan: 5,
+ labelWidth: 150,
+ searchLabelWidth: 120,
+ column: {
+ // id: {
+ // label: 'ID',
+ // },
+ // customerId: {
+ // label: '瀹㈡埛ID',
+ // rules: [
+ // {
+ // required: true,
+ // message: "瀹㈡埛ID涓嶈兘涓虹┖", trigger: "blur"
+ // }
+ // ],
+ // },
+ customerName: {
+ label: '瀹㈡埛鍚嶇О',
+ minWidth: 120,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
},
- selectionList:[],
- })
- const {queryParams,form,page,selectionList} = toRefs(data);
- const option = ref({
- pageKey: 'BankAccountConfig',
- rowKey: 'id',
- column: {
- id: {
- label: 'ID',
- },
- customerId: {
- label: '瀹㈡埛ID',
- rules: [
- {
- required: true,
- message: "瀹㈡埛ID涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- customerName: {
- label: '瀹㈡埛鍚嶇О',
- rules: [
- {
- required: true,
- message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- accountNo: {
- label: '璐﹀彿缂栧彿',
- rules: [
- {
- required: true,
- message: "璐﹀彿缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- accountName: {
- label: '鎴峰悕',
- rules: [
- {
- required: true,
- message: "鎴峰悕涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- bankName: {
- label: '閾惰鍚嶇О',
- rules: [
- {
- required: true,
- message: "閾惰鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
- ], },
- branchName: {
- label: '鏀鍚嶇О',
- },
- accountType: {
- label: '璐﹀彿绫诲瀷(corporate:瀵瑰叕璐︽埛;personal:涓汉璐︽埛;collection:鏀舵璐︽埛;payment:浠樻璐︽埛)',
- },
- currency: {
- label: '甯佺',
- },
- status: {
- label: '鐘舵��(normal:姝e父;frozen:鍐荤粨;cancelled:娉ㄩ攢;abnormal:寮傚父)',
- },
- accountNumber: {
- label: '閾惰璐﹀彿',
- },
- openingDate: {
- label: '寮�鎴锋棩鏈�',
- },
- bankCode: {
- label: '閾惰琛屽彿',
- },
- remark: {
- label: '澶囨敞',
- type: 'textarea', minRows: 3, maxRows: 5,
- },
- isDefault: {
- label: '鏄惁榛樿璐︽埛(0:鍚�;1:鏄�)',
- },
- createBy: {
- label: '鍒涘缓浜�',
- },
- updateBy: {
- label: '鏇存柊浜�',
- },
- createTime: {
- label: '鍒涘缓鏃堕棿',
- },
- updateTime: {
- label: '鏇存柊鏃堕棿',
- },
- deleted: {
- label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
- },
- }
- })
+ accountNo: {
+ label: '璐﹀彿缂栧彿',
+ minWidth: 180,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "璐﹀彿缂栧彿涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ accountName: {
+ label: '鎴峰悕',
+ minWidth: 120,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "鎴峰悕涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ bankName: {
+ label: '閾惰鍚嶇О',
+ minWidth: 140,
+ rules: [
+ {
+ required: true,
+ message: "閾惰鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
+ }
+ ],
+ },
+ branchName: {
+ label: '鏀鍚嶇О',
+ minWidth: 180,
+ },
- const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
- searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
- form:form,
- option:option,
- queryParams:queryParams,
- idKey:'id',
- page:page.value,
- getListApi:listBankAccountConfig,
- getDetailApi:getBankAccountConfig,
- exportApi:exportBankAccountConfig,
- deleteApi:delBankAccountConfig,
- addApi:addBankAccountConfig,
- updateApi:updateBankAccountConfig,
- handleUpdateFunc:()=>{
+ accountType: {
+ label: '璐﹀彿绫诲瀷',
+ search: true,
+ minWidth: 120,
+ dataType: 'string',
+ type: 'select',
+ // addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ // editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: false,
+ dicUrl: '/system/dict/data/type/sys_account_type',
+ },
+ accountTypeData: {
+ label: '璐﹀彿绫诲瀷',
+ minWidth: 120,
+ addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: true,
+ },
+ currency: {
+ label: '甯佺',
+ search: true,
+ minWidth: 120,
+ dataType: 'string',
+ type: 'select',
+ // addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ // editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: false,
+ dicUrl: '/system/dict/data/type/sys_currency',
+ },
+ currencyData: {
+ label: '甯佺',
+ minWidth: 120,
+ addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: true,
+
+ },
+ status: {
+ label: '璐︽埛鐘舵��',
+ search: true,
+ minWidth: 120,
+ dataType: 'string',
+ type: 'select',
+ // addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ // editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: false,
+ dicUrl: '/system/dict/data/type/sys_bank_type',
+
+ },
+ statusData: {
+ label: '璐︽埛鐘舵��',
+ minWidth: 120,
+ addDisplay: false, // 鏂板鏃朵笉鏄剧ず
+ editDisplay: false, // 淇敼鏃朵笉鏄剧ず
+ viewDisplay: true,
+ }
+ // accountNumber: {
+ // label: '閾惰璐﹀彿',
+ // },
+ // openingDate: {
+ // label: '寮�鎴锋棩鏈�',
+ // },
+ // bankCode: {
+ // label: '閾惰琛屽彿',
+ // },
+ // remark: {
+ // label: '澶囨敞',
+ // type: 'textarea', minRows: 3, maxRows: 5,
+ // },
+ // isDefault: {
+ // label: '鏄惁榛樿璐︽埛(0:鍚�;1:鏄�)',
+ // },
+ // createBy: {
+ // label: '鍒涘缓浜�',
+ // },
+ // updateBy: {
+ // label: '鏇存柊浜�',
+ // },
+ // createTime: {
+ // label: '鍒涘缓鏃堕棿',
+ // },
+ // updateTime: {
+ // label: '鏇存柊鏃堕棿',
+ // },
+ // deleted: {
+ // label: '鍒犻櫎鏍囪(0:姝e父;1:鍒犻櫎)',
+ // },
+ }
+})
+
+const { tableData, pageF, rowSave, rowUpdate, rowDel, beforeOpen, searchChange,
+ searchReset, selectionChange, onLoad, currentChange, sizeChange, handleDelete, handleExport, handleUpdate, refreshChange } = usePagePlus({
+ form: form,
+ option: option,
+ queryParams: queryParams,
+ idKey: 'id',
+ page: page.value,
+ getListApi: listBankAccountConfig,
+ getDetailApi: getBankAccountConfig,
+ exportApi: exportBankAccountConfig,
+ deleteApi: delBankAccountConfig,
+ addApi: addBankAccountConfig,
+ updateApi: updateBankAccountConfig,
+ handleUpdateFunc: () => {
crudRef.value.rowEdit(selectionList.value[0]);
},
- handleSelectionChangeFunc:(selection:any)=>{
+ handleSelectionChangeFunc: (selection: any) => {
selectionList.value = selection;
- }
- })
+ },
+ handleEndOpenFunc: (data, obj) => {
+ if (data == 'view') {
+ nextTick(() => {
+ // 寮哄埗灏� row 鐨勫師濮嬫暟鎹�(鍖呭惈'pc') 閲嶆柊鐏屽叆琛ㄥ崟
+ // 杩欒兘瑙e喅浣犳墦鍗颁俊鎭腑鏈�鍚庡嚭鐜扮殑 {} 缃┖闂
+ Object.assign(form.value, obj.data);
+ form.value.accountTypeData = dictFormat(sys_account_type.value, form.value.accountType);
+ form.value.currencyData = dictFormat(sys_currency.value, form.value.currency);
+ form.value.statusData = dictFormat(sys_bank_type.value, form.value.status);
+ });
+ }
+
+
+ },
+ })
+const invoiceFormRef = ref();
+const handleAdd = () => {
+ invoiceFormRef.value.openDialog('');
+};
+
+const handleFormSubmit = (data: any) => {
+ if (data.id !== '') {
+ console.log(1);
+
+ updateBankAccountConfig(data).then((res) => {
+ if (res.code == 200) {
+ proxy.$message.success(res.msg);
+ invoiceFormRef.value.handleClose();
+ onLoad(page.value)
+ }
+ });
+ } else {
+ console.log(2);
+ addBankAccountConfig(data).then((res) => {
+ if (res.code == 200) {
+ proxy.$message.success(res.msg);
+ invoiceFormRef.value.handleClose();
+ onLoad(page.value)
+ }
+ });
+ }
+
+
+};
+const handleFy = (row: any) => {
+ getBankAccountConfig(row.id).then((res) => {
+ if (res.code == 200) {
+ invoiceFormRef.value.openDialog(res.data);
+ }
+ });
+};
</script>
--
Gitblit v1.8.0