sunzehua 4 months ago
commit 77d12b86c0

@ -29,7 +29,7 @@ enum Api {
getUserTenants = '/mainApi/Common/GetUserTenants',
ChangeTenant = '/mainApi/Common/ChangeTenant',
getClientList = '/mainApi/WxUser/GetInfoClientList',
getCountryList = '/mainApi/Common/GetCountryList',
getCountryList = '/mainApi/Common/GetClientCountrySelectList',
getTrainSelectList = '/mainApi/Common/GetTrainSelectList',
registerCompany = '/mainApi/Common/CompanyRegister',
getClientRoleList = '/mainApi/Common/GetClientRoleList',
@ -380,11 +380,10 @@ export function getClientList(data: PageRequest) {
})
}
export function getCountryList(data: PageRequest) {
export function getCountryList() {
return request<DataResult>({
url: Api.getCountryList,
method: 'post',
data,
method: 'get'
})
}

@ -1533,7 +1533,7 @@ export const Tablecolumns: BasicColumn[] = [
title: '备注',
dataIndex: 'note',
align: 'left',
width: 80,
width: 150,
},
]
export const CADformSchema: FormSchema[] = [

@ -79,6 +79,7 @@
</a-tab-pane>
<a-tab-pane key="1" tab="个人开户信息">
<BankInfo
v-if="activeKey == 1"
:id="id"
></BankInfo>
</a-tab-pane>
@ -149,7 +150,6 @@
async function handleSave(exit) {
try {
const values = await validate()
console.log(values)
setModalProps({ confirmLoading: true, loading: true })
const res: API.DataResult = await editUser(values)
if (res.succeeded) {

@ -23,8 +23,7 @@
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: handleAudit.bind(null, record),
disabled: checkPermissions('op:edi:edit'),
onClick: handleAudit.bind(null, record)
},
]"
/>
@ -40,6 +39,7 @@
import { formatParams } from '/@/hooks/web/common'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { GetClientBankList } from './api'
import { cbDelete } from '/@/views/baseinfo/infoclient/api'
import { useModal } from '/@/components/Modal'
import BankModal from './bankInfoModal.vue'
import { Tablecolumns } from '/@/views/baseinfo/infoclient/columns'
@ -64,7 +64,7 @@
})
},
beforeFetch: (p) => {
p['']
p['clientId'] = props.id
return formatParams(p)
},
columns: Tablecolumns,
@ -88,6 +88,7 @@
openModal(true, {
isParent: false,
isUpdate: false,
id: props.id
})
}
function handleDel() {
@ -96,22 +97,21 @@
createMessage.warning('请选择一条数据')
return false
}
const removeArr = select.map((item) => {
const ids = select.map((item) => {
return item.id
})
// ApiDel({ ids: removeArr }).then((res) => {
// createMessage.warning(res.message)
// reload()
// })
cbDelete({ ids }).then(res => {
createMessage.success('删除成功!')
reload()
})
}
function handleAudit(record: Recordable) {
if (!checkPermissions('op:edi:edit')) {
openModal(true, {
record,
isUpdate: true,
id: props.id
})
}
}
function handleSuccess() {
reload()
}

@ -8,12 +8,19 @@
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
width="30%"
width="40%"
@register="registerModal"
@ok="handleSave"
@close="closeModal"
>
<BasicForm @register="registerForm" />
<BasicForm @register="registerForm">
<template #isInvoiceDefault="{ model }">
<a-switch
v-model:checked="model.isInvoiceDefault"
/>
<span class="s-txt" :class="{ 's-active': model.isInvoiceDefault }">{{ model.isInvoiceDefault ? '是' : '否'}}</span>
</template>
</BasicForm>
<!--右下角按钮-->
<template #footer>
<a-button
@ -49,9 +56,11 @@
schemas: BankFormSchema,
showActionButtonGroup: false,
})
// id
const id = ref()
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
id.value = data.id
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
@ -75,12 +84,11 @@
async function handleSave(exit) {
try {
const values = await validate()
values['clientId'] = id.value
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await EditClientBank(values)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
@ -113,3 +121,16 @@
}
}
</script>
<style scoped>
.s-txt {
font-size: 12px;
margin-left: 10px;
color: #7A8798;
position: relative;
top: 1px;
}
.s-active {
color: #257AFA;
}
</style>

@ -1,6 +1,6 @@
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { getRoleList, getOrgList, getDeptList } from '/@/api/common'
import { getRoleList, getOrgList, getDeptList, GetFeeCurrencySelectList, getCountryList } from '/@/api/common'
import { Tag } from 'ant-design-vue'
import { useOptionsStore } from '/@/store/modules/options'
import { checkPermissions } from '/@/hooks/Permissions/index'
@ -428,7 +428,116 @@ export const BankFormSchema: FormSchema[] = [
{
field: 'id',
component: 'Input',
label: ''
label: '',
show: false
},
{
field: 'codeName',
label: '银行代码',
component: 'Input',
colProps: { span: 12 }
},
{
field: 'currency',
label: '币别',
defaultValue: 'CNY',
component: 'ApiSelect',
colProps: { span: 12 },
componentProps: () => {
return {
api: GetFeeCurrencySelectList,
labelField: 'codeName',
valueField: 'codeName',
resultField: 'data'
}
}
},
{
field: 'bankName',
label: '银行名称',
component: 'Input',
colProps: { span: 12 }
},
{
field: 'accountName',
label: '银行账户',
component: 'Input',
colProps: { span: 12 }
},
{
field: 'bankAddress',
label: '银行地址',
component: 'Input',
colProps: { span: 12 }
},
{
field: 'financeSoftCode',
label: '财务软件代码',
component: 'Input',
colProps: { span: 12 }
},
{
field: 'subjectCode',
label: '科目代码',
component: 'Input',
colProps: { span: 12 }
},
{
field: 'bankAgentName',
label: '银行代理名称',
component: 'Input',
colProps: { span: 12 }
},
{
field: 'bankAccountNo',
label: '银行账号',
component: 'Input',
colProps: { span: 12 }
},
{
field: 'swift',
label: '银行SWIFT',
component: 'Input',
colProps: { span: 12 }
},
{
field: 'countryName',
label: '',
component: 'Input',
show: false,
},
{
field: 'countryId',
label: '所在国',
defaultValue: '',
component: 'ApiSelect',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
api: getCountryList,
labelField: 'countryName',
valueField: 'id',
resultField: 'data',
onChange: (v, obj) => {
if (obj) {
formModel.countryName = obj.label
}
}
}
}
},
{
field: 'isInvoiceDefault',
label: '是否开票默认账号',
component: 'Input',
slot: 'isInvoiceDefault',
defaultValue: true,
colProps: { span: 12 }
},
{
field: 'note',
label: '备注',
component: 'InputTextArea',
colProps: { span: 24 }
},
]

@ -51,9 +51,7 @@
import { useModal } from '/@/components/Modal'
import UserModal from './UserModal.vue'
import { columns, searchFormSchema } from './columns'
const dictOptions = ref<any[]>([])
const [registerModal, { openModal }] = useModal()
const [registerPermissionModal, { openModal: openPermissionModal }] = useModal()
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({

Loading…
Cancel
Save