|
|
|
@ -262,39 +262,43 @@ const bankForm = [
|
|
|
|
|
if (obj) {
|
|
|
|
|
obj.invoiceAddress = obj.invoiceAddress ? obj.invoiceAddress : ''
|
|
|
|
|
obj.invoiceTel = obj.invoiceTel ? obj.invoiceTel : ''
|
|
|
|
|
obj.invoiceTaxNo = obj.invoiceTaxNo ? obj.invoiceTaxNo : ''
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
taxID: obj.invoiceTaxNo,
|
|
|
|
|
customerAddTel: obj.invoiceAddress + ' ' + obj.invoiceTel
|
|
|
|
|
})
|
|
|
|
|
obj.bankName = obj.bankName ? obj.bankName : ''
|
|
|
|
|
obj.bankAccountNo = obj.bankAccountNo ? obj.bankAccountNo : ''
|
|
|
|
|
console.log(obj)
|
|
|
|
|
if (obj.currency == 'RMB') {
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
customerBankId: obj.id,
|
|
|
|
|
customerBankName: obj.name,
|
|
|
|
|
customerBankName: obj.bankName + obj.bankAccountNo,
|
|
|
|
|
})
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
usdCustomerBankId: '',
|
|
|
|
|
usdCustomerBankName: '',
|
|
|
|
|
usdCustomerBankId: '-',
|
|
|
|
|
usdCustomerBankName: '-',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (obj.currency == 'USD') {
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
usdCustomerBankId: obj.id,
|
|
|
|
|
usdCustomerBankName: obj.name,
|
|
|
|
|
usdCustomerBankName: obj.bankName + obj.bankAccountNo,
|
|
|
|
|
})
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
customerBankId: '',
|
|
|
|
|
customerBankName: '',
|
|
|
|
|
customerBankId: '-',
|
|
|
|
|
customerBankName: '-',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!obj && !e) {
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
customerBankId: '',
|
|
|
|
|
customerBankName: '',
|
|
|
|
|
usdCustomerBankId: '',
|
|
|
|
|
usdCustomerBankName: '',
|
|
|
|
|
taxID: '',
|
|
|
|
|
customerAddTel: '',
|
|
|
|
|
customerBankId: '-',
|
|
|
|
|
customerBankName: '-',
|
|
|
|
|
usdCustomerBankId: '-',
|
|
|
|
|
usdCustomerBankName: '-',
|
|
|
|
|
taxID: '-',
|
|
|
|
|
customerAddTel: '-',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -335,21 +339,21 @@ const bankForm = [
|
|
|
|
|
},
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (obj) {
|
|
|
|
|
formModel.customerBankId = obj.id
|
|
|
|
|
obj.invoiceAddress = obj.invoiceAddress ? obj.invoiceAddress : ''
|
|
|
|
|
obj.invoiceTel = obj.invoiceTel ? obj.invoiceTel : ''
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
invoiceHeader: obj.invoiceHeader,
|
|
|
|
|
taxID: obj.invoiceTaxNo,
|
|
|
|
|
customerAddTel: obj.invoiceAddress + ' ' + obj.invoiceTel
|
|
|
|
|
})
|
|
|
|
|
obj.invoiceHeader = obj.invoiceHeader ? obj.invoiceHeader : '-'
|
|
|
|
|
formModel.customerBankId = obj.id
|
|
|
|
|
formModel.invoiceHeader = obj.invoiceHeader
|
|
|
|
|
formModel.invoiceTel = obj.invoiceTel ? obj.invoiceTel : ''
|
|
|
|
|
formModel.taxID = obj.invoiceTaxNo ? obj.invoiceTaxNo : ''
|
|
|
|
|
formModel.customerAddTel = obj.invoiceAddress + ' ' + obj.invoiceTel
|
|
|
|
|
}
|
|
|
|
|
if (!obj && !e) {
|
|
|
|
|
formModel.customerBankId = ''
|
|
|
|
|
formModel.customerBankId = '-'
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
invoiceHeader: '',
|
|
|
|
|
taxID: '',
|
|
|
|
|
customerAddTel: ''
|
|
|
|
|
invoiceHeader: '-',
|
|
|
|
|
taxID: '-',
|
|
|
|
|
customerAddTel: '-'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -385,8 +389,8 @@ const bankForm = [
|
|
|
|
|
onChange: (e, obj) => {
|
|
|
|
|
if (obj) {
|
|
|
|
|
formModel.usdCustomerBankId = obj.id
|
|
|
|
|
obj.invoiceAddress = obj.invoiceAddress ? obj.invoiceAddress : ''
|
|
|
|
|
obj.invoiceTel = obj.invoiceTel ? obj.invoiceTel : ''
|
|
|
|
|
obj.invoiceAddress = obj.invoiceAddress ? obj.invoiceAddress : '-'
|
|
|
|
|
obj.invoiceTel = obj.invoiceTel ? obj.invoiceTel : '-'
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
invoiceHeader: obj.invoiceHeader,
|
|
|
|
|
taxID: obj.invoiceTaxNo,
|
|
|
|
@ -394,11 +398,11 @@ const bankForm = [
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!obj && !e) {
|
|
|
|
|
formModel.usdCustomerBankId = ''
|
|
|
|
|
formModel.usdCustomerBankId = '-'
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
invoiceHeader: '',
|
|
|
|
|
taxID: '',
|
|
|
|
|
customerAddTel: ''
|
|
|
|
|
invoiceHeader: '-',
|
|
|
|
|
taxID: '-',
|
|
|
|
|
customerAddTel: '-'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -406,95 +410,7 @@ const bankForm = [
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
const EditBankForm = [
|
|
|
|
|
{
|
|
|
|
|
field: 'invoiceHeader',
|
|
|
|
|
label: '发票抬头',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
return {
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = e
|
|
|
|
|
formActionType ? formActionType.linkageForm(e) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'taxID',
|
|
|
|
|
label: '纳税人识别号',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
return {
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = e
|
|
|
|
|
formActionType ? formActionType.linkageForm(e) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'customerAddTel',
|
|
|
|
|
label: '地址电话',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
return {
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = e
|
|
|
|
|
formActionType ? formActionType.linkageForm(e) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'customerBankId',
|
|
|
|
|
label: '',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'customerBankName',
|
|
|
|
|
label: 'RMB开户行/账号',
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
const { formModel } = e
|
|
|
|
|
return {
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = e
|
|
|
|
|
formActionType ? formActionType.linkageForm(e) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'usdCustomerBankId',
|
|
|
|
|
label: '',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'usdCustomerBankName',
|
|
|
|
|
label: 'USD开户行及账号',
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
const { formModel } = e
|
|
|
|
|
return {
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = e
|
|
|
|
|
formActionType ? formActionType.linkageForm(e) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
const markFormS = [
|
|
|
|
|
{
|
|
|
|
|
field: 'note',
|
|
|
|
@ -784,6 +700,7 @@ const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getF
|
|
|
|
|
labelWidth: 100,
|
|
|
|
|
schemas: bankForm,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
readonly: true,
|
|
|
|
|
})
|
|
|
|
|
const [markForm, { resetFields: markresetFields, setFieldsValue: marksetFieldsValue, getFieldsValue: getFieldsValueM }] = useForm({
|
|
|
|
|
labelWidth: 100,
|
|
|
|
@ -937,15 +854,15 @@ function init() {
|
|
|
|
|
})
|
|
|
|
|
feeTableRef.value.open()
|
|
|
|
|
}
|
|
|
|
|
bankForm.forEach((item) => {
|
|
|
|
|
if (item.show !== false && item.component !== 'Divider') {
|
|
|
|
|
EditBankForm.forEach((item2) => {
|
|
|
|
|
if (item.field == item2.field) {
|
|
|
|
|
updateSchema(item2)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// bankForm.forEach((item) => {
|
|
|
|
|
// if (item.show !== false && item.component !== 'Divider') {
|
|
|
|
|
// EditBankForm.forEach((item2) => {
|
|
|
|
|
// if (item.field == item2.field) {
|
|
|
|
|
// updateSchema(item2)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
bottomForm.forEach((item) => {
|
|
|
|
|
if (item.show !== false && item.component !== 'Divider') {
|
|
|
|
|
bottomFormEdit.forEach((item2) => {
|
|
|
|
@ -1031,6 +948,7 @@ const bankListUsd = ref([])
|
|
|
|
|
const bankListAll = ref([])
|
|
|
|
|
function getBankInfo(customerId) {
|
|
|
|
|
bankList.value = []
|
|
|
|
|
bankListAll.value = []
|
|
|
|
|
bankListUsd.value = []
|
|
|
|
|
const queryStr = [
|
|
|
|
|
{
|
|
|
|
@ -1056,8 +974,10 @@ function getBankInfo(customerId) {
|
|
|
|
|
if (item.currency == 'USD') {
|
|
|
|
|
bankListUsd.value.push(item)
|
|
|
|
|
}
|
|
|
|
|
if (item.invoiceHeader) {
|
|
|
|
|
bankListAll.value.push(item)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
bankListAll.value = res.data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1092,6 +1012,7 @@ function changeCust(id, name) {
|
|
|
|
|
})
|
|
|
|
|
bankList.value = []
|
|
|
|
|
bankListUsd.value = []
|
|
|
|
|
bankListAll.value = []
|
|
|
|
|
GetClientBankList(data).then((res) => {
|
|
|
|
|
res.data.reverse();
|
|
|
|
|
res.data.forEach((item) => {
|
|
|
|
@ -1115,8 +1036,10 @@ function changeCust(id, name) {
|
|
|
|
|
usdCustomerBankName: item.name,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (item.invoiceHeader) {
|
|
|
|
|
bankListAll.value.push(item)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
bankListAll.value = res.data
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
resolve(true);
|
|
|
|
|
}, 300)
|
|
|
|
|