Compare commits
No commits in common. "cb24afa3eeb7e81ef75bbdffce90192f2fcb855e" and "0742491943411bbfe3f22942dc09e5379752b0df" have entirely different histories.
cb24afa3ee
...
0742491943
@ -31,9 +31,8 @@
|
|||||||
"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 && npm run fix-types"
|
"openapi2ts": "openapi2ts && prettier --cache --write ./src/services"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 3 versions",
|
"last 3 versions",
|
||||||
|
|||||||
@ -4,12 +4,10 @@ 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);
|
||||||
|
|
||||||
@ -24,35 +22,6 @@ 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 [
|
||||||
@ -132,21 +101,14 @@ 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}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,139 +0,0 @@
|
|||||||
import React, { useState } from "react";
|
|
||||||
import { Text, View } from "@tarojs/components";
|
|
||||||
import { Button } from "@nutui/nutui-react-taro";
|
|
||||||
|
|
||||||
interface IImagePreview {
|
|
||||||
children: React.ReactNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function ImagePreview(props: IImagePreview) {
|
|
||||||
const { children } = props;
|
|
||||||
|
|
||||||
const [scale, setScale] = useState(0.5); // 缩放比例
|
|
||||||
const [touchInfo, setTouchInfo] = useState({
|
|
||||||
startDistance: 0,
|
|
||||||
startScale: 0.5,
|
|
||||||
}); // 触摸信息
|
|
||||||
const [position, setPosition] = useState({ x: 0, y: -(29.7 * 37.8 * 0.5) }); // 当前位置
|
|
||||||
const [startPosition, setStartPosition] = useState({ x: 0, y: 0 }); // 起始位置
|
|
||||||
|
|
||||||
// 放大
|
|
||||||
const zoomIn = () => {
|
|
||||||
setScale((prev) => Math.min(prev + 0.1, 3)); // 最大放大到3倍
|
|
||||||
};
|
|
||||||
|
|
||||||
// 缩小
|
|
||||||
const zoomOut = () => {
|
|
||||||
setScale((prev) => Math.max(prev - 0.1, 0.5)); // 最小缩小到0.5倍
|
|
||||||
};
|
|
||||||
|
|
||||||
// 重置缩放
|
|
||||||
const resetZoom = () => {
|
|
||||||
setScale(0.5);
|
|
||||||
setPosition({ x: 0, y: -(29.7 * 37.8 * 0.5) }); // 重置位置
|
|
||||||
};
|
|
||||||
|
|
||||||
// 计算两点间距离
|
|
||||||
const getDistance = (touches: any) => {
|
|
||||||
const dx = touches[0].clientX - touches[1].clientX;
|
|
||||||
const dy = touches[0].clientY - touches[1].clientY;
|
|
||||||
return Math.sqrt(dx * dx + dy * dy);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 处理触摸开始事件
|
|
||||||
const handleTouchStart = (e: any) => {
|
|
||||||
const touches = e.touches;
|
|
||||||
if (touches.length === 2) {
|
|
||||||
// 双指触摸,记录初始距离和当前缩放值
|
|
||||||
const distance = getDistance(touches);
|
|
||||||
setTouchInfo({
|
|
||||||
startDistance: distance,
|
|
||||||
startScale: scale,
|
|
||||||
});
|
|
||||||
} else if (touches.length === 1) {
|
|
||||||
// 单指触摸,记录起始位置
|
|
||||||
setStartPosition({
|
|
||||||
x: touches[0].clientX - position.x,
|
|
||||||
y: touches[0].clientY - position.y,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 处理触摸移动事件
|
|
||||||
const handleTouchMove = (e: any) => {
|
|
||||||
const touches = e.touches;
|
|
||||||
e.preventDefault(); // 阻止默认滚动行为
|
|
||||||
|
|
||||||
if (touches.length === 2) {
|
|
||||||
// 双指触摸,计算缩放比例
|
|
||||||
const currentDistance = getDistance(touches);
|
|
||||||
const newScale =
|
|
||||||
touchInfo.startScale * (currentDistance / touchInfo.startDistance);
|
|
||||||
// 限制缩放范围在0.5到3之间
|
|
||||||
setScale(Math.min(Math.max(0.5, newScale), 3));
|
|
||||||
} else if (touches.length === 1 && scale > 0.5) {
|
|
||||||
// 单指触摸且已放大,允许拖动
|
|
||||||
setPosition({
|
|
||||||
x: touches[0].clientX - startPosition.x,
|
|
||||||
y: touches[0].clientY - startPosition.y,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 处理触摸结束事件
|
|
||||||
const handleTouchEnd = (e: any) => {
|
|
||||||
// 可以在这里添加触摸结束后的处理逻辑
|
|
||||||
console.log("Touch ended", e);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View className="flex flex-1 flex-col items-center overflow-hidden">
|
|
||||||
{/* 缩放控制按钮 */}
|
|
||||||
<View className="mb-2 flex w-full justify-center gap-2 bg-white p-2">
|
|
||||||
<Button size="small" onClick={zoomOut}>
|
|
||||||
-
|
|
||||||
</Button>
|
|
||||||
<Button size="small" onClick={resetZoom}>
|
|
||||||
重置
|
|
||||||
</Button>
|
|
||||||
<Button size="small" onClick={zoomIn}>
|
|
||||||
+
|
|
||||||
</Button>
|
|
||||||
<Text className="ml-2 flex items-center">
|
|
||||||
{Math.round(scale * 100)}%
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* 预览区域 */}
|
|
||||||
<View
|
|
||||||
className="flex-1 overflow-auto"
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
overflow: "hidden",
|
|
||||||
}}
|
|
||||||
onTouchStart={handleTouchStart}
|
|
||||||
onTouchMove={handleTouchMove}
|
|
||||||
onTouchEnd={handleTouchEnd}
|
|
||||||
>
|
|
||||||
<View
|
|
||||||
id="preview"
|
|
||||||
className="rounded-lg bg-white shadow-md"
|
|
||||||
style={{
|
|
||||||
width: "21cm",
|
|
||||||
padding: "2cm 1cm 0 1cm",
|
|
||||||
margin: "0 auto",
|
|
||||||
height: "29.7cm", // A4纸高度
|
|
||||||
transform: `scale(${scale}) translate(${position.x}px, ${position.y}px)`,
|
|
||||||
transformOrigin: "center center",
|
|
||||||
transition:
|
|
||||||
scale === touchInfo.startScale ? "transform 0.2s ease" : "none",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{children}
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -10,7 +10,6 @@ export { CustomTheme } from "./CustomTheme";
|
|||||||
export { TabBar } from "./TabBar";
|
export { TabBar } from "./TabBar";
|
||||||
export { default as PriceEditor } from "./PriceEditor";
|
export { default as PriceEditor } from "./PriceEditor";
|
||||||
export { default as VersionChecker } from "./VersionChecker";
|
export { default as VersionChecker } from "./VersionChecker";
|
||||||
export { default as ImagePreview } from "./ImagePreview";
|
|
||||||
export type { TabBarProps } from "./TabBar";
|
export type { TabBarProps } from "./TabBar";
|
||||||
|
|
||||||
export * from "./typing";
|
export * from "./typing";
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
import { ImagePreview } from "@/components";
|
import { useState } from "react";
|
||||||
|
import { Text, View } from "@tarojs/components";
|
||||||
|
import { Button } from "@nutui/nutui-react-taro";
|
||||||
import {
|
import {
|
||||||
DealerInfo,
|
DealerInfo,
|
||||||
OtherFees,
|
OtherFees,
|
||||||
@ -18,45 +20,167 @@ interface Step2PreviewProps {
|
|||||||
export default function Step2Preview(props: Step2PreviewProps) {
|
export default function Step2Preview(props: Step2PreviewProps) {
|
||||||
const { moduleList } = props;
|
const { moduleList } = props;
|
||||||
|
|
||||||
|
const [scale, setScale] = useState(0.5); // 缩放比例
|
||||||
|
const [touchInfo, setTouchInfo] = useState({
|
||||||
|
startDistance: 0,
|
||||||
|
startScale: 0.5,
|
||||||
|
}); // 触摸信息
|
||||||
|
const [position, setPosition] = useState({ x: 0, y: -(29.7 * 37.8 * 0.5) }); // 当前位置
|
||||||
|
const [startPosition, setStartPosition] = useState({ x: 0, y: 0 }); // 起始位置
|
||||||
|
|
||||||
|
// 放大
|
||||||
|
const zoomIn = () => {
|
||||||
|
setScale((prev) => Math.min(prev + 0.1, 3)); // 最大放大到3倍
|
||||||
|
};
|
||||||
|
|
||||||
|
// 缩小
|
||||||
|
const zoomOut = () => {
|
||||||
|
setScale((prev) => Math.max(prev - 0.1, 0.5)); // 最小缩小到0.5倍
|
||||||
|
};
|
||||||
|
|
||||||
|
// 重置缩放
|
||||||
|
const resetZoom = () => {
|
||||||
|
setScale(0.5);
|
||||||
|
setPosition({ x: 0, y: -(29.7 * 37.8 * 0.5) }); // 重置位置
|
||||||
|
};
|
||||||
|
|
||||||
|
// 计算两点间距离
|
||||||
|
const getDistance = (touches: any) => {
|
||||||
|
const dx = touches[0].clientX - touches[1].clientX;
|
||||||
|
const dy = touches[0].clientY - touches[1].clientY;
|
||||||
|
return Math.sqrt(dx * dx + dy * dy);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 处理触摸开始事件
|
||||||
|
const handleTouchStart = (e: any) => {
|
||||||
|
const touches = e.touches;
|
||||||
|
if (touches.length === 2) {
|
||||||
|
// 双指触摸,记录初始距离和当前缩放值
|
||||||
|
const distance = getDistance(touches);
|
||||||
|
setTouchInfo({
|
||||||
|
startDistance: distance,
|
||||||
|
startScale: scale,
|
||||||
|
});
|
||||||
|
} else if (touches.length === 1) {
|
||||||
|
// 单指触摸,记录起始位置
|
||||||
|
setStartPosition({
|
||||||
|
x: touches[0].clientX - position.x,
|
||||||
|
y: touches[0].clientY - position.y,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 处理触摸移动事件
|
||||||
|
const handleTouchMove = (e: any) => {
|
||||||
|
const touches = e.touches;
|
||||||
|
e.preventDefault(); // 阻止默认滚动行为
|
||||||
|
|
||||||
|
if (touches.length === 2) {
|
||||||
|
// 双指触摸,计算缩放比例
|
||||||
|
const currentDistance = getDistance(touches);
|
||||||
|
const newScale =
|
||||||
|
touchInfo.startScale * (currentDistance / touchInfo.startDistance);
|
||||||
|
// 限制缩放范围在0.5到3之间
|
||||||
|
setScale(Math.min(Math.max(0.5, newScale), 3));
|
||||||
|
} else if (touches.length === 1 && scale > 0.5) {
|
||||||
|
// 单指触摸且已放大,允许拖动
|
||||||
|
setPosition({
|
||||||
|
x: touches[0].clientX - startPosition.x,
|
||||||
|
y: touches[0].clientY - startPosition.y,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 处理触摸结束事件
|
||||||
|
const handleTouchEnd = (e: any) => {
|
||||||
|
// 可以在这里添加触摸结束后的处理逻辑
|
||||||
|
console.log("Touch ended", e);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ImagePreview>
|
<View className="flex flex-1 flex-col items-center overflow-hidden">
|
||||||
{moduleList.map((module) => {
|
{/* 缩放控制按钮 */}
|
||||||
if (module.type === "title") {
|
<View className="mb-2 flex w-full justify-center gap-2 bg-white p-2">
|
||||||
return <TitleInfo key={"title"} module={module} />;
|
<Button size="small" onClick={zoomOut}>
|
||||||
}
|
-
|
||||||
|
</Button>
|
||||||
|
<Button size="small" onClick={resetZoom}>
|
||||||
|
重置
|
||||||
|
</Button>
|
||||||
|
<Button size="small" onClick={zoomIn}>
|
||||||
|
+
|
||||||
|
</Button>
|
||||||
|
<Text className="ml-2 flex items-center">
|
||||||
|
{Math.round(scale * 100)}%
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
if (module.type === "dealerInfo") {
|
{/* 预览区域 */}
|
||||||
return <DealerInfo key={"dealerInfo"} module={module} />;
|
<View
|
||||||
}
|
className="flex-1 overflow-auto"
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
overflow: "hidden",
|
||||||
|
}}
|
||||||
|
onTouchStart={handleTouchStart}
|
||||||
|
onTouchMove={handleTouchMove}
|
||||||
|
onTouchEnd={handleTouchEnd}
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
id="preview"
|
||||||
|
className="rounded-lg bg-white shadow-md"
|
||||||
|
style={{
|
||||||
|
width: "21cm",
|
||||||
|
padding: "2cm 1cm 0 1cm",
|
||||||
|
margin: "0 auto",
|
||||||
|
height: "29.7cm", // A4纸高度
|
||||||
|
transform: `scale(${scale}) translate(${position.x}px, ${position.y}px)`,
|
||||||
|
transformOrigin: "center center",
|
||||||
|
transition:
|
||||||
|
scale === touchInfo.startScale ? "transform 0.2s ease" : "none",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{moduleList.map((module) => {
|
||||||
|
if (module.type === "title") {
|
||||||
|
return <TitleInfo key={"title"} module={module} />;
|
||||||
|
}
|
||||||
|
|
||||||
if (module.type === "shippingInfo") {
|
if (module.type === "dealerInfo") {
|
||||||
return <ShippingInfo key={"shippingInfo"} module={module} />;
|
return <DealerInfo key={"dealerInfo"} module={module} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (module.type === "weightInfo") {
|
if (module.type === "shippingInfo") {
|
||||||
return <WeightInfo key={"weightInfo"} module={module} />;
|
return <ShippingInfo key={"shippingInfo"} module={module} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (module.type === "packingSpec") {
|
if (module.type === "weightInfo") {
|
||||||
return <PackingSpec key={"packingSpec"} module={module} />;
|
return <WeightInfo key={"weightInfo"} module={module} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (module.type === "vehicleInfo") {
|
if (module.type === "packingSpec") {
|
||||||
return <VehicleInfo key={"vehicleInfo"} module={module} />;
|
return <PackingSpec key={"packingSpec"} module={module} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (module.type === "otherFees") {
|
if (module.type === "vehicleInfo") {
|
||||||
return <OtherFees key={"otherFees"} module={module} />;
|
return <VehicleInfo key={"vehicleInfo"} module={module} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (module.type === "totalAmount") {
|
if (module.type === "otherFees") {
|
||||||
return <TotalAmount key={"totalAmount"} module={module} />;
|
return <OtherFees key={"otherFees"} module={module} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (module.type === "otherInfo") {
|
if (module.type === "totalAmount") {
|
||||||
return <OtherInfo key={"otherInfo"} module={module} />;
|
return <TotalAmount key={"totalAmount"} module={module} />;
|
||||||
}
|
}
|
||||||
})}
|
|
||||||
</ImagePreview>
|
if (module.type === "otherInfo") {
|
||||||
|
return <OtherInfo key={"otherInfo"} module={module} />;
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { Icon } from "@/components";
|
|||||||
import { business, poster } from "@/services";
|
import { business, poster } from "@/services";
|
||||||
import {
|
import {
|
||||||
exportProfitTableExcel,
|
exportProfitTableExcel,
|
||||||
|
OrderCalculator,
|
||||||
ProfitTableRow,
|
ProfitTableRow,
|
||||||
ProfitTableTemplate,
|
ProfitTableTemplate,
|
||||||
} from "@/utils";
|
} from "@/utils";
|
||||||
@ -255,6 +256,35 @@ export default function Step3Success(props: Step3SuccessProps) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 计算单车的利润数据
|
||||||
|
const calculateOrderProfit = (order: BusinessAPI.OrderVO): ProfitTableRow => {
|
||||||
|
// 车次
|
||||||
|
const vehicleNo = `第${order.orderVehicle.vehicleNo || ""}车`;
|
||||||
|
|
||||||
|
// 发货日期 - 从 orderShipList 获取
|
||||||
|
const shippingDate = dayjs(order.orderVehicle.deliveryTime).format(
|
||||||
|
"YYYY/MM/DD",
|
||||||
|
);
|
||||||
|
|
||||||
|
const orderCalculator = new OrderCalculator(order);
|
||||||
|
// 计算产地成本
|
||||||
|
const originCost = orderCalculator
|
||||||
|
.getCostCalculator()
|
||||||
|
.calculateMelonPurchaseCost();
|
||||||
|
// 报价金额
|
||||||
|
const quoteAmount = orderCalculator.getSalesAmount();
|
||||||
|
// 计算利润
|
||||||
|
const profit = orderCalculator.getPersonalProfit();
|
||||||
|
|
||||||
|
return {
|
||||||
|
vehicleNo,
|
||||||
|
shippingDate,
|
||||||
|
originCost,
|
||||||
|
quoteAmount,
|
||||||
|
profit,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
// 生成利润表
|
// 生成利润表
|
||||||
const generateProfitTable = async () => {
|
const generateProfitTable = async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -71,6 +71,7 @@ const Step1Form = forwardRef<Step1FormRef, Step1FormProps>((props, ref) => {
|
|||||||
const [formErrors, setFormErrors] = useState<{
|
const [formErrors, setFormErrors] = useState<{
|
||||||
warehouse?: boolean;
|
warehouse?: boolean;
|
||||||
estimatedArrivalDate?: boolean;
|
estimatedArrivalDate?: boolean;
|
||||||
|
remark?: boolean;
|
||||||
}>({});
|
}>({});
|
||||||
|
|
||||||
// 暴露方法给父组件
|
// 暴露方法给父组件
|
||||||
@ -232,7 +233,7 @@ const Step1Form = forwardRef<Step1FormRef, Step1FormProps>((props, ref) => {
|
|||||||
备注
|
备注
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
className={`flex w-full items-center rounded-md border-4 border-gray-300`}
|
className={`flex w-full items-center rounded-md ${formErrors.remark ? "border-4 border-red-500" : "border-4 border-gray-300"}`}
|
||||||
>
|
>
|
||||||
<TextArea
|
<TextArea
|
||||||
className={"flex-1"}
|
className={"flex-1"}
|
||||||
@ -242,6 +243,14 @@ const Step1Form = forwardRef<Step1FormRef, Step1FormProps>((props, ref) => {
|
|||||||
showCount
|
showCount
|
||||||
value={orderShipVO?.remark || ""}
|
value={orderShipVO?.remark || ""}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
|
// 清除错误状态
|
||||||
|
if (formErrors.remark && value) {
|
||||||
|
setFormErrors((prev) => ({
|
||||||
|
...prev,
|
||||||
|
remark: false,
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
setOrderShipVO((prev: any) => {
|
setOrderShipVO((prev: any) => {
|
||||||
return {
|
return {
|
||||||
...prev!,
|
...prev!,
|
||||||
|
|||||||
@ -51,7 +51,7 @@ export type { MarketPriceSectionRef } from "./section/MarketPriceSection";
|
|||||||
export { default as RebateCalcSection } from "./section/RebateCalcSection";
|
export { default as RebateCalcSection } from "./section/RebateCalcSection";
|
||||||
export { default as TaxSubsidySection } from "./section/TaxSubsidySection";
|
export { default as TaxSubsidySection } from "./section/TaxSubsidySection";
|
||||||
export { default as TaxProvisionSection } from "./section/TaxProvisionSection";
|
export { default as TaxProvisionSection } from "./section/TaxProvisionSection";
|
||||||
export { CostDifferenceSection } from "./section/CostDifferenceSection";
|
export { default as CostDifferenceSection } from "./section/CostDifferenceSection";
|
||||||
export { default as MaterialCostSection } from "./section/MaterialCostSection";
|
export { default as MaterialCostSection } from "./section/MaterialCostSection";
|
||||||
export { default as ProductionAdvanceSection } from "./section/ProductionAdvanceSection";
|
export { default as ProductionAdvanceSection } from "./section/ProductionAdvanceSection";
|
||||||
export { default as WorkerAdvanceSection } from "./section/WorkerAdvanceSection";
|
export { default as WorkerAdvanceSection } from "./section/WorkerAdvanceSection";
|
||||||
|
|||||||
@ -129,9 +129,8 @@ 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 =
|
||||||
!openStrawCurtain ||
|
!orderVehicle.openStrawCurtain ||
|
||||||
validatePrice(orderVehicle?.strawCurtainPrice || 0);
|
validatePrice(orderVehicle?.strawCurtainPrice || 0);
|
||||||
const isDeliveryTimeValid = validateDeliveryTime(
|
const isDeliveryTimeValid = validateDeliveryTime(
|
||||||
orderVehicle?.deliveryTime || "",
|
orderVehicle?.deliveryTime || "",
|
||||||
@ -147,7 +146,7 @@ export default forwardRef<OrderVehicleRef, IOrderVehicleProps>(
|
|||||||
setDeliveryTimeError(!isDeliveryTimeValid);
|
setDeliveryTimeError(!isDeliveryTimeValid);
|
||||||
setDealerNameError(!isDealerValid);
|
setDealerNameError(!isDealerValid);
|
||||||
|
|
||||||
if (openStrawCurtain) {
|
if (orderVehicle.openStrawCurtain) {
|
||||||
setStrawCurtainPriceError(!isStrawCurtainPriceValid);
|
setStrawCurtainPriceError(!isStrawCurtainPriceValid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -770,7 +770,6 @@ export default forwardRef<SupplierInfoRef, ISupplierInfoProps>(
|
|||||||
console.log("识别结果为:", res.result);
|
console.log("识别结果为:", res.result);
|
||||||
setSupplierVO({
|
setSupplierVO({
|
||||||
...supplierVO,
|
...supplierVO,
|
||||||
bankName: res.result.bankName,
|
|
||||||
bankCard: res.result.number,
|
bankCard: res.result.number,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -125,16 +125,6 @@ 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);
|
||||||
@ -427,44 +417,6 @@ 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;
|
||||||
@ -481,12 +433,6 @@ 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(
|
||||||
@ -525,25 +471,13 @@ 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", {
|
||||||
@ -840,12 +774,6 @@ 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,
|
||||||
@ -857,9 +785,6 @@ 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>
|
||||||
|
|
||||||
{/* 有定金吗,有定金就要填写本车扣多少定金 */}
|
{/* 有定金吗,有定金就要填写本车扣多少定金 */}
|
||||||
@ -878,12 +803,6 @@ 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
|
||||||
@ -907,11 +826,6 @@ 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 && (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@ -145,21 +145,11 @@ export default function TicketUpload(props: ITicketUploadProps) {
|
|||||||
className="bg-primary/10 flex flex-col gap-2.5 rounded-lg p-2.5"
|
className="bg-primary/10 flex flex-col gap-2.5 rounded-lg p-2.5"
|
||||||
>
|
>
|
||||||
<View className="flex items-center">
|
<View className="flex items-center">
|
||||||
<View className="relative mr-3 h-16 w-16 flex-shrink-0 overflow-hidden rounded-lg">
|
<View className="relative mr-3 h-16 w-16 overflow-hidden rounded-lg">
|
||||||
{uploadFileItem.fileType !== "pdf" ? (
|
<Image
|
||||||
<Image
|
className="h-full w-full object-cover"
|
||||||
className="h-full w-full object-cover"
|
src={uploadFileItem.filePath!}
|
||||||
src={uploadFileItem.filePath!}
|
/>
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<Icon
|
|
||||||
className={
|
|
||||||
"bg-primary/10 flex h-16 w-16 items-center justify-center"
|
|
||||||
}
|
|
||||||
name="file-pdf"
|
|
||||||
size={32}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
<View className="flex-1">
|
<View className="flex-1">
|
||||||
<View className="font-medium" id="invoice-filename">
|
<View className="font-medium" id="invoice-filename">
|
||||||
@ -232,14 +222,6 @@ export default function TicketUpload(props: ITicketUploadProps) {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
const file = res.tempFiles[0];
|
const file = res.tempFiles[0];
|
||||||
uploadFile(file.path).then(({ url }) => {
|
uploadFile(file.path).then(({ url }) => {
|
||||||
if (!url) {
|
|
||||||
Toast.show("toast", {
|
|
||||||
title: "上传失败",
|
|
||||||
icon: "fail",
|
|
||||||
content: "上传失败",
|
|
||||||
});
|
|
||||||
return Promise.reject();
|
|
||||||
}
|
|
||||||
setSupplierVO({
|
setSupplierVO({
|
||||||
...supplierVO!,
|
...supplierVO!,
|
||||||
invoiceImg: [
|
invoiceImg: [
|
||||||
@ -281,14 +263,6 @@ export default function TicketUpload(props: ITicketUploadProps) {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
const file = res.tempFiles[0];
|
const file = res.tempFiles[0];
|
||||||
uploadFile(file.path).then(({ url }) => {
|
uploadFile(file.path).then(({ url }) => {
|
||||||
if (!url) {
|
|
||||||
Toast.show("toast", {
|
|
||||||
title: "上传失败",
|
|
||||||
icon: "fail",
|
|
||||||
content: "上传失败",
|
|
||||||
});
|
|
||||||
return Promise.reject();
|
|
||||||
}
|
|
||||||
setSupplierVO({
|
setSupplierVO({
|
||||||
...supplierVO!,
|
...supplierVO!,
|
||||||
invoiceImg: [
|
invoiceImg: [
|
||||||
@ -345,7 +319,7 @@ export default function TicketUpload(props: ITicketUploadProps) {
|
|||||||
className="bg-primary/10 flex flex-col gap-2.5 rounded-lg p-2.5"
|
className="bg-primary/10 flex flex-col gap-2.5 rounded-lg p-2.5"
|
||||||
>
|
>
|
||||||
<View className="flex items-center">
|
<View className="flex items-center">
|
||||||
<View className="relative mr-3 h-16 w-16 flex-shrink-0 overflow-hidden rounded-lg">
|
<View className="relative mr-3 h-16 w-16 overflow-hidden rounded-lg">
|
||||||
<Image
|
<Image
|
||||||
className="h-full w-full object-cover"
|
className="h-full w-full object-cover"
|
||||||
src={uploadFileItem.filePath!}
|
src={uploadFileItem.filePath!}
|
||||||
@ -381,11 +355,6 @@ export default function TicketUpload(props: ITicketUploadProps) {
|
|||||||
(newContractImg && newContractImg.length > 0) ||
|
(newContractImg && newContractImg.length > 0) ||
|
||||||
false,
|
false,
|
||||||
});
|
});
|
||||||
Toast.show("toast", {
|
|
||||||
title: "删除成功",
|
|
||||||
icon: "success",
|
|
||||||
content: "合同已删除",
|
|
||||||
});
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<View>删除</View>
|
<View>删除</View>
|
||||||
@ -407,22 +376,12 @@ export default function TicketUpload(props: ITicketUploadProps) {
|
|||||||
success: (res) => {
|
success: (res) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const uploadPromises = res.tempFiles.map((file) =>
|
const uploadPromises = res.tempFiles.map((file) =>
|
||||||
uploadFile(file.path).then(({ url }) => {
|
uploadFile(file.path).then(({ url }) => ({
|
||||||
if (!url) {
|
fileName: url.split("/").pop(),
|
||||||
Toast.show("toast", {
|
filePath: url,
|
||||||
title: "上传失败",
|
fileSize: file.size,
|
||||||
icon: "fail",
|
fileType: url.split(".").pop(),
|
||||||
content: "上传失败",
|
})),
|
||||||
});
|
|
||||||
return Promise.reject();
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
fileName: url.split("/").pop(),
|
|
||||||
filePath: url,
|
|
||||||
fileSize: file.size,
|
|
||||||
fileType: url.split(".").pop(),
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Promise.all(uploadPromises)
|
Promise.all(uploadPromises)
|
||||||
@ -479,22 +438,12 @@ export default function TicketUpload(props: ITicketUploadProps) {
|
|||||||
success: (res) => {
|
success: (res) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const uploadPromises = res.tempFiles.map((file) =>
|
const uploadPromises = res.tempFiles.map((file) =>
|
||||||
uploadFile(file.path).then(({ url }) => {
|
uploadFile(file.path).then(({ url }) => ({
|
||||||
if (!url) {
|
fileName: url.split("/").pop(),
|
||||||
Toast.show("toast", {
|
filePath: url,
|
||||||
title: "上传失败",
|
fileSize: file.size,
|
||||||
icon: "fail",
|
fileType: url.split(".").pop(),
|
||||||
content: "上传失败",
|
})),
|
||||||
});
|
|
||||||
return Promise.reject();
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
fileName: url.split("/").pop(),
|
|
||||||
filePath: url,
|
|
||||||
fileSize: file.size,
|
|
||||||
fileType: url.split(".").pop(),
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Promise.all(uploadPromises)
|
Promise.all(uploadPromises)
|
||||||
|
|||||||
@ -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 gap-1"}
|
className={"flex flex-col items-center justify-center"}
|
||||||
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 text-nowrap">
|
<View className="text-center text-xs">
|
||||||
{boxBrand.boxBrandName}
|
{boxBrand.boxBrandName}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@ -1,13 +1,8 @@
|
|||||||
import { Text, View } from "@tarojs/components";
|
import { Text, View } from "@tarojs/components";
|
||||||
import { OrderCalculator, ProfitTableRow } from "@/utils";
|
import { OrderCalculator } from "@/utils";
|
||||||
import { Icon, ImagePreview, PriceEditor } from "@/components";
|
import { PriceEditor } from "@/components";
|
||||||
import { Button, Popup } from "@nutui/nutui-react-taro";
|
|
||||||
import { useState } from "react";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import { business } from "@/services";
|
|
||||||
import { ProfitCalculationService } from "@/utils/classes/calculators";
|
|
||||||
|
|
||||||
export function CostDifferenceSection(props: {
|
export default function CostDifferenceSection(props: {
|
||||||
orderVO: BusinessAPI.OrderVO;
|
orderVO: BusinessAPI.OrderVO;
|
||||||
onChange?: (orderVO: BusinessAPI.OrderVO) => void;
|
onChange?: (orderVO: BusinessAPI.OrderVO) => void;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
@ -16,74 +11,6 @@ export function CostDifferenceSection(props: {
|
|||||||
const { orderVO, onChange, readOnly, calculator } = props;
|
const { orderVO, onChange, readOnly, calculator } = props;
|
||||||
const orderDealer = orderVO.orderDealer;
|
const orderDealer = orderVO.orderDealer;
|
||||||
|
|
||||||
const [previewVisible, setPreviewVisible] = useState(false);
|
|
||||||
|
|
||||||
// 获取当前月份
|
|
||||||
const currentMonth = dayjs(orderVO.orderVehicle.deliveryTime).format(
|
|
||||||
"YYYY-MM-01",
|
|
||||||
);
|
|
||||||
const [profitData, setProfitData] = useState<ProfitTableRow[]>([]);
|
|
||||||
|
|
||||||
const init = async (currentMonth: string) => {
|
|
||||||
// 查询本月的所有订单数据
|
|
||||||
let {
|
|
||||||
data: { data: orderVOList = [] },
|
|
||||||
} = await business.order.listOrder({
|
|
||||||
orderListQry: {
|
|
||||||
dealerId: orderVO.orderDealer.dealerId,
|
|
||||||
month: currentMonth,
|
|
||||||
state: "COMPLETED", // 只查询已完成的订单
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
orderVOList.push(orderVO);
|
|
||||||
// 获取当前车次
|
|
||||||
const currentVehicleNo = orderVO.orderVehicle.vehicleNo;
|
|
||||||
|
|
||||||
// 筛选截止到当前车次之前的数据
|
|
||||||
const profitData: ProfitTableRow[] = [];
|
|
||||||
let includeNext = true;
|
|
||||||
|
|
||||||
// orderVOList 根据车次正序
|
|
||||||
orderVOList.sort((a, b) => {
|
|
||||||
return (
|
|
||||||
Number(a.orderVehicle.vehicleNo) - Number(b.orderVehicle?.vehicleNo)
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
for (const order of orderVOList) {
|
|
||||||
// 如果还没有到达当前车次,继续
|
|
||||||
if (includeNext) {
|
|
||||||
const profitRow = ProfitCalculationService.calculateOrderProfit(order);
|
|
||||||
profitData.push(profitRow);
|
|
||||||
|
|
||||||
// 如果是当前车次,停止添加
|
|
||||||
if (order.orderVehicle.vehicleNo === currentVehicleNo) {
|
|
||||||
includeNext = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setProfitData(profitData);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 预览发货单操作
|
|
||||||
const handlePreview = () => {
|
|
||||||
init(currentMonth);
|
|
||||||
setPreviewVisible(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 计算合计
|
|
||||||
const totalOriginCost = profitData.reduce(
|
|
||||||
(sum, row) => sum + row.originCost,
|
|
||||||
0,
|
|
||||||
);
|
|
||||||
const totalQuoteAmount = profitData.reduce(
|
|
||||||
(sum, row) => sum + row.quoteAmount,
|
|
||||||
0,
|
|
||||||
);
|
|
||||||
const totalProfit = profitData.reduce((sum, row) => sum + row.profit, 0);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={"flex flex-col gap-2.5"}>
|
<View className={"flex flex-col gap-2.5"}>
|
||||||
{/* 卡片形式展示分成信息 */}
|
{/* 卡片形式展示分成信息 */}
|
||||||
@ -129,105 +56,6 @@ export function CostDifferenceSection(props: {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* 预览利润表 */}
|
|
||||||
<View className={"flex-1"}>
|
|
||||||
<Button
|
|
||||||
icon={<Icon name="eye" size={18} />}
|
|
||||||
size={"large"}
|
|
||||||
type="primary"
|
|
||||||
fill="outline"
|
|
||||||
block
|
|
||||||
onClick={handlePreview}
|
|
||||||
>
|
|
||||||
预览利润表
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* 预览发货单 */}
|
|
||||||
<Popup
|
|
||||||
duration={150}
|
|
||||||
style={{
|
|
||||||
minHeight: "auto",
|
|
||||||
}}
|
|
||||||
className={"!bg-[#D1D5DB]"}
|
|
||||||
visible={previewVisible}
|
|
||||||
position="bottom"
|
|
||||||
onClose={() => {
|
|
||||||
setPreviewVisible(false);
|
|
||||||
}}
|
|
||||||
closeable
|
|
||||||
destroyOnClose
|
|
||||||
title={"预览利润单"}
|
|
||||||
>
|
|
||||||
<View className={"overflow-hidden p-2.5"}>
|
|
||||||
<ImagePreview>
|
|
||||||
<View className="table-border">
|
|
||||||
<View className="table-title flex items-end justify-center text-base">
|
|
||||||
诚信志远利润明细
|
|
||||||
</View>
|
|
||||||
<View className={"grid w-full grid-cols-5 gap-0 text-base"}>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
车次
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
发货日期
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
产地成本
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
报价金额
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
利润
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{profitData.map((row, index) => (
|
|
||||||
<View
|
|
||||||
className={"grid w-full grid-cols-5 gap-0 text-base"}
|
|
||||||
key={index}
|
|
||||||
>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
{row.vehicleNo}
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
{row.shippingDate}
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
{row.originCost}
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
{row.quoteAmount}
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
{row.profit.toFixed(2)}
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
))}
|
|
||||||
<View className={"grid w-full grid-cols-5 gap-0 text-base"}>
|
|
||||||
<View
|
|
||||||
className={
|
|
||||||
"col-span-2 flex items-end justify-center bg-yellow-500"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{dayjs(currentMonth).format("MMMM")}合计
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
{totalOriginCost.toFixed(2)}
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
{totalQuoteAmount.toFixed(2)}
|
|
||||||
</View>
|
|
||||||
<View className={"col-span-1 flex items-end justify-center"}>
|
|
||||||
{totalProfit.toFixed(2)}
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</ImagePreview>
|
|
||||||
</View>
|
|
||||||
</Popup>
|
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
// App 相关常量
|
// App 相关常量
|
||||||
export const APP_VERSION = "v0.0.76";
|
export const APP_VERSION = "v0.0.73";
|
||||||
|
|||||||
@ -285,9 +285,9 @@ export default hocAuth(function Page(props: CommonComponent) {
|
|||||||
}
|
}
|
||||||
// 检查预计到仓时间字段是否开启且已填写
|
// 检查预计到仓时间字段是否开启且已填写
|
||||||
else if (column.dataIndex === "requiredEstimatedArrivalTime") {
|
else if (column.dataIndex === "requiredEstimatedArrivalTime") {
|
||||||
formData.estimatedArrivalDate = orderShip?.estimatedArrivalDate
|
formData.estimatedArrivalDate = dayjs(
|
||||||
? dayjs(orderShip?.estimatedArrivalDate).format("YYYY-MM-DD")
|
orderShip?.estimatedArrivalDate,
|
||||||
: undefined;
|
).format("YYYY-MM-DD");
|
||||||
}
|
}
|
||||||
// 检查备注字段是否开启且已填写
|
// 检查备注字段是否开启且已填写
|
||||||
else if (column.dataIndex === "requiredRemarks") {
|
else if (column.dataIndex === "requiredRemarks") {
|
||||||
|
|||||||
@ -11,10 +11,6 @@ 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);
|
||||||
@ -30,26 +26,6 @@ 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",
|
||||||
@ -356,10 +332,7 @@ export default hocAuth(function Page(props: CommonComponent) {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View
|
<View className="flex w-full flex-col py-4 text-center">
|
||||||
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,249 +1,387 @@
|
|||||||
import hocAuth from "@/hocs/auth";
|
import hocAuth from "@/hocs/auth";
|
||||||
import { ActionType, PageList } from "@/components";
|
import { CommonComponent } from "@/types/typings";
|
||||||
import { Text, View } from "@tarojs/components";
|
import { CustomTabBar, Icon } from "@/components";
|
||||||
import { business } from "@/services";
|
import { View } from "@tarojs/components";
|
||||||
import { useRef } from "react";
|
import { Button } from "@nutui/nutui-react-taro";
|
||||||
import { Button, Dialog, Toast } from "@nutui/nutui-react-taro";
|
import { useState } from "react";
|
||||||
import dayjs from "dayjs";
|
|
||||||
import classNames from "classnames";
|
|
||||||
import Taro from "@tarojs/taro";
|
|
||||||
import { buildUrl } from "@/utils";
|
|
||||||
|
|
||||||
export default hocAuth(function Page() {
|
export default hocAuth(function Page(props: CommonComponent) {
|
||||||
const actionRef = useRef<ActionType>();
|
const { userRoleVO } = props;
|
||||||
|
|
||||||
// 标记消息为已读
|
const [activeTab, setActiveTab] = useState<"todo" | "done" | "message">(
|
||||||
const handleMarkAsRead = async (
|
"message",
|
||||||
messageReceiver: BusinessAPI.MessageReceiverVO,
|
);
|
||||||
) => {
|
|
||||||
if (messageReceiver.isRead) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
const handleTabChange = (tab: "todo" | "done" | "message") => {
|
||||||
const { data } = await business.messageReceiver.markReadMessageReceiver({
|
setActiveTab(tab);
|
||||||
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 handleDelete = (messageReceiver: BusinessAPI.MessageReceiverVO) => {
|
const renderTodoList = () => (
|
||||||
Dialog.open("dialog", {
|
<View className="mt-3 space-y-3">
|
||||||
title: "删除消息",
|
{/* 采购审核任务 */}
|
||||||
content: "确定要删除这条消息吗?",
|
<View className="rounded-xl bg-white p-4 shadow-sm">
|
||||||
confirmText: "确定",
|
<View className="flex items-start">
|
||||||
cancelText: "取消",
|
<View className="status-badge bg-primary mt-1 mr-3"></View>
|
||||||
onConfirm: async () => {
|
<View className="flex-1">
|
||||||
try {
|
<View className="flex items-start justify-between">
|
||||||
const { data } =
|
<View>
|
||||||
await business.messageReceiver.destroyMessageReceiver({
|
<View className="text-sm font-medium text-gray-800">
|
||||||
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: "删除失败",
|
|
||||||
});
|
|
||||||
} finally {
|
|
||||||
Dialog.close("dialog");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onCancel: () => {
|
|
||||||
Dialog.close("dialog");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<PageList<BusinessAPI.MessageReceiverVO, BusinessAPI.MessageReceiverPageQry>
|
|
||||||
rowId={"messageReceiverId"}
|
|
||||||
itemHeight={182}
|
|
||||||
type={"infinite"}
|
|
||||||
actionRef={actionRef}
|
|
||||||
render={(messageReceiverVO: BusinessAPI.MessageReceiverVO, index) => {
|
|
||||||
const { messageVO } = messageReceiverVO;
|
|
||||||
return (
|
|
||||||
<View
|
|
||||||
className={classNames(
|
|
||||||
"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="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="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>
|
||||||
|
<View className="mt-3 flex justify-end">
|
||||||
{/* 操作按钮区域 */}
|
<Button className="!rounded-button bg-primary px-4 py-1 text-sm text-white">
|
||||||
<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>
|
||||||
<Button
|
|
||||||
type="danger"
|
|
||||||
size="small"
|
|
||||||
onClick={(e) => {
|
|
||||||
handleDelete(messageReceiverVO);
|
|
||||||
e.stopPropagation();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</Button>
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
</View>
|
||||||
}}
|
</View>
|
||||||
request={async (params) => {
|
|
||||||
const {
|
|
||||||
data: { data, success, notEmpty },
|
|
||||||
} = await business.messageReceiver.pageMessageReceiver({
|
|
||||||
messageReceiverPageQry: {
|
|
||||||
...params,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
{/* 老板审批任务 */}
|
||||||
data,
|
<View className="rounded-xl bg-white p-4 shadow-sm">
|
||||||
success,
|
<View className="flex items-start">
|
||||||
hasMore: notEmpty,
|
<View className="status-badge mt-1 mr-3 bg-yellow-500"></View>
|
||||||
};
|
<View className="flex-1">
|
||||||
}}
|
<View className="flex items-start justify-between">
|
||||||
pagination={{
|
<View>
|
||||||
pageSize: 10,
|
<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-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 (
|
||||||
|
<>
|
||||||
|
{/* 任务列表 */}
|
||||||
|
<View className={"p-2.5"}>
|
||||||
|
{/* Tab切换 */}
|
||||||
|
<View className="flex border-b border-gray-200">
|
||||||
|
<View
|
||||||
|
className={`flex-1 py-2 text-center ${activeTab === "todo" ? "border-primary border-b-2" : ""}`}
|
||||||
|
onClick={() => handleTabChange("todo")}
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
className={`text-sm font-medium ${activeTab === "todo" ? "text-primary" : "text-gray-500"}`}
|
||||||
|
>
|
||||||
|
待办
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className={`flex-1 py-2 text-center ${activeTab === "done" ? "border-primary border-b-2" : ""}`}
|
||||||
|
onClick={() => handleTabChange("done")}
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
className={`text-sm font-medium ${activeTab === "done" ? "text-primary" : "text-gray-500"}`}
|
||||||
|
>
|
||||||
|
已办
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View
|
||||||
|
className={`flex-1 py-2 text-center ${activeTab === "message" ? "border-primary border-b-2" : ""}`}
|
||||||
|
onClick={() => handleTabChange("message")}
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
className={`text-sm font-medium ${activeTab === "message" ? "text-primary" : "text-gray-500"}`}
|
||||||
|
>
|
||||||
|
消息
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
{/* 根据选中的Tab显示不同的内容列表 */}
|
||||||
|
{activeTab === "todo" && renderTodoList()}
|
||||||
|
{activeTab === "done" && renderDoneList()}
|
||||||
|
{activeTab === "message" && renderMessageList()}
|
||||||
|
</View>
|
||||||
|
{process.env.TARO_ENV === "weapp" && <CustomTabBar />}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -38,7 +38,7 @@ export default function Page() {
|
|||||||
|
|
||||||
const [data, setData] = useState({
|
const [data, setData] = useState({
|
||||||
skipphotoStatus: "0",
|
skipphotoStatus: "0",
|
||||||
flash: false,
|
flash: true,
|
||||||
bottom: 125,
|
bottom: 125,
|
||||||
windowWidth: 300,
|
windowWidth: 300,
|
||||||
touchPadding: 36,
|
touchPadding: 36,
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -1,135 +0,0 @@
|
|||||||
// @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,9 +6,6 @@ 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";
|
||||||
@ -16,8 +13,6 @@ 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";
|
||||||
@ -29,7 +24,6 @@ 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";
|
||||||
@ -51,9 +45,6 @@ export default {
|
|||||||
supplier,
|
supplier,
|
||||||
supplierInvoice,
|
supplierInvoice,
|
||||||
setting,
|
setting,
|
||||||
reconciliation,
|
|
||||||
reconciliationPayment,
|
|
||||||
reconciliationInvoice,
|
|
||||||
product,
|
product,
|
||||||
platform,
|
platform,
|
||||||
paymentTask,
|
paymentTask,
|
||||||
@ -61,8 +52,6 @@ export default {
|
|||||||
order,
|
order,
|
||||||
orderSupplier,
|
orderSupplier,
|
||||||
orderShip,
|
orderShip,
|
||||||
messageTemplate,
|
|
||||||
messageReceiver,
|
|
||||||
menu,
|
menu,
|
||||||
material,
|
material,
|
||||||
materialCategory,
|
materialCategory,
|
||||||
@ -74,7 +63,6 @@ export default {
|
|||||||
dealerWarehouse,
|
dealerWarehouse,
|
||||||
dealerRebateCustomer,
|
dealerRebateCustomer,
|
||||||
dealerPaymentAccount,
|
dealerPaymentAccount,
|
||||||
dealerAccountRecord,
|
|
||||||
cost,
|
cost,
|
||||||
costItem,
|
costItem,
|
||||||
company,
|
company,
|
||||||
|
|||||||
@ -1,167 +0,0 @@
|
|||||||
// @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 || {}),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,132 +0,0 @@
|
|||||||
// @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 || {}),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,150 +0,0 @@
|
|||||||
// @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 || {}),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,135 +0,0 @@
|
|||||||
// @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 || {}),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -1,135 +0,0 @@
|
|||||||
// @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
@ -7,4 +7,3 @@
|
|||||||
|
|
||||||
export { OrderCalculator } from "./OrderCalculator";
|
export { OrderCalculator } from "./OrderCalculator";
|
||||||
export { WeightCalculationService } from "./services/WeightCalculationService";
|
export { WeightCalculationService } from "./services/WeightCalculationService";
|
||||||
export { ProfitCalculationService } from "./services/ProfitCalculationService";
|
|
||||||
|
|||||||
@ -1,34 +0,0 @@
|
|||||||
import { OrderCalculator, ProfitTableRow } from "@/utils";
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
|
|
||||||
export class ProfitCalculationService {
|
|
||||||
// 计算单车的利润数据
|
|
||||||
|
|
||||||
static calculateOrderProfit(order: BusinessAPI.OrderVO): ProfitTableRow {
|
|
||||||
// 车次
|
|
||||||
const vehicleNo = `第${order.orderVehicle.vehicleNo || ""}车`;
|
|
||||||
|
|
||||||
// 发货日期 - 从 orderShipList 获取
|
|
||||||
const shippingDate = dayjs(order.orderVehicle.deliveryTime).format(
|
|
||||||
"YYYY/MM/DD",
|
|
||||||
);
|
|
||||||
|
|
||||||
const orderCalculator = new OrderCalculator(order);
|
|
||||||
// 计算产地成本
|
|
||||||
const originCost = orderCalculator
|
|
||||||
.getCostCalculator()
|
|
||||||
.calculateMelonPurchaseCost();
|
|
||||||
// 报价金额
|
|
||||||
const quoteAmount = orderCalculator.getSalesAmount();
|
|
||||||
// 计算利润
|
|
||||||
const profit = orderCalculator.getPersonalProfit();
|
|
||||||
|
|
||||||
return {
|
|
||||||
vehicleNo,
|
|
||||||
shippingDate,
|
|
||||||
originCost,
|
|
||||||
quoteAmount,
|
|
||||||
profit,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -121,6 +121,5 @@ export const convertOrderToOrderShip = (
|
|||||||
state: "WAIT_PAYMENT",
|
state: "WAIT_PAYMENT",
|
||||||
receivableAmount: calculator.getMarketPrice(),
|
receivableAmount: calculator.getMarketPrice(),
|
||||||
orderShipItemList,
|
orderShipItemList,
|
||||||
remark: oldOrderShip?.remark || "",
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,64 +0,0 @@
|
|||||||
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