lijingjia 1 week ago
commit 05f5c27d85

@ -15,7 +15,8 @@ enum Api {
OrgAuthList = '/mainApi/OrgAuth/GetOrgAuthList', OrgAuthList = '/mainApi/OrgAuth/GetOrgAuthList',
GetOrgAuthInfo = '/mainApi/OrgAuth/GetOrgAuthInfo', GetOrgAuthInfo = '/mainApi/OrgAuth/GetOrgAuthInfo',
EditOrgAuth = '/mainApi/OrgAuth/EditOrgAuth', EditOrgAuth = '/mainApi/OrgAuth/EditOrgAuth',
DelOrgAuth = '/mainApi/OrgAuth/BatchDelOrgAuth' DelOrgAuth = '/mainApi/OrgAuth/BatchDelOrgAuth',
BankListByKeyword = '/mainApi/Bank/QueryUnionBankNumber',
} }
export function getOrgList(data: PageRequest) { export function getOrgList(data: PageRequest) {
return request<DataResult>({ return request<DataResult>({
@ -120,3 +121,12 @@ export function BatchDelOrgAuth(data: any) {
data, data,
}) })
} }
// 根据地址关键字获取银行地址列表
export function getBankListByKeyword(data: any) {
return request<DataResult>({
url: Api.BankListByKeyword,
method: 'post',
data,
})
}

@ -96,8 +96,9 @@
alwaysLoad: propTypes.bool.def(false), alwaysLoad: propTypes.bool.def(false),
filterOption: { filterOption: {
type: Function, type: Function,
default: null default: null,
} },
searchKey: propTypes.string.def('queryKey'),
}, },
emits: ['options-change', 'change', 'update:value'], emits: ['options-change', 'change', 'update:value'],
setup(props, { emit }) { setup(props, { emit }) {
@ -193,23 +194,33 @@
emit('change', _, ...args) emit('change', _, ...args)
emitData.value = args emitData.value = args
} }
const getPopupContainer = triggerNode => { const getPopupContainer = (triggerNode) => {
return triggerNode return triggerNode
} }
const handleSearch = useDebounceFn( async (v) => { const handleSearch = useDebounceFn(async (v) => {
console.log(1)
// option // option
if (props.filterOption != null) return if (props.filterOption != null) return
// api // api
const api = props.api const api = props.api
if (!api || !isFunction(api)) return if (!api || !isFunction(api)) return
loading.value = true loading.value = true
const res = await api({queryKey: v , ...props.params}) const res = await api({ [props.searchKey]: v, ...props.params })
loading.value = false loading.value = false
options.value = res.data options.value = res.data
emitChange() emitChange()
}, 200) }, 200)
return { handleSearch, state, attrs, getOptions, loading, t, handleFetch, handleChange, props, getPopupContainer } return {
handleSearch,
state,
attrs,
getOptions,
loading,
t,
handleFetch,
handleChange,
props,
getPopupContainer,
}
}, },
}) })
</script> </script>

@ -1,7 +1,7 @@
import { ref } from 'vue' import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
// 下拉框数据接口 // 下拉框数据接口
import { GetClientListByCode, GetUserList } from '/@/api/common' import { GetClientListByCode, GetUserList, getOrgList } from '/@/api/common'
// 引入字典数据 // 引入字典数据
import { getDictOption } from '/@/utils/dictUtil' import { getDictOption } from '/@/utils/dictUtil'
// 客户类别下拉框数据 // 客户类别下拉框数据
@ -14,6 +14,14 @@ getDictOption('account_type').then((data) => {
getDictOption('infoclient-ArrclientTag').then((data) => { getDictOption('infoclient-ArrclientTag').then((data) => {
customTypeDict.value = 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([]) const companyDict = ref([])
export const columns: BasicColumn[] = [ 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', field: 'customerId',
component: 'Input', component: 'Input',
@ -181,7 +207,7 @@ export const formSchema: FormSchema[] = [
field: 'userId', field: 'userId',
label: '', label: '',
component: 'Input', component: 'Input',
show: false show: false,
}, },
{ {
field: 'userName', field: 'userName',

@ -1,8 +1,9 @@
import moment from 'moment'
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { numberThousandFormat } from '/@/utils/commonUtil' import { numberThousandFormat } from '/@/utils/commonUtil'
export type BankItem = { export type BankItem = {
accountId: string bankNo: string
bankName: string bankName: string
} }
@ -25,6 +26,12 @@ export const searchFormSchema: FormSchema[] = [
} }
}, },
}, },
{
field: 'bankName',
label: '银行名称',
component: 'Input',
colProps: { span: 4 },
},
{ {
field: 'payerAccountNumber', field: 'payerAccountNumber',
label: '银行账号', label: '银行账号',
@ -32,8 +39,8 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {
field: 'payerName', field: 'payerOrPayeeName',
label: '付款人名称', label: '付款人名称',
component: 'Input', component: 'Input',
colProps: { span: 4 }, colProps: { span: 4 },
}, },
@ -55,6 +62,9 @@ export const columns: BasicColumn[] = [
width: 100, width: 100,
dataIndex: 'transactionDate', dataIndex: 'transactionDate',
sorter: true, sorter: true,
customRender({ text }) {
return moment(text).format('YYYY-MM-DD')
},
}, },
{ {
title: '交易时间', title: '交易时间',
@ -81,9 +91,6 @@ export const columns: BasicColumn[] = [
width: 100, width: 100,
dataIndex: 'tradeAmount', dataIndex: 'tradeAmount',
sorter: true, sorter: true,
customRender({ text }) {
return numberThousandFormat(text)
},
}, },
{ {
title: '交易后余额', title: '交易后余额',
@ -322,5 +329,6 @@ export const columns: BasicColumn[] = [
] ]
export const bankNoFormat = (bankNo) => { 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 <div
class="bank-item" class="bank-item"
v-for="item in bankList" v-for="item in bankList"
:key="item.accountId" :key="item.bankNo"
:style="{ :style="{
background: activeBank == item.accountId ? '#F5F9FC' : '', background: activeBank == item.bankNo ? '#F5F9FC' : '',
color: activeBank == item.accountId ? '#257AFA' : '', color: activeBank == item.bankNo ? '#257AFA' : '',
}" }"
@click="changeActiveBank(item.accountId)" @click="changeActiveBank(item.bankNo)"
> >
<i <i
class="iconfont icon-yinhangzhanghu" class="iconfont icon-yinhangzhanghu"
:style="{ color: activeBank == item.accountId ? '#257AFA' : '#7A8798' }" :style="{ color: activeBank == item.bankNo ? '#257AFA' : '#7A8798' }"
></i> ></i>
<span class="bank-name">{{ item.bankName }}</span> <span class="bank-name">{{ item.bankName }}</span>
<span>{{ bankNoFormat(item.accountId) }}</span> <span>{{ bankNoFormat(item.bankNo) }}</span>
</div> </div>
</div> </div>
</a-spin> </a-spin>
@ -32,12 +32,14 @@
<div class="module-title">流水详情</div> <div class="module-title">流水详情</div>
</template> </template>
<template v-slot:bodyCell="{ column, record }"> <template v-slot:bodyCell="{ column, record }">
<template v-if="column.key === 'tradeAmount'"> <template v-if="column.key === 'transactionType'">
<span v-if="record.transactionType == '来账'" class="success"> <span :class="record.transactionType == '来账' ? 'success' : 'error'">
{{ record.tradeAmount }} {{ record.transactionType }}
</span> </span>
<span v-if="record.transactionType == '往账'" class="error"> </template>
{{ record.tradeAmount }} <template v-if="column.key === 'tradeAmount'">
<span :class="record.transactionType == '来账' ? 'success' : 'error'">
{{ numberThousandFormat(record.tradeAmount) }}
</span> </span>
</template> </template>
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
@ -58,6 +60,7 @@
import { ApiBankList, ApiBankFlowList } from './api' import { ApiBankList, ApiBankFlowList } from './api'
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
import { numberThousandFormat } from '/@/utils/commonUtil'
const [registerTable, { reload, getForm }] = useTable({ const [registerTable, { reload, getForm }] = useTable({
api: async (p) => { api: async (p) => {
@ -70,7 +73,14 @@
}) })
}, },
beforeFetch: (p) => { beforeFetch: (p) => {
return formatParams({ ...p, accountId: activeBank.value }) return {
...formatParams(p),
otherQueryCondition: {
payerOrPayeeName: p.payerOrPayeeName,
bankNo: activeBank.value,
bankName: p.bankName,
},
}
}, },
immediate: false, immediate: false,
columns, columns,
@ -106,8 +116,7 @@
const getBankList = async () => { const getBankList = async () => {
bankLoading.value = true bankLoading.value = true
const res: API.DataResult = await ApiBankList() const res: API.DataResult = await ApiBankList()
console.log(res) activeBank.value = res.data?.[0]?.bankNo || ''
activeBank.value = res.data?.[0]?.accountId || ''
reload() reload()
bankList.value = res.data bankList.value = res.data
bankLoading.value = false bankLoading.value = false

@ -17,8 +17,8 @@ export const invoiceCodeList: LabelValueOptions = [
{ label: '税控卷票', value: '025' }, { label: '税控卷票', value: '025' },
] ]
export const invoiceStatusList: LabelValueOptions = [ export const invoiceStatusList: LabelValueOptions = [
{ label: '蓝票', value: '00' }, { label: '蓝票', value: '00', color: '#257AFA' },
{ label: '红票', value: '01' }, { label: '红票', value: '01', color: '#BA3849' },
] ]
export const reimbursementStatusList: LabelValueOptions = [ export const reimbursementStatusList: LabelValueOptions = [
@ -100,7 +100,8 @@ export const columns: BasicColumn[] = [
width: 100, width: 100,
sorter: true, sorter: true,
customRender: ({ text }) => { 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" @ok="handleSave"
> >
<BasicForm @register="registerForm"> <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"> <template #isDefault="item">
<a-switch @change="changeIsDefault" v-model:checked="item.values.isDefault" /> <a-switch @change="changeIsDefault" v-model:checked="item.values.isDefault" />
<span class="s-txt" :class="{ 's-active': item.values.isDefault }">{{ <span class="s-txt" :class="{ 's-active': item.values.isDefault }">
item.values.isDefault ? '是' : '否' {{ item.values.isDefault ? '是' : '否' }}
}}</span> </span>
</template> </template>
<template #status="item"> <template #status="item">
<a-switch @change="changeStatus" v-model:checked="item.values.status" /> <a-switch @change="changeStatus" v-model:checked="item.values.status" />
<span class="s-txt" :class="{ 's-active': item.values.status }">{{ <span class="s-txt" :class="{ 's-active': item.values.status }">
item.values.status ? '启用' : '禁用' {{ item.values.status ? '启用' : '禁用' }}
}}</span> </span>
</template> </template>
</BasicForm> </BasicForm>
@ -44,7 +50,7 @@
const rowId = ref('') const rowId = ref('')
const linkId = ref('') const linkId = ref('')
const { createMessage } = useMessage() const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({ const [registerForm, { resetFields, setFieldsValue, validate, getFieldsValue }] = useForm({
labelWidth: 100, labelWidth: 100,
schemas: BankformSchema, schemas: BankformSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
@ -78,6 +84,10 @@
}) })
const getTitle = computed(() => (!unref(isUpdate) ? '新增账户信息' : '编辑账户信息')) const getTitle = computed(() => (!unref(isUpdate) ? '新增账户信息' : '编辑账户信息'))
// Switch // Switch
const changePaymentAccount = (v) => {
setFieldsValue({ paymentAccount: v })
}
// Switch
const changeIsDefault = (v) => { const changeIsDefault = (v) => {
setFieldsValue({ isDefault: v }) setFieldsValue({ isDefault: v })
} }
@ -86,7 +96,9 @@
} }
async function handleSave(exit) { async function handleSave(exit) {
try { try {
const values = await validate() await validate()
const values = getFieldsValue()
setModalProps({ confirmLoading: true, loading: true }) setModalProps({ confirmLoading: true, loading: true })
values.linkId = values.linkId ? values.linkId : linkId.value values.linkId = values.linkId ? values.linkId : linkId.value
if (values.status) { if (values.status) {

@ -68,7 +68,7 @@
</template> </template>
</BasicTable> </BasicTable>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="2" tab="API授权" force-render> <!-- <a-tab-pane key="2" tab="API授权" force-render>
<BasicTable @register="registerAPITable"> <BasicTable @register="registerAPITable">
<template #tableTitle> <template #tableTitle>
<h4 class="mr15" style="margin-bottom: 0">API授权</h4> <h4 class="mr15" style="margin-bottom: 0">API授权</h4>
@ -91,10 +91,10 @@
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
</a-tab-pane> </a-tab-pane> -->
</a-tabs> </a-tabs>
<BankModal @register="registerBankModal" @success="handleSuccess" /> <BankModal @register="registerBankModal" @success="handleSuccess" />
<APIAuthModal @register="registerAPIModal" @success="handleSuccess" /> <!-- <APIAuthModal @register="registerAPIModal" @success="handleSuccess" /> -->
<!--右下角按钮--> <!--右下角按钮-->
<template #footer> <template #footer>
<a-button :loading="loading" @click="closeModal"></a-button> <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 { Tag } from 'ant-design-vue'
import { getDictDropDown, GetUserList } from '/@/api/common' import { getDictDropDown, GetUserList } from '/@/api/common'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
import { getBankListByKeyword } from '/@/api/system/org'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
let orgAuthTypeList: LabelValueOptions = [] let orgAuthTypeList: LabelValueOptions = []
@ -514,6 +515,18 @@ export const BankColumns: BasicColumn[] = [
width: 230, width: 230,
align: 'left', align: 'left',
}, },
{
title: '联行号',
dataIndex: 'unionBankNo',
width: '180',
align: 'left',
},
{
title: '银企直联账户Id',
dataIndex: 'cstNo',
width: '180',
align: 'left',
},
{ {
title: 'ABA代码', title: 'ABA代码',
dataIndex: 'aba', dataIndex: 'aba',
@ -580,6 +593,19 @@ export const BankColumns: BasicColumn[] = [
return text 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: '备注', title: '备注',
dataIndex: 'note', dataIndex: 'note',
@ -670,12 +696,29 @@ export const BankformSchema: FormSchema[] = [
}, },
}, },
{ {
label: '银行地址',
field: 'bankAddress', field: 'bankAddress',
component: 'Input', label: '银行地址',
defaultValue: '', component: 'ApiSelect',
colProps: { defaultValue: null,
span: 12, 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, 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', field: 'isDefault',
component: 'Switch', component: 'Switch',

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

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

Loading…
Cancel
Save