Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
ae8914f5
Commit
ae8914f5
authored
Jun 05, 2023
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加企业客户
parent
9b63e7d9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
170 additions
and
1 deletion
+170
-1
config.js
config/config.js
+8
-1
groupMealRoute.js
config/groupMealRoute.js
+8
-0
CustomerInfo.jsx
src/pages/businessCustomer/components/CustomerInfo.jsx
+50
-0
index.jsx
src/pages/businessCustomer/index.jsx
+38
-0
index.js
src/pages/businessCustomer/model/index.js
+66
-0
No files found.
config/config.js
View file @
ae8914f5
import
slash
from
'
slash2
'
;
import
slash
from
'
slash2
'
;
import
defaultSettings
from
'
./defaultSettings
'
;
// https://umijs.org/config/
import
defaultSettings
from
'
./defaultSettings
'
;
// https://umijs.org/config/
import
webpackPlugin
from
'
./plugin.config
'
;
import
webpackPlugin
from
'
./plugin.config
'
;
import
groupMealRoute
from
'
./groupMealRoute
'
;
const
{
pwa
,
primaryColor
}
=
defaultSettings
;
// preview.pro.ant.design only do not use in your production ;
const
{
pwa
,
primaryColor
}
=
defaultSettings
;
// preview.pro.ant.design only do not use in your production ;
// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
...
@@ -286,6 +286,13 @@ export default {
...
@@ -286,6 +286,13 @@ export default {
name
:
'
businessInfo
'
,
name
:
'
businessInfo
'
,
component
:
'
./businessManage/info
'
,
component
:
'
./businessManage/info
'
,
},
},
{
title
:
'
商户管理后台-商家资料
'
,
path
:
'
/businessInfo
'
,
name
:
'
businessInfo
'
,
component
:
'
./businessManage/info
'
,
},
...
groupMealRoute
,
{
{
component
:
'
./404
'
,
component
:
'
./404
'
,
},
},
...
...
config/groupMealRoute.js
0 → 100644
View file @
ae8914f5
export
default
[
{
title
:
'
商户管理后台-企业团餐-企业客户
'
,
path
:
'
/businessCustomer
'
,
name
:
'
BusinessCustomer
'
,
component
:
'
./businessCustomer/index
'
,
},
];
src/pages/businessCustomer/components/CustomerInfo.jsx
0 → 100644
View file @
ae8914f5
import
React
from
'
react
'
;
import
{
Button
,
Form
,
Input
,
Alert
,
Cascader
,
Col
,
Row
,
Modal
,
Select
}
from
'
antd
'
;
import
{
layout
}
from
'
../model/index
'
;
const
CustomerInfo
=
props
=>
{
const
[
form
]
=
Form
.
useForm
();
// 关闭分组信息弹窗
const
handleCancel
=
()
=>
{
props
.
handleClose
(
false
);
};
// 添加/保存分组
const
handleConfirm
=
async
()
=>
{};
const
extra
=
<
Alert
message=
"选中后,顾客下单需至少选择1个“下单必选分组”"
type=
"error"
/>;
return
(
<
Modal
title=
"企业客户信息"
visible=
{
props
.
visible
}
destroyOnClose
maskClosable=
{
false
}
width=
"800px"
onOk=
{
handleConfirm
}
onCancel=
{
handleCancel
}
>
<
Form
name=
"basic"
{
...
layout
}
form=
{
form
}
>
<
Form
.
Item
label=
"公司名称"
name=
"name"
rules=
{
[{
required
:
true
,
message
:
'
请输入公司名称!
'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"下单必选分组"
name=
"necessary"
extra=
{
extra
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"企业截止时间"
name=
"name"
rules=
{
[{
required
:
true
,
message
:
'
请输入企业截止时间!
'
}]
}
>
<
Input
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
};
export
default
CustomerInfo
;
src/pages/businessCustomer/index.jsx
0 → 100644
View file @
ae8914f5
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
{
Button
}
from
'
antd
'
;
import
{
PlusOutlined
}
from
'
@ant-design/icons
'
;
import
{
customerColumn
}
from
'
./model/index
'
;
import
CustomerInfo
from
'
./components/CustomerInfo
'
;
const
BusinessCustomer
=
()
=>
{
const
[
visible
,
setVisible
]
=
useState
(
true
);
const
query
=
async
()
=>
{};
const
onEdit
=
async
()
=>
{};
return
(
<
div
>
<
ProTable
search=
{
{
collapsed
:
false
,
collapseRender
:
()
=>
null
,
}
}
columns=
{
customerColumn
({
onEdit
})
}
request=
{
params
=>
query
({
...
params
})
}
rowKey=
{
r
=>
r
.
id
}
expandIconColumnIndex=
{
10
}
bordered
options=
{
false
}
toolBarRender=
{
()
=>
[
<
Button
key=
"3"
icon=
{
<
PlusOutlined
/>
}
type=
"primary"
onClick=
{
onEdit
}
>
添加企业客户
</
Button
>,
]
}
scroll=
{
{
x
:
'
100%
'
,
y
:
400
}
}
/>
<
CustomerInfo
visible=
{
visible
}
/>
</
div
>
);
};
export
default
BusinessCustomer
;
src/pages/businessCustomer/model/index.js
0 → 100644
View file @
ae8914f5
import
React
from
'
react
'
;
import
{
Button
}
from
'
antd
'
;
export
const
customerColumn
=
options
=>
{
const
{
onEdit
}
=
options
;
return
[
{
title
:
'
ID
'
,
dataIndex
:
'
name
'
,
width
:
120
,
align
:
'
center
'
,
},
{
title
:
'
公司名称
'
,
dataIndex
:
'
name
'
,
width
:
120
,
align
:
'
center
'
,
},
{
title
:
'
截单时间(分钟)
'
,
dataIndex
:
'
name
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
},
{
title
:
'
餐品类型
'
,
dataIndex
:
'
name
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
},
{
title
:
'
创建人
'
,
dataIndex
:
'
name
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
},
{
title
:
'
创建时间
'
,
dataIndex
:
'
createdAt
'
,
width
:
120
,
align
:
'
center
'
,
hideInSearch
:
true
,
},
{
title
:
'
操作
'
,
hideInSearch
:
true
,
dataIndex
:
'
action
'
,
width
:
200
,
align
:
'
center
'
,
fixed
:
'
right
'
,
render
:
(
val
,
r
)
=>
(
<
Button
key
=
"
edit
"
onClick
=
{()
=>
onEdit
(
r
,
'
edit
'
)}
>
编辑
<
/Button
>
),
},
];
};
export
const
layout
=
{
labelCol
:
{
span
:
4
},
wrapperCol
:
{
span
:
18
},
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment