Commit 7ccd0e08 authored by 卢均锐's avatar 卢均锐

fix: [19761] 对账单明细不能选择不同的税率

parent 8787f73f
import React, { useState, useEffect, useMemo, useRef, useCallback } from 'react';
import { Row, Col, Input, Drawer, Table, Space, Typography, message, Button } from 'antd';
import React, { useState, useEffect, useRef } from 'react';
import { Drawer, Table, Typography, message, Button } from 'antd';
import { CaretRightOutlined, CaretDownOutlined } from '@ant-design/icons'
import { ColumnType } from 'antd/lib/table/interface';
import StandardTable from '@/components/StandardTable';
......@@ -342,6 +342,22 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
}
const _onOk = () => {
if (selectedRowKeys.length <= 0) {
message.error('请选择需要生成对账单的数据。');
return;
}
for (let item of selectedRows) {
if (item.payer !== selectedRows[0].payer) {
message.error('请选择相同付款方或相同税率的订单');
return;
}
}
for (let child of childSelectedRows) {
if (child.taxRate !== childSelectedRows[0].taxRate) {
message.error('请选择相同付款方或相同税率的订单');
return;
}
}
const _rows = [];
selectedRows.forEach((item) => {
item.products.forEach((child) => {
......@@ -350,6 +366,7 @@ const DetailDrawer: React.FC<DetailDrawerProps> = (props: DetailDrawerProps) =>
}
})
})
console.log(_rows)
onOk?.(_rows);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment