Commit fcef1d3beb54d68d2138d07ce3310127495908f4

Authored by zhongnanhuang
1 parent f2c9057f

feat: update 售后审核

src/pages/Order/components/CheckModal.tsx
... ... @@ -4,23 +4,14 @@ import {
4 4 postServiceOrderCheckOrder,
5 5 postServiceOrderFileProcess,
6 6 postServiceOrderFinanceCheckOrder,
7   - postServiceOrderQueryAfterSalesInfoSnapshot,
8 7 } from '@/services';
9 8 import { ModalForm, ProFormTextArea } from '@ant-design/pro-components';
10   -import { Button, Col, Form, Modal, Row, UploadFile, message } from 'antd';
  9 +import { Button, Form, Modal, UploadFile, message } from 'antd';
11 10 import Upload, { RcFile, UploadProps } from 'antd/es/upload';
12 11 import { useEffect, useRef, useState } from 'react';
13   -import {
14   - AFTE_SALES_PLAN_OPTIONS,
15   - CHECK_TYPE,
16   - COMFIR_RECEIPT_IMAGES_NUMBER,
17   -} from '../constant';
  12 +import { CHECK_TYPE, COMFIR_RECEIPT_IMAGES_NUMBER } from '../constant';
18 13 // import { cloneDeep } from 'lodash';
19   -import {
20   - enumValueToLabel,
21   - getAliYunOSSFileNameFromUrl,
22   - transImageFile,
23   -} from '@/utils';
  14 +import { transImageFile } from '@/utils';
24 15 import { PlusOutlined } from '@ant-design/icons';
25 16 import { cloneDeep } from 'lodash';
26 17 export default ({
... ... @@ -47,7 +38,7 @@ export default ({
47 38 const [form] = Form.useForm<{ name: string; company: string }>();
48 39 let subOrderIds: any[] = subOrders.map((subOrder) => subOrder.id);
49 40  
50   - const [afterSalesInfo, setAfterSalesInfo] = useState<any>();
  41 + // const [afterSalesInfo, setAfterSalesInfo] = useState<any>();
51 42  
52 43 /**
53 44 * 审核类型
... ... @@ -59,51 +50,51 @@ export default ({
59 50 return false;
60 51 }
61 52  
62   - const getOrderAfterSalesInfo = async () => {
63   - let res = await postServiceOrderQueryAfterSalesInfoSnapshot({
64   - data: { subOrderIds: subOrderIds },
65   - });
  53 + // const getOrderAfterSalesInfo = async () => {
  54 + // let res = await postServiceOrderQueryAfterSalesInfoSnapshot({
  55 + // data: { subOrderIds: subOrderIds },
  56 + // });
66 57  
67   - //附件
68   - let annex = res?.data[0]?.afterSalesAnnexList;
  58 + // //附件
  59 + // let annex = res?.data[0]?.afterSalesAnnexList;
69 60  
70   - let annexLinks = annex?.map((f) => {
71   - return (
72   - <Button type="link" key="key" href={f}>
73   - {getAliYunOSSFileNameFromUrl(f)}
74   - </Button>
75   - );
76   - });
  61 + // let annexLinks = annex?.map((f) => {
  62 + // return (
  63 + // <Button type="link" key="key" href={f}>
  64 + // {getAliYunOSSFileNameFromUrl(f)}
  65 + // </Button>
  66 + // );
  67 + // });
77 68  
78   - setAfterSalesInfo(
79   - <div className="my-5">
80   - <Row gutter={[16, 24]}>
81   - <Col span={6}>
82   - <span className="text-[#333333]">售后方案</span>
83   - </Col>
84   - <Col span={18}>
85   - {enumValueToLabel(
86   - res?.data[0]?.afterSalesPlan,
87   - AFTE_SALES_PLAN_OPTIONS,
88   - )}
89   - </Col>
90   - <Col span={6}>
91   - <span className="className='text-[#333333]'">修改后总金额</span>
92   - </Col>
93   - <Col span={18}>{res?.data[0]?.totalPayment}</Col>
  69 + // setAfterSalesInfo(
  70 + // <div className="my-5">
  71 + // <Row gutter={[16, 24]}>
  72 + // <Col span={6}>
  73 + // <span className="text-[#333333]">售后方案</span>
  74 + // </Col>
  75 + // <Col span={18}>
  76 + // {enumValueToLabel(
  77 + // res?.data[0]?.afterSalesPlan,
  78 + // AFTE_SALES_PLAN_OPTIONS,
  79 + // )}
  80 + // </Col>
  81 + // <Col span={6}>
  82 + // <span className="className='text-[#333333]'">修改后总金额</span>
  83 + // </Col>
  84 + // <Col span={18}>{res?.data[0]?.totalPayment}</Col>
94 85  
95   - <Col span={6}>
96   - <span className="className='text-[#333333]'">售后原因</span>
97   - </Col>
98   - <Col span={18}>{res?.data[0]?.afterSalesNotes}</Col>
99   - <Col span={6}>
100   - <span className="className='text-[#333333]'">附件</span>
101   - </Col>
102   - <Col span={18}>{annexLinks}</Col>
103   - </Row>
104   - </div>,
105   - );
106   - };
  86 + // <Col span={6}>
  87 + // <span className="className='text-[#333333]'">售后原因</span>
  88 + // </Col>
  89 + // <Col span={18}>{res?.data[0]?.afterSalesNotes}</Col>
  90 + // <Col span={6}>
  91 + // <span className="className='text-[#333333]'">附件</span>
  92 + // </Col>
  93 + // <Col span={18}>{annexLinks}</Col>
  94 + // </Row>
  95 + // </div>,
  96 + // );
  97 + // };
107 98  
108 99 const handleChange: UploadProps['onChange'] = ({ fileList: newFileList }) => {
109 100 //fileListObj得在change里变化,change的参数是已经处理过的file数组
... ... @@ -168,9 +159,9 @@ export default ({
168 159 };
169 160 useEffect(() => {
170 161 //回显售后信息
171   - if (checkType(CHECK_TYPE.AFTER_SALES)) {
172   - getOrderAfterSalesInfo();
173   - }
  162 + // if (checkType(CHECK_TYPE.AFTER_SALES)) {
  163 + // getOrderAfterSalesInfo();
  164 + // }
174 165  
175 166 document.addEventListener('paste', onPaste);
176 167 return () => {
... ...
src/pages/Order/components/FinancialDrawer.tsx
... ... @@ -8,13 +8,14 @@ import { enumToSelect } from &#39;@/utils&#39;;
8 8 import {
9 9 DrawerForm,
10 10 ProFormDatePicker,
  11 + ProFormDigit,
11 12 ProFormSelect,
12 13 ProFormText,
13 14 ProFormTextArea,
14 15 } from '@ant-design/pro-components';
15 16 import { Form, message } from 'antd';
16 17 import { useEffect, useState } from 'react';
17   -import { INVOCING_STATUS_OPTIONS_OLD } from '../constant';
  18 +import { INVOCING_STATUS_OPTIONS_OLD, PAYEE_OPTIONS } from '../constant';
18 19  
19 20 export default ({
20 21 mainOrder,
... ... @@ -141,31 +142,31 @@ export default ({
141 142 label="收款时间"
142 143 initialValue={subOrders[0]?.collectMoneyTime}
143 144 />,
144   - // <ProFormText
145   - // width="lg"
146   - // key="invoiceNumber"
147   - // name="invoiceNumber"
148   - // label="发票号码"
149   - // initialValue={subOrders[0]?.invoiceNumber}
150   - // />,
151   - // <ProFormSelect
152   - // key="payee"
153   - // placeholder="选择收款单位"
154   - // name="payee"
155   - // width="lg"
156   - // label="收款单位"
157   - // options={enumToSelect(PAYEE_OPTIONS)}
158   - // initialValue={subOrders[0]?.payee}
159   - // rules={[{ required: true, message: '收款单位必填' }]}
160   - // />,
  145 + <ProFormText
  146 + width="lg"
  147 + key="invoiceNumber"
  148 + name="invoiceNumber"
  149 + label="发票号码"
  150 + initialValue={subOrders[0]?.invoiceNumber}
  151 + />,
  152 + <ProFormSelect
  153 + key="payee"
  154 + placeholder="选择收款单位"
  155 + name="payee"
  156 + width="lg"
  157 + label="收款单位"
  158 + options={enumToSelect(PAYEE_OPTIONS)}
  159 + initialValue={subOrders[0]?.payee}
  160 + rules={[{ required: true, message: '收款单位必填' }]}
  161 + />,
161 162  
162   - // <ProFormDigit
163   - // key="money"
164   - // name="money"
165   - // width="lg"
166   - // label="金额"
167   - // rules={[{ required: true, message: '金额必填' }]}
168   - // />,
  163 + <ProFormDigit
  164 + key="money"
  165 + name="money"
  166 + width="lg"
  167 + label="金额"
  168 + rules={[{ required: true, message: '金额必填' }]}
  169 + />,
169 170 ]
170 171 : ''}
171 172  
... ...
src/pages/Order/components/OrderDrawer.tsx
1 1 import { RESPONSE_CODE } from '@/constants/enum';
2 2 import {
3 3 postServiceOrderAddOrder,
  4 + postServiceOrderAfterSalesQuerySnapshotOrder,
4 5 postServiceOrderApplyAfterSales,
5 6 postServiceOrderQueryCustomerNameInformation,
6 7 postServiceOrderQueryProductInformation,
... ... @@ -74,6 +75,8 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
74 75 ];
75 76 }>();
76 77  
  78 + let copyData = cloneDeep(data);
  79 +
77 80 let originSubOrders = cloneDeep(subOrders);
78 81 /**
79 82 * 获取当前的操作类型boolean值
... ... @@ -84,18 +87,8 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
84 87 }
85 88  
86 89 /**
87   - *
88   - * @returns 获取开票选项
  90 + * 获取销售代码枚举,在复制和编辑的时候判断是否为旧的代码
89 91 */
90   - function getInvoicingSelect() {
91   - if (optType('edit')) {
92   - return enumToSelect(INVOCING_STATUS_OPTIONS_OLD);
93   - }
94   - return enumToSelect(INVOCING_STATUS_OPTIONS);
95   - }
96   -
97   - const fileList: any = [];
98   -
99 92 const getSalesCodeOptions = async () => {
100 93 const res = await postServiceOrderQuerySalesCode();
101 94 let options = res.data?.map((item) => {
... ... @@ -107,7 +100,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
107 100 let includeFlag = false;
108 101 //销售代码校验,如果是旧的销售代码,则提示并清空
109 102 for (let option of options) {
110   - if (option.value === data.salesCode) {
  103 + if (option.value === copyData.salesCode) {
111 104 includeFlag = true;
112 105 }
113 106 }
... ... @@ -118,9 +111,94 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
118 111 }
119 112 };
120 113  
121   - useEffect(() => {
  114 + /**
  115 + * 构建回显数据
  116 + */
  117 + function buildOrderData() {
  118 + // let mainInfoDisbled = optType('edit');
  119 + if (!optType('add')) {
  120 + //如果是复制,需要开票,不回显是否需要开票字段
  121 + if (optType('copy')) {
  122 + if (copyData.invoicingStatus === 'INVOICED') {
  123 + copyData.invoicingStatus = undefined;
  124 +
  125 + //复制的时候,如果是不需要开票,要把开票信息清空
  126 + if (copyData.invoicingStatus === 'UN_INVOICE') {
  127 + copyData.invoiceIdentificationNumber = undefined;
  128 + }
  129 + }
  130 + }
  131 + //订单修改和新增的子订单列表命名是list
  132 + copyData.list = copyData.subOrderInformationLists;
  133 + //主订单事业部默认显示子订单第一条的事业部
  134 + copyData.productBelongBusiness = copyData.list[0].productBelongBusiness;
  135 + copyData.paymentMethod = copyData.list[0].paymentMethod;
  136 + copyData.paymentChannel = copyData.list[0].paymentChannel;
  137 + copyData.invoicingStatus = copyData.list[0].invoicingStatus;
  138 +
  139 + copyData.list = copyData.list?.map((item) => {
  140 + item.filePaths = item.listAnnex?.map((path) => {
  141 + let i = 0;
  142 + return {
  143 + uid: i++,
  144 + name: getAliYunOSSFileNameFromUrl(path),
  145 + status: 'uploaded',
  146 + url: path,
  147 + response: { data: [path] },
  148 + };
  149 + });
  150 + return item;
  151 + });
  152 + }
  153 +
  154 + if (subOrders !== undefined && subOrders.length > 0) {
  155 + copyData.list = subOrders;
  156 + }
  157 +
  158 + setInvoicingStatus(copyData.invoicingStatus);
  159 +
  160 + form.setFieldsValue({ ...copyData });
  161 + //如果是新建,需要清空list
  162 + if (optType('add')) {
  163 + form.resetFields(['list']);
  164 + }
  165 +
122 166 getSalesCodeOptions();
  167 + }
  168 +
  169 + async function getOldOrderData(id: any) {
  170 + let res = await postServiceOrderAfterSalesQuerySnapshotOrder({
  171 + data: {
  172 + mainOrderId: id,
  173 + },
  174 + });
  175 +
  176 + console.log(res);
  177 + copyData = res.data.mainOrder;
  178 + copyData.subOrderInformationLists = res.data.subOrders;
  179 + originSubOrders = res.data.subOrders;
  180 +
  181 + buildOrderData();
  182 + }
  183 +
  184 + if (optType('after-sales-check')) {
  185 + getOldOrderData(data.id);
  186 + }
  187 +
  188 + /**
  189 + *
  190 + * @returns 获取开票选项
  191 + */
  192 + function getInvoicingSelect() {
  193 + if (optType('edit') || optType('after-sales-check')) {
  194 + return enumToSelect(INVOCING_STATUS_OPTIONS_OLD);
  195 + }
  196 + return enumToSelect(INVOCING_STATUS_OPTIONS);
  197 + }
  198 +
  199 + const fileList: any = [];
123 200  
  201 + useEffect(() => {
124 202 //弹窗标题
125 203 if (optType('add')) {
126 204 setDrawerTitle('新增订单');
... ... @@ -134,54 +212,10 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
134 212 if (optType('after-sales')) {
135 213 setDrawerTitle('申请售后');
136 214 }
137   - }, []);
138   -
139   - useEffect(() => {
140   - // 在组件挂载或数据变化时,更新组件状态
141   - if (data) {
142   - setInvoicingStatus(data.invoicingStatus);
143   - }
144   - }, [data]);
145   -
146   - // let mainInfoDisbled = optType('edit');
147   - if (optType('edit') || optType('copy') || optType('after-sales')) {
148   - //如果是复制,需要开票,不回显是否需要开票字段
149   - if (optType('copy')) {
150   - if (data.invoicingStatus === 'INVOICED') {
151   - data.invoicingStatus = undefined;
152   - }
  215 + if (optType('after-sales-check')) {
  216 + setDrawerTitle('订单信息');
153 217 }
154   - //订单修改和新增的子订单列表命名是list
155   - data.list = data.subOrderInformationLists;
156   - //主订单事业部默认显示子订单第一条的事业部
157   - data.productBelongBusiness = data.list[0].productBelongBusiness;
158   - data.paymentMethod = data.list[0].paymentMethod;
159   - data.paymentChannel = data.list[0].paymentChannel;
160   - data.invoicingStatus = data.list[0].invoicingStatus;
161   -
162   - data.list = data.list?.map((item) => {
163   - item.filePaths = item.listAnnex?.map((path) => {
164   - let i = 0;
165   - return {
166   - uid: i++,
167   - name: getAliYunOSSFileNameFromUrl(path),
168   - status: 'uploaded',
169   - url: path,
170   - response: { data: [path] },
171   - };
172   - });
173   - return item;
174   - });
175   - }
176   -
177   - //复制的时候,如果是不需要开票,要把开票信息清空
178   - if (optType('copy') && data.invoicingStatus === 'UN_INVOICE') {
179   - data.invoiceIdentificationNumber = undefined;
180   - }
181   -
182   - if (subOrders !== undefined && subOrders.length > 0) {
183   - data.list = subOrders;
184   - }
  218 + }, []);
185 219  
186 220 const actionRef = useRef<
187 221 FormListActionType<{
... ... @@ -189,14 +223,6 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
189 223 }>
190 224 >();
191 225  
192   - useEffect(() => {
193   - form.setFieldsValue({ ...data });
194   - //如果是新建,需要清空list
195   - if (optType('add')) {
196   - form.resetFields(['list']);
197   - }
198   - }, [data]);
199   -
200 226 /**
201 227 *
202 228 * @param option 商品名称所对应的商品数据
... ... @@ -276,8 +302,30 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
276 302 maxWidth: window.innerWidth * 0.8,
277 303 minWidth: 400,
278 304 }}
279   - // layout="horizontal"
280   - // labelCol={{ span: 8 }}
  305 + submitter={{
  306 + render: (props) => {
  307 + return [
  308 + <Button
  309 + key="cancel"
  310 + onClick={() => {
  311 + onClose();
  312 + }}
  313 + >
  314 + 取消
  315 + </Button>,
  316 + <Button
  317 + key="ok"
  318 + type="primary"
  319 + disabled={optType('after-sales-check')}
  320 + onClick={() => {
  321 + props.submit();
  322 + }}
  323 + >
  324 + 确定
  325 + </Button>,
  326 + ];
  327 + },
  328 + }}
281 329 form={form}
282 330 autoFocusFirstInput
283 331 drawerProps={{
... ... @@ -393,7 +441,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
393 441 placeholder="请输入销售代表"
394 442 rules={[{ required: true, message: '销售代表必填' }]}
395 443 options={salesCodeOptions}
396   - // disabled={mainInfoDisbled}
  444 + disabled={optType('after-sales-check')}
397 445 />
398 446 <ProFormSelect
399 447 key="customerName"
... ... @@ -403,6 +451,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
403 451 name="customerName"
404 452 // options={options}
405 453 placeholder="请输入收货人"
  454 + disabled={optType('after-sales-check')}
406 455 rules={[{ required: true, message: '收货人必填' }]}
407 456 onChange={(_, option) => {
408 457 autoFillCustomerInfo(option);
... ... @@ -496,7 +545,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
496 545 label="联系方式"
497 546 placeholder="请输入联系方式"
498 547 rules={[{ required: true, message: '联系方式必填' }]}
499   - // disabled={mainInfoDisbled}
  548 + disabled={optType('after-sales-check')}
500 549 />
501 550 <ProFormText
502 551 width="lg"
... ... @@ -505,7 +554,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
505 554 label="单位"
506 555 placeholder="请输入单位"
507 556 rules={[{ required: true, message: '单位必填' }]}
508   - // disabled={mainInfoDisbled}
  557 + disabled={optType('after-sales-check')}
509 558 />
510 559 <ProFormText
511 560 width="lg"
... ... @@ -514,7 +563,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
514 563 label="课题组"
515 564 placeholder="请输入课题组"
516 565 rules={[{ required: true, message: '课题组必填' }]}
517   - // disabled={mainInfoDisbled}
  566 + disabled={optType('after-sales-check')}
518 567 />
519 568 <ProFormTextArea
520 569 width="lg"
... ... @@ -523,7 +572,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
523 572 label="收货地址"
524 573 placeholder="请输入收货地址"
525 574 rules={[{ required: true, message: '收货地址必填' }]}
526   - // disabled={mainInfoDisbled}
  575 + disabled={optType('after-sales-check')}
527 576 />
528 577 <div id="total-payment">
529 578 <ProFormDigit
... ... @@ -533,12 +582,14 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
533 582 label="支付总额(¥)"
534 583 rules={[{ required: true, message: '支付总额必填' }]}
535 584 tooltip="点击计算,合计所有子订单金额"
  585 + disabled={optType('after-sales-check')}
536 586 fieldProps={{
537 587 addonAfter: (
538 588 <Button
539 589 className="rounded-l-none"
540 590 type="primary"
541 591 onClick={computeTotalPayment}
  592 + disabled={optType('after-sales-check')}
542 593 >
543 594 计算
544 595 </Button>
... ... @@ -556,7 +607,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
556 607 label="支付渠道"
557 608 options={enumToSelect(PAYMENT_CHANNEL_OPTIONS)}
558 609 rules={[{ required: true, message: '支付渠道必填' }]}
559   - // disabled={mainInfoDisbled}
  610 + disabled={optType('after-sales-check')}
560 611 />
561 612 <ProFormSelect
562 613 placeholder="请输入支付方式"
... ... @@ -566,7 +617,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
566 617 label="支付方式"
567 618 options={enumToSelect(PAYMENT_METHOD_OPTIONS)}
568 619 rules={[{ required: true, message: '支付方式必填' }]}
569   - // disabled={mainInfoDisbled}
  620 + disabled={optType('after-sales-check')}
570 621 />
571 622 <ProFormSelect
572 623 placeholder="选择是否需要开票"
... ... @@ -575,7 +626,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
575 626 key="invoicingStatus"
576 627 label="是否需要开票"
577 628 options={getInvoicingSelect()}
578   - // disabled={mainInfoDisbled}
  629 + disabled={optType('after-sales-check')}
579 630 onChange={(_, option) => {
580 631 setInvoicingStatus(option.value);
581 632 if (option.value === 'UN_INVOICE') {
... ... @@ -591,7 +642,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
591 642 name="invoiceIdentificationNumber"
592 643 label="开票信息"
593 644 key="invoiceIdentificationNumber"
594   - // disabled={mainInfoDisbled}
  645 + disabled={optType('after-sales-check')}
595 646 hidden={invoicingStatus === 'UN_INVOICE'}
596 647 placeholder="请输入开票信息"
597 648 rules={[
... ... @@ -607,7 +658,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
607 658 width="lg"
608 659 key="invoicingTime"
609 660 name="invoicingTime"
610   - // disabled={mainInfoDisbled}
  661 + disabled={optType('after-sales-check')}
611 662 hidden={invoicingStatus === 'UN_INVOICE'}
612 663 label="开票时间"
613 664 placeholder="请输入开票时间"
... ... @@ -620,7 +671,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
620 671 name="bank"
621 672 key="bank"
622 673 label="开户银行"
623   - // disabled={mainInfoDisbled}
  674 + disabled={optType('after-sales-check')}
624 675 hidden={invoicingStatus === 'UN_INVOICE'}
625 676 placeholder="请输入开户银行"
626 677 />
... ... @@ -630,7 +681,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
630 681 name="bankAccountNumber"
631 682 hidden={invoicingStatus === 'UN_INVOICE'}
632 683 label="银行账号"
633   - // disabled={mainInfoDisbled}
  684 + disabled={optType('after-sales-check')}
634 685 placeholder="请输入银行账号"
635 686 />
636 687 <ProFormTextArea
... ... @@ -638,7 +689,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
638 689 name="notes"
639 690 label="备注"
640 691 key="notes"
641   - // disabled={mainInfoDisbled}
  692 + disabled={optType('after-sales-check')}
642 693 placeholder="请输入备注"
643 694 rules={[
644 695 {
... ... @@ -650,7 +701,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
650 701  
651 702 <h2>商品信息</h2>
652 703 <ProFormList
653   - creatorButtonProps={{ disabled: false }}
  704 + creatorButtonProps={{ disabled: optType('after-sales-check') }}
654 705 name="list"
655 706 label=""
656 707 copyIconProps={false} //复制按钮不显示
... ... @@ -714,6 +765,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
714 765 onChange={(_, option) => {
715 766 autoFillProductInfo(option, listMeta, listMeta.index);
716 767 }}
  768 + disabled={optType('after-sales-check')}
717 769 fieldProps={{
718 770 optionItemRender(item) {
719 771 if (item.type === 'add') {
... ... @@ -804,6 +856,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
804 856 name="parameters"
805 857 label="商品参数"
806 858 placeholder="请输入商品参数"
  859 + disabled={optType('after-sales-check')}
807 860 rules={[{ required: true, message: '商品参数必填' }]}
808 861 />,
809 862 <ProFormDigit
... ... @@ -818,6 +871,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
818 871 },
819 872 }}
820 873 placeholder="请输入商品数量"
  874 + disabled={optType('after-sales-check')}
821 875 rules={[{ required: true, message: '商品数量必填' }]}
822 876 />,
823 877 <ProFormDigit
... ... @@ -832,6 +886,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
832 886 },
833 887 }}
834 888 placeholder="请输入商品单价"
  889 + disabled={optType('after-sales-check')}
835 890 rules={[{ required: true, message: '商品单价必填' }]}
836 891 />,
837 892 <ProFormText
... ... @@ -840,6 +895,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
840 895 name="unit"
841 896 label="商品单位"
842 897 placeholder="请输入商品单位"
  898 + disabled={optType('after-sales-check')}
843 899 rules={[{ required: true, message: '商品单位必填' }]}
844 900 />,
845 901  
... ... @@ -850,6 +906,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
850 906 label="子订单金额"
851 907 placeholder="请输入子订单金额"
852 908 tooltip="商品数量和单价变化后会自动计算子订单金额"
  909 + disabled={optType('after-sales-check')}
853 910 rules={[{ required: true, message: '子订单金额必填' }]}
854 911 />,
855 912 <ProFormSelect
... ... @@ -861,12 +918,13 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
861 918 options={enumToSelect(PRODUCT_BELONG_DEPARTMENT_OPTIONS)}
862 919 initialValue={'EXPERIMENTAL_CONSUMABLES'}
863 920 rules={[{ required: true, message: '所属事业部必填' }]}
864   - // disabled={mainInfoDisbled}
  921 + disabled={optType('after-sales-check')}
865 922 />,
866 923 <ProFormTextArea
867 924 key={'notes' + listMeta.index}
868 925 width="lg"
869 926 name="notes"
  927 + disabled={optType('after-sales-check')}
870 928 label={
871 929 <div>
872 930 <span>备注</span>
... ... @@ -889,6 +947,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
889 947 label="附件"
890 948 name="filePaths"
891 949 action="/api/service/order/fileProcess"
  950 + disabled={optType('after-sales-check')}
892 951 fieldProps={{
893 952 headers: { Authorization: localStorage.getItem('token') },
894 953 itemFileList,
... ...
src/pages/Order/index.tsx
... ... @@ -1058,8 +1058,8 @@ const OrderPage = () =&gt; {
1058 1058 type="link"
1059 1059 onClick={() => {
1060 1060 setSelectedRows([optRecord]);
1061   - // setOrderDrawerVisible(true);
1062   - setAfterSalesDrawerVisible(true);
  1061 + setOrderDrawerVisible(true);
  1062 + // setAfterSalesDrawerVisible(true);
1063 1063 setOrderRow(record);
1064 1064 setOrderOptType('after-sales');
1065 1065 }}
... ... @@ -1931,8 +1931,8 @@ const OrderPage = () =&gt; {
1931 1931 return;
1932 1932 }
1933 1933 }
1934   - // setOrderDrawerVisible(true);
1935   - setAfterSalesDrawerVisible(true);
  1934 + setOrderDrawerVisible(true);
  1935 + // setAfterSalesDrawerVisible(true);
1936 1936 setOrderRow(record);
1937 1937 setOrderOptType('after-sales');
1938 1938 }}
... ... @@ -2470,6 +2470,11 @@ const OrderPage = () =&gt; {
2470 2470 data={orderRow}
2471 2471 subOrders={selectedRows}
2472 2472 orderCheckType={orderCheckType}
  2473 + openOrderDrawer={(type: any, id: any) => {
  2474 + setOrderRow({ id: id });
  2475 + setOrderOptType(type);
  2476 + setOrderDrawerVisible(true);
  2477 + }}
2473 2478 onClose={() => {
2474 2479 setCheckVisible(false);
2475 2480 setOrderRow({});
... ...
src/services/request.ts
... ... @@ -4775,6 +4775,203 @@ export const postOrderErpUsersUpdatePass = /* #__PURE__ */ (() =&gt; {
4775 4775 return request;
4776 4776 })();
4777 4777  
  4778 +/** @description response type for postServiceBankStatementExportTemplate */
  4779 +export interface PostServiceBankStatementExportTemplateResponse {
  4780 + /**
  4781 + * @description
  4782 + * OK
  4783 + */
  4784 + 200: any;
  4785 + /**
  4786 + * @description
  4787 + * Created
  4788 + */
  4789 + 201: any;
  4790 + /**
  4791 + * @description
  4792 + * Unauthorized
  4793 + */
  4794 + 401: any;
  4795 + /**
  4796 + * @description
  4797 + * Forbidden
  4798 + */
  4799 + 403: any;
  4800 + /**
  4801 + * @description
  4802 + * Not Found
  4803 + */
  4804 + 404: any;
  4805 +}
  4806 +
  4807 +export type PostServiceBankStatementExportTemplateResponseSuccess =
  4808 + PostServiceBankStatementExportTemplateResponse[200];
  4809 +/**
  4810 + * @description
  4811 + * 下载银行流水模板
  4812 + * @tags 银行流水
  4813 + * @produces *
  4814 + * @consumes application/json
  4815 + */
  4816 +export const postServiceBankStatementExportTemplate = /* #__PURE__ */ (() => {
  4817 + const method = 'post';
  4818 + const url = '/service/bankStatement/exportTemplate';
  4819 + function request(): Promise<PostServiceBankStatementExportTemplateResponseSuccess> {
  4820 + return requester(request.url, {
  4821 + method: request.method,
  4822 + }) as unknown as Promise<PostServiceBankStatementExportTemplateResponseSuccess>;
  4823 + }
  4824 +
  4825 + /** http method */
  4826 + request.method = method;
  4827 + /** request url */
  4828 + request.url = url;
  4829 + return request;
  4830 +})();
  4831 +
  4832 +/** @description request parameter type for postServiceBankStatementImportBankStatementForm */
  4833 +export interface PostServiceBankStatementImportBankStatementFormOption {
  4834 + /**
  4835 + * @description
  4836 + * file
  4837 + */
  4838 + formData: {
  4839 + /**
  4840 + @description
  4841 + file */
  4842 + file: File;
  4843 + };
  4844 +}
  4845 +
  4846 +/** @description response type for postServiceBankStatementImportBankStatementForm */
  4847 +export interface PostServiceBankStatementImportBankStatementFormResponse {
  4848 + /**
  4849 + * @description
  4850 + * OK
  4851 + */
  4852 + 200: ServerResult;
  4853 + /**
  4854 + * @description
  4855 + * Created
  4856 + */
  4857 + 201: any;
  4858 + /**
  4859 + * @description
  4860 + * Unauthorized
  4861 + */
  4862 + 401: any;
  4863 + /**
  4864 + * @description
  4865 + * Forbidden
  4866 + */
  4867 + 403: any;
  4868 + /**
  4869 + * @description
  4870 + * Not Found
  4871 + */
  4872 + 404: any;
  4873 +}
  4874 +
  4875 +export type PostServiceBankStatementImportBankStatementFormResponseSuccess =
  4876 + PostServiceBankStatementImportBankStatementFormResponse[200];
  4877 +/**
  4878 + * @description
  4879 + * 导入银行流水表格
  4880 + * @tags 银行流水
  4881 + * @produces *
  4882 + * @consumes multipart/form-data
  4883 + */
  4884 +export const postServiceBankStatementImportBankStatementForm =
  4885 + /* #__PURE__ */ (() => {
  4886 + const method = 'post';
  4887 + const url = '/service/bankStatement/importBankStatementForm';
  4888 + function request(
  4889 + option: PostServiceBankStatementImportBankStatementFormOption,
  4890 + ): Promise<PostServiceBankStatementImportBankStatementFormResponseSuccess> {
  4891 + return requester(request.url, {
  4892 + method: request.method,
  4893 + ...option,
  4894 + }) as unknown as Promise<PostServiceBankStatementImportBankStatementFormResponseSuccess>;
  4895 + }
  4896 +
  4897 + /** http method */
  4898 + request.method = method;
  4899 + /** request url */
  4900 + request.url = url;
  4901 + return request;
  4902 + })();
  4903 +
  4904 +/** @description request parameter type for postServiceInvoiceDeleteInvoice */
  4905 +export interface PostServiceInvoiceDeleteInvoiceOption {
  4906 + /**
  4907 + * @description
  4908 + * dto
  4909 + */
  4910 + body: {
  4911 + /**
  4912 + @description
  4913 + dto */
  4914 + dto: Dto;
  4915 + };
  4916 +}
  4917 +
  4918 +/** @description response type for postServiceInvoiceDeleteInvoice */
  4919 +export interface PostServiceInvoiceDeleteInvoiceResponse {
  4920 + /**
  4921 + * @description
  4922 + * OK
  4923 + */
  4924 + 200: ServerResult;
  4925 + /**
  4926 + * @description
  4927 + * Created
  4928 + */
  4929 + 201: any;
  4930 + /**
  4931 + * @description
  4932 + * Unauthorized
  4933 + */
  4934 + 401: any;
  4935 + /**
  4936 + * @description
  4937 + * Forbidden
  4938 + */
  4939 + 403: any;
  4940 + /**
  4941 + * @description
  4942 + * Not Found
  4943 + */
  4944 + 404: any;
  4945 +}
  4946 +
  4947 +export type PostServiceInvoiceDeleteInvoiceResponseSuccess =
  4948 + PostServiceInvoiceDeleteInvoiceResponse[200];
  4949 +/**
  4950 + * @description
  4951 + * 删除发票
  4952 + * @tags 发票
  4953 + * @produces *
  4954 + * @consumes application/json
  4955 + */
  4956 +export const postServiceInvoiceDeleteInvoice = /* #__PURE__ */ (() => {
  4957 + const method = 'post';
  4958 + const url = '/service/invoice/deleteInvoice';
  4959 + function request(
  4960 + option: PostServiceInvoiceDeleteInvoiceOption,
  4961 + ): Promise<PostServiceInvoiceDeleteInvoiceResponseSuccess> {
  4962 + return requester(request.url, {
  4963 + method: request.method,
  4964 + ...option,
  4965 + }) as unknown as Promise<PostServiceInvoiceDeleteInvoiceResponseSuccess>;
  4966 + }
  4967 +
  4968 + /** http method */
  4969 + request.method = method;
  4970 + /** request url */
  4971 + request.url = url;
  4972 + return request;
  4973 +})();
  4974 +
4778 4975 /** @description request parameter type for postServiceInvoiceQueryInvoice */
4779 4976 export interface PostServiceInvoiceQueryInvoiceOption {
4780 4977 /**
... ... @@ -4988,6 +5185,78 @@ export const postServiceOrderAfterSalesCheck = /* #__PURE__ */ (() =&gt; {
4988 5185 return request;
4989 5186 })();
4990 5187  
  5188 +/** @description request parameter type for postServiceOrderAfterSalesQuerySnapshotOrder */
  5189 +export interface PostServiceOrderAfterSalesQuerySnapshotOrderOption {
  5190 + /**
  5191 + * @description
  5192 + * dto
  5193 + */
  5194 + body: {
  5195 + /**
  5196 + @description
  5197 + dto */
  5198 + dto: Dto;
  5199 + };
  5200 +}
  5201 +
  5202 +/** @description response type for postServiceOrderAfterSalesQuerySnapshotOrder */
  5203 +export interface PostServiceOrderAfterSalesQuerySnapshotOrderResponse {
  5204 + /**
  5205 + * @description
  5206 + * OK
  5207 + */
  5208 + 200: ServerResult;
  5209 + /**
  5210 + * @description
  5211 + * Created
  5212 + */
  5213 + 201: any;
  5214 + /**
  5215 + * @description
  5216 + * Unauthorized
  5217 + */
  5218 + 401: any;
  5219 + /**
  5220 + * @description
  5221 + * Forbidden
  5222 + */
  5223 + 403: any;
  5224 + /**
  5225 + * @description
  5226 + * Not Found
  5227 + */
  5228 + 404: any;
  5229 +}
  5230 +
  5231 +export type PostServiceOrderAfterSalesQuerySnapshotOrderResponseSuccess =
  5232 + PostServiceOrderAfterSalesQuerySnapshotOrderResponse[200];
  5233 +/**
  5234 + * @description
  5235 + * 售后查询快照订单
  5236 + * @tags 内部订单
  5237 + * @produces *
  5238 + * @consumes application/json
  5239 + */
  5240 +export const postServiceOrderAfterSalesQuerySnapshotOrder =
  5241 + /* #__PURE__ */ (() => {
  5242 + const method = 'post';
  5243 + const url = '/service/order/afterSalesQuerySnapshotOrder';
  5244 + function request(
  5245 + option: PostServiceOrderAfterSalesQuerySnapshotOrderOption,
  5246 + ): Promise<PostServiceOrderAfterSalesQuerySnapshotOrderResponseSuccess> {
  5247 + return requester(request.url, {
  5248 + method: request.method,
  5249 + ...option,
  5250 + }) as unknown as Promise<PostServiceOrderAfterSalesQuerySnapshotOrderResponseSuccess>;
  5251 + }
  5252 +
  5253 + /** http method */
  5254 + request.method = method;
  5255 + /** request url */
  5256 + request.url = url;
  5257 + return request;
  5258 + })();
  5259 +
4991 5260 /** @description request parameter type for postServiceOrderApplyAfterSales */
4992 5261 export interface PostServiceOrderApplyAfterSalesOption {
4993 5262 /**
... ...