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
8c43537a
Commit
8c43537a
authored
Sep 28, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善
parent
6459d24c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
135 additions
and
14 deletions
+135
-14
index.tsx
...chaseOrder/orderPreview/components/ContractList/index.tsx
+5
-5
index.less
...saleOrder/orderPreview/components/ContractList/index.less
+38
-0
index.tsx
.../saleOrder/orderPreview/components/ContractList/index.tsx
+71
-0
index.tsx
...aleOrder/orderPreview/components/orderMergeInfo/index.tsx
+19
-7
useBusinessEffects.ts
...kSellStorage/bills/addBills/effects/useBusinessEffects.ts
+2
-2
No files found.
src/pages/transaction/purchaseOrder/orderPreview/components/ContractList/index.tsx
View file @
8c43537a
import
React
from
'react'
;
import
{
FilePdf
Outlined
,
FileWordOutlined
,
FileOutlin
ed
}
from
'@ant-design/icons'
;
import
{
FilePdf
Filled
,
FileWordFilled
,
FileFill
ed
}
from
'@ant-design/icons'
;
import
{
PublicApi
}
from
'@/services/api'
import
styles
from
'./index.less'
;
...
...
@@ -13,9 +13,9 @@ interface ContractList {
};
const
IconMap
=
{
'.pdf'
:
<
FilePdf
Outlin
ed
/>
,
'.doc'
:
<
FileWord
Outlin
ed
/>
,
'.doxc'
:
<
FileWord
Outlin
ed
/>
,
'.pdf'
:
<
FilePdf
Fill
ed
/>
,
'.doc'
:
<
FileWord
Fill
ed
/>
,
'.doxc'
:
<
FileWord
Fill
ed
/>
,
};
const
ContractItem
:
React
.
FC
<
ContractItem
>
=
({
...
...
@@ -36,7 +36,7 @@ const ContractItem: React.FC<ContractItem> = ({
<
li
className=
{
styles
[
'contractList-item'
]
}
onClick=
{
()
=>
handleDownload
(
fileName
,
electronicContractUrl
)
}
>
<
a
>
<
div
className=
{
styles
[
'contractList-item-icon'
]
}
>
{
IconMap
[
suffix
]
||
<
File
Outlin
ed
/>
}
{
IconMap
[
suffix
]
||
<
File
Fill
ed
/>
}
</
div
>
<
div
className=
{
styles
[
'contractList-item-name'
]
}
...
...
src/pages/transaction/saleOrder/orderPreview/components/ContractList/index.less
0 → 100644
View file @
8c43537a
@import '../../../../../../global/styles/utils.less';
.contractList {
padding: 0;
margin: 0;
&-item {
padding: 6px 8px;
background: #F4F5F7;
border-radius: 4px;
list-style: none;
> a {
display: flex;
align-items: center;
}
&-icon {
flex-shrink: 0;
margin-right: 4px;
color: #7178EA;
}
&-name {
flex: 1;
.textOverflow();
}
&:not(:last-child) {
margin-bottom: 8px;
}
}
}
.noData {
color: #909399;
}
\ No newline at end of file
src/pages/transaction/saleOrder/orderPreview/components/ContractList/index.tsx
0 → 100644
View file @
8c43537a
import
React
from
'react'
;
import
{
FilePdfFilled
,
FileWordFilled
,
FileFilled
}
from
'@ant-design/icons'
;
import
{
PublicApi
}
from
'@/services/api'
import
styles
from
'./index.less'
;
interface
ContractItem
{
electronicContractUrl
?:
string
;
electronicContractName
?:
string
;
};
interface
ContractList
{
dataSource
:
ContractItem
[];
};
const
IconMap
=
{
'.pdf'
:
<
FilePdfFilled
/>
,
'.doc'
:
<
FileWordFilled
/>
,
'.doxc'
:
<
FileWordFilled
/>
,
};
const
ContractItem
:
React
.
FC
<
ContractItem
>
=
({
electronicContractUrl
,
electronicContractName
,
})
=>
{
const
index1
=
electronicContractUrl
.
lastIndexOf
(
'.'
);
const
suffix
=
electronicContractUrl
.
slice
(
index1
);
const
index2
=
electronicContractUrl
.
lastIndexOf
(
'/'
);
// 如果没有文件名,但是有链接就从链接截取文件名
const
fileName
=
electronicContractName
?
electronicContractName
:
electronicContractUrl
.
slice
(
index2
+
1
);
const
handleDownload
=
(
name
,
url
)
=>
{
window
.
location
.
href
=
`/api/order/contractTemplate/downloadContract?contractName=
${
name
}
&contractUrl=
${
url
}
`
;
};
return
(
<
li
className=
{
styles
[
'contractList-item'
]
}
onClick=
{
()
=>
handleDownload
(
fileName
,
electronicContractUrl
)
}
>
<
a
>
<
div
className=
{
styles
[
'contractList-item-icon'
]
}
>
{
IconMap
[
suffix
]
||
<
FileFilled
/>
}
</
div
>
<
div
className=
{
styles
[
'contractList-item-name'
]
}
title=
{
fileName
}
>
{
fileName
}
</
div
>
</
a
>
</
li
>
);
};
const
ContractList
:
React
.
FC
<
ContractList
>
=
({
dataSource
})
=>
{
if
(
!
Array
.
isArray
(
dataSource
))
{
return
<
div
className=
{
styles
.
noData
}
>
没有相关数据~
</
div
>;
}
return
(
<
ul
className=
{
styles
.
contractList
}
>
{
dataSource
.
map
((
item
,
index
)
=>
(
<
ContractItem
key=
{
index
}
electronicContractUrl=
{
item
.
electronicContractUrl
}
electronicContractName=
{
item
.
electronicContractName
}
/>
))
}
</
ul
>
);
};
export
default
ContractList
;
\ No newline at end of file
src/pages/transaction/saleOrder/orderPreview/components/orderMergeInfo/index.tsx
View file @
8c43537a
...
...
@@ -6,6 +6,7 @@ import { formatTimeString } from '@/utils'
import
{
DELIVERY_TYPE
}
from
'@/constants'
import
style
from
'./index.less'
import
{
PublicApi
}
from
'@/services/api'
import
ContractList
from
'../ContractList'
export
interface
OrderMergeInfoProps
{
}
const
payInfo
=
[
...
...
@@ -64,20 +65,31 @@ const OrderMergeInfo: React.FC<OrderMergeInfoProps> = (props) => {
}
return
(
<
Row
style=
{
{
marginTop
:
24
}
}
>
<
Row
style=
{
{
marginTop
:
24
}
}
gutter=
{
24
}
>
<
Col
span=
{
12
}
>
<
MellowCard
title=
'交易信息'
blockClassName=
{
style
.
fullHeight
}
className=
{
style
.
fullHeight
}
>
<
MellowCard
title=
'交易信息'
fullHeight
>
<
RenderCard
infoList=
{
payInfo
}
dataSource=
{
data
}
/>
</
MellowCard
>
</
Col
>
<
Col
span=
{
6
}
push=
{
1
}
>
<
MellowCard
title=
'其他信息'
blockClassName=
{
style
.
fullHeight
}
className=
{
style
.
fullHeight
}
>
<
Col
span=
{
6
}
>
<
MellowCard
title=
'其他信息'
fullHeight
>
<
RenderCard
infoList=
{
otherInfo
}
dataSource=
{
data
}
/>
</
MellowCard
>
</
Col
>
<
Col
span=
{
4
}
push=
{
2
}
>
<
MellowCard
title=
'电子合同'
blockClassName=
{
style
.
fullHeight
}
className=
{
style
.
fullHeight
}
>
<
RenderCard
infoList=
{
electronInfo
}
dataSource=
{
data
}
/>
<
Col
span=
{
6
}
>
<
MellowCard
title=
'电子合同'
fullHeight
>
<
ContractList
dataSource=
{
data
.
electronicContractUrl
?
[
{
electronicContractUrl
:
data
.
electronicContractUrl
,
electronicContractName
:
data
.
electronicContractName
,
},
]
:
null
}
/>
</
MellowCard
>
</
Col
>
</
Row
>
...
...
src/pages/transaction/stockSellStorage/bills/addBills/effects/useBusinessEffects.ts
View file @
8c43537a
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-2
5 18:28:47
* @LastEditTime: 2020-09-2
8 20:19:46
* @Description: 联动逻辑相关
*/
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
...
...
@@ -433,7 +433,7 @@ export const useBusinessEffects = (context, actions) => {
return
`invoicesDetailsRequests.
${
$1
}
.amount`
}),
state
=>
{
state
.
value
=
''
;
state
.
value
=
`¥
${(
+
value
*
current
.
price
).
toFixed
(
2
)}
`
;
}
);
});
...
...
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