Commit 80202e208e23036be7b553e5b8d154917460a327

Authored by zhongnanhuang
1 parent 9ff0477b

feat: update 合并开票,编辑后新增回显优化

src/pages/Order/components/ApplyForInvoicingModal.tsx
1 import { RESPONSE_CODE } from '@/constants/enum'; 1 import { RESPONSE_CODE } from '@/constants/enum';
2 -import { postServiceOrderApplyInvoicing } from '@/services'; 2 +import {
  3 + postServiceOrderApplyInvoicing,
  4 + postServiceOrderMergeApplyInvoicing,
  5 +} from '@/services';
3 import { getAliYunOSSFileNameFromUrl } from '@/utils'; 6 import { getAliYunOSSFileNameFromUrl } from '@/utils';
4 import { 7 import {
5 ModalForm, 8 ModalForm,
@@ -8,20 +11,34 @@ import { @@ -8,20 +11,34 @@ import {
8 } from '@ant-design/pro-components'; 11 } from '@ant-design/pro-components';
9 import { Form, message } from 'antd'; 12 import { Form, message } from 'antd';
10 import { cloneDeep } from 'lodash'; 13 import { cloneDeep } from 'lodash';
11 -export default ({ setCheckVisible, isEdit, subOrders, onClose }) => {  
12 - const subOrder = cloneDeep(subOrders[0]);  
13 - let newListAnnex = subOrder.afterAnnexList?.map((path) => {  
14 - let i = 0;  
15 - return {  
16 - uid: i++,  
17 - name: getAliYunOSSFileNameFromUrl(path),  
18 - status: 'uploaded',  
19 - url: path,  
20 - response: { data: [path] },  
21 - };  
22 - }); 14 +export default ({ setCheckVisible, isEdit, data, isMainOrder, onClose }) => {
  15 + console.log(data);
  16 + let ids = data?.map((item) => item.id);
  17 + let newListAnnex = [];
  18 + let subOrder = {};
  19 +
  20 + //回显,子订单可以编辑备注跟附件
  21 + if (!isMainOrder) {
  22 + if (isEdit) {
  23 + subOrder = cloneDeep(data[0]);
  24 + newListAnnex = subOrder.afterAnnexList?.map((path) => {
  25 + let i = 0;
  26 + return {
  27 + uid: i++,
  28 + name: getAliYunOSSFileNameFromUrl(path),
  29 + status: 'uploaded',
  30 + url: path,
  31 + response: { data: [path] },
  32 + };
  33 + });
  34 + subOrder.filePaths = newListAnnex;
  35 + }
  36 + }
23 37
24 - subOrder.filePaths = newListAnnex; 38 + //拼接主订单id
  39 + if (isMainOrder) {
  40 + subOrder.applyInvoicingNotes = ids.join(',');
  41 + }
25 42
26 const [form] = Form.useForm<{ 43 const [form] = Form.useForm<{
27 applyInvoicingNotes: string; 44 applyInvoicingNotes: string;
@@ -29,7 +46,6 @@ export default ({ setCheckVisible, isEdit, subOrders, onClose }) =&gt; { @@ -29,7 +46,6 @@ export default ({ setCheckVisible, isEdit, subOrders, onClose }) =&gt; {
29 subIds: any[]; 46 subIds: any[];
30 afterInvoicingUpdate: boolean; 47 afterInvoicingUpdate: boolean;
31 }>(); 48 }>();
32 - let subOrderIds = subOrders?.map((subOrder) => subOrder.id);  
33 49
34 return ( 50 return (
35 <ModalForm<{ 51 <ModalForm<{
@@ -59,23 +75,36 @@ export default ({ setCheckVisible, isEdit, subOrders, onClose }) =&gt; { @@ -59,23 +75,36 @@ export default ({ setCheckVisible, isEdit, subOrders, onClose }) =&gt; {
59 }} 75 }}
60 submitTimeout={2000} 76 submitTimeout={2000}
61 onFinish={async (values) => { 77 onFinish={async (values) => {
62 - values.subIds = subOrderIds; 78 + values.subIds = ids;
63 //附件处理 79 //附件处理
64 values.filePaths = values.filePaths?.map((item) => { 80 values.filePaths = values.filePaths?.map((item) => {
65 return { url: item.response.data[0] }; 81 return { url: item.response.data[0] };
66 }); 82 });
67 83
68 - if (isEdit) {  
69 - values.afterInvoicingUpdate = true; 84 + if (isMainOrder) {
  85 + const res = await postServiceOrderMergeApplyInvoicing({
  86 + data: {
  87 + ...values,
  88 + mainOrderIds: ids,
  89 + },
  90 + });
  91 + if (res.result === RESPONSE_CODE.SUCCESS) {
  92 + message.success(res.message);
  93 + onClose();
  94 + }
70 } else { 95 } else {
71 - values.afterInvoicingUpdate = false;  
72 - } 96 + if (isEdit) {
  97 + values.afterInvoicingUpdate = true;
  98 + } else {
  99 + values.afterInvoicingUpdate = false;
  100 + }
73 101
74 - const res = await postServiceOrderApplyInvoicing({ data: values }); 102 + const res = await postServiceOrderApplyInvoicing({ data: values });
75 103
76 - if (res.result === RESPONSE_CODE.SUCCESS) {  
77 - message.success(res.message);  
78 - onClose(); 104 + if (res.result === RESPONSE_CODE.SUCCESS) {
  105 + message.success(res.message);
  106 + onClose();
  107 + }
79 } 108 }
80 }} 109 }}
81 onOpenChange={setCheckVisible} 110 onOpenChange={setCheckVisible}
src/pages/Order/components/FinancialEditDrawer.tsx
@@ -12,7 +12,7 @@ import { Form, message } from &#39;antd&#39;; @@ -12,7 +12,7 @@ import { Form, message } from &#39;antd&#39;;
12 import { useEffect, useState } from 'react'; 12 import { useEffect, useState } from 'react';
13 import { INVOCING_STATUS_OPTIONS_OLD } from '../constant'; 13 import { INVOCING_STATUS_OPTIONS_OLD } from '../constant';
14 14
15 -export default ({ mainOrder, subOrders, setVisible, onClose }) => { 15 +export default ({ mainOrder, subOrders, setVisible, isMainOrder, onClose }) => {
16 const [invoicingStatus, setInvoicingStatus] = useState(''); 16 const [invoicingStatus, setInvoicingStatus] = useState('');
17 useEffect(() => { 17 useEffect(() => {
18 setInvoicingStatus(subOrders[0]?.invoicingStatus); 18 setInvoicingStatus(subOrders[0]?.invoicingStatus);
@@ -33,7 +33,7 @@ export default ({ mainOrder, subOrders, setVisible, onClose }) =&gt; { @@ -33,7 +33,7 @@ export default ({ mainOrder, subOrders, setVisible, onClose }) =&gt; {
33 subIds: []; 33 subIds: [];
34 }> 34 }>
35 open 35 open
36 - title="收款时间" 36 + title={isMainOrder ? '编辑开票信息' : '编辑收款时间'}
37 resize={{ 37 resize={{
38 onResize() { 38 onResize() {
39 console.log('resize!'); 39 console.log('resize!');
@@ -41,7 +41,7 @@ export default ({ mainOrder, subOrders, setVisible, onClose }) =&gt; { @@ -41,7 +41,7 @@ export default ({ mainOrder, subOrders, setVisible, onClose }) =&gt; {
41 maxWidth: window.innerWidth * 0.8, 41 maxWidth: window.innerWidth * 0.8,
42 minWidth: 400, 42 minWidth: 400,
43 }} 43 }}
44 - initialValues={subOrders[0]} 44 + initialValues={mainOrder}
45 form={form} 45 form={form}
46 autoFocusFirstInput 46 autoFocusFirstInput
47 drawerProps={{ 47 drawerProps={{
@@ -65,17 +65,22 @@ export default ({ mainOrder, subOrders, setVisible, onClose }) =&gt; { @@ -65,17 +65,22 @@ export default ({ mainOrder, subOrders, setVisible, onClose }) =&gt; {
65 return !val && setVisible(val); 65 return !val && setVisible(val);
66 }} 66 }}
67 > 67 >
68 - <ProFormSelect  
69 - placeholder="选择是否需要开票"  
70 - name="invoicingStatus"  
71 - width="lg"  
72 - label="是否需要开票"  
73 - options={enumToSelect(INVOCING_STATUS_OPTIONS_OLD)}  
74 - onChange={setInvoicingStatus}  
75 - initialValue={subOrders[0]?.invoicingStatus}  
76 - // disabled={mainInfoDisbled}  
77 - rules={[{ required: true, message: '是否需要开票必填' }]}  
78 - /> 68 + {isMainOrder ? (
  69 + <ProFormSelect
  70 + placeholder="选择是否需要开票"
  71 + name="invoicingStatus"
  72 + width="lg"
  73 + label="是否需要开票"
  74 + options={enumToSelect(INVOCING_STATUS_OPTIONS_OLD)}
  75 + onChange={setInvoicingStatus}
  76 + initialValue={subOrders[0]?.invoicingStatus}
  77 + // disabled={mainInfoDisbled}
  78 + rules={[{ required: true, message: '是否需要开票必填' }]}
  79 + />
  80 + ) : (
  81 + ''
  82 + )}
  83 +
79 {invoicingStatus !== 'UN_INVOICE' ? ( 84 {invoicingStatus !== 'UN_INVOICE' ? (
80 <> 85 <>
81 <ProFormText 86 <ProFormText
@@ -112,7 +117,7 @@ export default ({ mainOrder, subOrders, setVisible, onClose }) =&gt; { @@ -112,7 +117,7 @@ export default ({ mainOrder, subOrders, setVisible, onClose }) =&gt; {
112 label="开收据时间" 117 label="开收据时间"
113 rules={[ 118 rules={[
114 { 119 {
115 - required: invoicingStatus === 'UN_INVOICE', 120 + required: !isMainOrder && invoicingStatus === 'UN_INVOICE',
116 message: '开收据时间必填', 121 message: '开收据时间必填',
117 }, 122 },
118 ]} 123 ]}
@@ -124,7 +129,7 @@ export default ({ mainOrder, subOrders, setVisible, onClose }) =&gt; { @@ -124,7 +129,7 @@ export default ({ mainOrder, subOrders, setVisible, onClose }) =&gt; {
124 label="收款时间" 129 label="收款时间"
125 rules={[ 130 rules={[
126 { 131 {
127 - required: invoicingStatus === 'UN_INVOICE', 132 + required: !isMainOrder && invoicingStatus === 'UN_INVOICE',
128 message: '收款时间必填', 133 message: '收款时间必填',
129 }, 134 },
130 ]} 135 ]}
src/pages/Order/components/OrderDrawer.tsx
@@ -3,6 +3,7 @@ import { @@ -3,6 +3,7 @@ import {
3 postServiceOrderAddOrder, 3 postServiceOrderAddOrder,
4 postServiceOrderQueryCustomerNameInformation, 4 postServiceOrderQueryCustomerNameInformation,
5 postServiceOrderQueryProductInformation, 5 postServiceOrderQueryProductInformation,
  6 + postServiceOrderQuerySalesCode,
6 postServiceOrderUpdateOrder, 7 postServiceOrderUpdateOrder,
7 } from '@/services'; 8 } from '@/services';
8 import { 9 import {
@@ -31,11 +32,11 @@ import { @@ -31,11 +32,11 @@ import {
31 PAYMENT_CHANNEL_OPTIONS, 32 PAYMENT_CHANNEL_OPTIONS,
32 PAYMENT_METHOD_OPTIONS, 33 PAYMENT_METHOD_OPTIONS,
33 PRODUCT_BELONG_DEPARTMENT_OPTIONS, 34 PRODUCT_BELONG_DEPARTMENT_OPTIONS,
34 - SALES_CODE_OPTIONS,  
35 } from '../constant'; 35 } from '../constant';
36 36
37 export default ({ onClose, data, subOrders, orderOptType }) => { 37 export default ({ onClose, data, subOrders, orderOptType }) => {
38 const [invoicingStatus, setInvoicingStatus] = useState(''); 38 const [invoicingStatus, setInvoicingStatus] = useState('');
  39 + const [salesCodeOptions, setSalesCodeOptions] = useState([]);
39 let originSubOrders = cloneDeep(subOrders); 40 let originSubOrders = cloneDeep(subOrders);
40 /** 41 /**
41 * 获取当前的操作类型boolean值 42 * 获取当前的操作类型boolean值
@@ -58,12 +59,25 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -58,12 +59,25 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
58 59
59 const fileList: any = []; 60 const fileList: any = [];
60 61
  62 + const getSalesCodeOptions = async () => {
  63 + const { data } = await postServiceOrderQuerySalesCode();
  64 + let options = data?.map((item) => {
  65 + return { label: item.userName, value: item.userName };
  66 + });
  67 + setSalesCodeOptions(options);
  68 + };
  69 +
  70 + useEffect(() => {
  71 + getSalesCodeOptions();
  72 + }, []);
  73 +
61 useEffect(() => { 74 useEffect(() => {
62 // 在组件挂载或数据变化时,更新组件状态 75 // 在组件挂载或数据变化时,更新组件状态
63 if (data) { 76 if (data) {
64 setInvoicingStatus(data.invoicingStatus); 77 setInvoicingStatus(data.invoicingStatus);
65 } 78 }
66 }, [data]); 79 }, [data]);
  80 +
67 // let mainInfoDisbled = optType('edit'); 81 // let mainInfoDisbled = optType('edit');
68 if (optType('edit') || optType('copy')) { 82 if (optType('edit') || optType('copy')) {
69 //如果是复制,需要开票,不回显是否需要开票字段 83 //如果是复制,需要开票,不回显是否需要开票字段
@@ -135,6 +149,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -135,6 +149,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
135 }, 149 },
136 ]; 150 ];
137 }>(); 151 }>();
  152 +
138 const actionRef = useRef< 153 const actionRef = useRef<
139 FormListActionType<{ 154 FormListActionType<{
140 name: string; 155 name: string;
@@ -143,6 +158,10 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -143,6 +158,10 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
143 158
144 useEffect(() => { 159 useEffect(() => {
145 form.setFieldsValue({ ...data }); 160 form.setFieldsValue({ ...data });
  161 + //如果是新建,需要清空list
  162 + if (optType('add')) {
  163 + form.resetFields(['list']);
  164 + }
146 }, [data]); 165 }, [data]);
147 166
148 /** 167 /**
@@ -217,13 +236,6 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -217,13 +236,6 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
217 open 236 open
218 width="35%" 237 width="35%"
219 title={optType('add') || optType('copy') ? '新建订单' : '修改订单'} 238 title={optType('add') || optType('copy') ? '新建订单' : '修改订单'}
220 - initialValues={() => {  
221 - //编辑和复制回显数据  
222 - if (optType('edit') || optType('copy')) {  
223 - return data;  
224 - }  
225 - return {};  
226 - }}  
227 resize={{ 239 resize={{
228 onResize() { 240 onResize() {
229 console.log('resize!'); 241 console.log('resize!');
@@ -300,8 +312,8 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -300,8 +312,8 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
300 showSearch 312 showSearch
301 label="销售代表" 313 label="销售代表"
302 placeholder="请输入销售代表" 314 placeholder="请输入销售代表"
303 - options={SALES_CODE_OPTIONS}  
304 rules={[{ required: true, message: '销售代表必填' }]} 315 rules={[{ required: true, message: '销售代表必填' }]}
  316 + options={salesCodeOptions}
305 // disabled={mainInfoDisbled} 317 // disabled={mainInfoDisbled}
306 /> 318 />
307 <ProFormSelect 319 <ProFormSelect
src/pages/Order/index.tsx
@@ -84,10 +84,12 @@ const OrderPage = () =&gt; { @@ -84,10 +84,12 @@ const OrderPage = () =&gt; {
84 const [orderDrawerVisible, setOrderDrawerVisible] = useState<boolean>(false); 84 const [orderDrawerVisible, setOrderDrawerVisible] = useState<boolean>(false);
85 const [checkVisible, setCheckVisible] = useState<boolean>(false); 85 const [checkVisible, setCheckVisible] = useState<boolean>(false);
86 const [orderPrintVisible, setOrderPrintVisible] = useState<boolean>(false); 86 const [orderPrintVisible, setOrderPrintVisible] = useState<boolean>(false);
  87 + const [allMainChecked, setAllMainChecked] = useState(false);
87 const [ 88 const [
88 subOrderConfirmReceiptImagesVisible, 89 subOrderConfirmReceiptImagesVisible,
89 setSubOrderConfirmReceiptImagesVisible, 90 setSubOrderConfirmReceiptImagesVisible,
90 ] = useState<boolean>(false); 91 ] = useState<boolean>(false);
  92 + const [data, setData] = useState([]); //列表数据
91 const [notesEditVisible, setNotesEditVisible] = useState<boolean>(false); 93 const [notesEditVisible, setNotesEditVisible] = useState<boolean>(false);
92 const [attachmentModalVisible, setAttachmentModalVisible] = 94 const [attachmentModalVisible, setAttachmentModalVisible] =
93 useState<boolean>(false); 95 useState<boolean>(false);
@@ -294,11 +296,39 @@ const OrderPage = () =&gt; { @@ -294,11 +296,39 @@ const OrderPage = () =&gt; {
294 setExpandedRowKeys(mainOrderIds); 296 setExpandedRowKeys(mainOrderIds);
295 }; 297 };
296 298
  299 + const allMainCheckBoxChange = () => {
  300 + let checked = !allMainChecked;
  301 + setAllMainChecked(checked);
  302 + if (checked) {
  303 + let mainOrderIds = data?.map((item) => {
  304 + return item.id;
  305 + });
  306 +
  307 + let rowObjs = data?.map((item) => {
  308 + let id = item.id;
  309 + let rowObj: any = {};
  310 + rowObj[id] = item;
  311 + return rowObj;
  312 + });
  313 + setSelectedItems(mainOrderIds);
  314 + setSelectedRowObj(rowObjs);
  315 + } else {
  316 + setSelectedItems([]);
  317 + setSelectedRowObj([]);
  318 + }
  319 + };
  320 +
297 //表头渲染 321 //表头渲染
298 const OrderTableHeader = () => { 322 const OrderTableHeader = () => {
299 return ( 323 return (
300 <Flex className="w-full"> 324 <Flex className="w-full">
301 - <Flex className="w-[29%] ml-[4%]"> 325 + <Flex className="w-[1%] ml-[7px]">
  326 + <Checkbox
  327 + onChange={allMainCheckBoxChange}
  328 + checked={allMainChecked}
  329 + ></Checkbox>
  330 + </Flex>
  331 + <Flex className="w-[30%] ml-[1%]">
302 <span className="font-medium">商品信息</span> 332 <span className="font-medium">商品信息</span>
303 </Flex> 333 </Flex>
304 <Flex className="w-[13%]"> 334 <Flex className="w-[13%]">
@@ -526,7 +556,10 @@ const OrderPage = () =&gt; { @@ -526,7 +556,10 @@ const OrderPage = () =&gt; {
526 title={optRecord.quantity} 556 title={optRecord.quantity}
527 > 557 >
528 <span className="text-[#8C8C8C]">数量:</span> 558 <span className="text-[#8C8C8C]">数量:</span>
529 - <span className="text-slate-700">x{optRecord.quantity}</span> 559 + <span className="text-slate-700">
  560 + x{optRecord.quantity + ' '}
  561 + </span>
  562 + <span className="text-[#8C8C8C]">{optRecord.unit}</span>
530 </div> 563 </div>
531 <div 564 <div
532 className="overflow-hidden whitespace-no-wrap overflow-ellipsis" 565 className="overflow-hidden whitespace-no-wrap overflow-ellipsis"
@@ -874,6 +907,7 @@ const OrderPage = () =&gt; { @@ -874,6 +907,7 @@ const OrderPage = () =&gt; {
874 setApplyForInvoicingVisible(true); 907 setApplyForInvoicingVisible(true);
875 setSelectedRows([optRecord]); 908 setSelectedRows([optRecord]);
876 setIsEdit(false); 909 setIsEdit(false);
  910 + setIsMainOrder(false);
877 }} 911 }}
878 > 912 >
879 申请开票 913 申请开票
@@ -1641,6 +1675,24 @@ const OrderPage = () =&gt; { @@ -1641,6 +1675,24 @@ const OrderPage = () =&gt; {
1641 '' 1675 ''
1642 )} 1676 )}
1643 1677
  1678 + {record.mainPath?.includes('noNeedInvoicingEdit') ? (
  1679 + <Button
  1680 + className="p-0"
  1681 + type="link"
  1682 + onClick={() => {
  1683 + let selectedSubOrders = record.subOrderInformationLists;
  1684 + setFinancialEditVisible(true);
  1685 + setSelectedRows(selectedSubOrders);
  1686 + setOrderRow(record);
  1687 + setIsMainOrder(true);
  1688 + }}
  1689 + >
  1690 + 财务编辑
  1691 + </Button>
  1692 + ) : (
  1693 + ''
  1694 + )}
  1695 +
1644 {record.mainPath?.includes('checkOrder') ? ( 1696 {record.mainPath?.includes('checkOrder') ? (
1645 <Button 1697 <Button
1646 className="p-0" 1698 className="p-0"
@@ -2106,6 +2158,28 @@ const OrderPage = () =&gt; { @@ -2106,6 +2158,28 @@ const OrderPage = () =&gt; {
2106 onClick: () => {}, 2158 onClick: () => {},
2107 }; 2159 };
2108 2160
  2161 + if (rolePath?.includes('mergeApplyInvoicing')) {
  2162 + toolBtns.push(
  2163 + <Button
  2164 + type="primary"
  2165 + key="out"
  2166 + onClick={() => {
  2167 + setApplyForInvoicingVisible(true);
  2168 + //选中订单
  2169 + let rows = selectedRowObj?.map((item) => {
  2170 + return Object.values(item)[0];
  2171 + });
  2172 + setSelectedRows(rows);
  2173 + setIsEdit(false);
  2174 + setIsMainOrder(true);
  2175 + }}
  2176 + disabled={selectedItems?.length === 0}
  2177 + >
  2178 + 合并开票
  2179 + </Button>,
  2180 + );
  2181 + }
  2182 +
2109 if (rolePath?.includes('addOrder')) { 2183 if (rolePath?.includes('addOrder')) {
2110 toolBtns.push( 2184 toolBtns.push(
2111 <Button 2185 <Button
@@ -2120,6 +2194,7 @@ const OrderPage = () =&gt; { @@ -2120,6 +2194,7 @@ const OrderPage = () =&gt; {
2120 </Button>, 2194 </Button>,
2121 ); 2195 );
2122 } 2196 }
  2197 +
2123 if (rolePath?.includes('importExcel')) { 2198 if (rolePath?.includes('importExcel')) {
2124 toolBtns.push( 2199 toolBtns.push(
2125 <Button 2200 <Button
@@ -2276,6 +2351,7 @@ const OrderPage = () =&gt; { @@ -2276,6 +2351,7 @@ const OrderPage = () =&gt; {
2276 } 2351 }
2277 setRolePath(data.specialPath); 2352 setRolePath(data.specialPath);
2278 handleTableExpand(mainOrderIds); 2353 handleTableExpand(mainOrderIds);
  2354 + setData(data?.data);
2279 return { 2355 return {
2280 data: data?.data || [], 2356 data: data?.data || [],
2281 total: data?.total || 0, 2357 total: data?.total || 0,
@@ -2319,7 +2395,8 @@ const OrderPage = () =&gt; { @@ -2319,7 +2395,8 @@ const OrderPage = () =&gt; {
2319 {applyForInvoicingVisible && ( 2395 {applyForInvoicingVisible && (
2320 <ApplyForInvoicingModal 2396 <ApplyForInvoicingModal
2321 setCheckVisible={setApplyForInvoicingVisible} 2397 setCheckVisible={setApplyForInvoicingVisible}
2322 - subOrders={selectedRows} 2398 + data={selectedRows}
  2399 + isMainOrder={isMainOrder}
2323 isEdit={isEdit} 2400 isEdit={isEdit}
2324 onClose={() => { 2401 onClose={() => {
2325 setApplyForInvoicingVisible(false); 2402 setApplyForInvoicingVisible(false);
@@ -2385,6 +2462,7 @@ const OrderPage = () =&gt; { @@ -2385,6 +2462,7 @@ const OrderPage = () =&gt; {
2385 <FinancialEditDrawer 2462 <FinancialEditDrawer
2386 mainOrder={orderRow} 2463 mainOrder={orderRow}
2387 subOrders={selectedRows} 2464 subOrders={selectedRows}
  2465 + isMainOrder={isMainOrder}
2388 setVisible={() => { 2466 setVisible={() => {
2389 setFinancialEditVisible(false); 2467 setFinancialEditVisible(false);
2390 setIsMainOrder(false); 2468 setIsMainOrder(false);
src/pages/OrderReport/index.tsx
@@ -144,6 +144,7 @@ const OrderReportPage = () =&gt; { @@ -144,6 +144,7 @@ const OrderReportPage = () =&gt; {
144 split 144 split
145 className="!p-0 order-statistic-search" 145 className="!p-0 order-statistic-search"
146 labelWidth="auto" 146 labelWidth="auto"
  147 + defaultCollapsed={false}
147 form={form} 148 form={form}
148 onFinish={async () => { 149 onFinish={async () => {
149 loadData(); 150 loadData();
src/services/definition.ts
@@ -834,6 +834,13 @@ export interface QueryMainOrderDto { @@ -834,6 +834,13 @@ export interface QueryMainOrderDto {
834 export interface QueryReportFormsDto { 834 export interface QueryReportFormsDto {
835 /** 835 /**
836 * @description 836 * @description
  837 + * 最大金额
  838 + * @example
  839 + * 2343
  840 + */
  841 + maxAccount?: number;
  842 + /**
  843 + * @description
837 * 所属部门 844 * 所属部门
838 */ 845 */
839 productBelongBusiness?: string; 846 productBelongBusiness?: string;
src/services/request.ts
@@ -5854,6 +5854,82 @@ export const postServiceOrderInvoicing = /* #__PURE__ */ (() =&gt; { @@ -5854,6 +5854,82 @@ export const postServiceOrderInvoicing = /* #__PURE__ */ (() =&gt; {
5854 return request; 5854 return request;
5855 })(); 5855 })();
5856 5856
  5857 +/** @description request parameter type for postServiceOrderMergeApplyInvoicing */
  5858 +export interface PostServiceOrderMergeApplyInvoicingOption {
  5859 + /**
  5860 + * @description
  5861 + * 销售发起开票备注
  5862 + */
  5863 + query?: {
  5864 + /**
  5865 + @description
  5866 + 销售发起开票备注 */
  5867 + applyInvoicingNotes?: string;
  5868 + 'filePaths[0].url'?: string;
  5869 + /**
  5870 + @description
  5871 + 主订单id集合 */
  5872 + mainOrderIds?: Array<number>;
  5873 + };
  5874 +}
  5875 +
  5876 +/** @description response type for postServiceOrderMergeApplyInvoicing */
  5877 +export interface PostServiceOrderMergeApplyInvoicingResponse {
  5878 + /**
  5879 + * @description
  5880 + * OK
  5881 + */
  5882 + 200: ServerResult;
  5883 + /**
  5884 + * @description
  5885 + * Created
  5886 + */
  5887 + 201: any;
  5888 + /**
  5889 + * @description
  5890 + * Unauthorized
  5891 + */
  5892 + 401: any;
  5893 + /**
  5894 + * @description
  5895 + * Forbidden
  5896 + */
  5897 + 403: any;
  5898 + /**
  5899 + * @description
  5900 + * Not Found
  5901 + */
  5902 + 404: any;
  5903 +}
  5904 +
  5905 +export type PostServiceOrderMergeApplyInvoicingResponseSuccess =
  5906 + PostServiceOrderMergeApplyInvoicingResponse[200];
  5907 +/**
  5908 + * @description
  5909 + * 合并申请开票
  5910 + * @tags 内部订单
  5911 + * @produces *
  5912 + * @consumes application/json
  5913 + */
  5914 +export const postServiceOrderMergeApplyInvoicing = /* #__PURE__ */ (() => {
  5915 + const method = 'post';
  5916 + const url = '/service/order/mergeApplyInvoicing';
  5917 + function request(
  5918 + option?: PostServiceOrderMergeApplyInvoicingOption,
  5919 + ): Promise<PostServiceOrderMergeApplyInvoicingResponseSuccess> {
  5920 + return requester(request.url, {
  5921 + method: request.method,
  5922 + ...option,
  5923 + }) as unknown as Promise<PostServiceOrderMergeApplyInvoicingResponseSuccess>;
  5924 + }
  5925 +
  5926 + /** http method */
  5927 + request.method = method;
  5928 + /** request url */
  5929 + request.url = url;
  5930 + return request;
  5931 +})();
  5932 +
5857 /** @description request parameter type for postServiceOrderNoNeedInvoicingEdit */ 5933 /** @description request parameter type for postServiceOrderNoNeedInvoicingEdit */
5858 export interface PostServiceOrderNoNeedInvoicingEditOption { 5934 export interface PostServiceOrderNoNeedInvoicingEditOption {
5859 /** 5935 /**
@@ -7487,6 +7563,60 @@ export const postServiceOrderQueryReportFormsInformation = @@ -7487,6 +7563,60 @@ export const postServiceOrderQueryReportFormsInformation =
7487 return request; 7563 return request;
7488 })(); 7564 })();
7489 7565
  7566 +/** @description response type for postServiceOrderQuerySalesCode */
  7567 +export interface PostServiceOrderQuerySalesCodeResponse {
  7568 + /**
  7569 + * @description
  7570 + * OK
  7571 + */
  7572 + 200: ServerResult;
  7573 + /**
  7574 + * @description
  7575 + * Created
  7576 + */
  7577 + 201: any;
  7578 + /**
  7579 + * @description
  7580 + * Unauthorized
  7581 + */
  7582 + 401: any;
  7583 + /**
  7584 + * @description
  7585 + * Forbidden
  7586 + */
  7587 + 403: any;
  7588 + /**
  7589 + * @description
  7590 + * Not Found
  7591 + */
  7592 + 404: any;
  7593 +}
  7594 +
  7595 +export type PostServiceOrderQuerySalesCodeResponseSuccess =
  7596 + PostServiceOrderQuerySalesCodeResponse[200];
  7597 +/**
  7598 + * @description
  7599 + * 查询销售代码
  7600 + * @tags 内部订单
  7601 + * @produces *
  7602 + * @consumes application/json
  7603 + */
  7604 +export const postServiceOrderQuerySalesCode = /* #__PURE__ */ (() => {
  7605 + const method = 'post';
  7606 + const url = '/service/order/querySalesCode';
  7607 + function request(): Promise<PostServiceOrderQuerySalesCodeResponseSuccess> {
  7608 + return requester(request.url, {
  7609 + method: request.method,
  7610 + }) as unknown as Promise<PostServiceOrderQuerySalesCodeResponseSuccess>;
  7611 + }
  7612 +
  7613 + /** http method */
  7614 + request.method = method;
  7615 + /** request url */
  7616 + request.url = url;
  7617 + return request;
  7618 +})();
  7619 +
7490 /** @description request parameter type for postServiceOrderQueryServiceOrder */ 7620 /** @description request parameter type for postServiceOrderQueryServiceOrder */
7491 export interface PostServiceOrderQueryServiceOrderOption { 7621 export interface PostServiceOrderQueryServiceOrderOption {
7492 /** 7622 /**
@@ -7825,60 +7955,6 @@ export const postServiceOrderSupplierSendOrder = /* #__PURE__ */ (() =&gt; { @@ -7825,60 +7955,6 @@ export const postServiceOrderSupplierSendOrder = /* #__PURE__ */ (() =&gt; {
7825 return request; 7955 return request;
7826 })(); 7956 })();
7827 7957
7828 -/** @description response type for postServiceOrderTest */  
7829 -export interface PostServiceOrderTestResponse {  
7830 - /**  
7831 - * @description  
7832 - * OK  
7833 - */  
7834 - 200: ServerResult;  
7835 - /**  
7836 - * @description  
7837 - * Created  
7838 - */  
7839 - 201: any;  
7840 - /**  
7841 - * @description  
7842 - * Unauthorized  
7843 - */  
7844 - 401: any;  
7845 - /**  
7846 - * @description  
7847 - * Forbidden  
7848 - */  
7849 - 403: any;  
7850 - /**  
7851 - * @description  
7852 - * Not Found  
7853 - */  
7854 - 404: any;  
7855 -}  
7856 -  
7857 -export type PostServiceOrderTestResponseSuccess =  
7858 - PostServiceOrderTestResponse[200];  
7859 -/**  
7860 - * @description  
7861 - * 测试  
7862 - * @tags 内部订单  
7863 - * @produces *  
7864 - * @consumes application/json  
7865 - */  
7866 -export const postServiceOrderTest = /* #__PURE__ */ (() => {  
7867 - const method = 'post';  
7868 - const url = '/service/order/test';  
7869 - function request(): Promise<PostServiceOrderTestResponseSuccess> {  
7870 - return requester(request.url, {  
7871 - method: request.method,  
7872 - }) as unknown as Promise<PostServiceOrderTestResponseSuccess>;  
7873 - }  
7874 -  
7875 - /** http method */  
7876 - request.method = method;  
7877 - /** request url */  
7878 - request.url = url;  
7879 - return request;  
7880 -})();  
7881 -  
7882 /** @description request parameter type for postServiceOrderUpdateAnnex */ 7958 /** @description request parameter type for postServiceOrderUpdateAnnex */
7883 export interface PostServiceOrderUpdateAnnexOption { 7959 export interface PostServiceOrderUpdateAnnexOption {
7884 /** 7960 /**