@ -58,8 +58,7 @@
< / div >
< div class = "BTable" >
< BasicTable @register ="registerTable" @row-dbClick ="EditRow" :maxHeight ="140" >
< template # tableTitle >
< span class = "title" > 银行信息 < / span >
< template # toolbar >
< a -button
type = "link"
@ click = "addboxLine({ id: rowId })"
@ -202,6 +201,7 @@
/ / 创 建 银 行 信 息 列 表
const [ registerTable , { reload , setTableData , getPaginationRef , getDataSource , getSelectRows } ] =
useTable ( {
title : '银行信息' ,
api : async ( p ) => {
const res : API . DataResult = await getClientBankList ( p )
return new Promise ( ( resolve ) => {
@ -465,73 +465,73 @@
const getTitle = computed ( ( ) => ( ! rowId . value ? '新增往来单位' : '编辑往来单位' ) )
/ / 提 交
async function handleSave ( exit ) {
try {
const values = await validate ( ) . catch ( ( ) => {
notification . warning ( { message : '请补全基本信息中必填内容!' , duration : 3 } )
/ / t r y {
const values = await validate ( ) . catch ( ( ) => {
notification . warning ( { message : '请补全基本信息中必填内容!' , duration : 3 } )
} )
/ / c o n s t v a l u e s 1 = a w a i t v a l i d a t e 1 ( ) . c a t c h ( ( ) = > {
/ / n o t i f i c a t i o n . w a r n i n g ( { m e s s a g e : ' 请 补 全 财 务 信 息 中 必 填 内 容 ! ' , d u r a t i o n : 3 } )
/ / } )
/ / i f ( v a l u e s & & v a l u e s 1 ) {
if ( values ) {
/ / s e t M o d a l P r o p s ( { c o n f i r m L o a d i n g : t r u e , l o a d i n g : t r u e } )
/ / T O D O c u s t o m a p i
values . clientTag = { }
ClientTag . forEach ( ( item ) => {
let type = false
if ( values . ArrclientTag ) {
values . ArrclientTag . forEach ( ( item2 ) => {
if ( item2 == item . value ) {
type = true
}
} )
}
values . clientTag [ item . value ] = type
} )
/ / c o n s t v a l u e s 1 = a w a i t v a l i d a t e 1 ( ) . c a t c h ( ( ) = > {
/ / n o t i f i c a t i o n . w a r n i n g ( { m e s s a g e : ' 请 补 全 财 务 信 息 中 必 填 内 容 ! ' , d u r a t i o n : 3 } )
/ / } )
/ / i f ( v a l u e s & & v a l u e s 1 ) {
if ( values ) {
/ / s e t M o d a l P r o p s ( { c o n f i r m L o a d i n g : t r u e , l o a d i n g : t r u e } )
/ / T O D O c u s t o m a p i
values . clientTag = { }
ClientTag . forEach ( ( item ) => {
let type = false
if ( values . ArrclientTag ) {
values . ArrclientTag . forEach ( ( item2 ) => {
if ( item2 == item . value ) {
type = true
}
} )
}
values . clientTag [ item . value ] = type
} )
values . clientTag = { ... values . clientTag , ... clientTag _o . value }
values . clientTag = { ... values . clientTag , ... clientTag _o . value }
values . clientTag . others = values . others
let invoiceHeaders = [ ]
list . value . forEach ( ( item ) => {
let Data = { ... item }
if ( rowId . value ) {
Data . relativeId = item . relativeId ? item . relativeId : rowId . value
Data . id = item . id ? item . id : 0
} else {
Data . relativeId = 0
Data . id = 0
}
invoiceHeaders . push ( Data )
} )
/ / l o a d i n g . v a l u e = t r u e ;
const res : API . DataResult = await editCodeGoodsType ( {
... values ,
... getFieldsValue1 ( ) ,
invoiceHeaders ,
} )
if ( res . succeeded ) {
if ( ! exit && ! rowId . value ) {
rowId . value = res . data
clientId . value = res . data
/ / i s U p d a t e . v a l u e = t r u e
await setFieldsValue ( {
... getFieldsValue ( ) ,
id : res . data ,
} )
}
getData ( false )
notification . success ( { message : res . message , duration : 3 } )
emit ( 'success' )
values . clientTag . others = values . others
let invoiceHeaders = [ ]
list . value . forEach ( ( item ) => {
let Data = { ... item }
if ( rowId . value ) {
Data . relativeId = item . relativeId ? item . relativeId : rowId . value
Data . id = item . id ? item . id : 0
} else {
notification . error ( { message : res . message , duration : 3 } )
Data . relativeId = 0
Data . id = 0
}
/ / e x i t & & c l o s e M o d a l ( )
invoiceHeaders . push ( Data )
} )
/ / l o a d i n g . v a l u e = t r u e ;
const res : API . DataResult = await editCodeGoodsType ( {
... values ,
... getFieldsValue1 ( ) ,
invoiceHeaders ,
} )
if ( res . succeeded ) {
if ( ! exit && ! rowId . value ) {
rowId . value = res . data
clientId . value = res . data
/ / i s U p d a t e . v a l u e = t r u e
await setFieldsValue ( {
... getFieldsValue ( ) ,
id : res . data ,
} )
}
getData ( false )
notification . success ( { message : res . message , duration : 3 } )
emit ( 'success' )
} else {
notification . error ( { message : res . message , duration : 3 } )
}
} finally {
/ / l o a d i n g . v a l u e = f a l s e ;
/ / s e t M o d a l P r o p s ( { c o n f i r m L o a d i n g : f a l s e , l o a d i n g : f a l s e } )
/ / e x i t & & c l o s e M o d a l ( )
}
/ / } f i n a l l y {
/ / / / l o a d i n g . v a l u e = f a l s e ;
/ / / / s e t M o d a l P r o p s ( { c o n f i r m L o a d i n g : f a l s e , l o a d i n g : f a l s e } )
/ / }
}
async function refresh ( ) {
const res : API . DataResult = await getCodeGoodsTypeInfo ( { id : unref ( rowId ) } )
@ -694,6 +694,10 @@
> div {
& : nth - child ( 1 ) {
padding : 14 px 8 px 8 px 8 px ;
display : flex ;
. Fapiao {
flex : 1 ;
}
}
}
. handsontableInput {