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
linweijiong
jinfa-platform
Commits
0ab24077
Commit
0ab24077
authored
Jul 24, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3c025c35
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
662 additions
and
118 deletions
+662
-118
base.config.json
config/base.config.json
+1
-1
index.tsx
src/components/CustomTabs/index.tsx
+2
-2
index.less
src/components/MediaLibrary/index.less
+51
-0
index.tsx
src/components/MediaLibrary/index.tsx
+207
-0
global.d.ts
src/global/config/global.d.ts
+1
-1
addProducts.tsx
src/pages/commodity/products/addProducts.tsx
+297
-93
index.tsx
src/pages/commodity/products/index.tsx
+12
-1
viewProducts.tsx
src/pages/commodity/products/viewProducts.tsx
+91
-20
index.ts
src/services/index.ts
+0
-0
No files found.
config/base.config.json
View file @
0ab24077
{
"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"
:
"游戏"
}]},
"useDetail"
:[{
"groupName"
:
"联系信息"
,
"elements"
:[{
"id"
:
62
,
"fieldName"
:
"contact"
,
"fieldCNName"
:
"联系人"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
63
,
"fieldName"
:
"fixed_contact_number"
,
"fieldCNName"
:
"固定联系电话"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
64
,
"fieldName"
:
"phone_number"
,
"fieldCNName"
:
"手机号码"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
65
,
"fieldName"
:
"fax_number"
,
"fieldCNName"
:
"传真号码"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
66
,
"fieldName"
:
"address"
,
"fieldCNName"
:
"地址"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
67
,
"fieldName"
:
"zip_code"
,
"fieldCNName"
:
"邮编"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
68
,
"fieldName"
:
"url"
,
"fieldCNName"
:
"网址"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
69
,
"fieldName"
:
"email"
,
"fieldCNName"
:
"邮箱"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"营业执照信息"
,
"elements"
:[{
"id"
:
47
,
"fieldName"
:
"enterprise_type"
,
"fieldCNName"
:
"企业类型"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
48
,
"fieldName"
:
"residence"
,
"fieldCNName"
:
"住所"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
49
,
"fieldName"
:
"legal_representative"
,
"fieldCNName"
:
"法定代表人"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
50
,
"fieldName"
:
"register_capital"
,
"fieldCNName"
:
"注册资本"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
51
,
"fieldName"
:
"establish_date"
,
"fieldCNName"
:
"成立日期"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
52
,
"fieldName"
:
"business_term"
,
"fieldCNName"
:
"营业期限"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
53
,
"fieldName"
:
"business_scope"
,
"fieldCNName"
:
"经营范围"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
54
,
"fieldName"
:
"registration_authority"
,
"fieldCNName"
:
"登记机关"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
55
,
"fieldName"
:
"registration_time"
,
"fieldCNName"
:
"登记时间"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
56
,
"fieldName"
:
"unified_social_credit_code"
,
"fieldCNName"
:
"统一社会信用代码"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
57
,
"fieldName"
:
"business_license"
,
"fieldCNName"
:
"营业执照"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"填写会员基本信息"
,
"elements"
:[{
"id"
:
38
,
"fieldName"
:
"member_type"
,
"fieldCNName"
:
"会员类型"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
39
,
"fieldName"
:
"MEMBER_ROLE"
,
"fieldCNName"
:
"会员角色"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
40
,
"fieldName"
:
"member_level"
,
"fieldCNName"
:
"会员等级"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
41
,
"fieldName"
:
"REGISTER_PHONE"
,
"fieldCNName"
:
"注册手机号"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
42
,
"fieldName"
:
"register_email"
,
"fieldCNName"
:
"注册邮箱"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"法定代表人信息"
,
"elements"
:[{
"id"
:
60
,
"fieldName"
:
"legal_id_card"
,
"fieldCNName"
:
"法人身份证号"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
61
,
"fieldName"
:
"legal_id_card_information"
,
"fieldCNName"
:
"法人身份证信息"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
58
,
"fieldName"
:
"legal_name"
,
"fieldCNName"
:
"法人姓名"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
59
,
"fieldName"
:
"legal_phone"
,
"fieldCNName"
:
"法人手机号"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"企业信息"
,
"elements"
:[{
"id"
:
3
,
"fieldName"
:
"company_name"
,
"fieldCNName"
:
"公司名称"
,
"fieldType"
:
null
,
"fieldLength"
:
128
,
"fieldEmpty"
:
1
,
"fieldOrder"
:
1
,
"fieldRemark"
:
""
,
"checkRules"
:[]},{
"id"
:
4
,
"fieldName"
:
"company_type"
,
"fieldCNName"
:
"公司类型"
,
"fieldType"
:
null
,
"fieldLength"
:
128
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
2
,
"fieldRemark"
:
""
,
"checkRules"
:[]}]},{
"groupName"
:
"填写渠道信息"
,
"elements"
:[{
"id"
:
43
,
"fieldName"
:
"channel_level"
,
"fieldCNName"
:
"渠道级别"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
44
,
"fieldName"
:
"channel_type"
,
"fieldCNName"
:
"渠道类型"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
45
,
"fieldName"
:
"agent_city"
,
"fieldCNName"
:
"代理地市"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]},{
"id"
:
46
,
"fieldName"
:
"channel_describe"
,
"fieldCNName"
:
"渠道描述"
,
"fieldType"
:
null
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"checkRules"
:[]}]},{
"groupName"
:
"444"
,
"elements"
:[{
"id"
:
1
,
"fieldName"
:
"444"
,
"fieldCNName"
:
"44"
,
"fieldType"
:
null
,
"fieldLength"
:
44
,
"fieldEmpty"
:
1
,
"fieldOrder"
:
44
,
"fieldRemark"
:
null
,
"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"
:
5
,
"typeName"
:
"企业会员"
},{
"id"
:
6
,
"typeName"
:
"企业个人会员"
},{
"id"
:
7
,
"typeName"
:
"渠道企业会员"
},{
"id"
:
8
,
"typeName"
:
"渠道个人会员"
}],
"businessType"
:[{
"id"
:
1
,
"typeName"
:
"采购"
},{
"id"
:
2
,
"typeName"
:
"商品销售"
},{
"id"
:
3
,
"typeName"
:
"加工服务"
},{
"id"
:
4
,
"typeName"
:
"物流服务"
},{
"id"
:
5
,
"typeName"
:
"金融服务"
},{
"id"
:
6
,
"typeName"
:
"保险服务"
}]},
"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"
:
"文件"
,
"fieldLength"
:
100
,
"fieldEmpty"
:
0
,
"fieldOrder"
:
1
,
"fieldRemark"
:
"test"
,
"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"
:
"文件"
,
"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"
:
"String"
,
"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"
}]}}
src/components/CustomTabs/index.tsx
View file @
0ab24077
...
...
@@ -35,7 +35,7 @@ const CustomTabs: React.FC<ITabsProps> = props => {
{
renderTabs
&&
renderTabs
.
length
>
0
&&
renderTabs
.
map
(
(
item
,
index
)
=>
<>
<
li
className=
{
defaultChecked
==
index
?
styles
.
activedLi
:
""
}
onClick=
{
()
=>
clickItemTab
(
index
)
}
>
<
li
key=
{
item
.
key
}
className=
{
defaultChecked
==
index
?
styles
.
activedLi
:
""
}
onClick=
{
()
=>
clickItemTab
(
index
)
}
>
<
span
>
{
item
.
title
}
</
span
>
{
item
.
isDelete
&&
<
a
onClick=
{
(
e
)
=>
handleDelete
(
e
,
index
)
}
><
DeleteOutlined
/></
a
>
}
</
li
>
...
...
@@ -57,7 +57,7 @@ const CustomTabs: React.FC<ITabsProps> = props => {
<
Col
span=
{
20
}
style=
{
{
padding
:
24
}
}
>
{
renderTabs
&&
renderTabs
.
length
>
0
&&
renderTabs
.
map
(
(
item
,
index
)
=>
<
div
style=
{
defaultChecked
==
index
?
{
display
:
'block'
}
:
{
display
:
'none'
}
}
>
(
item
,
index
)
=>
<
div
key=
{
item
.
key
}
style=
{
defaultChecked
==
index
?
{
display
:
'block'
}
:
{
display
:
'none'
}
}
>
{
item
.
content
}
</
div
>
)
...
...
src/components/MediaLibrary/index.less
0 → 100644
View file @
0ab24077
.modalMainContentBox{
margin: 10px 0 30px;
ul{
list-style: none;
display: flex;
flex-wrap: wrap;
padding: 0;
li{
width: 162px;
height: 162px;
margin: 20px 8px;
align-self: start;
p{
font-size: 12px;
line-height: 24px;
text-align: center;
}
a{
img{
display: block;
width: 100%;
height: 100%;
}
}
}
.isCheckedCss{
box-sizing: border-box;
border:2px solid @main-color;
position: relative;
&::before{
content: '√';
width:20px;
height:20px;
line-height: 20px;
text-align: center;
font-weight: bold;
font-size: 16px;
color: #fff;
background: @main-color;
position: absolute;
top: 0;
right: 0;
}
}
}
}
.footerPage{
display: flex;
justify-content: flex-end;
}
\ No newline at end of file
src/components/MediaLibrary/index.tsx
0 → 100644
View file @
0ab24077
import
React
,
{
useState
,
useRef
,
useEffect
,
ReactNode
}
from
"react"
;
import
{
Button
,
Form
,
Input
,
Row
,
Col
,
Modal
,
Alert
,
Upload
,
Select
,
DatePicker
,
Pagination
}
from
"antd"
;
import
{
PlusOutlined
,
DeleteOutlined
,
FormOutlined
,
UploadOutlined
}
from
"@ant-design/icons"
;
import
styles
from
"./index.less"
;
export
interface
IProps
{
visibleMedias
:
boolean
;
clickOkAddMedias
:
(
selectedArray
:
ILists
[])
=>
void
;
clickCancelAddMedias
:
()
=>
void
;
}
export
interface
ILists
{
id
:
string
;
image
:
string
;
title
:
string
;
isCheck
:
boolean
;
}
export
interface
Iparams
{
current
:
number
;
pageSize
:
number
;
name
:
string
;
canal
:
number
;
group
:
number
;
tag
:
number
;
rangeDate
:
string
[];
}
const
{
Option
}
=
Select
const
{
RangePicker
}
=
DatePicker
let
_imgLists
:
ILists
[]
=
[
{
id
:
'10'
,
image
:
'http://10.0.0.28:88/group1/M00/00/01/CgAAHF8XthCALPjtAAAcmV_QYOE360.jpg'
,
title
:
'商品主图10086'
,
isCheck
:
false
},
{
id
:
'11'
,
image
:
'http://10.0.0.28:88/group1/M00/00/01/CgAAHF8XthCALPjtAAAcmV_QYOE360.jpg'
,
title
:
'商品主图10086'
,
isCheck
:
false
},
{
id
:
'12'
,
image
:
'http://10.0.0.28:88/group1/M00/00/01/CgAAHF8XthCALPjtAAAcmV_QYOE360.jpg'
,
title
:
'商品主图10086'
,
isCheck
:
false
},
{
id
:
'13'
,
image
:
'http://10.0.0.28:88/group1/M00/00/01/CgAAHF8XthCALPjtAAAcmV_QYOE360.jpg'
,
title
:
'商品主图10086'
,
isCheck
:
false
},
{
id
:
'14'
,
image
:
'http://10.0.0.28:88/group1/M00/00/01/CgAAHF8XthCALPjtAAAcmV_QYOE360.jpg'
,
title
:
'商品主图10086'
,
isCheck
:
false
},
{
id
:
'15'
,
image
:
'http://10.0.0.28:88/group1/M00/00/01/CgAAHF8XthCALPjtAAAcmV_QYOE360.jpg'
,
title
:
'商品主图10086'
,
isCheck
:
false
},
]
const
CustomMediaLibrary
:
React
.
FC
<
IProps
>
=
props
=>
{
const
{
visibleMedias
,
clickOkAddMedias
,
clickCancelAddMedias
}
=
props
const
[
searchParams
,
setSearchParams
]
=
useState
<
Iparams
>
({
current
:
1
,
pageSize
:
10
,
name
:
''
,
canal
:
null
,
group
:
null
,
tag
:
null
,
rangeDate
:
[]
})
let
[
imgLists
,
setImgLists
]
=
useState
<
ILists
[]
>
(
_imgLists
)
const
clickCheck
=
(
id
:
any
,
index
:
any
)
=>
{
console
.
log
(
'选中'
,
id
,
index
)
for
(
let
item
of
imgLists
){
let
bool
=
item
.
isCheck
if
(
item
.
id
===
id
){
item
.
isCheck
=
!
bool
}
}
let
newArr
=
[...
imgLists
]
setImgLists
(
newArr
)
}
const
confirmClickOk
=
()
=>
{
console
.
log
(
'内部确定选择'
)
let
selectedArray
=
imgLists
.
filter
(
item
=>
item
.
isCheck
)
clickOkAddMedias
(
selectedArray
)
}
const
confirmCancel
=
()
=>
{
console
.
log
(
'内部取消选择'
)
for
(
let
item
of
imgLists
){
item
.
isCheck
=
false
}
setImgLists
([...
imgLists
])
clickCancelAddMedias
()
}
const
clickSearch
=
(
value
?:
string
)
=>
{
if
(
value
){
searchParams
[
'current'
]
=
1
searchParams
[
'name'
]
=
value
}
setSearchParams
({...
searchParams
})
console
.
log
(
searchParams
)
// ...搜索
}
const
onChange
=
(
value
:
any
,
type
:
string
)
=>
{
searchParams
[
type
]
=
value
setSearchParams
({...
searchParams
})
}
const
pageChange
=
(
page
,
pageSize
)
=>
{
searchParams
[
'current'
]
=
page
setSearchParams
({...
searchParams
})
clickSearch
()
}
return
(
<
div
className=
{
styles
.
mediaLibraryBox
}
>
<
Modal
width=
{
960
}
title=
"添加媒体"
visible=
{
visibleMedias
}
onOk=
{
confirmClickOk
}
onCancel=
{
confirmCancel
}
okText=
"确定"
cancelText=
"取消"
forceRender=
{
true
}
>
<
div
className=
{
styles
.
modalFitllerBox
}
>
<
Row
gutter=
{
[
16
,
16
]
}
justify=
"space-between"
>
<
Col
span=
{
12
}
>
<
Upload
name=
'file'
action=
'/api/file/file/upload'
headers=
{
{
authorization
:
'authorization-text'
}
}
>
<
Button
type=
"primary"
>
<
UploadOutlined
/>
上传文件
</
Button
>
</
Upload
>
</
Col
>
<
Col
span=
{
12
}
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
}
}
>
<
Input
.
Search
placeholder=
"搜素"
onSearch=
{
value
=>
clickSearch
(
value
)
}
style=
{
{
width
:
200
}
}
/>
</
Col
>
</
Row
>
<
Row
gutter=
{
[
16
,
16
]
}
>
<
Col
span=
{
6
}
>
<
Select
allowClear
style=
{
{
width
:
'100%'
}
}
placeholder=
"使用渠道"
onChange=
{
(
v
)
=>
onChange
(
v
,
'canal'
)
}
>
<
Option
value=
{
0
}
>
Jack
</
Option
>
<
Option
value=
{
1
}
>
Lucy
</
Option
>
</
Select
>
</
Col
>
<
Col
span=
{
6
}
>
<
Select
allowClear
style=
{
{
width
:
'100%'
}
}
placeholder=
"分组"
onChange=
{
(
v
)
=>
onChange
(
v
,
'group'
)
}
>
<
Option
value=
{
10
}
>
Jack
</
Option
>
<
Option
value=
{
11
}
>
Lucy
</
Option
>
</
Select
>
</
Col
>
<
Col
span=
{
6
}
>
<
Select
allowClear
style=
{
{
width
:
'100%'
}
}
placeholder=
"标签"
onChange=
{
(
v
)
=>
onChange
(
v
,
'tag'
)
}
>
<
Option
value=
{
20
}
>
Jack
</
Option
>
<
Option
value=
{
21
}
>
Lucy
</
Option
>
</
Select
>
</
Col
>
<
Col
span=
{
6
}
>
<
RangePicker
showTime
format=
"YYYY-MM-DD HH:mm:ss"
placeholder=
{
[
'开始时间'
,
'结束时间'
]
}
onChange=
{
(
v
)
=>
onChange
(
v
,
'rangeDate'
)
}
/>
</
Col
>
</
Row
>
</
div
>
<
div
className=
{
styles
.
modalMainContentBox
}
>
<
ul
>
{
imgLists
.
length
>
0
&&
imgLists
.
map
((
item
,
index
)
=>
(
<
li
key=
{
item
.
id
}
className=
{
item
.
isCheck
?
styles
.
isCheckedCss
:
''
}
>
<
a
onClick=
{
()
=>
clickCheck
(
item
.
id
,
index
)
}
>
<
img
src=
{
item
.
image
}
alt=
{
item
.
title
}
/>
</
a
>
<
p
>
{
item
.
title
}
</
p
>
</
li
>
))
}
</
ul
>
</
div
>
<
div
className=
{
styles
.
footerPage
}
>
<
Pagination
current=
{
searchParams
?.
current
}
total=
{
50
}
onChange=
{
pageChange
}
/>
</
div
>
</
Modal
>
</
div
>
)
}
export
default
CustomMediaLibrary
src/global/config/global.d.ts
View file @
0ab24077
...
...
@@ -17,7 +17,7 @@ export interface Element {
id
:
number
;
fieldName
:
string
;
fieldCNName
:
string
;
fieldType
?:
any
;
fieldType
:
string
;
fieldLength
:
number
;
fieldEmpty
:
number
;
fieldOrder
:
number
;
...
...
src/pages/commodity/products/addProducts.tsx
View file @
0ab24077
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
import
React
,
{
useState
,
useRef
,
useEffect
,
ReactNode
}
from
'react'
import
{
history
}
from
'umi'
;
import
{
Button
,
Form
,
Card
,
Select
,
Tabs
,
Input
,
Tooltip
,
Cascader
,
Tag
,
Row
,
Col
,
Checkbox
,
Radio
,
Table
,
Modal
,
Alert
,
Upload
}
from
'antd'
import
{
Button
,
Form
,
Card
,
Select
,
Tabs
,
Input
,
Tooltip
,
Cascader
,
Tag
,
Row
,
Col
,
Checkbox
,
Radio
,
Table
,
Modal
,
Alert
,
Upload
,
Badge
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
QuestionCircleOutlined
,
...
...
@@ -10,12 +10,16 @@ import {
SettingOutlined
,
DeleteOutlined
,
FormOutlined
,
ReconciliationFilled
,
}
from
'@ant-design/icons'
import
ImageCrop
from
'@/components/ImageCrop'
import
CustomTabs
,
{
ItemPane
}
from
'@/components/CustomTabs'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
ReutrnEle
from
'@/components/ReturnEle'
import
CustomMediaLibrary
from
'@/components/MediaLibrary'
import
styles
from
'./index.less'
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetProductCustomerGetCustomerCategoryTreeResponse
,
GetWarehouseAreaAllResponse
,
GetProductCustomerGetCustomerCategoryAttributeListResponseDetail
}
from
'@/services'
;
const
{
Item
}
=
Form
const
{
TabPane
}
=
Tabs
...
...
@@ -29,6 +33,15 @@ const layout = {
span
:
12
,
},
}
const
layoutFormList
=
{
labelCol
:
{
span
:
2
,
},
wrapperCol
:
{
span
:
14
,
push
:
2
},
}
const
layoutAdd
=
{
labelCol
:
{
span
:
4
},
wrapperCol
:
{
span
:
20
},
...
...
@@ -127,17 +140,21 @@ const _fileList = [
const
_panes
=
[
{
title
:
'所有属性共用'
,
content
:
'默认内容 商品图片 1'
,
key
:
'1'
,
isDelete
:
false
},
{
title
:
'皓月银'
,
content
:
'默认内容 商品图片 2'
,
key
:
'2'
,
isDelete
:
true
},
{
title
:
'星空灰'
,
content
:
'默认内容 商品图片 3'
,
key
:
'3'
,
isDelete
:
true
},
//
{ title: '皓月银', content: '默认内容 商品图片 2', key: '2', isDelete: true },
//
{ title: '星空灰', content: '默认内容 商品图片 3', key: '3', isDelete: true },
];
let
newTabIndex
=
0
;
const
AddProducts
:
React
.
FC
<
{}
>
=
(
props
)
=>
{
const
[
form
]
=
Form
.
useForm
()
const
[
basicForm
]
=
Form
.
useForm
()
const
[
attributeForm
]
=
Form
.
useForm
()
const
[
setForm
]
=
Form
.
useForm
()
const
[
priceForm
]
=
Form
.
useForm
()
const
[
logisticsForm
]
=
Form
.
useForm
()
const
[
addTabsForm
]
=
Form
.
useForm
()
const
[
tags
,
setTags
]
=
useState
([
'双十一巨促'
,
'聚划算'
,
'买就亏本送'
])
const
[
otherForm
]
=
Form
.
useForm
()
// const [tags, setTags] = useState([])
const
[
planPrice
,
setPlanPrice
]
=
useState
(
1
)
const
[
panes
,
setPanes
]
=
useState
<
ItemPane
[]
>
(
_panes
)
...
...
@@ -155,6 +172,37 @@ const AddProducts:React.FC<{}> = (props) => {
const
[
modifyModal
,
setModifyModal
]
=
useState
(
false
);
const
[
ladderPrice
,
setLadderPrice
]
=
useState
(
false
)
const
[
brandData
,
setBrandData
]
=
useState
<
any
>
([])
const
[
brandValue
,
setBrandValue
]
=
useState
(
undefined
)
const
[
customerCategoryTree
,
setCustomerCategoryTree
]
=
useState
<
GetProductCustomerGetCustomerCategoryTreeResponse
>
()
const
[
proviceOptions
,
setProviceOptions
]
=
useState
<
GetWarehouseAreaAllResponse
>
()
const
[
showCategory
,
setShowCategory
]
=
useState
(
null
)
const
[
attributeList
,
setAttributeList
]
=
useState
<
GetProductCustomerGetCustomerCategoryAttributeListResponseDetail
[]
>
()
useEffect
(()
=>
{
// 获取品类树
PublicApi
.
getProductCustomerGetCustomerCategoryTree
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
setCustomerCategoryTree
(
res
.
data
)
})
//获取省市区
PublicApi
.
getWarehouseAreaAll
().
then
(
res
=>
{
if
(
res
.
code
===
1000
){
let
arr
=
[...
res
.
data
]
//裁去最后一级别
for
(
let
index
in
arr
){
for
(
let
_index
in
arr
[
index
].
areaResponses
){
let
o
=
arr
[
index
].
areaResponses
//@ts-ignore
o
[
_index
].
areaResponses
=
null
}
}
setProviceOptions
(
arr
)
}
})
},
[])
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'商品名称'
,
...
...
@@ -214,6 +262,7 @@ const AddProducts:React.FC<{}> = (props) => {
]
const
onFinish
=
(
values
:
any
)
=>
{
// 临时使用 测试子表单数据
console
.
log
(
values
);
}
...
...
@@ -222,7 +271,7 @@ const AddProducts:React.FC<{}> = (props) => {
}
const
onChange
=
(
value
:
any
)
=>
{
console
.
log
(
value
);
}
const
handlePlanPriceChange
=
(
v
:
any
)
=>
{
...
...
@@ -230,6 +279,9 @@ const AddProducts:React.FC<{}> = (props) => {
console
.
log
(
v
.
target
.
value
,
'v'
)
}
const
contentChildren
=
(
<></>
)
const
add
=
(
v
:
any
)
=>
{
const
activeKey
=
`newTab
${
newTabIndex
++
}
`
;
...
...
@@ -237,7 +289,8 @@ const AddProducts:React.FC<{}> = (props) => {
newArray
.
push
({
key
:
activeKey
,
title
:
v
.
tagsName
,
content
:
`新添加标签页 固定内容
${
newTabIndex
++
}
`
,
// content: `新添加标签页 固定内容${newTabIndex++}`,
content
:
pictureCrads
(),
isDelete
:
true
});
setPanes
(
newArray
);
...
...
@@ -351,14 +404,15 @@ const AddProducts:React.FC<{}> = (props) => {
setPanes
(
newPane
)
},[
fileList
])
const
handleOkAddMedias
=
(
)
=>
{
console
.
log
(
'操作了OK'
)
setVisibleMedias
(
false
)
};
// const handleOkAddMedias = (selectedData: any
) => {
// console.log('操作了OK添加媒体,选择的图片数据为:', selectedData
)
//
setVisibleMedias(false)
//
};
const
handleCancelAddMedias
=
()
=>
{
setVisibleMedias
(
false
)
};
// const handleCancelAddMedias = () => {
// console.log('操作了取消添加媒体)
// setVisibleMedias(false)
// };
const
handleModify
=
(
record
:
object
)
=>
{
console
.
log
(
'点击修改价格'
,
record
)
...
...
@@ -382,6 +436,109 @@ const AddProducts:React.FC<{}> = (props) => {
setLadderPrice
(
e
.
target
.
checked
)
setForm
.
setFields
([{
name
:
'ladderPrice'
,
value
:
e
.
target
.
checked
}])
}
const
handleBrandSearch
=
(
value
:
any
)
=>
{
// end value
console
.
log
(
value
,
'handleBrandSearch'
)
if
(
value
)
{
PublicApi
.
getProductSelectGetSelectBrand
({
name
:
value
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
setBrandData
(
res
.
data
)
})
}
else
{
setBrandData
([])
}
}
const
handleBrandChange
=
(
value
:
any
)
=>
{
setBrandValue
(
value
)
}
const
tagRender
=
(
props
)
=>
{
const
{
label
,
value
,
closable
,
onClose
}
=
props
;
if
(
value
?.
length
<
8
)
return
(
<
Tag
closable=
{
closable
}
onClose=
{
onClose
}
style=
{
{
marginRight
:
4
,
border
:
'1px solid #f0f0f0'
}
}
>
{
label
}
</
Tag
>
)
}
const
onCustomerCategoryChange
=
(
value
:
any
)
=>
{
let
seletCategoryId
=
value
[
1
]
||
value
[
0
]
if
(
value
.
length
>
0
){
PublicApi
.
getProductCustomerGetCustomerCategory
({
id
:
seletCategoryId
}).
then
(
res
=>
{
setShowCategory
(
res
.
data
.
name
)
})
PublicApi
.
getProductCustomerGetCustomerCategoryAttributeList
({
categoryId
:
seletCategoryId
,
name
:
''
,
current
:
'1'
,
pageSize
:
'100'
}).
then
(
res
=>
{
setAttributeList
(
res
.
data
?.
data
);
})
}
else
setShowCategory
(
null
)
}
const
onCommodityAreaChange
=
(
value
:
any
,
selected
:
any
)
=>
{
let
areaParams
=
{
provinceCode
:
null
,
provinceName
:
null
,
cityCode
:
null
,
cityName
:
null
,
}
if
(
selected
.
length
===
2
){
areaParams
.
provinceName
=
selected
[
0
].
name
areaParams
.
provinceCode
=
selected
[
0
].
code
areaParams
.
cityName
=
selected
[
1
].
name
areaParams
.
cityCode
=
selected
[
1
].
code
}
console
.
log
(
areaParams
,
'area'
)
}
const
renderTabPanchildren
=
(
attrItem
:
GetProductCustomerGetCustomerCategoryAttributeListResponseDetail
)
=>
{
// attribute: null
// groupName: "外观"
// id: 37
// isEmpty: true
// isEnable: true
// isImage: false
// isName: false
// isPrice: false
// isSearch: true
// name: "尺码"
// type: 2
//1-单选、2-多选、3-输入
return
(
<>
<
Form
.
Item
name=
{
attrItem
.
id
}
label=
{
attrItem
.
name
}
rules=
{
attrItem
.
isEmpty
?[{
required
:
true
,
message
:
'此项为必填项'
}]:[]
}
>
{
attrItem
.
type
===
1
&&
<
Select
placeholder=
"请选择面料"
allowClear
>
<
Option
value=
"apple"
>
APPLE
</
Option
>
<
Option
value=
"abidas"
>
AD
</
Option
>
<
Option
value=
"WANSI"
>
WS
</
Option
>
</
Select
>
}
{
attrItem
.
type
===
2
&&
<
Checkbox
.
Group
options=
{
[
'XS'
,
'S'
,
'M'
,
'L'
,
'XL'
,
'XXL'
]
}
defaultValue=
{
[
'L'
]
}
/>
}
{
attrItem
.
type
===
3
&&
<
TextArea
maxLength=
{
50
}
placeholder=
"最多输入50个字符"
rows=
{
4
}
/>
}
</
Form
.
Item
>
</>
)
}
return
(<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
...
...
@@ -397,14 +554,16 @@ const AddProducts:React.FC<{}> = (props) => {
<
Card
>
<
Tabs
onChange=
{
callback
}
type=
"card"
defaultActiveKey=
"1"
>
<
TabPane
tab=
"基本信息"
key=
"1"
>
<
Form
<
Form
{
...
layout
}
form=
{
f
orm
}
form=
{
basicF
orm
}
name=
"add-products-basic"
labelAlign=
"left"
onFinish=
{
onFinish
}
colon=
{
false
}
>
<
Form
.
Item
name=
"c
lass
"
name=
"c
ustomerCategoryId
"
label=
"商品品类"
rules=
{
[
{
...
...
@@ -413,27 +572,39 @@ const AddProducts:React.FC<{}> = (props) => {
},
]
}
>
<
Cascader
options=
{
classOptions
}
onChange=
{
onChange
}
placeholder=
"请选择品类"
/>
<
Cascader
options=
{
customerCategoryTree
}
fieldNames=
{
{
label
:
'title'
,
value
:
'id'
,
children
:
'children'
}
}
onChange=
{
onCustomerCategoryChange
}
placeholder=
"请选择品类"
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"brand"
name=
"brand
Id
"
label=
"商品品牌"
>
<
Select
showSearch
placeholder=
"请选择品牌"
allowClear
value=
{
brandValue
}
defaultActiveFirstOption=
{
false
}
showArrow=
{
false
}
filterOption=
{
false
}
onSearch=
{
handleBrandSearch
}
onChange=
{
handleBrandChange
}
notFoundContent=
{
null
}
style=
{
{
width
:
'100%'
}
}
>
<
Option
value=
"apple"
>
APPLE
</
Option
>
<
Option
value=
"abidas"
>
AD
</
Option
>
<
Option
value=
"WANSI"
>
WS
</
Option
>
{
brandData
.
map
(
d
=>
<
Option
value=
{
d
.
id
}
key=
{
d
.
id
}
>
{
d
.
name
}
</
Option
>)
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
name=
"
titl
e"
name=
"
nam
e"
label=
{
<
span
>
标题
<
Tooltip
title=
"
这是一段描述?
"
>
商品名称
<
Tooltip
title=
"
商品名称规范:品牌名(中文|英文)+产品名称(款式|系列)+附加产品特点+货号,最多输入45字
"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
...
...
@@ -441,18 +612,18 @@ const AddProducts:React.FC<{}> = (props) => {
rules=
{
[
{
required
:
true
,
message
:
'
请填入标题
'
message
:
'
商品名称
'
},
]
}
>
<
Input
placeholder=
"
请输入标题"
/>
<
Input
placeholder=
"
商品名称"
maxLength=
{
45
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"s
ubtitle
"
name=
"s
logan
"
label=
{
<
span
>
商品标语
<
Tooltip
title=
"
这是一段描述?
"
>
<
Tooltip
title=
"
商品的宣传用语,最多输入45字
"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
...
...
@@ -464,14 +635,14 @@ const AddProducts:React.FC<{}> = (props) => {
},
]
}
>
<
Input
placeholder=
"请输入商品标语"
/>
<
Input
placeholder=
"请输入商品标语"
maxLength=
{
45
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"
character
"
name=
"
sellingPoint
"
label=
{
<
span
>
商品卖点
<
Tooltip
title=
"
这是一段描述?
"
>
<
Tooltip
title=
"
商品的卖点,展示在商品名称与商品标语之后,最多每个卖点输入8字
"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
...
...
@@ -486,63 +657,67 @@ const AddProducts:React.FC<{}> = (props) => {
<
Select
mode=
"tags"
placeholder=
"请选择或输入商品卖点"
defaultValue=
{
[
'双十一巨促'
]
}
>
{
tags
&&
tags
.
length
>
0
&&
tags
.
map
((
item
,
index
)
=>
<>
<
Option
value=
{
item
}
>
{
item
}
</
Option
>
</>)
}
</
Select
>
maxTagCount=
{
3
}
tagRender=
{
tagRender
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
{
<
span
>
归属地市
<
Tooltip
title=
"这是一段描述?"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
}
name=
"location"
rules=
{
[
{
required
:
true
,
message
:
'请选择地区'
}
]
}
>
<
Form
.
List
name=
"location"
>
{
(
fields
:
any
[],
{
add
,
remove
}:
any
)
=>
{
<
Form
.
List
name=
"commodityAreaList"
>
{
(
fields
:
any
[],
{
add
,
remove
}:
any
)
=>
{
if
(
!
fields
.
length
){
add
()
}
return
(
<
div
>
{
fields
.
map
(
field
=>
{
return
(
<
Row
key=
{
field
.
key
}
gutter=
{
24
}
>
<
Col
span=
{
20
}
>
<
Cascader
options=
{
classOptions
}
onChange=
{
onChange
}
placeholder=
"请选择地区"
/>
</
Col
>
<
Col
span=
{
4
}
>
<
Form
.
Item
label=
' '
colon=
{
false
}
>
<
Button
size=
'small'
onClick=
{
()
=>
add
()
}
icon=
{
<
PlusOutlined
/>
}
/>
{
field
.
key
>
0
&&
(<
Button
size=
'small'
onClick=
{
()
=>
remove
(
field
.
name
)
}
style=
{
{
marginLeft
:
'8px'
}
}
icon=
{
<
MinusOutlined
/>
}
/>)
}
</
Form
.
Item
>
</
Col
>
</
Row
>
)})
}
{
fields
.
map
((
field
,
index
)
=>
(
<
Form
.
Item
{
...
(
index
===
0
?
layout
:
layoutFormList
)}
label=
{
field
.
key
===
0
&&
<
span
>
<
i
style=
{
{
color
:
'red'
}
}
>
*
</
i
>
归属地市
<
Tooltip
title=
"设置了归属地市后,此商品可根据地市进行筛选,未设置时默认为所有地市"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
}
rules=
{
[
{
required
:
true
,
message
:
'请选择地区'
}
]
}
key=
{
field
.
key
}
>
<
Form
.
Item
{
...
field
}
rules=
{
[
{
required
:
true
,
message
:
"请选择地区"
,
},
]
}
noStyle
>
<
Cascader
options=
{
proviceOptions
}
onChange=
{
onCommodityAreaChange
}
placeholder=
"请选择地区"
fieldNames=
{
{
label
:
'name'
,
value
:
'code'
,
children
:
'areaResponses'
}
}
style=
{
index
===
0
?
{
width
:
'90%'
}
:
{
width
:
'80%'
}
}
/>
</
Form
.
Item
>
<
Button
size=
'small'
onClick=
{
()
=>
add
()
}
icon=
{
<
PlusOutlined
/>
}
style=
{
{
margin
:
'0 12px'
}
}
/>
{
field
.
key
>
0
&&
(<
Button
size=
'small'
onClick=
{
()
=>
remove
(
field
.
name
)
}
icon=
{
<
MinusOutlined
/>
}
/>)
}
</
Form
.
Item
>
))
}
</
div
>
)
;
)
}
}
</
Form
.
List
>
</
Form
.
Item
>
</
Form
.
List
>
<
Form
.
Item
label=
'品类类型'
>
<
span
className=
"commonStatusValid"
></
span
>
实物商品
{
showCategory
&&
<><
span
className=
"commonStatusValid"
></
span
>
{
showCategory
}
</>
}
</
Form
.
Item
>
<
Form
.
Item
{
...
tailLayout
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
...
...
@@ -557,13 +732,25 @@ const AddProducts:React.FC<{}> = (props) => {
<
TabPane
tab=
"商品属性"
key=
"2"
>
<
Form
{
...
layout
}
form=
{
f
orm
}
form=
{
attributeF
orm
}
name=
"add-products-character"
onFinish=
{
onFinish
}
labelAlign=
"left"
>
<
Tabs
defaultActiveKey=
"1"
tabPosition=
"left"
>
<
TabPane
tab=
'外观'
key=
{
2.1
}
>
{
attributeList
?.
length
>
0
&&
attributeList
.
map
(
attributeItem
=>
<>
<
TabPane
tab=
{
attributeItem
.
name
}
key=
{
attributeItem
.
id
}
>
{
renderTabPanchildren
(
attributeItem
)
}
</
TabPane
>
</>
)
}
{
/* <TabPane tab='外观' key={2.1}>
<Form.Item
name="texture"
label="面料"
...
...
@@ -694,14 +881,14 @@ const AddProducts:React.FC<{}> = (props) => {
>
<Input placeholder="请输入最小起订数" />
</Form.Item>
</
TabPane
>
</TabPane>
*/
}
</
Tabs
>
</
Form
>
</
TabPane
>
<
TabPane
tab=
"单价设置"
key=
"3"
>
<
Form
{
...
layout
}
form=
{
f
orm
}
form=
{
priceF
orm
}
name=
"add-products-price"
labelAlign=
"left"
>
...
...
@@ -724,8 +911,27 @@ const AddProducts:React.FC<{}> = (props) => {
<
Radio
.
Group
onChange=
{
handlePlanPriceChange
}
>
<
Radio
value=
{
1
}
>
现货价格
</
Radio
>
<
Radio
value=
{
2
}
>
价格需要询价
</
Radio
>
<
Radio
value=
{
3
}
>
积分兑换商品
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
name=
"memberDiscount"
label=
{
<
span
>
会员折扣
<
Tooltip
title=
"这是一段描述?"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
}
rules=
{
[{
required
:
true
,
message
:
'请选择会员折扣'
}]
}
valuePropName=
"checked"
>
<
Checkbox
>
允许使用会员折扣价购买
</
Checkbox
>
</
Form
.
Item
>
</
Form
>
<
Table
dataSource=
{
dataSource
}
columns=
{
planPrice
===
1
?
columns
:
columns
.
slice
(
0
,
4
)
}
pagination=
{
false
}
/>
</
TabPane
>
...
...
@@ -764,7 +970,7 @@ const AddProducts:React.FC<{}> = (props) => {
<
TabPane
tab=
"物流信息"
key=
"6"
>
<
Form
{
...
layout
}
form=
{
f
orm
}
form=
{
logisticsF
orm
}
name=
"add-products-transport"
labelAlign=
"left"
>
...
...
@@ -858,7 +1064,7 @@ const AddProducts:React.FC<{}> = (props) => {
<
TabPane
tab=
"其他"
key=
"7"
>
<
Form
{
...
layout
}
form=
{
f
orm
}
form=
{
otherF
orm
}
name=
"add-products-other"
labelAlign=
"left"
>
...
...
@@ -919,14 +1125,12 @@ const AddProducts:React.FC<{}> = (props) => {
handleWithDraw=
{
handleCropCancel
}
/>
</
Card
>
<
Modal
title=
"添加媒体"
visible=
{
visibleMedias
}
onOk=
{
handleOkAddMedias
}
onCancel=
{
handleCancelAddMedias
}
>
<
h1
>
选择对应媒体
</
h1
>
</
Modal
>
{
/* 媒体库组件,暂不使用,先直接上传图片 */
}
{
/* <CustomMediaLibrary
visibleMedias={visibleMedias}
clickOkAddMedias={handleOkAddMedias}
clickCancelAddMedias={handleCancelAddMedias}
/> */
}
<
Modal
title=
"设置价格"
visible=
{
modifyModal
}
...
...
src/pages/commodity/products/index.tsx
View file @
0ab24077
...
...
@@ -213,7 +213,7 @@ const Products: React.FC<{}> = () => {
<
Dropdown
overlay=
{
<
Menu
>
<
Menu
.
Item
>
{
record
.
status
===
1
?
<
Button
type=
'link'
>
提交审核
</
Button
>
:
''
}
{
record
.
status
===
1
?
<
Button
type=
'link'
onClick=
{
()
=>
clickSubmitCheck
(
record
)
}
>
提交审核
</
Button
>
:
''
}
</
Menu
.
Item
>
{
(
record
.
status
===
3
||
record
.
status
===
6
)
?
<
Menu
.
Item
><
Button
type=
'link'
onClick=
{
()
=>
clickUp
(
1
)
}
>
上架
</
Button
></
Menu
.
Item
>
:
''
}
{
record
.
status
===
5
?
<
Menu
.
Item
><
Button
type=
'link'
onClick=
{
()
=>
clickUp
(
0
)
}
>
下架
</
Button
></
Menu
.
Item
>
:
''
}
...
...
@@ -417,8 +417,17 @@ const Products: React.FC<{}> = () => {
const
clickCopy
=
(
record
:
any
)
=>
{
console
.
log
(
'复制商品'
)
const
{
id
}
=
record
;
if
(
id
)
PublicApi
.
postProductCommodityCopyCommodity
({
id
:
id
})
}
const
clickSubmitCheck
=
(
record
:
any
)
=>
{
console
.
log
(
'提交审核'
)
const
{
id
}
=
record
;
if
(
id
)
PublicApi
.
postProductCommodityApplyCheckCommodity
({
id
:
id
})
}
const
handleMenuClick
=
(
e
:
any
)
=>
{
console
.
log
(
'menu'
,
e
,
selectedRowKeys
);
// 1 批量删除;2 删除导入批次
...
...
@@ -433,6 +442,8 @@ const Products: React.FC<{}> = () => {
const
handleBatchDelete
=
(
ids
:
string
[])
=>
{
console
.
log
(
'删除'
,
ids
)
//@ts-ignore
PublicApi
.
postProductCommodityDeleteBatchCommodity
({
idList
:
ids
})
//......
}
const
handleReset
=
()
=>
{
...
...
src/pages/commodity/products/viewProducts.tsx
View file @
0ab24077
import
React
,
{
useState
,
useRef
,
ReactNode
}
from
'react'
import
React
,
{
useState
,
useRef
,
ReactNode
,
useEffect
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Steps
,
Card
,
Space
,
Radio
,
Row
,
Col
,
Descriptions
,
Table
,
Tabs
,
Tag
,
Avatar
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
...
...
@@ -10,12 +10,56 @@ import {
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
ReutrnEle
from
'@/components/ReturnEle'
import
styles
from
"./index.less"
import
{
PublicApi
}
from
'@/services/api'
import
{
GetProductCommodityGetCommodityResponse
,
GetProductCommodityGetCommodityCheckRecordResponse
,
GetProductCommodityGetShopResponse
}
from
'@/services'
const
{
Step
}
=
Steps
;
const
{
TabPane
}
=
Tabs
;
const
viewProducts
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
productDetail
,
setPorductDetail
]
=
useState
<
GetProductCommodityGetCommodityResponse
>
()
const
[
checkRecord
,
setCheckRecord
]
=
useState
<
GetProductCommodityGetCommodityCheckRecordResponse
>
()
const
[
productGetShop
,
setProductGetShop
]
=
useState
<
GetProductCommodityGetShopResponse
>
()
const
[
fixStep
,
setFixStep
]
=
useState
(
0
)
useEffect
(()
=>
{
const
{
id
}
=
history
.
location
.
query
if
(
id
){
PublicApi
.
getProductCommodityGetCommodity
({
id
:
id
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
){
console
.
log
(
data
)
setPorductDetail
(
data
)
if
(
data
.
status
===
1
)
setFixStep
(
0
)
else
if
(
data
.
status
===
2
)
setFixStep
(
1
)
else
if
(
data
.
status
===
3
)
setFixStep
(
2
)
else
if
(
data
.
status
===
4
)
setFixStep
(
2
)
else
if
(
data
.
status
===
5
)
setFixStep
(
3
)
else
if
(
data
.
status
===
6
)
setFixStep
(
3
)
}
})
PublicApi
.
getProductCommodityGetCommodityCheckRecord
({
commodityId
:
id
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
){
console
.
log
(
data
)
setCheckRecord
(
data
)
}
})
PublicApi
.
getProductCommodityGetShop
({
id
:
id
}).
then
(
res
=>
{
const
{
code
,
data
}
=
res
if
(
code
===
1000
){
console
.
log
(
data
)
setProductGetShop
(
data
)
}
})
}
},
[])
const
dataSource
=
[
{
key
:
'1'
,
...
...
@@ -145,20 +189,44 @@ const viewProducts: React.FC<{}> = () => {
}
]
// 1 审核状态 2 商品状态
const
renderStatus
=
(
status
:
number
,
type
:
number
)
=>
{
let
component
:
ReactNode
=
null
if
(
type
===
1
){
if
(
status
===
1
)
component
=
(<><
span
className=
"commonStatusStop"
></
span
>
待提交审核
</>)
else
if
(
status
===
2
)
component
=
(<><
span
className=
"commonStatusModify"
></
span
>
待审核
</>)
else
if
(
status
===
3
)
component
=
(<><
span
className=
"commonStatusValid"
></
span
>
审核通过
</>)
else
if
(
status
===
4
)
component
=
(<><
span
className=
"commonStatusInvalid"
>
审核不通过
</
span
></>)
}
if
(
status
===
5
)
component
=
(<
span
style=
{
{
color
:
'#00B37A'
,
padding
:
'2px 5px'
,
background
:
'rgba(235,247,242,1)'
,
borderRadius
:
'4px'
}
}
>
已上架
</
span
>)
else
if
(
status
===
6
)
component
=
(<
span
style=
{
{
padding
:
'2px 5px'
,
background
:
'rgba(244,245,247,1)'
,
borderRadius
:
'4px'
}
}
>
已下架
</
span
>)
return
component
}
const
content
=
<>
<
Descriptions
colon=
{
true
}
style=
{
{
paddingLeft
:
128
}
}
>
<
Descriptions
.
Item
label=
"商品品牌"
>
APPLE
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品品类"
>
成品皮 --
>
牛皮 --
>
头层牛皮
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"上架商城"
><
Avatar
size=
"small"
icon=
{
<
UserOutlined
/>
}
/>
<
Avatar
size=
"small"
icon=
{
<
UserOutlined
/>
}
/></
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"审核状态"
><
span
className=
"commonStatusValid"
></
span
>
审核通过
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品状态"
><
span
className=
"pruduct-status"
>
已上架
</
span
></
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品品牌"
>
{
productDetail
?.
brand
?.
name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品品类"
>
{
productDetail
?.
customerCategoryName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"上架商城"
>
{
productGetShop
?.
length
>
0
&&
productGetShop
.
map
(
item
=>
<>
{
item
.
isCheck
&&
item
.
name
}
</>)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"审核状态"
>
{
renderStatus
(
productDetail
?.
status
,
1
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品状态"
>
{
renderStatus
(
productDetail
?.
status
,
2
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"商品类型"
><
span
className=
"commonStatusValid"
></
span
>
实物商品
</
Descriptions
.
Item
>
</
Descriptions
>
</>
return
(
<
PageHeaderWrapper
title=
"进口头层牛皮荔枝纹"
title=
{
productDetail
?.
name
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
logoSrc=
'https://avatars1.githubusercontent.com/u/8186664?s=460&v=4'
/>
}
content=
{
content
}
...
...
@@ -170,9 +238,10 @@ const viewProducts: React.FC<{}> = () => {
>
<
Space
direction=
"vertical"
style=
{
{
width
:
'100%'
}
}
>
<
Card
headStyle=
{
{
borderBottom
:
'none'
}
}
title=
"流程进度"
>
<
Steps
progressDot
current=
{
2
}
>
<
Steps
progressDot
current=
{
fixStep
}
>
<
Step
title=
"新建商品"
description=
"供应商"
/>
<
Step
title=
"提交审核"
description=
"供应商"
/>
<
Step
title=
"审核
品牌
"
description=
"平台"
/>
<
Step
title=
"审核"
description=
"平台"
/>
<
Step
title=
"完成"
description=
""
/>
</
Steps
>
</
Card
>
...
...
@@ -186,7 +255,7 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
商品标语:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
厚1.407548530856、张幅12尺
</
p
>
<
p
>
{
productDetail
?.
slogan
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -194,7 +263,8 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
商品卖点:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
><
Tag
>
双十一大促
</
Tag
><
Tag
>
新用户专享大礼包
</
Tag
><
Tag
>
成交量遥遥领先
</
Tag
></
p
>
{
/* <p><Tag>双十一大促</Tag><Tag>新用户专享大礼包</Tag><Tag>成交量遥遥领先</Tag></p> */
}
<
p
>
{
productDetail
?.
sellingPoint
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -202,7 +272,8 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
归属地市:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
广东省 / 广州市
<
br
/>
新疆 / 克孜勒苏柯尔克孜自治州
</
p
>
{
/* <p>广东省 / 广州市<br />新疆 / 克孜勒苏柯尔克孜自治州</p> */
}
<
p
>
{
productDetail
?.
area
.
toString
()
}
</
p
>
</
Col
>
</
Row
>
</
Card
>
...
...
@@ -219,7 +290,7 @@ const viewProducts: React.FC<{}> = () => {
</
Row
>
<
Row
>
<
Col
span=
{
4
}
>
<
p
>
运
送
方式:
</
p
>
<
p
>
运
费
方式:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
买家承担运费
</
p
>
...
...
@@ -230,7 +301,7 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
重量:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
1.55
KG(公斤)
</
p
>
<
p
>
{
productDetail
?.
logistics
?.
weight
}
KG(公斤)
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -246,7 +317,7 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
物流公司:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
顺丰
</
p
>
<
p
>
{
productDetail
?.
logistics
?.
company
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -254,7 +325,7 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
发货地址:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
广东省广州市海珠区型钢东欧1068号中洲中心北塔6楼
</
p
>
<
p
>
{
productDetail
?.
logistics
?.
sendAddress
}
</
p
>
</
Col
>
</
Row
>
</
Card
>
...
...
@@ -266,7 +337,7 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
提供发票:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
是
</
p
>
<
p
>
{
productDetail
?.
isInvoice
?
'是'
:
'否'
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -274,7 +345,7 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
唛头:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
PELLE
</
p
>
<
p
>
{
productDetail
?.
marks
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -282,7 +353,7 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
包装清单:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
商品*1,说明书*1
</
p
>
<
p
>
{
productDetail
?.
packing
}
</
p
>
</
Col
>
</
Row
>
<
Row
>
...
...
@@ -290,7 +361,7 @@ const viewProducts: React.FC<{}> = () => {
<
p
>
售后服务:
</
p
>
</
Col
>
<
Col
span=
{
20
}
>
<
p
>
1年免费保修,7天免费退换
</
p
>
<
p
>
{
productDetail
?.
afterService
}
</
p
>
</
Col
>
</
Row
>
</
Card
>
...
...
src/services/index.ts
View file @
0ab24077
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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