diff --git a/src/views/finance/feeSettlement/api.js b/src/views/finance/feeSettlement/api.js index 448b7490..1b95e589 100644 --- a/src/views/finance/feeSettlement/api.js +++ b/src/views/finance/feeSettlement/api.js @@ -8,4 +8,79 @@ export function PaymentSettlementGetList(parameter) { data: parameter, }) } +export function GetOrgList() { + return request({ + url: '/mainApi/Common/GetOrgList', + method: 'get', + }) +} +export function InvoiceSettlementGetInvoiceList(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/GetInvoiceList', + method: 'post', + data: parameter, + }) +} +export function InvoiceSettlementGetInvoiceDetails(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/GetInvoiceDetails', + method: 'post', + data: parameter, + }) +} +export function InvoiceSettlementGetExchanges(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/GetExchanges', + method: 'post', + data: parameter, + }) +} +export function GetExchangeRate(params) { + return request({ + url: '/feeApi/FeeCurrencyExchange/GetExchangeRate', + method: 'get', + params + }) +} + + +export function InvoiceSettlementSave(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/Save', + method: 'post', + data: parameter, + }) +} + +export function InvoiceSettlementGet(params) { + return request({ + url: '/feeApi/InvoiceSettlement/Get', + method: 'get', + params + }) +} + +export function ClientCommonGetStlMode(params) { + return request({ + url: '/mainApi/ClientCommon/GetStlMode', + method: 'get', + params + }) +} + +export function GetClientBankList(parameter) { + return request({ + url: '/mainApi/ClientBank/GetClientBankList', + method: 'post', + data: parameter, + }) +} + +export function PaymentSettlementDelete(parameter) { + return request({ + url: '/feeApi/PaymentSettlement/Delete', + method: 'post', + data: parameter, + }) +} \ No newline at end of file diff --git a/src/views/finance/feeSettlement/columns.tsx b/src/views/finance/feeSettlement/columns.tsx index af75772e..88f46d4d 100644 --- a/src/views/finance/feeSettlement/columns.tsx +++ b/src/views/finance/feeSettlement/columns.tsx @@ -1,5 +1,7 @@ import { def } from '@vue/shared' import { BasicColumn, FormSchema } from '/@/components/Table' +import { GetClientListByCode, GetFeeCurrencySelectList } from '/@/api/common' +import { GetOrgList, ClientCommonGetStlMode, GetClientBankList } from './api' import { Tag } from 'ant-design-vue' export const columns: BasicColumn[] = [ { @@ -19,12 +21,21 @@ export const columns: BasicColumn[] = [ }, { title: '结算类别', - dataIndex: 'modeText', - width: 100, + dataIndex: 'billType', + sorter: true, + width: 80, + customRender: ({ text }) => { + if (text === 1) { + return '收费' + } else if (text === 2) { + return '付费' + } + return text + } }, { title: '结算方式', - dataIndex: 'settlementTypeName', + dataIndex: 'modeText', width: 100, }, { @@ -186,16 +197,686 @@ export const columns: BasicColumn[] = [ export const searchFormSchema: FormSchema[] = [ { - field: 'mode', + field: 'billType', + label: '', + colProps: { span: 4 }, component: 'Input', - defaultValue: '2', show: false, + defaultValue: 1 + }, + { + field: 'settlementNO', + label: '结算单号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'customerId', + label: '结算单位', + component: 'ApiSelect', + colProps: { span: 4 }, + componentProps: () => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + valueField: 'shortName', + showName: 'shortName', + resultField: 'data', + immediate: false + } + } + }, + { + field: 'applicationNO', + label: '申请单号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'ledgerVoucherNO', + label: '总账凭证号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'settlementDate', + label: '结算日期', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: { + allowClear: true + } + }, +] + +export const detailForm: FormSchema[] = [ + { + field: 'id', + label: '', + colProps: { span: 4 }, + show: false + }, + { + field: 'customerId', + label: '', + colProps: { span: 4 }, + show: false, + component: 'Input' + }, + { + field: 'customerName', + label: '结算单位', + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'settlementDate', + label: '结算日期', + colProps: { span: 4 }, + component: 'DatePicker', + componentProps: { + showTime: true, + allowClear: true, + valueFormat: 'YYYY-MM-DD HH:00', + format: 'YYYY-MM-DD HH:00', + }, + }, + { + field: 'createByName', + label: '结算人', + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'currencyAmount', + label: '币别/金额', + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'settlementTypeId', + label: '', + colProps: { span: 4 }, + show: false + }, + { + field: 'settlementTypeName', + label: '结算方式', + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: ({ formModel }) => { + return { + api: ClientCommonGetStlMode, + resultField: 'data', + labelField: 'stlName', + valueField: 'stlName', + onChange: (e, obj) => { + if (obj) { + formModel.settlementTypeId = obj.id + } + if (!obj && !e) { + formModel.settlementTypeId = '' + } + }, + } + }, + }, + { + field: 'exchangeRate', + label: '汇率', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'line2', + component: 'Divider', + colProps: { + span: 24 + } + }, + { + field: 'customerBankId', + label: '', + colProps: { span: 4 }, + show: false + }, + { + field: 'customerBankName', + label: '银行账号', + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: ({ formModel }) => { + return { + api: () => { + return new Promise((resolve) => { + const queryStr = [ + { + FieldName: 'ClientId', + FieldValue: formModel.customerId, + ConditionalType: '0', + }, + ] + const data = { + pageCondition: { + pageIndex: 1, + pageSize: 20, + sortConditions: [], + }, + queryCondition: JSON.stringify(queryStr), + } + GetClientBankList(data).then((res) => { + resolve(res) + }) + }) + }, + immediate: false, + labelField: 'account', + valueField: 'account', + resultField: 'data', + onChange: (e, obj) => { + if (obj) { + formModel.customerBankId = obj.id + } + if (!obj && !e) { + formModel.customerBankId = '' + } + }, + } + }, + }, + { + field: 'relativeNO', + label: '相关号码', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'saleDeptId', + label: '', + colProps: { span: 4 }, + show: false + }, + { + field: 'saleDeptName', + label: '所属分部', + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: ({ formModel }) => { + return { + api: GetOrgList, + resultField: 'data', + labelField: 'label', + valueField: 'label', + onChange: (e, obj) => { + if (obj) { + formModel.saleDeptId = obj.id + } + if (!obj && !e) { + formModel.saleDeptId = '' + } + }, + } + }, + }, + { + field: 'category', + label: '', + colProps: { span: 4 }, + show: false + }, + { + field: 'categoryText', + label: '业务类别', + colProps: { span: 4 }, + component: 'Select', + componentProps: ({ formModel }) => { + return { + options: [ + { + label: '货运收入', + value: '1' + }, + { + label: '利息收入', + value: '2' + }, + ], + onChange: (e, obj) => { + if (obj) { + formModel.category = obj.value + } + if (!obj && !e) { + formModel.category = '' + } + }, + } + }, + }, +] + +export const markForm: FormSchema[] = [ + { + field: 'line3', + component: 'Divider', + colProps: { + span: 24 + } + }, + { + field: 'voucherRemark', + label: '凭证备注', + colProps: { span: 8 }, + component: 'InputTextArea' + }, + { + field: 'note', + label: '备注', + colProps: { span: 8 }, + component: 'InputTextArea' + }, + { + field: 'line2', + component: 'Divider', + colProps: { + span: 24 + } + }, +] + +export const invoiceColum: BasicColumn[] = [ + { + title: '发票业务编号', + dataIndex: 'billNO', + width: 100, + }, + { + title: '发票号', + dataIndex: 'invoiceNO', + width: 100, + }, + { + title: '发票申请单号', + dataIndex: 'applicationNO', + width: 100, + }, + { + title: '开票单位', + dataIndex: 'customerName', + width: 100, + }, + { + title: '币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '结算金额', + dataIndex: 'settlementAmount', + width: 100, + }, + { + title: '开票金额', + dataIndex: 'invoiceAmount', + width: 100, + }, + { + title: 'RMB申请金额', + dataIndex: 'rmbApplyAmount', + width: 100, + }, + { + title: 'USD申请金额', + dataIndex: 'usdApplyAmount', + width: 100, + }, + { + title: '发票抬头', + dataIndex: 'invoiceHeader', + width: 100, + }, + { + title: '开票日期', + dataIndex: 'invoiceDate', + width: 100, + }, +] + +export const invoiceDetailColum: 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: 'settlementAmount', + width: 100, + }, + { + title: '原始币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原始汇率', + dataIndex: 'originalRate', + width: 100, + }, + { + title: '折算汇率', + dataIndex: 'exchangeRate', + width: 100, + }, + { + title: '发票折算汇率', + dataIndex: 'applicationNO', + width: 100, + }, + { + title: '原始金额', + dataIndex: 'originalAmount', + width: 100, + }, + { + title: '揽货人', + dataIndex: 'saleName', + width: 100, + }, + { + title: '录入方式', + dataIndex: 'applicationNO', + width: 100, + }, + { + title: '会计期间', + dataIndex: 'accountDate', + width: 100, + }, + { + title: '更改单', + dataIndex: 'changeOrder', + width: 100, + }, + + + +] + +export const invoiceTableColums: BasicColumn[] = [ + { + title: '发票类别', + dataIndex: 'category', + width: 100, + }, + { + title: '发票锁定', + dataIndex: 'isLocked', + width: 80, + }, + { + title: '发票业务编号', + dataIndex: 'billNO', + width: 100, + }, + { + title: '开票单位', + dataIndex: 'customerName', + width: 100, + }, + { + title: '币别', + dataIndex: 'currency', + width: 60, + }, + { + title: '开票金额', + dataIndex: 'invoiceAmount', + width: 80, + }, + { + title: '申请金额', + dataIndex: 'applyAmount', + width: 80, + }, + { + title: '未结金额', + dataIndex: 'unsettledAmountText', + width: 100, + }, + { + title: '本次结算金额', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原币金额', + dataIndex: 'originalAmountText', + width: 100, + }, + { + title: '发票抬头', + dataIndex: 'invoiceHeader', + width: 100, + }, + { + title: '开票日期', + dataIndex: 'invoiceDate', + width: 100, + }, + { + title: '开票人', + dataIndex: 'operatorName', + width: 100, + }, + { + title: '所属分部', + dataIndex: 'saleDeptName', + width: 100, + }, + { + title: '备注', + dataIndex: 'note', + width: 100, + }, + { + title: '发票类型', + dataIndex: 'modeText', + width: 100, + }, + { + title: '发票税率', + dataIndex: 'taxRate', + width: 100, + }, + + + +] + +export const invoiceSearchFormSchema: FormSchema[] = [ + { + field: 'customerId', + label: '开票单位', + component: 'ApiSelect', colProps: { span: 6 }, + componentProps: () => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + valueField: 'shortName', + showName: 'shortName', + resultField: 'data', + immediate: false + } + } + }, + { + field: 'billNO', + label: '编号检索', + colProps: { span: 6 }, + component: 'Input' }, { - field: 'mblno', - label: '主提单号', - component: 'Input', + field: 'invoiceHeader', + label: '发票抬头', + colProps: { span: 6 }, + component: 'Input' + }, + { + field: 'currency', + label: '币别', + colProps: { span: 6 }, + component: 'ApiSelect', + componentProps: () => { + return { + api: GetFeeCurrencySelectList, + labelField: 'codeName', + valueField: 'codeName', + resultField: 'data' + } + } + }, + { + field: 'invoiceDate', + label: '开票日期', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: { + allowClear: true + } + }, + { + field: 'saleDeptId', + label: '所属分部', + component: 'ApiSelect', colProps: { span: 6 }, + componentProps: () => { + return { + api: GetOrgList, + resultField: 'data', + labelField: 'label', + valueField: 'label', + } + } }, ] + +export const invoiceTableDetailColums: BasicColumn[] = [ + { + title: '委托编号', + dataIndex: 'customerNo', + width: 100, + }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + }, + { + title: '委托单位', + dataIndex: 'clientName', + width: 100, + }, + { + title: '开船日期', + dataIndex: 'etd', + width: 100, + }, + { + title: '费用名称', + dataIndex: 'feeName', + width: 100, + }, + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '结算名称', + dataIndex: 'feeName', + width: 100, + }, + { + title: '原始币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原始汇率', + dataIndex: 'originalRate', + width: 100, + }, + { + title: '折算汇率', + dataIndex: 'exchangeRate', + width: 100, + }, + { + title: '发票折算汇率', + dataIndex: 'feeName', + width: 100, + }, + { + title: '原始金额', + dataIndex: 'originalAmount', + width: 100, + }, + { + title: '揽货人', + dataIndex: 'saleName', + width: 100, + }, + { + title: '录入方式', + dataIndex: 'feeName', + width: 100, + }, + { + title: '会计期间', + dataIndex: 'accountDate', + width: 100, + }, + { + title: '更改单', + dataIndex: 'feeName', + width: 100, + }, +] \ No newline at end of file diff --git a/src/views/finance/feeSettlement/detail/index.vue b/src/views/finance/feeSettlement/detail/index.vue new file mode 100644 index 00000000..e2894446 --- /dev/null +++ b/src/views/finance/feeSettlement/detail/index.vue @@ -0,0 +1,351 @@ + + + + + + + + + 新建 + + + + + + + + 保存 + + + + + + + + 上一条 + + + + + + + + 下一条 + + + + + + + + 锁定 + + + 未锁定 + + + 自由结算 + 申请结算 + 发票结算 + + + + 结算单号:{{ form.settlementNO }} + + + + + + + + + + + + + + + + + 费用明细 + + + + + 应收 + 应付 + + + + + + + + + + + 结算明细 + + + 添加 + + + + 删除 + + + + 附件 + + + + + + + + + 海运出口 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/finance/feeSettlement/detail/invoiceTable.vue b/src/views/finance/feeSettlement/detail/invoiceTable.vue new file mode 100644 index 00000000..1d2978d9 --- /dev/null +++ b/src/views/finance/feeSettlement/detail/invoiceTable.vue @@ -0,0 +1,320 @@ + + + + + + + + + + 结算明细 + + + 添加发票明细 + + 结算币别 + + + {{ item.description }} + + + + + + + + + + 费用明细 + + + + + 应收 + 应付 + + + + + + + + 选中合计: + + 发票金额: + {{ rrmb }} + + + + + + 是 + 否 + + + + + + + + + + + 1{{ item.currencyTo + }} + = + + + + + + + + + + \ No newline at end of file diff --git a/src/views/finance/feeSettlement/index.vue b/src/views/finance/feeSettlement/index.vue index 52212a52..ca1b6206 100644 --- a/src/views/finance/feeSettlement/index.vue +++ b/src/views/finance/feeSettlement/index.vue @@ -1,7 +1,7 @@ { GoDetailed(e) }" class="ds-table" @register="registerTable"> - + 复制 @@ -53,11 +53,11 @@ 新建申请结算 - + 新建发票结算 - + 生成凭证 @@ -91,7 +91,7 @@