Commit 2c5b8b425dda56555942968b5ed50c866083ea51

Authored by 曾国涛
2 parents 0e55a8c7 903e51ef

Merge remote-tracking branch 'origin/master'

.umirc.ts
@@ -15,6 +15,7 @@ export default defineConfig({ @@ -15,6 +15,7 @@ export default defineConfig({
15 proxy: { 15 proxy: {
16 '/api/': { 16 '/api/': {
17 target: 'http://localhost:8085/', 17 target: 'http://localhost:8085/',
  18 + // target: 'http://192.168.31.242:8085/',
18 // target: 'http://192.168.1.6:8085/', 19 // target: 'http://192.168.1.6:8085/',
19 // target: 'http://39.108.227.113:8085/', 20 // target: 'http://39.108.227.113:8085/',
20 changeOrigin: true, 21 changeOrigin: true,
@@ -56,7 +57,6 @@ export default defineConfig({ @@ -56,7 +57,6 @@ export default defineConfig({
56 { 57 {
57 name: '预警白名单', 58 name: '预警白名单',
58 path: 'WarningWhitelist', 59 path: 'WarningWhitelist',
59 - access: 'canReadAdminAndSalesManager',  
60 component: './Order/WarningWhitelist', 60 component: './Order/WarningWhitelist',
61 }, 61 },
62 { 62 {
src/pages/Instalment/components/upload/uploadApp.tsx
@@ -24,7 +24,7 @@ const App: React.FC = ({ uploadFile }) => { @@ -24,7 +24,7 @@ const App: React.FC = ({ uploadFile }) => {
24 <p className="ant-upload-text">点击或者拖动文件到此处</p> 24 <p className="ant-upload-text">点击或者拖动文件到此处</p>
25 </Dragger> 25 </Dragger>
26 <a 26 <a
27 - href="https://order-erp.oss-cn-qingdao.aliyuncs.com/%E5%88%86%E6%9C%9F%E4%BB%98%E6%AC%BE-%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx?Expires=2036232762&OSSAccessKeyId=LTAIZCPI7OaWud0m&Signature=rtc7LNVK9g3flXQeHdeGOXFOocY%3D" 27 + href="https://order-erp.oss-cn-qingdao.aliyuncs.com/%E5%88%86%E6%9C%9F%E4%BB%98%E6%AC%BE-%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx?Expires=2052956820&OSSAccessKeyId=LTAI5t8KJVEXp3k5CT8pt9wG&Signature=Y3uJ4sOXBf8I6sxURlRhs%2BjRCrI%3D"
28 className="modul-a" 28 className="modul-a"
29 > 29 >
30 下载模板 30 下载模板
src/pages/Instalment/components/upload/uploadModel.tsx
@@ -25,7 +25,7 @@ export default ({ toReload }) =&gt; { @@ -25,7 +25,7 @@ export default ({ toReload }) =&gt; {
25 name: string; 25 name: string;
26 company: string; 26 company: string;
27 }> 27 }>
28 - title="新建表单" 28 + title="导入数据表单"
29 trigger={ 29 trigger={
30 <Button 30 <Button
31 type="primary" 31 type="primary"
src/pages/Order/Order/components/OrderDrawer.tsx
@@ -36,6 +36,7 @@ import { @@ -36,6 +36,7 @@ import {
36 ProFormDateTimePicker, 36 ProFormDateTimePicker,
37 ProFormDigit, 37 ProFormDigit,
38 ProFormList, 38 ProFormList,
  39 + ProFormRadio,
39 ProFormSelect, 40 ProFormSelect,
40 ProFormText, 41 ProFormText,
41 ProFormTextArea, 42 ProFormTextArea,
@@ -106,6 +107,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -106,6 +107,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
106 filePaths: []; 107 filePaths: [];
107 notes: ''; 108 notes: '';
108 invoiceFirst: boolean; 109 invoiceFirst: boolean;
  110 + proxy: '';
109 list: [ 111 list: [
110 { 112 {
111 productCode: ''; 113 productCode: '';
@@ -842,6 +844,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -842,6 +844,7 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
842 disabled={optType('after-sales-check')} 844 disabled={optType('after-sales-check')}
843 onClick={() => { 845 onClick={() => {
844 setSubmitBtnLoading(true); 846 setSubmitBtnLoading(true);
  847 + console.log(props);
845 props.submit(); 848 props.submit();
846 }} 849 }}
847 > 850 >
@@ -1983,6 +1986,22 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -1983,6 +1986,22 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
1983 rules={[{ required: true, message: '所属事业部必填' }]} 1986 rules={[{ required: true, message: '所属事业部必填' }]}
1984 disabled={optType('after-sales-check')} 1987 disabled={optType('after-sales-check')}
1985 />, 1988 />,
  1989 + <ProFormRadio.Group
  1990 + key="proxy"
  1991 + name="proxy"
  1992 + label="是否代买代购"
  1993 + initialValue={false}
  1994 + options={[
  1995 + {
  1996 + label: '是',
  1997 + value: true,
  1998 + },
  1999 + {
  2000 + label: '否',
  2001 + value: false,
  2002 + },
  2003 + ]}
  2004 + />,
1986 <ProFormSelect 2005 <ProFormSelect
1987 key={'shippingWarehouse' + listMeta.index} 2006 key={'shippingWarehouse' + listMeta.index}
1988 placeholder="请选择发货仓库" 2007 placeholder="请选择发货仓库"
src/pages/Order/OrderList/OrderDrawer.tsx
@@ -44,7 +44,7 @@ import { @@ -44,7 +44,7 @@ import {
44 ProFormTextArea, 44 ProFormTextArea,
45 ProFormUploadDragger, 45 ProFormUploadDragger,
46 } from '@ant-design/pro-components'; 46 } from '@ant-design/pro-components';
47 -import { Group } from '@ant-design/pro-form'; 47 +import { Group, ProFormRadio } from '@ant-design/pro-form';
48 import { Button, Form, message, Modal } from 'antd'; 48 import { Button, Form, message, Modal } from 'antd';
49 import { cloneDeep } from 'lodash'; 49 import { cloneDeep } from 'lodash';
50 import { useEffect, useRef, useState } from 'react'; 50 import { useEffect, useRef, useState } from 'react';
@@ -2114,6 +2114,22 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; { @@ -2114,6 +2114,22 @@ export default ({ onClose, data, subOrders, orderOptType }) =&gt; {
2114 rules={[{ required: true, message: '所属事业部必填' }]} 2114 rules={[{ required: true, message: '所属事业部必填' }]}
2115 disabled={optType('after-sales-check')} 2115 disabled={optType('after-sales-check')}
2116 />, 2116 />,
  2117 + <ProFormRadio.Group
  2118 + key="proxy"
  2119 + name="proxy"
  2120 + label="是否代买代购"
  2121 + initialValue={false}
  2122 + options={[
  2123 + {
  2124 + label: '是',
  2125 + value: true,
  2126 + },
  2127 + {
  2128 + label: '否',
  2129 + value: false,
  2130 + },
  2131 + ]}
  2132 + />,
2117 <ProFormSelect 2133 <ProFormSelect
2118 key={'shippingWarehouse' + listMeta.index} 2134 key={'shippingWarehouse' + listMeta.index}
2119 placeholder="请选择发货仓库" 2135 placeholder="请选择发货仓库"
src/pages/OrderReport/components/OrderDualAxes.tsx
@@ -52,7 +52,6 @@ const OrderDualAxes = ({ data, statisticMethod, onXValueClick }) =&gt; { @@ -52,7 +52,6 @@ const OrderDualAxes = ({ data, statisticMethod, onXValueClick }) =&gt; {
52 if (!yearFromXValue) { 52 if (!yearFromXValue) {
53 return; 53 return;
54 } 54 }
55 - console.log(pointData, '5656pointData');  
56 // // 减 1 获得目标年份 55 // // 减 1 获得目标年份
57 // const targetYear = String(Number(yearFromXValue) - 1); // "2024" 56 // const targetYear = String(Number(yearFromXValue) - 1); // "2024"
58 57
src/pages/OrderReport/index.tsx
@@ -21,8 +21,13 @@ import OrderStatisticCard from &#39;./components/OrderStatisticCard&#39;; @@ -21,8 +21,13 @@ import OrderStatisticCard from &#39;./components/OrderStatisticCard&#39;;
21 import './index.less'; 21 import './index.less';
22 const OrderReportPage = () => { 22 const OrderReportPage = () => {
23 const [salesCodeOptions, setSalesCodeOptions] = useState([]); 23 const [salesCodeOptions, setSalesCodeOptions] = useState([]);
  24 + const getCurrentMonth = () => {
  25 + const month = new Date().getMonth(); // Returns a 0-based month (0-11)
  26 + return month + 1; // To make it 1-based (1-12)
  27 + };
  28 + const month = getCurrentMonth();
24 const [selectedYear, setSelectedYear] = useState('2025'); 29 const [selectedYear, setSelectedYear] = useState('2025');
25 - const [selectedMonth, setSelectedMonth] = useState('0'); 30 + const [selectedMonth, setSelectedMonth] = useState(month);
26 /** 31 /**
27 * 获取销售代码枚举,在复制和编辑的时候判断是否为旧的代码 32 * 获取销售代码枚举,在复制和编辑的时候判断是否为旧的代码
28 */ 33 */
@@ -45,7 +50,7 @@ const OrderReportPage = () =&gt; { @@ -45,7 +50,7 @@ const OrderReportPage = () =&gt; {
45 }>(); 50 }>();
46 const [statisticData, setStatisticData] = useState([]); 51 const [statisticData, setStatisticData] = useState([]);
47 const [loading, setLoading] = useState(false); 52 const [loading, setLoading] = useState(false);
48 - const [statisticsMethod, setStatisticsMethod] = useState('YEAR_STATISTICS'); 53 + const [statisticsMethod, setStatisticsMethod] = useState('MONTH_STATISTICS');
49 // const onChange = (key: string) => { 54 // const onChange = (key: string) => {
50 // if (key === '本月') { 55 // if (key === '本月') {
51 // setStatisticsMethod('MONTH_STATISTICS'); 56 // setStatisticsMethod('MONTH_STATISTICS');