- 移除采购单页面路径中的 enter 前缀 - 移除调货单页面路径中的 enter 前缀 - 更新所有相关页面跳转链接 - 调整应用配置中的页面注册路径 - 修改工作台常量中的页面路径引用 - 重命名页面文件目录结构以匹配新路由 - 更新供应商和档口页面中的跳转逻辑 - 统一采购和调货流程的页面访问路径
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
import { ActionType, PurchaseOrderList } from "@/components";
|
|
import { useShareAppMessage } from "@tarojs/taro";
|
|
import { useRef, useState } from "react";
|
|
import hocAuth from "@/hocs/auth";
|
|
import { CommonComponent } from "@/types/typings";
|
|
import purchaseOrder from "@/constant/purchaseOrder";
|
|
|
|
export default hocAuth(function Page(props: CommonComponent) {
|
|
const { shareOptions } = props;
|
|
|
|
const [state, setState] =
|
|
useState<BusinessAPI.PurchaseOrderPageQry["state"]>("DRAFT");
|
|
|
|
const actionRef = useRef<ActionType>();
|
|
|
|
useShareAppMessage((res) => {
|
|
console.log("useShareAppMessage1", res, shareOptions);
|
|
// 如果是按钮触发的转发,使用默认配置
|
|
if (res.from === "button") {
|
|
return shareOptions;
|
|
}
|
|
// 页面转发使用设置的配置
|
|
return {};
|
|
});
|
|
|
|
return (
|
|
<PurchaseOrderList
|
|
actionRef={actionRef}
|
|
toolbar={{
|
|
tabs: {
|
|
activeKey: "state",
|
|
defaultActiveKey: state!,
|
|
items: purchaseOrder.stateList,
|
|
onChange: (item) => {
|
|
setState(item as BusinessAPI.PurchaseOrderPageQry["state"]);
|
|
actionRef.current?.reload();
|
|
},
|
|
},
|
|
}}
|
|
create
|
|
params={{
|
|
state: state,
|
|
type: "MARKET_PURCHASE",
|
|
}}
|
|
/>
|
|
);
|
|
});
|