Commit e2342ac2a17d9264bc0362a993dc1b06e0a772cf

Authored by boyang
1 parent a39ecdce

fix: 修改预警数量

src/pages/Order/OrderWarning/index.tsx
@@ -4181,8 +4181,22 @@ const OrderPage = () => { @@ -4181,8 +4181,22 @@ const OrderPage = () => {
4181 const [invoiceRefundWarningNum, setInvoiceRefundWarningNum] = useState(0); 4181 const [invoiceRefundWarningNum, setInvoiceRefundWarningNum] = useState(0);
4182 const [waitConfirmPayment, setWaitConfirmPayment] = useState(0); 4182 const [waitConfirmPayment, setWaitConfirmPayment] = useState(0);
4183 const [waitFeedback, setWaitFeedback] = useState(0); 4183 const [waitFeedback, setWaitFeedback] = useState(0);
  4184 + const [staticSalesCode, setStaticSalesCode] = useState(userInfo.userName);
  4185 + //修改预警数请求salesCode
  4186 + const changeSalesCode = () => {
  4187 + if (salesCodeSelect === undefined) {
  4188 + setStaticSalesCode(userInfo.userName);
  4189 + } else {
  4190 + setStaticSalesCode(salesCodeSelect);
  4191 + }
  4192 + };
4184 async function getInvoiceWarningNum() { 4193 async function getInvoiceWarningNum() {
4185 - const res = await postServiceOrderWarningOrderStatistics(); 4194 + changeSalesCode();
  4195 + const res = await postServiceOrderWarningOrderStatistics({
  4196 + data: {
  4197 + salesCode: staticSalesCode,
  4198 + },
  4199 + });
4186 setInvoiceWarningNum(res.data.waitConfirmInvoice); 4200 setInvoiceWarningNum(res.data.waitConfirmInvoice);
4187 setInvoiceRefundWarningNum(res.data.waitConfirmReceipt); 4201 setInvoiceRefundWarningNum(res.data.waitConfirmReceipt);
4188 setWaitConfirmPayment(res.data.waitConfirmPayment); 4202 setWaitConfirmPayment(res.data.waitConfirmPayment);
@@ -4191,7 +4205,7 @@ const OrderPage = () => { @@ -4191,7 +4205,7 @@ const OrderPage = () => {
4191 useEffect(() => { 4205 useEffect(() => {
4192 //预警订单数 4206 //预警订单数
4193 getInvoiceWarningNum(); 4207 getInvoiceWarningNum();
4194 - }, []); 4208 + }, [salesCodeSelect]);
4195 //biaojiup 4209 //biaojiup
4196 // 监听 calDate 变化,触发请求 4210 // 监听 calDate 变化,触发请求
4197 useEffect(() => { 4211 useEffect(() => {
@@ -4324,14 +4338,21 @@ const OrderPage = () => { @@ -4324,14 +4338,21 @@ const OrderPage = () => {
4324 width="200px" 4338 width="200px"
4325 actionRef={mainTableRef} 4339 actionRef={mainTableRef}
4326 formRef={mainTableFormRef} 4340 formRef={mainTableFormRef}
4327 - initialValue={userInfo.nickName} 4341 + initialValue={userInfo.userName}
4328 showSearch 4342 showSearch
4329 label="销售代表" 4343 label="销售代表"
4330 placeholder="请输入销售代表" 4344 placeholder="请输入销售代表"
4331 options={salesCodeOptions} 4345 options={salesCodeOptions}
4332 onChange={(_, option) => { 4346 onChange={(_, option) => {
4333 - console.log(option, '5656option');  
4334 - selectSalesCode(option.value); 4347 + if (option === undefined) {
  4348 + selectSalesCode(userInfo.userName);
  4349 + }
  4350 + // if (option.value !== undefined) {
  4351 + // selectSalesCode(option.value);
  4352 + // }
  4353 + if (option && option.value !== undefined) {
  4354 + selectSalesCode(option.value);
  4355 + }
4335 mainTableRef.current?.reload(); 4356 mainTableRef.current?.reload();
4336 }} 4357 }}
4337 request={async () => { 4358 request={async () => {
@@ -4414,7 +4435,7 @@ const OrderPage = () => { @@ -4414,7 +4435,7 @@ const OrderPage = () => {
4414 }); 4435 });
4415 } 4436 }
4416 } 4437 }
4417 - params.salesCode = userInfo.nickName; 4438 + params.salesCode = userInfo.userName;
4418 params.condition = filterCondifion; 4439 params.condition = filterCondifion;
4419 //排序 4440 //排序
4420 params.sorted = sorted; 4441 params.sorted = sorted;
@@ -4439,7 +4460,7 @@ const OrderPage = () => { @@ -4439,7 +4460,7 @@ const OrderPage = () => {
4439 // params.applyTimeIsNotNull = true; // 要求申请时间非空 4460 // params.applyTimeIsNotNull = true; // 要求申请时间非空
4440 params.orderStatus = 'SHIPPED'; // 发票确认预警 4461 params.orderStatus = 'SHIPPED'; // 发票确认预警
4441 params.isDeleteQueryOrder = false; // 强制查询非作废订单 4462 params.isDeleteQueryOrder = false; // 强制查询非作废订单
4442 - params.salesCode = userInfo.nickName; 4463 + params.salesCode = userInfo.userName;
4443 if (salesCodeSelect !== undefined) { 4464 if (salesCodeSelect !== undefined) {
4444 params.salesCode = salesCodeSelect; 4465 params.salesCode = salesCodeSelect;
4445 } 4466 }
@@ -4456,7 +4477,7 @@ const OrderPage = () => { @@ -4456,7 +4477,7 @@ const OrderPage = () => {
4456 // params.applyTimeLe = calDate; 4477 // params.applyTimeLe = calDate;
4457 // } 4478 // }
4458 // params.applyTimeIsNotNull = true; // 要求申请时间非空 4479 // params.applyTimeIsNotNull = true; // 要求申请时间非空
4459 - params.salesCode = userInfo.nickName; 4480 + params.salesCode = userInfo.userName;
4460 if (salesCodeSelect !== undefined) { 4481 if (salesCodeSelect !== undefined) {
4461 params.salesCode = salesCodeSelect; 4482 params.salesCode = salesCodeSelect;
4462 } 4483 }
@@ -4475,7 +4496,7 @@ const OrderPage = () => { @@ -4475,7 +4496,7 @@ const OrderPage = () => {
4475 // params.applyTimeLe = calDate; 4496 // params.applyTimeLe = calDate;
4476 // } 4497 // }
4477 // params.applyTimeIsNotNull = true; // 要求申请时间非空 4498 // params.applyTimeIsNotNull = true; // 要求申请时间非空
4478 - params.salesCode = userInfo.nickName; 4499 + params.salesCode = userInfo.userName;
4479 if (salesCodeSelect !== undefined) { 4500 if (salesCodeSelect !== undefined) {
4480 params.salesCode = salesCodeSelect; 4501 params.salesCode = salesCodeSelect;
4481 } 4502 }
@@ -4493,7 +4514,7 @@ const OrderPage = () => { @@ -4493,7 +4514,7 @@ const OrderPage = () => {
4493 } else { 4514 } else {
4494 params.applyTimeLe = calDate; 4515 params.applyTimeLe = calDate;
4495 } 4516 }
4496 - params.salesCode = userInfo.nickName; 4517 + params.salesCode = userInfo.userName;
4497 if (salesCodeSelect !== undefined) { 4518 if (salesCodeSelect !== undefined) {
4498 params.salesCode = salesCodeSelect; 4519 params.salesCode = salesCodeSelect;
4499 } 4520 }
@@ -4534,7 +4555,8 @@ const OrderPage = () => { @@ -4534,7 +4555,8 @@ const OrderPage = () => {
4534 }); 4555 });
4535 mainOrderIdSubOrderIdRelationsMap.set(mianOrderId, subOrderIds); 4556 mainOrderIdSubOrderIdRelationsMap.set(mianOrderId, subOrderIds);
4536 } 4557 }
4537 - 4558 + // 请求完成后触发 getInvoiceWarningNum
  4559 + getInvoiceWarningNum();
4538 return { 4560 return {
4539 data: data?.data || [], 4561 data: data?.data || [],
4540 total: data?.total || 0, 4562 total: data?.total || 0,
src/services/definition.ts
@@ -765,6 +765,7 @@ export interface ApplyInvoiceDTO { @@ -765,6 +765,7 @@ export interface ApplyInvoiceDTO {
765 * @format int64 765 * @format int64
766 */ 766 */
767 id?: number; 767 id?: number;
  768 + invoice?: Invoice;
768 /** 769 /**
769 * @description 770 * @description
770 * 发票地址 771 * 发票地址
@@ -778,8 +779,9 @@ export interface ApplyInvoiceDTO { @@ -778,8 +779,9 @@ export interface ApplyInvoiceDTO {
778 /** 779 /**
779 * @description 780 * @description
780 * 关联发票id 781 * 关联发票id
  782 + * @format int64
781 */ 783 */
782 - invoiceId?: string; 784 + invoiceId?: number;
783 /** 785 /**
784 * @description 786 * @description
785 * 发票号码 787 * 发票号码
@@ -1420,6 +1422,42 @@ export interface InventoryMaterialStockReq { @@ -1420,6 +1422,42 @@ export interface InventoryMaterialStockReq {
1420 materialId?: string; 1422 materialId?: string;
1421 } 1423 }
1422 1424
  1425 +export interface Invoice {
  1426 + /** @format date-time */
  1427 + collectionTime?: string;
  1428 + contacts?: string;
  1429 + createByName?: string;
  1430 + /** @format date-time */
  1431 + createTime?: string;
  1432 + ext?: string;
  1433 + /** @format int64 */
  1434 + id?: number;
  1435 + invoiceConfirmStatus?: string;
  1436 + /** @format date-time */
  1437 + invoiceConfirmStatusDatetime?: string;
  1438 + invoiceNumber?: string;
  1439 + /** @format int64 */
  1440 + invoiceRecordId?: number;
  1441 + invoiceStatus?: string;
  1442 + /** @format date-time */
  1443 + invoicingTime?: string;
  1444 + invoicingType?: string;
  1445 + logicDelete?: boolean;
  1446 + /** @format int64 */
  1447 + money?: number;
  1448 + moneyAsBigDecimal?: number;
  1449 + notes?: string;
  1450 + payee?: string;
  1451 + purchaser?: string;
  1452 + sale?: string;
  1453 + status?: string;
  1454 + updateByName?: string;
  1455 + /** @format date-time */
  1456 + updateTime?: string;
  1457 + /** @format int64 */
  1458 + writeOffId?: number;
  1459 +}
  1460 +
1423 export interface InvoiceBatchDownloadDto { 1461 export interface InvoiceBatchDownloadDto {
1424 invoiceRecordIds?: Array<number>; 1462 invoiceRecordIds?: Array<number>;
1425 } 1463 }
@@ -1457,6 +1495,9 @@ export interface InvoiceDto { @@ -1457,6 +1495,9 @@ export interface InvoiceDto {
1457 * @format int64 1495 * @format int64
1458 */ 1496 */
1459 id?: number; 1497 id?: number;
  1498 + invoiceConfirmStatus?: string;
  1499 + /** @format date-time */
  1500 + invoiceConfirmStatusDatetime?: string;
1460 /** 1501 /**
1461 * @description 1502 * @description
1462 * 发票号码 1503 * 发票号码
@@ -1587,6 +1628,7 @@ export interface InvoiceRecordDTO { @@ -1587,6 +1628,7 @@ export interface InvoiceRecordDTO {
1587 * @format int64 1628 * @format int64
1588 */ 1629 */
1589 id?: number; 1630 id?: number;
  1631 + invoice?: Invoice;
1590 /** 1632 /**
1591 * @description 1633 * @description
1592 * 发票地址 1634 * 发票地址
@@ -1600,8 +1642,9 @@ export interface InvoiceRecordDTO { @@ -1600,8 +1642,9 @@ export interface InvoiceRecordDTO {
1600 /** 1642 /**
1601 * @description 1643 * @description
1602 * 关联发票id 1644 * 关联发票id
  1645 + * @format int64
1603 */ 1646 */
1604 - invoiceId?: string; 1647 + invoiceId?: number;
1605 /** 1648 /**
1606 * @description 1649 * @description
1607 * 发票号码 1650 * 发票号码
@@ -2850,6 +2893,7 @@ export interface QueryClientDto { @@ -2850,6 +2893,7 @@ export interface QueryClientDto {
2850 companyAddressLike?: string; 2893 companyAddressLike?: string;
2851 companyIds?: Array<number>; 2894 companyIds?: Array<number>;
2852 companyNameLike?: string; 2895 companyNameLike?: string;
  2896 + contacts?: string;
2853 createByName?: string; 2897 createByName?: string;
2854 createByUserIdIn?: Array<number>; 2898 createByUserIdIn?: Array<number>;
2855 /** @format date-time */ 2899 /** @format date-time */
@@ -2886,13 +2930,13 @@ export interface QueryCommunicationInfoDto { @@ -2886,13 +2930,13 @@ export interface QueryCommunicationInfoDto {
2886 content?: string; 2930 content?: string;
2887 createByName?: string; 2931 createByName?: string;
2888 createByNameIn?: Array<string>; 2932 createByNameIn?: Array<string>;
2889 - /** @format date-time */  
2890 - createTimeGe?: string;  
2891 - /** @format date-time */  
2892 - createTimeLe?: string;  
2893 /** @format int32 */ 2933 /** @format int32 */
2894 current?: number; 2934 current?: number;
2895 /** @format date-time */ 2935 /** @format date-time */
  2936 + dateTimeGe?: string;
  2937 + /** @format date-time */
  2938 + dateTimeLe?: string;
  2939 + /** @format date-time */
2896 datetime?: string; 2940 datetime?: string;
2897 /** @format int32 */ 2941 /** @format int32 */
2898 end?: number; 2942 end?: number;
@@ -2905,6 +2949,7 @@ export interface QueryCommunicationInfoDto { @@ -2905,6 +2949,7 @@ export interface QueryCommunicationInfoDto {
2905 /** @format int32 */ 2949 /** @format int32 */
2906 total?: number; 2950 total?: number;
2907 tradeStatusLike?: string; 2951 tradeStatusLike?: string;
  2952 + updateByName?: string;
2908 way?: string; 2953 way?: string;
2909 } 2954 }
2910 2955
@@ -3240,6 +3285,21 @@ export interface QueryUseOldInvoicingDto { @@ -3240,6 +3285,21 @@ export interface QueryUseOldInvoicingDto {
3240 total?: number; 3285 total?: number;
3241 } 3286 }
3242 3287
  3288 +export interface QueryWarningOrderStatistics {
  3289 + excludeWhiteList?: boolean;
  3290 + salesCode?: string;
  3291 + /** @format date-time */
  3292 + waitConfirmInvoiceStatusDateTimeLe?: string;
  3293 + /** @format date-time */
  3294 + waitConfirmPaymentOrderCreatedDateTimeGe?: string;
  3295 + /** @format date-time */
  3296 + waitConfirmPaymentStatusDateTimeLe?: string;
  3297 + /** @format date-time */
  3298 + waitConfirmReiceptStatusDateTimeLe?: string;
  3299 + /** @format date-time */
  3300 + waitFeedbackStatusDateTimeLe?: string;
  3301 +}
  3302 +
3243 export interface QueryWarningOrderWhiteListDto { 3303 export interface QueryWarningOrderWhiteListDto {
3244 createByName?: string; 3304 createByName?: string;
3245 /** @format date-time */ 3305 /** @format date-time */
@@ -3722,6 +3782,8 @@ export interface SubOrder { @@ -3722,6 +3782,8 @@ export interface SubOrder {
3722 /** @format date-time */ 3782 /** @format date-time */
3723 collectMoneyTime?: string; 3783 collectMoneyTime?: string;
3724 confirmDeliverNotes?: string; 3784 confirmDeliverNotes?: string;
  3785 + /** @format date-time */
  3786 + confirmReceiptDatetime?: string;
3725 confirmReissueNotes?: string; 3787 confirmReissueNotes?: string;
3726 createByName?: string; 3788 createByName?: string;
3727 /** @format date-time */ 3789 /** @format date-time */
src/services/request.ts
@@ -105,6 +105,7 @@ import type { @@ -105,6 +105,7 @@ import type {
105 QueryProcureReturnBillDto, 105 QueryProcureReturnBillDto,
106 QueryReportFormsDto, 106 QueryReportFormsDto,
107 QueryUseOldInvoicingDto, 107 QueryUseOldInvoicingDto,
  108 + QueryWarningOrderStatistics,
108 QueryWarningOrderWhiteListDto, 109 QueryWarningOrderWhiteListDto,
109 QueryWarningUserWhiteListDto, 110 QueryWarningUserWhiteListDto,
110 QueryWriteOffRecordDto, 111 QueryWriteOffRecordDto,
@@ -21707,6 +21708,20 @@ export const postServiceOrderViewImages = /* #__PURE__ */ (() =&gt; { @@ -21707,6 +21708,20 @@ export const postServiceOrderViewImages = /* #__PURE__ */ (() =&gt; {
21707 return request; 21708 return request;
21708 })(); 21709 })();
21709 21710
  21711 +/** @description request parameter type for postServiceOrderWarningOrderStatistics */
  21712 +export interface PostServiceOrderWarningOrderStatisticsOption {
  21713 + /**
  21714 + * @description
  21715 + * query
  21716 + */
  21717 + body: {
  21718 + /**
  21719 + @description
  21720 + query */
  21721 + query: QueryWarningOrderStatistics;
  21722 + };
  21723 +}
  21724 +
21710 /** @description response type for postServiceOrderWarningOrderStatistics */ 21725 /** @description response type for postServiceOrderWarningOrderStatistics */
21711 export interface PostServiceOrderWarningOrderStatisticsResponse { 21726 export interface PostServiceOrderWarningOrderStatisticsResponse {
21712 /** 21727 /**
@@ -21748,9 +21763,12 @@ export type PostServiceOrderWarningOrderStatisticsResponseSuccess = @@ -21748,9 +21763,12 @@ export type PostServiceOrderWarningOrderStatisticsResponseSuccess =
21748 export const postServiceOrderWarningOrderStatistics = /* #__PURE__ */ (() => { 21763 export const postServiceOrderWarningOrderStatistics = /* #__PURE__ */ (() => {
21749 const method = 'post'; 21764 const method = 'post';
21750 const url = '/service/order/warningOrderStatistics'; 21765 const url = '/service/order/warningOrderStatistics';
21751 - function request(): Promise<PostServiceOrderWarningOrderStatisticsResponseSuccess> { 21766 + function request(
  21767 + option: PostServiceOrderWarningOrderStatisticsOption,
  21768 + ): Promise<PostServiceOrderWarningOrderStatisticsResponseSuccess> {
21752 return requester(request.url, { 21769 return requester(request.url, {
21753 method: request.method, 21770 method: request.method,
  21771 + ...option,
21754 }) as unknown as Promise<PostServiceOrderWarningOrderStatisticsResponseSuccess>; 21772 }) as unknown as Promise<PostServiceOrderWarningOrderStatisticsResponseSuccess>;
21755 } 21773 }
21756 21774
src/tsg.config.ts
@@ -33,7 +33,8 @@ const projects: Project[] = [ @@ -33,7 +33,8 @@ const projects: Project[] = [
33 * openapi 文档地址,可以是远程的json文件,也可以是本地的json文件 33 * openapi 文档地址,可以是远程的json文件,也可以是本地的json文件
34 * 如果使用本地文件,相对路径以当前'tsg.config.ts'为基准 34 * 如果使用本地文件,相对路径以当前'tsg.config.ts'为基准
35 * */ 35 * */
36 - source: 'http://localhost:8085/v2/api-docs', 36 + // source: 'http://localhost:8085/v2/api-docs',
  37 + source: 'http://39.108.227.113:8085/v2/api-docs',
37 38
38 // source: 'https://petstore3.swagger.io/api/v3/openapi.json', 39 // source: 'https://petstore3.swagger.io/api/v3/openapi.json',
39 // source: './fixture/pet.json', 40 // source: './fixture/pet.json',