lijingjia 1 week ago
commit a583284058

@ -79,7 +79,12 @@ function print() {
const shareFlag = ref(false)
const codeUrl = ref('')
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("复制成功")
}
function downLoad() {

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

@ -1,6 +1,6 @@
<template>
<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>
<BasicTable class="ds-table" @selection-change="onSelectChange" :rowClassName="rowClassName"
@ -784,4 +784,5 @@ defineExpose({ init, changeCustIn })
padding: 0 5px;
}
}
</style>

@ -160,7 +160,7 @@
<a-select v-model:value="tempNameId" style="width: 80%">
<a-select-option :value="item.id" v-for="(item, index) in tempList" :key="index">{{
item.name
}}</a-select-option>
}}</a-select-option>
</a-select>
</a-modal>
</a-spin>
@ -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
tempList.value.forEach((item) => {
if (item.id == tempNameId.value) {
temp = item.content
}
})
if (temp != null && temp != '') {
if (tempNameId.value) {
let currency = null
tempList.value.forEach((item) => {
if (item.id == tempNameId.value) {
currency = item.currency
}
})
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>

@ -132,7 +132,8 @@ const [registerTable, { reload, getForm, getSelectRows, getRawDataSource }] = us
const res: API.DataResult = await GetList(p)
return new Promise((resolve) => {
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 })
})

@ -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