feat(biz): 添加Biz组件库设计规则和技术文档

- 创建.biz.md文件定义Biz组件库设计规则
- 创建design.md文件编写ERPTurbo_Admin项目技术文档
- 定义组件架构模式、类型系统和统一属性模式
- 添加权限控制机制和数据交互模式说明
- 完善项目核心技术栈和架构说明
This commit is contained in:
shenyifei 2025-11-10 15:52:34 +08:00
parent 45dc1de523
commit cc15943d44
22 changed files with 1482 additions and 128 deletions

70
.lingma/rules/biz.md Normal file
View File

@ -0,0 +1,70 @@
---
trigger: manual
---
## Biz组件库设计规则
### 1. 组件架构模式
Biz组件库采用统一的业务组件架构主要包含以下几类组件
1. **核心容器组件**
- [BizContainer](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizContainer.tsx#L33-L947) - 主容器组件,协调其他业务组件
- [PageContainer](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/PageContainer.tsx#L12-L42) - 页面容器组件,处理权限验证
2. **业务功能组件**
- [BizPage](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizPage.tsx#L7-L121) - 分页表格组件
- [BizTree](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizTree.tsx#L6-L61) - 树形结构组件
- [BizDrag](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizDrag.tsx#L7-L158) - 拖拽排序组件
- [BizList](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizList.tsx#L6-L52) - 列表展示组件
- [BizCalender](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizCalender.tsx#L10-L89) - 日历展示组件
3. **操作型组件**
- [BizCreate](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizCreate.tsx#L10-L240) - 创建操作组件
- [BizUpdate](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizUpdate.tsx#L12-L255) - 更新操作组件
- [BizDetail](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizDetail.tsx#L12-L273) - 详情查看组件
- [BizDestroy](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizDestroy.tsx#L9-L90) - 删除操作组件
- [BizImport](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizImport.tsx#L14-L610) - 批量导入组件
### 2. 类型系统设计
所有组件都采用泛型设计,主要泛型参数包括:
- `Func`: API函数类型
- `BizVO`: 视图对象类型
- `BizPageQry`: 查询参数类型
- `BizCreateCmd`: 创建命令类型
- `BizUpdateCmd`: 更新命令类型
### 3. 统一属性模式
所有Biz组件都遵循统一的属性设计模式
1. **API相关属性**
- `func`: API函数集合
- `method`: 方法名前缀
- `methodUpper`: 首字母大写的方法名前缀
- `rowKey`: 主键字段名
2. **权限与国际化**
- `permission`: 权限标识
- `intlPrefix`: 国际化前缀
3. **表单类型**
- `formType`: 表单类型modal/drawer/step
### 4. 响应式设计
组件通过`isMobile`属性自动适配移动端,主要体现在:
- 表单宽度自动调整
- 操作按钮布局优化
- 操作栏按钮数量自适应
### 5. 权限控制机制
使用[ButtonAccess](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/ButtonAccess.tsx#L11-L22)组件实现细粒度权限控制,权限标识通过`permission`属性自动拼接操作类型(如-create、-update、-delete、-view
### 6. 数据交互模式
1. **数据获取**:通过`func`中的方法调用API方法名由[methodUpper](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizContainer.tsx#L33-L947)和操作类型组合而成
2. **数据提交**:表单提交时自动移除包含"VO"的字段
3. **状态管理**:使用[actionRef](file:///D:/xinfaleisheng/ERPTurbo_Admin/packages/app-operation/src/components/Biz/BizContainer.tsx#L80-L80)进行组件间状态同步

155
.lingma/rules/design.md Normal file
View File

@ -0,0 +1,155 @@
---
trigger: manual
---
# ERPTurbo_Admin 项目技术文档
## 1. 项目概述
ERPTurbo_Admin 是一个基于 React 生态系统的管理后台系统,采用 Monorepo 架构,包含多个子应用和共享组件库。
## 2. 核心技术栈
### 2.1 主要框架和库
| 技术 | 版本 | 用途 |
|------|------|------|
| React | ^18.0.0 | 前端核心框架 |
| UmiJS Max | ^4.4.9 | 应用框架和构建工具 |
| Ant Design | ^5.25.2 | UI 组件库 |
| Ant Design Pro Components | ^2.8.6 | 高级业务组件 |
| TypeScript | ^5.6.3 | 类型检查和开发支持 |
| TailwindCSS | ^3.4.17 | CSS 框架 |
### 2.2 状态管理和数据流
- **UmiJS 内置状态管理**:包括 initialState、model、valtio 插件
- **React Query**:服务端状态管理
- **Dva**:轻量级的数据流方案
### 2.3 构建和开发工具
- **PNPM**:包管理器
- **Prettier**:代码格式化
- **ESLint**:代码质量检查
- **Husky**Git Hooks 工具
- **Lint-staged**:增量代码检查
## 3. 项目架构
### 3.1 Monorepo 结构
```
ERPTurbo_Admin/
├── packages/
│ ├── app-operation/ # 运营管理系统主应用
│ ├── app-sso-server/ # SSO 单点登录系统
├── shared/
│ ├── components/ # 共享组件库
├── pnpm-workspace.yaml # PNPM 工作区配置
```
### 3.2 主要应用介绍
#### app-operation (运营管理系统)
这是主要的管理后台应用,具有完整的后台管理功能:
- 使用 UmiJS Max 框架
- 实现了动态路由和菜单
- 包含权限控制和用户认证
- 支持国际化 (i18n)
#### shared/components (共享组件库)
这是一个独立的组件库,使用 Dumi 进行开发和文档展示:
- 可复用的业务组件
- 支持按需引入
- 具备完整的类型定义
## 4. 核心特性实现
### 4.1 权限控制系统
项目实现了细粒度的权限控制:
- 基于角色的访问控制 (RBAC)
- 页面级别权限控制 ([access](file://D:\xinfaleisheng\ERPTurbo_Admin\packages\app-operation\src\components\Biz\PageContainer.tsx#L16-L16) 插件)
- 按钮级别权限控制 (通过 [ButtonAccess](file://D:\xinfaleisheng\ERPTurbo_Admin\packages\app-operation\src\components\Biz\ButtonAccess.tsx#L11-L19) 组件)
### 4.2 动态路由和菜单
- 从服务端获取路由配置
- 自动注册和渲染页面组件
- 支持嵌套路由和面包屑导航
### 4.3 国际化支持
- 使用 `locale` 插件实现多语言
- 支持中文等语言切换
- 统一的国际化消息管理
### 4.4 BizContainer 封装模式
项目采用了独特的 [BizContainer](file://D:\xinfaleisheng\ERPTurbo_Admin\packages\app-operation\src\components\Biz\BizContainer.tsx#L47-L946) 组件封装业务逻辑:
- 统一封装增删改查操作
- 支持列表、详情、创建、更新、删除等标准操作
- 集成导入导出、树形结构、日历视图等功能
- 内置权限验证和操作引导
## 5. 样式和主题
### 5.1 样式解决方案
- **TailwindCSS**:实用优先的 CSS 框架
- **Ant Design 主题定制**:通过配置 token 自定义主题
- **styled-components**CSS-in-JS 解决方案
### 5.2 响应式设计
- 支持移动端适配
- 响应式布局组件
- 可折叠侧边栏
## 6. 数据交互
### 6.1 API 请求
- 使用 UmiJS 的 [request](file://D:\xinfaleisheng\ERPTurbo_Admin\shared\components\src\UploadMaterial\index.tsx#L11-L11) 插件统一管理 HTTP 请求
- 全局错误处理和拦截器
- 请求和响应拦截器支持
- 与后端服务集成
### 6.2 数据模拟和调试
- 集成 Swagger UI 文档
- 支持 OpenAPI 规范自动生成服务层代码
## 7. 开发规范
### 7.1 代码风格
- 使用 Prettier 统一代码格式
- ESLint 进行代码质量检查
- Git Hooks 保证提交代码质量
### 7.2 组件开发规范
- 组件封装遵循单一职责原则
- 使用 TypeScript 强类型约束
- 统一的组件接口设计
## 8. 部署和构建
### 8.1 构建命令
```
# 开发环境启动
pnpm dev
# 生产环境构建
pnpm build
# 代码格式化
pnpm format
```
### 8.2 构建优化
- 使用 MFSU (Module Federation Speed Up) 提升编译速度
- 支持代码分割和懒加载
- 静态资源压缩和优化
## 9. 项目扩展性考虑
1. **插件化架构**UmiJS 插件机制便于功能扩展
2. **组件复用**:共享组件库提升开发效率
3. **微前端支持**:可扩展至微前端架构
4. **多应用管理**Monorepo 结构便于多系统协同开发

View File

@ -26,6 +26,7 @@ interface IBoxBrandListProps {
mode?: ModeType; mode?: ModeType;
trigger?: () => React.ReactNode; trigger?: () => React.ReactNode;
onSelect?: (value: BusinessAPI.BoxBrandVO) => void; onSelect?: (value: BusinessAPI.BoxBrandVO) => void;
brandType?: BusinessAPI.BoxBrandVO['type'] | 'ALL';
} }
export default function BoxBrandList(props: IBoxBrandListProps) { export default function BoxBrandList(props: IBoxBrandListProps) {
const { const {
@ -36,12 +37,21 @@ export default function BoxBrandList(props: IBoxBrandListProps) {
trigger, trigger,
onValueChange, onValueChange,
onSelect, onSelect,
brandType = 'ALL',
} = props; } = props;
const intl = useIntl(); const intl = useIntl();
const intlPrefix = 'boxBrand'; const intlPrefix = 'boxBrand';
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType>();
const columns: ProColumns<BusinessAPI.BoxBrandVO, BizValueType>[] = [ const columns: ProColumns<BusinessAPI.BoxBrandVO, BizValueType>[] = [
{
title: intl.formatMessage({ id: intlPrefix + '.column.image' }),
dataIndex: 'image',
key: 'image',
render: (_, boxBrand) => (
<Image width={80} alt={boxBrand.name} src={boxBrand.image} />
),
},
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.name' }), title: intl.formatMessage({ id: intlPrefix + '.column.name' }),
dataIndex: 'name', dataIndex: 'name',
@ -67,6 +77,7 @@ export default function BoxBrandList(props: IBoxBrandListProps) {
}; };
const formContext = [ const formContext = [
<ProFormText key={'type'} hidden={true} name={'type'} />,
<ProFormText <ProFormText
key={'name'} key={'name'}
name={'name'} name={'name'}
@ -160,6 +171,28 @@ export default function BoxBrandList(props: IBoxBrandListProps) {
mode: 'editor', mode: 'editor',
}} }}
status status
drag={{
fieldProps: {
bordered: true,
//@ts-ignore
search,
onRow: (data) => ({
onClick: () => {
onSelect?.(data);
},
}),
columnsState: {
defaultValue: {
option: { show: true },
status: { show: true },
remark: { show: false },
createdAt: { show: false },
},
},
},
columns,
}}
list={{ list={{
fieldProps: { fieldProps: {
bordered: true, bordered: true,
@ -168,6 +201,11 @@ export default function BoxBrandList(props: IBoxBrandListProps) {
pagination: false, pagination: false,
itemLayout: 'vertical', itemLayout: 'vertical',
showActions: 'hover', showActions: 'hover',
params: {
...(brandType !== 'ALL' && {
type: brandType,
}),
},
onItem: (record: any) => { onItem: (record: any) => {
return { return {
onClick: (e) => { onClick: (e) => {

View File

@ -15,7 +15,7 @@ import {
ProFormText, ProFormText,
} from '@ant-design/pro-components'; } from '@ant-design/pro-components';
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import { Col, Row } from 'antd'; import { Button, Col, Row } from 'antd';
import React, { useState } from 'react'; import React, { useState } from 'react';
interface IBoxProductListProps { interface IBoxProductListProps {
@ -31,7 +31,7 @@ export default function BoxProductList(props: IBoxProductListProps) {
ghost = false, ghost = false,
productId, productId,
search = true, search = true,
mode = 'page', mode = 'drag',
trigger, trigger,
onValueChange, onValueChange,
} = props; } = props;
@ -42,6 +42,9 @@ export default function BoxProductList(props: IBoxProductListProps) {
BusinessAPI.BoxProductVO['specType'] | undefined | 'ALL' BusinessAPI.BoxProductVO['specType'] | undefined | 'ALL'
>(); >();
const [boxBrand, setBoxBrand] = useState<BusinessAPI.BoxBrandVO>(); const [boxBrand, setBoxBrand] = useState<BusinessAPI.BoxBrandVO>();
const [type, setType] = useState<
BusinessAPI.BoxBrandVO['type'] | undefined | 'ALL'
>('OUR_BOX');
const columns: ProColumns<BusinessAPI.BoxProductVO, BizValueType>[] = [ const columns: ProColumns<BusinessAPI.BoxProductVO, BizValueType>[] = [
{ {
@ -93,6 +96,7 @@ export default function BoxProductList(props: IBoxProductListProps) {
const formContext = [ const formContext = [
<ProFormText key={'brandId'} name={'brandId'} hidden={true} />, <ProFormText key={'brandId'} name={'brandId'} hidden={true} />,
<ProFormText key={'type'} name={'type'} hidden={true} />,
<ProFormText <ProFormText
key={'name'} key={'name'}
name={'name'} name={'name'}
@ -221,22 +225,51 @@ export default function BoxProductList(props: IBoxProductListProps) {
intlPrefix={intlPrefix} intlPrefix={intlPrefix}
modeType={mode} modeType={mode}
onValueChange={onValueChange} onValueChange={onValueChange}
container={{}} container={{
fieldProps: {
tabActiveKey: type,
onTabChange: (key) => {
setActiveKey('ALL');
setBoxBrand(undefined);
setType(key as BusinessAPI.BoxBrandVO['type']);
},
tabList: [
{
key: 'OUR_BOX',
tab: intl.formatMessage({
id: intlPrefix + '.type.ourBox',
}),
},
{
key: 'FARMER_BOX',
tab: intl.formatMessage({
id: intlPrefix + '.type.farmerBox',
}),
},
{
key: 'THIRD_PARTY_BOX',
tab: intl.formatMessage({
id: intlPrefix + '.type.thirdPartyBox',
}),
},
],
},
}}
remark={{ remark={{
mode: 'editor', mode: 'editor',
}} }}
status status
page={{ drag={{
fieldProps: { fieldProps: {
tableRender: (_, defaultDom) => ( tableRender: (_, defaultDom) => (
<Row gutter={16}> <Row gutter={16}>
<Col xs={24} sm={24} md={24} lg={10} xl={8} xxl={6}> <Col xs={24} sm={24} md={24} lg={10} xl={8} xxl={6}>
<BoxBrandList <BoxBrandList
mode={'list'} mode={'drag'}
ghost={true} ghost={true}
search={false} search={false}
brandType={type}
onSelect={(boxBrand: BusinessAPI.BoxBrandVO) => { onSelect={(boxBrand: BusinessAPI.BoxBrandVO) => {
console.log('boxBrand', boxBrand);
setBoxBrand(boxBrand); setBoxBrand(boxBrand);
}} }}
/> />
@ -262,6 +295,7 @@ export default function BoxProductList(props: IBoxProductListProps) {
ghost={true} ghost={true}
search={false} search={false}
/> />
</div> </div>
</ProCard> </ProCard>
</Col> </Col>
@ -276,8 +310,10 @@ export default function BoxProductList(props: IBoxProductListProps) {
...(activeKey !== 'ALL' && { ...(activeKey !== 'ALL' && {
specType: activeKey!, specType: activeKey!,
}), }),
...(boxBrand && { //@ts-ignore
brandId: boxBrand?.brandId, brandId: boxBrand?.brandId || 0,
...(type !== 'ALL' && {
type: type,
}), }),
}, },
toolbar: { toolbar: {
@ -319,6 +355,7 @@ export default function BoxProductList(props: IBoxProductListProps) {
formContext, formContext,
initValues: { initValues: {
brandId: boxBrand?.brandId, brandId: boxBrand?.brandId,
type: type,
}, },
}} }}
update={{ update={{

View File

@ -23,7 +23,7 @@ export default function ExcipientList(props: IExcipientListProps) {
ghost = false, ghost = false,
itemId, itemId,
search = true, search = true,
mode = 'page', mode = 'drag',
trigger, trigger,
onValueChange, onValueChange,
} = props; } = props;
@ -173,7 +173,7 @@ export default function ExcipientList(props: IExcipientListProps) {
mode: 'editor', mode: 'editor',
}} }}
status status
page={{ drag={{
fieldProps: { fieldProps: {
bordered: true, bordered: true,
ghost, ghost,

View File

@ -23,7 +23,7 @@ export default function ExcipientList(props: IExcipientListProps) {
ghost = false, ghost = false,
itemId, itemId,
search = true, search = true,
mode = 'page', mode = 'drag',
trigger, trigger,
onValueChange, onValueChange,
} = props; } = props;
@ -173,7 +173,7 @@ export default function ExcipientList(props: IExcipientListProps) {
mode: 'editor', mode: 'editor',
}} }}
status status
page={{ drag={{
fieldProps: { fieldProps: {
bordered: true, bordered: true,
ghost, ghost,

View File

@ -37,7 +37,7 @@ import {
} from '@ant-design/pro-components'; } from '@ant-design/pro-components';
import { Avatar, Button, message, Space, Switch, Tour, TourProps } from 'antd'; import { Avatar, Button, message, Space, Switch, Tour, TourProps } from 'antd';
import { Dayjs } from 'dayjs'; import { Dayjs } from 'dayjs';
import { import React, {
useContext, useContext,
useEffect, useEffect,
useImperativeHandle, useImperativeHandle,
@ -828,7 +828,7 @@ export default function BizContainer<
return <DealerFormItem {...props} {...props?.fieldProps} />; return <DealerFormItem {...props} {...props?.fieldProps} />;
}, },
render: (dealerVO: BusinessAPI.DealerVO) => { render: (dealerVO: BusinessAPI.DealerVO) => {
console.log("dealerVO", dealerVO) console.log('dealerVO', dealerVO);
return ( return (
dealerVO && ( dealerVO && (
<DealerList <DealerList

View File

@ -34,7 +34,7 @@ export default function BizDrag<
persistenceType: 'sessionStorage', persistenceType: 'sessionStorage',
persistenceKey: method + 'ColumnStateKey', persistenceKey: method + 'ColumnStateKey',
defaultValue: { defaultValue: {
// option: { show: true, fixed: 'right' }, ...fieldProps?.columnsState?.defaultValue
}, },
}, },
dragSortKey: 'sort', dragSortKey: 'sort',

View File

@ -6,15 +6,11 @@ import {
} from '@/components'; } from '@/components';
import { business } from '@/services'; import { business } from '@/services';
import { useIntl } from '@@/exports'; import { useIntl } from '@@/exports';
import { import { ProColumns, ProFormText } from '@ant-design/pro-components';
CheckCard,
ProColumns,
ProFormItem,
ProFormText,
} from '@ant-design/pro-components';
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import { Col } from 'antd';
import React from 'react'; import React from 'react';
import { formatParam } from '@/utils/formatParam';
import { ProFormUploadMaterial } from '@chageable/components';
interface ICompanyListProps { interface ICompanyListProps {
ghost?: boolean; ghost?: boolean;
@ -38,9 +34,22 @@ export default function CompanyList(props: ICompanyListProps) {
const columns: ProColumns<BusinessAPI.CompanyVO, BizValueType>[] = [ const columns: ProColumns<BusinessAPI.CompanyVO, BizValueType>[] = [
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.name' }), title: intl.formatMessage({ id: intlPrefix + '.column.logo' }),
dataIndex: 'name', dataIndex: 'logo',
key: 'name', key: 'logo',
valueType: 'image',
search: false,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.shortName' }),
dataIndex: 'shortName',
key: 'shortName',
renderText: (text: string) => <span className="font-medium">{text}</span>,
},
{
title: intl.formatMessage({ id: intlPrefix + '.column.fullName' }),
dataIndex: 'fullName',
key: 'fullName',
renderText: (text: string) => <span className="font-medium">{text}</span>, renderText: (text: string) => <span className="font-medium">{text}</span>,
}, },
{ {
@ -73,19 +82,70 @@ export default function CompanyList(props: ICompanyListProps) {
]; ];
const formContext = [ const formContext = [
<ProFormUploadMaterial
key={'logo'}
name={'logoList'}
label={intl.formatMessage({ id: intlPrefix + '.form.logo.label' })}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.logo.placeholder',
})}
transform={(value) => {
console.log('transform', value);
return {
logoList: value,
logo: value[0],
};
}}
fieldProps={{
maxCount: 1,
request: async (params, sorter, filter) => {
const { data, success, totalCount } =
await business.material.pageMaterial({
materialPageQry: formatParam<typeof params>(
params,
sorter,
filter,
),
});
return {
data: data || [],
total: totalCount,
success,
};
},
}}
/>,
<ProFormText <ProFormText
key={'name'} key={'shortName'}
name={'name'} name={'shortName'}
label={intl.formatMessage({ id: intlPrefix + '.form.name.label' })} label={intl.formatMessage({ id: intlPrefix + '.form.shortName.label' })}
required={true} required={true}
placeholder={intl.formatMessage({ placeholder={intl.formatMessage({
id: intlPrefix + '.form.name.placeholder', id: intlPrefix + '.form.shortName.placeholder',
})} })}
rules={[ rules={[
{ {
required: true, required: true,
message: intl.formatMessage({ message: intl.formatMessage({
id: intlPrefix + '.form.name.required', id: intlPrefix + '.form.shortName.required',
}),
},
]}
/>,
<ProFormText
key={'fullName'}
name={'fullName'}
label={intl.formatMessage({ id: intlPrefix + '.form.fullName.label' })}
required={true}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.fullName.placeholder',
})}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.fullName.required',
}), }),
}, },
]} ]}
@ -104,13 +164,15 @@ export default function CompanyList(props: ICompanyListProps) {
message: intl.formatMessage({ message: intl.formatMessage({
id: intlPrefix + '.form.taxNumber.required', id: intlPrefix + '.form.taxNumber.required',
}), }),
} },
]} ]}
/>, />,
<ProFormText <ProFormText
key={'contactPerson'} key={'contactPerson'}
name={'contactPerson'} name={'contactPerson'}
label={intl.formatMessage({ id: intlPrefix + '.form.contactPerson.label' })} label={intl.formatMessage({
id: intlPrefix + '.form.contactPerson.label',
})}
required={true} required={true}
placeholder={intl.formatMessage({ placeholder={intl.formatMessage({
id: intlPrefix + '.form.contactPerson.placeholder', id: intlPrefix + '.form.contactPerson.placeholder',
@ -121,7 +183,7 @@ export default function CompanyList(props: ICompanyListProps) {
message: intl.formatMessage({ message: intl.formatMessage({
id: intlPrefix + '.form.contactPerson.required', id: intlPrefix + '.form.contactPerson.required',
}), }),
} },
]} ]}
tooltip={intl.formatMessage({ tooltip={intl.formatMessage({
id: intlPrefix + '.form.contactPerson.tooltip', id: intlPrefix + '.form.contactPerson.tooltip',
@ -130,7 +192,9 @@ export default function CompanyList(props: ICompanyListProps) {
<ProFormText <ProFormText
key={'contactPhone'} key={'contactPhone'}
name={'contactPhone'} name={'contactPhone'}
label={intl.formatMessage({ id: intlPrefix + '.form.contactPhone.label' })} label={intl.formatMessage({
id: intlPrefix + '.form.contactPhone.label',
})}
required={true} required={true}
placeholder={intl.formatMessage({ placeholder={intl.formatMessage({
id: intlPrefix + '.form.contactPhone.placeholder', id: intlPrefix + '.form.contactPhone.placeholder',
@ -141,7 +205,7 @@ export default function CompanyList(props: ICompanyListProps) {
message: intl.formatMessage({ message: intl.formatMessage({
id: intlPrefix + '.form.contactPhone.required', id: intlPrefix + '.form.contactPhone.required',
}), }),
} },
]} ]}
tooltip={intl.formatMessage({ tooltip={intl.formatMessage({
id: intlPrefix + '.form.contactPhone.tooltip', id: intlPrefix + '.form.contactPhone.tooltip',
@ -161,7 +225,7 @@ export default function CompanyList(props: ICompanyListProps) {
message: intl.formatMessage({ message: intl.formatMessage({
id: intlPrefix + '.form.address.required', id: intlPrefix + '.form.address.required',
}), }),
} },
]} ]}
tooltip={intl.formatMessage({ tooltip={intl.formatMessage({
id: intlPrefix + '.form.address.tooltip', id: intlPrefix + '.form.address.tooltip',
@ -231,7 +295,7 @@ export default function CompanyList(props: ICompanyListProps) {
formType: 'drawer', formType: 'drawer',
formContext, formContext,
initValues: { initValues: {
status: true status: true,
}, },
}} }}
update={{ update={{

View File

@ -8,16 +8,17 @@ import {
} from '@/components'; } from '@/components';
import { business } from '@/services'; import { business } from '@/services';
import { useIntl } from '@@/exports'; import { useIntl } from '@@/exports';
import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
import { import {
ProColumns, ProColumns,
ProFormCheckbox, ProFormCheckbox,
ProFormDependency,
ProFormDigit, ProFormDigit,
ProFormRadio, ProFormRadio,
ProFormSwitch, ProFormSwitch,
ProFormText, ProFormText,
} from '@ant-design/pro-components'; } from '@ant-design/pro-components';
import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons';
import { Tooltip } from 'antd'; import { Tooltip } from 'antd';
import React from 'react'; import React from 'react';
@ -34,7 +35,7 @@ export default function DealerList(props: IDealerListProps) {
ghost = false, ghost = false,
dealerId, dealerId,
search = true, search = true,
mode = 'page', mode = 'drag',
trigger, trigger,
onValueChange, onValueChange,
} = props; } = props;
@ -169,6 +170,66 @@ export default function DealerList(props: IDealerListProps) {
</span> </span>
), ),
}, },
// 新增字段展示 - 计提税金
{
title: (
<Tooltip
title={intl.formatMessage({
id: intlPrefix + '.column.enableAccrualTax.tooltip',
})}
>
<span>
{intl.formatMessage({ id: intlPrefix + '.column.enableAccrualTax' })}
</span>
</Tooltip>
),
dataIndex: 'accrualTaxRatio',
key: 'accrualTaxRatio',
search: false,
render: (_, record) => (
<span>
{record.enableAccrualTax ? (
<CheckCircleOutlined style={{ color: '#52c41a' }} />
) : (
<CloseCircleOutlined style={{ color: '#ff4d4f' }} />
)}
{record.enableAccrualTax && record.accrualTaxRatio
? ` ${record.accrualTaxRatio}%`
: ''}
</span>
),
},
// 新增字段展示 - 公司返点
{
title: (
<Tooltip
title={intl.formatMessage({
id: intlPrefix + '.column.enableCompanyRebate.tooltip',
})}
>
<span>
{intl.formatMessage({
id: intlPrefix + '.column.enableCompanyRebate',
})}
</span>
</Tooltip>
),
dataIndex: 'companyRebateRatio',
key: 'enableCompanyRebate',
search: false,
render: (_, record) => (
<span>
{record.enableCompanyRebate ? (
<CheckCircleOutlined style={{ color: '#52c41a' }} />
) : (
<CloseCircleOutlined style={{ color: '#ff4d4f' }} />
)}
{record.enableCompanyRebate && record.companyRebateRatio
? ` ${record.companyRebateRatio}%`
: ''}
</span>
),
},
{ {
title: intl.formatMessage({ id: intlPrefix + '.column.documentTypes' }), title: intl.formatMessage({ id: intlPrefix + '.column.documentTypes' }),
dataIndex: 'documentTypes', dataIndex: 'documentTypes',
@ -252,29 +313,40 @@ export default function DealerList(props: IDealerListProps) {
unCheckedChildren: intl.formatMessage({ id: 'common.no' }), unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}} }}
/>, />,
<ProFormDigit <ProFormDependency key={'enableShare'} name={['enableShare']}>
key={'shareRatio'} {({ enableShare }) => {
name={'shareRatio'} return (
label={intl.formatMessage({ id: intlPrefix + '.form.shareRatio.label' })} enableShare && (
fieldProps={{ <ProFormDigit
precision: 2, key={'shareRatio'}
step: 0.01, name={'shareRatio'}
min: 0, label={intl.formatMessage({
max: 100, id: intlPrefix + '.form.shareRatio.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 100,
suffix: '%',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.shareRatio.placeholder',
})}
dependencies={['enableShare']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.shareRatio.required',
}),
},
]}
/>
)
);
}} }}
placeholder={intl.formatMessage({ </ProFormDependency>,
id: intlPrefix + '.form.shareRatio.placeholder',
})}
dependencies={['enableShare']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.shareRatio.required',
}),
},
]}
/>,
<ProFormSwitch <ProFormSwitch
key={'freightCostFlag'} key={'freightCostFlag'}
name={'freightCostFlag'} name={'freightCostFlag'}
@ -308,6 +380,101 @@ export default function DealerList(props: IDealerListProps) {
unCheckedChildren: intl.formatMessage({ id: 'common.no' }), unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}} }}
/>, />,
// 新增字段表单 - 计提税金
<ProFormSwitch
key={'enableAccrualTax'}
name={'enableAccrualTax'}
label={intl.formatMessage({
id: intlPrefix + '.form.enableAccrualTax.label',
})}
fieldProps={{
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}}
/>,
<ProFormDependency key={'enableAccrualTax'} name={['enableAccrualTax']}>
{({ enableAccrualTax }) => {
return (
enableAccrualTax && (
<ProFormDigit
key={'accrualTaxRatio'}
name={'accrualTaxRatio'}
label={intl.formatMessage({
id: intlPrefix + '.form.accrualTaxRatio.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 100,
suffix: '%',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.accrualTaxRatio.placeholder',
})}
dependencies={['enableAccrualTax']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.accrualTaxRatio.required',
}),
},
]}
/>
)
);
}}
</ProFormDependency>,
// 新增字段表单 - 公司返点
<ProFormSwitch
key={'enableCompanyRebate'}
name={'enableCompanyRebate'}
label={intl.formatMessage({
id: intlPrefix + '.form.enableCompanyRebate.label',
})}
fieldProps={{
checkedChildren: intl.formatMessage({ id: 'common.yes' }),
unCheckedChildren: intl.formatMessage({ id: 'common.no' }),
}}
/>,
<ProFormDependency
key={'enableCompanyRebate'}
name={['enableCompanyRebate']}
>
{({ enableCompanyRebate }) => {
return (
enableCompanyRebate && (
<ProFormDigit
key={'companyRebateRatio'}
name={'companyRebateRatio'}
label={intl.formatMessage({
id: intlPrefix + '.form.companyRebateRatio.label',
})}
fieldProps={{
precision: 2,
step: 0.01,
min: 0,
max: 100,
suffix: '%',
}}
placeholder={intl.formatMessage({
id: intlPrefix + '.form.companyRebateRatio.placeholder',
})}
dependencies={['enableCompanyRebate']}
rules={[
{
required: true,
message: intl.formatMessage({
id: intlPrefix + '.form.companyRebateRatio.required',
}),
},
]}
/>
)
);
}}
</ProFormDependency>,
<ProFormCheckbox.Group <ProFormCheckbox.Group
key={'documentTypesList'} key={'documentTypesList'}
name={'documentTypesList'} name={'documentTypesList'}
@ -335,7 +502,6 @@ export default function DealerList(props: IDealerListProps) {
}, },
]} ]}
transform={(value) => { transform={(value) => {
console.log('value1', value);
return { return {
documentTypesList: value, documentTypesList: value,
documentTypes: (value || []).join(','), documentTypes: (value || []).join(','),
@ -407,7 +573,7 @@ export default function DealerList(props: IDealerListProps) {
mode: 'editor', mode: 'editor',
}} }}
status status
page={{ drag={{
fieldProps: { fieldProps: {
bordered: true, bordered: true,
ghost, ghost,

View File

@ -187,9 +187,6 @@ const EmployeeList: React.FC = (props: IEmployeeListProps) => {
}} }}
fieldProps={{ fieldProps={{
maxCount: 1, maxCount: 1,
onChange: (fileList) => {
console.log('onChange', fileList);
},
request: async (params, sorter, filter) => { request: async (params, sorter, filter) => {
const { data, success, totalCount } = const { data, success, totalCount } =
await business.material.pageMaterial({ await business.material.pageMaterial({

View File

@ -688,7 +688,7 @@ export default {
receivable: '应收金额', receivable: '应收金额',
share: '分成设置', share: '分成设置',
enableShare: '分成', enableShare: '分成',
'enableShare.tooltip': '是否开启诚信志远分成', 'enableShare.tooltip': '是否开启调诚信志远分红比例',
shareRatio: '分成比例', shareRatio: '分成比例',
shareRatioTitle: '分成', shareRatioTitle: '分成',
freightCostFlag: '运费成本', freightCostFlag: '运费成本',
@ -697,6 +697,12 @@ export default {
'strawMatCostFlag.tooltip': '草帘是否作为成本', 'strawMatCostFlag.tooltip': '草帘是否作为成本',
includePackingFlag: '含包装费', includePackingFlag: '含包装费',
'includePackingFlag.tooltip': '发货单合计金额是否含包装费', 'includePackingFlag.tooltip': '发货单合计金额是否含包装费',
enableAccrualTax: '计提税金',
'enableAccrualTax.tooltip': '是否开启计提税金',
accrualTaxRatio: '计提税金比例',
enableCompanyRebate: '公司返点',
'enableCompanyRebate.tooltip': '是否开启公司返点',
companyRebateRatio: '公司返点比例',
documentTypes: '单据类型', documentTypes: '单据类型',
remark: '备注', remark: '备注',
status: '状态', status: '状态',
@ -740,6 +746,20 @@ export default {
placeholder: '请选择发货单合计金额是否含包装费', placeholder: '请选择发货单合计金额是否含包装费',
required: '请选择发货单合计金额是否含包装费', required: '请选择发货单合计金额是否含包装费',
}, },
enableAccrualTax: {
label: '是否开启计提税金',
},
accrualTaxRatio: {
label: '计提税金比例',
placeholder: '请输入计提税金比例',
},
enableCompanyRebate: {
label: '是否开启公司返点',
},
companyRebateRatio: {
label: '公司返点比例',
placeholder: '请输入公司返点比例',
},
documentTypes: { documentTypes: {
label: '单据类型', label: '单据类型',
'enum.delivery': '发货单', 'enum.delivery': '发货单',
@ -1227,6 +1247,12 @@ export default {
twoGrain: '2粒装', twoGrain: '2粒装',
fourGrain: '4粒装', fourGrain: '4粒装',
}, },
type: {
all: '全部',
ourBox: '自产箱',
farmerBox: '农夫箱',
thirdPartyBox: '第三方箱',
},
column: { column: {
name: '纸箱名称', name: '纸箱名称',
weight: '重量(斤)', weight: '重量(斤)',
@ -1324,7 +1350,9 @@ export default {
}, },
company: { company: {
column: { column: {
name: '公司名称', shortName: '公司简称',
fullName: '公司全称',
logo: '公司logo',
taxNumber: '税号', taxNumber: '税号',
contactPerson: '联系人', contactPerson: '联系人',
contactPhone: '联系电话', contactPhone: '联系电话',
@ -1338,10 +1366,20 @@ export default {
option: '操作', option: '操作',
}, },
form: { form: {
name: { shortName: {
label: '公司名称', label: '公司简称',
placeholder: '请输入公司名称', placeholder: '请输入公司简称',
required: '公司名称为必填项', required: '公司简称为必填项',
},
fullName: {
label: '公司全称',
placeholder: '请输入公司全称',
required: '公司全称为必填项',
},
logo: {
label: '公司logo',
placeholder: '请上传公司logo',
required: '公司logo为必填项',
}, },
taxNumber: { taxNumber: {
label: '税号', label: '税号',

View File

@ -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 */ /** 纸箱品牌列表 GET /operation/listBoxBrand */
export async function listBoxBrand( export async function listBoxBrand(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)

View File

@ -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 */ /** 纸箱产品列表 GET /operation/listBoxProduct */
export async function listBoxProduct( export async function listBoxProduct(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)

View File

@ -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 */ /** 费用项目列表 GET /operation/listCostItem */
export async function listCostItem( export async function listCostItem(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)

View File

@ -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 */ /** 经销商表列表 GET /operation/listDealer */
export async function listDealer( export async function listDealer(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)

View File

@ -25,11 +25,13 @@ import * as platform from './platform';
import * as purchaseOrder from './purchaseOrder'; import * as purchaseOrder from './purchaseOrder';
import * as role from './role'; import * as role from './role';
import * as setting from './setting'; import * as setting from './setting';
import * as shipOrder from './shipOrder';
import * as supplier from './supplier'; import * as supplier from './supplier';
import * as user from './user'; import * as user from './user';
export default { export default {
user, user,
supplier, supplier,
shipOrder,
setting, setting,
purchaseOrder, purchaseOrder,
platform, platform,

View File

@ -17,6 +17,26 @@ export async function approvePurchaseOrder(
}); });
} }
/** 获取某个状态的数量 GET /operation/countPurchaseOrderByState */
export async function countPurchaseOrderByState(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.countPurchaseOrderByStateParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseLong>(
'/operation/countPurchaseOrderByState',
{
method: 'GET',
params: {
...params,
purchaseOrderCountQry: undefined,
...params['purchaseOrderCountQry'],
},
...(options || {}),
},
);
}
/** 创建采购订单(暂存) POST /operation/createPurchaseOrder */ /** 创建采购订单(暂存) POST /operation/createPurchaseOrder */
export async function createPurchaseOrder( export async function createPurchaseOrder(
body: BusinessAPI.PurchaseOrderCreateCmd, body: BusinessAPI.PurchaseOrderCreateCmd,

View File

@ -0,0 +1,168 @@
// @ts-ignore
/* eslint-disable */
import request from '../request';
/** 创建发货单 POST /operation/createShipOrder */
export async function createShipOrder(
body: BusinessAPI.ShipOrderCreateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseShipOrderVO>(
'/operation/createShipOrder',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 发货单删除 DELETE /operation/destroyShipOrder */
export async function destroyShipOrder(
body: BusinessAPI.ShipOrderDestroyCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>('/operation/destroyShipOrder', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}
/** 发货单生成单据 PUT /operation/generateDocumentShipOrder */
export async function generateDocumentShipOrder(
body: BusinessAPI.ShipOrderGenerateDocumentCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>(
'/operation/generateDocumentShipOrder',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 发货单生成单据 PATCH /operation/generateDocumentShipOrder */
export async function generateDocumentShipOrder1(
body: BusinessAPI.ShipOrderGenerateDocumentCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.Response>(
'/operation/generateDocumentShipOrder',
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 发货单列表 GET /operation/listShipOrder */
export async function listShipOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.listShipOrderParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.MultiResponseShipOrderVO>(
'/operation/listShipOrder',
{
method: 'GET',
params: {
...params,
shipOrderListQry: undefined,
...params['shipOrderListQry'],
},
...(options || {}),
},
);
}
/** 发货单列表 GET /operation/pageShipOrder */
export async function pageShipOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.pageShipOrderParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.PageResponseShipOrderVO>(
'/operation/pageShipOrder',
{
method: 'GET',
params: {
...params,
shipOrderPageQry: undefined,
...params['shipOrderPageQry'],
},
...(options || {}),
},
);
}
/** 发货单详情 GET /operation/showShipOrder */
export async function showShipOrder(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: BusinessAPI.showShipOrderParams,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseShipOrderVO>(
'/operation/showShipOrder',
{
method: 'GET',
params: {
...params,
shipOrderShowQry: undefined,
...params['shipOrderShowQry'],
},
...(options || {}),
},
);
}
/** 发货单更新 PUT /operation/updateShipOrder */
export async function updateShipOrder(
body: BusinessAPI.ShipOrderUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseShipOrderVO>(
'/operation/updateShipOrder',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}
/** 发货单更新 PATCH /operation/updateShipOrder */
export async function updateShipOrder1(
body: BusinessAPI.ShipOrderUpdateCmd,
options?: { [key: string]: any },
) {
return request<BusinessAPI.SingleResponseShipOrderVO>(
'/operation/updateShipOrder',
{
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
},
);
}

View File

@ -2,6 +2,26 @@
/* eslint-disable */ /* eslint-disable */
import request from '../request'; 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 */ /** 创建供应商 POST /operation/createSupplier */
export async function createSupplier( export async function createSupplier(
body: BusinessAPI.SupplierCreateCmd, body: BusinessAPI.SupplierCreateCmd,

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long