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
bccb17f8
Commit
bccb17f8
authored
Jan 07, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 调整 Upload 数据结构
parent
a1dd8442
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
48 additions
and
31 deletions
+48
-31
index.tsx
src/components/NiceForm/components/AntUpload/index.tsx
+0
-2
index.tsx
...terService/components/RefundModal/UploadVoucher/index.tsx
+1
-1
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+1
-1
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+1
-1
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+1
-1
index.tsx
...dSettle/creditApplication/components/DetailInfo/index.tsx
+1
-1
index.tsx
...editApplication/components/QuotaApplicationInfo/index.tsx
+1
-11
index.tsx
...tion/quotaMenage/detail/components/IntroduceRow/index.tsx
+1
-1
useBusinessEffects.tsx
...Evaluation/received/detail/effects/useBusinessEffects.tsx
+3
-1
index.ts
...ction/purchaserEvaluation/received/detail/schema/index.ts
+7
-1
index.tsx
.../purchaserEvaluation/sent/components/DetailInfo/index.tsx
+1
-1
useBusinessEffects.tsx
...ation/unevaluated/evaluate/effects/useBusinessEffects.tsx
+3
-1
index.tsx
...action/purchaserEvaluation/unevaluated/evaluate/index.tsx
+1
-1
index.ts
.../purchaserEvaluation/unevaluated/evaluate/schema/index.ts
+6
-0
useBusinessEffects.tsx
...Evaluation/received/detail/effects/useBusinessEffects.tsx
+3
-1
index.ts
...action/supplierEvaluation/received/detail/schema/index.ts
+6
-0
index.tsx
...n/supplierEvaluation/sent/components/DetailInfo/index.tsx
+1
-1
useBusinessEffects.tsx
...ation/unevaluated/evaluate/effects/useBusinessEffects.tsx
+3
-1
index.tsx
...saction/supplierEvaluation/unevaluated/evaluate/index.tsx
+1
-1
index.ts
...n/supplierEvaluation/unevaluated/evaluate/schema/index.ts
+6
-0
index.tsx
src/utils/index.tsx
+0
-3
No files found.
src/components/NiceForm/components/AntUpload/index.tsx
View file @
bccb17f8
...
...
@@ -242,8 +242,6 @@ export const Upload = connect({
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const
{
listType
,
locale
,
onChange
,
value
,
...
others
}
=
this
.
props
console
.
log
(
'this.state.value'
,
this
.
state
.
value
)
if
(
listType
.
indexOf
(
'card'
)
>
-
1
)
{
return
(
<
AntdUpload
...
...
src/pages/afterService/components/RefundModal/UploadVoucher/index.tsx
View file @
bccb17f8
...
...
@@ -100,7 +100,7 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
...
rest
,
fileList
:
fileList
.
map
(
item
=>
item
.
status
===
'done'
&&
({
name
:
item
.
name
,
proveUrl
:
item
.
data
.
url
,
proveUrl
:
item
.
url
,
})).
filter
(
Boolean
),
},
},
'uploadVoucher'
);
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
bccb17f8
...
...
@@ -359,7 +359,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
},
proofFileList
:
proofFileList
.
filter
(
item
=>
item
.
status
===
'done'
).
map
(
item
=>
({
fileName
:
item
.
name
,
filePath
:
item
.
data
.
url
,
filePath
:
item
.
url
,
})),
replaceGoodsList
:
replaceGoodsList
.
map
(({
replaceCount
,
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
bccb17f8
...
...
@@ -207,7 +207,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
repairAddress
:
repairAddress
?
JSON
.
stringify
(
repairAddress
)
:
''
,
faultFileList
:
faultFileList
.
filter
(
item
=>
item
.
status
===
'done'
).
map
(
item
=>
({
fileName
:
item
.
name
,
filePath
:
item
.
data
.
url
,
filePath
:
item
.
url
,
})),
repairGoodsList
:
repairGoodsList
.
map
(({
repairCount
,
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
bccb17f8
...
...
@@ -358,7 +358,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
},
proofFileList
:
proofFileList
.
filter
(
item
=>
item
.
status
===
'done'
).
map
(
item
=>
({
fileName
:
item
.
name
,
filePath
:
item
.
data
.
url
,
filePath
:
item
.
url
,
})),
returnGoodsList
:
returnGoodsList
.
map
(({
id
,
...
...
src/pages/payandSettle/creditApplication/components/DetailInfo/index.tsx
View file @
bccb17f8
...
...
@@ -103,7 +103,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
PublicApi
.
postPayCreditApplyAddCreditApply
({
applyId
:
+
id
,
creditId
:
creditId
?
+
creditId
:
0
,
fileList
:
fileList
.
map
((
item
:
any
)
=>
({
name
:
item
.
name
,
fileUrl
:
item
.
data
.
url
})),
fileList
:
fileList
.
map
((
item
:
any
)
=>
({
name
:
item
.
name
,
fileUrl
:
item
.
url
})),
...
rest
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
src/pages/payandSettle/creditApplication/components/QuotaApplicationInfo/index.tsx
View file @
bccb17f8
...
...
@@ -81,17 +81,7 @@ const QuotaApplicationInfo: React.FC<QuotaApplicationInfo> = ({
applyQuota
:
+
applyQuota
,
billDay
:
+
billDay
,
repayPeriod
:
+
repayPeriod
,
fileList
:
fileList
.
filter
(
item
=>
item
.
status
===
'done'
)
.
map
(
item
=>
{
const
{
data
,
...
rest
}
=
item
;
return
{
...
rest
,
url
:
data
.
url
,
data
:
data
,
}
}),
fileList
:
fileList
.
filter
(
item
=>
item
.
status
===
'done'
),
...
rest
,
});
setModalVisible
(
false
);
...
...
src/pages/payandSettle/creditApplication/quotaMenage/detail/components/IntroduceRow/index.tsx
View file @
bccb17f8
...
...
@@ -315,7 +315,7 @@ class IntroduceRow extends React.Component<IntroduceRowProps, IntroduceRowState>
...
repaymentValues
,
payProveList
:
payProveList
.
map
(
item
=>
item
.
status
===
'done'
&&
({
name
:
item
.
name
,
proveUrl
:
item
.
data
.
url
,
proveUrl
:
item
.
url
,
})).
filter
(
Boolean
),
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
src/pages/transaction/purchaserEvaluation/received/detail/effects/useBusinessEffects.tsx
View file @
bccb17f8
...
...
@@ -18,7 +18,9 @@ export const useBusinessEffects = (context, actions) => {
return
`comments.
${
$1
}
.picture`
}),
state
=>
{
state
.
props
[
'x-component-props'
].
disabled
=
value
.
length
>=
4
;
// 禁用掉 或者 editable 设置成 false,删除按钮也会禁用掉的
// 所以目前先用过 rules 去限制最多可上传多少张
// state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
...
...
src/pages/transaction/purchaserEvaluation/received/detail/schema/index.ts
View file @
bccb17f8
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-23 17:00:24
* @LastEditors: XieZhiXiong
* @LastEditTime: 202
0-10-21 13:47:51
* @LastEditTime: 202
1-01-07 15:13:26
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -76,6 +76,12 @@ export const evaluateSchema: ISchema = {
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-rules'
:
[
{
len
:
4
,
message
:
'最多可上传4张图片'
,
},
],
'x-mega-props'
:
{
addonAfter
:
'{{UploadTip}}'
,
},
...
...
src/pages/transaction/purchaserEvaluation/sent/components/DetailInfo/index.tsx
View file @
bccb17f8
...
...
@@ -117,7 +117,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
id
,
star
,
comment
,
pics
:
picture
.
map
(
item
=>
item
.
status
===
'done'
&&
item
.
data
.
url
).
filter
(
Boolean
),
pics
:
picture
.
map
(
item
=>
item
.
status
===
'done'
&&
item
.
url
).
filter
(
Boolean
),
};
});
...
...
src/pages/transaction/purchaserEvaluation/unevaluated/evaluate/effects/useBusinessEffects.tsx
View file @
bccb17f8
...
...
@@ -18,7 +18,9 @@ export const useBusinessEffects = (context, actions) => {
return
`comments.
${
$1
}
.picture`
}),
state
=>
{
state
.
props
[
'x-component-props'
].
disabled
=
value
.
length
>=
4
;
// 禁用掉 或者 editable 设置成 false,删除按钮也会禁用掉的
// 所以目前先用过 rules 去限制最多可上传多少张
// state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
...
...
src/pages/transaction/purchaserEvaluation/unevaluated/evaluate/index.tsx
View file @
bccb17f8
...
...
@@ -99,7 +99,7 @@ const EvaluateOrder: React.FC = () => {
unit
:
good
.
unit
,
price
:
good
.
price
,
totalPrice
:
good
.
totalPrice
,
pics
:
picture
.
map
(
item
=>
item
.
status
===
'done'
&&
item
.
data
.
url
).
filter
(
Boolean
),
pics
:
picture
.
map
(
item
=>
item
.
status
===
'done'
&&
item
.
url
).
filter
(
Boolean
),
};
});
...
...
src/pages/transaction/purchaserEvaluation/unevaluated/evaluate/schema/index.ts
View file @
bccb17f8
...
...
@@ -77,6 +77,12 @@ export const evaluateSchema: ISchema = {
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-rules'
:
[
{
len
:
4
,
message
:
'最多可上传4张图片'
,
},
],
'x-mega-props'
:
{
addonAfter
:
'{{UploadTip}}'
,
},
...
...
src/pages/transaction/supplierEvaluation/received/detail/effects/useBusinessEffects.tsx
View file @
bccb17f8
...
...
@@ -18,7 +18,9 @@ export const useBusinessEffects = (context, actions) => {
return
`comments.
${
$1
}
.picture`
}),
state
=>
{
state
.
props
[
'x-component-props'
].
disabled
=
value
.
length
>=
4
;
// 禁用掉 或者 editable 设置成 false,删除按钮也会禁用掉的
// 所以目前先用过 rules 去限制最多可上传多少张
// state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
...
...
src/pages/transaction/supplierEvaluation/received/detail/schema/index.ts
View file @
bccb17f8
...
...
@@ -76,6 +76,12 @@ export const evaluateSchema: ISchema = {
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-rules'
:
[
{
len
:
4
,
message
:
'最多可上传4张图片'
,
},
],
'x-mega-props'
:
{
addonAfter
:
'{{UploadTip}}'
,
},
...
...
src/pages/transaction/supplierEvaluation/sent/components/DetailInfo/index.tsx
View file @
bccb17f8
...
...
@@ -116,7 +116,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
id
,
star
,
comment
,
pics
:
picture
.
map
(
item
=>
item
.
status
===
'done'
&&
item
.
data
.
url
).
filter
(
Boolean
),
pics
:
picture
.
map
(
item
=>
item
.
status
===
'done'
&&
item
.
url
).
filter
(
Boolean
),
};
});
...
...
src/pages/transaction/supplierEvaluation/unevaluated/evaluate/effects/useBusinessEffects.tsx
View file @
bccb17f8
...
...
@@ -18,7 +18,9 @@ export const useBusinessEffects = (context, actions) => {
return
`comments.
${
$1
}
.picture`
}),
state
=>
{
state
.
props
[
'x-component-props'
].
disabled
=
value
.
length
>=
4
;
// 禁用掉 或者 editable 设置成 false,删除按钮也会禁用掉的
// 所以目前先用过 rules 去限制最多可上传多少张
// state.props['x-component-props'].disabled = value.length >= 4;
}
);
});
...
...
src/pages/transaction/supplierEvaluation/unevaluated/evaluate/index.tsx
View file @
bccb17f8
...
...
@@ -99,7 +99,7 @@ const EvaluateOrder: React.FC = () => {
unit
:
good
.
unit
,
price
:
good
.
price
,
totalPrice
:
good
.
totalPrice
,
pics
:
picture
.
map
(
item
=>
item
.
status
===
'done'
&&
item
.
data
.
url
).
filter
(
Boolean
),
pics
:
picture
.
map
(
item
=>
item
.
status
===
'done'
&&
item
.
url
).
filter
(
Boolean
),
};
});
...
...
src/pages/transaction/supplierEvaluation/unevaluated/evaluate/schema/index.ts
View file @
bccb17f8
...
...
@@ -77,6 +77,12 @@ export const evaluateSchema: ISchema = {
beforeUpload
:
'{{beforeUpload}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-rules'
:
[
{
len
:
4
,
message
:
'最多可上传4张图片'
,
},
],
'x-mega-props'
:
{
addonAfter
:
'{{UploadTip}}'
,
},
...
...
src/utils/index.tsx
View file @
bccb17f8
...
...
@@ -448,9 +448,6 @@ export function normalizeFiledata(url: any): any {
name
:
fileName
,
status
:
'done'
,
url
,
data
:
{
url
,
},
// formily Upload value 需要这个字段
};
};
...
...
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