用户新消息

szh-new
lijingjia 4 months ago
parent 35f62fc3cb
commit 5f7ba4f20f

@ -39,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'
@ -87,6 +88,7 @@
openModal(true, {
isParent: false,
isUpdate: false,
id: props.id
})
}
function handleDel() {
@ -95,14 +97,19 @@
createMessage.warning('请选择一条数据')
return false
}
const removeArr = select.map((item) => {
const ids = select.map((item) => {
return item.id
})
cbDelete({ ids }).then(res => {
createMessage.success('删除成功!')
reload()
})
}
function handleAudit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
id: props.id
})
}
function handleSuccess() {

@ -56,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)) {
@ -82,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')

@ -440,7 +440,7 @@ export const BankFormSchema: FormSchema[] = [
{
field: 'currency',
label: '币别',
defaultValue: '',
defaultValue: 'CNY',
component: 'ApiSelect',
colProps: { span: 12 },
componentProps: () => {
@ -531,7 +531,7 @@ export const BankFormSchema: FormSchema[] = [
label: '是否开票默认账号',
component: 'Input',
slot: 'isInvoiceDefault',
defaultValue: false,
defaultValue: true,
colProps: { span: 12 }
},
{

Loading…
Cancel
Save