From 750cd388b59cfb66a2ed837816a08b218325cc9a Mon Sep 17 00:00:00 2001 From: yujinlong Date: Wed, 27 Nov 2024 10:44:30 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E8=B4=A2=E7=A8=8E-=E6=8A=A5?= =?UTF-8?q?=E9=94=80=E5=8D=95=20=E6=B7=BB=E5=8A=A0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../financialTax/expenseAccount/PayModal.vue | 76 +++++++++++++++++++ src/views/financialTax/expenseAccount/api.ts | 16 +++- .../financialTax/expenseAccount/columns.tsx | 53 +++++++++++++ .../expenseAccount/detail/columns.tsx | 73 ++++++++++++------ .../detail/components/columns.tsx | 20 +++-- .../expenseAccount/detail/index.vue | 26 +++++-- .../financialTax/expenseAccount/index.vue | 48 +++++++++++- 7 files changed, 270 insertions(+), 42 deletions(-) create mode 100644 src/views/financialTax/expenseAccount/PayModal.vue diff --git a/src/views/financialTax/expenseAccount/PayModal.vue b/src/views/financialTax/expenseAccount/PayModal.vue new file mode 100644 index 00000000..feb7a026 --- /dev/null +++ b/src/views/financialTax/expenseAccount/PayModal.vue @@ -0,0 +1,76 @@ + + diff --git a/src/views/financialTax/expenseAccount/api.ts b/src/views/financialTax/expenseAccount/api.ts index d7858044..cf34a9f1 100644 --- a/src/views/financialTax/expenseAccount/api.ts +++ b/src/views/financialTax/expenseAccount/api.ts @@ -11,6 +11,7 @@ enum Api { invoiceList = '/feeApi/InInvoicet/GetInInvoicet', bankList = '/mainApi/ClientBank/GetClientBankList', getUser = '/mainApi/User/GetUserInfo', + BankPayment = '/feeApi/Reimbursement/BankPayment', } // 获取报销单列表 (Auth) export function ReimbursementGetList(data: PageRequest) { @@ -80,7 +81,7 @@ export function GetInvoiceList(data: PageRequest) { return request({ url: Api.invoiceList, method: 'post', - data + data, }) } @@ -89,7 +90,7 @@ export function GetClientBankList(data) { return request({ url: Api.bankList, method: 'post', - data + data, }) } @@ -98,6 +99,15 @@ export function GetUserInfo(query: { id: string }) { return request({ url: Api.getUser, method: 'get', - params: query + params: query, + }) +} + +// 支付 +export function BankPaymentApi(data) { + return request({ + url: Api.BankPayment, + method: 'post', + data, }) } diff --git a/src/views/financialTax/expenseAccount/columns.tsx b/src/views/financialTax/expenseAccount/columns.tsx index 6fcbd5fe..5d2a47fe 100644 --- a/src/views/financialTax/expenseAccount/columns.tsx +++ b/src/views/financialTax/expenseAccount/columns.tsx @@ -1,3 +1,4 @@ +import { getBankList } from '/@/api/system/org' import { BasicColumn, FormSchema } from '/@/components/Table' import { numberThousandFormat } from '/@/utils/commonUtil' @@ -114,4 +115,56 @@ export const searchFormSchema: FormSchema[] = [ colProps: { span: 4 }, component: 'Input', }, + { + field: 'reimbursementType', + label: '状态', + colProps: { span: 4 }, + component: 'Select', + componentProps: () => { + return { + options: statusList, + allowClear: true, + } + }, + }, +] + +export const modalFormSchema: FormSchema[] = [ + { + field: 'bankId', + label: '支付账户', + colProps: { span: 24 }, + rules: [{ required: true }], + component: 'ApiSelect', + isEdit: 0, + componentProps: ({ formModel }) => { + return { + immediate: true, + api: () => { + return new Promise((resolve) => { + getBankList({ + pageCondition: { pageIndex: 1, pageSize: 100, sortConditions: [] }, + queryCondition: + '[{"FieldName":"paymentAccount","FieldValue":"1","ConditionalType":0}]', + }).then((res) => { + const dataResult = res?.data || [] + + resolve(dataResult) + }) + }) + }, + labelField: 'bankName', + valueField: 'id', + getPopupContainer: () => document.body, + } + }, + }, + { + field: 'ledgerAccount', + label: '会计科目', + rules: [{ required: true }], + colProps: { span: 24 }, + isEdit: 0, + component: 'Input', + }, ] diff --git a/src/views/financialTax/expenseAccount/detail/columns.tsx b/src/views/financialTax/expenseAccount/detail/columns.tsx index 1154eb24..d6ecaaea 100644 --- a/src/views/financialTax/expenseAccount/detail/columns.tsx +++ b/src/views/financialTax/expenseAccount/detail/columns.tsx @@ -4,6 +4,7 @@ import { numberThousandFormat, digitUppercase } from '/@/utils/commonUtil' import { BillItem } from '../columns' import { GetClientBankList } from '../api' import { h, nextTick } from 'vue' +import { getDictDropDown } from '/@/api/common' export type PageType = '' | 'ADD' | 'EDIT' | 'VIEW' | 'AUDIT' @@ -15,6 +16,15 @@ export interface BillDetail extends BillItem { data: Recordable[] } +let feeTypeList: LabelValueOptions = [] +const res2: API.DataResult = await getDictDropDown({ code: 'Reimbursement_Expense_Ategory' }) +if (res2.succeeded) { + feeTypeList = [] + res2.data.forEach((e) => { + feeTypeList.push({ label: e.name, value: e.value }) + }) +} + export const invoiceCodeList: LabelValueOptions = [ { label: '全电发票(铁路电子客票)', value: '51' }, { label: '全电发票(航空运输电子客票行程单)', value: '61' }, @@ -153,6 +163,14 @@ export const getDetailForm = (type: PageType): FormSchema[] => { colProps: { span: 4 }, show: false, }, + { + field: 'payeeName', + label: '收款人名称', + colProps: { span: 4 }, + isEdit: 1, + dynamicDisabled: true, + component: 'Input', + }, { field: 'bankName', label: '开户行', @@ -199,16 +217,34 @@ export const getDetailForm = (type: PageType): FormSchema[] => { }, }, { - field: 'payeeName', - label: '收款人名称', + field: 'payeeAccountNumber', + label: '收款人账号', colProps: { span: 4 }, isEdit: 1, dynamicDisabled: true, component: 'Input', }, { - field: 'payeeAccountNumber', - label: '收款人账号', + field: 'amount', + label: '金额', + colProps: { span: 4 }, + isEdit: 1, + dynamicDisabled: ['VIEW', 'AUDIT'].includes(type), + component: 'InputNumber', + componentProps: ({ formModel }) => { + return { + precision: 2, + onChange: (e) => { + nextTick(() => { + formModel.amountUppercase = digitUppercase(formModel?.amount || 0) + }) + }, + } + }, + }, + { + field: 'amountUppercase', + label: '金额大写', colProps: { span: 4 }, isEdit: 1, dynamicDisabled: true, @@ -231,31 +267,24 @@ export const getDetailForm = (type: PageType): FormSchema[] => { component: 'Input', }, { - field: 'amount', - label: '金额', + field: 'expenseCategory', + label: '费用类别', colProps: { span: 4 }, - isEdit: 1, + rules: [{ required: true }], dynamicDisabled: ['VIEW', 'AUDIT'].includes(type), - component: 'InputNumber', + component: 'Select', + isEdit: 1, componentProps: ({ formModel }) => { return { - precision: 2, - onChange: (e) => { - nextTick(() => { - formModel.amountUppercase = digitUppercase(formModel?.amount || 0) - }) - }, + allowClear: true, + showSearch: true, + options: feeTypeList, + getPopupContainer: () => document.body, + labelField: 'bankName', + valueField: 'bankName', } }, }, - { - field: 'amountUppercase', - label: '金额大写', - colProps: { span: 4 }, - isEdit: 1, - dynamicDisabled: true, - component: 'Input', - }, { show: ['VIEW', 'AUDIT'].includes(type), field: 'ledgerAccount', diff --git a/src/views/financialTax/expenseAccount/detail/components/columns.tsx b/src/views/financialTax/expenseAccount/detail/components/columns.tsx index 37e19427..d5abc0ca 100644 --- a/src/views/financialTax/expenseAccount/detail/components/columns.tsx +++ b/src/views/financialTax/expenseAccount/detail/components/columns.tsx @@ -141,8 +141,14 @@ export const columns: BasicColumn[] = [ export const searchFormSchema: FormSchema[] = [ { - field: 'buyerInvoiceName', - label: '购方开票名称', + label: '销方开票名称', + field: 'sellerInvoiceName', + colProps: { span: 4 }, + component: 'Input', + }, + { + label: '销方开票税号', + field: 'sellerInvoiceTaxNumber', colProps: { span: 4 }, component: 'Input', }, @@ -156,14 +162,14 @@ export const searchFormSchema: FormSchema[] = [ }, }, { - field: 'invoiceNumber', - label: '发票号码', + field: 'totalAmount', + label: '开票金额', colProps: { span: 4 }, - component: 'Input', + component: 'InputNumber', }, { - field: 'buyerInvoiceTaxNumber', - label: '购方开票税号', + field: 'invoiceNumber', + label: '发票号码', colProps: { span: 4 }, component: 'Input', }, diff --git a/src/views/financialTax/expenseAccount/detail/index.vue b/src/views/financialTax/expenseAccount/detail/index.vue index 5af1f7e9..c43a2de0 100644 --- a/src/views/financialTax/expenseAccount/detail/index.vue +++ b/src/views/financialTax/expenseAccount/detail/index.vue @@ -86,7 +86,7 @@