From df520dada1328a28b82cbbe04535954af8c5729c Mon Sep 17 00:00:00 2001 From: yujinlong Date: Fri, 15 Nov 2024 13:56:43 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E8=B4=A2=E7=A8=8E=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=9B=B8=E5=85=B3=E8=B0=83=E6=95=B4&=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E6=9C=BA=E6=9E=84=E7=9B=B8=E5=85=B3=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/org.ts | 12 ++- .../Form/src/components/ApiSelect.vue | 25 ++++-- .../baseinfo/accountMaintenance/columns.tsx | 30 ++++++- .../financialTax/bankJournal/columns.tsx | 22 +++-- src/views/financialTax/bankJournal/index.vue | 37 +++++--- .../financialTax/incomeInvoice/columns.tsx | 7 +- src/views/system/org/BankModal.vue | 28 ++++-- src/views/system/org/OrgModal.vue | 6 +- src/views/system/org/columns.tsx | 90 +++++++++++++++++-- src/views/system/org/index.vue | 6 +- src/views/system/user/columns.tsx | 12 +++ 11 files changed, 221 insertions(+), 54 deletions(-) diff --git a/src/api/system/org.ts b/src/api/system/org.ts index 49cf24f6..9a8b5d8a 100644 --- a/src/api/system/org.ts +++ b/src/api/system/org.ts @@ -15,7 +15,8 @@ enum Api { OrgAuthList = '/mainApi/OrgAuth/GetOrgAuthList', GetOrgAuthInfo = '/mainApi/OrgAuth/GetOrgAuthInfo', EditOrgAuth = '/mainApi/OrgAuth/EditOrgAuth', - DelOrgAuth = '/mainApi/OrgAuth/BatchDelOrgAuth' + DelOrgAuth = '/mainApi/OrgAuth/BatchDelOrgAuth', + BankListByKeyword = '/mainApi/Bank/QueryUnionBankNumber', } export function getOrgList(data: PageRequest) { return request({ @@ -120,3 +121,12 @@ export function BatchDelOrgAuth(data: any) { data, }) } + +// 根据地址关键字获取银行地址列表 +export function getBankListByKeyword(data: any) { + return request({ + url: Api.BankListByKeyword, + method: 'post', + data, + }) +} diff --git a/src/components/Form/src/components/ApiSelect.vue b/src/components/Form/src/components/ApiSelect.vue index 6e1a4c4f..34e38928 100644 --- a/src/components/Form/src/components/ApiSelect.vue +++ b/src/components/Form/src/components/ApiSelect.vue @@ -96,8 +96,9 @@ alwaysLoad: propTypes.bool.def(false), filterOption: { type: Function, - default: null - } + default: null, + }, + searchKey: propTypes.string.def('queryKey'), }, emits: ['options-change', 'change', 'update:value'], setup(props, { emit }) { @@ -193,23 +194,33 @@ emit('change', _, ...args) emitData.value = args } - const getPopupContainer = triggerNode => { + const getPopupContainer = (triggerNode) => { return triggerNode } - const handleSearch = useDebounceFn( async (v) => { - console.log(1) + const handleSearch = useDebounceFn(async (v) => { // option 属性搜索 if (props.filterOption != null) return // api 属性搜索 const api = props.api if (!api || !isFunction(api)) return loading.value = true - const res = await api({queryKey: v , ...props.params}) + const res = await api({ [props.searchKey]: v, ...props.params }) loading.value = false options.value = res.data emitChange() }, 200) - return { handleSearch, state, attrs, getOptions, loading, t, handleFetch, handleChange, props, getPopupContainer } + return { + handleSearch, + state, + attrs, + getOptions, + loading, + t, + handleFetch, + handleChange, + props, + getPopupContainer, + } }, }) diff --git a/src/views/baseinfo/accountMaintenance/columns.tsx b/src/views/baseinfo/accountMaintenance/columns.tsx index 6f41ef35..a08db497 100644 --- a/src/views/baseinfo/accountMaintenance/columns.tsx +++ b/src/views/baseinfo/accountMaintenance/columns.tsx @@ -1,7 +1,7 @@ import { ref } from 'vue' import { BasicColumn, FormSchema } from '/@/components/Table' // 下拉框数据接口 -import { GetClientListByCode, GetUserList } from '/@/api/common' +import { GetClientListByCode, GetUserList, getOrgList } from '/@/api/common' // 引入字典数据 import { getDictOption } from '/@/utils/dictUtil' // 客户类别下拉框数据 @@ -14,6 +14,14 @@ getDictOption('account_type').then((data) => { getDictOption('djy_cust_prop').then((data) => { customTypeDict.value = data }) +const orgIds = ref([]) +getOrgList().then((res) => { + const { data } = res + data.forEach((item: Recordable) => { + item['value'] = item.id + }) + orgIds.value = res.data +}) // 客户名称下拉框数据 const companyDict = ref([]) export const columns: BasicColumn[] = [ @@ -150,6 +158,24 @@ export const formSchema: FormSchema[] = [ } }, }, + { + field: 'orgId', + label: '组织机构', + component: 'Select', + colProps: { span: 12 }, + componentProps: () => { + return { + options: orgIds.value, + resultField: 'data', + showSearch: true, + placeholder: '请选择', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + getPopupContainer: () => document.body, + } + }, + }, { field: 'customerId', component: 'Input', @@ -181,7 +207,7 @@ export const formSchema: FormSchema[] = [ field: 'userId', label: '', component: 'Input', - show: false + show: false, }, { field: 'userName', diff --git a/src/views/financialTax/bankJournal/columns.tsx b/src/views/financialTax/bankJournal/columns.tsx index 98cfe24f..04c5065b 100644 --- a/src/views/financialTax/bankJournal/columns.tsx +++ b/src/views/financialTax/bankJournal/columns.tsx @@ -1,8 +1,9 @@ +import moment from 'moment' import { BasicColumn, FormSchema } from '/@/components/Table' import { numberThousandFormat } from '/@/utils/commonUtil' export type BankItem = { - accountId: string + bankNo: string bankName: string } @@ -25,6 +26,12 @@ export const searchFormSchema: FormSchema[] = [ } }, }, + { + field: 'bankName', + label: '银行名称', + component: 'Input', + colProps: { span: 4 }, + }, { field: 'payerAccountNumber', label: '银行账号', @@ -32,8 +39,8 @@ export const searchFormSchema: FormSchema[] = [ colProps: { span: 4 }, }, { - field: 'payerName', - label: '付款人名称', + field: 'payerOrPayeeName', + label: '收付款人名称', component: 'Input', colProps: { span: 4 }, }, @@ -55,6 +62,9 @@ export const columns: BasicColumn[] = [ width: 100, dataIndex: 'transactionDate', sorter: true, + customRender({ text }) { + return moment(text).format('YYYY-MM-DD') + }, }, { title: '交易时间', @@ -81,9 +91,6 @@ export const columns: BasicColumn[] = [ width: 100, dataIndex: 'tradeAmount', sorter: true, - customRender({ text }) { - return numberThousandFormat(text) - }, }, { title: '交易后余额', @@ -322,5 +329,6 @@ export const columns: BasicColumn[] = [ ] export const bankNoFormat = (bankNo) => { - return bankNo.replace(/\s/g, '').replace(/(.{4})/g, '$1 ') + // return bankNo.replace(/\s/g, '').replace(/(.{4})/g, '$1 ') + return bankNo.slice(-4) } diff --git a/src/views/financialTax/bankJournal/index.vue b/src/views/financialTax/bankJournal/index.vue index f1c1a3cb..c9b85bb9 100644 --- a/src/views/financialTax/bankJournal/index.vue +++ b/src/views/financialTax/bankJournal/index.vue @@ -10,19 +10,19 @@
{{ item.bankName }} - {{ bankNoFormat(item.accountId) }} + {{ bankNoFormat(item.bankNo) }}
@@ -32,12 +32,14 @@
流水详情