feat(purchase): 优化采购订单创建流程和界面交互
- 新增系统瓜农信息自动填充和冲突检测功能 - 改进瓜农信息模块的验证逻辑和用户体验 - 优化车辆信息提取逻辑,自动填充经销商信息 - 更新市场价展示方式,从表格改为卡片形式 - 增强提交审核前的完整性检查,包括拼车状态和合同上传状态 - 完善页面间导航和数据传递逻辑 - 添加设计规范文档,统一项目UI标准 - 优化采购订单草稿保存逻辑和步骤切换体验 - 改进采购订单列表页面的交互和状态判断
This commit is contained in:
parent
88e38778bd
commit
f77acab4cb
@ -1,5 +0,0 @@
|
||||
---
|
||||
trigger: manual
|
||||
---
|
||||
|
||||
写的提示语和交互,得让没文化的人能看懂
|
||||
218
.lingma/rules/project-design.md
Normal file
218
.lingma/rules/project-design.md
Normal file
@ -0,0 +1,218 @@
|
||||
---
|
||||
trigger: manual
|
||||
---
|
||||
|
||||
# ERPTurbo 设计规范
|
||||
|
||||
本文档定义了 ERPTurbo 项目的设计规范,包括颜色、字体、间距、圆角、阴影、布局、组件样式等标准。
|
||||
|
||||
## 颜色规范
|
||||
|
||||
### 主色调
|
||||
|
||||
项目使用单一主色调来确保品牌一致性:
|
||||
|
||||
- 主色:`#15B8A6`(蓝绿色)- 用于主要操作按钮、链接和重要信息
|
||||
|
||||
### 中性色系统
|
||||
|
||||
中性色用于文本、背景和边框,提供清晰的层次结构:
|
||||
|
||||
- 最深色:`#333333` - 主要文本
|
||||
- 深色:`#666666` - 次要文本
|
||||
- 中色:`#999999` - 辅助文本
|
||||
- 基础色:`#DDDDDD` - 边框和分隔线
|
||||
- 浅色:`#EEEEEE` - 背景灰
|
||||
- 最浅色:`#F8F9FA` - 背景色
|
||||
|
||||
## 字体规范
|
||||
|
||||
### 字号标准
|
||||
|
||||
为确保良好的可读性和层次结构,定义以下字号标准:
|
||||
|
||||
- 大标题:18px - 用于页面主标题
|
||||
- 中标题:16px - 用于模块标题
|
||||
- 小标题:14px - 用于小节标题
|
||||
- 正文:14px - 用于常规文本
|
||||
- 辅助文本:12px - 用于辅助说明
|
||||
- 标签文本:10px - 用于标签、徽章
|
||||
|
||||
### 字体粗细
|
||||
|
||||
- 细体:font-weight 300
|
||||
- 常规:font-weight 400
|
||||
- 中粗:font-weight 500
|
||||
- 粗体:font-weight 600
|
||||
- 黑体:font-weight 700
|
||||
|
||||
### 行高
|
||||
|
||||
- 紧凑:1.2
|
||||
- 标准:1.5
|
||||
- 宽松:1.8
|
||||
|
||||
## 间距规范
|
||||
|
||||
使用 4 的倍数作为间距系统的基础单位,确保视觉一致性:
|
||||
|
||||
- 超小间距:4px
|
||||
- 小间距:8px
|
||||
- 中等间距:16px
|
||||
- 大间距:24px
|
||||
- 超大间距:32px
|
||||
|
||||
### 使用场景
|
||||
|
||||
- 元素内边距:通常使用 8px、16px
|
||||
- 元素间外边距:通常使用 16px、24px
|
||||
- 段落间距:通常使用 24px
|
||||
- 页面边距:通常使用 16px
|
||||
|
||||
## 圆角规范
|
||||
|
||||
为保持视觉一致性,定义以下圆角标准:
|
||||
|
||||
- 小圆角:2px - 用于按钮、标签
|
||||
- 中圆角:4px - 用于表单控件、卡片
|
||||
- 大圆角:8px - 用于模块容器
|
||||
- 超大圆角:16px - 用于特殊组件
|
||||
- 圆形:50% - 用于头像、圆形按钮
|
||||
|
||||
## 阴影规范
|
||||
|
||||
使用不同层级的阴影来表达元素的层次关系:
|
||||
|
||||
- 基础阴影:用于卡片等容器元素
|
||||
- offset-x: 0px, offset-y: 1px, blur: 2px, spread: 0px
|
||||
- color: rgba(0, 0, 0, 0.1)
|
||||
|
||||
- 中等阴影:用于悬浮状态、下拉菜单
|
||||
- offset-x: 0px, offset-y: 2px, blur: 4px, spread: 0px
|
||||
- color: rgba(0, 0, 0, 0.1)
|
||||
|
||||
- 强阴影:用于模态框、重要提示
|
||||
- offset-x: 0px, offset-y: 4px, blur: 8px, spread: 0px
|
||||
- color: rgba(0, 0, 0, 0.1)
|
||||
|
||||
## 布局规范
|
||||
|
||||
### 弹性布局
|
||||
|
||||
- 主轴对齐:使用 `justify-content` 控制水平对齐
|
||||
- 交叉轴对齐:使用 `align-items` 控制垂直对齐
|
||||
- 方向:默认使用 `row`,垂直布局使用 `column`
|
||||
|
||||
### 网格布局
|
||||
|
||||
- 基础网格:使用 12 列网格系统
|
||||
- 列间距:16px
|
||||
- 行间距:16px
|
||||
|
||||
### 响应式断点
|
||||
|
||||
- 小屏幕(手机):< 768px
|
||||
- 中等屏幕(平板):≥ 768px
|
||||
- 大屏幕(桌面):≥ 1024px
|
||||
|
||||
## 组件规范
|
||||
|
||||
### 按钮
|
||||
|
||||
- 高度:40px
|
||||
- 圆角:4px
|
||||
- 内边距:水平 16px
|
||||
- 字体大小:14px
|
||||
- 字体粗细:500
|
||||
|
||||
状态样式:
|
||||
- 默认:主色背景,白色文字
|
||||
- 悬停:主色加深 10%
|
||||
- 禁用:灰色背景,浅灰文字
|
||||
|
||||
### 输入框
|
||||
|
||||
- 高度:40px
|
||||
- 圆角:4px
|
||||
- 边框:1px #DDDDDD
|
||||
- 内边距:水平 12px
|
||||
- 字体大小:14px
|
||||
|
||||
### 卡片
|
||||
|
||||
- 圆角:8px
|
||||
- 内边距:16px
|
||||
- 背景:白色
|
||||
- 阴影:基础阴影
|
||||
|
||||
### 标签
|
||||
|
||||
- 圆角:2px
|
||||
- 内边距:垂直 2px,水平 6px
|
||||
- 字体大小:12px
|
||||
- 字体粗细:500
|
||||
|
||||
## 响应式设计
|
||||
|
||||
### 断点使用
|
||||
|
||||
- 手机端:单一列布局,元素堆叠显示
|
||||
- 平板端:可使用多列布局,适当调整元素大小
|
||||
- 桌面端:充分利用空间,显示更多信息
|
||||
|
||||
### 响应式工具类
|
||||
|
||||
使用 Tailwind CSS 提供的响应式工具类:
|
||||
- `sm:` 超过 640px
|
||||
- `md:` 超过 768px
|
||||
- `lg:` 超过 1024px
|
||||
- `xl:` 超过 1280px
|
||||
|
||||
## 可访问性
|
||||
|
||||
### 颜色对比度
|
||||
|
||||
- 文本与背景的对比度至少为 4.5:1
|
||||
- 重要元素(如按钮)的对比度至少为 3:1
|
||||
|
||||
### 焦点状态
|
||||
|
||||
- 所有可交互元素必须有清晰的焦点状态
|
||||
- 焦点状态使用 2px 主色轮廓
|
||||
- 确保键盘导航的可用性
|
||||
|
||||
### 语义化标签
|
||||
|
||||
- 使用正确的 HTML 语义化标签
|
||||
- 为图片提供有意义的 alt 属性
|
||||
- 为表单控件提供关联的标签
|
||||
|
||||
## 最佳实践
|
||||
|
||||
### 命名约定
|
||||
|
||||
- CSS 类名使用 BEM 命名法
|
||||
- 变量使用驼峰命名法
|
||||
- 文件名使用帕斯卡命名法(组件)或小写连字符(其他)
|
||||
|
||||
### 性能优化
|
||||
|
||||
- 避免使用过多的阴影和渐变
|
||||
- 合理使用 CSS 动画
|
||||
- 优化图片资源
|
||||
|
||||
### 维护性建议
|
||||
|
||||
- 保持组件的单一职责
|
||||
- 使用 TypeScript 定义组件接口
|
||||
- 编写清晰的注释
|
||||
- 遵循一致的代码风格
|
||||
|
||||
## 附录
|
||||
|
||||
本规范基于以下技术栈实现:
|
||||
- Tailwind CSS 用于样式系统
|
||||
- Taro 框架用于多端开发
|
||||
- React 用于组件开发
|
||||
|
||||
所有设计决策应以提升用户体验和保持视觉一致性为目标。
|
||||
174
.lingma/rules/project-overview.md
Normal file
174
.lingma/rules/project-overview.md
Normal file
@ -0,0 +1,174 @@
|
||||
---
|
||||
trigger: manual
|
||||
---
|
||||
|
||||
# ERPTurbo_Client 项目概述文档
|
||||
|
||||
## 项目简介
|
||||
|
||||
ERPTurbo_Client 是一个基于 Taro 框架开发的企业级ERP客户端应用,主要用于采购管理和发货管理等业务流程。该项目采用多端统一开发模式,可以同时支持微信小程序等多个平台。
|
||||
|
||||
## 技术栈
|
||||
|
||||
- **框架**: Taro v4.x (React-like)
|
||||
- **语言**: TypeScript
|
||||
- **状态管理**: Zustand
|
||||
- **构建工具**: Webpack
|
||||
- **包管理**: pnpm
|
||||
- **UI框架**: nutui 3.0.18
|
||||
- **CSS预处理器**: Sass
|
||||
- **代码规范**: ESLint + Prettier
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
packages/app-client/
|
||||
├── config/ # 构建配置文件
|
||||
├── src/ # 源码目录
|
||||
│ ├── components/ # 公共组件
|
||||
│ ├── pages/ # 页面组件
|
||||
│ ├── services/ # 接口服务
|
||||
│ ├── store/ # 状态管理
|
||||
│ ├── utils/ # 工具函数
|
||||
│ ├── constant/ # 常量定义
|
||||
│ ├── types/ # 类型定义
|
||||
│ └── app.config.ts # 应用配置
|
||||
├── __tests__/ # 测试文件
|
||||
└── package.json # 项目依赖配置
|
||||
```
|
||||
|
||||
### 核心目录详解
|
||||
|
||||
#### src/pages 页面目录
|
||||
|
||||
包含应用的所有页面,按业务模块划分:
|
||||
- `main/`: 主页模块(工作台、菜单、消息、个人中心)
|
||||
- `public/`: 公共页面(登录、相机、OCR识别等)
|
||||
- `purchase/`: 采购相关页面(创建、审核、审批等)
|
||||
- `delivery/`: 发货相关页面(发货单列表、详情等)
|
||||
|
||||
#### src/components 组件目录
|
||||
|
||||
包含各种可复用组件:
|
||||
- `biz/`: 通用业务组件
|
||||
- `purchase/`: 采购专用组件
|
||||
- `dealer/`: 经销商相关组件
|
||||
- `supplier/`: 供应商相关组件
|
||||
- `icon/`: 图标组件
|
||||
|
||||
#### src/services 接口服务
|
||||
|
||||
封装了所有后端API调用:
|
||||
- `auth/`: 认证授权相关接口
|
||||
- `business/`: 业务相关接口
|
||||
|
||||
#### src/store 状态管理
|
||||
|
||||
使用 zustand 进行状态管理:
|
||||
- `user-store.ts`: 用户相关信息存储
|
||||
- `global-store.ts`: 全局状态存储
|
||||
|
||||
#### src/utils 工具函数
|
||||
|
||||
包含各种通用工具函数:
|
||||
- `format.ts`: 格式化工具(日期、金额等)
|
||||
- `calculateSupplierWeights.ts`: 供应商权重计算
|
||||
- `calcutePurchaseOrder.ts`: 采购单相关计算逻辑
|
||||
|
||||
## 核心业务流程
|
||||
|
||||
### 采购流程
|
||||
|
||||
1. **采购员**创建采购单
|
||||
- 填写供应商信息
|
||||
- 录入商品明细
|
||||
- 设置价格和重量
|
||||
|
||||
2. **审核员**进行报价审核
|
||||
- 查看采购单详情
|
||||
- 审核价格合理性
|
||||
|
||||
3. **审批员**进行最终审批
|
||||
- 查看审核结果
|
||||
- 决定是否批准采购
|
||||
|
||||
### 发货流程
|
||||
|
||||
1. 创建发货单
|
||||
2. 填写发货明细
|
||||
3. 确认发货信息
|
||||
4. 完成发货操作
|
||||
|
||||
## 编码规范
|
||||
|
||||
### 金额计算规范
|
||||
|
||||
由于JavaScript浮点数精度问题,项目中所有的金额计算都应遵循以下规范:
|
||||
- 使用 `lodash-es` 的 `multiply`/`divide` 等方法进行数学运算
|
||||
- 所有金额保留两位小数,使用 `toFixed(2)` 方法格式化
|
||||
|
||||
### 组件开发规范
|
||||
|
||||
1. **组件分类**
|
||||
- `biz/`: 通用业务组件(如状态标签、导航栏等跨模块复用的业务组件)
|
||||
- `purchase/`: 采购模块专用组件(仅限采购相关业务使用)
|
||||
- `dealer/`: 经销商相关组件(经销商选择器、账户选择器等)
|
||||
- `supplier/`: 供应商相关组件(供应商选择器等)
|
||||
- `icon/`: 图标组件(统一管理项目中使用的图标)
|
||||
|
||||
2. **组件设计原则**
|
||||
- 组件应该是无状态或受控的(尽可能使用受控组件)
|
||||
- 组件应该具有清晰的输入(props)和输出(回调函数)
|
||||
- 组件应该具有良好的封装性,避免暴露内部实现细节
|
||||
- 组件应该具有良好的可复用性,避免与具体业务逻辑强耦合
|
||||
- 组件应该具有良好的扩展性,方便后续功能增强
|
||||
|
||||
3. **组件实现规范**
|
||||
- 使用 TypeScript 编写组件,明确定义 props 和 state 类型
|
||||
- 使用函数组件和 Hooks,避免使用 class 组件
|
||||
- 组件文件名使用大驼峰命名法(PascalCase),如 `OrderList.tsx`
|
||||
- 组件导出应包含默认导出和必要的类型导出
|
||||
- 组件内部状态管理应使用 useState、useReducer 等 React Hooks
|
||||
- 组件应提供清晰的文档注释,说明组件用途、props 说明等
|
||||
|
||||
4. **组件接口规范**
|
||||
- 组件 props 应该有明确的类型定义
|
||||
- 组件事件回调函数应该以 on 开头,如 `onChange`、`onSubmit`
|
||||
- 组件应该支持 ref 转发(如果需要)
|
||||
- 组件应该支持 className 和 style 属性用于样式定制
|
||||
|
||||
5. **组件样式规范**
|
||||
- 使用 Tailwind CSS 进行样式开发
|
||||
- 避免使用内联样式
|
||||
- 组件样式应该具有良好的隔离性,避免样式污染
|
||||
- 组件应该支持主题定制
|
||||
|
||||
### 目录命名规范
|
||||
|
||||
- 类型定义:`src/types/[模块名]/`
|
||||
- 接口定义:`src/api/[模块名]/`
|
||||
- 公共组件:`src/components/[模块名]/`
|
||||
- 工具方法:`src/utils/[模块名]/`
|
||||
|
||||
## 开发环境搭建
|
||||
|
||||
1. 安装 Node.js (建议版本 14+)
|
||||
2. 安装 pnpm: `npm install -g pnpm`
|
||||
3. 安装依赖: `pnpm install`
|
||||
4. 启动开发服务器: `pnpm run dev:weapp`
|
||||
|
||||
## 构建部署
|
||||
|
||||
- 微信小程序: `pnpm run build:weapp`
|
||||
- H5: `pnpm run build:h5`
|
||||
- 其他平台: 查看 package.json 中的 scripts 配置
|
||||
|
||||
## 测试
|
||||
|
||||
运行测试: `pnpm run test`
|
||||
|
||||
## 代码质量保证
|
||||
|
||||
- 代码格式化: `pnpm run format`
|
||||
- 代码检查: `pnpm run lint`
|
||||
- Git钩子自动检查: 使用 husky 和 lint-staged
|
||||
@ -77,16 +77,20 @@ export default function PurchaseOrderSubmitReview(
|
||||
);
|
||||
|
||||
if (!hasLastSupplier) {
|
||||
const lastSupplier =
|
||||
purchaseOrderVO.orderSupplierList[
|
||||
purchaseOrderVO.orderSupplierList.length - 1
|
||||
];
|
||||
Dialog.open("dialog", {
|
||||
title: "提交审核提醒",
|
||||
content:
|
||||
"检测到未设置最后一个瓜农。如果车已装满了,请返回瓜农信息步骤设置此瓜农为最后一个瓜农?",
|
||||
content: `这车货目前还在拼车状态。一旦确认车辆已满载,就需要在瓜农信息那里,把“${lastSupplier.name}”的这车货标记为“不需要拼车”。`,
|
||||
confirmText: "去瓜农信息",
|
||||
cancelText: "取消",
|
||||
onConfirm: async () => {
|
||||
Taro.redirectTo({
|
||||
url: buildUrl("/pages/purchase/purchaser/create", {
|
||||
orderId: purchaseOrderVO.orderId,
|
||||
supplierId: lastSupplier.supplierId,
|
||||
step: "2",
|
||||
}),
|
||||
});
|
||||
@ -100,9 +104,40 @@ export default function PurchaseOrderSubmitReview(
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查是否存在合同未上传的瓜农
|
||||
const hasNoUpdateContractSupplier =
|
||||
purchaseOrderVO.orderSupplierList?.find(
|
||||
(supplier) => !supplier.contractUpload,
|
||||
);
|
||||
|
||||
if (hasNoUpdateContractSupplier) {
|
||||
Dialog.open("dialog", {
|
||||
title: "提交审核提醒",
|
||||
content: `检测到瓜农“${hasNoUpdateContractSupplier.name}”未上传合同。请返回票证上传步骤上传合同?`,
|
||||
confirmText: "去票证上传",
|
||||
cancelText: "取消",
|
||||
onConfirm: async () => {
|
||||
Taro.redirectTo({
|
||||
url: buildUrl("/pages/purchase/purchaser/create", {
|
||||
orderId: purchaseOrderVO.orderId,
|
||||
supplierId: hasNoUpdateContractSupplier.supplierId,
|
||||
step: "5",
|
||||
}),
|
||||
});
|
||||
Dialog.close("dialog");
|
||||
},
|
||||
onCancel: () => {
|
||||
Dialog.close("dialog");
|
||||
},
|
||||
});
|
||||
e.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
Dialog.open("dialog", {
|
||||
title: "提交审核提醒",
|
||||
content: "提交后报价审核员将看到此审核采购单,请确保所有瓜农信息都录入进来了,确认提交采购订单?",
|
||||
content:
|
||||
"提交后报价审核员将看到此审核采购单,请确保所有瓜农信息都录入进来了,确认提交采购订单?",
|
||||
confirmText: "确认",
|
||||
cancelText: "取消",
|
||||
onConfirm: async () => {
|
||||
|
||||
@ -6,6 +6,7 @@ import {
|
||||
Toast,
|
||||
Uploader,
|
||||
UploaderFileItem,
|
||||
Dialog,
|
||||
} from "@nutui/nutui-react-taro";
|
||||
import { Icon, SupplierPicker } from "@/components";
|
||||
import { forwardRef, useEffect, useImperativeHandle, useState } from "react";
|
||||
@ -13,6 +14,7 @@ import { SupplierVO } from "@/types/typings";
|
||||
import { uploadFile } from "@/utils/uploader";
|
||||
import Taro from "@tarojs/taro";
|
||||
import buildUrl from "@/utils/buildUrl";
|
||||
import { business } from "@/services";
|
||||
|
||||
// 定义ref暴露的方法接口
|
||||
export interface MelonFarmerRef {
|
||||
@ -28,11 +30,23 @@ interface IMelonFarmerProps {
|
||||
supplierCount: number;
|
||||
// 添加已选择的供应商ID列表属性
|
||||
selectedSupplierIds?: string[];
|
||||
selectedSupplierNames?: string[];
|
||||
setLoading: (loading: boolean) => void;
|
||||
}
|
||||
|
||||
export default forwardRef<MelonFarmerRef, IMelonFarmerProps>(
|
||||
function MelonFarmer(props, ref) {
|
||||
const { value, onChange, onRemove, onAdd, isLast, supplierCount, selectedSupplierIds } = props;
|
||||
const {
|
||||
value,
|
||||
onChange,
|
||||
onRemove,
|
||||
onAdd,
|
||||
isLast,
|
||||
supplierCount,
|
||||
selectedSupplierIds,
|
||||
selectedSupplierNames,
|
||||
setLoading,
|
||||
} = props;
|
||||
|
||||
const [supplierVO, setSupplierVO] = useState<SupplierVO>();
|
||||
console.log("supplierVO", supplierVO);
|
||||
@ -152,6 +166,16 @@ export default forwardRef<MelonFarmerRef, IMelonFarmerProps>(
|
||||
if (!id) return false;
|
||||
|
||||
const isNameValid = validateName(supplierVO.name || "");
|
||||
|
||||
if (selectedSupplierNames && selectedSupplierNames.includes(supplierVO.name || "")) {
|
||||
Toast.show("toast", {
|
||||
icon: "fail",
|
||||
title: "提示",
|
||||
content: "该瓜农已被选择,请输入其他名称",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
const isIdCardValid = validateIdCard(supplierVO.idCard || "");
|
||||
const isBankCardValid = validateBankCard(supplierVO.bankCard || "");
|
||||
const isPhoneValid = validatePhone(supplierVO.phone || "");
|
||||
@ -229,26 +253,109 @@ export default forwardRef<MelonFarmerRef, IMelonFarmerProps>(
|
||||
[id]: false,
|
||||
}));
|
||||
}
|
||||
|
||||
if (selectedSupplierNames && selectedSupplierNames.includes(value)) {
|
||||
Toast.show("toast", {
|
||||
icon: "fail",
|
||||
title: "提示",
|
||||
content: "该瓜农已被选择,请输入其他名称",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 处理姓名失焦
|
||||
const handleNameBlur = (value: string, id: any) => {
|
||||
const handleNameBlur = async (value: string, id: any) => {
|
||||
if (value && !validateName(value)) {
|
||||
setNameError((prev) => ({
|
||||
...prev,
|
||||
[id]: true,
|
||||
}));
|
||||
Toast.show("toast", {
|
||||
icon: "fail",
|
||||
title: "提示",
|
||||
content: "姓名至少2个字符",
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
setNameError((prev) => ({
|
||||
...prev,
|
||||
[id]: false,
|
||||
}));
|
||||
}
|
||||
|
||||
// 检查瓜农姓名是否在系统中存在
|
||||
console.log("checkSupplier", value);
|
||||
if (value) {
|
||||
if (selectedSupplierNames && selectedSupplierNames.includes(value)) {
|
||||
Toast.show("toast", {
|
||||
icon: "fail",
|
||||
title: "提示",
|
||||
content: "该瓜农已被选择,请输入其他名称",
|
||||
});
|
||||
return;
|
||||
}
|
||||
setLoading(true);
|
||||
try {
|
||||
const { data } = await business.supplier.checkSupplier({
|
||||
supplierCheckQry: {
|
||||
name: value,
|
||||
},
|
||||
});
|
||||
|
||||
if (data.success && data.data) {
|
||||
// 系统中已存在该瓜农信息,检查是否需要提示用户快速填入
|
||||
// 条件1: 当前没有选择瓜农 (没有supplierId)
|
||||
// 条件2: 当前选择的瓜农与系统中找到的瓜农不一致
|
||||
const shouldPrompt =
|
||||
!supplierVO?.supplierId ||
|
||||
(supplierVO?.supplierId &&
|
||||
supplierVO?.supplierId !== data.data.supplierId);
|
||||
|
||||
if (shouldPrompt) {
|
||||
// 判断是首次填入还是冲突替换
|
||||
const isConflict =
|
||||
supplierVO?.supplierId &&
|
||||
supplierVO?.supplierId !== data.data.supplierId;
|
||||
|
||||
Dialog.open("dialog", {
|
||||
title: "提示",
|
||||
content: isConflict
|
||||
? `系统中存在瓜农"${value}"的信息与当前瓜农不同,是否替换为系统中的信息?`
|
||||
: `系统中已存在瓜农"${value}"的信息,是否快速填入?`,
|
||||
onConfirm: () => {
|
||||
// 用户确认,填入信息
|
||||
setSupplierVO((prev) => ({
|
||||
...prev!,
|
||||
...data.data,
|
||||
}));
|
||||
|
||||
// 清除所有错误状态
|
||||
setNameError((prev) => ({
|
||||
...prev,
|
||||
[id]: false,
|
||||
}));
|
||||
setPhoneError((prev) => ({
|
||||
...prev,
|
||||
[id]: false,
|
||||
}));
|
||||
setBankCardError((prev) => ({
|
||||
...prev,
|
||||
[id]: false,
|
||||
}));
|
||||
setIdCardError((prev) => ({
|
||||
...prev,
|
||||
[id]: false,
|
||||
}));
|
||||
|
||||
Dialog.close("dialog");
|
||||
},
|
||||
onCancel: () => {
|
||||
Dialog.close("dialog");
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("检查瓜农信息失败", error);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 处理身份证号变化
|
||||
@ -383,6 +490,21 @@ export default forwardRef<MelonFarmerRef, IMelonFarmerProps>(
|
||||
}
|
||||
};
|
||||
|
||||
// 处理删除瓜农确认
|
||||
const handleRemoveConfirm = (supplierVO: SupplierVO) => {
|
||||
Dialog.open("dialog", {
|
||||
title: "移除瓜农",
|
||||
content: `确定要移除"${supplierVO.name || "这个瓜农"}"吗?移除后如果需要可以重新添加。`,
|
||||
onConfirm: () => {
|
||||
onRemove(supplierVO);
|
||||
Dialog.close("dialog");
|
||||
},
|
||||
onCancel: () => {
|
||||
Dialog.close("dialog");
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
if (!supplierVO) {
|
||||
return;
|
||||
}
|
||||
@ -413,9 +535,9 @@ export default forwardRef<MelonFarmerRef, IMelonFarmerProps>(
|
||||
<View className="rounded-lg bg-white p-2.5 shadow-sm">
|
||||
<View className="flex items-center justify-between">
|
||||
{supplierCount > 1 ? (
|
||||
<View className="text-sm">这车货还要继续拼车吗?</View>
|
||||
<View className="text-sm">这车货还需继续拼车吗?</View>
|
||||
) : (
|
||||
<View className="text-sm">这车货要拼车吗?</View>
|
||||
<View className="text-sm">这车货需拼车吗?</View>
|
||||
)}
|
||||
|
||||
<View className="text-neutral-darkest text-sm font-medium">
|
||||
@ -450,8 +572,8 @@ export default forwardRef<MelonFarmerRef, IMelonFarmerProps>(
|
||||
setIsLastFarmer(isLastValue!);
|
||||
}}
|
||||
>
|
||||
<Radio value="false">要</Radio>
|
||||
<Radio value="true">不要</Radio>
|
||||
<Radio value="false">需要</Radio>
|
||||
<Radio value="true">不需要</Radio>
|
||||
</Radio.Group>
|
||||
</View>
|
||||
</View>
|
||||
@ -533,12 +655,14 @@ export default forwardRef<MelonFarmerRef, IMelonFarmerProps>(
|
||||
<View className={"text-primary text-sm font-bold"}>
|
||||
{supplierVO.name || "瓜农"}信息
|
||||
</View>
|
||||
{supplierCount > 1 && (
|
||||
<View
|
||||
className="cursor-pointer text-sm text-red-500"
|
||||
onClick={() => onRemove(supplierVO)}
|
||||
onClick={() => handleRemoveConfirm(supplierVO)}
|
||||
>
|
||||
删除
|
||||
移除瓜农
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
<View className="mb-2.5">
|
||||
@ -561,7 +685,10 @@ export default forwardRef<MelonFarmerRef, IMelonFarmerProps>(
|
||||
}
|
||||
onFinish={(supplierVO1) => {
|
||||
// 检查是否已经选择了该瓜农
|
||||
if (selectedSupplierIds && selectedSupplierIds.includes(supplierVO1.supplierId!)) {
|
||||
if (
|
||||
selectedSupplierIds &&
|
||||
selectedSupplierIds.includes(supplierVO1.supplierId!)
|
||||
) {
|
||||
Toast.show("toast", {
|
||||
icon: "fail",
|
||||
title: "提示",
|
||||
@ -614,7 +741,9 @@ export default forwardRef<MelonFarmerRef, IMelonFarmerProps>(
|
||||
/>
|
||||
</View>
|
||||
{nameError[supplierVO.orderSupplierId] && (
|
||||
<View className="mt-1 text-xs text-red-500">姓名至少2个字符</View>
|
||||
<View className="mt-1 text-xs text-red-500">
|
||||
{`姓名"${supplierVO.name}"至少2个字符`}
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
<View className="mb-2.5">
|
||||
|
||||
@ -86,22 +86,6 @@ export default forwardRef<OrderVehicleRef, IOrderVehicleProps>(
|
||||
strawMatCostFlag: dealerVO.strawMatCostFlag,
|
||||
includePackingFlag: dealerVO.includePackingFlag,
|
||||
documentTypes: dealerVO.documentTypes,
|
||||
// 清空账户和仓库信息,因为经销商已更改
|
||||
accountId: undefined,
|
||||
companyName: undefined,
|
||||
taxNumber: undefined,
|
||||
bankAccount: undefined,
|
||||
companyAddress: undefined,
|
||||
phone: undefined,
|
||||
openingBank: undefined,
|
||||
warehouseId: undefined,
|
||||
warehouseName: undefined,
|
||||
warehouseAddress: undefined,
|
||||
contactPerson: undefined,
|
||||
contactPhone: undefined,
|
||||
receiverName: undefined,
|
||||
receiverPhone: undefined,
|
||||
|
||||
});
|
||||
|
||||
// 校验经销商信息
|
||||
@ -501,22 +485,39 @@ export default forwardRef<OrderVehicleRef, IOrderVehicleProps>(
|
||||
|
||||
const { data } = await business.extraction.vehicleExtraction({
|
||||
message: message,
|
||||
dealerNames: '',
|
||||
});
|
||||
|
||||
const newVehicle = data.data as BusinessAPI.OrderVehicle;
|
||||
const newVehicle = data.data as BusinessAPI.VehicleExtractionVO;
|
||||
const dealerVO = newVehicle.dealerVO;
|
||||
|
||||
setOrderVehicle({
|
||||
...newVehicle,
|
||||
// 通过 - 分割
|
||||
plate: newVehicle.plate?.split("-")[0],
|
||||
dealerId: orderVehicle?.dealerId,
|
||||
dealerName: orderVehicle?.dealerName,
|
||||
plate: newVehicle.plate?.split("-")[0]!,
|
||||
dealerId: newVehicle.dealerId || orderVehicle?.dealerId,
|
||||
dealerName: newVehicle.dealerName || orderVehicle?.dealerName,
|
||||
openStrawCurtain: false,
|
||||
//@ts-ignore
|
||||
strawCurtainPrice: "",
|
||||
deliveryTime: dayjs().format("YYYY-MM-DD"),
|
||||
});
|
||||
|
||||
if (dealerVO) {
|
||||
setOrderDealer({
|
||||
...orderDealer,
|
||||
dealerId: dealerVO.dealerId,
|
||||
shortName: dealerVO?.shortName!,
|
||||
dealerType: dealerVO.dealerType!,
|
||||
enableShare: dealerVO.enableShare,
|
||||
shareRatio: dealerVO.shareRatio,
|
||||
freightCostFlag: dealerVO.freightCostFlag,
|
||||
strawMatCostFlag: dealerVO.strawMatCostFlag,
|
||||
includePackingFlag: dealerVO.includePackingFlag,
|
||||
documentTypes: dealerVO.documentTypes,
|
||||
});
|
||||
}
|
||||
|
||||
// 清除所有错误状态
|
||||
setPlateError(false);
|
||||
setDriverError(false);
|
||||
@ -752,7 +753,7 @@ export default forwardRef<OrderVehicleRef, IOrderVehicleProps>(
|
||||
}}
|
||||
>
|
||||
<View className={"text-sm font-normal text-[#000000]"}>
|
||||
启用
|
||||
用了
|
||||
</View>
|
||||
</Checkbox>
|
||||
</View>
|
||||
|
||||
@ -1,13 +1,6 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { View } from "@tarojs/components";
|
||||
import {
|
||||
Button,
|
||||
Input,
|
||||
Popup,
|
||||
Radio,
|
||||
SafeArea,
|
||||
Table,
|
||||
} from "@nutui/nutui-react-taro";
|
||||
import { View, Text } from "@tarojs/components";
|
||||
import { Button, Input, Popup, Radio, SafeArea } from "@nutui/nutui-react-taro";
|
||||
import { Icon } from "@/components";
|
||||
import { formatCurrency, validatePrice } from "@/utils/format";
|
||||
import {
|
||||
@ -103,34 +96,6 @@ export default function MarketPriceSection(props: {
|
||||
}
|
||||
}, [editValues, pricingMethod]);
|
||||
|
||||
// 计算表格数据
|
||||
const tableData =
|
||||
purchaseOrderVO.orderSupplierList?.map((supplier) => {
|
||||
// 获取编辑后的价格,如果没有则使用原始价格
|
||||
const salePrice =
|
||||
editValues[supplier.orderSupplierId || ""]?.salePrice !== undefined
|
||||
? editValues[supplier.orderSupplierId || ""].salePrice
|
||||
: supplier.salePrice;
|
||||
|
||||
// 根据报价方式选择重量类型
|
||||
const weight =
|
||||
pricingMethod === "BY_GROSS_WEIGHT"
|
||||
? supplier.grossWeight
|
||||
: supplier.netWeight;
|
||||
|
||||
// 计算销售金额
|
||||
const amount = pricingMethod ? (weight || 0) * (salePrice || 0) : 0;
|
||||
|
||||
return {
|
||||
orderSupplierId: supplier.orderSupplierId,
|
||||
grossWeight: (supplier.grossWeight || 0).toFixed(2),
|
||||
netWeight: (supplier.netWeight || 0).toFixed(2),
|
||||
salePrice: salePrice?.toFixed(2),
|
||||
amount: pricingMethod ? amount.toFixed(2) : "-",
|
||||
supplierName: supplier.name, // 用于弹窗标题
|
||||
};
|
||||
}) || [];
|
||||
|
||||
// 初始化所有供应商的编辑值
|
||||
useEffect(() => {
|
||||
const newEditValues = { ...editValues };
|
||||
@ -189,6 +154,24 @@ export default function MarketPriceSection(props: {
|
||||
}
|
||||
}, [purchaseOrderVO.pricingMethod]);
|
||||
|
||||
// 计算单个供应商的销售金额
|
||||
const calculateAmount = (supplier: BusinessAPI.OrderSupplier) => {
|
||||
// 获取编辑后的价格,如果没有则使用原始价格
|
||||
const salePrice =
|
||||
editValues[supplier.orderSupplierId || ""]?.salePrice !== undefined
|
||||
? editValues[supplier.orderSupplierId || ""].salePrice
|
||||
: supplier.salePrice;
|
||||
|
||||
// 根据报价方式选择重量类型
|
||||
const weight =
|
||||
pricingMethod === "BY_GROSS_WEIGHT"
|
||||
? supplier.grossWeight
|
||||
: supplier.netWeight;
|
||||
|
||||
// 计算销售金额
|
||||
return pricingMethod ? (weight || 0) * (salePrice || 0) : 0;
|
||||
};
|
||||
|
||||
return (
|
||||
<View className={"flex flex-col gap-2.5"}>
|
||||
<View className="flex !h-8 flex-row items-center justify-between">
|
||||
@ -222,64 +205,93 @@ export default function MarketPriceSection(props: {
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<Table
|
||||
columns={[
|
||||
...((readOnly
|
||||
? []
|
||||
: [
|
||||
{
|
||||
title: "",
|
||||
key: "edit",
|
||||
fixed: "left",
|
||||
render: (value: any) => {
|
||||
{/* 卡片形式展示供应商报价信息 */}
|
||||
{purchaseOrderVO.orderSupplierList?.map((supplier, index) => {
|
||||
// 获取编辑后的价格,如果没有则使用原始价格
|
||||
const salePrice =
|
||||
editValues[supplier.orderSupplierId || ""]?.salePrice !== undefined
|
||||
? editValues[supplier.orderSupplierId || ""].salePrice
|
||||
: supplier.salePrice;
|
||||
|
||||
const amount = calculateAmount(supplier);
|
||||
|
||||
return (
|
||||
<View
|
||||
className="flex items-center justify-center"
|
||||
key={supplier.orderSupplierId}
|
||||
className="border-b border-gray-100 p-2.5 bg-primary/3 rounded-lg"
|
||||
>
|
||||
<View className="mb-2">
|
||||
<Text className="text-sm font-medium">报价 #{index + 1}</Text>
|
||||
</View>
|
||||
|
||||
<View className="flex">
|
||||
<View className="flex-1">
|
||||
{!readOnly ? (
|
||||
<View
|
||||
onClick={() => {
|
||||
// 设置临时编辑值为当前值
|
||||
setTempEditValues((prev) => ({
|
||||
...prev,
|
||||
[value.orderSupplierId]:
|
||||
editValues[value.orderSupplierId] !== undefined
|
||||
? editValues[value.orderSupplierId]
|
||||
: parseFloat(value.price),
|
||||
[supplier.orderSupplierId || ""]: {
|
||||
salePrice: salePrice || 0,
|
||||
},
|
||||
}));
|
||||
setVisiblePopup((prev) => ({
|
||||
...prev,
|
||||
[value.orderSupplierId]: true,
|
||||
[supplier.orderSupplierId || ""]: true,
|
||||
}));
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
name={"pen-to-square"}
|
||||
size={16}
|
||||
color={"#1a73e8"}
|
||||
/>
|
||||
<View className="mb-2 flex items-center justify-between">
|
||||
<Text className="text-sm text-gray-500">销售单价</Text>
|
||||
<Text className="text-sm text-gray-500">元/斤</Text>
|
||||
</View>
|
||||
<View className="relative flex">
|
||||
<Text className="text-primary border-primary w-full border-b-2 pb-2 text-3xl font-bold focus:outline-none">
|
||||
{salePrice?.toFixed(2) || "0.00"}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
) : (
|
||||
<View>
|
||||
<View className="mb-2 flex items-center justify-between">
|
||||
<Text className="text-sm text-gray-500">销售单价</Text>
|
||||
<Text className="text-sm text-gray-500">元/斤</Text>
|
||||
</View>
|
||||
<View className="relative">
|
||||
<Text className="price-input text-primary w-full py-2 font-bold">
|
||||
{salePrice?.toFixed(2) || "0.00"}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
|
||||
<View className="flex-1 pl-4">
|
||||
<View className="mb-2 flex items-center justify-between">
|
||||
<Text className="text-sm text-gray-500">毛重</Text>
|
||||
<Text className="text-sm font-medium">
|
||||
{(supplier.grossWeight || 0).toFixed(2)} 斤
|
||||
</Text>
|
||||
</View>
|
||||
<View className="mb-2 flex items-center justify-between">
|
||||
<Text className="text-sm text-gray-500">净重</Text>
|
||||
<Text className="text-sm font-medium">
|
||||
{(supplier.netWeight || 0).toFixed(2)} 斤
|
||||
</Text>
|
||||
</View>
|
||||
<View className="flex items-center justify-between">
|
||||
<Text className="text-sm text-gray-500">销售金额</Text>
|
||||
<Text className="text-sm font-medium">
|
||||
{pricingMethod ? `${amount.toFixed(2)} 元` : "-"}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
},
|
||||
]) as any),
|
||||
{
|
||||
title: "毛重(斤)",
|
||||
key: "grossWeight",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "净重(斤)",
|
||||
key: "netWeight",
|
||||
},
|
||||
{
|
||||
title: "销售单价(元/斤)",
|
||||
key: "salePrice",
|
||||
},
|
||||
{
|
||||
title: "销售金额(元)",
|
||||
key: "amount",
|
||||
},
|
||||
]}
|
||||
data={tableData}
|
||||
/>
|
||||
})}
|
||||
|
||||
<View className="flex !h-8 flex-row items-center justify-between">
|
||||
<View className="text-neutral-dark flex-shrink-0 text-sm">
|
||||
销售金额
|
||||
|
||||
@ -53,10 +53,13 @@ const defaultSupplierList: SupplierVO[] = [
|
||||
];
|
||||
|
||||
export default hocAuth(function Page(props: CommonComponent) {
|
||||
const { router, role } = props;
|
||||
const orderId = router.params
|
||||
.orderId as BusinessAPI.PurchaseOrderShowQry["orderId"];
|
||||
const { router, role, setLoading } = props;
|
||||
|
||||
const [orderId, setOrderId] = useState(
|
||||
router.params.orderId as BusinessAPI.PurchaseOrderShowQry["orderId"],
|
||||
);
|
||||
const defaultStep = router.params.step as number;
|
||||
const defaultSupplierId = router.params.supplierId as string;
|
||||
|
||||
const vehicleRef = useRef<OrderVehicleRef>(null);
|
||||
// 创建MelonFarmer组件的ref数组
|
||||
@ -86,6 +89,7 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
|
||||
useEffect(() => {
|
||||
if (orderId) {
|
||||
setLoading(true);
|
||||
business.purchaseOrder
|
||||
.showPurchaseOrder({
|
||||
purchaseOrderShowQry: {
|
||||
@ -107,8 +111,21 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
setPurchaseOrder(purchaseOrder);
|
||||
setOrderVehicle(purchaseOrder.orderVehicle);
|
||||
const orderSupplierList1 = purchaseOrder.orderSupplierList as any;
|
||||
console.log(
|
||||
"orderSupplierList1",
|
||||
orderSupplierList1,
|
||||
defaultSupplierId,
|
||||
);
|
||||
if (defaultSupplierId) {
|
||||
const index = orderSupplierList1.findIndex(
|
||||
(item: any) => item.supplierId === defaultSupplierId,
|
||||
);
|
||||
orderSupplierList1[index].selected = true;
|
||||
setOrderSupplierList(orderSupplierList1);
|
||||
} else {
|
||||
orderSupplierList1[0].selected = true;
|
||||
setOrderSupplierList(orderSupplierList1);
|
||||
}
|
||||
if (defaultStep) {
|
||||
setActive(Number(defaultStep));
|
||||
} else {
|
||||
@ -125,9 +142,12 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error("获取采购订单失败:", err);
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false);
|
||||
});
|
||||
}
|
||||
}, [orderId]);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (active) {
|
||||
@ -203,6 +223,47 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
}
|
||||
};
|
||||
|
||||
// 保存草稿的函数(用于下一步)
|
||||
const saveDraftNextStep = async () => {
|
||||
if (!purchaseOrder) {
|
||||
return;
|
||||
}
|
||||
let tempOrderId = orderId;
|
||||
try {
|
||||
if (tempOrderId) {
|
||||
await business.purchaseOrder.updatePurchaseOrder({
|
||||
active: active,
|
||||
orderId: tempOrderId,
|
||||
orderVehicle: purchaseOrder.orderVehicle,
|
||||
orderSupplierList: purchaseOrder.orderSupplierList,
|
||||
orderCostList: purchaseOrder.orderCostList.filter(
|
||||
(item: CostItem) => item.selected,
|
||||
),
|
||||
orderDealer: purchaseOrder.orderDealer,
|
||||
});
|
||||
} else {
|
||||
const { data } = await business.purchaseOrder.createPurchaseOrder({
|
||||
active: active,
|
||||
orderVehicle: purchaseOrder.orderVehicle,
|
||||
orderSupplierList: purchaseOrder.orderSupplierList,
|
||||
orderCostList: purchaseOrder.orderCostList.filter(
|
||||
(item: CostItem) => item.selected,
|
||||
),
|
||||
orderDealer: purchaseOrder.orderDealer,
|
||||
});
|
||||
|
||||
setOrderId(data.data?.orderId);
|
||||
}
|
||||
} catch (error) {
|
||||
Toast.show("toast", {
|
||||
icon: "fail",
|
||||
title: "提示",
|
||||
content: "保存草稿失败",
|
||||
});
|
||||
console.error("提交采购订单失败:", error);
|
||||
}
|
||||
};
|
||||
|
||||
// 保存草稿的函数(用于暂存和预览)
|
||||
const saveDraft = async (preview?: boolean) => {
|
||||
if (!purchaseOrder) {
|
||||
@ -297,7 +358,7 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
return (
|
||||
<>
|
||||
<View className={"sticky top-0 z-11"}>
|
||||
{step.value !== 6 && (
|
||||
{step.value !== 7 && (
|
||||
<View className="h-12 bg-white p-2.5 shadow-sm">
|
||||
<View className="step-indicator flex h-2 rounded-full bg-gray-200">
|
||||
<View
|
||||
@ -318,6 +379,29 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
<SupplierList
|
||||
value={orderSupplierList}
|
||||
onSelect={(supplierVO: SupplierVO) => {
|
||||
// 获取当前选中的供应商
|
||||
const selectedIndex = orderSupplierList.findIndex(
|
||||
(supplier) => supplier.selected,
|
||||
);
|
||||
if (
|
||||
active === 2 &&
|
||||
!melonFarmerRefs.current[selectedIndex]?.validate()
|
||||
) {
|
||||
return;
|
||||
}
|
||||
// 在第三步(称重信息)时进行校验
|
||||
else if (
|
||||
active === 3 &&
|
||||
!weighRefs.current[selectedIndex]?.validate()
|
||||
) {
|
||||
return;
|
||||
} // 在第四步(包装信息)时进行校验
|
||||
else if (
|
||||
active === 4 &&
|
||||
!orderPackageRefs.current[selectedIndex]?.validate()
|
||||
) {
|
||||
return;
|
||||
}
|
||||
setOrderSupplierList(
|
||||
orderSupplierList.map((item: any) => {
|
||||
item.selected =
|
||||
@ -359,10 +443,16 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
// 获取已选择的供应商ID列表(排除当前项)
|
||||
const selectedSupplierIds = orderSupplierList
|
||||
.filter((supplier, idx) => idx !== index && supplier.supplierId)
|
||||
.map(supplier => supplier.supplierId!);
|
||||
.map((supplier) => supplier.supplierId!);
|
||||
|
||||
// 获取已选择的供应商ID列表(排除当前项)
|
||||
const selectedSupplierNames = orderSupplierList
|
||||
.filter((supplier, idx) => idx !== index && supplier.supplierId)
|
||||
.map((supplier) => supplier.name!);
|
||||
|
||||
return (
|
||||
<MelonFarmer
|
||||
setLoading={setLoading}
|
||||
supplierCount={orderSupplierList.length}
|
||||
key={item.orderSupplierId}
|
||||
ref={(ref) => {
|
||||
@ -372,6 +462,29 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
}}
|
||||
value={item}
|
||||
onAdd={() => {
|
||||
// 获取当前选中的供应商
|
||||
const selectedIndex = orderSupplierList.findIndex(
|
||||
(supplier) => supplier.selected,
|
||||
);
|
||||
if (
|
||||
active === 2 &&
|
||||
!melonFarmerRefs.current[selectedIndex]?.validate()
|
||||
) {
|
||||
return;
|
||||
}
|
||||
// 在第三步(称重信息)时进行校验
|
||||
else if (
|
||||
active === 3 &&
|
||||
!weighRefs.current[selectedIndex]?.validate()
|
||||
) {
|
||||
return;
|
||||
} // 在第四步(包装信息)时进行校验
|
||||
else if (
|
||||
active === 4 &&
|
||||
!orderPackageRefs.current[selectedIndex]?.validate()
|
||||
) {
|
||||
return;
|
||||
}
|
||||
setOrderSupplierList([
|
||||
...orderSupplierList.map((supplierVO: SupplierVO) => {
|
||||
supplierVO.selected = false;
|
||||
@ -420,6 +533,7 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
}}
|
||||
isLast={index === orderSupplierList.length - 1}
|
||||
selectedSupplierIds={selectedSupplierIds}
|
||||
selectedSupplierNames={selectedSupplierNames}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -544,10 +658,11 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
type={"primary"}
|
||||
size={"xlarge"}
|
||||
className="bg-primary flex-1 text-white"
|
||||
onClick={() => {
|
||||
onClick={async () => {
|
||||
// 在第一步(车辆信息)时进行校验
|
||||
if (active === 1) {
|
||||
if (vehicleRef.current?.validate()) {
|
||||
await saveDraftNextStep();
|
||||
setActive(active + 1);
|
||||
}
|
||||
}
|
||||
@ -561,6 +676,7 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
selectedIndex !== -1 &&
|
||||
melonFarmerRefs.current[selectedIndex]?.validate()
|
||||
) {
|
||||
await saveDraftNextStep();
|
||||
setActive(active + 1);
|
||||
}
|
||||
}
|
||||
@ -574,6 +690,7 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
selectedIndex !== -1 &&
|
||||
weighRefs.current[selectedIndex]?.validate()
|
||||
) {
|
||||
await saveDraftNextStep();
|
||||
setActive(active + 1);
|
||||
}
|
||||
} // 在第四步(包装信息)时进行校验
|
||||
@ -586,9 +703,11 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
selectedIndex !== -1 &&
|
||||
orderPackageRefs.current[selectedIndex]?.validate()
|
||||
) {
|
||||
await saveDraftNextStep();
|
||||
setActive(active + 1);
|
||||
}
|
||||
} else {
|
||||
await saveDraftNextStep();
|
||||
setActive(active + 1);
|
||||
}
|
||||
}}
|
||||
|
||||
@ -18,7 +18,7 @@ import dayjs from "dayjs";
|
||||
import { formatCurrency } from "@/utils/format";
|
||||
|
||||
export default hocAuth(function Page(props: CommonComponent) {
|
||||
const { role, shareOptions } = props;
|
||||
const { shareOptions } = props;
|
||||
|
||||
const actionRef = useRef<ActionType>();
|
||||
const toolbar: ToolBar = {
|
||||
@ -66,14 +66,14 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
<View
|
||||
className={"flex flex-col divide-y-2 divide-neutral-100"}
|
||||
onClick={(event) => {
|
||||
if (role === "origin-entry") {
|
||||
if (purchaseOrderVO.active === 7) {
|
||||
Taro.navigateTo({
|
||||
url: buildUrl("/pages/purchase/purchaser/preview", {
|
||||
orderId: purchaseOrderVO.orderId,
|
||||
}),
|
||||
});
|
||||
}
|
||||
event.stopPropagation();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<View className={"py-2.5"}>
|
||||
@ -216,6 +216,8 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
{
|
||||
purchaseOrderVO.active === 7 && (
|
||||
<Button
|
||||
type={"primary"}
|
||||
size={"small"}
|
||||
@ -230,6 +232,8 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
>
|
||||
提交审核
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
<Button type={"danger"} size={"small"}>
|
||||
删除
|
||||
</Button>
|
||||
|
||||
@ -3,8 +3,6 @@ import {
|
||||
DealerPicker,
|
||||
Icon,
|
||||
PageList,
|
||||
PurchaseOrderRejectApprove,
|
||||
PurchaseOrderRejectFinal,
|
||||
PurchaseOrderWithdrawReview,
|
||||
State,
|
||||
ToolBar,
|
||||
@ -144,12 +142,14 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
<View
|
||||
className={"flex flex-col divide-y-2 divide-neutral-100"}
|
||||
onClick={(event) => {
|
||||
if (purchaseOrderVO.active === 7) {
|
||||
Taro.navigateTo({
|
||||
url: buildUrl("/pages/purchase/purchaser/preview", {
|
||||
orderId: purchaseOrderVO.orderId,
|
||||
}),
|
||||
});
|
||||
event.stopPropagation();
|
||||
}
|
||||
}}
|
||||
>
|
||||
<View className={"py-2.5"}>
|
||||
@ -293,20 +293,25 @@ export default hocAuth(function Page(props: CommonComponent) {
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
{purchaseOrderVO.active === 7 && (
|
||||
<Button
|
||||
type={"primary"}
|
||||
size={"small"}
|
||||
onClick={(e) => {
|
||||
Taro.navigateTo({
|
||||
url: buildUrl("/pages/purchase/purchaser/preview", {
|
||||
url: buildUrl(
|
||||
"/pages/purchase/purchaser/preview",
|
||||
{
|
||||
orderId: purchaseOrderVO.orderId,
|
||||
}),
|
||||
},
|
||||
),
|
||||
});
|
||||
e.stopPropagation();
|
||||
}}
|
||||
>
|
||||
提交审核
|
||||
</Button>
|
||||
)}
|
||||
<Button type={"danger"} size={"small"}>
|
||||
删除
|
||||
</Button>
|
||||
|
||||
@ -35,6 +35,36 @@ export async function destroyBoxBrand(
|
||||
});
|
||||
}
|
||||
|
||||
/** 纸箱品牌拖拽排序 PUT /operation/dragBoxBrand */
|
||||
export async function dragBoxBrand(
|
||||
body: BusinessAPI.BoxBrandDragCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.Response>("/operation/dragBoxBrand", {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 纸箱品牌拖拽排序 PATCH /operation/dragBoxBrand */
|
||||
export async function dragBoxBrand1(
|
||||
body: BusinessAPI.BoxBrandDragCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.Response>("/operation/dragBoxBrand", {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 纸箱品牌列表 GET /operation/listBoxBrand */
|
||||
export async function listBoxBrand(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
|
||||
@ -35,6 +35,36 @@ export async function destroyBoxProduct(
|
||||
});
|
||||
}
|
||||
|
||||
/** 纸箱产品拖拽排序 PUT /operation/dragBoxProduct */
|
||||
export async function dragBoxProduct(
|
||||
body: BusinessAPI.BoxProductDragCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.Response>("/operation/dragBoxProduct", {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 纸箱产品拖拽排序 PATCH /operation/dragBoxProduct */
|
||||
export async function dragBoxProduct1(
|
||||
body: BusinessAPI.BoxProductDragCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.Response>("/operation/dragBoxProduct", {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 纸箱产品列表 GET /operation/listBoxProduct */
|
||||
export async function listBoxProduct(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
|
||||
@ -35,6 +35,36 @@ export async function destroyCostItem(
|
||||
});
|
||||
}
|
||||
|
||||
/** 费用项目拖拽排序 PUT /operation/dragCostItem */
|
||||
export async function dragCostItem(
|
||||
body: BusinessAPI.CostItemDragCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.Response>("/operation/dragCostItem", {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 费用项目拖拽排序 PATCH /operation/dragCostItem */
|
||||
export async function dragCostItem1(
|
||||
body: BusinessAPI.CostItemDragCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.Response>("/operation/dragCostItem", {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 费用项目列表 GET /operation/listCostItem */
|
||||
export async function listCostItem(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
|
||||
@ -35,6 +35,36 @@ export async function destroyDealer(
|
||||
});
|
||||
}
|
||||
|
||||
/** 经销商表拖拽排序 PUT /operation/dragDealer */
|
||||
export async function dragDealer(
|
||||
body: BusinessAPI.DealerDragCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.Response>("/operation/dragDealer", {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 经销商表拖拽排序 PATCH /operation/dragDealer */
|
||||
export async function dragDealer1(
|
||||
body: BusinessAPI.DealerDragCmd,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.Response>("/operation/dragDealer", {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
data: body,
|
||||
...(options || {}),
|
||||
});
|
||||
}
|
||||
|
||||
/** 经销商表列表 GET /operation/listDealer */
|
||||
export async function listDealer(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
|
||||
@ -2,6 +2,26 @@
|
||||
/* eslint-disable */
|
||||
import request from "../request";
|
||||
|
||||
/** 检查供应商 GET /operation/checkSupplier */
|
||||
export async function checkSupplier(
|
||||
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
params: BusinessAPI.checkSupplierParams,
|
||||
options?: { [key: string]: any },
|
||||
) {
|
||||
return request<BusinessAPI.SingleResponseSupplierVO>(
|
||||
"/operation/checkSupplier",
|
||||
{
|
||||
method: "GET",
|
||||
params: {
|
||||
...params,
|
||||
supplierCheckQry: undefined,
|
||||
...params["supplierCheckQry"],
|
||||
},
|
||||
...(options || {}),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 创建供应商 POST /operation/createSupplier */
|
||||
export async function createSupplier(
|
||||
body: BusinessAPI.SupplierCreateCmd,
|
||||
|
||||
@ -116,6 +116,15 @@ declare namespace BusinessAPI {
|
||||
brandId: string;
|
||||
};
|
||||
|
||||
type BoxBrandDragCmd = {
|
||||
/** 相邻元素前 */
|
||||
prevId?: number;
|
||||
/** 相邻元素后 */
|
||||
nextId?: number;
|
||||
/** 当前元素 */
|
||||
currentId?: number;
|
||||
};
|
||||
|
||||
type BoxBrandListQry = {
|
||||
/** 纸箱品牌状态 */
|
||||
status?: boolean;
|
||||
@ -218,11 +227,26 @@ declare namespace BusinessAPI {
|
||||
productId: string;
|
||||
};
|
||||
|
||||
type BoxProductDragCmd = {
|
||||
/** 相邻元素前 */
|
||||
prevId?: number;
|
||||
/** 相邻元素后 */
|
||||
nextId?: number;
|
||||
/** 当前元素 */
|
||||
currentId?: number;
|
||||
};
|
||||
|
||||
type BoxProductListQry = {
|
||||
/** 状态:1_启用;0_禁用; */
|
||||
status?: boolean;
|
||||
/** 纸箱产品ID */
|
||||
productId?: string;
|
||||
/** 纸箱产品名称 */
|
||||
name?: string;
|
||||
/** 纸箱品牌ID */
|
||||
brandId?: string;
|
||||
/** 规格:1_2粒装;2_4粒装 */
|
||||
specType?: "TWO_GRAIN" | "FOUR_GRAIN";
|
||||
/** 品牌类型:1_我方纸箱;2_瓜农纸箱;3_第三方纸箱 */
|
||||
type?: "OUR_BOX" | "FARMER_BOX" | "THIRD_PARTY_BOX";
|
||||
};
|
||||
@ -497,6 +521,10 @@ declare namespace BusinessAPI {
|
||||
content?: string;
|
||||
};
|
||||
|
||||
type checkSupplierParams = {
|
||||
supplierCheckQry: SupplierCheckQry;
|
||||
};
|
||||
|
||||
type CompanyCreateCmd = {
|
||||
/** 公司ID */
|
||||
companyId: string;
|
||||
@ -795,6 +823,15 @@ declare namespace BusinessAPI {
|
||||
itemId: string;
|
||||
};
|
||||
|
||||
type CostItemDragCmd = {
|
||||
/** 相邻元素前 */
|
||||
prevId?: number;
|
||||
/** 相邻元素后 */
|
||||
nextId?: number;
|
||||
/** 当前元素 */
|
||||
currentId?: number;
|
||||
};
|
||||
|
||||
type CostItemListQry = {
|
||||
/** 状态:1_启用;0_禁用 */
|
||||
status?: boolean;
|
||||
@ -949,6 +986,15 @@ declare namespace BusinessAPI {
|
||||
dealerId: string;
|
||||
};
|
||||
|
||||
type DealerDragCmd = {
|
||||
/** 相邻元素前 */
|
||||
prevId?: number;
|
||||
/** 相邻元素后 */
|
||||
nextId?: number;
|
||||
/** 当前元素 */
|
||||
currentId?: number;
|
||||
};
|
||||
|
||||
type DealerListQry = {
|
||||
/** 状态:1_启用;0_禁用; */
|
||||
status?: boolean;
|
||||
@ -2002,8 +2048,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: AgreementVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseBoxBrandVO = {
|
||||
@ -2011,8 +2057,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: BoxBrandVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseBoxProductVO = {
|
||||
@ -2020,8 +2066,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: BoxProductVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseCompanyPaymentAccountVO = {
|
||||
@ -2029,8 +2075,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: CompanyPaymentAccountVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseCompanyVO = {
|
||||
@ -2038,8 +2084,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: CompanyVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseCostItemVO = {
|
||||
@ -2047,8 +2093,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: CostItemVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseDealerPaymentAccountVO = {
|
||||
@ -2056,8 +2102,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: DealerPaymentAccountVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseDealerRebateCustomerVO = {
|
||||
@ -2065,8 +2111,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: DealerRebateCustomerVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseDealerVO = {
|
||||
@ -2074,8 +2120,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: DealerVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseDealerWarehouseVO = {
|
||||
@ -2083,8 +2129,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: DealerWarehouseVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseDictionaryVO = {
|
||||
@ -2092,8 +2138,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: DictionaryVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseEmployeeVO = {
|
||||
@ -2101,8 +2147,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: EmployeeVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseGiftBoxVO = {
|
||||
@ -2110,8 +2156,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: GiftBoxVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseMaterialVO = {
|
||||
@ -2119,8 +2165,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: MaterialVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseMenuVO = {
|
||||
@ -2128,8 +2174,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: MenuVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponsePermissionVO = {
|
||||
@ -2137,8 +2183,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: PermissionVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponsePlatformVO = {
|
||||
@ -2146,8 +2192,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: PlatformVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponsePurchaseOrderVO = {
|
||||
@ -2155,8 +2201,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: PurchaseOrderVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseRoleVO = {
|
||||
@ -2164,8 +2210,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: RoleVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseShipOrderVO = {
|
||||
@ -2173,8 +2219,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: ShipOrderVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseSupplierVO = {
|
||||
@ -2182,8 +2228,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: SupplierVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseTreeLong = {
|
||||
@ -2191,8 +2237,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: TreeLong[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type MultiResponseUserVO = {
|
||||
@ -2200,8 +2246,8 @@ declare namespace BusinessAPI {
|
||||
errCode?: string;
|
||||
errMessage?: string;
|
||||
data?: UserVO[];
|
||||
empty?: boolean;
|
||||
notEmpty?: boolean;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type OrderCompany = {
|
||||
@ -2536,9 +2582,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: AgreementVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseBoxBrandVO = {
|
||||
@ -2549,9 +2595,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: BoxBrandVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseBoxProductVO = {
|
||||
@ -2562,9 +2608,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: BoxProductVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseChannelVO = {
|
||||
@ -2575,9 +2621,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: ChannelVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseCompanyPaymentAccountVO = {
|
||||
@ -2588,9 +2634,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: CompanyPaymentAccountVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseCompanyVO = {
|
||||
@ -2601,9 +2647,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: CompanyVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseCostItemVO = {
|
||||
@ -2614,9 +2660,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: CostItemVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseDealerPaymentAccountVO = {
|
||||
@ -2627,9 +2673,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: DealerPaymentAccountVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseDealerRebateCustomerVO = {
|
||||
@ -2640,9 +2686,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: DealerRebateCustomerVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseDealerVO = {
|
||||
@ -2653,9 +2699,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: DealerVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseDealerWarehouseVO = {
|
||||
@ -2666,9 +2712,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: DealerWarehouseVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseDictionaryVO = {
|
||||
@ -2679,9 +2725,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: DictionaryVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseEmployeeVO = {
|
||||
@ -2692,9 +2738,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: EmployeeVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseGiftBoxVO = {
|
||||
@ -2705,9 +2751,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: GiftBoxVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseMaterialVO = {
|
||||
@ -2718,9 +2764,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: MaterialVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponsePermissionVO = {
|
||||
@ -2731,9 +2777,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: PermissionVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponsePlatformVO = {
|
||||
@ -2744,9 +2790,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: PlatformVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponsePurchaseOrderVO = {
|
||||
@ -2757,9 +2803,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: PurchaseOrderVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseRoleVO = {
|
||||
@ -2770,9 +2816,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: RoleVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseShipOrderVO = {
|
||||
@ -2783,9 +2829,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: ShipOrderVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseSupplierVO = {
|
||||
@ -2796,9 +2842,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: SupplierVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type PageResponseUserVO = {
|
||||
@ -2809,9 +2855,9 @@ declare namespace BusinessAPI {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
data?: UserVO[];
|
||||
empty?: boolean;
|
||||
totalPages?: number;
|
||||
notEmpty?: boolean;
|
||||
totalPages?: number;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
type pageRoleParams = {
|
||||
@ -3911,6 +3957,32 @@ declare namespace BusinessAPI {
|
||||
data?: VehicleExtractionVO;
|
||||
};
|
||||
|
||||
type SupplierCheckQry = {
|
||||
pageSize?: number;
|
||||
pageIndex?: number;
|
||||
orderBy?: string;
|
||||
orderDirection?: string;
|
||||
groupBy?: string;
|
||||
needTotalCount?: boolean;
|
||||
/** 自定义字段key */
|
||||
customFieldKey?: string;
|
||||
/** 自定义字段value */
|
||||
customFieldValue?: string;
|
||||
/** 备注 */
|
||||
remark?: string;
|
||||
/** 状态:1_启用;0_禁用; */
|
||||
status?: boolean;
|
||||
/** 供应商ID */
|
||||
supplierId?: string;
|
||||
/** 供应商名称 */
|
||||
name?: string;
|
||||
/** 身份证号 */
|
||||
idCard?: string;
|
||||
/** 手机号 */
|
||||
phone?: string;
|
||||
offset?: number;
|
||||
};
|
||||
|
||||
type SupplierCreateCmd = {
|
||||
/** 供应商ID */
|
||||
supplierId: string;
|
||||
@ -4027,11 +4099,11 @@ declare namespace BusinessAPI {
|
||||
};
|
||||
|
||||
type TreeLong = {
|
||||
weight?: any;
|
||||
parentId?: number;
|
||||
name?: { empty?: boolean };
|
||||
id?: number;
|
||||
parentId?: number;
|
||||
config?: TreeNodeConfig;
|
||||
weight?: any;
|
||||
empty?: boolean;
|
||||
};
|
||||
|
||||
@ -4235,6 +4307,8 @@ declare namespace BusinessAPI {
|
||||
type VehicleExtractionCmd = {
|
||||
/** 消息内容 */
|
||||
message: string;
|
||||
/** 经销商信息 */
|
||||
dealerNames: string;
|
||||
};
|
||||
|
||||
type VehicleExtractionVO = {
|
||||
@ -4250,6 +4324,12 @@ declare namespace BusinessAPI {
|
||||
destination?: string;
|
||||
/** 价格 */
|
||||
price?: number;
|
||||
/** 经销商 */
|
||||
dealerName?: string;
|
||||
/** 经销商ID */
|
||||
dealerId?: string;
|
||||
/** 经销商信息 */
|
||||
dealerVO?: DealerVO;
|
||||
};
|
||||
|
||||
type WxCpNotifyConfigValue =
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user