Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
前端-黄佳鑫
jinfa-platform
Commits
19ac5d51
Commit
19ac5d51
authored
Aug 04, 2020
by
tjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善交易能力模块
parent
e820bf40
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
704 additions
and
1289 deletions
+704
-1289
base.config.json
config/base.config.json
+1
-1
tranactionRoute.ts
config/routes/tranactionRoute.ts
+21
-0
CustomRegistryPhone.tsx
src/components/NiceForm/components/CustomRegistryPhone.tsx
+70
-0
index.tsx
src/components/NiceForm/index.tsx
+20
-20
menu.ts
src/locales/zh-CN/menu.ts
+3
-0
addMember copy.tsx
src/pages/member/memberImport/addMember copy.tsx
+0
-866
addMember.tsx
src/pages/member/memberImport/addMember.tsx
+38
-182
index.tsx
src/pages/member/memberImport/schema/index.tsx
+166
-140
addBills.tsx
src/pages/transaction/stockSellStorage/bills/addBills.tsx
+93
-0
index.tsx
src/pages/transaction/stockSellStorage/bills/index.tsx
+14
-3
addBillsType.tsx
...s/transaction/stockSellStorage/billsType/addBillsType.tsx
+93
-0
index.tsx
src/pages/transaction/stockSellStorage/billsType/index.tsx
+28
-35
addWarehouse.tsx
...s/transaction/stockSellStorage/warehouse/addWarehouse.tsx
+122
-0
index.tsx
src/pages/transaction/stockSellStorage/warehouse/index.tsx
+35
-42
No files found.
config/base.config.json
View file @
19ac5d51
{
"userRegister"
:{
"useType"
:{
"memberType"
:[{
"id"
:
1
,
"typeName"
:
"企业会员"
},{
"id"
:
2
,
"typeName"
:
"企业个人会员"
},{
"id"
:
3
,
"typeName"
:
"渠道企业会员"
},{
"id"
:
4
,
"typeName"
:
"渠道个人会员"
}],
"businessType"
:[{
"id"
:
1
,
"typeName"
:
"采购"
},{
"id"
:
2
,
"typeName"
:
"商品销售"
},{
"id"
:
3
,
"typeName"
:
"加工服务"
},{
"id"
:
4
,
"typeName"
:
"物流服务"
},{
"id"
:
5
,
"typeName"
:
"金融服务"
},{
"id"
:
6
,
"typeName"
:
"保险服务"
},{
"id"
:
7
,
"typeName"
:
"1"
},{
"id"
:
8
,
"typeName"
:
"2"
},{
"id"
:
9
,
"typeName"
:
"3"
},{
"id"
:
10
,
"typeName"
:
"4"
},{
"id"
:
11
,
"typeName"
:
"23"
},{
"id"
:
12
,
"typeName"
:
"6"
},{
"id"
:
13
,
"typeName"
:
"5"
},{
"id"
:
14
,
"typeName"
:
"11111111111111111111111111"
},{
"id"
:
16
,
"typeName"
:
"44"
},{
"id"
:
17
,
"typeName"
:
"33"
},{
"id"
:
18
,
"typeName"
:
"32"
},{
"id"
:
19
,
"typeName"
:
"33333"
},{
"id"
:
20
,
"typeName"
:
"4432"
}]},
"useDetail"
:[{
"groupName"
:
"联系信息"
,
"elements"
:[{
"id"
:
26
,
"fieldName"
:
"contact"
,
"fieldCNName"
:
"联系人"
,
"fieldType"
:
"
String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
27
,
"fieldName"
:
"fixed_contact_number"
,
"fieldCNName"
:
"固定联系电话"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
28
,
"fieldName"
:
"phone_number"
,
"fieldCNName"
:
"手机号码"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
29
,
"fieldName"
:
"fax_number"
,
"fieldCNName"
:
"传真号码"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
30
,
"fieldName"
:
"address"
,
"fieldCNName"
:
"地址"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
31
,
"fieldName"
:
"zip_code"
,
"fieldCNName"
:
"邮编"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
32
,
"fieldName"
:
"url"
,
"fieldCNName"
:
"网址"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
33
,
"fieldName"
:
"email"
,
"fieldCNName"
:
"邮箱"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"营业执照信息"
,
"elements"
:[{
"id"
:
10
,
"fieldName"
:
"company_name"
,
"fieldCNName"
:
"公司名称"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
11
,
"fieldName"
:
"enterprise_type"
,
"fieldCNName"
:
"企业类型"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
12
,
"fieldName"
:
"residence"
,
"fieldCNName"
:
"住所"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
13
,
"fieldName"
:
"legal_representative"
,
"fieldCNName"
:
"法定代表人"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
14
,
"fieldName"
:
"register_capital"
,
"fieldCNName"
:
"注册资本"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
15
,
"fieldName"
:
"establish_date"
,
"fieldCNName"
:
"成立日期"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
16
,
"fieldName"
:
"business_term"
,
"fieldCNName"
:
"营业期限"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
17
,
"fieldName"
:
"business_scope"
,
"fieldCNName"
:
"经营范围"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
18
,
"fieldName"
:
"registration_authority"
,
"fieldCNName"
:
"登记机关"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
19
,
"fieldName"
:
"registration_time"
,
"fieldCNName"
:
"登记时间"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
20
,
"fieldName"
:
"unified_social_credit_code"
,
"fieldCNName"
:
"统一社会信用代码"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
21
,
"fieldName"
:
"business_license"
,
"fieldCNName"
:
"营业执照"
,
"fieldType"
:
"file"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
35
,
"fieldName"
:
" C_COMPANY_KIND"
,
"fieldCNName"
:
"企业类型1"
,
"fieldType"
:
"file"
,
"fieldLength"
:
66
,
"fieldEmpty"
:
1
,
"fieldOrder"
:
2
,
"fieldRemark"
:
""
,
"checkRules"
:[]}]},{
"groupName"
:
"填写会员基本信息"
,
"elements"
:[{
"id"
:
1
,
"fieldName"
:
"member_type"
,
"fieldCNName"
:
"会员类型"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
2
,
"fieldName"
:
"MEMBER_ROLE"
,
"fieldCNName"
:
"会员角色"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
3
,
"fieldName"
:
"member_level"
,
"fieldCNName"
:
"会员等级"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
4
,
"fieldName"
:
"REGISTER_PHONE"
,
"fieldCNName"
:
"注册手机号"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
5
,
"fieldName"
:
"register_email"
,
"fieldCNName"
:
"注册邮箱"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"法定代表人信息"
,
"elements"
:[{
"id"
:
22
,
"fieldName"
:
"legal_name"
,
"fieldCNName"
:
"法人姓名"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
23
,
"fieldName"
:
"legal_phone"
,
"fieldCNName"
:
"法人手机号"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
24
,
"fieldName"
:
"legal_id_card"
,
"fieldCNName"
:
"法人身份证号"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
25
,
"fieldName"
:
"legal_id_card_information"
,
"fieldCNName"
:
"法人身份证信息"
,
"fieldType"
:
"file"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"填写渠道信息"
,
"elements"
:[{
"id"
:
6
,
"fieldName"
:
"channel_level"
,
"fieldCNName"
:
"渠道级别"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
7
,
"fieldName"
:
"channel_type"
,
"fieldCNName"
:
"渠道类型"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
8
,
"fieldName"
:
"agent_city"
,
"fieldCNName"
:
"代理地市"
,
"fieldType"
:
"String"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
9
,
"fieldName"
:
"channel_describe"
,
"fieldCNName"
:
"渠道描述"
,
"fieldType"
:
"S
tring"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]}]},
"global"
:{
"logo"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/logo.png"
,
"countryList"
:[{
"name"
:
"简体中文-ZH"
,
"key"
:
"cn"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png"
},{
"name"
:
"English-EN"
,
"key"
:
"en"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png"
},{
"name"
:
"日本語-JP"
,
"key"
:
"jp"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/japen.png"
},{
"name"
:
"한국어-KO"
,
"key"
:
"ko"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png"
}]}}
{
"userRegister"
:{
"useType"
:{
"memberType"
:[{
"id"
:
1
,
"typeName"
:
"企业会员"
},{
"id"
:
2
,
"typeName"
:
"企业个人会员"
},{
"id"
:
3
,
"typeName"
:
"渠道企业会员"
},{
"id"
:
4
,
"typeName"
:
"渠道个人会员"
}],
"businessType"
:[{
"id"
:
1
,
"typeName"
:
"采购"
},{
"id"
:
2
,
"typeName"
:
"商品销售"
},{
"id"
:
3
,
"typeName"
:
"加工服务"
},{
"id"
:
4
,
"typeName"
:
"物流服务"
},{
"id"
:
5
,
"typeName"
:
"金融服务"
},{
"id"
:
6
,
"typeName"
:
"保险服务"
},{
"id"
:
7
,
"typeName"
:
"1"
},{
"id"
:
8
,
"typeName"
:
"2"
},{
"id"
:
9
,
"typeName"
:
"3"
},{
"id"
:
10
,
"typeName"
:
"4"
},{
"id"
:
11
,
"typeName"
:
"23"
},{
"id"
:
12
,
"typeName"
:
"6"
},{
"id"
:
13
,
"typeName"
:
"5"
},{
"id"
:
14
,
"typeName"
:
"11111111111111111111111111"
},{
"id"
:
16
,
"typeName"
:
"44"
},{
"id"
:
17
,
"typeName"
:
"33"
},{
"id"
:
18
,
"typeName"
:
"32"
},{
"id"
:
19
,
"typeName"
:
"33333"
},{
"id"
:
20
,
"typeName"
:
"4432"
}]},
"useDetail"
:[{
"groupName"
:
"联系信息"
,
"elements"
:[{
"id"
:
26
,
"fieldName"
:
"contact"
,
"fieldCNName"
:
"联系人"
,
"fieldType"
:
"
string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
27
,
"fieldName"
:
"fixed_contact_number"
,
"fieldCNName"
:
"固定联系电话"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
28
,
"fieldName"
:
"phone_number"
,
"fieldCNName"
:
"手机号码"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
29
,
"fieldName"
:
"fax_number"
,
"fieldCNName"
:
"传真号码"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
30
,
"fieldName"
:
"address"
,
"fieldCNName"
:
"地址"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
31
,
"fieldName"
:
"zip_code"
,
"fieldCNName"
:
"邮编"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
32
,
"fieldName"
:
"url"
,
"fieldCNName"
:
"网址"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
33
,
"fieldName"
:
"email"
,
"fieldCNName"
:
"邮箱"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"营业执照信息"
,
"elements"
:[{
"id"
:
10
,
"fieldName"
:
"company_name"
,
"fieldCNName"
:
"公司名称"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
11
,
"fieldName"
:
"enterprise_type"
,
"fieldCNName"
:
"企业类型"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
12
,
"fieldName"
:
"residence"
,
"fieldCNName"
:
"住所"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
13
,
"fieldName"
:
"legal_representative"
,
"fieldCNName"
:
"法定代表人"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
14
,
"fieldName"
:
"register_capital"
,
"fieldCNName"
:
"注册资本"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
15
,
"fieldName"
:
"establish_date"
,
"fieldCNName"
:
"成立日期"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
16
,
"fieldName"
:
"business_term"
,
"fieldCNName"
:
"营业期限"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
17
,
"fieldName"
:
"business_scope"
,
"fieldCNName"
:
"经营范围"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
18
,
"fieldName"
:
"registration_authority"
,
"fieldCNName"
:
"登记机关"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
19
,
"fieldName"
:
"registration_time"
,
"fieldCNName"
:
"登记时间"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
20
,
"fieldName"
:
"unified_social_credit_code"
,
"fieldCNName"
:
"统一社会信用代码"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
21
,
"fieldName"
:
"business_license"
,
"fieldCNName"
:
"营业执照"
,
"fieldType"
:
"upload"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
35
,
"fieldName"
:
" C_COMPANY_KIND"
,
"fieldCNName"
:
"企业类型1"
,
"fieldType"
:
"upload"
,
"fieldLength"
:
66
,
"fieldEmpty"
:
1
,
"fieldOrder"
:
2
,
"fieldRemark"
:
""
,
"checkRules"
:[]}]},{
"groupName"
:
"填写会员基本信息"
,
"elements"
:[{
"id"
:
1
,
"fieldName"
:
"member_type"
,
"fieldCNName"
:
"会员类型"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
2
,
"fieldName"
:
"MEMBER_ROLE"
,
"fieldCNName"
:
"会员角色"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
3
,
"fieldName"
:
"member_level"
,
"fieldCNName"
:
"会员等级"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
4
,
"fieldName"
:
"REGISTER_PHONE"
,
"fieldCNName"
:
"注册手机号"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
5
,
"fieldName"
:
"register_email"
,
"fieldCNName"
:
"注册邮箱"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"法定代表人信息"
,
"elements"
:[{
"id"
:
22
,
"fieldName"
:
"legal_name"
,
"fieldCNName"
:
"法人姓名"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
23
,
"fieldName"
:
"legal_phone"
,
"fieldCNName"
:
"法人手机号"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
24
,
"fieldName"
:
"legal_id_card"
,
"fieldCNName"
:
"法人身份证号"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
25
,
"fieldName"
:
"legal_id_card_information"
,
"fieldCNName"
:
"法人身份证信息"
,
"fieldType"
:
"upload"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"填写渠道信息"
,
"elements"
:[{
"id"
:
6
,
"fieldName"
:
"channel_level"
,
"fieldCNName"
:
"渠道级别"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
7
,
"fieldName"
:
"channel_type"
,
"fieldCNName"
:
"渠道类型"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
8
,
"fieldName"
:
"agent_city"
,
"fieldCNName"
:
"代理地市"
,
"fieldType"
:
"string"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
9
,
"fieldName"
:
"channel_describe"
,
"fieldCNName"
:
"渠道描述"
,
"fieldType"
:
"s
tring"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]}]},
"global"
:{
"logo"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/logo.png"
,
"countryList"
:[{
"name"
:
"简体中文-ZH"
,
"key"
:
"cn"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/china.png"
},{
"name"
:
"English-EN"
,
"key"
:
"en"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/us.png"
},{
"name"
:
"日本語-JP"
,
"key"
:
"jp"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/japen.png"
},{
"name"
:
"한국어-KO"
,
"key"
:
"ko"
,
"icon"
:
"http://lingxi-frontend-test.oss-cn-hangzhou.aliyuncs.com/images/koren.png"
}]}}
config/routes/tranactionRoute.ts
View file @
19ac5d51
...
...
@@ -17,18 +17,39 @@ const TranactionRoute = {
component
:
'@/pages/transaction/stockSellStorage/warehouse/index'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/addWarehouse'
,
name
:
'addWarehouse'
,
key
:
'addWarehouse'
,
hideInMenu
:
true
,
component
:
'@/pages/transaction/stockSellStorage/warehouse/addWarehouse'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/billsType'
,
name
:
'billsType'
,
key
:
'billsType'
,
component
:
'@/pages/transaction/stockSellStorage/billsType/index'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/addBillsType'
,
name
:
'addBillsType'
,
key
:
'addBillsType'
,
hideInMenu
:
true
,
component
:
'@/pages/transaction/stockSellStorage/billsType/addBillsType'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/bills'
,
name
:
'bills'
,
key
:
'bills'
,
component
:
'@/pages/transaction/stockSellStorage/bills/index'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/addBills'
,
name
:
'addBills'
,
key
:
'addBills'
,
hideInMenu
:
true
,
component
:
'@/pages/transaction/stockSellStorage/bills/addBills'
,
},
{
path
:
'/memberCenter/tranactionAbility/stockSellStorage/inventory'
,
name
:
'inventory'
,
key
:
'inventory'
,
...
...
src/components/NiceForm/components/CustomRegistryPhone.tsx
0 → 100644
View file @
19ac5d51
import
React
from
'react'
;
import
{
Row
,
Col
,
Select
,
Input
}
from
'antd'
;
import
styled
from
'styled-components'
;
import
{
findItemAndDelete
}
from
'@/utils'
;
import
cx
from
'classnames'
;
const
{
Option
}
=
Select
;
const
RowStyleLayout
=
styled
(
props
=>
<
div
{
...
props
}
/>)
``
;
const
registryPhone
=
(
props
:
any
)
=>
{
const
{
dataSource
=
[],
selectPh
,
inputPh
}
=
props
.
props
[
'x-component-props'
];
const
defaultValue
:
any
=
props
.
props
.
default
||
{};
const
value
:
any
=
props
.
value
||
{};
const
handleChange
=
(
type
,
e
)
=>
{
if
(
type
===
'select'
)
{
props
.
mutators
.
change
({
...
value
,
phone
:
e
});
}
else
{
e
.
persist
();
props
.
mutators
.
change
({
...
value
,
countryCode
:
e
.
target
.
value
});
}
};
return
(
<
Row
>
<
Col
span=
{
8
}
>
<
Select
value=
{
defaultValue
.
countryCode
}
onChange=
{
val
=>
handleChange
(
'select'
,
val
)
}
placeholder=
{
selectPh
}
>
{
dataSource
.
map
((
v
,
i
)
=>
{
return
(
<
Option
key=
{
v
.
text
}
value=
{
v
.
id
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
img
style=
{
{
width
:
'24px'
,
height
:
'17px'
,
marginRight
:
'8px'
,
}
}
src=
{
v
.
url
}
/>
{
v
.
text
}
</
div
>
</
Option
>
);
})
}
</
Select
>
</
Col
>
<
Col
span=
{
15
}
offset=
{
1
}
>
<
Input
defaultValue=
{
defaultValue
.
phone
}
placeholder=
{
inputPh
}
maxLength=
{
11
}
onChange=
{
e
=>
handleChange
(
'input'
,
e
)
}
/>
</
Col
>
</
Row
>
);
};
registryPhone
.
defaultProps
=
{};
registryPhone
.
isFieldComponent
=
true
;
export
default
registryPhone
;
src/components/NiceForm/index.tsx
View file @
19ac5d51
import
React
from
'react'
import
SchemaForm
,
{
IAntdSchemaFormProps
,
createFormActions
,
FormPath
,
SchemaField
}
from
'@formily/antd'
import
React
from
'react'
;
import
SchemaForm
,
{
IAntdSchemaFormProps
,
createFormActions
,
FormPath
,
SchemaField
,
}
from
'@formily/antd'
;
import
{
Button
,
Space
}
from
'antd'
;
import
CustomUpload
from
'./components/CustomUpload'
;
import
CustomStatus
from
'./components/CustomStatus'
;
...
...
@@ -10,12 +15,12 @@ import Submit from './components/Submit';
import
Text
from
'./components/Text'
;
import
CardCheckBox
from
'./components/CardCheckBox'
;
import
MultTable
from
'./components/MultTable'
;
import
CustomRegistryPhone
from
'./components/CustomRegistryPhone'
;
export
interface
NiceFormProps
extends
IAntdSchemaFormProps
{
}
export
interface
NiceFormProps
extends
IAntdSchemaFormProps
{}
const
NiceForm
:
React
.
FC
<
NiceFormProps
>
=
(
props
)
=>
{
const
{
children
,
components
,
...
reset
}
=
props
const
NiceForm
:
React
.
FC
<
NiceFormProps
>
=
props
=>
{
const
{
children
,
components
,
...
reset
}
=
props
;
const
customComponents
=
{
CustomUpload
,
CustomStatus
,
...
...
@@ -25,23 +30,19 @@ const NiceForm:React.FC<NiceFormProps> = (props) => {
Submit
,
Text
,
CardCheckBox
,
MultTable
}
MultTable
,
CustomRegistryPhone
,
};
const
defineComponents
=
Object
.
assign
(
customComponents
,
components
)
const
defineComponents
=
Object
.
assign
(
customComponents
,
components
)
;
return
(
<
SchemaForm
colon=
{
false
}
components=
{
defineComponents
}
{
...
reset
}
>
<
SchemaForm
colon=
{
false
}
components=
{
defineComponents
}
{
...
reset
}
>
{
children
}
</
SchemaForm
>
)
}
)
;
}
;
NiceForm
.
defaultProps
=
{};
NiceForm
.
defaultProps
=
{}
export
default
NiceForm
\ No newline at end of file
export
default
NiceForm
;
src/locales/zh-CN/menu.ts
View file @
19ac5d51
...
...
@@ -69,8 +69,11 @@ export default {
'menu.tranactionAbility'
:
'交易'
,
'menu.tranactionAbility.stockSellStorage'
:
'进销存'
,
'menu.tranactionAbility.stockSellStorage.warehouse'
:
'仓库'
,
'menu.tranactionAbility.stockSellStorage.addWarehouse'
:
'新增仓库'
,
'menu.tranactionAbility.stockSellStorage.billsType'
:
'单据类型'
,
'menu.tranactionAbility.stockSellStorage.addBillsType'
:
'新增单据类型'
,
'menu.tranactionAbility.stockSellStorage.bills'
:
'单据'
,
'menu.tranactionAbility.stockSellStorage.addBills'
:
'新增单据'
,
'menu.tranactionAbility.stockSellStorage.inventory'
:
'库存'
,
//物流能力
...
...
src/pages/member/memberImport/addMember copy.tsx
deleted
100644 → 0
View file @
e820bf40
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Tabs
,
Badge
,
Button
,
Card
,
Row
,
Col
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PlusOutlined
,
MinusOutlined
,
ContainerOutlined
,
}
from
'@ant-design/icons'
;
import
styled
from
'styled-components'
;
import
{
Form
,
FormItem
,
FormButtonGroup
,
FormEffectHooks
,
createFormActions
,
InternalFieldList
as
FieldList
,
}
from
'@formily/antd'
;
import
{
Select
,
Input
,
DatePicker
,
Upload
}
from
'@formily/antd-components'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
style
from
'./index.less'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
TabPane
}
=
Tabs
;
const
actions
=
createFormActions
();
const
data
=
[];
const
addMember
:
React
.
FC
<
[]
>
=
()
=>
{
const
ref
=
useRef
({});
const
[
actived
,
setActived
]
=
useState
(
'0'
);
const
[
tabCount
,
setTabCount
]
=
useState
({
'1'
:
0
,
'2'
:
2
,
'3'
:
3
,
'4'
:
4
,
'5'
:
5
,
'6'
:
6
,
});
const
[
editable
,
setEditable
]
=
useState
(
true
);
const
selectList
:
any
=
[
{
label
:
''
,
// (
// <>
// <img src={ChinaImg} style={{ width: 24, height: 17 }} /> +86
// </>
// )
value
:
'1'
,
},
{
label
:
''
,
value
:
'2'
},
{
label
:
''
,
value
:
'3'
},
{
label
:
''
,
value
:
'4'
},
{
label
:
''
,
value
:
'5'
},
];
/* 会员类型、会员角色、会员等级、注册手机号选项 */
const
[
memberItems
,
setMemberItems
]
=
useState
<
any
>
({});
const
data
=
[
{
key
:
'1'
,
sn
:
'1'
,
roleName
:
'供应商'
,
status
:
'1'
,
operation
:
'申请注册'
,
useTime
:
'2020-05-12 08:08'
,
result
:
'无'
,
},
];
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'序号'
,
dataIndex
:
'sn'
,
align
:
'center'
,
key
:
'sn'
,
},
{
title
:
'操作角色'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
align
:
'center'
,
key
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
component
=
<
Badge
color=
"#FFC400"
text=
"待审核"
/>;
return
component
;
},
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
align
:
'center'
,
key
:
'operation'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'useTime'
,
align
:
'center'
,
key
:
'useTime'
,
},
{
title
:
'审核意见'
,
dataIndex
:
'result'
,
align
:
'center'
,
key
:
'result'
,
},
];
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
queryResult
=
data
.
find
(
v
=>
v
.
key
===
params
.
keywords
);
setTimeout
(()
=>
{
resolve
({
code
:
200
,
message
:
''
,
data
:
queryResult
?
[
queryResult
]
:
data
,
});
},
1000
);
});
};
const
handleSubmit
=
(
values
:
any
)
=>
{
console
.
log
(
values
);
};
// 处理数据
const
processData
=
(
data
:
any
)
=>
{
for
(
let
elem
of
data
)
{
elem
.
label
=
elem
.
text
;
elem
.
value
=
elem
.
id
;
}
};
useEffect
(()
=>
{
PublicApi
.
getMemberMaintenanceAddpageitems
().
then
(
res
=>
{
processData
(
res
.
data
.
memberLevels
);
processData
(
res
.
data
.
memberRoles
);
processData
(
res
.
data
.
memberTypes
);
setMemberItems
(
res
.
data
);
});
},
[
'memberItems'
]);
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
title=
{
<>
<
div
className=
{
style
.
headerTop
}
>
<
span
>
返回
</
span
>
<
span
>
新建会员
</
span
>
</
div
>
</>
}
extra=
{
<>
<
Button
className=
{
style
.
saveBtn
}
icon=
{
<
ContainerOutlined
/>
}
onClick=
{
()
=>
actions
.
submit
()
}
>
保存
</
Button
>
</>
}
>
<
Card
>
<
Tabs
tabBarGutter=
{
30
}
activeKey=
{
actived
}
onChange=
{
activeKey
=>
setActived
(
activeKey
)
}
>
<
TabPane
tab=
{
<
Badge
count=
{
tabCount
[
'1'
]
}
offset=
{
[
10
,
0
]
}
>
基本信息
</
Badge
>
}
key=
"-1"
>
<
Form
editable=
{
editable
}
labelCol=
{
3
}
wrapperCol=
{
10
}
labelAlign=
"left"
actions=
{
actions
}
onSubmit=
{
values
=>
console
.
log
(
values
)
}
>
<
FormItem
label=
"会员类型"
name=
"memberTypes"
dataSource=
{
memberItems
.
memberTypes
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员类型!'
}]
}
component=
{
Select
}
/>
<
FormItem
label=
"会员角色"
name=
"memberRoles"
dataSource=
{
memberItems
.
memberRoles
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员角色!'
}]
}
component=
{
Select
}
/>
<
FormItem
label=
"会员等级"
name=
"memberLevels"
dataSource=
{
memberItems
.
memberLevels
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员等级!'
}]
}
component=
{
Select
}
/>
<
FormItem
label=
{
<>
<
span
className=
{
style
.
required
}
>
*
</
span
>
注册手机号
</>
}
name=
"registry"
>
<
Row
gutter=
{
10
}
>
<
Col
span=
{
6
}
>
<
FormItem
itemStyle=
{
{
marginBottom
:
0
}
}
name=
"country"
dataSource=
{
memberItems
.
countryCodes
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员角色!'
}]
}
component=
{
Select
}
/>
</
Col
>
<
Col
span=
{
18
}
>
<
FormItem
name=
"phoneMobile"
itemStyle=
{
{
marginBottom
:
0
}
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员角色!'
}]
}
component=
{
Input
}
/>
</
Col
>
</
Row
>
</
FormItem
>
<
FormItem
label=
"注册邮箱"
name=
"memberEmail"
itemStyle=
{
{
marginBottom
:
0
}
}
component=
{
Input
}
/>
</
Form
>
</
TabPane
>
{
memberItems
.
groups
&&
memberItems
.
groups
.
map
((
item
:
any
,
index
:
string
)
=>
{
return
(
<
TabPane
tab=
{
<
Badge
count=
{
tabCount
[
'1'
]
}
offset=
{
[
10
,
0
]
}
>
{
item
.
groupName
}
</
Badge
>
}
key=
{
index
}
>
<
Form
editable=
{
editable
}
labelCol=
{
3
}
wrapperCol=
{
10
}
labelAlign=
"left"
actions=
{
actions
}
onSubmit=
{
values
=>
console
.
log
(
values
)
}
>
{
item
.
elements
.
map
((
items
:
any
,
indexs
:
string
)
=>
{
return
(
<
div
key=
{
indexs
}
>
{
items
.
fieldType
===
'String'
?
(
<
FormItem
itemStyle=
{
item
.
elements
.
length
-
1
===
+
indexs
?
{
marginBottom
:
0
}
:
{}
}
label=
{
items
.
fieldCNName
}
name=
{
items
.
fieldName
}
required=
{
items
.
fieldEmpty
===
0
}
// rules=
{
items
.
checkRules
}
component=
{
Input
}
key=
{
indexs
}
/>
)
:
(
<
FormItem
itemStyle=
{
item
.
elements
.
length
-
1
===
+
indexs
?
{
marginBottom
:
0
}
:
{}
}
label=
{
items
.
fieldCNName
}
name=
{
items
.
fieldName
}
listType=
"card"
required=
{
items
.
fieldEmpty
===
0
}
// rules=
{
items
.
checkRules
}
component=
{
Upload
}
key=
{
indexs
}
/>
)
}
</
div
>
);
})
}
</
Form
>
</
TabPane
>
);
})
}
{
/* <TabPane
tab={
<Badge count={tabCount['2']} offset={[10, 0]}>
渠道信息
</Badge>
}
key="2"
>
<Form
editable={editable}
labelCol={3}
wrapperCol={10}
labelAlign="left"
actions={actions}
>
<FormItem
label="渠道级别"
name="channelLevel"
children={<span>二级</span>}
/>
<FormItem
label="渠道类型"
name="channelType"
dataSource={[
{ value: 1, label: '企业会员' },
{ value: 2, label: '渠道会员' },
]}
rules={[{ required: true, message: '请选择渠道类型!' }]}
component={Select}
/>
<FormItem
label={
<>
<span className={style.required}>*</span>
代理地市
</>
}
name="lll"
itemStyle={{ marginBottom: 0 }}
>
<>
<FieldList
name="address"
initialValue={[{ username: '', age: '' }]}
>
{({ state, mutators }) => {
const onAdd = () => mutators.push();
return (
<div>
{state.value.map((item: any, index: number) => {
const onRemove = (index: number) => {
if (state.value.length > 1)
return mutators.remove(index);
};
return (
<Row gutter={16} key={index}>
<Col span={10}>
<FormItem
name={`address.${index}.province`}
dataSource={[{ value: 1, label: '广东省' }]}
rules={[
{
required: true,
message: '请选择代理省份!',
},
]}
placeholder={'-省-'}
component={Select}
/>
</Col>
<Col span={10}>
<FormItem
name={`address.${index}.city`}
dataSource={[{ value: 1, label: '广州市' }]}
rules={[
{
required: true,
message: '请选择代理城市!',
},
]}
placeholder={'-市-'}
component={Select}
/>
</Col>
<Col span={4}>
{state.value.length - 1 === index ? (
<div
className={style['btn']}
onClick={onAdd}
>
<PlusOutlined
className={style['btn-icon']}
/>
</div>
) : (
''
)}
{state.value.length > 1 ? (
<div
className={style['btn']}
onClick={onRemove.bind(null, index)}
>
<MinusOutlined
className={style['btn-icon']}
/>
</div>
) : (
''
)}
</Col>
</Row>
);
})}
</div>
);
}}
</FieldList>
</>
</FormItem>
<FormItem
label="渠道描述"
name="desc"
itemStyle={{ marginBottom: 0 }}
rules={[{ required: true, message: '请填写渠道描述!' }]}
component={Input.TextArea}
placeholder={'最长200个字符,100个汉字'}
/>
</Form>
</TabPane>
<TabPane
tab={
<Badge count={tabCount['3']} offset={[10, 0]}>
营业执照
</Badge>
}
key="3"
>
<Form
editable={editable}
labelAlign="left"
actions={actions}
onSubmit={values => handleSubmit(values)}
>
<Row gutter={20}>
<Col span={12}>
<FormItem
label="公司名称"
labelCol={{ span: 6 }}
name="companyName"
rules={[{ required: true, message: '请填写公司名称!' }]}
component={Input}
/>
<FormItem
label="企业类型"
name="companyType"
labelCol={{ span: 6 }}
dataSource={[
{ value: 1, label: '企业会员' },
{ value: 2, label: '渠道会员' },
]}
rules={[{ required: true, message: '请选择企业类型!' }]}
component={Select}
/>
<FormItem
label={
<>
<span className={style.required}>*</span>
住所
</>
}
name="domicile"
labelCol={{ span: 6 }}
itemStyle={{ marginBottom: 0 }}
>
<Row gutter={16}>
<Col span={8}>
<FormItem
name="province"
dataSource={[{ value: 1, label: '广东省' }]}
rules={[
{
required: true,
message: '请选择省份!',
},
]}
placeholder={'- 省 -'}
component={Select}
/>
</Col>
<Col span={8}>
<FormItem
name="city"
dataSource={[{ value: 1, label: '广州市' }]}
rules={[
{
required: true,
message: '请选择城市!',
},
]}
placeholder={'- 市 -'}
component={Select}
/>
</Col>
<Col span={8}>
<FormItem
name="county"
dataSource={[{ value: 1, label: '海珠区' }]}
rules={[
{
required: true,
message: '请选择县/区!',
},
]}
placeholder={'- 县/区 -'}
component={Select}
/>
</Col>
</Row>
</FormItem>
<FormItem
label="法定代表人"
labelCol={{ span: 6 }}
name="legal"
rules={[{ required: true, message: '请填写法定代表人!' }]}
component={Input}
/>
<FormItem
label="成立日期"
labelCol={{ span: 6 }}
name="eDate"
rules={[{ required: true, message: '请选择成立日期!' }]}
component={DatePicker}
/>
<FormItem
label="营业期限"
labelCol={{ span: 6 }}
name="business"
rules={[{ required: true, message: '请选择营业期限!' }]}
component={DatePicker.RangePicker}
/>
<FormItem
label="经营范围"
name="businessScope"
labelCol={{ span: 6 }}
itemStyle={{ marginBottom: 0 }}
rules={[{ required: true, message: '请填写经营范围!' }]}
component={Input.TextArea}
placeholder={'最长200个字符,100个汉字'}
/>
</Col>
<Col span={12}>
<FormItem
label="登记机关"
labelCol={{ span: 6 }}
name="registration"
rules={[{ required: true, message: '请填写登记机关!' }]}
component={Input}
/>
<FormItem
label="登记日期"
labelCol={{ span: 6 }}
name="eDate"
rules={[{ required: true, message: '请选择日期!' }]}
component={DatePicker}
/>
<FormItem
label="统一社会信用代码"
labelCol={{ span: 6 }}
name="code"
rules={[{ required: true, message: '请填写社会信用代码!' }]}
component={Input}
/>
<FormItem
label="营业执照"
labelCol={{ span: 6 }}
name="img"
action={''}
showUploadList={{
showRemoveIcon: false,
}}
listType="card"
rules={[{ required: true, message: '请上传营业执照!' }]}
help="支持JPG/PNG/JPEG,最大不超过 200K"
component={Upload}
/>
</Col>
</Row>
</Form>
</TabPane>
<TabPane
tab={
<Badge count={tabCount['4']} offset={[10, 0]}>
法定代表人
</Badge>
}
key="4"
>
<Form
editable={editable}
labelCol={3}
wrapperCol={10}
labelAlign="left"
actions={actions}
>
<FormItem
label="公司名称"
name="companyName"
rules={[{ required: true, message: '请填写公司名称!' }]}
component={Input}
/>
<FormItem
label={
<>
<span className={style.required}>*</span>
法人手机号
</>
}
name="registry"
>
<Row gutter={10}>
<Col span={6}>
<FormItem
itemStyle={{ marginBottom: 0 }}
name="country"
dataSource={selectList}
initialValue={''}
rules={[{ required: true, message: '请选择会员角色!' }]}
component={Select}
/>
</Col>
<Col span={18}>
<FormItem
name="phoneMobile"
itemStyle={{ marginBottom: 0 }}
rules={[{ required: true, message: '请选择会员角色!' }]}
component={Input}
/>
</Col>
</Row>
</FormItem>
<FormItem
label="法人身份证号"
name="idCard"
rules={[{ required: true, message: '请填写法人身份证号!' }]}
component={Input}
/>
<FormItem
label={
<>
<span className={style.required}>*</span>
法人身份证信息
</>
}
name="idCardInfo"
itemStyle={{ marginBottom: 0 }}
help="支持JPG/PNG/JPEG,最大不超过 200K"
>
<Row gutter={10}>
<Col span={12}>
<FormItem
itemStyle={{ marginBottom: 0 }}
name="front"
listType="card"
rules={[{ required: true, message: '请上传营业执照!' }]}
component={Upload}
/>
</Col>
<Col span={12}>
<FormItem
itemStyle={{ marginBottom: 0 }}
name="reverse"
listType="card"
rules={[{ required: true, message: '请上传营业执照!' }]}
component={Upload}
/>
</Col>
</Row>
</FormItem>
</Form>
</TabPane>
<TabPane
tab={
<Badge count={tabCount['5']} offset={[10, 0]}>
联系信息
</Badge>
}
key="5"
>
<Form
editable={editable}
labelCol={3}
wrapperCol={10}
labelAlign="left"
actions={actions}
>
<FormItem
label="联系人"
name="people"
rules={[{ required: true, message: '请填写联系人!' }]}
component={Input}
/>
<FormItem
label={
<>
<span className={style.required}>*</span>
固定联系电话
</>
}
name="telphone"
>
<Row gutter={10}>
<Col span={6}>
<FormItem
name="areaCode"
itemStyle={{ marginBottom: 0 }}
placeholder={'区号'}
component={Input}
/>
</Col>
<Col span={18}>
<FormItem
name="phone"
itemStyle={{ marginBottom: 0 }}
component={Input}
/>
</Col>
</Row>
</FormItem>
<FormItem
label={
<>
<span className={style.required}>*</span>
手机号码
</>
}
name="telphone"
>
<Row gutter={10}>
<Col span={6}>
<FormItem
itemStyle={{ marginBottom: 0 }}
name="ret"
dataSource={selectList}
initialValue={''}
rules={[{ required: true, message: '请选择会员角色!' }]}
component={Select}
/>
</Col>
<Col span={18}>
<FormItem
name="iji"
itemStyle={{ marginBottom: 0 }}
rules={[{ required: true, message: '请选择会员角色!' }]}
component={Input}
/>
</Col>
</Row>
</FormItem>
<FormItem label="传真号码" name="sdf" component={Input} />
<FormItem
label={
<>
<span className={style.required}>*</span>
住所
</>
}
name="domicile"
itemStyle={{ marginBottom: 0 }}
>
<Row gutter={16}>
<Col span={8}>
<FormItem
name="province"
dataSource={[{ value: 1, label: '广东省' }]}
rules={[
{
required: true,
message: '请选择省份!',
},
]}
placeholder={'- 省 -'}
component={Select}
/>
</Col>
<Col span={8}>
<FormItem
name="city"
dataSource={[{ value: 1, label: '广州市' }]}
rules={[
{
required: true,
message: '请选择城市!',
},
]}
placeholder={'- 市 -'}
component={Select}
/>
</Col>
<Col span={8}>
<FormItem
name="county"
dataSource={[{ value: 1, label: '海珠区' }]}
rules={[
{
required: true,
message: '请选择县/区!',
},
]}
placeholder={'- 县/区 -'}
component={Select}
/>
</Col>
<Col span={24}>
<FormItem
name="businessScope"
rules={[{ required: true, message: '请填写经营范围!' }]}
component={Input.TextArea}
placeholder={'输入你的详细地址'}
/>
</Col>
</Row>
</FormItem>
<FormItem
label="邮编"
name="postcode"
rules={[{ required: true, message: '请选择会员角色!' }]}
component={Input}
/>
<FormItem label="网址" name="link" component={Input} />
<FormItem label="邮箱" name="email" component={Input} />
</Form>
</TabPane>
<TabPane tab="流转记录" key="6">
<div style={{ marginBottom: '16px' }}>
<StandardTable
tableProps={{
pagination: false,
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
/>
</div> */
}
{
/* </TabPane> */
}
</
Tabs
>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
addMember
;
src/pages/member/memberImport/addMember.tsx
View file @
19ac5d51
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Tabs
,
Badge
,
Button
,
Card
,
Row
,
Col
,
message
}
from
'antd'
;
import
{
Tabs
,
Badge
,
Button
,
Card
,
Row
,
Col
,
message
,
Upload
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
ContainerOutlined
}
from
'@ant-design/icons'
;
import
{
Form
,
FormItem
,
createFormActions
}
from
'@formily/antd'
;
import
{
Select
,
Input
,
Upload
}
from
'@formily/antd-components'
;
import
{
ContainerOutlined
,
PlusOutlined
,
SaveOutlined
,
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
IFormFilter
,
IButtonFilter
,
}
from
'god/dist/src/standard-table/TableController'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
styles
from
'./index.less'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
initDetailSchema
}
from
'./schema'
;
import
style
from
'./index.less'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
TabPane
}
=
Tabs
;
const
a
ctions
=
createFormActions
();
const
a
ddSchemaAction
=
createFormActions
();
const
addMember
:
React
.
FC
<
any
>
=
props
=>
{
const
ref
=
useRef
({});
const
[
actived
,
setActived
]
=
useState
(
'-1'
);
const
[
editable
,
setEditable
]
=
useState
(
props
.
location
.
query
.
type
!=
'check'
,
);
const
selectList
:
any
=
[
{
label
:
''
,
...
...
@@ -30,15 +38,10 @@ const addMember: React.FC<any> = props => {
// )
value
:
'1'
,
},
{
label
:
''
,
value
:
'2'
},
{
label
:
''
,
value
:
'3'
},
{
label
:
''
,
value
:
'4'
},
{
label
:
''
,
value
:
'5'
},
];
/* 会员类型、会员角色、会员等级、注册手机号选项 */
const
[
memberItems
,
setMemberItems
]
=
useState
<
any
>
({});
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
data
=
[
{
...
...
@@ -146,181 +149,34 @@ const addMember: React.FC<any> = props => {
return
isJpgOrPng
&&
isLt2M
;
};
const
handleChange
=
(
items
:
any
,
file
:
any
)
=>
{
for
(
let
elem
of
file
)
{
elem
.
url
=
elem
.
data
;
}
};
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
<>
<
div
className=
{
style
.
headerTop
}
>
<
span
>
返回
</
span
>
<
span
>
{
props
.
location
.
query
.
type
===
'add'
?
'新建会员'
:
props
.
location
.
query
.
type
===
'change'
?
'编辑会员'
:
'查看会员'
}
</
span
>
</
div
>
</>
}
extra=
{
<>
<
Button
className=
{
style
.
saveBtn
}
icon=
{
<
ContainerOutlined
/>
}
onClick=
{
()
=>
actions
.
submit
()
}
>
保存
</
Button
>
</>
props
.
location
.
query
.
type
===
'add'
?
'新建会员'
:
props
.
location
.
query
.
type
===
'change'
?
'编辑会员'
:
'查看会员'
}
extra=
{
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
>
保存
</
Button
>,
]
}
>
<
Card
>
<
Form
editable=
{
editable
}
labelCol=
{
3
}
wrapperCol=
{
10
}
labelAlign=
"left"
actions=
{
actions
}
>
<
Tabs
tabBarGutter=
{
30
}
activeKey=
{
actived
}
onChange=
{
activeKey
=>
setActived
(
activeKey
)
}
>
<
TabPane
tab=
{
// <Badge count=
{
tabCount
[
'1'
]}
offset
=
{[
10
,
0
]}
>
'基本信息'
// </Badge>
}
key=
"-1"
>
<
FormItem
label=
"会员类型"
name=
"memberTypes"
dataSource=
{
memberItems
.
memberTypes
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员类型!'
}]
}
component=
{
Select
}
/>
<
FormItem
label=
"会员角色"
name=
"memberRoles"
dataSource=
{
memberItems
.
memberRoles
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员角色!'
}]
}
component=
{
Select
}
/>
<
FormItem
label=
"会员等级"
name=
"memberLevels"
dataSource=
{
memberItems
.
memberLevels
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员等级!'
}]
}
component=
{
Select
}
/>
<
FormItem
label=
{
<>
<
span
className=
{
style
.
required
}
>
*
</
span
>
注册手机号
</>
}
name=
"registry"
>
<
Row
gutter=
{
10
}
>
<
Col
span=
{
6
}
>
<
FormItem
itemStyle=
{
{
marginBottom
:
0
}
}
name=
"country"
dataSource=
{
memberItems
.
countryCodes
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员角色!'
}]
}
component=
{
Select
}
/>
</
Col
>
<
Col
span=
{
18
}
>
<
FormItem
name=
"phoneMobile"
itemStyle=
{
{
marginBottom
:
0
}
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员角色!'
}]
}
component=
{
Input
}
/>
</
Col
>
</
Row
>
</
FormItem
>
<
FormItem
label=
"注册邮箱"
name=
"memberEmail"
itemStyle=
{
{
marginBottom
:
0
}
}
component=
{
Input
}
/>
</
TabPane
>
{
memberItems
.
groups
&&
memberItems
.
groups
.
map
((
item
:
any
,
index
:
number
)
=>
{
return
(
<
TabPane
tab=
{
// <Badge count=
{
tabCount
[
'1'
]}
offset
=
{[
10
,
0
]}
>
item
.
groupName
// </Badge>
}
key=
{
index
}
>
{
item
.
elements
.
map
((
items
:
any
,
indexs
:
number
)
=>
{
return
(
<
div
key=
{
indexs
}
>
{
items
.
fieldType
===
'String'
?
(
<
FormItem
itemStyle=
{
item
.
elements
.
length
-
1
===
indexs
?
{
marginBottom
:
0
}
:
{}
}
label=
{
items
.
fieldCNName
}
name=
{
items
.
fieldName
}
required=
{
items
.
fieldEmpty
===
0
}
// rules=
{
items
.
checkRules
}
component=
{
Input
}
key=
{
indexs
}
/>
)
:
(
<
FormItem
itemStyle=
{
item
.
elements
.
length
-
1
===
indexs
?
{
marginBottom
:
0
}
:
{}
}
label=
{
items
.
fieldCNName
}
name=
{
items
.
fieldName
}
action=
"/api/file/file/upload"
listType=
"picture-card"
required=
{
items
.
fieldEmpty
===
0
}
// rules=
{
items
.
checkRules
}
data=
{
{
fileType
:
2
}
}
beforeUpload=
{
beforeUpload
}
onChange=
{
(
file
:
any
)
=>
handleChange
(
items
,
file
)
}
showUploadList=
{
{
showRemoveIcon
:
items
.
value
&&
items
.
value
.
length
>
0
,
}
}
key=
{
indexs
}
component=
{
Upload
}
/>
)
}
</
div
>
);
})
}
</
TabPane
>
);
})
}
</
Tabs
>
</
Form
>
<
NiceForm
onSubmit=
{
handleSubmit
}
actions=
{
addSchemaAction
}
schema=
{
initDetailSchema
(
memberItems
)
}
/>
</
Card
>
</
PageHeaderWrapper
>
);
...
...
src/pages/
transaction/stockSellStorage/warehouse
/schema/index.tsx
→
src/pages/
member/memberImport
/schema/index.tsx
View file @
19ac5d51
import
React
from
'react'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
Button
}
from
'antd'
;
export
const
reposit
Schema
:
ISchema
=
{
export
const
maintian
Schema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
...
...
@@ -16,169 +14,197 @@ export const repositSchema: ISchema = {
'x-component'
:
'Search'
,
'x-mega-props'
:
{},
'x-component-props'
:
{
placeholder
:
'
搜索
'
,
placeholder
:
'
请输入仓位名称
'
,
},
},
},
},
},
};
export
const
repositDetailSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
REPOSIT_TABS
:
{
type
:
'object'
,
'x-component'
:
'tab'
,
'x-component-props'
:
{
type
:
'card'
,
},
properties
:
{
'tab-1'
:
{
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component'
:
'mega-layout'
,
visible
:
false
,
'x-component-props'
:
{
tab
:
'基本信息'
,
inline
:
true
,
},
properties
:
{
MEGA_LAYOUT1
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
productName
:
{
type
:
'string'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
8
,
labelAlign
:
'left'
,
placeholder
:
'商品名称'
,
},
properties
:
{
name
:
{
type
:
'string'
,
required
:
true
,
title
:
'仓位名称'
,
'x-component-props'
:
{
placeholder
:
'建议名称:商品名称+商城名称+渠道描述'
,
},
},
productName
:
{
type
:
'string'
,
title
:
'商品名称'
,
required
:
true
,
},
warehouseId
:
{
type
:
'string'
,
title
:
'仓库名称'
,
enum
:
[],
},
productId
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'商品ID'
,
},
},
category
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请选择品类'
,
},
enum
:
[],
},
brand
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请选择品牌'
,
},
enum
:
[],
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
const
registryPhone
=
<></>;
const
getCompnentValue
=
(
elements
:
any
)
=>
{
let
components
=
{};
for
(
let
item
of
elements
)
{
let
xComponentProps
=
item
.
fieldType
===
'string'
?
{
placeholder
:
item
.
fieldRemark
,
}
:
{
listType
:
'card'
,
action
:
'/api/file/file/upload'
,
data
:
{
fileType
:
2
},
};
components
[
item
.
fieldName
]
=
{
type
:
item
.
fieldType
,
required
:
item
.
fieldEmpty
===
0
,
title
:
item
.
fieldCNName
,
'x-component-props'
:
xComponentProps
,
};
}
return
components
;
};
export
const
initDetailSchema
=
(
props
:
any
)
=>
{
let
tabSchema
=
{
properties
:
{
'tab-1'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
'基本信息'
,
},
properties
:
{
MEGA_LAYOUT1
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
8
,
labelAlign
:
'left'
,
},
properties
:
{
memberTypes
:
{
type
:
'string'
,
required
:
true
,
title
:
'会员类型'
,
enum
:
props
.
memberTypes
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
itemNo
:
{
type
:
'string'
,
'x-component'
:
'Text'
,
title
:
'对应货品'
,
default
:
'暂无'
,
},
memberRoles
:
{
type
:
'string'
,
required
:
true
,
title
:
'会员角色'
,
enum
:
props
.
memberRoles
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
inventory
:
{
type
:
'number'
,
'x-component'
:
'CustomSlider
'
,
required
:
true
,
'x-component-props'
:
{
min
:
0
,
max
:
200
,
},
title
:
'分配仓位库存
'
,
},
memberLevels
:
{
type
:
'string
'
,
required
:
true
,
title
:
'会员等级'
,
enum
:
[{
label
:
'1'
,
value
:
1
}]
,
// enum: props.memberLevels
,
'x-component-props'
:
{
placeholder
:
'请选择
'
,
},
inventoryDeductWay
:
{
type
:
'radio'
,
title
:
'库存扣减方式'
,
required
:
true
,
enum
:
[
},
memberPhone
:
{
type
:
'object'
,
required
:
true
,
title
:
'注册手机'
,
'x-component'
:
'CustomRegistryPhone'
,
'x-component-props'
:
{
dataSource
:
[
{
label
:
'按仓位随机扣减'
,
value
:
1
,
text
:
'+86'
,
id
:
1
,
url
:
require
(
'../../../../../public/static/imgs/level1@2x.png'
),
},
{
label
:
'按仓库位置远近扣除'
,
value
:
2
,
text
:
'+126'
,
id
:
2
,
url
:
require
(
'../../../../../public/static/imgs/level2@2x.png'
),
},
],
default
:
1
,
selectPh
:
'请选择'
,
inputPh
:
'请输入你的手机号码'
,
},
},
memberEmail
:
{
type
:
'string'
,
title
:
'邮箱'
,
'x-component-props'
:
{},
},
},
},
},
'tab-2'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
'适用商城'
,
},
},
},
};
properties
:
{
MEGA_LAYOUT2
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
labelAlign
:
'left'
,
},
properties
:
{
shopIds
:
{
type
:
'array:number'
,
'x-component'
:
'CardCheckBox'
,
'x-component-props'
:
{
dataSource
:
[
{
logo
:
''
,
title
:
'会员'
,
id
:
1
},
{
logo
:
''
,
title
:
'小程序'
,
id
:
2
},
{
logo
:
''
,
title
:
'H5'
,
id
:
3
},
{
logo
:
''
,
title
:
'渠道'
,
id
:
4
},
],
},
title
:
'适用商城'
,
required
:
true
,
},
},
},
},
if
(
Object
.
keys
(
props
).
length
>
0
)
{
for
(
let
[
index
,
item
]
of
props
.
groups
.
entries
())
{
tabSchema
.
properties
[
`tab-
${
index
+
2
}
`
]
=
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
item
.
groupName
,
},
'tab-3'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
'适用会员'
,
},
properties
:
{
MEGA_LAYOUT3
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
labelAlign
:
'left'
,
},
properties
:
{
isAllMemberShare
:
{
type
:
'radio'
,
enum
:
[
{
label
:
'所有会员共享(默认)'
,
value
:
1
},
{
label
:
'指定会员'
,
value
:
0
},
],
title
:
'选择渠道会员'
,
default
:
1
,
required
:
true
,
},
applyMember
:
{
type
:
'array:number'
,
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
columns
:
'{{tableColumns}}'
,
},
default
:
[
{
id
:
1
,
name
:
'名称'
,
type
:
'类型'
},
{
id
:
2
,
name
:
'名称1'
,
type
:
'类型1'
},
],
},
},
properties
:
{
[
`MEGA_LAYOUT
${
index
+
2
}
`
]:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
8
,
labelAlign
:
'left'
,
},
properties
:
getCompnentValue
(
item
.
elements
),
},
},
};
}
}
let
detailSchema
=
{
type
:
'object'
,
properties
:
{
REPOSIT_TABS
:
{
type
:
'object'
,
'x-component'
:
'tab'
,
'x-component-props'
:
{},
...
tabSchema
,
},
},
},
};
const
maintianDetailSchema
:
ISchema
=
detailSchema
;
return
maintianDetailSchema
;
};
src/pages/transaction/stockSellStorage/bills/addBills.tsx
0 → 100644
View file @
19ac5d51
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
Button
,
Card
}
from
'antd'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
FormMegaLayout
,
}
from
'@formily/antd'
;
import
{
Input
,
Select
}
from
'@formily/antd-components'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
addSchemaAction
=
createFormActions
();
const
AddBills
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
({});
const
handleSubmit
=
value
=>
{
console
.
log
(
value
);
};
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
usePageStatus
().
pageStatus
===
0
?
'新建单据'
:
usePageStatus
().
pageStatus
===
1
?
'编辑单据'
:
'查看单据'
}
extra=
{
usePageStatus
().
preview
!=
'1'
?
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
>
保存
</
Button
>,
]
:
[]
}
>
<
Card
>
<
SchemaForm
editable=
{
usePageStatus
().
preview
!=
'1'
}
actions=
{
addSchemaAction
}
components=
{
{
Input
,
Select
}
}
onSubmit=
{
value
=>
handleSubmit
(
value
)
}
>
<
FormMegaLayout
labelCol=
{
4
}
labelAlign=
"left"
wrapperCol=
{
12
}
>
<
Field
name=
"name"
title=
"单据编号"
x
-
component=
"Input"
x
-
component
-
props=
{
{
placeholder
:
'最长10个字符'
,
maxLength
:
10
,
}
}
required
/>
<
Field
name=
"name1"
title=
"单据名称"
x
-
component=
"Input"
x
-
component
-
props=
{
{
placeholder
:
'最长20个字符,10个汉字'
,
maxLength
:
10
,
}
}
required
/>
<
Field
name=
"countryCode"
title=
"仓库负责人"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'请选择'
}
}
/>
</
FormMegaLayout
>
</
SchemaForm
>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
AddBills
;
src/pages/transaction/stockSellStorage/bills/index.tsx
View file @
19ac5d51
...
...
@@ -81,7 +81,14 @@ const Bills: React.FC<{}> = () => {
const
handleBatchDel
=
(
e
:
any
)
=>
{};
const
handleMoreMenu
=
(
e
:
any
)
=>
{};
const
handleMoreMenu
=
(
e
:
any
)
=>
{
if
(
e
.
key
===
'1'
)
{
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/addBills?id=
${
''
}
`
,
);
}
// console.log(e);
};
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -91,7 +98,7 @@ const Bills: React.FC<{}> = () => {
key
:
'no'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/
repositories/viewRepository
?id=${record.key}&preview=1`
}
url=
{
`/
memberCenter/tranactionAbility/stockSellStorage/addBills
?id=${record.key}&preview=1`
}
>
{
text
}
</
EyePreview
>
...
...
@@ -192,8 +199,12 @@ const Bills: React.FC<{}> = () => {
<
Space
>
<
Button
type=
"primary"
onClick=
{
handleAdd
}
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/tranactionAbility/stockSellStorage/addBills'
,
)
}
>
新建
</
Button
>
...
...
src/pages/transaction/stockSellStorage/billsType/addBillsType.tsx
0 → 100644
View file @
19ac5d51
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
Button
,
Card
}
from
'antd'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
FormMegaLayout
,
}
from
'@formily/antd'
;
import
{
Input
,
Select
}
from
'@formily/antd-components'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
addSchemaAction
=
createFormActions
();
const
AddWarehouse
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
({});
const
handleSubmit
=
value
=>
{
console
.
log
(
value
);
};
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
usePageStatus
().
pageStatus
===
0
?
'新建单据类型'
:
usePageStatus
().
pageStatus
===
1
?
'编辑单据类型'
:
'查看单据类型'
}
extra=
{
usePageStatus
().
preview
!=
'1'
?
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
>
保存
</
Button
>,
]
:
[]
}
>
<
Card
>
<
SchemaForm
editable=
{
usePageStatus
().
preview
!=
'1'
}
actions=
{
addSchemaAction
}
components=
{
{
Input
,
Select
}
}
onSubmit=
{
value
=>
handleSubmit
(
value
)
}
>
<
FormMegaLayout
labelCol=
{
4
}
labelAlign=
"left"
wrapperCol=
{
12
}
>
<
Field
name=
"name"
title=
"单据类型编号"
x
-
component=
"Input"
x
-
component
-
props=
{
{
placeholder
:
'最长10个字符'
,
maxLength
:
10
,
}
}
required
/>
<
Field
name=
"name1"
title=
"单据类型名称"
x
-
component=
"Input"
x
-
component
-
props=
{
{
placeholder
:
'最长20个字符,10个汉字'
,
maxLength
:
10
,
}
}
required
/>
<
Field
name=
"countryCode"
title=
"仓库负责人"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'请选择'
}
}
/>
</
FormMegaLayout
>
</
SchemaForm
>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
AddWarehouse
;
src/pages/transaction/stockSellStorage/billsType/index.tsx
View file @
19ac5d51
...
...
@@ -13,10 +13,11 @@ import {
}
from
'antd'
;
import
{
PlusOutlined
,
EyeOutlined
,
PlayCircleOutlined
,
PauseCircleOutlined
,
}
from
'@ant-design/icons'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
style
from
'./index.less'
;
...
...
@@ -28,7 +29,7 @@ const data = [
no
:
'DJ001'
,
name
:
'进货入库单'
,
direction
:
1
,
stat
us
:
1
,
stat
e
:
1
,
},
{
key
:
'2'
,
...
...
@@ -36,7 +37,7 @@ const data = [
no
:
'DJ002'
,
name
:
'退货入库单'
,
direction
:
2
,
stat
us
:
2
,
stat
e
:
2
,
},
];
...
...
@@ -64,10 +65,11 @@ const billsType: React.FC<{}> = () => {
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
span
className=
"commonPickColor"
onClick=
{
()
=>
history
.
push
(
''
)
}
>
{
text
}
<
EyeOutlined
/>
</
span
>
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/stockSellStorage/addBillsType?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
);
},
},
...
...
@@ -93,31 +95,10 @@ const billsType: React.FC<{}> = () => {
sorter
:
true
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
console
.
log
(
'...'
)
}
onCancel=
{
()
=>
console
.
log
(
'...'
)
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
onClick=
{
()
=>
console
.
log
(
'???'
)
}
style=
{
record
.
status
===
1
?
{
color
:
'#00B37A'
}
:
{
color
:
'red'
}
}
>
{
record
.
status
===
1
?
(
<>
有效
<
PlayCircleOutlined
/>
</>
)
:
(
<>
无效
<
PauseCircleOutlined
/>
</>
)
}
</
Button
>
</
Popconfirm
>
<
StatusSwitch
handleConfirm=
{
()
=>
handleModify
(
record
)
}
record=
{
record
}
/>
);
},
},
...
...
@@ -125,9 +106,16 @@ const billsType: React.FC<{}> = () => {
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
record
=>
history
.
push
(
''
)
}
>
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/addBillsType?id=${record.id}`
,
)
}
>
编辑
</
Button
>
<
Popconfirm
...
...
@@ -160,6 +148,11 @@ const billsType: React.FC<{}> = () => {
const
handleReset
=
()
=>
{};
const
handleModify
=
(
record
:
object
)
=>
{
// 通过传入的params字符串判断是修改那种类型的数据
console
.
log
(
'执行状态修改'
,
record
);
};
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -176,7 +169,7 @@ const billsType: React.FC<{}> = () => {
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/
memberAbility/manage/addMember?type=add
'
,
'/memberCenter/
tranactionAbility/stockSellStorage/addBillsType
'
,
)
}
>
...
...
src/pages/transaction/stockSellStorage/warehouse/addWarehouse.tsx
0 → 100644
View file @
19ac5d51
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
Button
,
Card
}
from
'antd'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
FormMegaLayout
,
}
from
'@formily/antd'
;
import
{
Input
,
Select
}
from
'@formily/antd-components'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
addSchemaAction
=
createFormActions
();
const
AddWarehouse
:
React
.
FC
<
{}
>
=
(
props
:
any
)
=>
{
const
ref
=
useRef
({});
const
handleSubmit
=
value
=>
{
console
.
log
(
value
);
};
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
usePageStatus
().
pageStatus
===
0
?
'新建仓库'
:
usePageStatus
().
pageStatus
===
1
?
'编辑仓库'
:
'查看仓库'
}
extra=
{
usePageStatus
().
preview
!=
'1'
?
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
>
保存
</
Button
>,
]
:
[]
}
>
<
Card
>
<
SchemaForm
editable=
{
usePageStatus
().
preview
!=
'1'
}
actions=
{
addSchemaAction
}
components=
{
{
Input
,
Select
,
Textarea
:
Input
.
TextArea
}
}
onSubmit=
{
value
=>
handleSubmit
(
value
)
}
>
<
FormMegaLayout
labelCol=
{
4
}
labelAlign=
"left"
wrapperCol=
{
12
}
>
<
Field
name=
"name"
title=
"仓库名称"
x
-
component=
"Input"
required
/>
<
FormMegaLayout
label=
"仓库地址"
wrapperCol=
{
24
}
required
>
<
FormMegaLayout
grid
full
autoRow
columns=
{
3
}
>
<
Field
name=
"province"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'- 省 -'
,
}
}
required
/>
<
Field
name=
"city"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'- 市 -'
,
}
}
required
/>
<
Field
name=
"county"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'- 县/区 -'
,
}
}
required
/>
</
FormMegaLayout
>
<
Field
name=
"address"
x
-
component=
"Textarea"
x
-
component
-
props=
{
{
placeholder
:
'请输入详细地址(最长50个字符,25个汉字)'
,
rules
:
[{
message
:
'请输入详细地址'
}],
}
}
required
/>
</
FormMegaLayout
>
<
Field
name=
"person"
title=
"仓库负责人"
x
-
component=
"Input"
/>
<
FormMegaLayout
label=
"联系电话"
grid
full
wrapperCol=
{
24
}
>
<
Field
name=
"countryCode"
enum=
{
[
'1'
,
'2'
,
'3'
,
'4'
]
}
x
-
component=
"Select"
x
-
component
-
props=
{
{
placeholder
:
'请选择'
}
}
/>
<
Field
x
-
mega
-
props=
{
{
span
:
3
}
}
name=
"phoneMobile"
x
-
component=
"Input"
x
-
component
-
props=
{
{
placeholder
:
'请输入你的手机号码'
}
}
/>
</
FormMegaLayout
>
</
FormMegaLayout
>
</
SchemaForm
>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
AddWarehouse
;
src/pages/transaction/stockSellStorage/warehouse/index.tsx
View file @
19ac5d51
...
...
@@ -11,12 +11,9 @@ import {
Space
,
Popconfirm
,
}
from
'antd'
;
import
{
PlusOutlined
,
EyeOutlined
,
PlayCircleOutlined
,
PauseCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
{
StandardTable
}
from
'god'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
style
from
'./index.less'
;
...
...
@@ -29,7 +26,7 @@ const data = [
address
:
'广东省广州市海珠区新港东路1068号中洲中心北塔6楼'
,
person
:
'蒯美政'
,
phoneMobile
:
'185 2929 5432'
,
stat
us
:
1
,
stat
e
:
1
,
},
{
key
:
'2'
,
...
...
@@ -38,7 +35,7 @@ const data = [
address
:
'广东省广州市海珠区新港东路1068号中洲中心北塔6楼'
,
person
:
'蒯美政'
,
phoneMobile
:
'185 2929 5432'
,
stat
us
:
2
,
stat
e
:
2
,
},
];
...
...
@@ -74,10 +71,11 @@ const WareHouse: React.FC<{}> = () => {
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
span
className=
"commonPickColor"
onClick=
{
()
=>
history
.
push
(
''
)
}
>
{
text
}
<
EyeOutlined
/>
</
span
>
<
EyePreview
url=
{
`/memberCenter/tranactionAbility/stockSellStorage/addWarehouse?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
);
},
},
...
...
@@ -107,31 +105,10 @@ const WareHouse: React.FC<{}> = () => {
sorter
:
true
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
console
.
log
(
'...'
)
}
onCancel=
{
()
=>
console
.
log
(
'...'
)
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
onClick=
{
()
=>
console
.
log
(
'???'
)
}
style=
{
record
.
status
===
1
?
{
color
:
'#00B37A'
}
:
{
color
:
'red'
}
}
>
{
record
.
status
===
1
?
(
<>
有效
<
PlayCircleOutlined
/>
</>
)
:
(
<>
无效
<
PauseCircleOutlined
/>
</>
)
}
</
Button
>
</
Popconfirm
>
<
StatusSwitch
handleConfirm=
{
()
=>
handleModify
(
record
)
}
record=
{
record
}
/>
);
},
},
...
...
@@ -139,9 +116,16 @@ const WareHouse: React.FC<{}> = () => {
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
record
=>
history
.
push
(
''
)
}
>
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/tranactionAbility/stockSellStorage/addWarehouse?id=${record.id}`
,
)
}
>
编辑
</
Button
>
<
Popconfirm
...
...
@@ -160,6 +144,11 @@ const WareHouse: React.FC<{}> = () => {
const
handleReset
=
()
=>
{};
const
handleModify
=
(
record
:
object
)
=>
{
// 通过传入的params字符串判断是修改那种类型的数据
console
.
log
(
'执行状态修改'
,
record
);
};
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -175,9 +164,13 @@ const WareHouse: React.FC<{}> = () => {
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/memberAbility/manage/addMember?type=add'
,
)
history
.
push
({
pathname
:
'/memberCenter/tranactionAbility/stockSellStorage/addWarehouse'
,
query
:
{
type
:
'add'
,
},
})
}
>
<
PlusOutlined
/>
...
...
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