feat(message): 实现消息中心功能并优化UI交互
- 集成消息服务API,实现消息列表分页加载功能 - 添加消息未读数量实时更新,每30秒自动刷新一次 - 实现消息标记已读、删除消息等操作功能 - 优化消息界面UI,支持无限滚动加载更多消息 - 添加消息内容预览和跳转到相关业务单据功能 - 在个人中心页面增加调试模式开关快捷入口 - 修复订单车辆组件中草帘价格验证逻辑问题 - 更新供应商称重模块,新增计价方式和定金支付验证 - 调整包装创建页面品牌选择样式布局 - 更新应用版本号至v0.0.76 - 集成经销商对账记录等相关业务服务模块
This commit is contained in:
parent
e3b6f056b8
commit
cb24afa3ee
@ -31,8 +31,9 @@
|
|||||||
"postinstall": "weapp-tw patch",
|
"postinstall": "weapp-tw patch",
|
||||||
"lint": "eslint --ext .js,.tsx,.ts,.jsx src",
|
"lint": "eslint --ext .js,.tsx,.ts,.jsx src",
|
||||||
"lint-staged": "lint-staged",
|
"lint-staged": "lint-staged",
|
||||||
|
"fix-types": "node ../../scripts/fix-types.js",
|
||||||
"format": "prettier --cache --write src/pages src/components",
|
"format": "prettier --cache --write src/pages src/components",
|
||||||
"openapi2ts": "openapi2ts && prettier --cache --write ./src/services"
|
"openapi2ts": "openapi2ts && prettier --cache --write ./src/services && npm run fix-types"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 3 versions",
|
"last 3 versions",
|
||||||
|
|||||||
@ -4,10 +4,12 @@ import { View } from "@tarojs/components";
|
|||||||
import { SafeArea, Tabbar } from "@nutui/nutui-react-taro";
|
import { SafeArea, Tabbar } from "@nutui/nutui-react-taro";
|
||||||
import { globalStore } from "@/store/global-store";
|
import { globalStore } from "@/store/global-store";
|
||||||
import { CustomTheme, Icon } from "@/components";
|
import { CustomTheme, Icon } from "@/components";
|
||||||
|
import { business } from "@/services";
|
||||||
|
|
||||||
export default function CustomTabBar() {
|
export default function CustomTabBar() {
|
||||||
const { tabBar, setTabBar } = globalStore((state: any) => state);
|
const { tabBar, setTabBar } = globalStore((state: any) => state);
|
||||||
const [scaleFactor, setScaleFactor] = useState(1);
|
const [scaleFactor, setScaleFactor] = useState(1);
|
||||||
|
const [unreadCount, setUnreadCount] = useState(0);
|
||||||
|
|
||||||
const userRoleVO = globalStore((state: any) => state.userRoleVO);
|
const userRoleVO = globalStore((state: any) => state.userRoleVO);
|
||||||
|
|
||||||
@ -22,6 +24,35 @@ export default function CustomTabBar() {
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// 获取未读消息数量
|
||||||
|
const fetchUnreadCount = async () => {
|
||||||
|
try {
|
||||||
|
const { data } = await business.messageReceiver.getUnreadCount({
|
||||||
|
messageReceiverUnreadCountQry: {},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.success && data.data !== undefined) {
|
||||||
|
setUnreadCount(data.data);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("获取未读消息数量失败:", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 初始化时获取未读消息数量
|
||||||
|
useEffect(() => {
|
||||||
|
fetchUnreadCount();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// 每30秒刷新一次未读消息数量
|
||||||
|
useEffect(() => {
|
||||||
|
const timer = setInterval(() => {
|
||||||
|
fetchUnreadCount();
|
||||||
|
}, 30000); // 30秒
|
||||||
|
|
||||||
|
return () => clearInterval(timer);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const tabBarList = useMemo(() => {
|
const tabBarList = useMemo(() => {
|
||||||
// 如果没有用户角色信息,默认显示所有菜单项
|
// 如果没有用户角色信息,默认显示所有菜单项
|
||||||
return [
|
return [
|
||||||
@ -101,14 +132,21 @@ export default function CustomTabBar() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{tabBarList.map((item, index) => {
|
{tabBarList.map((item, index) => {
|
||||||
|
const isMessageTab = item.pagePath === "/pages/main/message/index";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabbar.Item
|
<Tabbar.Item
|
||||||
|
style={{
|
||||||
|
// @ts-ignore
|
||||||
|
"--nutui-badge-background-color": "#ff0f23",
|
||||||
|
}}
|
||||||
key={index}
|
key={index}
|
||||||
icon={
|
icon={
|
||||||
tabBar?.selected === index
|
tabBar?.selected === index
|
||||||
? item.selectedIconPath
|
? item.selectedIconPath
|
||||||
: item.iconPath
|
: item.iconPath
|
||||||
}
|
}
|
||||||
|
value={isMessageTab ? unreadCount : undefined}
|
||||||
title={item.text}
|
title={item.text}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -129,8 +129,9 @@ export default forwardRef<OrderVehicleRef, IOrderVehicleProps>(
|
|||||||
orderVehicle?.destination || "",
|
orderVehicle?.destination || "",
|
||||||
);
|
);
|
||||||
const isPriceValid = validatePrice(orderVehicle?.price || 0);
|
const isPriceValid = validatePrice(orderVehicle?.price || 0);
|
||||||
|
const openStrawCurtain = orderVehicle?.openStrawCurtain || false;
|
||||||
const isStrawCurtainPriceValid =
|
const isStrawCurtainPriceValid =
|
||||||
!orderVehicle.openStrawCurtain ||
|
!openStrawCurtain ||
|
||||||
validatePrice(orderVehicle?.strawCurtainPrice || 0);
|
validatePrice(orderVehicle?.strawCurtainPrice || 0);
|
||||||
const isDeliveryTimeValid = validateDeliveryTime(
|
const isDeliveryTimeValid = validateDeliveryTime(
|
||||||
orderVehicle?.deliveryTime || "",
|
orderVehicle?.deliveryTime || "",
|
||||||
@ -146,7 +147,7 @@ export default forwardRef<OrderVehicleRef, IOrderVehicleProps>(
|
|||||||
setDeliveryTimeError(!isDeliveryTimeValid);
|
setDeliveryTimeError(!isDeliveryTimeValid);
|
||||||
setDealerNameError(!isDealerValid);
|
setDealerNameError(!isDealerValid);
|
||||||
|
|
||||||
if (orderVehicle.openStrawCurtain) {
|
if (openStrawCurtain) {
|
||||||
setStrawCurtainPriceError(!isStrawCurtainPriceValid);
|
setStrawCurtainPriceError(!isStrawCurtainPriceValid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -125,6 +125,16 @@ export default forwardRef<SupplierWeighRef, IWeightProps>(
|
|||||||
[key: string]: boolean;
|
[key: string]: boolean;
|
||||||
}>({});
|
}>({});
|
||||||
|
|
||||||
|
// 添加包纸箱字段的错误状态
|
||||||
|
const [pricingMethodError, setPricingMethodError] = useState<{
|
||||||
|
[key: string]: boolean;
|
||||||
|
}>({});
|
||||||
|
|
||||||
|
// 添加是否付定金字段的错误状态
|
||||||
|
const [isDepositPaidError, setIsDepositPaidError] = useState<{
|
||||||
|
[key: string]: boolean;
|
||||||
|
}>({});
|
||||||
|
|
||||||
// 装车方式切换确认状态
|
// 装车方式切换确认状态
|
||||||
const [loadingModeConfirmVisible, setLoadingModeConfirmVisible] =
|
const [loadingModeConfirmVisible, setLoadingModeConfirmVisible] =
|
||||||
useState(false);
|
useState(false);
|
||||||
@ -417,6 +427,44 @@ export default forwardRef<SupplierWeighRef, IWeightProps>(
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 校验是否选择包纸箱
|
||||||
|
const validatePricingMethod = (pricingMethod: any) => {
|
||||||
|
if (
|
||||||
|
pricingMethod === undefined ||
|
||||||
|
pricingMethod === null ||
|
||||||
|
pricingMethod === ""
|
||||||
|
) {
|
||||||
|
setPricingMethodError((prev) => ({
|
||||||
|
...prev,
|
||||||
|
[supplierVO.orderSupplierId]: true,
|
||||||
|
}));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
setPricingMethodError((prev) => ({
|
||||||
|
...prev,
|
||||||
|
[supplierVO.orderSupplierId]: false,
|
||||||
|
}));
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 校验是否选择是否付定金
|
||||||
|
const validateIsDepositPaid = (isDepositPaid: any) => {
|
||||||
|
if (isDepositPaid === undefined || isDepositPaid === null) {
|
||||||
|
setIsDepositPaidError((prev) => ({
|
||||||
|
...prev,
|
||||||
|
[supplierVO.orderSupplierId]: true,
|
||||||
|
}));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
setIsDepositPaidError((prev) => ({
|
||||||
|
...prev,
|
||||||
|
[supplierVO.orderSupplierId]: false,
|
||||||
|
}));
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
// 对外暴露的校验方法
|
// 对外暴露的校验方法
|
||||||
const validate = () => {
|
const validate = () => {
|
||||||
const id = supplierVO?.orderSupplierId;
|
const id = supplierVO?.orderSupplierId;
|
||||||
@ -433,6 +481,12 @@ export default forwardRef<SupplierWeighRef, IWeightProps>(
|
|||||||
supplierVO.isDepositPaid,
|
supplierVO.isDepositPaid,
|
||||||
supplierVO.depositAmount,
|
supplierVO.depositAmount,
|
||||||
);
|
);
|
||||||
|
const isPricingMethodValid = validatePricingMethod(
|
||||||
|
supplierVO.pricingMethod,
|
||||||
|
);
|
||||||
|
const isDepositPaidValid = validateIsDepositPaid(
|
||||||
|
supplierVO.isDepositPaid,
|
||||||
|
);
|
||||||
|
|
||||||
// 再次校验空磅重量(因为总磅重量可能影响空磅重量的校验结果)
|
// 再次校验空磅重量(因为总磅重量可能影响空磅重量的校验结果)
|
||||||
const isEmptyWeightValidAgain = validateEmptyWeight(
|
const isEmptyWeightValidAgain = validateEmptyWeight(
|
||||||
@ -471,13 +525,25 @@ export default forwardRef<SupplierWeighRef, IWeightProps>(
|
|||||||
[id]: !isDepositAmountValid,
|
[id]: !isDepositAmountValid,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
setPricingMethodError((prev) => ({
|
||||||
|
...prev,
|
||||||
|
[id]: !isPricingMethodValid,
|
||||||
|
}));
|
||||||
|
|
||||||
|
setIsDepositPaidError((prev) => ({
|
||||||
|
...prev,
|
||||||
|
[id]: !isDepositPaidValid,
|
||||||
|
}));
|
||||||
|
|
||||||
const isValid =
|
const isValid =
|
||||||
isEmptyWeightValidAgain &&
|
isEmptyWeightValidAgain &&
|
||||||
isTotalWeightValid &&
|
isTotalWeightValid &&
|
||||||
isPurchasePriceValid &&
|
isPurchasePriceValid &&
|
||||||
isProductIdValid &&
|
isProductIdValid &&
|
||||||
isPaperValid &&
|
isPaperValid &&
|
||||||
isDepositAmountValid;
|
isDepositAmountValid &&
|
||||||
|
isPricingMethodValid &&
|
||||||
|
isDepositPaidValid;
|
||||||
|
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
Toast.show("toast", {
|
Toast.show("toast", {
|
||||||
@ -774,6 +840,12 @@ export default forwardRef<SupplierWeighRef, IWeightProps>(
|
|||||||
direction="horizontal"
|
direction="horizontal"
|
||||||
value={supplierVO.pricingMethod}
|
value={supplierVO.pricingMethod}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
|
// 清除错误状态
|
||||||
|
setPricingMethodError((prev) => ({
|
||||||
|
...prev,
|
||||||
|
[supplierVO.orderSupplierId]: false,
|
||||||
|
}));
|
||||||
|
|
||||||
setSupplierVO({
|
setSupplierVO({
|
||||||
...supplierVO,
|
...supplierVO,
|
||||||
pricingMethod: value as any,
|
pricingMethod: value as any,
|
||||||
@ -785,6 +857,9 @@ export default forwardRef<SupplierWeighRef, IWeightProps>(
|
|||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
{pricingMethodError[supplierVO.orderSupplierId] && (
|
||||||
|
<View className="mt-1 text-xs text-red-500">请选择是否包纸箱</View>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* 有定金吗,有定金就要填写本车扣多少定金 */}
|
{/* 有定金吗,有定金就要填写本车扣多少定金 */}
|
||||||
@ -803,6 +878,12 @@ export default forwardRef<SupplierWeighRef, IWeightProps>(
|
|||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
|
// 清除错误状态
|
||||||
|
setIsDepositPaidError((prev) => ({
|
||||||
|
...prev,
|
||||||
|
[supplierVO.orderSupplierId]: false,
|
||||||
|
}));
|
||||||
|
|
||||||
const isDepositPaidValue =
|
const isDepositPaidValue =
|
||||||
value === "true"
|
value === "true"
|
||||||
? true
|
? true
|
||||||
@ -826,6 +907,11 @@ export default forwardRef<SupplierWeighRef, IWeightProps>(
|
|||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
{isDepositPaidError[supplierVO.orderSupplierId] && (
|
||||||
|
<View className="mt-1 text-xs text-red-500">
|
||||||
|
请选择是否付定金
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
{supplierVO.isDepositPaid === true && (
|
{supplierVO.isDepositPaid === true && (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@ -227,7 +227,7 @@ export default function PackageCreate(props: IPackageCreateProps) {
|
|||||||
?.map((boxBrand) => (
|
?.map((boxBrand) => (
|
||||||
<View
|
<View
|
||||||
key={boxBrand.id}
|
key={boxBrand.id}
|
||||||
className={"flex flex-col items-center justify-center"}
|
className={"flex flex-col items-center justify-center gap-1"}
|
||||||
onClick={() => handleBatchBrandSelect(boxBrand)}
|
onClick={() => handleBatchBrandSelect(boxBrand)}
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
@ -246,7 +246,7 @@ export default function PackageCreate(props: IPackageCreateProps) {
|
|||||||
alt={boxBrand.boxBrandImage}
|
alt={boxBrand.boxBrandImage}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View className="text-center text-xs">
|
<View className="text-center text-xs text-nowrap">
|
||||||
{boxBrand.boxBrandName}
|
{boxBrand.boxBrandName}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
// App 相关常量
|
// App 相关常量
|
||||||
export const APP_VERSION = "v0.0.75";
|
export const APP_VERSION = "v0.0.76";
|
||||||
|
|||||||
@ -11,6 +11,10 @@ import { globalStore } from "@/store/global-store";
|
|||||||
import { APP_VERSION } from "@/constant";
|
import { APP_VERSION } from "@/constant";
|
||||||
import { CustomTabBar, Icon } from "@/components";
|
import { CustomTabBar, Icon } from "@/components";
|
||||||
|
|
||||||
|
// 示例:通过连续点击标题触发后门
|
||||||
|
let clickCount = 0;
|
||||||
|
let lastClickTime = 0;
|
||||||
|
|
||||||
export default hocAuth(function Page(props: CommonComponent) {
|
export default hocAuth(function Page(props: CommonComponent) {
|
||||||
const { user, userRoleVO } = props;
|
const { user, userRoleVO } = props;
|
||||||
console.log("userRoleVO", userRoleVO);
|
console.log("userRoleVO", userRoleVO);
|
||||||
@ -26,6 +30,26 @@ export default hocAuth(function Page(props: CommonComponent) {
|
|||||||
|
|
||||||
const [channel, setChannel] = useState<BusinessAPI.ChannelVO>();
|
const [channel, setChannel] = useState<BusinessAPI.ChannelVO>();
|
||||||
|
|
||||||
|
const [enableDebug, setEnableDebug] = useState<boolean>(false);
|
||||||
|
const onTitleClick = () => {
|
||||||
|
const now = Date.now();
|
||||||
|
if (now - lastClickTime < 1000) {
|
||||||
|
// 1秒内连续点击
|
||||||
|
clickCount++;
|
||||||
|
if (clickCount >= 5) {
|
||||||
|
// 打开调试
|
||||||
|
Taro.setEnableDebug({
|
||||||
|
enableDebug: !enableDebug,
|
||||||
|
});
|
||||||
|
setEnableDebug(!enableDebug);
|
||||||
|
clickCount = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
clickCount = 1;
|
||||||
|
}
|
||||||
|
lastClickTime = now;
|
||||||
|
};
|
||||||
|
|
||||||
const initChannel = async () => {
|
const initChannel = async () => {
|
||||||
const { data } = await auth.channel.selectChannelByDomain({
|
const { data } = await auth.channel.selectChannelByDomain({
|
||||||
domain: "operation.erp.qilincloud168.com",
|
domain: "operation.erp.qilincloud168.com",
|
||||||
@ -332,7 +356,10 @@ export default hocAuth(function Page(props: CommonComponent) {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View className="flex w-full flex-col py-4 text-center">
|
<View
|
||||||
|
className="flex w-full flex-col py-4 text-center"
|
||||||
|
onClick={onTitleClick}
|
||||||
|
>
|
||||||
<Text className="text-neutral-darker text-xs">
|
<Text className="text-neutral-darker text-xs">
|
||||||
版本号:{APP_VERSION}
|
版本号:{APP_VERSION}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@ -1,387 +1,249 @@
|
|||||||
import hocAuth from "@/hocs/auth";
|
import hocAuth from "@/hocs/auth";
|
||||||
import { CommonComponent } from "@/types/typings";
|
import { ActionType, PageList } from "@/components";
|
||||||
import { CustomTabBar, Icon } from "@/components";
|
import { Text, View } from "@tarojs/components";
|
||||||
import { View } from "@tarojs/components";
|
import { business } from "@/services";
|
||||||
import { Button } from "@nutui/nutui-react-taro";
|
import { useRef } from "react";
|
||||||
import { useState } from "react";
|
import { Button, Dialog, Toast } from "@nutui/nutui-react-taro";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import classNames from "classnames";
|
||||||
|
import Taro from "@tarojs/taro";
|
||||||
|
import { buildUrl } from "@/utils";
|
||||||
|
|
||||||
export default hocAuth(function Page(props: CommonComponent) {
|
export default hocAuth(function Page() {
|
||||||
const { userRoleVO } = props;
|
const actionRef = useRef<ActionType>();
|
||||||
|
|
||||||
const [activeTab, setActiveTab] = useState<"todo" | "done" | "message">(
|
// 标记消息为已读
|
||||||
"message",
|
const handleMarkAsRead = async (
|
||||||
);
|
messageReceiver: BusinessAPI.MessageReceiverVO,
|
||||||
|
) => {
|
||||||
|
if (messageReceiver.isRead) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const handleTabChange = (tab: "todo" | "done" | "message") => {
|
try {
|
||||||
setActiveTab(tab);
|
const { data } = await business.messageReceiver.markReadMessageReceiver({
|
||||||
|
messageReceiverId: messageReceiver.messageReceiverId,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (data.success) {
|
||||||
|
Toast.show("toast", {
|
||||||
|
icon: "success",
|
||||||
|
title: "提示",
|
||||||
|
content: "已标记为已读",
|
||||||
|
});
|
||||||
|
actionRef.current?.reload();
|
||||||
|
} else {
|
||||||
|
Toast.show("toast", {
|
||||||
|
icon: "fail",
|
||||||
|
title: "提示",
|
||||||
|
content: data.errMessage || "操作失败",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
Toast.show("toast", {
|
||||||
|
icon: "fail",
|
||||||
|
title: "提示",
|
||||||
|
content: "操作失败",
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 渲染待办内容列表
|
// 删除消息
|
||||||
const renderTodoList = () => (
|
const handleDelete = (messageReceiver: BusinessAPI.MessageReceiverVO) => {
|
||||||
<View className="mt-3 space-y-3">
|
Dialog.open("dialog", {
|
||||||
{/* 采购审核任务 */}
|
title: "删除消息",
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
content: "确定要删除这条消息吗?",
|
||||||
<View className="flex items-start">
|
confirmText: "确定",
|
||||||
<View className="status-badge bg-primary mt-1 mr-3"></View>
|
cancelText: "取消",
|
||||||
<View className="flex-1">
|
onConfirm: async () => {
|
||||||
<View className="flex items-start justify-between">
|
try {
|
||||||
<View>
|
const { data } =
|
||||||
<View className="text-sm font-medium text-gray-800">
|
await business.messageReceiver.destroyMessageReceiver({
|
||||||
待审核
|
messageReceiverId: messageReceiver.messageReceiverId,
|
||||||
</View>
|
});
|
||||||
<View className="text-neutral-darker mt-1 text-xs">
|
|
||||||
单号: FH20230615001
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">车次: K123</View>
|
|
||||||
<View className="text-neutral-darker text-xs">
|
|
||||||
瓜农: 张大山
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="text-sm font-semibold text-gray-800">
|
|
||||||
¥2,850
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="mt-3 flex justify-end">
|
|
||||||
<Button className="!rounded-button bg-primary px-4 py-1 text-sm text-white">
|
|
||||||
去处理
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* 老板审批任务 */}
|
if (data.success) {
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
Toast.show("toast", {
|
||||||
<View className="flex items-start">
|
icon: "success",
|
||||||
<View className="status-badge mt-1 mr-3 bg-yellow-500"></View>
|
title: "提示",
|
||||||
<View className="flex-1">
|
content: "删除成功",
|
||||||
<View className="flex items-start justify-between">
|
});
|
||||||
<View>
|
actionRef.current?.reload();
|
||||||
<View className="text-sm font-medium text-gray-800">
|
} else {
|
||||||
待老板审核
|
Toast.show("toast", {
|
||||||
</View>
|
icon: "fail",
|
||||||
<View className="text-neutral-darker mt-1 text-xs">
|
title: "提示",
|
||||||
单号: FH20230614005
|
content: data.errMessage || "删除失败",
|
||||||
</View>
|
});
|
||||||
<View className="text-neutral-darker text-xs">车次: K456</View>
|
}
|
||||||
<View className="text-neutral-darker text-xs">
|
} catch (error) {
|
||||||
瓜农: 李丰收
|
Toast.show("toast", {
|
||||||
</View>
|
icon: "fail",
|
||||||
</View>
|
title: "提示",
|
||||||
<View className="text-sm font-semibold text-gray-800">
|
content: "删除失败",
|
||||||
¥4,320
|
});
|
||||||
</View>
|
} finally {
|
||||||
</View>
|
Dialog.close("dialog");
|
||||||
<View className="mt-3 flex justify-end">
|
}
|
||||||
<Button className="!rounded-button bg-gray-200 px-4 py-1 text-sm text-gray-700">
|
},
|
||||||
查看进度
|
onCancel: () => {
|
||||||
</Button>
|
Dialog.close("dialog");
|
||||||
</View>
|
},
|
||||||
</View>
|
});
|
||||||
</View>
|
};
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* 改签处理任务 */}
|
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
|
||||||
<View className="flex items-start">
|
|
||||||
<View className="status-badge mt-1 mr-3 bg-red-500"></View>
|
|
||||||
<View className="flex-1">
|
|
||||||
<View className="flex items-start justify-between">
|
|
||||||
<View>
|
|
||||||
<View className="text-sm font-medium text-gray-800">
|
|
||||||
已拒收
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker mt-1 text-xs">
|
|
||||||
原单号: FH20230610003
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">车次: K789</View>
|
|
||||||
<View className="text-neutral-darker text-xs">
|
|
||||||
客户: 鲜果超市
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">
|
|
||||||
原因: 部分商品损坏
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="text-sm font-semibold text-gray-800">-¥680</View>
|
|
||||||
</View>
|
|
||||||
<View className="mt-3 flex justify-end">
|
|
||||||
<Button className="!rounded-button bg-primary px-4 py-1 text-sm text-white">
|
|
||||||
处理改签
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* 待改签任务 */}
|
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
|
||||||
<View className="flex items-start">
|
|
||||||
<View className="status-badge mt-1 mr-3 bg-orange-500"></View>
|
|
||||||
<View className="flex-1">
|
|
||||||
<View className="flex items-start justify-between">
|
|
||||||
<View>
|
|
||||||
<View className="text-sm font-medium text-gray-800">
|
|
||||||
待改签
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker mt-1 text-xs">
|
|
||||||
原单号: FH20230612002
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">车次: K567</View>
|
|
||||||
<View className="text-neutral-darker text-xs">
|
|
||||||
客户: 水果一号店
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">
|
|
||||||
原因: 价格有异议
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="text-sm font-semibold text-gray-800">
|
|
||||||
-¥1,250
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="mt-3 flex justify-end">
|
|
||||||
<Button className="!rounded-button bg-primary px-4 py-1 text-sm text-white">
|
|
||||||
生成改签单
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
|
|
||||||
// 渲染已办内容列表
|
|
||||||
const renderDoneList = () => (
|
|
||||||
<View className="mt-3 space-y-3">
|
|
||||||
{/* 已完成审核任务 */}
|
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
|
||||||
<View className="flex items-start">
|
|
||||||
<View className="status-badge mt-1 mr-3 bg-green-500"></View>
|
|
||||||
<View className="flex-1">
|
|
||||||
<View className="flex items-start justify-between">
|
|
||||||
<View>
|
|
||||||
<View className="text-sm font-medium text-gray-800">
|
|
||||||
已审核
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker mt-1 text-xs">
|
|
||||||
单号: FH20230615001
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">车次: K123</View>
|
|
||||||
<View className="text-neutral-darker text-xs">
|
|
||||||
瓜农: 张大山
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="text-sm font-semibold text-gray-800">
|
|
||||||
¥2,850
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="mt-3 flex justify-end">
|
|
||||||
<Button className="!rounded-button bg-gray-200 px-4 py-1 text-sm text-gray-700">
|
|
||||||
查看详情
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* 已完成老板审批任务 */}
|
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
|
||||||
<View className="flex items-start">
|
|
||||||
<View className="status-badge mt-1 mr-3 bg-green-500"></View>
|
|
||||||
<View className="flex-1">
|
|
||||||
<View className="flex items-start justify-between">
|
|
||||||
<View>
|
|
||||||
<View className="text-sm font-medium text-gray-800">
|
|
||||||
老板已审核
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker mt-1 text-xs">
|
|
||||||
单号: FH20230614005
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">车次: K456</View>
|
|
||||||
<View className="text-neutral-darker text-xs">
|
|
||||||
瓜农: 李丰收
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="text-sm font-semibold text-gray-800">
|
|
||||||
¥4,320
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="mt-3 flex justify-end">
|
|
||||||
<Button className="!rounded-button bg-gray-200 px-4 py-1 text-sm text-gray-700">
|
|
||||||
查看详情
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* 已处理改签任务 */}
|
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
|
||||||
<View className="flex items-start">
|
|
||||||
<View className="status-badge mt-1 mr-3 bg-green-500"></View>
|
|
||||||
<View className="flex-1">
|
|
||||||
<View className="flex items-start justify-between">
|
|
||||||
<View>
|
|
||||||
<View className="text-sm font-medium text-gray-800">
|
|
||||||
改签已完成
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker mt-1 text-xs">
|
|
||||||
原单号: FH20230610003
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">车次: K789</View>
|
|
||||||
<View className="text-neutral-darker text-xs">
|
|
||||||
客户: 鲜果超市
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<View className="text-sm font-semibold text-gray-800">-¥680</View>
|
|
||||||
</View>
|
|
||||||
<View className="mt-3 flex justify-end">
|
|
||||||
<Button className="!rounded-button bg-gray-200 px-4 py-1 text-sm text-gray-700">
|
|
||||||
查看详情
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
|
|
||||||
// 渲染消息内容列表
|
|
||||||
const renderMessageList = () => (
|
|
||||||
<View className="mt-3 space-y-3">
|
|
||||||
{/* 系统通知 */}
|
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
|
||||||
<View className="flex items-start">
|
|
||||||
<View className="mr-3 flex h-8 w-8 items-center justify-center rounded-full bg-blue-100">
|
|
||||||
<Icon name={"bell"} color={"var(--color-blue-500)"} size={24} />
|
|
||||||
</View>
|
|
||||||
<View className="flex-1">
|
|
||||||
<View className="flex items-start justify-between">
|
|
||||||
<View className="text-sm font-medium text-gray-800">
|
|
||||||
系统通知
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">10:30</View>
|
|
||||||
</View>
|
|
||||||
<View className="mt-1 text-sm text-gray-600">
|
|
||||||
您有一笔采购订单已通过审核,请及时查看
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
{/* 审核提醒 */}
|
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
|
||||||
<View className="flex items-start">
|
|
||||||
<View className="bg-primary/10 mr-3 flex h-8 w-8 items-center justify-center rounded-full">
|
|
||||||
<Icon
|
|
||||||
name={"file-signature"}
|
|
||||||
color={"var(--color-primary)"}
|
|
||||||
size={24}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View className="flex-1">
|
|
||||||
<View className="flex items-start justify-between">
|
|
||||||
<View className="text-sm font-medium text-gray-800">
|
|
||||||
审核提醒
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">09:15</View>
|
|
||||||
</View>
|
|
||||||
<View className="mt-1 text-sm text-gray-600">
|
|
||||||
老板已审核通过采购单:FH20230615001
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
{/* 改签通知 */}
|
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
|
||||||
<View className="flex items-start">
|
|
||||||
<View className="mr-3 flex h-8 w-8 items-center justify-center rounded-full bg-orange-100">
|
|
||||||
<Icon
|
|
||||||
name={"right-left"}
|
|
||||||
color={"var(--color-orange-600)"}
|
|
||||||
size={24}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View className="flex-1">
|
|
||||||
<View className="flex items-start justify-between">
|
|
||||||
<View className="text-sm font-medium text-gray-800">
|
|
||||||
改签通知
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">昨天</View>
|
|
||||||
</View>
|
|
||||||
<View className="mt-1 text-sm text-gray-600">
|
|
||||||
客户“水果一号店”申请改签,请尽快处理
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
{/* 利润提醒 */}
|
|
||||||
<View className="rounded-xl bg-white p-4 shadow-sm">
|
|
||||||
<View className="flex items-start">
|
|
||||||
<View className="mr-3 flex h-8 w-8 items-center justify-center rounded-full bg-green-100">
|
|
||||||
<Icon
|
|
||||||
name={"chart-line"}
|
|
||||||
color={"var(--color-green-500)"}
|
|
||||||
size={24}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
<View className="flex-1">
|
|
||||||
<View className="flex items-start justify-between">
|
|
||||||
<View className="text-sm font-medium text-gray-800">
|
|
||||||
利润提醒
|
|
||||||
</View>
|
|
||||||
<View className="text-neutral-darker text-xs">昨天</View>
|
|
||||||
</View>
|
|
||||||
<View className="mt-1 text-sm text-gray-600">
|
|
||||||
本月利润目标已完成85%,继续加油!
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<PageList<BusinessAPI.MessageReceiverVO, BusinessAPI.MessageReceiverPageQry>
|
||||||
{/* 任务列表 */}
|
rowId={"messageReceiverId"}
|
||||||
<View className={"p-2.5"}>
|
itemHeight={182}
|
||||||
{/* Tab切换 */}
|
type={"infinite"}
|
||||||
<View className="flex border-b border-gray-200">
|
actionRef={actionRef}
|
||||||
|
render={(messageReceiverVO: BusinessAPI.MessageReceiverVO, index) => {
|
||||||
|
const { messageVO } = messageReceiverVO;
|
||||||
|
return (
|
||||||
<View
|
<View
|
||||||
className={`flex-1 py-2 text-center ${activeTab === "todo" ? "border-primary border-b-2" : ""}`}
|
className={classNames(
|
||||||
onClick={() => handleTabChange("todo")}
|
"relative flex flex-col divide-y divide-neutral-100 overflow-hidden rounded-xl bg-white shadow-sm",
|
||||||
|
!messageReceiverVO.isRead && "border-l-4 border-l-blue-500",
|
||||||
|
)}
|
||||||
|
key={index}
|
||||||
>
|
>
|
||||||
<View
|
{/* 头部区域:标题 + 已读状态 */}
|
||||||
className={`text-sm font-medium ${activeTab === "todo" ? "text-primary" : "text-gray-500"}`}
|
<View className="flex items-center justify-between gap-2 px-4 py-3">
|
||||||
>
|
<View className="flex min-w-0 flex-1 items-center gap-2">
|
||||||
待办
|
{/* 未读指示器 */}
|
||||||
|
{!messageReceiverVO.isRead && (
|
||||||
|
<View className="h-2 w-2 rounded-full bg-blue-500" />
|
||||||
|
)}
|
||||||
|
<Text className="text-neutral-darkest truncate text-base font-semibold">
|
||||||
|
{messageVO?.title || "暂无标题"}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
<View className="flex flex-col items-end gap-1">
|
||||||
|
<Text
|
||||||
|
className={classNames(
|
||||||
|
"rounded px-2 py-0.5 text-xs font-medium",
|
||||||
|
messageReceiverVO.isRead
|
||||||
|
? "bg-gray-100 text-gray-600"
|
||||||
|
: "bg-blue-100 text-blue-600",
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{messageReceiverVO.isRead ? "已读" : "未读"}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{/* 详细信息区域 */}
|
||||||
|
<View className="flex cursor-pointer flex-col gap-2 px-4 py-3">
|
||||||
|
<View className="flex flex-col gap-1">
|
||||||
|
<Text className="text-neutral-dark text-xs">消息内容</Text>
|
||||||
|
<Text
|
||||||
|
className="text-neutral-darkest text-sm break-words whitespace-pre-wrap"
|
||||||
|
style={{
|
||||||
|
whiteSpace: "pre-wrap",
|
||||||
|
wordBreak: "break-word",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{messageVO?.content || "暂无内容"}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
<View className="flex flex-row items-center justify-between">
|
||||||
|
<Text className="text-neutral-dark text-xs">接收时间</Text>
|
||||||
|
<Text className="text-neutral-darkest text-xs font-medium">
|
||||||
|
{messageReceiverVO.createdAt
|
||||||
|
? dayjs(messageReceiverVO.createdAt).format(
|
||||||
|
"YYYY-MM-DD HH:mm",
|
||||||
|
)
|
||||||
|
: "-"}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
{messageReceiverVO.readAt && (
|
||||||
|
<View className="flex flex-row items-center justify-between">
|
||||||
|
<Text className="text-neutral-dark text-xs">已读时间</Text>
|
||||||
|
<Text className="text-neutral-darkest text-xs font-medium">
|
||||||
|
{dayjs(messageReceiverVO.readAt).format("YYYY-MM-DD HH:mm")}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{/* 操作按钮区域 */}
|
||||||
|
<View className="flex justify-end gap-2 border-t border-neutral-100 bg-gray-50 px-4 py-3">
|
||||||
|
{!messageReceiverVO.isRead && (
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
onClick={(e) => {
|
||||||
|
handleMarkAsRead(messageReceiverVO);
|
||||||
|
e.stopPropagation();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
标记已读
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
onClick={async (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
if (messageVO?.subjectType === "AUDIT") {
|
||||||
|
const {
|
||||||
|
data: { data: auditVO, success },
|
||||||
|
} = await business.audit.showAudit({
|
||||||
|
auditShowQry: {
|
||||||
|
auditId: messageVO.subjectId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (
|
||||||
|
success &&
|
||||||
|
auditVO &&
|
||||||
|
auditVO.subjectType === "PURCHASE_ORDER"
|
||||||
|
) {
|
||||||
|
await Taro.navigateTo({
|
||||||
|
url: buildUrl("/pages/audit/audit", {
|
||||||
|
orderId: auditVO.subjectId,
|
||||||
|
auditId: auditVO.auditId,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
去处理
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
onClick={(e) => {
|
||||||
|
handleDelete(messageReceiverVO);
|
||||||
|
e.stopPropagation();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View
|
);
|
||||||
className={`flex-1 py-2 text-center ${activeTab === "done" ? "border-primary border-b-2" : ""}`}
|
}}
|
||||||
onClick={() => handleTabChange("done")}
|
request={async (params) => {
|
||||||
>
|
const {
|
||||||
<View
|
data: { data, success, notEmpty },
|
||||||
className={`text-sm font-medium ${activeTab === "done" ? "text-primary" : "text-gray-500"}`}
|
} = await business.messageReceiver.pageMessageReceiver({
|
||||||
>
|
messageReceiverPageQry: {
|
||||||
已办
|
...params,
|
||||||
</View>
|
},
|
||||||
</View>
|
});
|
||||||
<View
|
|
||||||
className={`flex-1 py-2 text-center ${activeTab === "message" ? "border-primary border-b-2" : ""}`}
|
return {
|
||||||
onClick={() => handleTabChange("message")}
|
data,
|
||||||
>
|
success,
|
||||||
<View
|
hasMore: notEmpty,
|
||||||
className={`text-sm font-medium ${activeTab === "message" ? "text-primary" : "text-gray-500"}`}
|
};
|
||||||
>
|
}}
|
||||||
消息
|
pagination={{
|
||||||
</View>
|
pageSize: 10,
|
||||||
</View>
|
}}
|
||||||
</View>
|
/>
|
||||||
{/* 根据选中的Tab显示不同的内容列表 */}
|
|
||||||
{activeTab === "todo" && renderTodoList()}
|
|
||||||
{activeTab === "done" && renderDoneList()}
|
|
||||||
{activeTab === "message" && renderMessageList()}
|
|
||||||
</View>
|
|
||||||
{process.env.TARO_ENV === "weapp" && <CustomTabBar />}
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -107,7 +107,7 @@ export default base(function Page() {
|
|||||||
"var(--tw-leading, var(--text-sm--line-height))",
|
"var(--tw-leading, var(--text-sm--line-height))",
|
||||||
"--nutui-color-title": "#9CA3AF",
|
"--nutui-color-title": "#9CA3AF",
|
||||||
}}
|
}}
|
||||||
placeholder="请输入您的手机号"
|
placeholder="请输入您的账号"
|
||||||
value={username}
|
value={username}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
setUsername(value);
|
setUsername(value);
|
||||||
|
|||||||
135
packages/app-client/src/services/business/dealerAccountRecord.ts
Normal file
135
packages/app-client/src/services/business/dealerAccountRecord.ts
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import request from "../request";
|
||||||
|
|
||||||
|
/** 创建经销商账款明细 POST /operation/createDealerAccountRecord */
|
||||||
|
export async function createDealerAccountRecord(
|
||||||
|
body: BusinessAPI.DealerAccountRecordCreateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseDealerAccountRecordVO>(
|
||||||
|
"/operation/createDealerAccountRecord",
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 经销商账款明细删除 DELETE /operation/destroyDealerAccountRecord */
|
||||||
|
export async function destroyDealerAccountRecord(
|
||||||
|
body: BusinessAPI.DealerAccountRecordDestroyCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.Response>(
|
||||||
|
"/operation/destroyDealerAccountRecord",
|
||||||
|
{
|
||||||
|
method: "DELETE",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 经销商账款明细列表 GET /operation/listDealerAccountRecord */
|
||||||
|
export async function listDealerAccountRecord(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.listDealerAccountRecordParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.MultiResponseDealerAccountRecordVO>(
|
||||||
|
"/operation/listDealerAccountRecord",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
dealerAccountRecordListQry: undefined,
|
||||||
|
...params["dealerAccountRecordListQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 经销商账款明细列表 GET /operation/pageDealerAccountRecord */
|
||||||
|
export async function pageDealerAccountRecord(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.pageDealerAccountRecordParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.PageResponseDealerAccountRecordVO>(
|
||||||
|
"/operation/pageDealerAccountRecord",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
dealerAccountRecordPageQry: undefined,
|
||||||
|
...params["dealerAccountRecordPageQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 经销商账款明细详情 GET /operation/showDealerAccountRecord */
|
||||||
|
export async function showDealerAccountRecord(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.showDealerAccountRecordParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseDealerAccountRecordVO>(
|
||||||
|
"/operation/showDealerAccountRecord",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
dealerAccountRecordShowQry: undefined,
|
||||||
|
...params["dealerAccountRecordShowQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 经销商账款明细更新 PUT /operation/updateDealerAccountRecord */
|
||||||
|
export async function updateDealerAccountRecord(
|
||||||
|
body: BusinessAPI.DealerAccountRecordUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseDealerAccountRecordVO>(
|
||||||
|
"/operation/updateDealerAccountRecord",
|
||||||
|
{
|
||||||
|
method: "PUT",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 经销商账款明细更新 PATCH /operation/updateDealerAccountRecord */
|
||||||
|
export async function updateDealerAccountRecord1(
|
||||||
|
body: BusinessAPI.DealerAccountRecordUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseDealerAccountRecordVO>(
|
||||||
|
"/operation/updateDealerAccountRecord",
|
||||||
|
{
|
||||||
|
method: "PATCH",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -6,6 +6,9 @@ import * as user from "./user";
|
|||||||
import * as supplier from "./supplier";
|
import * as supplier from "./supplier";
|
||||||
import * as supplierInvoice from "./supplierInvoice";
|
import * as supplierInvoice from "./supplierInvoice";
|
||||||
import * as setting from "./setting";
|
import * as setting from "./setting";
|
||||||
|
import * as reconciliation from "./reconciliation";
|
||||||
|
import * as reconciliationPayment from "./reconciliationPayment";
|
||||||
|
import * as reconciliationInvoice from "./reconciliationInvoice";
|
||||||
import * as product from "./product";
|
import * as product from "./product";
|
||||||
import * as platform from "./platform";
|
import * as platform from "./platform";
|
||||||
import * as paymentTask from "./paymentTask";
|
import * as paymentTask from "./paymentTask";
|
||||||
@ -13,6 +16,8 @@ import * as paymentRecord from "./paymentRecord";
|
|||||||
import * as order from "./order";
|
import * as order from "./order";
|
||||||
import * as orderSupplier from "./orderSupplier";
|
import * as orderSupplier from "./orderSupplier";
|
||||||
import * as orderShip from "./orderShip";
|
import * as orderShip from "./orderShip";
|
||||||
|
import * as messageTemplate from "./messageTemplate";
|
||||||
|
import * as messageReceiver from "./messageReceiver";
|
||||||
import * as menu from "./menu";
|
import * as menu from "./menu";
|
||||||
import * as material from "./material";
|
import * as material from "./material";
|
||||||
import * as materialCategory from "./materialCategory";
|
import * as materialCategory from "./materialCategory";
|
||||||
@ -24,6 +29,7 @@ import * as dealer from "./dealer";
|
|||||||
import * as dealerWarehouse from "./dealerWarehouse";
|
import * as dealerWarehouse from "./dealerWarehouse";
|
||||||
import * as dealerRebateCustomer from "./dealerRebateCustomer";
|
import * as dealerRebateCustomer from "./dealerRebateCustomer";
|
||||||
import * as dealerPaymentAccount from "./dealerPaymentAccount";
|
import * as dealerPaymentAccount from "./dealerPaymentAccount";
|
||||||
|
import * as dealerAccountRecord from "./dealerAccountRecord";
|
||||||
import * as cost from "./cost";
|
import * as cost from "./cost";
|
||||||
import * as costItem from "./costItem";
|
import * as costItem from "./costItem";
|
||||||
import * as company from "./company";
|
import * as company from "./company";
|
||||||
@ -45,6 +51,9 @@ export default {
|
|||||||
supplier,
|
supplier,
|
||||||
supplierInvoice,
|
supplierInvoice,
|
||||||
setting,
|
setting,
|
||||||
|
reconciliation,
|
||||||
|
reconciliationPayment,
|
||||||
|
reconciliationInvoice,
|
||||||
product,
|
product,
|
||||||
platform,
|
platform,
|
||||||
paymentTask,
|
paymentTask,
|
||||||
@ -52,6 +61,8 @@ export default {
|
|||||||
order,
|
order,
|
||||||
orderSupplier,
|
orderSupplier,
|
||||||
orderShip,
|
orderShip,
|
||||||
|
messageTemplate,
|
||||||
|
messageReceiver,
|
||||||
menu,
|
menu,
|
||||||
material,
|
material,
|
||||||
materialCategory,
|
materialCategory,
|
||||||
@ -63,6 +74,7 @@ export default {
|
|||||||
dealerWarehouse,
|
dealerWarehouse,
|
||||||
dealerRebateCustomer,
|
dealerRebateCustomer,
|
||||||
dealerPaymentAccount,
|
dealerPaymentAccount,
|
||||||
|
dealerAccountRecord,
|
||||||
cost,
|
cost,
|
||||||
costItem,
|
costItem,
|
||||||
company,
|
company,
|
||||||
|
|||||||
167
packages/app-client/src/services/business/messageReceiver.ts
Normal file
167
packages/app-client/src/services/business/messageReceiver.ts
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import request from "../request";
|
||||||
|
|
||||||
|
/** 创建消息接收 POST /operation/createMessageReceiver */
|
||||||
|
export async function createMessageReceiver(
|
||||||
|
body: BusinessAPI.MessageReceiverCreateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseMessageReceiverVO>(
|
||||||
|
"/operation/createMessageReceiver",
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息接收删除 DELETE /operation/destroyMessageReceiver */
|
||||||
|
export async function destroyMessageReceiver(
|
||||||
|
body: BusinessAPI.MessageReceiverDestroyCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.Response>("/operation/destroyMessageReceiver", {
|
||||||
|
method: "DELETE",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取未读消息数量 GET /operation/getUnreadCount */
|
||||||
|
export async function getUnreadCount(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.getUnreadCountParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseInteger>(
|
||||||
|
"/operation/getUnreadCount",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
messageReceiverUnreadCountQry: undefined,
|
||||||
|
...params["messageReceiverUnreadCountQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息接收列表 GET /operation/listMessageReceiver */
|
||||||
|
export async function listMessageReceiver(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.listMessageReceiverParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.MultiResponseMessageReceiverVO>(
|
||||||
|
"/operation/listMessageReceiver",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
messageReceiverListQry: undefined,
|
||||||
|
...params["messageReceiverListQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 标记消息已读 POST /operation/markReadMessageReceiver */
|
||||||
|
export async function markReadMessageReceiver(
|
||||||
|
body: BusinessAPI.MessageReceiverMarkReadCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.Response>("/operation/markReadMessageReceiver", {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息接收列表 GET /operation/pageMessageReceiver */
|
||||||
|
export async function pageMessageReceiver(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.pageMessageReceiverParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.PageResponseMessageReceiverVO>(
|
||||||
|
"/operation/pageMessageReceiver",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
messageReceiverPageQry: undefined,
|
||||||
|
...params["messageReceiverPageQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息接收详情 GET /operation/showMessageReceiver */
|
||||||
|
export async function showMessageReceiver(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.showMessageReceiverParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseMessageReceiverVO>(
|
||||||
|
"/operation/showMessageReceiver",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
messageReceiverShowQry: undefined,
|
||||||
|
...params["messageReceiverShowQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息接收更新 PUT /operation/updateMessageReceiver */
|
||||||
|
export async function updateMessageReceiver(
|
||||||
|
body: BusinessAPI.MessageReceiverUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseMessageReceiverVO>(
|
||||||
|
"/operation/updateMessageReceiver",
|
||||||
|
{
|
||||||
|
method: "PUT",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息接收更新 PATCH /operation/updateMessageReceiver */
|
||||||
|
export async function updateMessageReceiver1(
|
||||||
|
body: BusinessAPI.MessageReceiverUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseMessageReceiverVO>(
|
||||||
|
"/operation/updateMessageReceiver",
|
||||||
|
{
|
||||||
|
method: "PATCH",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
132
packages/app-client/src/services/business/messageTemplate.ts
Normal file
132
packages/app-client/src/services/business/messageTemplate.ts
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import request from "../request";
|
||||||
|
|
||||||
|
/** 创建消息模板 POST /operation/createMessageTemplate */
|
||||||
|
export async function createMessageTemplate(
|
||||||
|
body: BusinessAPI.MessageTemplateCreateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseMessageTemplateVO>(
|
||||||
|
"/operation/createMessageTemplate",
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息模板删除 DELETE /operation/destroyMessageTemplate */
|
||||||
|
export async function destroyMessageTemplate(
|
||||||
|
body: BusinessAPI.MessageTemplateDestroyCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.Response>("/operation/destroyMessageTemplate", {
|
||||||
|
method: "DELETE",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息模板列表 GET /operation/listMessageTemplate */
|
||||||
|
export async function listMessageTemplate(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.listMessageTemplateParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.MultiResponseMessageTemplateVO>(
|
||||||
|
"/operation/listMessageTemplate",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
messageTemplateListQry: undefined,
|
||||||
|
...params["messageTemplateListQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息模板列表 GET /operation/pageMessageTemplate */
|
||||||
|
export async function pageMessageTemplate(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.pageMessageTemplateParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.PageResponseMessageTemplateVO>(
|
||||||
|
"/operation/pageMessageTemplate",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
messageTemplatePageQry: undefined,
|
||||||
|
...params["messageTemplatePageQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息模板详情 GET /operation/showMessageTemplate */
|
||||||
|
export async function showMessageTemplate(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.showMessageTemplateParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseMessageTemplateVO>(
|
||||||
|
"/operation/showMessageTemplate",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
messageTemplateShowQry: undefined,
|
||||||
|
...params["messageTemplateShowQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息模板更新 PUT /operation/updateMessageTemplate */
|
||||||
|
export async function updateMessageTemplate(
|
||||||
|
body: BusinessAPI.MessageTemplateUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseMessageTemplateVO>(
|
||||||
|
"/operation/updateMessageTemplate",
|
||||||
|
{
|
||||||
|
method: "PUT",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 消息模板更新 PATCH /operation/updateMessageTemplate */
|
||||||
|
export async function updateMessageTemplate1(
|
||||||
|
body: BusinessAPI.MessageTemplateUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseMessageTemplateVO>(
|
||||||
|
"/operation/updateMessageTemplate",
|
||||||
|
{
|
||||||
|
method: "PATCH",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
150
packages/app-client/src/services/business/reconciliation.ts
Normal file
150
packages/app-client/src/services/business/reconciliation.ts
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import request from "../request";
|
||||||
|
|
||||||
|
/** 对账完成 POST /operation/completeReconciliation */
|
||||||
|
export async function completeReconciliation(
|
||||||
|
body: BusinessAPI.ReconciliationCompleteCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationVO>(
|
||||||
|
"/operation/completeReconciliation",
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 创建对账 POST /operation/createReconciliation */
|
||||||
|
export async function createReconciliation(
|
||||||
|
body: BusinessAPI.ReconciliationCreateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationVO>(
|
||||||
|
"/operation/createReconciliation",
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账删除 DELETE /operation/destroyReconciliation */
|
||||||
|
export async function destroyReconciliation(
|
||||||
|
body: BusinessAPI.ReconciliationDestroyCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.Response>("/operation/destroyReconciliation", {
|
||||||
|
method: "DELETE",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账列表 GET /operation/listReconciliation */
|
||||||
|
export async function listReconciliation(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.listReconciliationParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.MultiResponseReconciliationVO>(
|
||||||
|
"/operation/listReconciliation",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
reconciliationListQry: undefined,
|
||||||
|
...params["reconciliationListQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账列表 GET /operation/pageReconciliation */
|
||||||
|
export async function pageReconciliation(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.pageReconciliationParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.PageResponseReconciliationVO>(
|
||||||
|
"/operation/pageReconciliation",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
reconciliationPageQry: undefined,
|
||||||
|
...params["reconciliationPageQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账详情 GET /operation/showReconciliation */
|
||||||
|
export async function showReconciliation(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.showReconciliationParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationVO>(
|
||||||
|
"/operation/showReconciliation",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
reconciliationShowQry: undefined,
|
||||||
|
...params["reconciliationShowQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账更新 PUT /operation/updateReconciliation */
|
||||||
|
export async function updateReconciliation(
|
||||||
|
body: BusinessAPI.ReconciliationUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationVO>(
|
||||||
|
"/operation/updateReconciliation",
|
||||||
|
{
|
||||||
|
method: "PUT",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账更新 PATCH /operation/updateReconciliation */
|
||||||
|
export async function updateReconciliation1(
|
||||||
|
body: BusinessAPI.ReconciliationUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationVO>(
|
||||||
|
"/operation/updateReconciliation",
|
||||||
|
{
|
||||||
|
method: "PATCH",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -0,0 +1,135 @@
|
|||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import request from "../request";
|
||||||
|
|
||||||
|
/** 创建对账发票 POST /operation/createReconciliationInvoice */
|
||||||
|
export async function createReconciliationInvoice(
|
||||||
|
body: BusinessAPI.ReconciliationInvoiceCreateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationInvoiceVO>(
|
||||||
|
"/operation/createReconciliationInvoice",
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账发票删除 DELETE /operation/destroyReconciliationInvoice */
|
||||||
|
export async function destroyReconciliationInvoice(
|
||||||
|
body: BusinessAPI.ReconciliationInvoiceDestroyCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.Response>(
|
||||||
|
"/operation/destroyReconciliationInvoice",
|
||||||
|
{
|
||||||
|
method: "DELETE",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账发票列表 GET /operation/listReconciliationInvoice */
|
||||||
|
export async function listReconciliationInvoice(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.listReconciliationInvoiceParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.MultiResponseReconciliationInvoiceVO>(
|
||||||
|
"/operation/listReconciliationInvoice",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
reconciliationInvoiceListQry: undefined,
|
||||||
|
...params["reconciliationInvoiceListQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账发票列表 GET /operation/pageReconciliationInvoice */
|
||||||
|
export async function pageReconciliationInvoice(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.pageReconciliationInvoiceParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.PageResponseReconciliationInvoiceVO>(
|
||||||
|
"/operation/pageReconciliationInvoice",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
reconciliationInvoicePageQry: undefined,
|
||||||
|
...params["reconciliationInvoicePageQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账发票详情 GET /operation/showReconciliationInvoice */
|
||||||
|
export async function showReconciliationInvoice(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.showReconciliationInvoiceParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationInvoiceVO>(
|
||||||
|
"/operation/showReconciliationInvoice",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
reconciliationInvoiceShowQry: undefined,
|
||||||
|
...params["reconciliationInvoiceShowQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账发票更新 PUT /operation/updateReconciliationInvoice */
|
||||||
|
export async function updateReconciliationInvoice(
|
||||||
|
body: BusinessAPI.ReconciliationInvoiceUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationInvoiceVO>(
|
||||||
|
"/operation/updateReconciliationInvoice",
|
||||||
|
{
|
||||||
|
method: "PUT",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账发票更新 PATCH /operation/updateReconciliationInvoice */
|
||||||
|
export async function updateReconciliationInvoice1(
|
||||||
|
body: BusinessAPI.ReconciliationInvoiceUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationInvoiceVO>(
|
||||||
|
"/operation/updateReconciliationInvoice",
|
||||||
|
{
|
||||||
|
method: "PATCH",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -0,0 +1,135 @@
|
|||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import request from "../request";
|
||||||
|
|
||||||
|
/** 创建对账付款 POST /operation/createReconciliationPayment */
|
||||||
|
export async function createReconciliationPayment(
|
||||||
|
body: BusinessAPI.ReconciliationPaymentCreateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationPaymentVO>(
|
||||||
|
"/operation/createReconciliationPayment",
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账付款删除 DELETE /operation/destroyReconciliationPayment */
|
||||||
|
export async function destroyReconciliationPayment(
|
||||||
|
body: BusinessAPI.ReconciliationPaymentDestroyCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.Response>(
|
||||||
|
"/operation/destroyReconciliationPayment",
|
||||||
|
{
|
||||||
|
method: "DELETE",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账付款列表 GET /operation/listReconciliationPayment */
|
||||||
|
export async function listReconciliationPayment(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.listReconciliationPaymentParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.MultiResponseReconciliationPaymentVO>(
|
||||||
|
"/operation/listReconciliationPayment",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
reconciliationPaymentListQry: undefined,
|
||||||
|
...params["reconciliationPaymentListQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账付款列表 GET /operation/pageReconciliationPayment */
|
||||||
|
export async function pageReconciliationPayment(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.pageReconciliationPaymentParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.PageResponseReconciliationPaymentVO>(
|
||||||
|
"/operation/pageReconciliationPayment",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
reconciliationPaymentPageQry: undefined,
|
||||||
|
...params["reconciliationPaymentPageQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账付款详情 GET /operation/showReconciliationPayment */
|
||||||
|
export async function showReconciliationPayment(
|
||||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||||
|
params: BusinessAPI.showReconciliationPaymentParams,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationPaymentVO>(
|
||||||
|
"/operation/showReconciliationPayment",
|
||||||
|
{
|
||||||
|
method: "GET",
|
||||||
|
params: {
|
||||||
|
...params,
|
||||||
|
reconciliationPaymentShowQry: undefined,
|
||||||
|
...params["reconciliationPaymentShowQry"],
|
||||||
|
},
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账付款更新 PUT /operation/updateReconciliationPayment */
|
||||||
|
export async function updateReconciliationPayment(
|
||||||
|
body: BusinessAPI.ReconciliationPaymentUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationPaymentVO>(
|
||||||
|
"/operation/updateReconciliationPayment",
|
||||||
|
{
|
||||||
|
method: "PUT",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 对账付款更新 PATCH /operation/updateReconciliationPayment */
|
||||||
|
export async function updateReconciliationPayment1(
|
||||||
|
body: BusinessAPI.ReconciliationPaymentUpdateCmd,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<BusinessAPI.SingleResponseReconciliationPaymentVO>(
|
||||||
|
"/operation/updateReconciliationPayment",
|
||||||
|
{
|
||||||
|
method: "PATCH",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
1094
packages/app-client/src/services/business/typings.d.ts
vendored
1094
packages/app-client/src/services/business/typings.d.ts
vendored
File diff suppressed because it is too large
Load Diff
64
scripts/fix-types.js
Normal file
64
scripts/fix-types.js
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
const fs = require("fs");
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
|
function processFile(filePath) {
|
||||||
|
try {
|
||||||
|
let content = fs.readFileSync(filePath, "utf8");
|
||||||
|
const original = content;
|
||||||
|
|
||||||
|
// 替换所有 number[] 为 string[]
|
||||||
|
content = content.replace(/number\[\]/g, "string[]");
|
||||||
|
|
||||||
|
// 可选:替换其他相关类型
|
||||||
|
content = content.replace(/Array<number>/g, "Array<string>");
|
||||||
|
content = content.replace(
|
||||||
|
/ReadonlyArray<number>/g,
|
||||||
|
"ReadonlyArray<string>",
|
||||||
|
);
|
||||||
|
|
||||||
|
if (content !== original) {
|
||||||
|
fs.writeFileSync(filePath, content, "utf8");
|
||||||
|
console.log(`✓ Updated: ${path.relative(process.cwd(), filePath)}`);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`✗ Error processing ${filePath}:`, error.message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function processDirectory(dirPath) {
|
||||||
|
let updatedCount = 0;
|
||||||
|
|
||||||
|
function walk(dir) {
|
||||||
|
const items = fs.readdirSync(dir);
|
||||||
|
|
||||||
|
for (const item of items) {
|
||||||
|
const fullPath = path.join(dir, item);
|
||||||
|
const stat = fs.statSync(fullPath);
|
||||||
|
|
||||||
|
if (stat.isDirectory()) {
|
||||||
|
walk(fullPath);
|
||||||
|
} else if (item.endsWith(".ts") || item.endsWith(".tsx")) {
|
||||||
|
if (processFile(fullPath)) {
|
||||||
|
updatedCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
walk(dirPath);
|
||||||
|
return updatedCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 主程序
|
||||||
|
const targetDir = "src/services";
|
||||||
|
if (fs.existsSync(targetDir)) {
|
||||||
|
console.log(`Processing directory: ${targetDir}`);
|
||||||
|
const updated = processDirectory(targetDir);
|
||||||
|
console.log(`\nDone! Updated ${updated} files.`);
|
||||||
|
} else {
|
||||||
|
console.error(`Directory not found: ${targetDir}`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user