lijingjia 1 week ago
commit 05f5c27d85

@ -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<DataResult>({
@ -120,3 +121,12 @@ export function BatchDelOrgAuth(data: any) {
data,
})
}
// 根据地址关键字获取银行地址列表
export function getBankListByKeyword(data: any) {
return request<DataResult>({
url: Api.BankListByKeyword,
method: 'post',
data,
})
}

@ -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)
// 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,
}
},
})
</script>

@ -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('infoclient-ArrclientTag').then((data) => {
customTypeDict.value = data
})
const orgIds = ref<Recordable[]>([])
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',

@ -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)
}

@ -10,19 +10,19 @@
<div
class="bank-item"
v-for="item in bankList"
:key="item.accountId"
:key="item.bankNo"
:style="{
background: activeBank == item.accountId ? '#F5F9FC' : '',
color: activeBank == item.accountId ? '#257AFA' : '',
background: activeBank == item.bankNo ? '#F5F9FC' : '',
color: activeBank == item.bankNo ? '#257AFA' : '',
}"
@click="changeActiveBank(item.accountId)"
@click="changeActiveBank(item.bankNo)"
>
<i
class="iconfont icon-yinhangzhanghu"
:style="{ color: activeBank == item.accountId ? '#257AFA' : '#7A8798' }"
:style="{ color: activeBank == item.bankNo ? '#257AFA' : '#7A8798' }"
></i>
<span class="bank-name">{{ item.bankName }}</span>
<span>{{ bankNoFormat(item.accountId) }}</span>
<span>{{ bankNoFormat(item.bankNo) }}</span>
</div>
</div>
</a-spin>
@ -32,12 +32,14 @@
<div class="module-title">流水详情</div>
</template>
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.key === 'tradeAmount'">
<span v-if="record.transactionType == '来账'" class="success">
{{ record.tradeAmount }}
<template v-if="column.key === 'transactionType'">
<span :class="record.transactionType == '来账' ? 'success' : 'error'">
{{ record.transactionType }}
</span>
<span v-if="record.transactionType == '往账'" class="error">
{{ record.tradeAmount }}
</template>
<template v-if="column.key === 'tradeAmount'">
<span :class="record.transactionType == '来账' ? 'success' : 'error'">
{{ numberThousandFormat(record.tradeAmount) }}
</span>
</template>
<template v-if="column.key === 'action'">
@ -58,6 +60,7 @@
import { ApiBankList, ApiBankFlowList } from './api'
import { formatParams } from '/@/hooks/web/common'
import { numberThousandFormat } from '/@/utils/commonUtil'
const [registerTable, { reload, getForm }] = useTable({
api: async (p) => {
@ -70,7 +73,14 @@
})
},
beforeFetch: (p) => {
return formatParams({ ...p, accountId: activeBank.value })
return {
...formatParams(p),
otherQueryCondition: {
payerOrPayeeName: p.payerOrPayeeName,
bankNo: activeBank.value,
bankName: p.bankName,
},
}
},
immediate: false,
columns,
@ -106,8 +116,7 @@
const getBankList = async () => {
bankLoading.value = true
const res: API.DataResult = await ApiBankList()
console.log(res)
activeBank.value = res.data?.[0]?.accountId || ''
activeBank.value = res.data?.[0]?.bankNo || ''
reload()
bankList.value = res.data
bankLoading.value = false

@ -17,8 +17,8 @@ export const invoiceCodeList: LabelValueOptions = [
{ label: '税控卷票', value: '025' },
]
export const invoiceStatusList: LabelValueOptions = [
{ label: '蓝票', value: '00' },
{ label: '红票', value: '01' },
{ label: '蓝票', value: '00', color: '#257AFA' },
{ label: '红票', value: '01', color: '#BA3849' },
]
export const reimbursementStatusList: LabelValueOptions = [
@ -100,7 +100,8 @@ export const columns: BasicColumn[] = [
width: 100,
sorter: true,
customRender: ({ text }) => {
return invoiceStatusList.find((el) => el.value === text)?.label || '未知'
const statusObj = invoiceStatusList.find((el) => el.value === text)
return h('span', { style: { color: statusObj?.color || '' } }, statusObj?.label || '未知')
},
},
{

@ -8,17 +8,23 @@
@ok="handleSave"
>
<BasicForm @register="registerForm">
<template #paymentAccount="item">
<a-switch @change="changePaymentAccount" v-model:checked="item.values.paymentAccount" />
<span class="s-txt" :class="{ 's-active': item.values.paymentAccount }">
{{ item.values.paymentAccount ? '是' : '否' }}
</span>
</template>
<template #isDefault="item">
<a-switch @change="changeIsDefault" v-model:checked="item.values.isDefault" />
<span class="s-txt" :class="{ 's-active': item.values.isDefault }">{{
item.values.isDefault ? '是' : '否'
}}</span>
<span class="s-txt" :class="{ 's-active': item.values.isDefault }">
{{ item.values.isDefault ? '是' : '否' }}
</span>
</template>
<template #status="item">
<a-switch @change="changeStatus" v-model:checked="item.values.status" />
<span class="s-txt" :class="{ 's-active': item.values.status }">{{
item.values.status ? '启用' : '禁用'
}}</span>
<span class="s-txt" :class="{ 's-active': item.values.status }">
{{ item.values.status ? '启用' : '禁用' }}
</span>
</template>
</BasicForm>
@ -44,7 +50,7 @@
const rowId = ref('')
const linkId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({
const [registerForm, { resetFields, setFieldsValue, validate, getFieldsValue }] = useForm({
labelWidth: 100,
schemas: BankformSchema,
showActionButtonGroup: false,
@ -78,6 +84,10 @@
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增账户信息' : '编辑账户信息'))
// Switch
const changePaymentAccount = (v) => {
setFieldsValue({ paymentAccount: v })
}
// Switch
const changeIsDefault = (v) => {
setFieldsValue({ isDefault: v })
}
@ -86,7 +96,9 @@
}
async function handleSave(exit) {
try {
const values = await validate()
await validate()
const values = getFieldsValue()
setModalProps({ confirmLoading: true, loading: true })
values.linkId = values.linkId ? values.linkId : linkId.value
if (values.status) {

@ -68,7 +68,7 @@
</template>
</BasicTable>
</a-tab-pane>
<a-tab-pane key="2" tab="API授权" force-render>
<!-- <a-tab-pane key="2" tab="API授权" force-render>
<BasicTable @register="registerAPITable">
<template #tableTitle>
<h4 class="mr15" style="margin-bottom: 0">API授权</h4>
@ -91,10 +91,10 @@
</template>
</template>
</BasicTable>
</a-tab-pane>
</a-tab-pane> -->
</a-tabs>
<BankModal @register="registerBankModal" @success="handleSuccess" />
<APIAuthModal @register="registerAPIModal" @success="handleSuccess" />
<!-- <APIAuthModal @register="registerAPIModal" @success="handleSuccess" /> -->
<!--右下角按钮-->
<template #footer>
<a-button :loading="loading" @click="closeModal"></a-button>

@ -2,6 +2,7 @@ import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { getDictDropDown, GetUserList } from '/@/api/common'
import { useOptionsStore } from '/@/store/modules/options'
import { getBankListByKeyword } from '/@/api/system/org'
const optionsStore = useOptionsStore()
let orgAuthTypeList: LabelValueOptions = []
@ -514,6 +515,18 @@ export const BankColumns: BasicColumn[] = [
width: 230,
align: 'left',
},
{
title: '联行号',
dataIndex: 'unionBankNo',
width: '180',
align: 'left',
},
{
title: '银企直联账户Id',
dataIndex: 'cstNo',
width: '180',
align: 'left',
},
{
title: 'ABA代码',
dataIndex: 'aba',
@ -580,6 +593,19 @@ export const BankColumns: BasicColumn[] = [
return text
},
},
{
title: '付款账户',
dataIndex: 'paymentAccount',
width: 100,
customRender: ({ text }) => {
if (text === true) {
return <Tag color="success"></Tag>
} else if (text === false) {
return <Tag color="red"></Tag>
}
return text
},
},
{
title: '备注',
dataIndex: 'note',
@ -670,12 +696,29 @@ export const BankformSchema: FormSchema[] = [
},
},
{
label: '银行地址',
field: 'bankAddress',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
label: '银行地址',
component: 'ApiSelect',
defaultValue: null,
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
searchKey: 'keyword',
api: getBankListByKeyword,
labelField: 'bankName',
valueField: 'bankName',
resultField: 'data',
immediate: false,
getPopupContainer: () => document.body,
onChange: (e, obj) => {
if (e && obj) {
formModel.unionBankNo = obj.unionBankNo
}
if (!e && !obj) {
formModel.unionBankNo = ''
}
},
}
},
},
{
@ -741,6 +784,43 @@ export const BankformSchema: FormSchema[] = [
span: 12,
},
},
{
label: '银企直联账户Id',
field: 'cstNo',
component: 'Input',
defaultValue: '',
colProps: {
span: 12,
},
},
{
label: '联行号',
field: 'unionBankNo',
component: 'Input',
defaultValue: '',
isEdit: 1,
dynamicDisabled: true,
colProps: {
span: 12,
},
},
{
field: 'paymentAccount',
component: 'Switch',
slot: 'paymentAccount',
label: '付款账户',
required: true,
componentProps: {
options: [
{ label: '是', value: true },
{ label: '否', value: false },
],
},
defaultValue: false,
colProps: {
span: 6,
},
},
{
field: 'isDefault',
component: 'Switch',

@ -96,7 +96,6 @@
resolve({ data: [...res.data], total: res.count })
})
},
resizeHeightOffset: 50,
beforeFetch: (p) => {
if (ParentId.value) p['parentId'] = ParentId.value
return formatParams(p)
@ -134,7 +133,6 @@
if (res.succeeded) {
createMessage.success(res.message)
initData()
reload()
} else {
createMessage.warning(res.message)
}
@ -164,13 +162,14 @@
// console.log(record)
// }
async function initData() {
const res: API.DataResult = await getOrgTree()
const res: API.DataResult = await getOrgTree({})
if (res.succeeded) {
res.data.forEach((e) => {
e.first = true
})
treeData.value = res.data
ParentId.value = res.data[0].value
reload()
}
}
onMounted(() => {
@ -180,7 +179,6 @@
function handleSuccess() {
// ParentId.value = 0
initData()
reload()
}
</script>
<style lang="less">

@ -397,6 +397,18 @@ export const formSchema: FormSchema[] = [
component: 'Switch',
colProps: { span: 6 }
},
{
field: 'dingUserId',
label: '钉钉用户Id',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'dingDepartmentId',
label: '钉钉部门Id',
component: 'Input',
colProps: { span: 6 },
},
{
label: '用户属性',
field: 'userAttr',

Loading…
Cancel
Save