Commit a970c1c3070fd070c82e65fae229cc4295fb6f8a

Authored by PurelzMgnead
1 parent f819f9b1

feat: 售后

src/pages/Order/FeedBack/CheckModal.tsx
... ... @@ -66,7 +66,7 @@ export default ({
66 66 const [messageApi, contextHolder] = message.useMessage();
67 67 const [form] = Form.useForm<{ name: string; company: string }>();
68 68 let subOrderIds: any[] = subOrders?.map((subOrder) => subOrder.id);
69   - const [mainOrderId] = useState(data.id);
  69 + const [mainOrderId] = useState(data?.id || null);
70 70  
71 71 const [afterSalesInfo, setAfterSalesInfo] = useState<any>();
72 72 const [prepaidProofImages, setPrepaidProofImages] = useState<any[]>([]);
... ... @@ -90,7 +90,13 @@ export default ({
90 90 let index = 1;
91 91 let annexLinks = annex?.map((f) => {
92 92 return (
93   - <Button className="p-0 pr-1" type="link" key="key" href={f}>
  93 + <Button
  94 + className="p-0 pr-1"
  95 + type="link"
  96 + key="key"
  97 + href={f}
  98 + onClick={console.log(data)}
  99 + >
94 100 {'附件' + index++}
95 101 </Button>
96 102 );
... ...
src/pages/Order/FeedBack/OrderList.tsx
... ... @@ -427,6 +427,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; {
427 427 * 返回当前操作的主订单数据
428 428 */
429 429 function buildMainOrder() {
  430 + console.log(currentOptMainId);
430 431 if (currentOptMainId === undefined || currentOptMainId === null) {
431 432 message.error('页面错误:当前操作的主订单id不存在,请联系系统管理员');
432 433 return;
... ... @@ -1895,6 +1896,8 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; {
1895 1896 className="p-0"
1896 1897 type="link"
1897 1898 onClick={() => {
  1899 + setCurrentMainId(record.id);
  1900 + console.log(currentOptMainId);
1898 1901 createOptObject(optRecord.id, record.id);
1899 1902 setCheckVisible(true);
1900 1903 setOrderCheckType(CHECK_TYPE.AFTER_SALES);
... ... @@ -3633,6 +3636,8 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; {
3633 3636 className="p-0"
3634 3637 type="link"
3635 3638 onClick={() => {
  3639 + setCurrentMainId(record.id);
  3640 + console.log(currentOptMainId);
3636 3641 let selectedSubOrders = subOrderSelectedMap.get(
3637 3642 record.id,
3638 3643 );
... ... @@ -3649,7 +3654,6 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; {
3649 3654 return;
3650 3655 }
3651 3656 }
3652   -
3653 3657 createOptObject(null, record.id);
3654 3658 setCheckVisible(true);
3655 3659 setOrderCheckType(CHECK_TYPE.AFTER_SALES);
... ... @@ -4807,7 +4811,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; {
4807 4811 subOrders={orderOptType === 'add' ? [] : buildSubOrders()}
4808 4812 onClose={(isSuccess: boolean) => {
4809 4813 setOrderDrawerVisible(false);
4810   - clearOptObject();
  4814 + // clearOptObject();
4811 4815 if (isSuccess) {
4812 4816 refreshTable();
4813 4817 }
... ...
src/pages/Order/Order/components/CheckModal.tsx
... ... @@ -66,7 +66,7 @@ export default ({
66 66 const [messageApi, contextHolder] = message.useMessage();
67 67 const [form] = Form.useForm<{ name: string; company: string }>();
68 68 let subOrderIds: any[] = subOrders?.map((subOrder) => subOrder.id);
69   - const [mainOrderId] = useState(data.id);
  69 + const [mainOrderId] = useState(data?.id || null);
70 70  
71 71 const [afterSalesInfo, setAfterSalesInfo] = useState<any>();
72 72 const [prepaidProofImages, setPrepaidProofImages] = useState<any[]>([]);
... ...
src/pages/Order/Order/index copy.tsx
... ... @@ -5062,7 +5062,7 @@ const OrderPage = () =&gt; {
5062 5062 subOrders={orderOptType === 'add' ? [] : buildSubOrders()}
5063 5063 onClose={(isSuccess: boolean) => {
5064 5064 setOrderDrawerVisible(false);
5065   - clearOptObject();
  5065 + // clearOptObject();
5066 5066 if (isSuccess) {
5067 5067 refreshTable();
5068 5068 }
... ...
src/pages/Order/OrderList/CheckModal.tsx
... ... @@ -66,7 +66,7 @@ export default ({
66 66 const [messageApi, contextHolder] = message.useMessage();
67 67 const [form] = Form.useForm<{ name: string; company: string }>();
68 68 let subOrderIds: any[] = subOrders?.map((subOrder) => subOrder.id);
69   - const [mainOrderId] = useState(data.id);
  69 + const [mainOrderId] = useState(data?.id || null);
70 70  
71 71 const [afterSalesInfo, setAfterSalesInfo] = useState<any>();
72 72 const [prepaidProofImages, setPrepaidProofImages] = useState<any[]>([]);
... ...
src/pages/Order/OrderList/OrderList.tsx
... ... @@ -4790,7 +4790,7 @@ const OrderList = ({ paramsNew, searchShow, toolbarShow }) =&gt; {
4790 4790 subOrders={orderOptType === 'add' ? [] : buildSubOrders()}
4791 4791 onClose={(isSuccess: boolean) => {
4792 4792 setOrderDrawerVisible(false);
4793   - clearOptObject();
  4793 + // clearOptObject();
4794 4794 if (isSuccess) {
4795 4795 refreshTable();
4796 4796 }
... ...