Commit e2342ac2a17d9264bc0362a993dc1b06e0a772cf

Authored by boyang
1 parent a39ecdce

fix: 修改预警数量

src/pages/Order/OrderWarning/index.tsx
... ... @@ -4181,8 +4181,22 @@ const OrderPage = () => {
4181 4181 const [invoiceRefundWarningNum, setInvoiceRefundWarningNum] = useState(0);
4182 4182 const [waitConfirmPayment, setWaitConfirmPayment] = useState(0);
4183 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 4193 async function getInvoiceWarningNum() {
4185   - const res = await postServiceOrderWarningOrderStatistics();
  4194 + changeSalesCode();
  4195 + const res = await postServiceOrderWarningOrderStatistics({
  4196 + data: {
  4197 + salesCode: staticSalesCode,
  4198 + },
  4199 + });
4186 4200 setInvoiceWarningNum(res.data.waitConfirmInvoice);
4187 4201 setInvoiceRefundWarningNum(res.data.waitConfirmReceipt);
4188 4202 setWaitConfirmPayment(res.data.waitConfirmPayment);
... ... @@ -4191,7 +4205,7 @@ const OrderPage = () => {
4191 4205 useEffect(() => {
4192 4206 //预警订单数
4193 4207 getInvoiceWarningNum();
4194   - }, []);
  4208 + }, [salesCodeSelect]);
4195 4209 //biaojiup
4196 4210 // 监听 calDate 变化,触发请求
4197 4211 useEffect(() => {
... ... @@ -4324,14 +4338,21 @@ const OrderPage = () => {
4324 4338 width="200px"
4325 4339 actionRef={mainTableRef}
4326 4340 formRef={mainTableFormRef}
4327   - initialValue={userInfo.nickName}
  4341 + initialValue={userInfo.userName}
4328 4342 showSearch
4329 4343 label="销售代表"
4330 4344 placeholder="请输入销售代表"
4331 4345 options={salesCodeOptions}
4332 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 4356 mainTableRef.current?.reload();
4336 4357 }}
4337 4358 request={async () => {
... ... @@ -4414,7 +4435,7 @@ const OrderPage = () => {
4414 4435 });
4415 4436 }
4416 4437 }
4417   - params.salesCode = userInfo.nickName;
  4438 + params.salesCode = userInfo.userName;
4418 4439 params.condition = filterCondifion;
4419 4440 //排序
4420 4441 params.sorted = sorted;
... ... @@ -4439,7 +4460,7 @@ const OrderPage = () => {
4439 4460 // params.applyTimeIsNotNull = true; // 要求申请时间非空
4440 4461 params.orderStatus = 'SHIPPED'; // 发票确认预警
4441 4462 params.isDeleteQueryOrder = false; // 强制查询非作废订单
4442   - params.salesCode = userInfo.nickName;
  4463 + params.salesCode = userInfo.userName;
4443 4464 if (salesCodeSelect !== undefined) {
4444 4465 params.salesCode = salesCodeSelect;
4445 4466 }
... ... @@ -4456,7 +4477,7 @@ const OrderPage = () => {
4456 4477 // params.applyTimeLe = calDate;
4457 4478 // }
4458 4479 // params.applyTimeIsNotNull = true; // 要求申请时间非空
4459   - params.salesCode = userInfo.nickName;
  4480 + params.salesCode = userInfo.userName;
4460 4481 if (salesCodeSelect !== undefined) {
4461 4482 params.salesCode = salesCodeSelect;
4462 4483 }
... ... @@ -4475,7 +4496,7 @@ const OrderPage = () => {
4475 4496 // params.applyTimeLe = calDate;
4476 4497 // }
4477 4498 // params.applyTimeIsNotNull = true; // 要求申请时间非空
4478   - params.salesCode = userInfo.nickName;
  4499 + params.salesCode = userInfo.userName;
4479 4500 if (salesCodeSelect !== undefined) {
4480 4501 params.salesCode = salesCodeSelect;
4481 4502 }
... ... @@ -4493,7 +4514,7 @@ const OrderPage = () => {
4493 4514 } else {
4494 4515 params.applyTimeLe = calDate;
4495 4516 }
4496   - params.salesCode = userInfo.nickName;
  4517 + params.salesCode = userInfo.userName;
4497 4518 if (salesCodeSelect !== undefined) {
4498 4519 params.salesCode = salesCodeSelect;
4499 4520 }
... ... @@ -4534,7 +4555,8 @@ const OrderPage = () => {
4534 4555 });
4535 4556 mainOrderIdSubOrderIdRelationsMap.set(mianOrderId, subOrderIds);
4536 4557 }
4537   -
  4558 + // 请求完成后触发 getInvoiceWarningNum
  4559 + getInvoiceWarningNum();
4538 4560 return {
4539 4561 data: data?.data || [],
4540 4562 total: data?.total || 0,
... ...
src/services/definition.ts
... ... @@ -765,6 +765,7 @@ export interface ApplyInvoiceDTO {
765 765 * @format int64
766 766 */
767 767 id?: number;
  768 + invoice?: Invoice;
768 769 /**
769 770 * @description
770 771 * 发票地址
... ... @@ -778,8 +779,9 @@ export interface ApplyInvoiceDTO {
778 779 /**
779 780 * @description
780 781 * 关联发票id
  782 + * @format int64
781 783 */
782   - invoiceId?: string;
  784 + invoiceId?: number;
783 785 /**
784 786 * @description
785 787 * 发票号码
... ... @@ -1420,6 +1422,42 @@ export interface InventoryMaterialStockReq {
1420 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 1461 export interface InvoiceBatchDownloadDto {
1424 1462 invoiceRecordIds?: Array<number>;
1425 1463 }
... ... @@ -1457,6 +1495,9 @@ export interface InvoiceDto {
1457 1495 * @format int64
1458 1496 */
1459 1497 id?: number;
  1498 + invoiceConfirmStatus?: string;
  1499 + /** @format date-time */
  1500 + invoiceConfirmStatusDatetime?: string;
1460 1501 /**
1461 1502 * @description
1462 1503 * 发票号码
... ... @@ -1587,6 +1628,7 @@ export interface InvoiceRecordDTO {
1587 1628 * @format int64
1588 1629 */
1589 1630 id?: number;
  1631 + invoice?: Invoice;
1590 1632 /**
1591 1633 * @description
1592 1634 * 发票地址
... ... @@ -1600,8 +1642,9 @@ export interface InvoiceRecordDTO {
1600 1642 /**
1601 1643 * @description
1602 1644 * 关联发票id
  1645 + * @format int64
1603 1646 */
1604   - invoiceId?: string;
  1647 + invoiceId?: number;
1605 1648 /**
1606 1649 * @description
1607 1650 * 发票号码
... ... @@ -2850,6 +2893,7 @@ export interface QueryClientDto {
2850 2893 companyAddressLike?: string;
2851 2894 companyIds?: Array<number>;
2852 2895 companyNameLike?: string;
  2896 + contacts?: string;
2853 2897 createByName?: string;
2854 2898 createByUserIdIn?: Array<number>;
2855 2899 /** @format date-time */
... ... @@ -2886,13 +2930,13 @@ export interface QueryCommunicationInfoDto {
2886 2930 content?: string;
2887 2931 createByName?: string;
2888 2932 createByNameIn?: Array<string>;
2889   - /** @format date-time */
2890   - createTimeGe?: string;
2891   - /** @format date-time */
2892   - createTimeLe?: string;
2893 2933 /** @format int32 */
2894 2934 current?: number;
2895 2935 /** @format date-time */
  2936 + dateTimeGe?: string;
  2937 + /** @format date-time */
  2938 + dateTimeLe?: string;
  2939 + /** @format date-time */
2896 2940 datetime?: string;
2897 2941 /** @format int32 */
2898 2942 end?: number;
... ... @@ -2905,6 +2949,7 @@ export interface QueryCommunicationInfoDto {
2905 2949 /** @format int32 */
2906 2950 total?: number;
2907 2951 tradeStatusLike?: string;
  2952 + updateByName?: string;
2908 2953 way?: string;
2909 2954 }
2910 2955  
... ... @@ -3240,6 +3285,21 @@ export interface QueryUseOldInvoicingDto {
3240 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 3303 export interface QueryWarningOrderWhiteListDto {
3244 3304 createByName?: string;
3245 3305 /** @format date-time */
... ... @@ -3722,6 +3782,8 @@ export interface SubOrder {
3722 3782 /** @format date-time */
3723 3783 collectMoneyTime?: string;
3724 3784 confirmDeliverNotes?: string;
  3785 + /** @format date-time */
  3786 + confirmReceiptDatetime?: string;
3725 3787 confirmReissueNotes?: string;
3726 3788 createByName?: string;
3727 3789 /** @format date-time */
... ...
src/services/request.ts
... ... @@ -105,6 +105,7 @@ import type {
105 105 QueryProcureReturnBillDto,
106 106 QueryReportFormsDto,
107 107 QueryUseOldInvoicingDto,
  108 + QueryWarningOrderStatistics,
108 109 QueryWarningOrderWhiteListDto,
109 110 QueryWarningUserWhiteListDto,
110 111 QueryWriteOffRecordDto,
... ... @@ -21707,6 +21708,20 @@ export const postServiceOrderViewImages = /* #__PURE__ */ (() =&gt; {
21707 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 21725 /** @description response type for postServiceOrderWarningOrderStatistics */
21711 21726 export interface PostServiceOrderWarningOrderStatisticsResponse {
21712 21727 /**
... ... @@ -21748,9 +21763,12 @@ export type PostServiceOrderWarningOrderStatisticsResponseSuccess =
21748 21763 export const postServiceOrderWarningOrderStatistics = /* #__PURE__ */ (() => {
21749 21764 const method = 'post';
21750 21765 const url = '/service/order/warningOrderStatistics';
21751   - function request(): Promise<PostServiceOrderWarningOrderStatisticsResponseSuccess> {
  21766 + function request(
  21767 + option: PostServiceOrderWarningOrderStatisticsOption,
  21768 + ): Promise<PostServiceOrderWarningOrderStatisticsResponseSuccess> {
21752 21769 return requester(request.url, {
21753 21770 method: request.method,
  21771 + ...option,
21754 21772 }) as unknown as Promise<PostServiceOrderWarningOrderStatisticsResponseSuccess>;
21755 21773 }
21756 21774  
... ...
src/tsg.config.ts
... ... @@ -33,7 +33,8 @@ const projects: Project[] = [
33 33 * openapi 文档地址,可以是远程的json文件,也可以是本地的json文件
34 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 39 // source: 'https://petstore3.swagger.io/api/v3/openapi.json',
39 40 // source: './fixture/pet.json',
... ...