|
|
|
@ -197,6 +197,7 @@ import { useGo } from '/@/hooks/web/usePage'
|
|
|
|
|
import { useUserStore } from '/@/store/modules/user'
|
|
|
|
|
import { numberThousandFormat } from '/@/utils/commonUtil'
|
|
|
|
|
import { useMultipleTabStore } from '/@/store/modules/multipleTab'
|
|
|
|
|
import moment from 'moment'
|
|
|
|
|
const tabStore = useMultipleTabStore()
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
|
const go = useGo()
|
|
|
|
@ -253,6 +254,7 @@ const bankForm = [
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
|
options: bankListAll.value,
|
|
|
|
|
allowClear: false,
|
|
|
|
|
mode: 'SECRET_COMBOBOX_MODE_DO_NOT_USE',
|
|
|
|
|
fieldNames: {
|
|
|
|
|
label: 'invoiceHeader',
|
|
|
|
@ -275,30 +277,22 @@ const bankForm = [
|
|
|
|
|
customerBankId: obj.id,
|
|
|
|
|
customerBankName: obj.bankName + obj.bankAccountNo,
|
|
|
|
|
})
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
usdCustomerBankId: '-',
|
|
|
|
|
usdCustomerBankName: '-',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (obj.currency == 'USD') {
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
usdCustomerBankId: obj.id,
|
|
|
|
|
usdCustomerBankName: obj.bankName + obj.bankAccountNo,
|
|
|
|
|
})
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
customerBankId: '-',
|
|
|
|
|
customerBankName: '-',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!obj && !e) {
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
customerBankId: '-',
|
|
|
|
|
customerBankName: '-',
|
|
|
|
|
usdCustomerBankId: '-',
|
|
|
|
|
usdCustomerBankName: '-',
|
|
|
|
|
taxID: '-',
|
|
|
|
|
customerAddTel: '-',
|
|
|
|
|
customerBankId: '',
|
|
|
|
|
customerBankName: '',
|
|
|
|
|
usdCustomerBankId: '',
|
|
|
|
|
usdCustomerBankName: '',
|
|
|
|
|
taxID: '',
|
|
|
|
|
customerAddTel: '',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -333,6 +327,7 @@ const bankForm = [
|
|
|
|
|
return {
|
|
|
|
|
options: bankList.value,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
allowClear: false,
|
|
|
|
|
fieldNames: {
|
|
|
|
|
label: 'name',
|
|
|
|
|
value: 'name',
|
|
|
|
@ -341,7 +336,7 @@ const bankForm = [
|
|
|
|
|
if (obj) {
|
|
|
|
|
obj.invoiceAddress = obj.invoiceAddress ? obj.invoiceAddress : ''
|
|
|
|
|
obj.invoiceTel = obj.invoiceTel ? obj.invoiceTel : ''
|
|
|
|
|
obj.invoiceHeader = obj.invoiceHeader ? obj.invoiceHeader : '-'
|
|
|
|
|
obj.invoiceHeader = obj.invoiceHeader ? obj.invoiceHeader : ''
|
|
|
|
|
formModel.customerBankId = obj.id
|
|
|
|
|
formModel.invoiceHeader = obj.invoiceHeader
|
|
|
|
|
formModel.invoiceTel = obj.invoiceTel ? obj.invoiceTel : ''
|
|
|
|
@ -349,11 +344,11 @@ const bankForm = [
|
|
|
|
|
formModel.customerAddTel = obj.invoiceAddress + ' ' + obj.invoiceTel
|
|
|
|
|
}
|
|
|
|
|
if (!obj && !e) {
|
|
|
|
|
formModel.customerBankId = '-'
|
|
|
|
|
formModel.customerBankId = ''
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
invoiceHeader: '-',
|
|
|
|
|
taxID: '-',
|
|
|
|
|
customerAddTel: '-'
|
|
|
|
|
invoiceHeader: '',
|
|
|
|
|
taxID: '',
|
|
|
|
|
customerAddTel: ''
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -374,6 +369,7 @@ const bankForm = [
|
|
|
|
|
field: 'usdCustomerBankName',
|
|
|
|
|
label: 'USD开户行及账号',
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
allowClear: false,
|
|
|
|
|
component: 'Select',
|
|
|
|
|
componentProps: ({ formModel }) => {
|
|
|
|
|
return {
|
|
|
|
@ -389,8 +385,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,
|
|
|
|
@ -398,12 +394,12 @@ const bankForm = [
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!obj && !e) {
|
|
|
|
|
formModel.usdCustomerBankId = '-'
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
invoiceHeader: '-',
|
|
|
|
|
taxID: '-',
|
|
|
|
|
customerAddTel: '-'
|
|
|
|
|
})
|
|
|
|
|
// formModel.usdCustomerBankId = '-'
|
|
|
|
|
// setFieldsValue({
|
|
|
|
|
// invoiceHeader: '-',
|
|
|
|
|
// taxID: '-',
|
|
|
|
|
// customerAddTel: '-'
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
@ -457,7 +453,12 @@ const bottomForm = [
|
|
|
|
|
label: '申请日期',
|
|
|
|
|
component: 'DatePicker',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
defaultValue: dayjs().format('YYYY-MM-DD'),
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
return {
|
|
|
|
|
valueFormat: 'YYYY-MM-DD',
|
|
|
|
|
format: 'YYYY-MM-DD',
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '客户名称',
|
|
|
|
@ -601,97 +602,7 @@ const bottomForm = [
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
const bottomFormEdit = [
|
|
|
|
|
{
|
|
|
|
|
field: 'customer',
|
|
|
|
|
label: '',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
show: false,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'customerId',
|
|
|
|
|
label: '',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
show: false,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'createByName',
|
|
|
|
|
label: '申请人',
|
|
|
|
|
slot: 'createByNameSlot',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'createTime',
|
|
|
|
|
label: '申请日期',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
return {
|
|
|
|
|
valueFormat: 'YYYY-MM-DD',
|
|
|
|
|
format: 'YYYY-MM-DD',
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = e
|
|
|
|
|
formActionType ? formActionType.linkageForm(e) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '客户名称',
|
|
|
|
|
field: 'customerName',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
const { formModel } = e
|
|
|
|
|
return {
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = e
|
|
|
|
|
formActionType ? formActionType.linkageForm(e) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'saleDeptId',
|
|
|
|
|
label: '',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
show: false,
|
|
|
|
|
colProps: { span: 12 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'saleDeptName',
|
|
|
|
|
label: '所属分部',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
return {
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = e
|
|
|
|
|
formActionType ? formActionType.linkageForm(e) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '代开客户',
|
|
|
|
|
field: 'autualCustomerName',
|
|
|
|
|
component: 'DEdit',
|
|
|
|
|
dynamicDisabled: false,
|
|
|
|
|
colProps: { span: 4 },
|
|
|
|
|
componentProps: (e) => {
|
|
|
|
|
return {
|
|
|
|
|
onEdit: () => {
|
|
|
|
|
const { formActionType } = e
|
|
|
|
|
formActionType ? formActionType.linkageForm(e) : null
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
@ -718,6 +629,7 @@ const [
|
|
|
|
|
] = useForm({
|
|
|
|
|
labelWidth: 100,
|
|
|
|
|
schemas: bottomForm,
|
|
|
|
|
readonly: true,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
})
|
|
|
|
|
const linkageForm = (e) => {
|
|
|
|
@ -853,25 +765,9 @@ function init() {
|
|
|
|
|
createByName: userStore.getUserInfo ? userStore.getUserInfo.userName : '',
|
|
|
|
|
})
|
|
|
|
|
feeTableRef.value.open()
|
|
|
|
|
bottomRsetFieldsValue({ createTime: dayjs().format('YYYY-MM-DD') })
|
|
|
|
|
}
|
|
|
|
|
// 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) => {
|
|
|
|
|
if (item.field == item2.field) {
|
|
|
|
|
updateSchemaBottom(item2)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function handleWithdraw() {
|
|
|
|
|
if (!loading.value) {
|
|
|
|
@ -908,17 +804,19 @@ function getDetail() {
|
|
|
|
|
form.value.statusText = res.data.statusText
|
|
|
|
|
form.value.status = res.data.status
|
|
|
|
|
form.value.applicationNO = res.data.applicationNO
|
|
|
|
|
form.value.currency = res.data.currency
|
|
|
|
|
details.value = res.data.details
|
|
|
|
|
feeTableRef.value.changeCust(res.data.customerId)
|
|
|
|
|
amountArr.value = []
|
|
|
|
|
totalRmb.value = 0
|
|
|
|
|
if (res.data.currency == 'RMB') {
|
|
|
|
|
form.value.isRMB = true
|
|
|
|
|
res.data.isRMB = true
|
|
|
|
|
res.data.isYB = false
|
|
|
|
|
res.data.summaryItems.forEach(item => {
|
|
|
|
|
totalRmb.value += Number(item.amount)
|
|
|
|
|
totalRmb.value = numberThousandFormat(totalRmb.value, 2, true)
|
|
|
|
|
})
|
|
|
|
|
totalRmb.value = numberThousandFormat(totalRmb.value, 2, false)
|
|
|
|
|
} else {
|
|
|
|
|
form.value.isYB = true
|
|
|
|
|
res.data.isRMB = false
|
|
|
|
@ -1129,16 +1027,17 @@ function addLeftSave(arr, query, exchang, type) {
|
|
|
|
|
}
|
|
|
|
|
const tempNameId = ref('')
|
|
|
|
|
function handleRender() {
|
|
|
|
|
let temp = null
|
|
|
|
|
if (tempNameId.value) {
|
|
|
|
|
let currency = null
|
|
|
|
|
tempList.value.forEach((item) => {
|
|
|
|
|
if (item.id == tempNameId.value) {
|
|
|
|
|
temp = item.content
|
|
|
|
|
currency = item.currency
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (temp != null && temp != '') {
|
|
|
|
|
const data = {
|
|
|
|
|
id: id.value,
|
|
|
|
|
template: temp ? temp : null,
|
|
|
|
|
currency: currency,
|
|
|
|
|
templateId: tempNameId.value,
|
|
|
|
|
}
|
|
|
|
|
RenderTemplate(data).then((res) => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
@ -1333,4 +1232,8 @@ function handleSelect(value) {
|
|
|
|
|
.orange {
|
|
|
|
|
color: #ffa500;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.ds-form-onlyread) {
|
|
|
|
|
height: 19px !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|