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
1e9d7809
Commit
1e9d7809
authored
Jul 13, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-srm' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev-srm
parents
1e4e88a8
10a5b088
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
163 additions
and
28 deletions
+163
-28
index.tsx
...saction/purchaseAbility/components/modalOperate/index.tsx
+11
-2
index.tsx
...bility/purchaseBid/components/submitResultModal/index.tsx
+13
-1
basic.tsx
...purchaseAbility/purchaseBid/readyAdd/components/basic.tsx
+16
-2
bidRequirement.tsx
...bility/purchaseBid/readyAdd/components/bidRequirement.tsx
+16
-4
bidRules.tsx
...chaseAbility/purchaseBid/readyAdd/components/bidRules.tsx
+19
-4
condition.tsx
...haseAbility/purchaseBid/readyAdd/components/condition.tsx
+86
-13
file.tsx
.../purchaseAbility/purchaseBid/readyAdd/components/file.tsx
+2
-2
No files found.
src/pages/transaction/purchaseAbility/components/modalOperate/index.tsx
View file @
1e9d7809
...
...
@@ -208,7 +208,7 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
},
[
visible
])
const
handleSubmit
=
(
val
:
any
)
=>
{
if
(
confirmLoading
)
{
if
(
confirmLoading
)
{
return
;
}
setConfirmLoading
(
true
);
...
...
@@ -304,7 +304,16 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
}
}
x
-
rules=
{
{
max
:
maxNumber
,
message
:
`原因最多${maxNumber}个汉字`
message
:
`原因最多${maxNumber}个汉字`
,
validator
:
(
value
)
=>
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
maxNumber
*
2
)
{
return
{
type
:
'error'
,
message
:
`最长${maxNumber * 2}个字符,${maxNumber}个汉字`
};
}
else
{
return
null
;
}
}
}
}
/>)
}
</
SchemaForm
>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/components/submitResultModal/index.tsx
View file @
1e9d7809
...
...
@@ -82,7 +82,19 @@ const SubmitResultModal: React.FC<SubmitResultModalProps> = (props: any) => {
<
Form
.
Item
label=
'授标意见'
name=
'opinion'
rules=
{
[{
required
:
true
,
message
:
'请输入授标意见'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'请输入授标意见'
},
()
=>
({
validator
(
_
,
value
)
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
200
)
{
return
Promise
.
reject
(
new
Error
(
'最长200个字符,100个汉字'
));
}
else
{
return
Promise
.
resolve
();
}
},
})
]
}
>
<
Input
.
TextArea
rows=
{
3
}
maxLength=
{
200
}
placeholder=
"最长200个字符,100个汉字"
/>
</
Form
.
Item
>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyAdd/components/basic.tsx
View file @
1e9d7809
...
...
@@ -214,9 +214,21 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
<
Form
.
Item
label=
'竞价单摘要'
name=
'details'
rules=
{
[{
required
:
true
,
message
:
'请输入竞价单摘要'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'请输入竞价单摘要'
},
()
=>
({
validator
(
_
,
value
)
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
60
)
{
return
Promise
.
reject
(
new
Error
(
'最长60个字符,30个汉字'
));
}
else
{
return
Promise
.
resolve
();
}
},
})
]
}
>
<
Input
maxLength=
{
3
0
}
placeholder=
'最长60个字符,30个汉字'
/>
<
Input
maxLength=
{
6
0
}
placeholder=
'最长60个字符,30个汉字'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
{
<
Tooltip
placement=
"right"
title=
'设置了归属地市后,此商品可根据地市进行筛选,未设置时默认为所有地市'
>
适用地市
<
QuestionCircleOutlined
style=
{
{
marginLeft
:
'5px'
}
}
/></
Tooltip
>
}
...
...
@@ -232,6 +244,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
onChange=
{
(
value
)
=>
{
handProvince
(
value
,
idx
,
1
)
}
}
placeholder=
'请选择省'
>
{
province
.
map
(
items
=>
{
return
(
...
...
@@ -250,6 +263,7 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
onChange=
{
(
value
)
=>
{
handProvince
(
value
,
idx
,
2
)
}
}
placeholder=
'请选择市'
>
{
(
item
.
provinceCode
&&
city
.
length
>
0
&&
city
[
idx
])
&&
city
[
idx
].
citydata
.
map
(
items
=>
{
return
(
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyAdd/components/bidRequirement.tsx
View file @
1e9d7809
...
...
@@ -144,9 +144,21 @@ const BidRequirement: React.FC<Iprops> = (props: any) => {
<
Form
.
Item
label=
"报名要求"
name=
"demand"
rules=
{
[{
required
:
true
,
message
:
'请输入报名要求'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'请输入报名要求'
},
()
=>
({
validator
(
_
,
value
)
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
200
)
{
return
Promise
.
reject
(
new
Error
(
'最长200个字符,100个汉字'
));
}
else
{
return
Promise
.
resolve
();
}
},
})
]
}
>
<
TextArea
rows=
{
3
}
maxLength=
{
1
00
}
placeholder=
"最长200个字符,100个汉字"
/>
<
TextArea
rows=
{
3
}
maxLength=
{
2
00
}
placeholder=
"最长200个字符,100个汉字"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"报名要求附件"
...
...
@@ -156,10 +168,10 @@ const BidRequirement: React.FC<Iprops> = (props: any) => {
<
div
className=
{
styles
.
upload_data
}
>
{
files
.
length
>
0
&&
files
.
map
((
v
,
index
)
=>
(
<
div
key=
{
index
}
className=
{
styles
.
upload_item
}
>
<
div
className=
{
styles
.
upload_left
}
>
<
a
className=
{
styles
.
upload_left
}
href=
{
v
.
url
}
target=
'_blank'
>
<
LinkOutlined
/>
<
span
>
{
v
.
name
}
</
span
>
</
div
>
</
a
>
<
div
className=
{
styles
.
upload_right
}
onClick=
{
()
=>
removeFiles
(
index
)
}
>
<
DeleteOutlined
/>
</
div
>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyAdd/components/bidRules.tsx
View file @
1e9d7809
...
...
@@ -167,7 +167,11 @@ const BidRules: React.FC<Iprops> = (props: any) => {
})
]
}
>
<
Input
addonBefore=
{
'¥'
}
value=
{
startingPrice
}
onChange=
{
(
e
)
=>
{
<
Input
addonBefore=
{
'¥'
}
value=
{
startingPrice
}
placeholder=
'请输入起拍价'
onChange=
{
(
e
)
=>
{
let
_val
=
e
.
target
.
value
.
replace
(
/^
\D
*
(\d
*
(?:\.\d
{0,2}
)?)
.*$/g
,
'$1'
);
setStartingPrice
(
_val
);
form
.
setFieldsValue
({
startingPrice
:
_val
});
...
...
@@ -204,7 +208,11 @@ const BidRules: React.FC<Iprops> = (props: any) => {
})
]
}
>
<
Input
addonBefore=
{
'¥'
}
value=
{
targetPrice
}
onChange=
{
(
e
)
=>
{
<
Input
addonBefore=
{
'¥'
}
value=
{
targetPrice
}
placeholder=
'请输入目标价'
onChange=
{
(
e
)
=>
{
let
_val
=
e
.
target
.
value
.
replace
(
/^
\D
*
(\d
*
(?:\.\d
{0,2}
)?)
.*$/g
,
'$1'
);
setTargetPrice
(
_val
);
form
.
setFieldsValue
({
targetPrice
:
_val
});
...
...
@@ -241,7 +249,11 @@ const BidRules: React.FC<Iprops> = (props: any) => {
})
]
}
>
<
Input
addonBefore=
{
'¥'
}
value=
{
minPrice
}
onChange=
{
(
e
)
=>
{
<
Input
addonBefore=
{
'¥'
}
value=
{
minPrice
}
placeholder=
'请输入最小价差'
onChange=
{
(
e
)
=>
{
let
_val
=
e
.
target
.
value
.
replace
(
/^
\D
*
(\d
*
(?:\.\d
{0,2}
)?)
.*$/g
,
'$1'
);
setMinPrice
(
_val
);
form
.
setFieldsValue
({
minPrice
:
_val
});
...
...
@@ -272,7 +284,10 @@ const BidRules: React.FC<Iprops> = (props: any) => {
})
]
}
>
<
Input
value=
{
allowPurchaseCount
}
onChange=
{
(
e
)
=>
{
<
Input
value=
{
allowPurchaseCount
}
placeholder=
'请输入报价次数'
onChange=
{
(
e
)
=>
{
let
_val
=
e
.
target
.
value
.
replace
(
/
[^\d]
/g
,
''
).
replace
(
/^0{1,}/g
,
''
);
setAllowPurchaseCount
(
_val
);
form
.
setFieldsValue
({
allowPurchaseCount
:
_val
});
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyAdd/components/condition.tsx
View file @
1e9d7809
...
...
@@ -121,7 +121,7 @@ const Condition: React.FC<Iprops> = (props: any) => {
>
<
DatePicker
style=
{
{
width
:
'100%'
}
}
disabledDate=
{
(
current
)
=>
{
return
current
&&
current
<=
moment
().
startOf
(
'day'
)
return
current
&&
current
<=
moment
().
startOf
(
'day'
)
}
}
/>
</
Form
.
Item
>
...
...
@@ -132,6 +132,7 @@ const Condition: React.FC<Iprops> = (props: any) => {
>
<
Select
onSelect=
{
handleSelectAddress
}
placeholder=
'请选择交付地址'
>
{
address
.
map
(
v
=>
(
<
Option
key=
{
v
.
id
}
value=
{
v
.
id
}
>
{
v
.
fullAddress
}
</
Option
>
...
...
@@ -141,49 +142,121 @@ const Condition: React.FC<Iprops> = (props: any) => {
<
Form
.
Item
label=
"报价要求"
name=
"offer"
rules=
{
[{
required
:
true
,
message
:
'请输入报价要求'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'请输入报价要求'
},
()
=>
({
validator
(
_
,
value
)
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
100
)
{
return
Promise
.
reject
(
new
Error
(
'最长100个字符,50个汉字'
));
}
else
{
return
Promise
.
resolve
();
}
},
})
]
}
>
<
TextArea
rows=
{
3
}
maxLength=
{
5
0
}
placeholder=
"最长100个字符,50个汉字"
/>
<
TextArea
rows=
{
3
}
maxLength=
{
10
0
}
placeholder=
"最长100个字符,50个汉字"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"付款方式"
name=
"paymentType"
rules=
{
[{
required
:
true
,
message
:
'请输入付款方式'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'请输入付款方式'
},
()
=>
({
validator
(
_
,
value
)
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
100
)
{
return
Promise
.
reject
(
new
Error
(
'最长100个字符,50个汉字'
));
}
else
{
return
Promise
.
resolve
();
}
},
})
]
}
>
<
TextArea
rows=
{
3
}
maxLength=
{
5
0
}
placeholder=
"最长100个字符,50个汉字"
/>
<
TextArea
rows=
{
3
}
maxLength=
{
10
0
}
placeholder=
"最长100个字符,50个汉字"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"税费要求"
name=
"taxes"
rules=
{
[{
required
:
true
,
message
:
'请输入税费要求'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'请输入税费要求'
},
()
=>
({
validator
(
_
,
value
)
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
100
)
{
return
Promise
.
reject
(
new
Error
(
'最长100个字符,50个汉字'
));
}
else
{
return
Promise
.
resolve
();
}
},
})
]
}
>
<
TextArea
rows=
{
3
}
maxLength=
{
5
0
}
placeholder=
"最长100个字符,50个汉字"
/>
<
TextArea
rows=
{
3
}
maxLength=
{
10
0
}
placeholder=
"最长100个字符,50个汉字"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"物流要求"
name=
"logistics"
rules=
{
[{
required
:
true
,
message
:
'请输入物流要求'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'请输入物流要求'
},
()
=>
({
validator
(
_
,
value
)
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
100
)
{
return
Promise
.
reject
(
new
Error
(
'最长100个字符,50个汉字'
));
}
else
{
return
Promise
.
resolve
();
}
},
})
]
}
>
<
TextArea
rows=
{
3
}
maxLength=
{
5
0
}
placeholder=
"最长100个字符,50个汉字"
/>
<
TextArea
rows=
{
3
}
maxLength=
{
10
0
}
placeholder=
"最长100个字符,50个汉字"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"包装要求"
name=
"packRequire"
rules=
{
[{
required
:
true
,
message
:
'请输入包装要求'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'请输入包装要求'
},
()
=>
({
validator
(
_
,
value
)
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
100
)
{
return
Promise
.
reject
(
new
Error
(
'最长100个字符,50个汉字'
));
}
else
{
return
Promise
.
resolve
();
}
},
})
]
}
>
<
TextArea
rows=
{
3
}
maxLength=
{
5
0
}
placeholder=
"最长100个字符,50个汉字"
/>
<
TextArea
rows=
{
3
}
maxLength=
{
10
0
}
placeholder=
"最长100个字符,50个汉字"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"其他要求"
name=
"otherRequire"
rules=
{
[{
required
:
true
,
message
:
'请输入其他要求'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'请输入其他要求'
},
()
=>
({
validator
(
_
,
value
)
{
let
_str
=
value
;
_str
=
_str
.
replace
(
/
[\u
4E00-
\u
9FA5
]
/g
,
"AA"
);
if
(
_str
.
length
>
100
)
{
return
Promise
.
reject
(
new
Error
(
'最长100个字符,50个汉字'
));
}
else
{
return
Promise
.
resolve
();
}
},
})
]
}
>
<
TextArea
rows=
{
3
}
maxLength=
{
5
0
}
placeholder=
"最长100个字符,50个汉字"
/>
<
TextArea
rows=
{
3
}
maxLength=
{
10
0
}
placeholder=
"最长100个字符,50个汉字"
/>
</
Form
.
Item
>
</
Form
>
</>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyAdd/components/file.tsx
View file @
1e9d7809
...
...
@@ -90,10 +90,10 @@ const File: React.FC<IProps> = (props) => {
<
div
className=
{
styles
.
upload_data
}
>
{
files
.
length
>
0
&&
files
.
map
((
v
,
index
)
=>
(
<
div
key=
{
index
}
className=
{
styles
.
upload_item
}
>
<
div
className=
{
styles
.
upload_left
}
>
<
a
className=
{
styles
.
upload_left
}
href=
{
v
.
url
}
target=
'_blank'
>
<
LinkOutlined
/>
<
span
>
{
v
.
name
}
</
span
>
</
div
>
</
a
>
<
div
className=
{
styles
.
upload_right
}
onClick=
{
()
=>
removeFiles
(
index
)
}
>
<
DeleteOutlined
/>
</
div
>
...
...
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