lijingjia 1 week ago
commit a583284058

@ -79,7 +79,12 @@ function print() {
const shareFlag = ref(false) const shareFlag = ref(false)
const codeUrl = ref('') const codeUrl = ref('')
function copy() { function copy() {
navigator.clipboard.writeText(fileURL.value) const el = document.createElement('input')
el.setAttribute('value', fileURL.value)
document.body.appendChild(el)
el.select()
document.execCommand('copy')
document.body.removeChild(el)
createMessage.success("复制成功") createMessage.success("复制成功")
} }
function downLoad() { function downLoad() {

@ -142,8 +142,14 @@ export const columns: BasicColumn[] = [
align: 'left', align: 'left',
}, },
{ {
title: '申请金额', title: '申请金额RMB',
dataIndex: 'applyAmount', dataIndex: 'applyAmountRMB',
width: 100,
align: 'left',
},
{
title: '申请金额USD',
dataIndex: 'applyAmountUSD',
width: 100, width: 100,
align: 'left', align: 'left',
}, },

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<a-modal width="1600px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null"> <a-modal :maskClosable="false" style="top: 20px" width="1600px" @cancel="open = false" :visible="open" title="添加发票申请明细" :footer="null">
<div style="padding-bottom:5px ;"> <div style="padding-bottom:5px ;">
<div> <div>
<BasicTable class="ds-table" @selection-change="onSelectChange" :rowClassName="rowClassName" <BasicTable class="ds-table" @selection-change="onSelectChange" :rowClassName="rowClassName"
@ -784,4 +784,5 @@ defineExpose({ init, changeCustIn })
padding: 0 5px; padding: 0 5px;
} }
} }
</style> </style>

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

@ -132,7 +132,8 @@ const [registerTable, { reload, getForm, getSelectRows, getRawDataSource }] = us
const res: API.DataResult = await GetList(p) const res: API.DataResult = await GetList(p)
return new Promise((resolve) => { return new Promise((resolve) => {
res.data.forEach(item=>{ res.data.forEach(item=>{
item.applyAmount = item.applyAmount.toFixed(2) item.applyAmountRMB = item.applyAmountRMB.toFixed(2)
item.applyAmountUSD = item.applyAmountUSD.toFixed(2)
}) })
resolve({ data: [...res.data], total: res.count }) resolve({ data: [...res.data], total: res.count })
}) })

@ -0,0 +1,59 @@
<template>
<!-- ai识别 -->
<a-drawer title="AI识别" width="65vw" :destroyOnClose="true" :mask="false" placement="right" :visible="aiFlag"
@close="aiOnClose" class="OCRBox">
<a-spin :spinning="uloading">
<a-upload-dragger v-if="!fileUrl" :file-list="fileList" accept=".pdf" :before-upload="beforeUpload" name="file"
:customRequest="uploadFile">
<p class="ant-upload-drag-icon">
<inbox-outlined></inbox-outlined>
</p>
<p class="ant-upload-text">点击或将文件拖拽上传</p>
<p class="ant-upload-hint">
支持文件格式.png,.jpg,.jpeg,.xls,.xlsx,.doc,.docx,.rtf,.pdf,.bmp,.tif,.html,.htm,.odt,.xlsm
</p>
</a-upload-dragger>
<div class="list" v-else >
<div class="left" >
<iframe width="100%" height="1000px" :src="fileUrl" frameborder="0"></iframe>
</div>
<div class="right" ></div>
</div>
</a-spin>
</a-drawer>
</template>
<script lang="ts" setup>
import { ref, reactive, h, watch, nextTick } from 'vue'
import { InboxOutlined } from '@ant-design/icons-vue';
import axios from 'axios'
const aiFlag = ref(false)
const uloading = ref(false)
const fileList = ref([])
function aiOnClose() {
}
const fileUrl = ref('')
function beforeUpload() {
}
function uploadFile(file) {
fileUrl.value = window.URL.createObjectURL(file.file)
}
function init() {
aiFlag.value = true
}
defineExpose({
init, uploadFile
})
</script>
<style lang="less" scoped >
.list{
display: flex;
.left{
width: 50%;
}
}
</style>
Loading…
Cancel
Save