sunzehua 4 months ago
commit 77d12b86c0

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

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

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

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

@ -8,12 +8,19 @@
v-bind="$attrs" v-bind="$attrs"
:use-wrapper="true" :use-wrapper="true"
:title="getTitle" :title="getTitle"
width="30%" width="40%"
@register="registerModal" @register="registerModal"
@ok="handleSave" @ok="handleSave"
@close="closeModal" @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> <template #footer>
<a-button <a-button
@ -49,9 +56,11 @@
schemas: BankFormSchema, schemas: BankFormSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
}) })
// id
const id = ref()
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields() resetFields()
id.value = data.id
setModalProps({ confirmLoading: false, loading: true }) setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) { if (unref(isUpdate)) {
@ -75,12 +84,11 @@
async function handleSave(exit) { async function handleSave(exit) {
try { try {
const values = await validate() const values = await validate()
values['clientId'] = id.value
setModalProps({ confirmLoading: true, loading: true }) setModalProps({ confirmLoading: true, loading: true })
// TODO custom api // TODO custom api
console.log(values)
// loading.value = true; // loading.value = true;
const res: API.DataResult = await EditClientBank(values) const res: API.DataResult = await EditClientBank(values)
console.log(res)
if (res.succeeded) { if (res.succeeded) {
createMessage.success(res.message) createMessage.success(res.message)
emit('success') emit('success')
@ -113,3 +121,16 @@
} }
} }
</script> </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 { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table' 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 { Tag } from 'ant-design-vue'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
import { checkPermissions } from '/@/hooks/Permissions/index' import { checkPermissions } from '/@/hooks/Permissions/index'
@ -428,7 +428,116 @@ export const BankFormSchema: FormSchema[] = [
{ {
field: 'id', field: 'id',
component: 'Input', 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 { useModal } from '/@/components/Modal'
import UserModal from './UserModal.vue' import UserModal from './UserModal.vue'
import { columns, searchFormSchema } from './columns' import { columns, searchFormSchema } from './columns'
const dictOptions = ref<any[]>([])
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerPermissionModal, { openModal: openPermissionModal }] = useModal()
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage() const { createMessage } = useMessage()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ const [registerTable, { reload, getForm, getPaginationRef }] = useTable({

Loading…
Cancel
Save