发票开出

szh-new
sunzehua 2 months ago
parent 96884d509d
commit f5dfc8016e

@ -108,3 +108,11 @@ export function PaymentSettlementDeleteDetail(parameter) {
data: parameter,
})
}
export function PaymentFreeSettlementGetBizList(parameter) {
return request({
url: '/feeApi/PaymentFreeSettlement/GetBizList',
method: 'post',
data: parameter,
})
}

@ -1,7 +1,16 @@
import { def } from '@vue/shared'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetClientListByCode, GetFeeCurrencySelectList } from '/@/api/common'
import {
ref,
} from 'vue'
import { GetClientListByCode, GetFeeCurrencySelectList,GetFeeCodeSelectList } from '/@/api/common'
const feeDict = ref([])
import {
GetVesselSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { GetOrgList, ClientCommonGetStlMode, GetClientBankList } from './api'
let businessType: any = [
{ value: 1, label: '海运出口' },
]
import { Tag } from 'ant-design-vue'
export const columns: BasicColumn[] = [
{
@ -819,6 +828,11 @@ export const invoiceTableDetailColums: BasicColumn[] = [
dataIndex: 'etd',
width: 100,
},
{
title: '业务来源',
dataIndex: 'sourceName',
width: 100,
},
{
title: '费用名称',
dataIndex: 'feeName',
@ -830,8 +844,13 @@ export const invoiceTableDetailColums: BasicColumn[] = [
width: 100,
},
{
title: '结算名称',
dataIndex: 'feeName',
title: '申请金额',
dataIndex: 'applyAmount',
width: 100,
},
{
title: '结算金额',
dataIndex: 'orderSettlementAmount',
width: 100,
},
{
@ -840,33 +859,81 @@ export const invoiceTableDetailColums: BasicColumn[] = [
width: 100,
},
{
title: '原始汇率',
dataIndex: 'originalRate',
title: '原始金额',
dataIndex: 'originalAmount',
width: 100,
},
{
title: '折算汇率',
dataIndex: 'exchangeRate',
title: '揽货人',
dataIndex: 'saleName',
width: 100,
},
]
export const freeTableColums: BasicColumn[] = [
{
title: '发票折算汇率',
dataIndex: 'exchangeRate1',
title: '委托编号',
dataIndex: 'customerNo',
width: 100,
},
{
title: '原始金额',
dataIndex: 'originalAmount',
title: '主提单号',
dataIndex: 'mblno',
width: 100,
},
{
title: '揽货人',
dataIndex: 'saleName',
title: '委托单位',
dataIndex: 'clientName',
width: 100,
},
{
title: '录入方式',
dataIndex: 'feeName1',
title: '结费单位',
dataIndex: 'customerName',
width: 100,
},
{
title: 'RMB未收',
dataIndex: 'unchargedRMB',
width: 100,
},
{
title: 'USD未收',
dataIndex: 'unchargedUSD',
width: 100,
},
{
title: '其他未付',
dataIndex: 'unchargedOther',
width: 100,
},
{
title: '业务类别',
dataIndex: 'businessType',
width: 100,
},
{
title: '开船日期',
dataIndex: 'etd',
width: 100,
},
{
title: '报关单号',
dataIndex: 'customNo',
width: 100,
},
{
title: '订舱编号',
dataIndex: 'bookingNo',
width: 100,
},
{
title: '经营单位',
dataIndex: 'enterprise',
width: 100,
},
{
title: '揽货人',
dataIndex: 'operator',
width: 100,
},
{
@ -874,9 +941,293 @@ export const invoiceTableDetailColums: BasicColumn[] = [
dataIndex: 'accountDate',
width: 100,
},
{
title: '操作',
dataIndex: 'operator',
width: 100,
},
{
title: '录入人',
dataIndex: 'createByName',
width: 100,
},
{
title: '起运港',
dataIndex: 'loadPort',
width: 100,
},
{
title: '目的港',
dataIndex: 'dischargePort',
width: 100,
},
{
title: '船 名',
dataIndex: 'vessel',
width: 100,
},
{
title: '航次',
dataIndex: 'voyage',
width: 100,
},
{
title: '更改单',
dataIndex: 'feeName2',
dataIndex: 'changeOrder',
width: 100,
},
{
title: '备注',
dataIndex: 'note',
width: 100,
},
{
title: '分提单号',
dataIndex: 'hblno',
width: 100,
},
{
title: '所属分部',
dataIndex: 'saleDeptName',
width: 100,
},
]
export const freeSearchFormSchema: FormSchema[] = [
{
label: '费用对象',
field: 'customerId',
component: 'ApiSelect',
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetClientListByCode,
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'id',
resultField: 'data',
immediate: false
}
}
},
{
field: 'billNO',
label: '编号检索',
colProps: { span: 4 },
component: 'Input'
},
{
field: 'businessDate',
label: '业务日期',
component: 'DatePicker',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: {
allowClear: true
}
},
{
label: '费用名称',
field: 'feeName',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: () => {
return new Promise((resolve) => {
GetFeeCodeSelectList().then((res) => {
res.data.forEach((item) => {
item.label = item.code + '-' + item.name
})
resolve(res)
})
})
},
immediate: false,
valueField: 'id',
resultField: 'data',
// mode: 'multiple',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
field: 'businessType',
label: '业务类型',
component: 'Select',
colProps: { span: 4 },
componentProps: () => {
return {
options: businessType,
}
},
},
{
field: 'invoiceNO',
label: '发票号',
colProps: { span: 4 },
component: 'Input'
},
{
field: 'feeType',
label: '收/付',
component: 'Select',
required: true,
colProps: { span: 4 },
defaultValue: '1',
componentProps: () => {
return {
options: [
{
label:'应收',
value:'1'
},
{
label:'应付',
value:'2'
},
],
}
},
},
{
field: 'currency',
label: '币别',
colProps: { span: 4 },
component: 'ApiSelect',
componentProps: () => {
return {
api: GetFeeCurrencySelectList,
labelField: 'codeName',
valueField: 'codeName',
resultField: 'data'
}
}
},
{
field: 'debitNo',
label: '对账编号',
colProps: { span: 4 },
component: 'Input'
},
{
field: 'accountDate',
label: '会计期间',
component: 'DatePicker',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: {
allowClear: true
}
},
{
label: '船名',
field: 'vesselId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetVesselSelectList,
immediate: false,
labelField: 'vesselName',
valueField: 'id',
resultField: 'data'
}
}
},
{
field: 'voyage',
label: '航次',
colProps: { span: 4 },
component: 'Input'
},
{
label: '核算单位',
field: 'customerId1',
component: 'ApiSelect',
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetClientListByCode,
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'id',
resultField: 'data',
immediate: false
}
}
},
]
export const freeTableDetailColums: BasicColumn[] = [
{
title: '委托编号',
dataIndex: 'customerNo',
width: 100,
},
{
title: '主提单号',
dataIndex: 'mblno',
width: 100,
},
{
title: '委托单位',
dataIndex: 'clientName',
width: 100,
},
{
title: '开船日期',
dataIndex: 'etd',
width: 100,
},
{
title: '业务来源',
dataIndex: 'sourceName',
width: 100,
},
{
title: '费用名称',
dataIndex: 'feeName',
width: 100,
},
{
title: '收付',
dataIndex: 'feeType',
width: 100,
},
{
title: '申请金额',
dataIndex: 'applyAmount',
width: 100,
},
{
title: '结算金额',
dataIndex: 'orderSettlementAmount',
width: 100,
},
{
title: '原始币别',
dataIndex: 'originalCurrency',
width: 100,
},
{
title: '原始金额',
dataIndex: 'originalAmount',
width: 100,
},
{
title: '揽货人',
dataIndex: 'saleName',
width: 100,
},
]

@ -116,7 +116,8 @@
</template>
<script lang="ts" setup>
import { ref, onMounted, defineComponent, nextTick, watchEffect, watch } from 'vue'
import { InvoiceSettlementSave, InvoiceSettlementGet, PaymentSettlementGetList, PaymentSettlementDeleteDetail, GeneralInvoiceGet } from '../api'
import { InvoiceSettlementSave, InvoiceSettlementGet,
PaymentSettlementGetList, PaymentSettlementDeleteDetail, GeneralInvoiceGet } from '../api'
import { useMessage } from '/@/hooks/web/useMessage'
import invoiceTable from './invoiceTable.vue'
import invoiceFile from '../../../operation/invoiceIssue/detail/invoiceFile.vue'
@ -251,13 +252,13 @@ function handleClick(record) {
}
})
}
const invoiceTableRef = ref('')
const invoiceTableRef = ref(null) as any
onMounted(() => {
if (route.query.type == 'invoice' && !route.query.id) {
if (!route.query.id) {
invoiceTableRef.value.customerIdP = ''
invoiceTableRef.value.init()
}
if (route.query.type == 'invoice' && route.query.id) {
if (route.query.id) {
getDetail()
}
})

@ -56,6 +56,9 @@
<span v-if="record.isLocked"></span>
<span v-else></span>
</template>
<template v-if="column.dataIndex == 'businessType'">
<span v-if="record.businessType == 1"></span>
</template>
</template>
</BasicTable>
</a-spin>
@ -80,8 +83,11 @@
<script lang="ts" setup>
import { onMounted, ref, reactive, watch, defineExpose, defineProps, defineEmits, h } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { InvoiceSettlementGetInvoiceList, InvoiceSettlementGetInvoiceDetails, InvoiceSettlementGetExchanges, GetExchangeRate } from '../api'
import { invoiceTableColums, invoiceSearchFormSchema, invoiceTableDetailColums } from '../columns'
import {
InvoiceSettlementGetInvoiceList, InvoiceSettlementGetInvoiceDetails,
InvoiceSettlementGetExchanges, GetExchangeRate, PaymentFreeSettlementGetBizList
} from '../api'
import { invoiceTableColums, invoiceSearchFormSchema, invoiceTableDetailColums, freeTableColums, freeSearchFormSchema } from '../columns'
import { GetFeeCurrencySelectList } from '/@/api/common'
import feeTable from '/@/components/CostEntry/components/feeTable.vue'
import { BasicForm, useForm } from '/@/components/Form'
@ -91,13 +97,21 @@ import { useMessage } from '/@/hooks/web/useMessage'
import { Divider } from 'ant-design-vue'
import { formatParams } from '/@/hooks/web/common'
const emits = defineEmits(['updateList', 'refresh'])
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const { createMessage } = useMessage()
// rmb
const rrmb = ref(0)
const loading = ref(false)
const [registerTable, { reload, getForm, getSelectRows, setSelectedRowKeys, getDataSource }] = useTable({
api: async (p) => {
const res = await InvoiceSettlementGetInvoiceList(p)
let res = {} as any
if (route.query.type == 'free') {
res = await PaymentFreeSettlementGetBizList(p)
}
if (route.query.type == 'invoice') {
res = await InvoiceSettlementGetInvoiceList(p)
}
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
@ -108,12 +122,12 @@ const [registerTable, { reload, getForm, getSelectRows, setSelectedRowKeys, getD
beforeFetch: (p) => {
return formatParams(p)
},
columns: invoiceTableColums,
columns: getColums(),
maxHeight: '900',
rowKey: 'id',
formConfig: {
labelWidth: 120,
schemas: invoiceSearchFormSchema,
schemas: getSearch(),
useAdvancedSearch: true
},
isTreeTable: false,
@ -144,6 +158,24 @@ const [registerTable1, { getSelectRows: getSelectRowsFee, setProps: setPropsFee,
canResize: false,
immediate: false,
})
function getColums() {
if (route.query.type == 'invoice') {
return invoiceTableColums
}
if (route.query.type == 'free') {
return freeTableColums
}
}
function getSearch() {
if (route.query.type == 'invoice') {
return invoiceTableDetailColums
}
if (route.query.type == 'free') {
return freeSearchFormSchema
}
}
const exchangarr = ref([]) as any
const currenciesData = ref([]) as any
const exchangeFlag = ref(false)
@ -265,6 +297,7 @@ function onSelectChange(selectedRowKeys) {
})
}
const openFlag = ref(false)
const opneType = ref('')
function init() {
openFlag.value = true
setTimeout(() => {

Loading…
Cancel
Save