Commit b4bdf836d5dc2305adb9310540d62c0c8f613e51

Authored by zhongnanhuang
1 parent 412f08e8

feat: update

src/pages/Order/components/BaseModal.tsx 0 → 100644
  1 +import { ModalForm } from '@ant-design/pro-components';
  2 +import { Form } from 'antd';
  3 +
  4 +// import { cloneDeep } from 'lodash';
  5 +export default ({ setCheckVisible, onClose }) => {
  6 + const [form] = Form.useForm<{ name: string; company: string }>();
  7 +
  8 + return (
  9 + <>
  10 + <ModalForm<{
  11 + name: string;
  12 + company: string;
  13 + }>
  14 + width={500}
  15 + open
  16 + title="标题"
  17 + form={form}
  18 + autoFocusFirstInput
  19 + modalProps={{
  20 + okText: '通过',
  21 + cancelText: '取消',
  22 + destroyOnClose: true,
  23 + onCancel: () => {
  24 + setCheckVisible(false);
  25 + },
  26 + }}
  27 + onFinish={async (values) => {
  28 + console.log(values);
  29 + onClose();
  30 + }}
  31 + onOpenChange={setCheckVisible}
  32 + ></ModalForm>
  33 + </>
  34 + );
  35 +};
... ...
src/pages/Order/components/Financial.tsx 0 → 100644
  1 +import { ModalForm } from '@ant-design/pro-components';
  2 +import { Form } from 'antd';
  3 +
  4 +// import { cloneDeep } from 'lodash';
  5 +export default ({ setCheckVisible, onClose }) => {
  6 + const [form] = Form.useForm<{ name: string; company: string }>();
  7 +
  8 + return (
  9 + <>
  10 + <ModalForm<{
  11 + name: string;
  12 + company: string;
  13 + }>
  14 + width={500}
  15 + open
  16 + title="标题"
  17 + form={form}
  18 + autoFocusFirstInput
  19 + modalProps={{
  20 + okText: '通过',
  21 + cancelText: '取消',
  22 + destroyOnClose: true,
  23 + onCancel: () => {
  24 + setCheckVisible(false);
  25 + },
  26 + }}
  27 + onFinish={async (values) => {
  28 + console.log(values);
  29 + onClose();
  30 + }}
  31 + onOpenChange={setCheckVisible}
  32 + ></ModalForm>
  33 + </>
  34 + );
  35 +};
... ...
src/pages/Order/components/HistoryModal.tsx
... ... @@ -76,12 +76,14 @@ export default ({ subOrders, isCancelledOrder, onClose }) =&gt; {
76 76 <span className="text-[#3b83e5]">
77 77 {HISTORY_OPT_TYPE.get(history.record)}
78 78 </span>
79   - ,
80   - {history.record === 'INVOICING' ? '开票状态为' : ''}
81   - {history.record !== 'INVOICING' ? '订单状态为' : ''}
82   - :
  79 + {history.record !== 'INVOICING' &&
  80 + enumValueToLabel(
  81 + history.status,
  82 + ORDER_STATUS_OPTIONS,
  83 + ) !== undefined
  84 + ? ',订单状态为:'
  85 + : ''}
83 86 <span className="text-[#3b83e5]">
84   - {history.status === 'INVOICING' ? '已开票' : ''}
85 87 {history.status === null ? '已作废' : ''}
86 88 {history.status !== null &&
87 89 history.status !== 'INVOICING'
... ...
src/pages/Order/constant.ts
... ... @@ -277,6 +277,8 @@ export const HISTORY_OPT_TYPE = new Map&lt;string, string&gt;([
277 277 ['PROCURE_SEND', '采购发货子订单'],
278 278 ['NO_NEED_SEND', '不需要发货'],
279 279 ['PROCURE_CONVERT_WAREHOUSE_KEEPER', '采购转仓库'],
  280 + ['PROCURE_CONVERT_PROCURE', '采购转发'],
  281 + ['MERGE_APPLY_INVOICING', '合并申请开票'],
280 282 ]);
281 283  
282 284 export const MAIN_ORDER_COLUMNS = [
... ...