Commit 08a71b12633fbbad4103324c02223d600b6987f1

Authored by zhusen
2 parents 15c41122 7293ba72

Merge branch 'zhongnanhuang' into 'develop'

feat:Updated add order, review order, and financial information Drawer

对新增、审核接口进行了调整。新增了财务信息窗口。

See merge request !2

Too many changes to show.

To preserve performance only 10 of 13 files are displayed.

.umirc.ts
@@ -12,8 +12,8 @@ export default defineConfig({ @@ -12,8 +12,8 @@ export default defineConfig({
12 title: '订单管理系统', 12 title: '订单管理系统',
13 }, 13 },
14 proxy: { 14 proxy: {
15 - '/erp/': {  
16 - target: 'http://39.108.227.113:3000/mock/39', 15 + '/service/': {
  16 + target: 'http://39.108.227.113:8085/',
17 changeOrigin: true, 17 changeOrigin: true,
18 // pathRewrite: { '^/api': '' }, 18 // pathRewrite: { '^/api': '' },
19 }, 19 },
src/app.ts
@@ -90,7 +90,7 @@ export const request: RequestConfig = { @@ -90,7 +90,7 @@ export const request: RequestConfig = {
90 (response) => { 90 (response) => {
91 // 不再需要异步处理读取返回体内容,可直接在data中读出,部分字段可在 config 中找到 91 // 不再需要异步处理读取返回体内容,可直接在data中读出,部分字段可在 config 中找到
92 const { data = {} as any } = response; 92 const { data = {} as any } = response;
93 - if (data.code !== RESPONSE_CODE.SUCCESS) { 93 + if (data.result !== RESPONSE_CODE.SUCCESS) {
94 message.error('服务器错误,请稍后再试!'); 94 message.error('服务器错误,请稍后再试!');
95 } 95 }
96 // do something 96 // do something
src/pages/Order/components/CheckModal.tsx
  1 +import { postServiceOrderCheckOrder } from '@/services';
1 import { ModalForm, ProFormTextArea } from '@ant-design/pro-components'; 2 import { ModalForm, ProFormTextArea } from '@ant-design/pro-components';
2 -import { Form, message } from 'antd';  
3 -  
4 -export default ({ setCheckVisible }) => { 3 +import { Button, Form, message } from 'antd';
  4 +export default ({ setCheckVisible, data, onClose }) => {
5 const [form] = Form.useForm<{ name: string; company: string }>(); 5 const [form] = Form.useForm<{ name: string; company: string }>();
  6 + let subOrderIds: any[] = [];
  7 + const subOrderList = data.subOrderInformationLists;
  8 + //是单条子订单审核
  9 + if (subOrderList === undefined) {
  10 + subOrderIds = [data.id];
  11 + } else {
  12 + subOrderIds = subOrderList.map((subOrder) => subOrder.id);
  13 + }
  14 + async function doCheck(body: object) {
  15 + const res = await postServiceOrderCheckOrder({
  16 + data: body,
  17 + });
  18 + if (res.result === 0) {
  19 + message.success(res.message);
  20 + } else {
  21 + message.error(res.message);
  22 + }
  23 + onClose();
  24 + return true;
  25 + }
6 return ( 26 return (
7 <ModalForm<{ 27 <ModalForm<{
8 name: string; 28 name: string;
@@ -21,12 +41,35 @@ export default ({ setCheckVisible }) =&gt; { @@ -21,12 +41,35 @@ export default ({ setCheckVisible }) =&gt; {
21 setCheckVisible(false); 41 setCheckVisible(false);
22 }, 42 },
23 }} 43 }}
  44 + submitter={{
  45 + render: (props, defaultDoms) => {
  46 + return [
  47 + <Button
  48 + key="驳回"
  49 + onClick={() => {
  50 + doCheck({
  51 + flag: false,
  52 + ids: subOrderIds,
  53 + checkNotes: form.getFieldValue('name'),
  54 + });
  55 + }}
  56 + >
  57 + 驳回
  58 + </Button>,
  59 + defaultDoms[1],
  60 + ];
  61 + },
  62 + }}
24 submitTimeout={2000} 63 submitTimeout={2000}
25 onFinish={async (values) => { 64 onFinish={async (values) => {
26 - console.log(values.name);  
27 - message.success('提交成功');  
28 - return true; 65 + //审核通过
  66 + return doCheck({
  67 + flag: true,
  68 + ids: subOrderIds,
  69 + checkNotes: values.name,
  70 + });
29 }} 71 }}
  72 + onOpenChange={setCheckVisible}
30 > 73 >
31 <div>请特别注意订单总金额与订单金额。</div> 74 <div>请特别注意订单总金额与订单金额。</div>
32 <ProFormTextArea 75 <ProFormTextArea
src/pages/Order/components/DeliverModal.tsx
  1 +import { enumToSelect } from '@/utils';
1 import { 2 import {
2 ProColumns, 3 ProColumns,
3 ProForm, 4 ProForm,
  5 + ProFormSelect,
4 ProFormText, 6 ProFormText,
5 ProTable, 7 ProTable,
6 } from '@ant-design/pro-components'; 8 } from '@ant-design/pro-components';
7 -import { Button, Input, InputNumber, Modal } from 'antd'; 9 +import { Button, InputNumber, Modal } from 'antd';
8 import { cloneDeep } from 'lodash'; 10 import { cloneDeep } from 'lodash';
9 import { useEffect, useRef, useState } from 'react'; 11 import { useEffect, useRef, useState } from 'react';
  12 +import { LOGISTICS_STATUS_OPTIONS } from '../constant';
10 13
11 const DeliverModal = ({ data: propsData, onClose }) => { 14 const DeliverModal = ({ data: propsData, onClose }) => {
12 const [data, setData] = useState(propsData || {}); 15 const [data, setData] = useState(propsData || {});
@@ -40,18 +43,21 @@ const DeliverModal = ({ data: propsData, onClose }) =&gt; { @@ -40,18 +43,21 @@ const DeliverModal = ({ data: propsData, onClose }) =&gt; {
40 { 43 {
41 title: '物流方式', 44 title: '物流方式',
42 width: 180, 45 width: 180,
43 - key: 'paymentChannel',  
44 - render: (_, record, index) => (  
45 - <Input  
46 - value={record.paymentChannel}  
47 - onChange={handleChange('paymentChannel', index)} 46 + key: 'logisticsMethod',
  47 + render: () => (
  48 + <ProFormSelect
  49 + placeholder="请输入物流方式"
  50 + name="logisticsMethod"
  51 + width="lg"
  52 + label="物流方式"
  53 + options={enumToSelect(LOGISTICS_STATUS_OPTIONS)}
48 /> 54 />
49 ), 55 ),
50 }, 56 },
51 { 57 {
52 title: '物流单号', 58 title: '物流单号',
53 width: 180, 59 width: 180,
54 - key: 'productCode', 60 + key: 'serialNumber',
55 render: (_, record, index) => ( 61 render: (_, record, index) => (
56 <InputNumber 62 <InputNumber
57 value={record.productCode} 63 value={record.productCode}
src/pages/Order/components/FinancialDrawer.tsx 0 → 100644
  1 +// import { PlusOutlined } from '@ant-design/icons';
  2 +import {
  3 + DrawerForm,
  4 + ProFormDatePicker,
  5 + ProFormText,
  6 +} from '@ant-design/pro-components';
  7 +import { Form, message } from 'antd';
  8 +
  9 +// const waitTime = (time: number = 100) => {
  10 +// return new Promise((resolve) => {
  11 +// setTimeout(() => {
  12 +// resolve(true);
  13 +// }, time);
  14 +// });
  15 +// };
  16 +
  17 +export default ({ onClose }) => {
  18 + // const [expandedRowKeys, setExpandedRowKeys] = useState<readonly Key[]>([]);
  19 + const [form] = Form.useForm<{ name: string; company: string }>();
  20 + // const actionRef = useRef<
  21 + // FormListActionType<{
  22 + // name: string;
  23 + // }>
  24 + // >();
  25 + //作为商品行号
  26 + // const rowRumber = useRef(0);
  27 +
  28 + return (
  29 + <DrawerForm<{
  30 + name: string;
  31 + company: string;
  32 + }>
  33 + open
  34 + title="财务信息"
  35 + resize={{
  36 + onResize() {
  37 + console.log('resize!');
  38 + },
  39 + maxWidth: window.innerWidth * 0.8,
  40 + minWidth: 400,
  41 + }}
  42 + // layout="horizontal"
  43 + // labelCol={{ span: 8 }}
  44 + form={form}
  45 + autoFocusFirstInput
  46 + drawerProps={{
  47 + destroyOnClose: true,
  48 + }}
  49 + submitTimeout={2000}
  50 + onFinish={async (values) => {
  51 + console.log(form);
  52 + console.log(values);
  53 + console.log(values.name);
  54 + message.success('提交成功');
  55 + // 不返回不会关闭弹框
  56 + // onClose();
  57 + return true;
  58 + }}
  59 + onOpenChange={(val) => {
  60 + return !val && onClose();
  61 + }}
  62 + >
  63 + <ProFormText
  64 + width="lg"
  65 + name="invoiceInformation"
  66 + label="开票信息"
  67 + placeholder="请输入开票信息"
  68 + />
  69 + <ProFormText
  70 + width="lg"
  71 + name="bank"
  72 + label="开户银行"
  73 + placeholder="请输入开户银行"
  74 + />
  75 + <ProFormText
  76 + width="lg"
  77 + name="bankAccountNumber"
  78 + label="开户银行账号"
  79 + placeholder="请输入开户银行账号"
  80 + />
  81 + <ProFormDatePicker width="lg" name="contractTime" label="开票时间" />
  82 + <ProFormDatePicker width="lg" name="contractTime" label="收款时间" />
  83 + </DrawerForm>
  84 + );
  85 +};
src/pages/Order/components/OrderDrawer.tsx
1 -import { postErpOrderAdd } from '@/services'; 1 +import {
  2 + postServiceOrderAddOrder,
  3 + postServiceOrderQueryProductInformation,
  4 +} from '@/services';
  5 +import { enumToSelect } from '@/utils';
2 import { 6 import {
3 DrawerForm, 7 DrawerForm,
4 FormListActionType, 8 FormListActionType,
5 ProCard, 9 ProCard,
6 - ProFormGroup, 10 + ProFormDateTimePicker,
  11 + ProFormDigit,
7 ProFormList, 12 ProFormList,
  13 + ProFormSelect,
8 ProFormText, 14 ProFormText,
  15 + ProFormTextArea,
9 } from '@ant-design/pro-components'; 16 } from '@ant-design/pro-components';
10 import { Form, message } from 'antd'; 17 import { Form, message } from 'antd';
11 import { useEffect, useRef } from 'react'; 18 import { useEffect, useRef } from 'react';
12 -import { useFieldAuth } from '../hooks';  
13 -import { OPERATION_TYPE } from '../type.d'; 19 +import {
  20 + INVOCING_STATUS_OPTIONS,
  21 + PAYMENT_CHANNEL_OPTIONS,
  22 + PAYMENT_METHOD_OPTIONS,
  23 + PRODUCT_BELONG_DEPARTMENT_OPTIONS,
  24 +} from '../constant';
14 25
15 export default ({ onClose, data }) => { 26 export default ({ onClose, data }) => {
16 - const { authFields } = useFieldAuth({  
17 - operation: data?.id ? OPERATION_TYPE.EDIT : OPERATION_TYPE.CREATE,  
18 - });  
19 - const [form] = Form.useForm<{ name: string; company: string }>(); 27 + const [form] = Form.useForm<{
  28 + salesCode: '';
  29 + customerName: '';
  30 + customerContactNumber: '';
  31 + institution: '';
  32 + institutionContactName: '';
  33 + customerShippingAddress: '';
  34 + totalPayment: '';
  35 + paymentChannel: '';
  36 + paymentMethod: '';
  37 + productBelongBusiness: '';
  38 + invoicingStatus: '';
  39 + invoiceIdentificationNumber: '';
  40 + invoicingTime: '';
  41 + bank: '';
  42 + bankAccountNumber: '';
  43 + notes: '';
  44 + list: [
  45 + {
  46 + productCode: '';
  47 + productName: '';
  48 + quantity: '';
  49 + productPrice: '';
  50 + parameters: '';
  51 + subOrderPayment: '';
  52 + unit: '';
  53 + serialNumber: '';
  54 + notes: '';
  55 + },
  56 + ];
  57 + }>();
20 const actionRef = useRef< 58 const actionRef = useRef<
21 FormListActionType<{ 59 FormListActionType<{
22 name: string; 60 name: string;
@@ -29,13 +67,68 @@ export default ({ onClose, data }) =&gt; { @@ -29,13 +67,68 @@ export default ({ onClose, data }) =&gt; {
29 form.setFieldsValue({ ...data }); 67 form.setFieldsValue({ ...data });
30 }, [data]); 68 }, [data]);
31 69
  70 + /**
  71 + *
  72 + * @param option 商品名称所对应的商品数据
  73 + * @param currentRowData list中当前行的数据
  74 + */
  75 + function autoFillProductInfo(option: any, currentRowData: any) {
  76 + let copyList = form.getFieldValue('list');
  77 + let currentData = copyList[currentRowData.field.key];
  78 + currentData.productCode = option.productCode;
  79 + currentData.parameters = option.specifications;
  80 + currentData.unit = option.unit;
  81 + form.setFieldValue('list', copyList);
  82 + }
  83 +
32 return ( 84 return (
33 <DrawerForm<{ 85 <DrawerForm<{
34 name: string; 86 name: string;
35 company: string; 87 company: string;
36 }> 88 }>
37 open 89 open
  90 + width="35%"
38 title="新建订单" 91 title="新建订单"
  92 + initialValues={{
  93 + customerName: '123',
  94 + customerContactNumber: '123',
  95 + institution: '123',
  96 + institutionContactName: '123',
  97 + customerShippingAddress: '123123',
  98 + totalPayment: '12312',
  99 + paymentChannel: 'BANK_TRANSFER',
  100 + paymentMethod: 'PAYMENT_IN_ADVANCE',
  101 + productBelongBusiness: 'EXPERIMENTAL_CONSUMABLES',
  102 + invoicingStatus: 'INVOICED',
  103 + invoiceIdentificationNumber: '12312',
  104 + invoicingTime: '2023-11-29 23:19:15',
  105 + bank: '123',
  106 + bankAccountNumber: '1231',
  107 + notes: '123',
  108 + list: [
  109 + {
  110 + productCode: 'qweq',
  111 + productName: 'qweqwe',
  112 + quantity: '99',
  113 + productPrice: '12313',
  114 + parameters: 'qweq',
  115 + subOrderPayment: '1231',
  116 + unit: 'qweq',
  117 + serialNumber: 'qwewqe',
  118 + notes: 'qweqw',
  119 + },
  120 + {
  121 + productName: 'asdsda',
  122 + productCode: 'dasda',
  123 + parameters: 'sdasa',
  124 + quantity: '99',
  125 + productPrice: '123',
  126 + unit: '123',
  127 + subOrderPayment: '123',
  128 + serialNumber: 'adadas',
  129 + },
  130 + ],
  131 + }}
39 resize={{ 132 resize={{
40 onResize() { 133 onResize() {
41 console.log('resize!'); 134 console.log('resize!');
@@ -52,13 +145,10 @@ export default ({ onClose, data }) =&gt; { @@ -52,13 +145,10 @@ export default ({ onClose, data }) =&gt; {
52 }} 145 }}
53 submitTimeout={2000} 146 submitTimeout={2000}
54 onFinish={async (values) => { 147 onFinish={async (values) => {
55 - console.log(form);  
56 - console.log(values);  
57 - await postErpOrderAdd({ values });  
58 - console.log(values.name); 148 + await postServiceOrderAddOrder({ data: values });
59 message.success('提交成功'); 149 message.success('提交成功');
60 // 不返回不会关闭弹框 150 // 不返回不会关闭弹框
61 - // onClose(); 151 + onClose();
62 return true; 152 return true;
63 }} 153 }}
64 onOpenChange={(val) => { 154 onOpenChange={(val) => {
@@ -67,37 +157,30 @@ export default ({ onClose, data }) =&gt; { @@ -67,37 +157,30 @@ export default ({ onClose, data }) =&gt; {
67 > 157 >
68 <h2>订单基本信息</h2> 158 <h2>订单基本信息</h2>
69 <ProFormText 159 <ProFormText
70 - name="id"  
71 - width="lg"  
72 - label="订单编号"  
73 - placeholder="请输入订单编号"  
74 - disabled={authFields.id}  
75 - />  
76 - <ProFormText  
77 - width="lg"  
78 name="salesCode" 160 name="salesCode"
79 - label="销售代号"  
80 - placeholder="请输入销售代号"  
81 - disabled={authFields.salesCode} 161 + width="lg"
  162 + disabled
  163 + label="销售代表"
  164 + placeholder="请输入销售代表"
  165 + initialValue="JOJO"
82 /> 166 />
83 <ProFormText 167 <ProFormText
84 name="customerName" 168 name="customerName"
85 width="lg" 169 width="lg"
86 label="收货人" 170 label="收货人"
87 placeholder="请输入收货人" 171 placeholder="请输入收货人"
88 - disabled={authFields.customerName}  
89 /> 172 />
90 <ProFormText 173 <ProFormText
91 width="lg" 174 width="lg"
92 name="customerContactNumber" 175 name="customerContactNumber"
93 - label="收货人联系手机号"  
94 - placeholder="请输入收货人联系手机号" 176 + label="联系方式"
  177 + placeholder="请输入联系方式"
95 /> 178 />
96 <ProFormText 179 <ProFormText
97 width="lg" 180 width="lg"
98 - name="customerShippingAddress"  
99 - label="收货人地址信息"  
100 - placeholder="请输入收货人地址信息" 181 + name="institution"
  182 + label="单位"
  183 + placeholder="请输入单位"
101 /> 184 />
102 <ProFormText 185 <ProFormText
103 width="lg" 186 width="lg"
@@ -105,20 +188,85 @@ export default ({ onClose, data }) =&gt; { @@ -105,20 +188,85 @@ export default ({ onClose, data }) =&gt; {
105 label="单位联系人" 188 label="单位联系人"
106 placeholder="请输入单位联系人" 189 placeholder="请输入单位联系人"
107 /> 190 />
  191 + <ProFormTextArea
  192 + width="lg"
  193 + name="customerShippingAddress"
  194 + label="收货地址"
  195 + placeholder="请输入收货地址"
  196 + />
  197 + <ProFormText name="totalPayment" width="lg" label="支付总额(¥)" />
  198 + <ProFormSelect
  199 + placeholder="请输入支付渠道"
  200 + name="paymentChannel"
  201 + width="lg"
  202 + label="支付渠道"
  203 + options={enumToSelect(PAYMENT_CHANNEL_OPTIONS)}
  204 + />
  205 + <ProFormSelect
  206 + placeholder="请输入支付方式"
  207 + name="paymentMethod"
  208 + width="lg"
  209 + label="支付方式"
  210 + options={enumToSelect(PAYMENT_METHOD_OPTIONS)}
  211 + />
  212 + <ProFormSelect
  213 + placeholder="请输入所属事业部"
  214 + name="productBelongBusiness"
  215 + width="lg"
  216 + label="所属事业部"
  217 + options={enumToSelect(PRODUCT_BELONG_DEPARTMENT_OPTIONS)}
  218 + />
  219 + <ProFormSelect
  220 + placeholder="选择是否要开票"
  221 + name="invoicingStatus"
  222 + width="lg"
  223 + label="是否要开票"
  224 + options={enumToSelect(INVOCING_STATUS_OPTIONS)}
  225 + />
108 <ProFormText 226 <ProFormText
109 width="lg" 227 width="lg"
110 - name="institution"  
111 - label="单位"  
112 - placeholder="请输入单位" 228 + name="invoiceIdentificationNumber"
  229 + label="开票信息"
  230 + placeholder="请输入开票信息"
  231 + />
  232 + <ProFormDateTimePicker
  233 + width="lg"
  234 + name="invoicingTime"
  235 + label="开票时间"
  236 + placeholder="请输入开票时间"
  237 + />
  238 + <ProFormText
  239 + width="lg"
  240 + name="bank"
  241 + label="开户银行"
  242 + placeholder="请输入开户银行"
  243 + />
  244 + <ProFormText
  245 + width="lg"
  246 + name="bankAccountNumber"
  247 + label="银行账号"
  248 + placeholder="请输入银行账号"
  249 + />
  250 + <ProFormText
  251 + width="lg"
  252 + name="notes"
  253 + label="备注"
  254 + placeholder="请输入备注"
113 /> 255 />
114 256
115 - <h2>商品基本信息</h2> 257 + {/* <h2>商品基本信息</h2>
116 <ProFormText width="lg" name="totalPayment" label="支付总金额" /> 258 <ProFormText width="lg" name="totalPayment" label="支付总金额" />
117 - <ProFormText 259 + <ProFormSelect
  260 + disabled
  261 + placeholder="请输入物流方式"
  262 + name="logisticsMethod"
118 width="lg" 263 width="lg"
119 - name="logisticsStatus"  
120 label="物流方式" 264 label="物流方式"
121 - placeholder="请输入物流方式" 265 + request={async () => {
  266 + // 发送请求获取选项数据
  267 + const { data } = await getServiceOrderProvideLogisticsStatus();
  268 + return enumToSelect(data);
  269 + }}
122 /> 270 />
123 <ProFormText 271 <ProFormText
124 width="lg" 272 width="lg"
@@ -126,17 +274,28 @@ export default ({ onClose, data }) =&gt; { @@ -126,17 +274,28 @@ export default ({ onClose, data }) =&gt; {
126 label="支付状态" 274 label="支付状态"
127 placeholder="请输入支付状态" 275 placeholder="请输入支付状态"
128 /> 276 />
129 - <ProFormText  
130 - width="lg" 277 +
  278 + <ProFormSelect
  279 + placeholder="请输入支付方式"
131 name="paymentMethod" 280 name="paymentMethod"
  281 + width="lg"
132 label="支付方式" 282 label="支付方式"
133 - placeholder="请输入支付方式" 283 + request={async () => {
  284 + // 发送请求获取选项数据
  285 + const { data } = await getServiceOrderProvidePaymentMethod();
  286 + return enumToSelect(data);
  287 + }}
134 /> 288 />
135 - <ProFormText  
136 - width="lg" 289 + <ProFormSelect
  290 + placeholder="请输入支付渠道"
137 name="paymentChannel" 291 name="paymentChannel"
  292 + width="lg"
138 label="支付渠道" 293 label="支付渠道"
139 - placeholder="请输入支付渠道" 294 + request={async () => {
  295 + // 发送请求获取选项数据
  296 + const { data } = await getServiceOrderProvidePaymentChannel();
  297 + return enumToSelect(data);
  298 + }}
140 /> 299 />
141 <ProFormText 300 <ProFormText
142 width="lg" 301 width="lg"
@@ -185,11 +344,11 @@ export default ({ onClose, data }) =&gt; { @@ -185,11 +344,11 @@ export default ({ onClose, data }) =&gt; {
185 name="orderStatus" 344 name="orderStatus"
186 label="订单状态" 345 label="订单状态"
187 placeholder="请输入订单状态" 346 placeholder="请输入订单状态"
188 - /> 347 + /> */}
189 348
190 <h2>商品信息</h2> 349 <h2>商品信息</h2>
191 <ProFormList 350 <ProFormList
192 - name="subOrderInformationLists" 351 + name="list"
193 label="" 352 label=""
194 initialValue={[ 353 initialValue={[
195 { 354 {
@@ -217,70 +376,103 @@ export default ({ onClose, data }) =&gt; { @@ -217,70 +376,103 @@ export default ({ onClose, data }) =&gt; {
217 return; 376 return;
218 } 377 }
219 rowNumber.current = 1; 378 rowNumber.current = 1;
220 - setTimeout(() => resolve(true), 1000); 379 + setTimeout(() => {
  380 + resolve(true);
  381 + }, 1000);
221 }); 382 });
222 }, 383 },
223 }} 384 }}
224 - itemRender={({ listDom, action }) => { 385 + itemRender={(doms, listMeta) => {
  386 + // const list = actionRef.current?.getList();
225 return ( 387 return (
226 <ProCard 388 <ProCard
227 bordered 389 bordered
228 - extra={action} 390 + extra={doms.action}
229 title={'商品' + rowNumber.current++} 391 title={'商品' + rowNumber.current++}
230 style={{ 392 style={{
231 marginBlockEnd: 8, 393 marginBlockEnd: 8,
232 }} 394 }}
233 > 395 >
234 - {listDom} 396 + {[
  397 + <ProFormSelect
  398 + key={listMeta.field.key}
  399 + label="商品名称"
  400 + width="lg"
  401 + showSearch
  402 + name="productName"
  403 + placeholder="请搜索商品"
  404 + onChange={(_, option) => {
  405 + autoFillProductInfo(option, listMeta);
  406 + }}
  407 + request={async (value) => {
  408 + const { data } =
  409 + await postServiceOrderQueryProductInformation({
  410 + data: { productName: value.keyWords },
  411 + });
  412 + return data.map((p: any) => {
  413 + return { ...p, label: p.productName, value: p.id };
  414 + });
  415 + }}
  416 + />,
  417 + doms.listDom,
  418 + ]}
235 </ProCard> 419 </ProCard>
236 ); 420 );
237 }} 421 }}
238 actionRef={actionRef} 422 actionRef={actionRef}
239 > 423 >
240 - <ProFormGroup key="group">  
241 - <ProFormText  
242 - width="md"  
243 - name="productCode"  
244 - label="商品编码"  
245 - placeholder="请输入商品编码"  
246 - />  
247 - <ProFormText  
248 - width="md"  
249 - name="productName"  
250 - label="商品名称"  
251 - placeholder="请输入商品名称"  
252 - />  
253 - <ProFormText  
254 - width="md"  
255 - name="quantity"  
256 - label="商品数量"  
257 - placeholder="请输入商品数量"  
258 - />  
259 - <ProFormText  
260 - width="md"  
261 - name="productPrice"  
262 - label="商品单价"  
263 - placeholder="请输入商品单价"  
264 - />  
265 - <ProFormText  
266 - width="md"  
267 - name="unit"  
268 - label="价格单位"  
269 - placeholder="请输入价格单位"  
270 - />  
271 - <ProFormText  
272 - width="md"  
273 - name="parameters"  
274 - label="商品参数"  
275 - placeholder="请输入商品参数"  
276 - />  
277 - <ProFormText  
278 - width="md"  
279 - name="subOrderPayment"  
280 - label="子订单金额"  
281 - placeholder="请输入子订单金额"  
282 - />  
283 - </ProFormGroup> 424 + <ProFormText
  425 + width="lg"
  426 + name="productCode"
  427 + disabled
  428 + label="商品编码"
  429 + placeholder="未输入商品名称"
  430 + />
  431 + <ProFormText
  432 + width="lg"
  433 + disabled
  434 + name="parameters"
  435 + label="商品参数"
  436 + placeholder="请输入商品参数"
  437 + />
  438 + <ProFormText
  439 + width="lg"
  440 + name="quantity"
  441 + label="商品数量"
  442 + placeholder="请输入商品数量"
  443 + />
  444 + <ProFormDigit
  445 + width="lg"
  446 + name="productPrice"
  447 + label="商品单价"
  448 + placeholder="请输入商品单价"
  449 + />
  450 + <ProFormText
  451 + width="lg"
  452 + name="unit"
  453 + disabled
  454 + label="价格单位"
  455 + placeholder="请输入价格单位"
  456 + />
  457 +
  458 + <ProFormDigit
  459 + width="lg"
  460 + name="subOrderPayment"
  461 + label="子订单金额"
  462 + placeholder="请输入子订单金额"
  463 + />
  464 + <ProFormText
  465 + width="lg"
  466 + name="serialNumber"
  467 + label="物流单号"
  468 + placeholder="请输入物流单号"
  469 + />
  470 + <ProFormText
  471 + width="lg"
  472 + name="notes"
  473 + label="备注"
  474 + placeholder="请输入备注"
  475 + />
284 </ProFormList> 476 </ProFormList>
285 477
286 {/* <ProFormDateRangePicker name="contractTime" label="合同生效时间" /> */} 478 {/* <ProFormDateRangePicker name="contractTime" label="合同生效时间" /> */}
src/pages/Order/constant.ts
@@ -182,3 +182,41 @@ export const SUB_ORDER_COLUMNS = [ @@ -182,3 +182,41 @@ export const SUB_ORDER_COLUMNS = [
182 component: 'tag', 182 component: 'tag',
183 }, 183 },
184 ]; 184 ];
  185 +
  186 +export const PAYMENT_CHANNEL_OPTIONS = {
  187 + ALIPAY: '支付宝',
  188 + WECHAT: '微信',
  189 + BANK_TRANSFER: '银行转账',
  190 +};
  191 +
  192 +export const PAYMENT_METHOD_OPTIONS = {
  193 + PAYMENT_IN_ADVANCE: '预付',
  194 + CASH_ON_DELIVERY: '货到付款',
  195 +};
  196 +
  197 +export const PRODUCT_BELONG_DEPARTMENT_OPTIONS = {
  198 + APPLICATION_PROJECT: '应用项目事业部门',
  199 + TEST: '测试事业部门',
  200 + CUSTOMIZATION: '定制化事业部门',
  201 + EXPERIMENTAL_EQUIPMENT: '实验设备事业部门',
  202 + EXPERIMENTAL_CONSUMABLES: '实验耗材事业部门',
  203 +};
  204 +
  205 +export const INVOCING_STATUS_OPTIONS = {
  206 + UN_INVOICE: '未开票',
  207 + INVOICED: '已开票',
  208 +};
  209 +
  210 +export const LOGISTICS_STATUS_OPTIONS = {
  211 + JINGDONG_LOGISTICS: '京东物流',
  212 + DEBANG_LOGISTICS: '德邦物流',
  213 +};
  214 +
  215 +export const ORDER_STATUS_OPTIONS = {
  216 + CONFIRM_RECEIPT: '确认收货',
  217 + UNAUDITED: '未审核',
  218 + AUDITED: '已审核',
  219 + WAIT_SHIP: '待发货',
  220 + AUDIT_FAILED: '审核失败',
  221 + SHIPPED: '已发货',
  222 +};
src/pages/Order/index.tsx
1 import ButtonConfirm from '@/components/ButtomConfirm'; 1 import ButtonConfirm from '@/components/ButtomConfirm';
2 -import { postErpOrderListByPage } from '@/services'; 2 +import { postServiceOrderQueryServiceOrder } from '@/services';
  3 +import { enumValueToLabel } from '@/utils';
3 import { 4 import {
4 PageContainer, 5 PageContainer,
5 ProColumns, 6 ProColumns,
6 ProTable, 7 ProTable,
7 } from '@ant-design/pro-components'; 8 } from '@ant-design/pro-components';
8 -import { Button, Divider, Flex, Space, Tag, message } from 'antd';  
9 -import { Key, useState } from 'react'; 9 +import { Button, Checkbox, Divider, Flex, Space, Tag, message } from 'antd';
  10 +import { Key, useRef, useState } from 'react';
10 import CheckModal from './components/CheckModal'; 11 import CheckModal from './components/CheckModal';
11 import DeliverModal from './components/DeliverModal'; 12 import DeliverModal from './components/DeliverModal';
12 import OrderDrawer from './components/OrderDrawer'; 13 import OrderDrawer from './components/OrderDrawer';
13 -import { MAIN_ORDER_COLUMNS, SUB_ORDER_COLUMNS } from './constant'; 14 +import {
  15 + INVOCING_STATUS_OPTIONS,
  16 + MAIN_ORDER_COLUMNS,
  17 + ORDER_STATUS_OPTIONS,
  18 + PAYMENT_CHANNEL_OPTIONS,
  19 + PAYMENT_METHOD_OPTIONS,
  20 + SUB_ORDER_COLUMNS,
  21 +} from './constant';
14 import './index.less'; 22 import './index.less';
15 import { OrderListItemType, OrderType } from './type.d'; 23 import { OrderListItemType, OrderType } from './type.d';
16 24
@@ -20,27 +28,31 @@ const OrderPage = () =&gt; { @@ -20,27 +28,31 @@ const OrderPage = () =&gt; {
20 const [deliverVisible, setDeliverVisible] = useState<boolean>(false); 28 const [deliverVisible, setDeliverVisible] = useState<boolean>(false);
21 const [expandedRowKeys, setExpandedRowKeys] = useState<Key[]>([]); 29 const [expandedRowKeys, setExpandedRowKeys] = useState<Key[]>([]);
22 const [orderRow, setOrderRow] = useState<Partial<OrderType>>({}); 30 const [orderRow, setOrderRow] = useState<Partial<OrderType>>({});
23 - const [subOrderShowText, setSubOrderShowText] = useState('订单详情'); 31 + const [mainOrderAllItemKeys, setMainOrderAllItemKeys] = useState([]);
24 32
25 const [selectedRows, setSelectedRows] = useState({}); 33 const [selectedRows, setSelectedRows] = useState({});
26 const [selectedRowObj, setSelectedRowObj] = useState({}); 34 const [selectedRowObj, setSelectedRowObj] = useState({});
  35 + const [selectedItems, setSelectedItems] = useState([]);
  36 + const mainTableRef = useRef();
27 37
28 - // const onCheckboxChange = (itemKey: number) => {  
29 - // const newSelectedItems = selectedItems.includes(itemKey)  
30 - // ? selectedItems.filter((key) => key !== itemKey)  
31 - // : [...selectedItems, itemKey]; 38 + const onCheckboxChange = (itemKey: never) => {
  39 + const newSelectedItems = selectedItems.includes(itemKey)
  40 + ? selectedItems.filter((key) => key !== itemKey)
  41 + : [...selectedItems, itemKey];
32 42
33 - // setSelectedItems(newSelectedItems);  
34 - // }; 43 + setSelectedItems(newSelectedItems);
  44 + };
  45 + const handleAllExpand = () => {
  46 + if (expandedRowKeys.length === mainOrderAllItemKeys.length) {
  47 + setExpandedRowKeys([]);
  48 + return;
  49 + }
35 50
  51 + setExpandedRowKeys(mainOrderAllItemKeys);
  52 + };
36 // 主订单内容渲染 53 // 主订单内容渲染
37 const MainOrderColumnRender = ({ record }: { record: OrderListItemType }) => { 54 const MainOrderColumnRender = ({ record }: { record: OrderListItemType }) => {
38 const handleExpand = (key: number) => { 55 const handleExpand = (key: number) => {
39 - if (expandedRowKeys.includes(key)) {  
40 - setSubOrderShowText('查看详情');  
41 - } else {  
42 - setSubOrderShowText('收起详情');  
43 - }  
44 const newExpandedRowKeys = expandedRowKeys.includes(key) 56 const newExpandedRowKeys = expandedRowKeys.includes(key)
45 ? expandedRowKeys.filter((k) => k !== key) 57 ? expandedRowKeys.filter((k) => k !== key)
46 : [...expandedRowKeys, key]; 58 : [...expandedRowKeys, key];
@@ -51,15 +63,15 @@ const OrderPage = () =&gt; { @@ -51,15 +63,15 @@ const OrderPage = () =&gt; {
51 <Flex vertical={true}> 63 <Flex vertical={true}>
52 {/* 编号、时间、销售信息 */} 64 {/* 编号、时间、销售信息 */}
53 <Flex justify="space-between" className="px-2 py-4 bg-gray-100"> 65 <Flex justify="space-between" className="px-2 py-4 bg-gray-100">
54 - {/* <Checkbox  
55 - onChange={() => onCheckboxChange(record.main_order_id)}  
56 - checked={selectedItems.includes(record.main_order_id)}  
57 - > */}  
58 - <Flex wrap="wrap" gap="middle">  
59 - <div>{record.createTime}</div>  
60 - <div>订单编号:{record.main_order_id}</div>  
61 - </Flex>  
62 - {/* </Checkbox> */} 66 + <Checkbox
  67 + onChange={() => onCheckboxChange(record.id)}
  68 + checked={selectedItems.includes(record.id)}
  69 + >
  70 + <Flex wrap="wrap" gap="middle">
  71 + <div>{record.createTime}</div>
  72 + <div>订单编号:{record.id}</div>
  73 + </Flex>
  74 + </Checkbox>
63 </Flex> 75 </Flex>
64 {/* 收货、开票、备注信息 */} 76 {/* 收货、开票、备注信息 */}
65 <Flex justify="space-between" className="px-2 py-4"> 77 <Flex justify="space-between" className="px-2 py-4">
@@ -156,6 +168,7 @@ const OrderPage = () =&gt; { @@ -156,6 +168,7 @@ const OrderPage = () =&gt; {
156 className="p-0" 168 className="p-0"
157 type="link" 169 type="link"
158 onClick={() => { 170 onClick={() => {
  171 + setOrderRow(record);
159 setCheckVisible(true); 172 setCheckVisible(true);
160 }} 173 }}
161 > 174 >
@@ -176,7 +189,7 @@ const OrderPage = () =&gt; { @@ -176,7 +189,7 @@ const OrderPage = () =&gt; {
176 onClick={() => handleExpand(record.id)} 189 onClick={() => handleExpand(record.id)}
177 size="small" 190 size="small"
178 > 191 >
179 - {subOrderShowText} 192 + {expandedRowKeys.includes(record.id) ? '收起详情' : '订单详情'}
180 </Button> 193 </Button>
181 </Space.Compact> 194 </Space.Compact>
182 </Space> 195 </Space>
@@ -211,11 +224,30 @@ const OrderPage = () =&gt; { @@ -211,11 +224,30 @@ const OrderPage = () =&gt; {
211 return { 224 return {
212 ...item, 225 ...item,
213 render: (text: string) => { 226 render: (text: string) => {
  227 + let label = enumValueToLabel(text, ORDER_STATUS_OPTIONS);
  228 + console.log('label:' + label);
  229 + if (label === undefined) {
  230 + label = enumValueToLabel(text, INVOCING_STATUS_OPTIONS);
  231 + }
214 let color = 'gold'; 232 let color = 'gold';
215 - if (text === '已开票' || text === '已审核') { 233 + if (label === '已开票' || label === '已审核') {
216 color = 'green'; 234 color = 'green';
217 } 235 }
218 - return <Tag color={color}>{text}</Tag>; 236 + return <Tag color={color}>{label}</Tag>;
  237 + },
  238 + };
  239 + }
  240 +
  241 + //枚举字段处理
  242 + if (item.key === 'paymentMethod' || item.key === 'paymentChannel') {
  243 + return {
  244 + ...item,
  245 + render: (text: string) => {
  246 + let label = enumValueToLabel(text, PAYMENT_CHANNEL_OPTIONS);
  247 + if (label === undefined) {
  248 + label = enumValueToLabel(text, PAYMENT_METHOD_OPTIONS);
  249 + }
  250 + return label;
219 }, 251 },
220 }; 252 };
221 } 253 }
@@ -227,9 +259,15 @@ const OrderPage = () =&gt; { @@ -227,9 +259,15 @@ const OrderPage = () =&gt; {
227 dataIndex: 'operation', 259 dataIndex: 'operation',
228 key: 'operation', 260 key: 'operation',
229 align: 'center', 261 align: 'center',
230 - render: () => ( 262 + render: (optText, optRecord) => (
231 <Flex> 263 <Flex>
232 - <Button type="link" size="small"> 264 + <Button
  265 + type="link"
  266 + size="small"
  267 + onClick={() => {
  268 + mainTableRef.current?.reload();
  269 + }}
  270 + >
233 编辑 271 编辑
234 </Button> 272 </Button>
235 <Button 273 <Button
@@ -237,7 +275,7 @@ const OrderPage = () =&gt; { @@ -237,7 +275,7 @@ const OrderPage = () =&gt; {
237 size="small" 275 size="small"
238 onClick={() => { 276 onClick={() => {
239 setCheckVisible(true); 277 setCheckVisible(true);
240 - setOrderRow(record); 278 + setOrderRow(optRecord);
241 }} 279 }}
242 > 280 >
243 审核 281 审核
@@ -294,11 +332,13 @@ const OrderPage = () =&gt; { @@ -294,11 +332,13 @@ const OrderPage = () =&gt; {
294 }} 332 }}
295 > 333 >
296 <ProTable 334 <ProTable
  335 + actionRef={mainTableRef}
297 expandIconColumnIndex={-1} 336 expandIconColumnIndex={-1}
298 columns={mainOrdersColumns} 337 columns={mainOrdersColumns}
299 rowKey="id" 338 rowKey="id"
300 pagination={{ 339 pagination={{
301 showQuickJumper: true, 340 showQuickJumper: true,
  341 + pageSize: 10,
302 }} 342 }}
303 expandedRowKeys={expandedRowKeys} 343 expandedRowKeys={expandedRowKeys}
304 expandable={{ expandedRowRender }} 344 expandable={{ expandedRowRender }}
@@ -311,14 +351,11 @@ const OrderPage = () =&gt; { @@ -311,14 +351,11 @@ const OrderPage = () =&gt; {
311 request={async ( 351 request={async (
312 // 第一个参数 params 查询表单和 params 参数的结合 352 // 第一个参数 params 查询表单和 params 参数的结合
313 // 第一个参数中一定会有 pageSize 和 current ,这两个参数是 antd 的规范 353 // 第一个参数中一定会有 pageSize 和 current ,这两个参数是 antd 的规范
314 - params: {  
315 - pageSize: 10;  
316 - current: 1;  
317 - }, 354 + params,
318 sorter, 355 sorter,
319 filter, 356 filter,
320 ) => { 357 ) => {
321 - const { data } = await postErpOrderListByPage({ 358 + const { data } = await postServiceOrderQueryServiceOrder({
322 // ...params, 359 // ...params,
323 // FIXME: remove @ts-ignore 360 // FIXME: remove @ts-ignore
324 // @ts-ignore 361 // @ts-ignore
@@ -326,17 +363,27 @@ const OrderPage = () =&gt; { @@ -326,17 +363,27 @@ const OrderPage = () =&gt; {
326 filter, 363 filter,
327 data: params, 364 data: params,
328 }); 365 });
329 - console.log(data); 366 + setMainOrderAllItemKeys(data?.data?.map((d) => d.id)); //存储所有主订单的key,一键展开用
330 return { 367 return {
331 data: data?.data || [], 368 data: data?.data || [],
  369 + total: data?.total || 0,
332 }; 370 };
333 }} 371 }}
334 toolBarRender={() => [ 372 toolBarRender={() => [
335 - <Button key="show">一键展开</Button>, 373 + <Button
  374 + key="show"
  375 + onClick={() => {
  376 + handleAllExpand();
  377 + }}
  378 + >
  379 + {mainOrderAllItemKeys.length !== expandedRowKeys.length
  380 + ? '一键展开'
  381 + : '一键收起'}
  382 + </Button>,
336 <Button key="out" onClick={() => setOrderDrawerVisible(true)}> 383 <Button key="out" onClick={() => setOrderDrawerVisible(true)}>
337 新增 384 新增
338 </Button>, 385 </Button>,
339 - <Button key="primary" type="primary"> 386 + <Button key="primary" type="primary" onClick={() => {}}>
340 导出 387 导出
341 </Button>, 388 </Button>,
342 ]} 389 ]}
@@ -348,17 +395,19 @@ const OrderPage = () =&gt; { @@ -348,17 +395,19 @@ const OrderPage = () =&gt; {
348 onClose={() => { 395 onClose={() => {
349 setOrderDrawerVisible(false); 396 setOrderDrawerVisible(false);
350 setOrderRow({}); 397 setOrderRow({});
  398 + mainTableRef.current?.reload();
351 }} 399 }}
352 /> 400 />
353 )} 401 )}
354 402
355 {checkVisible && ( 403 {checkVisible && (
356 <CheckModal 404 <CheckModal
357 - data={orderRow}  
358 setCheckVisible={setCheckVisible} 405 setCheckVisible={setCheckVisible}
  406 + data={orderRow}
359 onClose={() => { 407 onClose={() => {
360 setCheckVisible(false); 408 setCheckVisible(false);
361 setOrderRow({}); 409 setOrderRow({});
  410 + mainTableRef.current?.reload();
362 }} 411 }}
363 /> 412 />
364 )} 413 )}
src/pages/OrderPrint/index.tsx
@@ -19,7 +19,9 @@ function InvoiceDetails() { @@ -19,7 +19,9 @@ function InvoiceDetails() {
19 <div className="grid grid-cols-2 gap-4 mb-6 text-sm"> 19 <div className="grid grid-cols-2 gap-4 mb-6 text-sm">
20 <div> 20 <div>
21 <p>单位名称: 某某科技有限公司</p> 21 <p>单位名称: 某某科技有限公司</p>
  22 + <p>联系人: 张三</p>
22 <p>联系电话: 18583817221</p> 23 <p>联系电话: 18583817221</p>
  24 + <p>送货地址: 广东省东莞市</p>
23 </div> 25 </div>
24 <div className="text-right"> 26 <div className="text-right">
25 <p>编号: Canrd-DZ-2023-1101-004</p> 27 <p>编号: Canrd-DZ-2023-1101-004</p>
@@ -34,24 +36,24 @@ function ProductsTable() { @@ -34,24 +36,24 @@ function ProductsTable() {
34 <div className="mb-6"> 36 <div className="mb-6">
35 <table className="w-full text-sm border border-gray-300 table-fixed"> 37 <table className="w-full text-sm border border-gray-300 table-fixed">
36 <thead> 38 <thead>
37 - <tr className="bg-gray-200"> 39 + <tr className="">
38 <th className="w-1/4 p-2 border border-gray-300 border-solid"> 40 <th className="w-1/4 p-2 border border-gray-300 border-solid">
39 - 名称 41 + 序号
40 </th> 42 </th>
41 <th className="w-1/6 p-2 border border-gray-300 border-solid"> 43 <th className="w-1/6 p-2 border border-gray-300 border-solid">
42 - 规格 44 + 订单号
43 </th> 45 </th>
44 <th className="w-1/6 p-2 border border-gray-300 border-solid"> 46 <th className="w-1/6 p-2 border border-gray-300 border-solid">
45 - 单位 47 + 货品名称
46 </th> 48 </th>
47 <th className="w-1/12 p-2 border border-gray-300 border-solid"> 49 <th className="w-1/12 p-2 border border-gray-300 border-solid">
48 - 数量 50 + 规格
49 </th> 51 </th>
50 <th className="w-1/6 p-2 border border-gray-300 border-solid"> 52 <th className="w-1/6 p-2 border border-gray-300 border-solid">
51 - 单 53 + 单
52 </th> 54 </th>
53 <th className="w-1/6 p-2 border border-gray-300 border-solid"> 55 <th className="w-1/6 p-2 border border-gray-300 border-solid">
54 - 金额 56 + 数量
55 </th> 57 </th>
56 <th className="w-1/4 p-2 border border-gray-300 border-solid"> 58 <th className="w-1/4 p-2 border border-gray-300 border-solid">
57 备注 59 备注
src/services/definition.ts
@@ -2,3 +2,857 @@ @@ -2,3 +2,857 @@
2 /* tslint:disable */ 2 /* tslint:disable */
3 /** Do not modify manually. 3 /** Do not modify manually.
4 content is generated automatically by `ts-gear`. */ 4 content is generated automatically by `ts-gear`. */
  5 +export type ModelAndViewStatus =
  6 + | '100 CONTINUE'
  7 + | '101 SWITCHING_PROTOCOLS'
  8 + | '102 PROCESSING'
  9 + | '103 CHECKPOINT'
  10 + | '200 OK'
  11 + | '201 CREATED'
  12 + | '202 ACCEPTED'
  13 + | '203 NON_AUTHORITATIVE_INFORMATION'
  14 + | '204 NO_CONTENT'
  15 + | '205 RESET_CONTENT'
  16 + | '206 PARTIAL_CONTENT'
  17 + | '207 MULTI_STATUS'
  18 + | '208 ALREADY_REPORTED'
  19 + | '226 IM_USED'
  20 + | '300 MULTIPLE_CHOICES'
  21 + | '301 MOVED_PERMANENTLY'
  22 + | '302 FOUND'
  23 + | '302 MOVED_TEMPORARILY'
  24 + | '303 SEE_OTHER'
  25 + | '304 NOT_MODIFIED'
  26 + | '305 USE_PROXY'
  27 + | '307 TEMPORARY_REDIRECT'
  28 + | '308 PERMANENT_REDIRECT'
  29 + | '400 BAD_REQUEST'
  30 + | '401 UNAUTHORIZED'
  31 + | '402 PAYMENT_REQUIRED'
  32 + | '403 FORBIDDEN'
  33 + | '404 NOT_FOUND'
  34 + | '405 METHOD_NOT_ALLOWED'
  35 + | '406 NOT_ACCEPTABLE'
  36 + | '407 PROXY_AUTHENTICATION_REQUIRED'
  37 + | '408 REQUEST_TIMEOUT'
  38 + | '409 CONFLICT'
  39 + | '410 GONE'
  40 + | '411 LENGTH_REQUIRED'
  41 + | '412 PRECONDITION_FAILED'
  42 + | '413 PAYLOAD_TOO_LARGE'
  43 + | '413 REQUEST_ENTITY_TOO_LARGE'
  44 + | '414 URI_TOO_LONG'
  45 + | '414 REQUEST_URI_TOO_LONG'
  46 + | '415 UNSUPPORTED_MEDIA_TYPE'
  47 + | '416 REQUESTED_RANGE_NOT_SATISFIABLE'
  48 + | '417 EXPECTATION_FAILED'
  49 + | '418 I_AM_A_TEAPOT'
  50 + | '419 INSUFFICIENT_SPACE_ON_RESOURCE'
  51 + | '420 METHOD_FAILURE'
  52 + | '421 DESTINATION_LOCKED'
  53 + | '422 UNPROCESSABLE_ENTITY'
  54 + | '423 LOCKED'
  55 + | '424 FAILED_DEPENDENCY'
  56 + | '425 TOO_EARLY'
  57 + | '426 UPGRADE_REQUIRED'
  58 + | '428 PRECONDITION_REQUIRED'
  59 + | '429 TOO_MANY_REQUESTS'
  60 + | '431 REQUEST_HEADER_FIELDS_TOO_LARGE'
  61 + | '451 UNAVAILABLE_FOR_LEGAL_REASONS'
  62 + | '500 INTERNAL_SERVER_ERROR'
  63 + | '501 NOT_IMPLEMENTED'
  64 + | '502 BAD_GATEWAY'
  65 + | '503 SERVICE_UNAVAILABLE'
  66 + | '504 GATEWAY_TIMEOUT'
  67 + | '505 HTTP_VERSION_NOT_SUPPORTED'
  68 + | '506 VARIANT_ALSO_NEGOTIATES'
  69 + | '507 INSUFFICIENT_STORAGE'
  70 + | '508 LOOP_DETECTED'
  71 + | '509 BANDWIDTH_LIMIT_EXCEEDED'
  72 + | '510 NOT_EXTENDED'
  73 + | '511 NETWORK_AUTHENTICATION_REQUIRED';
  74 +export interface AdminAuthRoleVO {
  75 + menuIds?: Array<number>;
  76 + /** @format int64 */
  77 + roleId?: number;
  78 +}
  79 +
  80 +export interface AdminAuthUserVO {
  81 + roleIds?: Array<number>;
  82 + /** @format int64 */
  83 + userId?: number;
  84 +}
  85 +
  86 +export interface AdminDeptQueryVO {
  87 + /** @format int32 */
  88 + current?: number;
  89 + /** @format int64 */
  90 + id?: number;
  91 + ids?: Array<number>;
  92 + name?: string;
  93 + /** @format int32 */
  94 + pageSize?: number;
  95 + /** @format int64 */
  96 + pid?: number;
  97 + /** @format int32 */
  98 + total?: number;
  99 +}
  100 +
  101 +export interface AdminDeptVO {
  102 + /** @format int64 */
  103 + id?: number;
  104 + name?: string;
  105 + /** @format int64 */
  106 + pid?: number;
  107 +}
  108 +
  109 +export interface AdminJobQueryVO {
  110 + /** @format int32 */
  111 + current?: number;
  112 + /** @format int64 */
  113 + id?: number;
  114 + ids?: Array<number>;
  115 + name?: string;
  116 + /** @format int32 */
  117 + pageSize?: number;
  118 + /** @format int32 */
  119 + sort?: number;
  120 + /** @format int32 */
  121 + total?: number;
  122 +}
  123 +
  124 +export interface AdminJobVO {
  125 + /** @format int64 */
  126 + id?: number;
  127 + name?: string;
  128 + /** @format int32 */
  129 + sort?: number;
  130 +}
  131 +
  132 +export interface AdminMenuQueryVO {
  133 + /** @format int32 */
  134 + cache?: number;
  135 + component?: string;
  136 + /** @format int32 */
  137 + current?: number;
  138 + /** @format int32 */
  139 + hidden?: number;
  140 + icon?: string;
  141 + /** @format int64 */
  142 + id?: number;
  143 + ids?: Array<number>;
  144 + /** @format int32 */
  145 + iframe?: number;
  146 + name?: string;
  147 + /** @format int32 */
  148 + pageSize?: number;
  149 + path?: string;
  150 + permission?: string;
  151 + /** @format int64 */
  152 + pid?: number;
  153 + /** @format int32 */
  154 + total?: number;
  155 + /** @format int32 */
  156 + type?: number;
  157 +}
  158 +
  159 +export interface AdminMenuVO {
  160 + /** @format int32 */
  161 + cache?: number;
  162 + component?: string;
  163 + /** @format int32 */
  164 + hidden?: number;
  165 + icon?: string;
  166 + /** @format int64 */
  167 + id?: number;
  168 + /** @format int32 */
  169 + iframe?: number;
  170 + name?: string;
  171 + path?: string;
  172 + permission?: string;
  173 + /** @format int64 */
  174 + pid?: number;
  175 + title?: string;
  176 + /** @format int32 */
  177 + type?: number;
  178 +}
  179 +
  180 +export interface AdminRoleQueryVO {
  181 + /** @format int32 */
  182 + current?: number;
  183 + dataScope?: string;
  184 + /** @format int64 */
  185 + id?: number;
  186 + ids?: Array<number>;
  187 + /** @format int32 */
  188 + level?: number;
  189 + name?: string;
  190 + /** @format int32 */
  191 + pageSize?: number;
  192 + permission?: string;
  193 + remark?: string;
  194 + /** @format int32 */
  195 + total?: number;
  196 +}
  197 +
  198 +export interface AdminRoleVO {
  199 + dataScope?: string;
  200 + description?: string;
  201 + /** @format int64 */
  202 + id?: number;
  203 + /** @format int32 */
  204 + level?: number;
  205 + name?: string;
  206 +}
  207 +
  208 +export interface AdminUserLoginByPhoneVO {
  209 + /** @format int32 */
  210 + current?: number;
  211 + /** @format int32 */
  212 + pageSize?: number;
  213 + phone?: string;
  214 + smsCaptchaCode?: string;
  215 + /** @format int32 */
  216 + total?: number;
  217 +}
  218 +
  219 +export interface AdminUserLoginByPwdVO {
  220 + /** @format int32 */
  221 + current?: number;
  222 + imgCaptchaCode?: string;
  223 + imgCaptchaUuid?: string;
  224 + /** @format int32 */
  225 + pageSize?: number;
  226 + password?: string;
  227 + /** @format int32 */
  228 + total?: number;
  229 + userName?: string;
  230 +}
  231 +
  232 +export interface AdminUserModifyPwdVO {
  233 + confirmPassword?: string;
  234 + /** @format int32 */
  235 + current?: number;
  236 + /** @format int32 */
  237 + pageSize?: number;
  238 + password?: string;
  239 + phone?: string;
  240 + smsCaptchaCode?: string;
  241 + /** @format int32 */
  242 + total?: number;
  243 +}
  244 +
  245 +export interface AdminUserPasswordRecoverEmailVO {
  246 + /** @format int32 */
  247 + current?: number;
  248 + /** @format int32 */
  249 + pageSize?: number;
  250 + /** @format int32 */
  251 + total?: number;
  252 + userName?: string;
  253 +}
  254 +
  255 +export interface AdminUserQueryVO {
  256 + /** @format int32 */
  257 + current?: number;
  258 + email?: string;
  259 + /** @format int64 */
  260 + id?: number;
  261 + ids?: Array<number>;
  262 + nickName?: string;
  263 + /** @format int32 */
  264 + pageSize?: number;
  265 + password?: string;
  266 + phone?: string;
  267 + sex?: string;
  268 + /** @format int32 */
  269 + total?: number;
  270 + userName?: string;
  271 + workerType?: string;
  272 +}
  273 +
  274 +export interface AdminUserRegisterVO {
  275 + confirmPassword?: string;
  276 + /** @format int32 */
  277 + current?: number;
  278 + email?: string;
  279 + isAgreeAgreement?: boolean;
  280 + /** @format int32 */
  281 + pageSize?: number;
  282 + password?: string;
  283 + phone?: string;
  284 + safeAnswer?: string;
  285 + safeQuestion?: string;
  286 + smsCaptchaCode?: string;
  287 + /** @format int32 */
  288 + total?: number;
  289 + userName?: string;
  290 +}
  291 +
  292 +export interface AdminUserVO {
  293 + avatarName?: string;
  294 + avatarPath?: string;
  295 + /** @format int64 */
  296 + deptId?: number;
  297 + email?: string;
  298 + gender?: string;
  299 + /** @format int64 */
  300 + id?: number;
  301 + isAdmin?: boolean;
  302 + nickName?: string;
  303 + password?: string;
  304 + phone?: string;
  305 + /** @format date-time */
  306 + pwdResetTime?: string;
  307 + remark?: string;
  308 + /** @format int64 */
  309 + roleId?: number;
  310 + userName?: string;
  311 +}
  312 +
  313 +export interface AuditVO {
  314 + /** @format int32 */
  315 + current?: number;
  316 + /** @format int64 */
  317 + id?: number;
  318 + /** @format int32 */
  319 + pageSize?: number;
  320 + /** @format int32 */
  321 + status?: number;
  322 + /** @format int32 */
  323 + total?: number;
  324 +}
  325 +
  326 +export interface CaptchaMessageVO {
  327 + /** @format int32 */
  328 + current?: number;
  329 + imgCaptchaCode?: string;
  330 + imgCaptchaUuid?: string;
  331 + /** @format int32 */
  332 + pageSize?: number;
  333 + phone?: string;
  334 + /** @format int32 */
  335 + total?: number;
  336 + type?: string;
  337 +}
  338 +
  339 +export interface DictionaryQueryVO {
  340 + /** @format int32 */
  341 + current?: number;
  342 + dictCode?: string;
  343 + dictName?: string;
  344 + dictValue?: string;
  345 + /** @format int64 */
  346 + id?: number;
  347 + ids?: Array<number>;
  348 + /** @format int32 */
  349 + pageSize?: number;
  350 + remark?: string;
  351 + /** @format int32 */
  352 + sort?: number;
  353 + /** @format int32 */
  354 + total?: number;
  355 +}
  356 +
  357 +export interface DictionaryVO {
  358 + dictCode?: string;
  359 + dictName?: string;
  360 + dictValue?: string;
  361 + /** @format int64 */
  362 + id?: number;
  363 + remark?: string;
  364 + /** @format int32 */
  365 + sort?: number;
  366 +}
  367 +
  368 +export interface ModelAndView {
  369 + empty?: boolean;
  370 + model?: any;
  371 + modelMap?: {
  372 + [propertyName: string]: any;
  373 + };
  374 + reference?: boolean;
  375 + status?: ModelAndViewStatus;
  376 + view?: View;
  377 + viewName?: string;
  378 +}
  379 +
  380 +export interface OrderAddVO {
  381 + baseInfo?: OrderBaseInfoVO;
  382 + inspectionStageInfo?: OrderInspectionStageVO;
  383 + profitAnalysisInfo?: OrderProfitAnalysisVO;
  384 + reportInfo?: OrderCompletionReportVO;
  385 + trackStageInfo?: OrderTrackStageVO;
  386 +}
  387 +
  388 +export interface OrderAuditLogQueryVO {
  389 + /** @format int64 */
  390 + applyId?: number;
  391 + /** @format int32 */
  392 + current?: number;
  393 + /** @format int64 */
  394 + id?: number;
  395 + ids?: Array<number>;
  396 + optType?: string;
  397 + /** @format int64 */
  398 + orderId?: number;
  399 + /** @format int32 */
  400 + pageSize?: number;
  401 + /** @format int32 */
  402 + total?: number;
  403 +}
  404 +
  405 +export interface OrderBaseFieldVO {
  406 + cnColor?: string;
  407 + collection?: string;
  408 + customerCode?: string;
  409 + customerPo?: string;
  410 + customerStyle?: string;
  411 + innerNo?: string;
  412 + modeleLo?: string;
  413 + orderComposition?: string;
  414 + orderCount?: string;
  415 + orderHodTime?: string;
  416 + orderStatus?: string;
  417 + outboundType?: string;
  418 + packetType?: string;
  419 + picUrl?: string;
  420 + poColor?: string;
  421 + productStyle?: string;
  422 + productionComment?: string;
  423 + productionDepartment?: string;
  424 + productionDepartmentConsignTime?: string;
  425 + projectNo?: string;
  426 +}
  427 +
  428 +export interface OrderBaseInfoQueryVO {
  429 + cnColor?: string;
  430 + collection?: string;
  431 + /** @format int32 */
  432 + current?: number;
  433 + customerCode?: string;
  434 + customerPo?: string;
  435 + customerStyle?: string;
  436 + /** @format int64 */
  437 + id?: number;
  438 + ids?: Array<number>;
  439 + innerNo?: string;
  440 + modeleLo?: string;
  441 + orderComposition?: string;
  442 + /** @format int32 */
  443 + orderCount?: number;
  444 + orderHodTime?: string;
  445 + outboundType?: string;
  446 + packetType?: string;
  447 + /** @format int32 */
  448 + pageSize?: number;
  449 + picUrl?: string;
  450 + poColor?: string;
  451 + productStyle?: string;
  452 + productionComment?: string;
  453 + productionDepartment?: string;
  454 + productionDepartmentConsignTime?: string;
  455 + projectNo?: string;
  456 + /** @format int32 */
  457 + total?: number;
  458 +}
  459 +
  460 +export interface OrderBaseInfoVO {
  461 + cnColor?: string;
  462 + collection?: string;
  463 + customerCode?: string;
  464 + customerPo?: string;
  465 + customerStyle?: string;
  466 + /** @format int64 */
  467 + id?: number;
  468 + innerNo?: string;
  469 + modeleLo?: string;
  470 + orderComposition?: string;
  471 + /** @format int32 */
  472 + orderCount?: number;
  473 + orderHodTime?: string;
  474 + /** @format int32 */
  475 + orderStatus?: number;
  476 + outboundType?: string;
  477 + packetType?: string;
  478 + picUrl?: string;
  479 + poColor?: string;
  480 + productStyle?: string;
  481 + productionComment?: string;
  482 + productionDepartment?: string;
  483 + productionDepartmentConsignTime?: string;
  484 + projectNo?: string;
  485 + smallPicUrl?: string;
  486 +}
  487 +
  488 +export interface OrderCompletionReportFieldVO {
  489 + ideaManualRate?: string;
  490 + ideaSource?: string;
  491 + manualPreform?: string;
  492 + /** @format int64 */
  493 + orderId?: number;
  494 + orderStatus?: string;
  495 +}
  496 +
  497 +export interface OrderCompletionReportVO {
  498 + /** @format int64 */
  499 + id?: number;
  500 + /** @format double */
  501 + ideaManualRate?: number;
  502 + ideaSource?: string;
  503 + manualPreform?: string;
  504 + /** @format int64 */
  505 + orderId?: number;
  506 + /** @format int32 */
  507 + orderStatus?: number;
  508 +}
  509 +
  510 +export interface OrderFieldLockApplyQueryVO {
  511 + /** @format int64 */
  512 + applyUserId?: number;
  513 + /** @format int64 */
  514 + auditUserId?: number;
  515 + /** @format int32 */
  516 + current?: number;
  517 + fields?: string;
  518 + /** @format int64 */
  519 + id?: number;
  520 + ids?: Array<number>;
  521 + /** @format int64 */
  522 + orderId?: number;
  523 + /** @format int32 */
  524 + pageSize?: number;
  525 + /** @format int32 */
  526 + status?: number;
  527 + statusList?: Array<number>;
  528 + /** @format int32 */
  529 + total?: number;
  530 + /** @format int32 */
  531 + type?: number;
  532 +}
  533 +
  534 +export interface OrderInspectionStageFieldVO {
  535 + boxPacket?: string;
  536 + electroplate?: string;
  537 + endCheckApplyTime?: string;
  538 + endCheckResult?: string;
  539 + functionality?: string;
  540 + midCheckApplyTime?: string;
  541 + midCheckComment?: string;
  542 + midCheckResult?: string;
  543 + orderStatus?: string;
  544 + specification?: string;
  545 + value1?: string;
  546 + value2?: string;
  547 + value3?: string;
  548 +}
  549 +
  550 +export interface OrderInspectionStageVO {
  551 + boxPacket?: string;
  552 + electroplate?: string;
  553 + endCheckApplyTime?: string;
  554 + endCheckResult?: string;
  555 + functionality?: string;
  556 + /** @format int64 */
  557 + id?: number;
  558 + midCheckApplyTime?: string;
  559 + midCheckComment?: string;
  560 + midCheckResult?: string;
  561 + /** @format int64 */
  562 + orderId?: number;
  563 + /** @format int32 */
  564 + orderStatus?: number;
  565 + specification?: string;
  566 + value1?: string;
  567 + value2?: string;
  568 + value3?: string;
  569 +}
  570 +
  571 +export interface OrderOptLogQueryVO {
  572 + /** @format int32 */
  573 + current?: number;
  574 + /** @format int64 */
  575 + id?: number;
  576 + ids?: Array<number>;
  577 + /** @format int64 */
  578 + orderId?: number;
  579 + /** @format int32 */
  580 + pageSize?: number;
  581 + /** @format int32 */
  582 + total?: number;
  583 +}
  584 +
  585 +export interface OrderProfitAnalysisFieldVO {
  586 + customerPrice?: string;
  587 + customerTotalPrice?: string;
  588 + exchangeRate?: string;
  589 + /** @format int64 */
  590 + orderId?: number;
  591 + orderStatus?: string;
  592 + packetPrice?: string;
  593 + packetTotalPrice?: string;
  594 + productionDepartmentPrice?: string;
  595 + productionDepartmentTotalPrice?: string;
  596 + profitRate?: string;
  597 +}
  598 +
  599 +export interface OrderProfitAnalysisVO {
  600 + customerCurrency?: string;
  601 + /** @format double */
  602 + customerPrice?: number;
  603 + /** @format double */
  604 + customerTotalPrice?: number;
  605 + /** @format double */
  606 + exchangeRate?: number;
  607 + /** @format int64 */
  608 + id?: number;
  609 + /** @format int64 */
  610 + orderId?: number;
  611 + /** @format int32 */
  612 + orderStatus?: number;
  613 + packetCurrency?: string;
  614 + /** @format double */
  615 + packetPrice?: number;
  616 + /** @format double */
  617 + packetTotalPrice?: number;
  618 + productionDepartmentCurrency?: string;
  619 + /** @format double */
  620 + productionDepartmentPrice?: number;
  621 + /** @format double */
  622 + productionDepartmentTotalPrice?: number;
  623 + /** @format double */
  624 + profitRate?: number;
  625 +}
  626 +
  627 +export interface OrderProfitAnalysisVo {
  628 + orderIds?: Array<number>;
  629 +}
  630 +
  631 +export interface OrderTrackStageFieldVO {
  632 + aitexTestFinishResult?: string;
  633 + aitexTestSendTime?: string;
  634 + barcodeStickerArrivalTime?: string;
  635 + esoSampleSendTime?: string;
  636 + latestArrivalTime?: string;
  637 + latestBkTime?: string;
  638 + orderStatus?: string;
  639 + ppConfirmResult?: string;
  640 + ppTime?: string;
  641 + selfTestPassTime?: string;
  642 + sgsTestFinishResult?: string;
  643 + sgsTestSendTime?: string;
  644 + shippmentSampleConfirmResult?: string;
  645 + shippmentSampleSendTime?: string;
  646 +}
  647 +
  648 +export interface OrderTrackStageVO {
  649 + aitexTestFinishResult?: string;
  650 + aitexTestSendTime?: string;
  651 + barcodeStickerArrivalTime?: string;
  652 + esoSampleSendTime?: string;
  653 + /** @format int64 */
  654 + id?: number;
  655 + latestArrivalTime?: string;
  656 + latestBkTime?: string;
  657 + /** @format int64 */
  658 + orderId?: number;
  659 + /** @format int32 */
  660 + orderStatus?: number;
  661 + ppConfirmResult?: string;
  662 + ppTime?: string;
  663 + selfTestPassTime?: string;
  664 + sgsTestFinishResult?: string;
  665 + sgsTestSendTime?: string;
  666 + shippmentSampleConfirmResult?: string;
  667 + shippmentSampleSendTime?: string;
  668 +}
  669 +
  670 +export interface OrderUnlockFieldApplyVO {
  671 + baseFields?: OrderBaseFieldVO;
  672 + inspectionStageFields?: OrderInspectionStageFieldVO;
  673 + /** @format int64 */
  674 + orderId?: number;
  675 + profitAnalysisFields?: OrderProfitAnalysisFieldVO;
  676 + reportFields?: OrderCompletionReportFieldVO;
  677 + trackStageFields?: OrderTrackStageFieldVO;
  678 +}
  679 +
  680 +export interface OrderUpdateVO {
  681 + baseInfo?: OrderBaseInfoVO;
  682 + inspectionStageInfo?: OrderInspectionStageVO;
  683 + /** @format int64 */
  684 + orderId?: number;
  685 + profitAnalysisInfo?: OrderProfitAnalysisVO;
  686 + reportInfo?: OrderCompletionReportVO;
  687 + trackStageInfo?: OrderTrackStageVO;
  688 +}
  689 +
  690 +export interface ProductInformationDto {
  691 + /**
  692 + * @description
  693 + * 货品编码
  694 + */
  695 + productCode?: string;
  696 + /**
  697 + * @description
  698 + * 货品名称
  699 + */
  700 + productName?: string;
  701 +}
  702 +
  703 +export interface ResetPwdVO {
  704 + /** @format int64 */
  705 + userId?: number;
  706 +}
  707 +
  708 +export interface ServerResult {
  709 + data?: any;
  710 + message?: string;
  711 + /** @format int32 */
  712 + result?: number;
  713 +}
  714 +
  715 +export interface SysLogQueryVO {
  716 + address?: string;
  717 + browser?: string;
  718 + /** @format int32 */
  719 + current?: number;
  720 + description?: string;
  721 + exceptionDetail?: string;
  722 + /** @format int64 */
  723 + id?: number;
  724 + ids?: Array<number>;
  725 + logType?: string;
  726 + method?: string;
  727 + /** @format int32 */
  728 + pageSize?: number;
  729 + params?: string;
  730 + requestIp?: string;
  731 + /** @format int64 */
  732 + time?: number;
  733 + /** @format int32 */
  734 + total?: number;
  735 + username?: string;
  736 +}
  737 +
  738 +export interface UpdatePwdVO {
  739 + confirmPassword?: string;
  740 + password?: string;
  741 + /** @format int64 */
  742 + userId?: number;
  743 +}
  744 +
  745 +export interface View {
  746 + contentType?: string;
  747 +}
  748 +
  749 +export interface Dto {
  750 + /**
  751 + * @description
  752 + * 银行名称
  753 + */
  754 + bank?: string;
  755 + /**
  756 + * @description
  757 + * 开始时间
  758 + * @format date-time
  759 + * @example
  760 + * 2023-11-11 10:10
  761 + */
  762 + beginTime?: string;
  763 + /** @format int32 */
  764 + current?: number;
  765 + /**
  766 + * @description
  767 + * 收货人联系手机号
  768 + */
  769 + customerContactNumber?: string;
  770 + /**
  771 + * @description
  772 + * 收货人姓名
  773 + */
  774 + customerName?: string;
  775 + /**
  776 + * @description
  777 + * 收货人地址信息
  778 + */
  779 + customerShippingAddress?: string;
  780 + /**
  781 + * @description
  782 + * 结束时间
  783 + * @format date-time
  784 + * @example
  785 + * 2023-11-11 10:20
  786 + */
  787 + endTime?: string;
  788 + /**
  789 + * @description
  790 + * 主订单号id
  791 + * @format int64
  792 + */
  793 + id?: number;
  794 + /**
  795 + * @description
  796 + * 单位
  797 + */
  798 + institution?: string;
  799 + /**
  800 + * @description
  801 + * 单位联系人
  802 + */
  803 + institutionContactName?: string;
  804 + /**
  805 + * @description
  806 + * 开票状态
  807 + */
  808 + invoicingStatus?: string;
  809 + /**
  810 + * @description
  811 + * 物流方式
  812 + */
  813 + logisticsMethod?: string;
  814 + /**
  815 + * @description
  816 + * 订单状态
  817 + */
  818 + orderStatus?: string;
  819 + /** @format int32 */
  820 + pageSize?: number;
  821 + /**
  822 + * @description
  823 + * 商品参数
  824 + */
  825 + parameters?: string;
  826 + /**
  827 + * @description
  828 + * 支付渠道
  829 + */
  830 + paymentChannel?: string;
  831 + /**
  832 + * @description
  833 + * 支付方式
  834 + */
  835 + paymentMethod?: string;
  836 + /**
  837 + * @description
  838 + * 支付流水号
  839 + */
  840 + paymentTransactionId?: string;
  841 + /**
  842 + * @description
  843 + * 商品所属事业部门
  844 + */
  845 + productBelongBusiness?: string;
  846 + /**
  847 + * @description
  848 + * 商品名称
  849 + */
  850 + productName?: string;
  851 + /**
  852 + * @description
  853 + * 销售代号
  854 + */
  855 + salesCode?: string;
  856 + /** @format int32 */
  857 + total?: number;
  858 +}