Commit 91912481308d3095b486c3592a8480e8011f5de8

Authored by zhongnanhuang
1 parent 282e97f1

feat: update 发票核销

src/components/Div/EllipsisDiv.tsx 0 → 100644
  1 +const EllipsisDiv = ({ text }: { text: string }) => {
  2 + return (
  3 + <div
  4 + title={text}
  5 + className="overflow-hidden whitespace-no-wrap overflow-ellipsis whitespace-nowrap"
  6 + >
  7 + {text}
  8 + </div>
  9 + );
  10 +};
  11 +
  12 +export default EllipsisDiv;
... ...
src/pages/Invoice/components/BankChooseModal.tsx 0 → 100644
  1 +import EllipsisDiv from '@/components/Div/EllipsisDiv';
  2 +import { INVOCING_STATUS, PAYEE_OPTIONS } from '@/pages/Order/constant';
  3 +import {
  4 + postServiceBankStatementQueryBankStatement,
  5 + postServiceInvoiceInvoiceWriteOff,
  6 +} from '@/services';
  7 +import { enumValueToLabel, formatDateTime } from '@/utils';
  8 +import { formatDate } from '@/utils/time';
  9 +import { PlusOutlined } from '@ant-design/icons';
  10 +import {
  11 + ActionType,
  12 + ProCard,
  13 + ProFormInstance,
  14 + ProTable,
  15 +} from '@ant-design/pro-components';
  16 +import { Button, Divider, Flex, Modal, Tag, message } from 'antd';
  17 +import { useEffect, useRef, useState } from 'react';
  18 +import { BANK_STATEMENT_COLUMNS, INVOICE_STATUS } from '../constant';
  19 +import '../index.less';
  20 +export default ({ invoiceId, setVisible, onClose }) => {
  21 + const [bankData, setBankData] = useState([]);
  22 + const [page, setPage] = useState(1);
  23 + const [pageSize, setPageSize] = useState(10);
  24 + const [total, setTotal] = useState(0);
  25 + const [selectedStatement, setSelectedStatement] = useState([]);
  26 + const [loading, setLoading] = useState(false);
  27 + const [btnLoading, setBtnLoading] = useState(false);
  28 +
  29 + const actionRef = useRef<ActionType>();
  30 + const formRef = useRef<ProFormInstance>();
  31 +
  32 + const getTableCellText = (target: any) => {
  33 + if (!target) {
  34 + return '';
  35 + }
  36 +
  37 + if (target.props) {
  38 + return target.props.text;
  39 + }
  40 +
  41 + return target;
  42 + };
  43 +
  44 + const loadBankData = async (params: any) => {
  45 + setLoading(true);
  46 + let searchParams = formRef?.current?.getFieldFormatValue();
  47 + console.log(searchParams);
  48 + const res = await postServiceBankStatementQueryBankStatement({
  49 + data: { ...searchParams, ...params },
  50 + });
  51 + if (res) {
  52 + setBankData(res?.data?.data || []);
  53 + setTotal(res?.data?.total || 0);
  54 + }
  55 +
  56 + setLoading(false);
  57 + };
  58 +
  59 + /**
  60 + * 加载银行流水列表表格的各个列格式
  61 + */
  62 + const bankStatementColumnsInit = () => {
  63 + let columns = BANK_STATEMENT_COLUMNS.map((item) => {
  64 + let newItem = { ...item };
  65 + let dataIndex = item.dataIndex;
  66 + let dataType = item.valueType;
  67 +
  68 + newItem.render = (text, record) => {
  69 + let textValue = record[dataIndex];
  70 +
  71 + if (dataType === 'date') {
  72 + textValue = formatDate(textValue);
  73 + }
  74 +
  75 + if (dataType === 'dateTime') {
  76 + textValue = formatDateTime(textValue);
  77 + }
  78 +
  79 + if (dataType === 'money') {
  80 + textValue = '¥' + textValue;
  81 + }
  82 +
  83 + switch (dataIndex) {
  84 + case 'invoiceStatus':
  85 + return (
  86 + <EllipsisDiv
  87 + text={enumValueToLabel(
  88 + getTableCellText(textValue),
  89 + INVOCING_STATUS,
  90 + )}
  91 + />
  92 + );
  93 +
  94 + case 'status':
  95 + return (
  96 + <EllipsisDiv
  97 + text={enumValueToLabel(
  98 + getTableCellText(textValue),
  99 + INVOICE_STATUS,
  100 + )}
  101 + />
  102 + );
  103 +
  104 + case 'payee':
  105 + return (
  106 + <EllipsisDiv
  107 + text={enumValueToLabel(
  108 + getTableCellText(textValue),
  109 + PAYEE_OPTIONS,
  110 + )}
  111 + />
  112 + );
  113 +
  114 + default:
  115 + return <EllipsisDiv text={getTableCellText(textValue)} />;
  116 + }
  117 + };
  118 +
  119 + return newItem;
  120 + });
  121 +
  122 + columns.push({
  123 + title: '操作',
  124 + valueType: 'option',
  125 + key: 'option',
  126 + fixed: 'right',
  127 + width: 70,
  128 + render: (text, record) => [
  129 + <Button
  130 + className="p-0"
  131 + key="choose"
  132 + type="link"
  133 + onClick={() => {
  134 + //去掉表格中对应的数据
  135 + let newBankData = bankData.filter((item) => {
  136 + return item.id !== record.id;
  137 + });
  138 + setBankData(newBankData);
  139 +
  140 + //添加到已选中区域中
  141 + let newSelectedStatement = [...selectedStatement];
  142 + newSelectedStatement.push(record);
  143 + setSelectedStatement(newSelectedStatement);
  144 + }}
  145 + >
  146 + 选中
  147 + </Button>,
  148 + ],
  149 + });
  150 +
  151 + return columns;
  152 + };
  153 +
  154 + /**
  155 + * 银行流水表
  156 + * @param param0
  157 + * @returns
  158 + */
  159 + const BankTable = ({ actionRef = undefined }) => {
  160 + return (
  161 + <ProTable
  162 + loading={loading}
  163 + columns={bankStatementColumnsInit()}
  164 + actionRef={actionRef}
  165 + formRef={formRef}
  166 + cardBordered
  167 + pagination={{
  168 + pageSize: pageSize,
  169 + current: page,
  170 + total: total,
  171 + onChange: (page, pageSize) => {
  172 + setPage(page);
  173 + setPageSize(pageSize);
  174 + loadBankData({ current: page, pageSize: pageSize });
  175 + },
  176 + }}
  177 + dataSource={bankData}
  178 + onDataSourceChange={() => {
  179 + console.log('change');
  180 + }}
  181 + columnsState={{
  182 + persistenceKey: 'pro-table-singe-demos',
  183 + persistenceType: 'localStorage',
  184 + defaultValue: {
  185 + option: { fixed: 'right', disable: true },
  186 + },
  187 + onChange(value) {
  188 + console.log('value: ', value);
  189 + },
  190 + }}
  191 + rowKey="id"
  192 + search={{
  193 + labelWidth: 'auto',
  194 + span: 8,
  195 + }}
  196 + options={{
  197 + setting: {
  198 + listsHeight: 400,
  199 + },
  200 + }}
  201 + form={{}}
  202 + onSubmit={() => {
  203 + loadBankData({ current: 1 });
  204 + }}
  205 + onReset={() => {}}
  206 + dateFormatter="string"
  207 + headerTitle="银行流水"
  208 + scroll={{ x: 1400, y: 360 }}
  209 + toolBarRender={() => [
  210 + <Button
  211 + key="button"
  212 + icon={<PlusOutlined />}
  213 + onClick={() => {}}
  214 + type="primary"
  215 + >
  216 + 添加
  217 + </Button>,
  218 + ]}
  219 + />
  220 + );
  221 + };
  222 +
  223 + const removeSelectedStatement = (record: any) => {
  224 + console.log(record);
  225 + console.log(selectedStatement);
  226 + console.log(bankData);
  227 +
  228 + //在已选中区域中移除
  229 + let newSelectedStatement = selectedStatement.filter((item) => {
  230 + return item.id !== record.id;
  231 + });
  232 + setSelectedStatement(newSelectedStatement);
  233 +
  234 + //将数据添加回到表格中
  235 + let newBankData = [...bankData];
  236 + newBankData.push(record);
  237 + setBankData(newBankData);
  238 + };
  239 +
  240 + const showSelectedStatement = () => {
  241 + console.log('show');
  242 + console.log(selectedStatement);
  243 + let i = 0;
  244 +
  245 + let tags = selectedStatement.map((item) => {
  246 + return (
  247 + <Tag
  248 + key={i++}
  249 + closable={true}
  250 + style={{ userSelect: 'none' }}
  251 + onClose={(e) => {
  252 + e.preventDefault(); //需要加上这句代码,不然删除tag时,当前tag的下一个tag会被设置ant-tag-hidden
  253 + removeSelectedStatement(item);
  254 + }}
  255 + >
  256 + <span>{item.id}</span>
  257 + </Tag>
  258 + );
  259 + });
  260 +
  261 + console.log(tags);
  262 +
  263 + return tags;
  264 + };
  265 +
  266 + useEffect(() => {
  267 + loadBankData({ current: page, pageSize: pageSize });
  268 + }, []);
  269 +
  270 + return (
  271 + <>
  272 + <Modal
  273 + open
  274 + width="80%"
  275 + title="发票详情"
  276 + onOk={async () => {
  277 + setBtnLoading(true);
  278 + let bankStatementIds = selectedStatement?.map((item) => {
  279 + return item.id;
  280 + });
  281 + let res = await postServiceInvoiceInvoiceWriteOff({
  282 + data: {
  283 + invoiceId: invoiceId,
  284 + bankStatementIds: bankStatementIds,
  285 + },
  286 + });
  287 +
  288 + if (res) {
  289 + message.info(res.message);
  290 + onClose();
  291 + }
  292 +
  293 + setBtnLoading(false);
  294 + }}
  295 + okButtonProps={{
  296 + loading: btnLoading,
  297 + }}
  298 + onCancel={() => {
  299 + setVisible(false);
  300 + }}
  301 + >
  302 + <Divider orientation="left" plain>
  303 + 已选中
  304 + </Divider>
  305 + <ProCard className="mb-[16px]" bordered style={{}}>
  306 + <Flex>
  307 + <div>{showSelectedStatement()}</div>
  308 + </Flex>
  309 + </ProCard>
  310 +
  311 + <BankTable actionRef={actionRef}></BankTable>
  312 + </Modal>
  313 + </>
  314 + );
  315 +};
... ...
src/pages/Invoice/components/InvoiceVerificationModal.tsx 0 → 100644
  1 +import EllipsisDiv from '@/components/Div/EllipsisDiv';
  2 +import { INVOCING_STATUS, PAYEE_OPTIONS } from '@/pages/Order/constant';
  3 +import { postServiceInvoiceQueryInvoiceDetail } from '@/services';
  4 +import { enumValueToLabel, formatDateTime } from '@/utils';
  5 +import { formatDate } from '@/utils/time';
  6 +import { PlusOutlined } from '@ant-design/icons';
  7 +import { ModalForm, ProCard, ProTable } from '@ant-design/pro-components';
  8 +import {
  9 + Button,
  10 + Descriptions,
  11 + DescriptionsProps,
  12 + Divider,
  13 + Flex,
  14 + Form,
  15 +} from 'antd';
  16 +import { useEffect, useState } from 'react';
  17 +import { BANK_STATEMENT_COLUMNS, INVOICE_STATUS } from '../constant';
  18 +import '../index.less';
  19 +import BankChooseModal from './BankChooseModal';
  20 +
  21 +export default ({ invoiceId, setVisible, onClose }) => {
  22 + const [form] = Form.useForm<{ id: string }>();
  23 + const [bankChooseModalVisible, setBankChooseModalVisible] = useState(false);
  24 + const [invoiceInfo, setInvoiceInfo] = useState({});
  25 + const [relationOrderIds, setRelationOrderIds] = useState([]);
  26 + const [relationBankStatements, setRelationBankStatements] = useState([]);
  27 +
  28 + const loadInvoiceData = async () => {
  29 + let res = await postServiceInvoiceQueryInvoiceDetail({
  30 + data: { invoiceId: invoiceId },
  31 + });
  32 + if (res && res.data) {
  33 + setInvoiceInfo(res.data.queryInvoiceResponseDto);
  34 + setRelationOrderIds(res.data.mainOrderId);
  35 + setRelationBankStatements(res.data.bankStatementResponseDtos);
  36 + }
  37 + };
  38 +
  39 + const showRelationOrders = () => {
  40 + return relationOrderIds.map((item) => {
  41 + return (
  42 + <>
  43 + <Button
  44 + className="pl-1 pr-0"
  45 + type="link"
  46 + target="_blank"
  47 + href={'/order?id=' + item}
  48 + >
  49 + {item}
  50 + </Button>
  51 + <Divider type="vertical" />
  52 + </>
  53 + );
  54 + });
  55 + };
  56 +
  57 + const items: DescriptionsProps['items'] = [
  58 + {
  59 + key: '1',
  60 + label: '发票号码',
  61 + children: invoiceInfo.invoiceNumber,
  62 + span: 3,
  63 + },
  64 + {
  65 + key: '2',
  66 + label: '发票类型',
  67 + children: enumValueToLabel(invoiceInfo.invoiceStatus, INVOCING_STATUS),
  68 + span: 6,
  69 + },
  70 + {
  71 + key: '3',
  72 + label: '状态',
  73 + children: enumValueToLabel(invoiceInfo.status, INVOICE_STATUS),
  74 + span: 6,
  75 + },
  76 + {
  77 + key: '4',
  78 + label: '购买方',
  79 + children: invoiceInfo.purchaser,
  80 + span: 9,
  81 + },
  82 + {
  83 + key: '5',
  84 + label: '收款单位',
  85 + children: enumValueToLabel(invoiceInfo.payee, PAYEE_OPTIONS),
  86 + span: 9,
  87 + },
  88 + {
  89 + key: '6',
  90 + label: '联系人',
  91 + children: invoiceInfo.contacts,
  92 + span: 6,
  93 + },
  94 + {
  95 + key: '7',
  96 + label: '销售',
  97 + children: invoiceInfo.sale,
  98 + span: 6,
  99 + },
  100 + {
  101 + key: '8',
  102 + label: '金额',
  103 + children: invoiceInfo.money,
  104 + span: 6,
  105 + },
  106 + {
  107 + key: '9',
  108 + label: '开票日期',
  109 + children: formatDate(invoiceInfo.invoicingTime),
  110 + span: 9,
  111 + },
  112 + {
  113 + key: '10',
  114 + label: '收款时间',
  115 + children: formatDate(invoiceInfo.collectionTime),
  116 + span: 15,
  117 + },
  118 + {
  119 + key: '11',
  120 + label: '备注',
  121 + children: invoiceInfo.notes,
  122 + span: 24,
  123 + },
  124 + ];
  125 +
  126 + const getTableCellText = (target: any) => {
  127 + if (!target) {
  128 + return '';
  129 + }
  130 +
  131 + if (target.props) {
  132 + return target.props.text;
  133 + }
  134 +
  135 + return target;
  136 + };
  137 +
  138 + /**
  139 + * 加载银行流水列表表格的各个列格式
  140 + */
  141 + const bankStatementColumnsInit = () => {
  142 + let columns = BANK_STATEMENT_COLUMNS.map((item) => {
  143 + let newItem = { ...item };
  144 + let dataIndex = item.dataIndex;
  145 + let dataType = item.valueType;
  146 +
  147 + newItem.render = (text, record) => {
  148 + let textValue = record[dataIndex];
  149 +
  150 + if (dataType === 'date') {
  151 + textValue = formatDate(textValue);
  152 + }
  153 +
  154 + if (dataType === 'dateTime') {
  155 + textValue = formatDateTime(textValue);
  156 + }
  157 +
  158 + if (dataType === 'money') {
  159 + textValue = '¥' + textValue;
  160 + }
  161 +
  162 + switch (dataIndex) {
  163 + case 'invoiceStatus':
  164 + return (
  165 + <EllipsisDiv
  166 + text={enumValueToLabel(
  167 + getTableCellText(textValue),
  168 + INVOCING_STATUS,
  169 + )}
  170 + />
  171 + );
  172 +
  173 + case 'status':
  174 + return (
  175 + <EllipsisDiv
  176 + text={enumValueToLabel(
  177 + getTableCellText(textValue),
  178 + INVOICE_STATUS,
  179 + )}
  180 + />
  181 + );
  182 +
  183 + case 'payee':
  184 + return (
  185 + <EllipsisDiv
  186 + text={enumValueToLabel(
  187 + getTableCellText(textValue),
  188 + PAYEE_OPTIONS,
  189 + )}
  190 + />
  191 + );
  192 +
  193 + default:
  194 + return <EllipsisDiv text={getTableCellText(textValue)} />;
  195 + }
  196 + };
  197 +
  198 + return newItem;
  199 + });
  200 +
  201 + columns.push({
  202 + title: '操作',
  203 + valueType: 'option',
  204 + key: 'option',
  205 + fixed: 'right',
  206 + width: 70,
  207 + render: (text, record) => [
  208 + <Button
  209 + className="p-0"
  210 + key="choose"
  211 + type="link"
  212 + onClick={() => {
  213 + //去掉表格中对应的数据
  214 + let newBankData = bankData.filter((item) => {
  215 + return item.id !== record.id;
  216 + });
  217 + setBankData(newBankData);
  218 +
  219 + //添加到已选中区域中
  220 + let newSelectedStatement = [...selectedStatement];
  221 + newSelectedStatement.push(record);
  222 + setSelectedStatement(newSelectedStatement);
  223 + }}
  224 + >
  225 + 选中
  226 + </Button>,
  227 + ],
  228 + });
  229 +
  230 + return columns;
  231 + };
  232 +
  233 + /**
  234 + * 银行流水表
  235 + * @param param0
  236 + * @returns
  237 + */
  238 + const BankTable = ({ actionRef = undefined }) => {
  239 + return (
  240 + <ProTable
  241 + columns={bankStatementColumnsInit()}
  242 + actionRef={actionRef}
  243 + cardBordered
  244 + pagination={{
  245 + pageSize: 10,
  246 + }}
  247 + dataSource={relationBankStatements}
  248 + columnsState={{
  249 + persistenceKey: 'pro-table-singe-demos',
  250 + persistenceType: 'localStorage',
  251 + defaultValue: {
  252 + option: { fixed: 'right', disable: true },
  253 + },
  254 + onChange(value) {
  255 + console.log('value: ', value);
  256 + },
  257 + }}
  258 + rowKey="id"
  259 + search={false}
  260 + options={{
  261 + setting: {
  262 + listsHeight: 400,
  263 + },
  264 + }}
  265 + form={{
  266 + // 由于配置了 transform,提交的参与与定义的不同这里需要转化一下
  267 + syncToUrl: (values, type) => {
  268 + if (type === 'get') {
  269 + return {
  270 + ...values,
  271 + created_at: [values.startTime, values.endTime],
  272 + };
  273 + }
  274 + return values;
  275 + },
  276 + }}
  277 + dateFormatter="string"
  278 + headerTitle="银行流水"
  279 + scroll={{ x: 1400, y: 360 }}
  280 + toolBarRender={() => [
  281 + <Button
  282 + key="button"
  283 + icon={<PlusOutlined />}
  284 + onClick={() => {
  285 + setBankChooseModalVisible(true);
  286 + }}
  287 + type="primary"
  288 + >
  289 + 添加
  290 + </Button>,
  291 + ]}
  292 + />
  293 + );
  294 + };
  295 +
  296 + useEffect(() => {
  297 + loadInvoiceData();
  298 + }, []);
  299 +
  300 + return (
  301 + <>
  302 + <ModalForm<{
  303 + id: string;
  304 + }>
  305 + open
  306 + width="80%"
  307 + title="发票详情"
  308 + form={form}
  309 + autoFocusFirstInput
  310 + modalProps={{
  311 + okText: '确定',
  312 + cancelText: '取消',
  313 + destroyOnClose: true,
  314 + onCancel: () => {
  315 + setVisible(false);
  316 + },
  317 + }}
  318 + onFinish={async () => {
  319 + onClose();
  320 + }}
  321 + onOpenChange={setVisible}
  322 + >
  323 + <Divider orientation="left" plain>
  324 + 发票信息
  325 + </Divider>
  326 +
  327 + <Descriptions
  328 + bordered
  329 + column={24}
  330 + size="small"
  331 + title=""
  332 + items={items}
  333 + />
  334 +
  335 + <Divider orientation="left" plain>
  336 + 订单号
  337 + </Divider>
  338 +
  339 + <ProCard bordered style={{}}>
  340 + <Flex>
  341 + <div>{showRelationOrders()}</div>
  342 + </Flex>
  343 + </ProCard>
  344 +
  345 + <Divider plain></Divider>
  346 +
  347 + <BankTable></BankTable>
  348 + </ModalForm>
  349 +
  350 + {bankChooseModalVisible ? (
  351 + <BankChooseModal
  352 + setVisible={setBankChooseModalVisible}
  353 + invoiceId={invoiceId}
  354 + onClose={() => {
  355 + setBankChooseModalVisible(false);
  356 + loadInvoiceData();
  357 + }}
  358 + ></BankChooseModal>
  359 + ) : (
  360 + ''
  361 + )}
  362 + </>
  363 + );
  364 +};
... ...
src/pages/Invoice/constant.tsx
... ... @@ -85,4 +85,201 @@ export const INVOICE_COLUMNS = [
85 85 export const INVOICE_STATUS = {
86 86 UNVERIFIED: '未核销',
87 87 VERIFIED: '已核销',
  88 + ABNORMAL: '异常',
88 89 };
  90 +
  91 +export const BANK_STATEMENT_COLUMNS = [
  92 + {
  93 + dataIndex: 'id',
  94 + title: '主键ID',
  95 + valueType: 'text',
  96 + width: 100,
  97 + hideInTable: true,
  98 + },
  99 + {
  100 + dataIndex: 'status',
  101 + title: '状态',
  102 + valueType: 'text',
  103 + width: 100,
  104 + },
  105 + {
  106 + dataIndex: 'serialNumber',
  107 + title: '流水号',
  108 + valueType: 'text',
  109 + width: 100,
  110 + },
  111 + {
  112 + dataIndex: 'merchantOrderNumber',
  113 + title: '商户订单号',
  114 + valueType: 'text',
  115 + width: 100,
  116 + },
  117 + {
  118 + dataIndex: 'bankOrderNumber',
  119 + title: '银行订单号',
  120 + valueType: 'text',
  121 + width: 100,
  122 + },
  123 + {
  124 + dataIndex: 'thirdPartyOrderNumber',
  125 + title: '第三方订单号',
  126 + valueType: 'text',
  127 + width: 100,
  128 + },
  129 + {
  130 + dataIndex: 'accountNumber',
  131 + title: '账号',
  132 + valueType: 'text',
  133 + width: 180,
  134 + },
  135 + {
  136 + dataIndex: 'accountName',
  137 + title: '帐号名称',
  138 + valueType: 'text',
  139 + width: 260,
  140 + },
  141 + {
  142 + dataIndex: 'currency',
  143 + title: '币种',
  144 + valueType: 'text',
  145 + width: 100,
  146 + },
  147 + {
  148 + dataIndex: 'transactionDate',
  149 + title: '交易日',
  150 + valueType: 'text',
  151 + width: 100,
  152 + },
  153 + {
  154 + dataIndex: 'transactionTime',
  155 + title: '交易时间',
  156 + valueType: 'text',
  157 + width: 100,
  158 + },
  159 + {
  160 + dataIndex: 'transactionType',
  161 + title: '交易类型',
  162 + valueType: 'text',
  163 + width: 100,
  164 + },
  165 + {
  166 + dataIndex: 'transactionBankBranch',
  167 + title: '交易行所',
  168 + valueType: 'text',
  169 + width: 100,
  170 + },
  171 + {
  172 + dataIndex: 'valueDate',
  173 + title: '起息日',
  174 + valueType: 'text',
  175 + width: 100,
  176 + },
  177 + {
  178 + dataIndex: 'loanAmount',
  179 + title: '贷方金额',
  180 + valueType: 'text',
  181 + width: 100,
  182 + },
  183 + {
  184 + dataIndex: 'borrowedAmount',
  185 + title: '借方金额',
  186 + valueType: 'text',
  187 + width: 100,
  188 + },
  189 + {
  190 + dataIndex: 'transactionAmount',
  191 + title: '交易金额',
  192 + valueType: 'text',
  193 + width: 100,
  194 + },
  195 + {
  196 + dataIndex: 'balance',
  197 + title: '余额',
  198 + valueType: 'text',
  199 + width: 100,
  200 + },
  201 + {
  202 + dataIndex: 'actualPaymentAmount',
  203 + title: '实付金额',
  204 + valueType: 'text',
  205 + width: 100,
  206 + },
  207 + {
  208 + dataIndex: 'collectionChannel',
  209 + title: '收款渠道',
  210 + valueType: 'text',
  211 + width: 100,
  212 + },
  213 + {
  214 + dataIndex: 'paymentType',
  215 + title: '支付类型',
  216 + valueType: 'text',
  217 + width: 100,
  218 + },
  219 + {
  220 + dataIndex: 'summary',
  221 + title: '摘要',
  222 + valueType: 'text',
  223 + width: 300,
  224 + },
  225 + {
  226 + dataIndex: 'cashier',
  227 + title: '收银员',
  228 + valueType: 'text',
  229 + width: 100,
  230 + },
  231 + {
  232 + dataIndex: 'payeePayerUnit',
  233 + title: '收(付)方单位',
  234 + valueType: 'text',
  235 + width: 260,
  236 + },
  237 + {
  238 + dataIndex: 'payeePayerName',
  239 + title: '收(付)方名称',
  240 + valueType: 'text',
  241 + width: 260,
  242 + },
  243 + {
  244 + dataIndex: 'payeePayerAccountNumber',
  245 + title: '收(付)方账号',
  246 + valueType: 'text',
  247 + width: 260,
  248 + },
  249 + {
  250 + dataIndex: 'payeePayerBankBranchCode',
  251 + title: '收(付)方开户行行号',
  252 + valueType: 'text',
  253 + width: 260,
  254 + },
  255 + {
  256 + dataIndex: 'payeePayerBankName',
  257 + title: '收(付)方开户行名',
  258 + valueType: 'text',
  259 + width: 260,
  260 + },
  261 + {
  262 + dataIndex: 'payeePayerBankAddress',
  263 + title: '收(付)方开户行地址',
  264 + valueType: 'text',
  265 + width: 260,
  266 + },
  267 + {
  268 + dataIndex: 'extendedSummary',
  269 + title: '扩展摘要',
  270 + valueType: 'text',
  271 + width: 100,
  272 + },
  273 + {
  274 + dataIndex: 'transactionAnalysisCode',
  275 + title: '交易分析码',
  276 + valueType: 'text',
  277 + width: 100,
  278 + },
  279 + {
  280 + dataIndex: 'remarkNote',
  281 + title: '附言',
  282 + valueType: 'text',
  283 + width: 100,
  284 + },
  285 +];
... ...
src/pages/Invoice/index.tsx
1 1 import ButtonConfirm from '@/components/ButtomConfirm';
2   -import { INVOICE_COLUMNS, INVOICE_STATUS } from '@/pages/Invoice/constant';
  2 +import EllipsisDiv from '@/components/Div/EllipsisDiv';
3 3 import {
  4 + BANK_STATEMENT_COLUMNS,
  5 + INVOICE_COLUMNS,
  6 + INVOICE_STATUS,
  7 +} from '@/pages/Invoice/constant';
  8 +import {
  9 + postServiceBankStatementDeleteBankStatement,
  10 + postServiceBankStatementQueryBankStatement,
4 11 postServiceInvoiceDeleteInvoice,
5 12 postServiceInvoiceQueryInvoice,
6 13 } from '@/services';
... ... @@ -17,23 +24,24 @@ import { Avatar, Button, Dropdown, Tabs, Tag, message } from &#39;antd&#39;;
17 24 import { useRef, useState } from 'react';
18 25 import { INVOCING_STATUS, PAYEE_OPTIONS } from '../Order/constant';
19 26 import BankImportModal from './components/BankImportModal';
  27 +import InvoiceVerificationModal from './components/InvoiceVerificationModal';
20 28 import './index.less';
21 29 const InvoicePage = () => {
22 30 const invoiceActionRef = useRef<ActionType>();
23 31 const bankActionRef = useRef<ActionType>();
24 32 const [bankImportModalVisible, setBankImportModalVisible] = useState(false);
  33 + const [invoiceVerificationVisible, setInvoiceVerificationVisible] =
  34 + useState(false);
  35 + const [invoiceId, setInvoiceId] = useState(undefined);
25 36  
26 37 const userInfo = getUserInfo();
27 38  
28   - const BreakWordDiv = ({ text = '暂无内容' }) => {
29   - return (
30   - <div
31   - title={text}
32   - className="overflow-hidden whitespace-no-wrap overflow-ellipsis whitespace-nowrap"
33   - >
34   - {text}
35   - </div>
36   - );
  39 + const reloadInvoiceTable = () => {
  40 + invoiceActionRef.current?.reload();
  41 + };
  42 +
  43 + const reloadBankStatementTable = () => {
  44 + bankActionRef.current?.reload();
37 45 };
38 46  
39 47 const getTableCellText = (target: any) => {
... ... @@ -75,7 +83,7 @@ const InvoicePage = () =&gt; {
75 83 switch (dataIndex) {
76 84 case 'invoiceStatus':
77 85 return (
78   - <BreakWordDiv
  86 + <EllipsisDiv
79 87 text={enumValueToLabel(
80 88 getTableCellText(textValue),
81 89 INVOCING_STATUS,
... ... @@ -85,7 +93,7 @@ const InvoicePage = () =&gt; {
85 93  
86 94 case 'status':
87 95 return (
88   - <BreakWordDiv
  96 + <EllipsisDiv
89 97 text={enumValueToLabel(
90 98 getTableCellText(textValue),
91 99 INVOICE_STATUS,
... ... @@ -95,7 +103,7 @@ const InvoicePage = () =&gt; {
95 103  
96 104 case 'payee':
97 105 return (
98   - <BreakWordDiv
  106 + <EllipsisDiv
99 107 text={enumValueToLabel(
100 108 getTableCellText(textValue),
101 109 PAYEE_OPTIONS,
... ... @@ -104,7 +112,7 @@ const InvoicePage = () =&gt; {
104 112 );
105 113  
106 114 default:
107   - return <BreakWordDiv text={getTableCellText(textValue)} />;
  115 + return <EllipsisDiv text={getTableCellText(textValue)} />;
108 116 }
109 117 };
110 118  
... ... @@ -126,18 +134,21 @@ const InvoicePage = () =&gt; {
126 134 >
127 135 核销
128 136 </a>,
129   - <a
130   - href={record.url}
131   - target="_blank"
132   - rel="noopener noreferrer"
  137 + <Button
  138 + className="p-0"
133 139 key="view"
  140 + type="link"
  141 + onClick={() => {
  142 + setInvoiceVerificationVisible(true);
  143 + setInvoiceId(record.id);
  144 + }}
134 145 >
135 146 查看
136   - </a>,
  147 + </Button>,
137 148 <ButtonConfirm
138 149 key="delete"
139 150 className="p-0"
140   - title="确认删除?"
  151 + title={'确认删除发票号码为[ ' + record.invoiceNumber + ' ]的发票吗?'}
141 152 text="删除"
142 153 onConfirm={async () => {
143 154 let res = await postServiceInvoiceDeleteInvoice({
... ... @@ -145,6 +156,114 @@ const InvoicePage = () =&gt; {
145 156 });
146 157 if (res) {
147 158 message.success(res.message);
  159 + reloadInvoiceTable();
  160 + }
  161 + }}
  162 + />,
  163 + ],
  164 + });
  165 +
  166 + return columns;
  167 + };
  168 +
  169 + const bankStatemetColumnsInit = () => {
  170 + let columns = BANK_STATEMENT_COLUMNS.map((item) => {
  171 + let newItem = { ...item };
  172 + let dataIndex = item.dataIndex;
  173 + let dataType = item.valueType;
  174 +
  175 + newItem.render = (text, record) => {
  176 + let textValue = record[dataIndex];
  177 +
  178 + if (dataType === 'date') {
  179 + textValue = formatDate(textValue);
  180 + }
  181 +
  182 + if (dataType === 'dateTime') {
  183 + textValue = formatDateTime(textValue);
  184 + }
  185 +
  186 + if (dataType === 'money') {
  187 + textValue = '¥' + textValue;
  188 + }
  189 +
  190 + switch (dataIndex) {
  191 + case 'invoiceStatus':
  192 + return (
  193 + <EllipsisDiv
  194 + text={enumValueToLabel(
  195 + getTableCellText(textValue),
  196 + INVOCING_STATUS,
  197 + )}
  198 + />
  199 + );
  200 +
  201 + case 'status':
  202 + return (
  203 + <EllipsisDiv
  204 + text={enumValueToLabel(
  205 + getTableCellText(textValue),
  206 + INVOICE_STATUS,
  207 + )}
  208 + />
  209 + );
  210 +
  211 + case 'payee':
  212 + return (
  213 + <EllipsisDiv
  214 + text={enumValueToLabel(
  215 + getTableCellText(textValue),
  216 + PAYEE_OPTIONS,
  217 + )}
  218 + />
  219 + );
  220 +
  221 + default:
  222 + return <EllipsisDiv text={getTableCellText(textValue)} />;
  223 + }
  224 + };
  225 +
  226 + return newItem;
  227 + });
  228 +
  229 + columns.push({
  230 + title: '操作',
  231 + valueType: 'option',
  232 + key: 'option',
  233 + fixed: 'right',
  234 + width: 120,
  235 + render: (text, record, _, action) => [
  236 + <a
  237 + key="editable"
  238 + onClick={() => {
  239 + action?.startEditable?.(record.id);
  240 + }}
  241 + >
  242 + 核销
  243 + </a>,
  244 + <Button
  245 + className="p-0"
  246 + key="view"
  247 + type="link"
  248 + onClick={() => {
  249 + setInvoiceVerificationVisible(true);
  250 + setInvoiceId(record.id);
  251 + }}
  252 + >
  253 + 查看
  254 + </Button>,
  255 + <ButtonConfirm
  256 + key="delete"
  257 + className="p-0"
  258 + title={'是否删除该银行流水记录?'}
  259 + text="删除"
  260 + onConfirm={async () => {
  261 + let res = await postServiceBankStatementDeleteBankStatement({
  262 + data: { id: record.id },
  263 + });
  264 + if (res) {
  265 + message.success(res.message);
  266 + reloadBankStatementTable();
148 267 }
149 268 }}
150 269 />,
... ... @@ -225,14 +344,14 @@ const InvoicePage = () =&gt; {
225 344 const BankTable = ({ actionRef = undefined }) => {
226 345 return (
227 346 <ProTable
228   - columns={invoicecColumnsInit()}
  347 + columns={bankStatemetColumnsInit()}
229 348 actionRef={actionRef}
230 349 cardBordered
231 350 pagination={{
232 351 pageSize: 10,
233 352 }}
234 353 request={async (params) => {
235   - const res = await postServiceInvoiceQueryInvoice({
  354 + const res = await postServiceBankStatementQueryBankStatement({
236 355 data: { ...params },
237 356 });
238 357 if (res) {
... ... @@ -261,18 +380,7 @@ const InvoicePage = () =&gt; {
261 380 listsHeight: 400,
262 381 },
263 382 }}
264   - form={{
265   - // 由于配置了 transform,提交的参与与定义的不同这里需要转化一下
266   - syncToUrl: (values, type) => {
267   - if (type === 'get') {
268   - return {
269   - ...values,
270   - created_at: [values.startTime, values.endTime],
271   - };
272   - }
273   - return values;
274   - },
275   - }}
  383 + form={{}}
276 384 dateFormatter="string"
277 385 headerTitle="银行流水列表"
278 386 scroll={{ x: 1400, y: 360 }}
... ... @@ -282,6 +390,7 @@ const InvoicePage = () =&gt; {
282 390 icon={<PlusOutlined />}
283 391 onClick={() => {
284 392 setBankImportModalVisible(true);
  393 + // console.log("test")
285 394 }}
286 395 type="primary"
287 396 >
... ... @@ -353,6 +462,16 @@ const InvoicePage = () =&gt; {
353 462 ) : (
354 463 ''
355 464 )}
  465 +
  466 + {invoiceVerificationVisible ? (
  467 + <InvoiceVerificationModal
  468 + setVisible={setInvoiceVerificationVisible}
  469 + invoiceId={invoiceId}
  470 + onClose={() => {}}
  471 + ></InvoiceVerificationModal>
  472 + ) : (
  473 + ''
  474 + )}
356 475 </>
357 476 );
358 477 };
... ...
src/services/definition.ts
... ... @@ -761,6 +761,179 @@ export interface QueryAnnexDto {
761 761 subId?: number;
762 762 }
763 763  
  764 +export interface QueryBankStatementDto {
  765 + /**
  766 + * @description
  767 + * 帐号名称
  768 + */
  769 + accountName?: string;
  770 + /**
  771 + * @description
  772 + * 账号
  773 + */
  774 + accountNumber?: string;
  775 + /**
  776 + * @description
  777 + * 实付金额
  778 + */
  779 + actualPaymentAmount?: number;
  780 + /**
  781 + * @description
  782 + * 余额
  783 + */
  784 + balance?: number;
  785 + /**
  786 + * @description
  787 + * 银行订单号
  788 + */
  789 + bankOrderNumber?: string;
  790 + /**
  791 + * @description
  792 + * 借款金额
  793 + */
  794 + borrowedAmount?: number;
  795 + /**
  796 + * @description
  797 + * 收银员
  798 + */
  799 + cashier?: string;
  800 + /**
  801 + * @description
  802 + * 收款渠道
  803 + */
  804 + collectionChannel?: string;
  805 + /**
  806 + * @description
  807 + * 币种
  808 + */
  809 + currency?: string;
  810 + /** @format int32 */
  811 + current?: number;
  812 + /**
  813 + * @description
  814 + * 扩展摘要
  815 + */
  816 + extendedSummary?: string;
  817 + /**
  818 + * @description
  819 + * id
  820 + * @format int64
  821 + */
  822 + id?: number;
  823 + /**
  824 + * @description
  825 + * 贷款金额
  826 + */
  827 + loanAmount?: number;
  828 + /**
  829 + * @description
  830 + * 商户订单号
  831 + */
  832 + merchantOrderNumber?: string;
  833 + /** @format int32 */
  834 + pageSize?: number;
  835 + /**
  836 + * @description
  837 + * 收(付)方账号
  838 + */
  839 + payeePayerAccountNumber?: string;
  840 + /**
  841 + * @description
  842 + * 收(付)方开户行地址
  843 + */
  844 + payeePayerBankAddress?: string;
  845 + /**
  846 + * @description
  847 + * 收(付)方开户行行号
  848 + */
  849 + payeePayerBankBranchCode?: string;
  850 + /**
  851 + * @description
  852 + * 收(付)方开户行名
  853 + */
  854 + payeePayerBankName?: string;
  855 + /**
  856 + * @description
  857 + * 收(付)方名称
  858 + */
  859 + payeePayerName?: string;
  860 + /**
  861 + * @description
  862 + * 收(付)方单位
  863 + */
  864 + payeePayerUnit?: string;
  865 + /**
  866 + * @description
  867 + * 支付类型
  868 + */
  869 + paymentType?: string;
  870 + /**
  871 + * @description
  872 + * 附言
  873 + */
  874 + remarkNote?: string;
  875 + /**
  876 + * @description
  877 + * 流水号
  878 + */
  879 + serialNumber?: string;
  880 + /**
  881 + * @description
  882 + * 状态
  883 + */
  884 + status?: string;
  885 + /**
  886 + * @description
  887 + * 摘要
  888 + */
  889 + summary?: string;
  890 + /**
  891 + * @description
  892 + * 第三方订单号
  893 + */
  894 + thirdPartyOrderNumber?: string;
  895 + /** @format int32 */
  896 + total?: number;
  897 + /**
  898 + * @description
  899 + * 交易金额
  900 + */
  901 + transactionAmount?: number;
  902 + /**
  903 + * @description
  904 + * 交易分析码
  905 + */
  906 + transactionAnalysisCode?: string;
  907 + /**
  908 + * @description
  909 + * 交易行所
  910 + */
  911 + transactionBankBranch?: string;
  912 + /**
  913 + * @description
  914 + * 交易日
  915 + * @format date
  916 + */
  917 + transactionDate?: string;
  918 + /**
  919 + * @description
  920 + * 交易时间
  921 + * @format date-time
  922 + */
  923 + transactionTime?: string;
  924 + /**
  925 + * @description
  926 + * 交易类型
  927 + */
  928 + transactionType?: string;
  929 + /**
  930 + * @description
  931 + * 起息日
  932 + * @format date
  933 + */
  934 + valueDate?: string;
  935 +}
  936 +
764 937 export interface QueryCustomerInformationDto {
765 938 /**
766 939 * @description
... ... @@ -792,6 +965,15 @@ export interface QueryHistoryRecordDto {
792 965 isDeleteQueryOrder?: boolean;
793 966 }
794 967  
  968 +export interface QueryInvoiceDetailDto {
  969 + /**
  970 + * @description
  971 + * 发票id
  972 + * @format int64
  973 + */
  974 + invoiceId?: number;
  975 +}
  976 +
795 977 export interface QueryMainOrderDto {
796 978 /**
797 979 * @description
... ...
src/services/request.ts
... ... @@ -41,8 +41,10 @@ import type {
41 41 ProductInformationDto,
42 42 QueryAfterSalesInfoSnapshotDto,
43 43 QueryAnnexDto,
  44 + QueryBankStatementDto,
44 45 QueryCustomerInformationDto,
45 46 QueryHistoryRecordDto,
  47 + QueryInvoiceDetailDto,
46 48 QueryMainOrderDto,
47 49 QueryReportFormsDto,
48 50 ResetPwdVO,
... ... @@ -4775,6 +4777,150 @@ export const postOrderErpUsersUpdatePass = /* #__PURE__ */ (() =&gt; {
4775 4777 return request;
4776 4778 })();
4777 4779  
  4780 +/** @description request parameter type for postServiceBankStatementDeleteBankStatement */
  4781 +export interface PostServiceBankStatementDeleteBankStatementOption {
  4782 + /**
  4783 + * @description
  4784 + * dto
  4785 + */
  4786 + body: {
  4787 + /**
  4788 + @description
  4789 + dto */
  4790 + dto: Dto;
  4791 + };
  4792 +}
  4793 +
  4794 +/** @description response type for postServiceBankStatementDeleteBankStatement */
  4795 +export interface PostServiceBankStatementDeleteBankStatementResponse {
  4796 + /**
  4797 + * @description
  4798 + * OK
  4799 + */
  4800 + 200: ServerResult;
  4801 + /**
  4802 + * @description
  4803 + * Created
  4804 + */
  4805 + 201: any;
  4806 + /**
  4807 + * @description
  4808 + * Unauthorized
  4809 + */
  4810 + 401: any;
  4811 + /**
  4812 + * @description
  4813 + * Forbidden
  4814 + */
  4815 + 403: any;
  4816 + /**
  4817 + * @description
  4818 + * Not Found
  4819 + */
  4820 + 404: any;
  4821 +}
  4822 +
  4823 +export type PostServiceBankStatementDeleteBankStatementResponseSuccess =
  4824 + PostServiceBankStatementDeleteBankStatementResponse[200];
  4825 +/**
  4826 + * @description
  4827 + * 删除银行流水
  4828 + * @tags 银行流水
  4829 + * @produces *
  4830 + * @consumes application/json
  4831 + */
  4832 +export const postServiceBankStatementDeleteBankStatement =
  4833 + /* #__PURE__ */ (() => {
  4834 + const method = 'post';
  4835 + const url = '/service/bankStatement/deleteBankStatement';
  4836 + function request(
  4837 + option: PostServiceBankStatementDeleteBankStatementOption,
  4838 + ): Promise<PostServiceBankStatementDeleteBankStatementResponseSuccess> {
  4839 + return requester(request.url, {
  4840 + method: request.method,
  4841 + ...option,
  4842 + }) as unknown as Promise<PostServiceBankStatementDeleteBankStatementResponseSuccess>;
  4843 + }
  4844 +
  4845 + /** http method */
  4846 + request.method = method;
  4847 + /** request url */
  4848 + request.url = url;
  4849 + return request;
  4850 + })();
  4851 +
  4852 +/** @description request parameter type for postServiceBankStatementEditBankStatement */
  4853 +export interface PostServiceBankStatementEditBankStatementOption {
  4854 + /**
  4855 + * @description
  4856 + * dto
  4857 + */
  4858 + body: {
  4859 + /**
  4860 + @description
  4861 + dto */
  4862 + dto: Dto;
  4863 + };
  4864 +}
  4865 +
  4866 +/** @description response type for postServiceBankStatementEditBankStatement */
  4867 +export interface PostServiceBankStatementEditBankStatementResponse {
  4868 + /**
  4869 + * @description
  4870 + * OK
  4871 + */
  4872 + 200: ServerResult;
  4873 + /**
  4874 + * @description
  4875 + * Created
  4876 + */
  4877 + 201: any;
  4878 + /**
  4879 + * @description
  4880 + * Unauthorized
  4881 + */
  4882 + 401: any;
  4883 + /**
  4884 + * @description
  4885 + * Forbidden
  4886 + */
  4887 + 403: any;
  4888 + /**
  4889 + * @description
  4890 + * Not Found
  4891 + */
  4892 + 404: any;
  4893 +}
  4894 +
  4895 +export type PostServiceBankStatementEditBankStatementResponseSuccess =
  4896 + PostServiceBankStatementEditBankStatementResponse[200];
  4897 +/**
  4898 + * @description
  4899 + * 编辑银行流水
  4900 + * @tags 银行流水
  4901 + * @produces *
  4902 + * @consumes application/json
  4903 + */
  4904 +export const postServiceBankStatementEditBankStatement =
  4905 + /* #__PURE__ */ (() => {
  4906 + const method = 'post';
  4907 + const url = '/service/bankStatement/editBankStatement';
  4908 + function request(
  4909 + option: PostServiceBankStatementEditBankStatementOption,
  4910 + ): Promise<PostServiceBankStatementEditBankStatementResponseSuccess> {
  4911 + return requester(request.url, {
  4912 + method: request.method,
  4913 + ...option,
  4914 + }) as unknown as Promise<PostServiceBankStatementEditBankStatementResponseSuccess>;
  4915 + }
  4916 +
  4917 + /** http method */
  4918 + request.method = method;
  4919 + /** request url */
  4920 + request.url = url;
  4921 + return request;
  4922 + })();
  4923 +
4778 4924 /** @description response type for postServiceBankStatementExportTemplate */
4779 4925 export interface PostServiceBankStatementExportTemplateResponse {
4780 4926 /**
... ... @@ -4901,6 +5047,133 @@ export const postServiceBankStatementImportBankStatementForm =
4901 5047 return request;
4902 5048 })();
4903 5049  
  5050 +/** @description request parameter type for postServiceBankStatementQueryBankStatement */
  5051 +export interface PostServiceBankStatementQueryBankStatementOption {
  5052 + /**
  5053 + * @description
  5054 + * dto
  5055 + */
  5056 + body: {
  5057 + /**
  5058 + @description
  5059 + dto */
  5060 + dto: QueryBankStatementDto;
  5061 + };
  5062 +}
  5063 +
  5064 +/** @description response type for postServiceBankStatementQueryBankStatement */
  5065 +export interface PostServiceBankStatementQueryBankStatementResponse {
  5066 + /**
  5067 + * @description
  5068 + * OK
  5069 + */
  5070 + 200: ServerResult;
  5071 + /**
  5072 + * @description
  5073 + * Created
  5074 + */
  5075 + 201: any;
  5076 + /**
  5077 + * @description
  5078 + * Unauthorized
  5079 + */
  5080 + 401: any;
  5081 + /**
  5082 + * @description
  5083 + * Forbidden
  5084 + */
  5085 + 403: any;
  5086 + /**
  5087 + * @description
  5088 + * Not Found
  5089 + */
  5090 + 404: any;
  5091 +}
  5092 +
  5093 +export type PostServiceBankStatementQueryBankStatementResponseSuccess =
  5094 + PostServiceBankStatementQueryBankStatementResponse[200];
  5095 +/**
  5096 + * @description
  5097 + * 查询银行流水
  5098 + * @tags 银行流水
  5099 + * @produces *
  5100 + * @consumes application/json
  5101 + */
  5102 +export const postServiceBankStatementQueryBankStatement =
  5103 + /* #__PURE__ */ (() => {
  5104 + const method = 'post';
  5105 + const url = '/service/bankStatement/queryBankStatement';
  5106 + function request(
  5107 + option: PostServiceBankStatementQueryBankStatementOption,
  5108 + ): Promise<PostServiceBankStatementQueryBankStatementResponseSuccess> {
  5109 + return requester(request.url, {
  5110 + method: request.method,
  5111 + ...option,
  5112 + }) as unknown as Promise<PostServiceBankStatementQueryBankStatementResponseSuccess>;
  5113 + }
  5114 +
  5115 + /** http method */
  5116 + request.method = method;
  5117 + /** request url */
  5118 + request.url = url;
  5119 + return request;
  5120 + })();
  5121 +
  5122 +/** @description response type for postServiceInvoiceCancelInvoiceAndBankStatement */
  5123 +export interface PostServiceInvoiceCancelInvoiceAndBankStatementResponse {
  5124 + /**
  5125 + * @description
  5126 + * OK
  5127 + */
  5128 + 200: ServerResult;
  5129 + /**
  5130 + * @description
  5131 + * Created
  5132 + */
  5133 + 201: any;
  5134 + /**
  5135 + * @description
  5136 + * Unauthorized
  5137 + */
  5138 + 401: any;
  5139 + /**
  5140 + * @description
  5141 + * Forbidden
  5142 + */
  5143 + 403: any;
  5144 + /**
  5145 + * @description
  5146 + * Not Found
  5147 + */
  5148 + 404: any;
  5149 +}
  5150 +
  5151 +export type PostServiceInvoiceCancelInvoiceAndBankStatementResponseSuccess =
  5152 + PostServiceInvoiceCancelInvoiceAndBankStatementResponse[200];
  5153 +/**
  5154 + * @description
  5155 + * 取消发票与银行流水的关联
  5156 + * @tags 发票
  5157 + * @produces *
  5158 + * @consumes application/json
  5159 + */
  5160 +export const postServiceInvoiceCancelInvoiceAndBankStatement =
  5161 + /* #__PURE__ */ (() => {
  5162 + const method = 'post';
  5163 + const url = '/service/invoice/cancelInvoiceAndBankStatement';
  5164 + function request(): Promise<PostServiceInvoiceCancelInvoiceAndBankStatementResponseSuccess> {
  5165 + return requester(request.url, {
  5166 + method: request.method,
  5167 + }) as unknown as Promise<PostServiceInvoiceCancelInvoiceAndBankStatementResponseSuccess>;
  5168 + }
  5169 +
  5170 + /** http method */
  5171 + request.method = method;
  5172 + /** request url */
  5173 + request.url = url;
  5174 + return request;
  5175 + })();
  5176 +
4904 5177 /** @description request parameter type for postServiceInvoiceDeleteInvoice */
4905 5178 export interface PostServiceInvoiceDeleteInvoiceOption {
4906 5179 /**
... ... @@ -4972,6 +5245,77 @@ export const postServiceInvoiceDeleteInvoice = /* #__PURE__ */ (() =&gt; {
4972 5245 return request;
4973 5246 })();
4974 5247  
  5248 +/** @description request parameter type for postServiceInvoiceInvoiceWriteOff */
  5249 +export interface PostServiceInvoiceInvoiceWriteOffOption {
  5250 + /**
  5251 + * @description
  5252 + * dto
  5253 + */
  5254 + body: {
  5255 + /**
  5256 + @description
  5257 + dto */
  5258 + dto: Dto;
  5259 + };
  5260 +}
  5261 +
  5262 +/** @description response type for postServiceInvoiceInvoiceWriteOff */
  5263 +export interface PostServiceInvoiceInvoiceWriteOffResponse {
  5264 + /**
  5265 + * @description
  5266 + * OK
  5267 + */
  5268 + 200: ServerResult;
  5269 + /**
  5270 + * @description
  5271 + * Created
  5272 + */
  5273 + 201: any;
  5274 + /**
  5275 + * @description
  5276 + * Unauthorized
  5277 + */
  5278 + 401: any;
  5279 + /**
  5280 + * @description
  5281 + * Forbidden
  5282 + */
  5283 + 403: any;
  5284 + /**
  5285 + * @description
  5286 + * Not Found
  5287 + */
  5288 + 404: any;
  5289 +}
  5290 +
  5291 +export type PostServiceInvoiceInvoiceWriteOffResponseSuccess =
  5292 + PostServiceInvoiceInvoiceWriteOffResponse[200];
  5293 +/**
  5294 + * @description
  5295 + * 发票核销
  5296 + * @tags 发票
  5297 + * @produces *
  5298 + * @consumes application/json
  5299 + */
  5300 +export const postServiceInvoiceInvoiceWriteOff = /* #__PURE__ */ (() => {
  5301 + const method = 'post';
  5302 + const url = '/service/invoice/invoiceWriteOff';
  5303 + function request(
  5304 + option: PostServiceInvoiceInvoiceWriteOffOption,
  5305 + ): Promise<PostServiceInvoiceInvoiceWriteOffResponseSuccess> {
  5306 + return requester(request.url, {
  5307 + method: request.method,
  5308 + ...option,
  5309 + }) as unknown as Promise<PostServiceInvoiceInvoiceWriteOffResponseSuccess>;
  5310 + }
  5311 +
  5312 + /** http method */
  5313 + request.method = method;
  5314 + /** request url */
  5315 + request.url = url;
  5316 + return request;
  5317 +})();
  5318 +
4975 5319 /** @description request parameter type for postServiceInvoiceQueryInvoice */
4976 5320 export interface PostServiceInvoiceQueryInvoiceOption {
4977 5321 /**
... ... @@ -5043,6 +5387,77 @@ export const postServiceInvoiceQueryInvoice = /* #__PURE__ */ (() =&gt; {
5043 5387 return request;
5044 5388 })();
5045 5389  
  5390 +/** @description request parameter type for postServiceInvoiceQueryInvoiceDetail */
  5391 +export interface PostServiceInvoiceQueryInvoiceDetailOption {
  5392 + /**
  5393 + * @description
  5394 + * dto
  5395 + */
  5396 + body: {
  5397 + /**
  5398 + @description
  5399 + dto */
  5400 + dto: QueryInvoiceDetailDto;
  5401 + };
  5402 +}
  5403 +
  5404 +/** @description response type for postServiceInvoiceQueryInvoiceDetail */
  5405 +export interface PostServiceInvoiceQueryInvoiceDetailResponse {
  5406 + /**
  5407 + * @description
  5408 + * OK
  5409 + */
  5410 + 200: ServerResult;
  5411 + /**
  5412 + * @description
  5413 + * Created
  5414 + */
  5415 + 201: any;
  5416 + /**
  5417 + * @description
  5418 + * Unauthorized
  5419 + */
  5420 + 401: any;
  5421 + /**
  5422 + * @description
  5423 + * Forbidden
  5424 + */
  5425 + 403: any;
  5426 + /**
  5427 + * @description
  5428 + * Not Found
  5429 + */
  5430 + 404: any;
  5431 +}
  5432 +
  5433 +export type PostServiceInvoiceQueryInvoiceDetailResponseSuccess =
  5434 + PostServiceInvoiceQueryInvoiceDetailResponse[200];
  5435 +/**
  5436 + * @description
  5437 + * 查看发票详情
  5438 + * @tags 发票
  5439 + * @produces *
  5440 + * @consumes application/json
  5441 + */
  5442 +export const postServiceInvoiceQueryInvoiceDetail = /* #__PURE__ */ (() => {
  5443 + const method = 'post';
  5444 + const url = '/service/invoice/queryInvoiceDetail';
  5445 + function request(
  5446 + option: PostServiceInvoiceQueryInvoiceDetailOption,
  5447 + ): Promise<PostServiceInvoiceQueryInvoiceDetailResponseSuccess> {
  5448 + return requester(request.url, {
  5449 + method: request.method,
  5450 + ...option,
  5451 + }) as unknown as Promise<PostServiceInvoiceQueryInvoiceDetailResponseSuccess>;
  5452 + }
  5453 +
  5454 + /** http method */
  5455 + request.method = method;
  5456 + /** request url */
  5457 + request.url = url;
  5458 + return request;
  5459 +})();
  5460 +
5046 5461 /** @description request parameter type for postServiceOrderAddOrder */
5047 5462 export interface PostServiceOrderAddOrderOption {
5048 5463 /**
... ...