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
7d1a0658
Commit
7d1a0658
authored
Dec 22, 2020
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
7d14c639
bd6c9875
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
1002 additions
and
615 deletions
+1002
-615
index.tsx
src/components/ModalTable/index.tsx
+0
-0
CustomRelevance.tsx
src/components/NiceForm/components/CustomRelevance.tsx
+3
-0
BasicLayout.tsx
src/layouts/BasicLayout.tsx
+1
-1
MenuSlider.tsx
src/layouts/components/MenuSlider.tsx
+0
-0
info.tsx
src/pages/balance/settleRules/memberSettle/info.tsx
+1
-0
index.tsx
src/pages/handling/assign/add/index.tsx
+15
-3
index.tsx
src/pages/handling/assign/detail/index.tsx
+20
-9
index.tsx
src/pages/handling/assign/processStock/index.tsx
+4
-3
index.tsx
src/pages/handling/common/index.tsx
+2
-1
index.tsx
src/pages/handling/components/Appendix/index.tsx
+1
-23
content.tsx
src/pages/handling/components/ProcessDetail/content.tsx
+4
-0
index.tsx
src/pages/handling/components/ProcessDetail/index.tsx
+21
-6
FileList.tsx
src/pages/handling/components/UploadFile/FileList.tsx
+15
-2
AfterSoldCenter.tsx
src/pages/home/components/Centers/AfterSoldCenter.tsx
+3
-3
FundCenter.tsx
src/pages/home/components/Centers/FundCenter.tsx
+4
-22
LogisticsCenter.tsx
src/pages/home/components/Centers/LogisticsCenter.tsx
+2
-2
ProcessCenter.tsx
src/pages/home/components/Centers/ProcessCenter.tsx
+3
-24
ProductCenter.tsx
src/pages/home/components/Centers/ProductCenter.tsx
+3
-3
SettlementCenter.tsx
src/pages/home/components/Centers/SettlementCenter.tsx
+5
-5
ShopCenter.tsx
src/pages/home/components/Centers/ShopCenter.tsx
+10
-6
TradeCenter.tsx
src/pages/home/components/Centers/TradeCenter.tsx
+3
-3
index.less
src/pages/home/components/UserCenter/index.less
+57
-49
index.tsx
src/pages/home/components/UserCenter/index.tsx
+25
-43
index.less
src/pages/home/index.less
+37
-82
index.tsx
src/pages/home/index.tsx
+27
-31
columns.ts
...on/stockSellStorage/bills/components/BillsForm/columns.ts
+187
-0
useBusinessEffects.ts
.../bills/components/BillsForm/effects/useBusinessEffects.ts
+74
-258
fetchBillList.ts
...ckSellStorage/bills/components/BillsForm/fetchBillList.ts
+280
-0
index.tsx
...ion/stockSellStorage/bills/components/BillsForm/index.tsx
+117
-36
index.ts
...ockSellStorage/bills/components/BillsForm/schema/index.ts
+78
-0
No files found.
src/components/ModalTable/index.tsx
View file @
7d1a0658
src/components/NiceForm/components/CustomRelevance.tsx
View file @
7d1a0658
...
...
@@ -120,6 +120,9 @@ const Relevance = props => {
fetchTableData=
{
fetchTableData
}
formilyProps=
{
formilyProps
}
tableProps=
{
tableProps
}
resetModal=
{
{
destroyOnClose
:
true
,
}
}
/>
</
RowStyleLayout
>
);
...
...
src/layouts/BasicLayout.tsx
View file @
7d1a0658
...
...
@@ -141,7 +141,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
return
(
<
ProLayout
pageTitleRender=
{
()
=>
currentRouter
?
currentRouter
.
name
:
window
.
location
.
href
}
style=
{
{
minHeight
:
'100vh'
}
}
style=
{
{
minHeight
:
'100vh'
,
minWidth
:
"1500px"
}
}
logo=
{
logo
}
formatMessage=
{
formatMessage
}
menuHeaderRender=
{
(
logoDom
,
titleDom
)
=>
(
...
...
src/layouts/components/MenuSlider.tsx
View file @
7d1a0658
src/pages/balance/settleRules/memberSettle/info.tsx
View file @
7d1a0658
...
...
@@ -209,6 +209,7 @@ const MemberSettleAdd: React.FC = () => {
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
window
.
history
.
back
()
}
extra=
{
[
<
Button
loading=
{
submitLoading
}
key=
"1"
type=
"primary"
onClick=
{
handleClick
}
>
保存
...
...
src/pages/handling/assign/add/index.tsx
View file @
7d1a0658
import
React
,
{
useEffect
,
useState
,
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
}
from
'@ant-design/icons'
;
import
{
Button
,
Card
,
Select
,
DatePicker
,
Radio
,
Table
,
Space
,
message
}
from
'antd'
;
import
{
Button
,
Card
,
Select
,
DatePicker
,
Radio
,
Table
,
Space
,
message
,
Modal
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
...
...
@@ -404,7 +404,7 @@ const Add: React.FC<{}> = () => {
})
}
const
handleChangeSomeList
=
(
values
:
any
)
=>
{
const
handleChangeSomeList
=
(
values
:
any
,
onOk
,
onCancel
)
=>
{
const
isProcessProduct
=
formActions
.
getFieldValue
(
'source'
)
===
2
;
const
keyName
=
isProcessProduct
?
'Tabs.tab-2.layout.productList'
:
'Tabs.tab-2.layout.orderList'
let
someList
=
formActions
.
getFieldValue
(
keyName
);
...
...
@@ -419,9 +419,21 @@ const Add: React.FC<{}> = () => {
productProps
:
values
.
productProps
,
files
:
values
.
files
}
console
.
log
(
someList
)
if
(
!
isProcessProduct
&&
values
.
process
.
quantity
>
someList
[
index
].
restTotal
)
{
Modal
.
confirm
({
title
:
'当前编辑的商品加工数量大于剩余加工数量,是否继续?'
,
onOk
:
()
=>
{
formActions
.
setFieldValue
(
keyName
,
[...
someList
])
!!
onOk
&&
onOk
();
}
})
}
else
{
formActions
.
setFieldValue
(
keyName
,
[...
someList
])
!!
onOk
&&
onOk
();
}
}
}
/**
...
...
src/pages/handling/assign/detail/index.tsx
View file @
7d1a0658
...
...
@@ -97,6 +97,19 @@ const Detail: React.FC<{}> = () => {
}
return
res
;
},
[
info
])
const
hasProductNoReply
=
useMemo
(()
=>
{
let
res
=
false
if
(
pathname
===
`
${
PENDING_RECEIPT_PATH
}
/detail`
)
{
if
(
!
info
||
!
info
.
pnoReceiveDeliverDetailDOList
)
{
return
false
}
res
=
info
.
pnoReceiveDeliverDetailDOList
.
some
((
item
)
=>
{
return
item
.
receiptStatus
===
1
});
return
res
}
return
res
;
},
[
info
])
const
getInfo
=
()
=>
{
const
service
=
SERVICE_MAP
[
pathname
];
...
...
@@ -230,12 +243,16 @@ const Detail: React.FC<{}> = () => {
const
NextBtn
=
<
Button
loading=
{
loading
}
icon=
{
<
SaveOutlined
/>
}
onClick=
{
toNext
}
type=
"primary"
>
提交
</
Button
>
const
AllReceiptReceive
=
(
<
Space
direction=
{
"vertical"
}
>
<
Popconfirm
title=
{
hasProductNoDelievery
?
'您还有未发货的商品,是否确认全部发货已完成'
:
'确认本单全部发货单是否已全部收到回单'
}
{
hasProductNoReply
?
<
Popconfirm
title=
{
'确认本单全部发货单是否已全部收到回单'
}
onConfirm=
{
()
=>
handleAllReceiptReceive
(
true
)
}
>
<
Button
loading=
{
loading
}
type=
"primary"
style=
{
{
width
:
'100%'
}
}
>
确认本单全部发货单已收到回单
</
Button
>
</
Popconfirm
>
:
null
}
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-end'
}
}
>
<
Popconfirm
title=
{
hasProductNoDelievery
?
'是否继续发货'
:
'您商品都已发货,是否确认还需要继续发货'
}
...
...
@@ -339,7 +356,7 @@ const Detail: React.FC<{}> = () => {
style=
{
{
padding
:
'0 32px'
,
fontWeight
:
400
}
}
colon=
{
false
}
>
<
Descriptions
.
Item
span=
{
3
}
label=
"通知单摘要:"
style=
{
{
overflow
:
'hidden'
}
}
>
{
info
?.
summary
}
我额时代峻峰卡德加弗兰克敬爱的封了就枯鲁杜鹃发大数据觉得封了就艾迪康类父节点拉屎发送到咖啡机的律师费
</
Descriptions
.
Item
>
<
Descriptions
.
Item
span=
{
3
}
label=
"通知单摘要:"
style=
{
{
overflow
:
'hidden'
}
}
>
{
info
?.
summary
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"加工企业:"
>
{
info
?.
processName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"单据时间:"
>
{
info
&&
info
.
createTime
&&
moment
(
info
.
createTime
).
format
(
'YYYY-MM-DD'
)
||
null
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"通知单来源:"
>
{
info
?.
source
==
'1'
?
'订单加工'
:
'商品加工'
}
</
Descriptions
.
Item
>
...
...
@@ -460,12 +477,6 @@ const Detail: React.FC<{}> = () => {
<
Appendix
files=
{
info
.
otherAsk
?.
annex
}
/>
</
div
>
</
div
>
{
/* <Row justify="space-between">
<Col flex={8}>
</Col>
<Col flex={2} style={{marginLeft: '20px'}} >
</Col>
</Row> */
}
</
div
>
<
div
style=
{
{
marginTop
:
'20px'
}
}
>
<
Card
bodyStyle=
{
{
padding
:
'10px 24px 24px 24px'
}
}
>
...
...
src/pages/handling/assign/processStock/index.tsx
View file @
7d1a0658
...
...
@@ -135,16 +135,17 @@ const processStock: React.FC<{}> = () => {
}
},
{
title
:
()
=>
pathname
==
PENDING_ADD_PROCESS_PATH
?
'入库单号'
:
'发货单号'
,
title
:
()
=>
[
PENDING_ADD_PROCESS_PATH
,
ASSIGN_PENDING_RECEIVE
].
includes
(
pathname
)
?
'入库单号'
:
'发货单号'
,
dataIndex
:
'deliveryNo'
,
render
:
(
text
,
record
:
any
)
=>
{
if
(
!
text
)
{
return
null
}
const
url
=
'/memberCenter/tranactionAbility/stockSellStorage/bills/detail'
;
const
type
=
pathname
==
PENDING_ADD_PROCESS_PATH
?
DOC_TYPE_PROCESS_RECEIPT
:
DOC_TYPE_PROCESS_INVOICE
const
type
=
[
PENDING_ADD_PROCESS_PATH
,
ASSIGN_PENDING_RECEIVE
].
includes
(
pathname
)
?
'storage'
:
'delivery'
const
id
=
type
===
'storage'
?
record
.
storageId
:
record
.
deliveryId
return
(
<
EyePreview
url=
{
`${url}?id=${
record.id}`
}
>
{
text
}
</
EyePreview
>
<
EyePreview
url=
{
`${url}?id=${
id}`
}
>
{
record
[
`${type}No`
]
}
</
EyePreview
>
)
}
},
...
...
src/pages/handling/common/index.tsx
View file @
7d1a0658
...
...
@@ -180,8 +180,9 @@ export const SUPPLIER_INNER_STATUS_COLOR = {
"3"
:
"processing"
,
'4'
:
'processing'
,
"5"
:
"success"
,
"7"
:
"processing"
,
"9"
:
"error"
,
"10"
:
"success"
"10"
:
"success"
,
}
...
...
src/pages/handling/components/Appendix/index.tsx
View file @
7d1a0658
...
...
@@ -24,37 +24,15 @@ const styles = {
const
AppendixItem
=
(
props
)
=>
{
const
handleDownload
=
(
name
:
string
,
url
:
string
)
=>
{
console
.
log
(
url
,
name
);
let
link
=
document
.
createElement
(
"a"
);
link
.
style
.
display
=
"none"
;
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
name
+
'.txt'
);
link
.
setAttribute
(
"download"
,
name
);
document
.
body
.
appendChild
(
link
)
//a标签插至页面中
link
.
click
();
document
.
body
.
removeChild
(
link
);
}
const
downloadUrlFile
=
(
name
,
url
)
=>
{
const
xhr
=
new
XMLHttpRequest
()
xhr
.
open
(
'GET'
,
url
,
true
)
xhr
.
responseType
=
'blob'
xhr
.
onload
=
()
=>
{
if
(
xhr
.
status
===
200
)
{
saveAs
(
xhr
.
response
,
name
)
}
}
xhr
.
send
()
}
const
saveAs
=
(
data
,
name
)
=>
{
var
urlObject
=
window
.
URL
var
export_blob
=
new
Blob
([
data
]);
var
save_link
=
document
.
createElement
(
"a"
);
save_link
.
href
=
urlObject
.
createObjectURL
(
export_blob
);
save_link
.
download
=
name
;
save_link
.
click
();
}
return
(
<
div
style=
{
styles
}
>
...
...
src/pages/handling/components/ProcessDetail/content.tsx
View file @
7d1a0658
...
...
@@ -27,6 +27,10 @@ const schema = {
{
required
:
true
,
message
:
'请填写加工数量'
},
{
pattern
:
/^
\d
+$/
,
message
:
'请填写数字'
}
]
},
...
...
src/pages/handling/components/ProcessDetail/index.tsx
View file @
7d1a0658
...
...
@@ -5,7 +5,7 @@ import { PublicApi } from '@/services/api'
interface
Iprops
{
type
:
"view"
|
"edit"
,
// veiw | edit,
submit
?:
(
params
:
any
)
=>
void
,
submit
?:
(
params
:
any
,
onOk
,
onCancel
)
=>
void
,
// id: string,
// primaryKey: string
quantity
?:
string
,
...
...
@@ -73,16 +73,31 @@ const ProcessDetail: React.FC<Iprops> = (props) => {
setFiles
(
props
.
files
);
},
[
props
.
files
])
useEffect
(()
=>
{
setInfo
((
prevState
)
=>
{
return
{
...
prevState
,
quantity
:
props
.
quantity
,
processUnitPrice
:
props
.
processUnitPrice
}
})
},
[
props
.
quantity
,
props
.
processUnitPrice
])
const
formSubmit
=
(
values
)
=>
{
!!
props
.
submit
&&
props
.
submit
({
!!
props
.
submit
&&
props
.
submit
(
{
files
:
files
,
uniqueID
:
props
.
uniqueID
,
process
:
values
,
productProps
:
info
?.
attributes
})
},
()
=>
{
setVisible
(
false
);
console
.
log
(
"fuck"
);
},
()
=>
{
console
.
log
(
"error"
)
}
)
}
const
fileOnChange
=
(
values
)
=>
{
...
...
@@ -109,7 +124,7 @@ const ProcessDetail: React.FC<Iprops> = (props) => {
取消
</
Button
>
<
Button
onClick=
{
handleSubmit
}
type=
"primary"
>
确认
{
visible
}
确认
</
Button
>
</
div
>
}
...
...
src/pages/handling/components/UploadFile/FileList.tsx
View file @
7d1a0658
...
...
@@ -26,15 +26,28 @@ interface Iprops {
const
FileList
:
React
.
FC
<
Iprops
>
=
(
props
)
=>
{
const
{
name
,
url
}
=
props
;
const
handleDownload
=
(
name
:
string
,
url
:
string
)
=>
{
let
link
=
document
.
createElement
(
"a"
);
link
.
style
.
display
=
"none"
;
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
name
);
document
.
body
.
appendChild
(
link
)
//a标签插至页面中
link
.
click
();
document
.
body
.
removeChild
(
link
);
}
return
(
<
div
className=
{
styles
.
item
}
>
<
div
className=
{
styles
.
icon
}
>
<
img
src=
{
pdf_icon
}
className=
{
styles
.
img
}
/>
</
div
>
<
a
className=
{
styles
.
fileName
}
download=
{
name
}
href=
{
url
}
target=
{
"_blank"
}
>
{
name
}
</
a
>
<
div
className=
{
styles
.
remove
}
onClick=
{
()
=>
!!
props
.
removeFile
&&
props
.
removeFile
(
name
)
}
>
<
div
className=
{
styles
.
fileName
}
onClick=
{
()
=>
handleDownload
(
name
,
url
)
}
>
{
name
}
</
div
>
{
!!
props
.
removeFile
&&
<
div
className=
{
styles
.
remove
}
onClick=
{
()
=>
props
.
removeFile
(
name
)
}
>
<
DeleteOutlined
/>
</
div
>
}
</
div
>
)
}
...
...
src/pages/home/components/Centers/AfterSoldCenter.tsx
View file @
7d1a0658
...
...
@@ -53,12 +53,12 @@ const SettlementAbility: React.FC<Iprops> = () => {
:
Object
.
keys
(
requestData
).
map
((
record
)
=>
{
return
(
<
Row
key=
{
record
}
className=
{
styles
.
row
}
>
<
Col
xxl=
{
4
}
xl=
{
4
}
lg=
{
24
}
md=
{
24
}
sm=
{
2
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
xxl=
{
20
}
xl=
{
20
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
className=
{
styles
.
colRow
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
Col
xxl=
{
4
}
xl=
{
6
}
lg=
{
6
}
md=
{
6
}
sm=
{
12
}
xs=
{
2
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
Col
span=
{
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
...
...
src/pages/home/components/Centers/FundCenter.tsx
View file @
7d1a0658
...
...
@@ -64,24 +64,6 @@ const FundCenter: React.FC<Iprops> = () => {
?
<
Skeleton
active
/>
:
(
<>
{
/* <div className={styles.tags}>
{
tagsList.map((item) => {
const hasAuth = !urls.includes(item.url);
if(!hasAuth) {
return null
}
return (
<Link to={item.url} className={styles.tagsItem} key={item.text}>
<div className={styles.icon}>
<img src={item.icon} />
</div>
<div className={styles.text}>{item.text}</div>
</Link>
)
})
}
</div> */
}
<
Row
gutter=
{
[
16
,
16
]
}
>
{
tagsList
.
map
((
item
)
=>
{
...
...
@@ -90,7 +72,7 @@ const FundCenter: React.FC<Iprops> = () => {
return
null
}
return
(
<
Col
xxl=
{
5
}
xl=
{
12
}
lg=
{
8
}
md=
{
12
}
sm=
{
24
}
xs=
{
2
4
}
key=
{
item
.
text
}
>
<
Col
span=
{
4
}
key=
{
item
.
text
}
>
<
Link
to=
{
item
.
url
}
className=
{
styles
.
tagsItem
}
>
<
div
className=
{
styles
.
icon
}
>
<
img
src=
{
item
.
icon
}
/>
...
...
@@ -107,12 +89,12 @@ const FundCenter: React.FC<Iprops> = () => {
Object
.
keys
(
requestData
).
map
((
item
)
=>
{
return
(
<
Row
key=
{
item
}
className=
{
styles
.
row
}
>
<
Col
xxl=
{
4
}
xl=
{
4
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
xs=
{
24
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TO_TITLE
[
item
]
}
</
Col
>
<
Col
xxl=
{
20
}
xl=
{
20
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
xs=
{
24
}
className=
{
styles
.
colRow
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TO_TITLE
[
item
]
}
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
{
requestData
[
item
].
map
((
record
)
=>
{
return
(
<
Col
xxl=
{
4
}
xl=
{
6
}
lg=
{
8
}
md=
{
8
}
sm=
{
12
}
xs=
{
24
}
key=
{
record
.
name
}
className=
{
styles
.
col
}
>
<
Col
span=
{
4
}
key=
{
record
.
name
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
record
.
name
}
</
div
>
{
record
.
link
...
...
src/pages/home/components/Centers/LogisticsCenter.tsx
View file @
7d1a0658
...
...
@@ -73,7 +73,7 @@ const LogisticsCenter: React.FC<Iprops> = () => {
loading
?
<
Skeleton
active
/>
:
<>
<
Row
gutter=
{
[
16
,
16
]
}
>
<
Row
gutter=
{
[
24
,
16
]
}
>
{
data
.
map
((
item
)
=>
{
const
hasAuth
=
!
urls
.
includes
(
item
.
url
);
...
...
@@ -81,7 +81,7 @@ const LogisticsCenter: React.FC<Iprops> = () => {
return
null
}
return
(
<
Col
xxl=
{
5
}
xl=
{
12
}
lg=
{
8
}
md=
{
12
}
sm=
{
24
}
xs=
{
2
4
}
key=
{
item
.
text
}
>
<
Col
span=
{
4
}
key=
{
item
.
text
}
>
<
Link
to=
{
item
.
url
}
className=
{
styles
.
tagsItem
}
>
<
div
className=
{
styles
.
icon
}
>
<
img
src=
{
item
.
icon
}
/>
...
...
src/pages/home/components/Centers/ProcessCenter.tsx
View file @
7d1a0658
...
...
@@ -44,12 +44,12 @@ const ProcessCenter: React.FC<Iprops> = () => {
:
Object
.
keys
(
requestData
).
map
((
record
)
=>
{
return
(
<
Row
key=
{
record
}
className=
{
styles
.
row
}
>
<
Col
xxl=
{
4
}
xl=
{
4
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
xs=
{
2
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
xxl=
{
20
}
xl=
{
20
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
xs=
{
24
}
className=
{
styles
.
colRow
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
Col
xxl=
{
4
}
xl=
{
6
}
lg=
{
8
}
md=
{
8
}
sm=
{
12
}
xs=
{
2
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
Col
span=
{
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
...
...
@@ -69,27 +69,6 @@ const ProcessCenter: React.FC<Iprops> = () => {
)
}
}
{
/* {
data.map((record) => {
return (
<Row key={record.id} className={styles.row}>
<Col span={4} className={styles.rowTitle}>平台代收账款结算</Col>
<Col span={20} className={styles.colRow}>
{
record.list.map((item) => {
return (
<Col span={4} key={item} className={styles.col}>
<div className={styles.colTitle}>待提交审核咨询单</div>
<div className={styles.colValue}>5</div>
</Col>
)
})
}
</Col>
</Row>
)
})
} */
}
</
AbilityContainer
>
)
...
...
src/pages/home/components/Centers/ProductCenter.tsx
View file @
7d1a0658
...
...
@@ -59,12 +59,12 @@ const ProductCenter: React.FC<Iprops> = () => {
?
<
Skeleton
active
/>
:
<>
<
Row
className=
{
styles
.
row
}
>
<
Col
xxl=
{
4
}
xl=
{
4
}
lg=
{
24
}
md=
{
24
}
sm=
{
2
4
}
className=
{
styles
.
rowTitle
}
>
商品
</
Col
>
<
Col
xxl=
{
20
}
xl=
{
20
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
className=
{
styles
.
colRow
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
商品
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
{
isArray
&&
requestData
.
map
((
item
)
=>
{
return
(
<
Col
xxl=
{
4
}
xl=
{
6
}
lg=
{
8
}
md=
{
8
}
sm=
{
12
}
xs=
{
2
4
}
key=
{
item
.
name
}
className=
{
styles
.
col
}
>
<
Col
span=
{
4
}
key=
{
item
.
name
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
...
...
src/pages/home/components/Centers/SettlementCenter.tsx
View file @
7d1a0658
...
...
@@ -66,7 +66,7 @@ const SettlementCenter: React.FC<Iprops> = () => {
loading
?
<
Skeleton
active
/>
:
<>
<
Row
gutter=
{
[
16
,
16
]
}
>
<
Row
gutter=
{
[
16
,
24
]
}
>
{
tagsList
.
map
((
item
)
=>
{
const
hasAuth
=
!
urls
.
includes
(
item
.
url
);
...
...
@@ -74,7 +74,7 @@ const SettlementCenter: React.FC<Iprops> = () => {
return
null
}
return
(
<
Col
xxl=
{
6
}
xl=
{
12
}
lg=
{
8
}
md=
{
12
}
sm=
{
24
}
xs=
{
2
4
}
key=
{
item
.
text
}
>
<
Col
span=
{
4
}
key=
{
item
.
text
}
>
<
Link
to=
{
item
.
url
}
className=
{
styles
.
tagsItem
}
>
<
div
className=
{
styles
.
icon
}
>
<
img
src=
{
item
.
icon
}
/>
...
...
@@ -90,12 +90,12 @@ const SettlementCenter: React.FC<Iprops> = () => {
Object
.
keys
(
requestData
).
map
((
record
)
=>
{
return
(
<
Row
key=
{
record
}
className=
{
styles
.
row
}
>
<
Col
xxl=
{
4
}
xl=
{
4
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
xxl=
{
20
}
xl=
{
20
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
className=
{
styles
.
colRow
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
Col
xxl=
{
4
}
xl=
{
6
}
lg=
{
6
}
md=
{
6
}
sm=
{
12
}
xs=
{
2
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
Col
span=
{
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
...
...
src/pages/home/components/Centers/ShopCenter.tsx
View file @
7d1a0658
...
...
@@ -15,12 +15,16 @@ const CREATE_SHOP = '/memberCenter/shopAbility/infoManage';
const
ShopCenter
:
React
.
FC
<
Iprops
>
=
()
=>
{
///template/shop/findShopList
const
userAuth
=
getAuth
();
const
request
=
useCallback
(
async
()
=>
{
const
{
code
,
data
}
=
await
PublicApi
.
getTemplateShopFindShopList
({
current
:
'1'
,
pageSize
:
'1'
,
categoryId
:
'0'
,
areaCode
:
''
,
memberName
:
''
});
const
{
code
,
data
}
=
await
PublicApi
.
getTemplateShopFindShop
({
memberId
:
userAuth
.
memberId
,
roleId
:
userAuth
.
roleId
});
return
{
code
:
code
,
data
:
{
totalCount
:
code
===
1000
?
data
.
totalCount
:
0
totalCount
:
code
===
1000
&&
data
.
id
||
0
}
}
},
[])
...
...
@@ -43,9 +47,9 @@ const ShopCenter: React.FC<Iprops> = () => {
return
(
loading
?
<
Skeleton
active
/>
:
<
Row
gutter=
{
[
16
,
16
]
}
>
:
<
Row
gutter=
{
[
16
,
24
]
}
>
<
Authorize
url=
{
CREATE_SHOP
}
canView=
{
true
}
>
<
Col
xxl=
{
6
}
xl=
{
8
}
lg=
{
8
}
md=
{
12
}
sm=
{
24
}
xs=
{
2
4
}
className=
{
styles
.
tagsSpecial
}
>
<
Col
span=
{
4
}
className=
{
styles
.
tagsSpecial
}
>
<
Link
to=
{
CREATE_SHOP
}
className=
{
styles
.
tagsItem
}
>
<
div
className=
{
styles
.
icon
}
>
<
img
src=
{
create_shop
}
/>
...
...
@@ -66,7 +70,7 @@ const ShopCenter: React.FC<Iprops> = () => {
</
Col
>
</
Authorize
>
<
Authorize
url=
{
SHOP_CENTER
}
canView=
{
true
}
>
<
Col
xxl=
{
6
}
xl=
{
8
}
lg=
{
8
}
md=
{
12
}
sm=
{
24
}
xs=
{
2
4
}
>
<
Col
span=
{
4
}
>
<
Link
to=
{
SHOP_CENTER
}
className=
{
styles
.
tagsItem
}
>
<
div
className=
{
styles
.
icon
}
>
<
img
src=
{
create_shop
}
/>
...
...
@@ -76,7 +80,7 @@ const ShopCenter: React.FC<Iprops> = () => {
</
Col
>
</
Authorize
>
<
Authorize
url=
{
SHOP_CENTER
}
canView=
{
true
}
>
<
Col
xxl=
{
6
}
xl=
{
6
}
lg=
{
6
}
md=
{
6
}
sm=
{
24
}
xs=
{
2
4
}
>
<
Col
span=
{
4
}
>
<
Link
to=
{
SHOP_CENTER
}
className=
{
styles
.
tagsItem
}
>
<
div
className=
{
styles
.
icon
}
>
<
img
src=
{
create_shop
}
/>
...
...
src/pages/home/components/Centers/TradeCenter.tsx
View file @
7d1a0658
...
...
@@ -56,12 +56,12 @@ const TradeCenter: React.FC<Iprops> = () => {
:
Object
.
keys
(
requestData
).
map
((
record
)
=>
{
return
(
<
Row
key=
{
record
}
className=
{
styles
.
row
}
>
<
Col
xxl=
{
4
}
xl=
{
4
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
xxl=
{
20
}
xl=
{
20
}
lg=
{
24
}
md=
{
24
}
sm=
{
24
}
className=
{
styles
.
colRow
}
>
<
Col
span=
{
4
}
className=
{
styles
.
rowTitle
}
>
{
KEY_TITLE
[
record
]
}
</
Col
>
<
Col
span=
{
20
}
className=
{
styles
.
colRow
}
>
{
requestData
[
record
].
map
((
item
,
key
)
=>
{
return
(
<
Col
xxl=
{
4
}
xl=
{
6
}
lg=
{
6
}
md=
{
6
}
sm=
{
12
}
xs=
{
2
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
Col
span=
{
4
}
key=
{
key
}
className=
{
styles
.
col
}
>
<
div
className=
{
styles
.
colTitle
}
>
{
item
.
name
}
</
div
>
{
item
.
link
...
...
src/pages/home/components/UserCenter/index.less
View file @
7d1a0658
...
...
@@ -39,90 +39,98 @@
.content {
// height: 104px;
padding: 24px;
border-radius: 0px 0px 8px 8px;
background-color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
padding: 24px;
.row {
display: flex;
flex-direction: row;
align-items: center;
// justify-content: center;
.user {
// display: flex;
// flex-direction: row;
// align-items: center;
.pic {
width: 56px;
.userLogo {
height: 56px;
width: 56px;
margin-right: 12px;
border-radius: 50%;
// background-color: red;
overflow: hidden;
img {
width: 100%;
height: 100%;
}
.randomLogo {
width: 100%;
height: 100%;
background: linear-gradient(135deg, #4981CC 0%, #1A4F97 100%) #255BA3;
border-radius: 50%;
color: #fff;
background-color: #255BA3;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
font-size: 18px;
height: 100%;
border-radius: 50%;
color: #fff;
}
}
.wrapper
{
.infos
{
display: flex;
flex-direction: column;
flex-direction: row;
align-items: center;
justify-content: space-between;
flex: 1;
.company
{
.companyName
{
display: flex;
flex-direction: row;
align-items: center;
.tags {
margin-left: 16px;
}
}
margin-bottom: 12px;
.company {
font-size: 14px;
font-weight: 600;
margin-right: 16px;
}
.status {
margin-top: 12px;
.roles {
display: flex;
flex-direction: row;
}
}
.otherValues {
display: flex;
flex-direction: row;
align-items: center;
.divider {
border-left: 1px solid #EEF0F3;
margin-left: 24px;
padding-left: 24px;
display: flex;
flex-direction: row;
align-items: center;
.level {
.levelImg {
height: 16px;
}
}
.score {
margin: 0 30px;
}
@media (max-width: 576px) {
.role {
margin: 5px 0;
}
}
@media (max-width: 796px) {
.date,
.hi {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
}
}
}
// @media (max-width: 576px) {
// .role {
// margin: 5px 0;
// }
// }
// @media (max-width: 796px) {
// .date,
// .hi {
// text-overflow: -o-ellipsis-lastline;
// overflow: hidden;
// text-overflow: ellipsis;
// display: -webkit-box;
// -webkit-line-clamp: 1;
// line-clamp: 1;
// -webkit-box-orient: vertical;
// }
// }
// }
src/pages/home/components/UserCenter/index.tsx
View file @
7d1a0658
...
...
@@ -13,7 +13,7 @@ import home_user from '@/assets/imgs/home_user.png';
interface
Iprops
{}
const
WEEKDAYS
=
[
"天"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
];
const
LEVEL_IMAGE
=
[
level1
,
level2
,
level3
,
level4
];
const
LEVEL_IMAGE
=
[
level1
,
level
1
,
level
2
,
level3
,
level4
];
const
EDIT_USER_URL
=
'/memberCenter/memberAbility/query'
;
const
USER_CENTER_URL
=
'/memberCenter/memberAbility/manage/maintain'
const
STATUS_COLOR
:
(
"default"
|
"processing"
|
"error"
|
"success"
)[]
=
[
"default"
,
"processing"
,
"error"
,
"success"
]
...
...
@@ -23,7 +23,7 @@ const UserCenter: React.FC<Iprops> = () => {
const
userAuth
=
getAuth
();
const
hasChangeMemberAuth
=
userAuth
?.
urls
.
includes
(
EDIT_USER_URL
);
const
hasCenterAuth
=
userAuth
?.
urls
.
includes
(
USER_CENTER_URL
);
const
currentRole
=
userAuth
.
roles
.
filter
((
item
)
=>
item
.
memberRoleId
===
userAuth
.
memberRoleId
)
if
(
!
userAuth
)
{
return
null
}
...
...
@@ -44,64 +44,46 @@ const UserCenter: React.FC<Iprops> = () => {
</
div
>
</
div
>
<
div
className=
{
styles
.
content
}
>
<
Row
className=
{
styles
.
row
}
gutter=
{
[
8
,
8
]
}
>
<
Col
xxl=
{
14
}
xl=
{
24
}
lg=
{
14
}
md=
{
24
}
sm=
{
24
}
xs=
{
24
}
className=
{
styles
.
user
}
>
{
/* http://10.0.0.25:4000/project/15/interface/api/38926 上传用户头像 */
}
<
Row
align=
{
"middle"
}
>
<
Col
xxl=
{
4
}
xl=
{
4
}
lg=
{
4
}
md=
{
4
}
sm=
{
4
}
xs=
{
6
}
>
<
div
className=
{
styles
.
pic
}
>
<
div
className=
{
styles
.
userLogo
}
>
{
userAuth
.
logo
?
<
img
src=
{
userAuth
.
logo
||
''
}
/>
:
<
div
className=
{
styles
.
randomLogo
}
>
H
</
div
>
}
</
div
>
</
Col
>
<
Col
xxl=
{
8
}
xl=
{
7
}
lg=
{
7
}
md=
{
7
}
sm=
{
7
}
xs=
{
18
}
>
<
div
className=
{
styles
.
wrapper
}
>
<
div
className=
{
styles
.
company
}
>
<
span
>
{
userAuth
.
company
}
</
span
>
</
div
>
<
div
className=
{
styles
.
status
}
>
<
Badge
status=
{
STATUS_COLOR
[
userAuth
.
validateStatus
]
}
text=
{
userAuth
.
validateStatusDesc
}
></
Badge
>
</
div
>
</
div
>
</
Col
>
<
Col
xxl=
{
8
}
xl=
{
9
}
lg=
{
9
}
md=
{
8
}
sm=
{
9
}
xs=
{
24
}
className=
{
styles
.
role
}
>
<
div
className=
{
styles
.
tags
}
>
<
div
className=
{
styles
.
infos
}
>
<
div
>
<
div
className=
{
styles
.
companyName
}
>
<
span
className=
{
styles
.
company
}
>
{
userAuth
.
company
}
</
span
>
<
div
className=
{
styles
.
roles
}
>
{
userAuth
.
roles
.
map
((
item
,
key
)
=>
{
currentRole
.
map
((
item
,
key
)
=>
{
const
statusList
=
[
"success"
,
"danger"
,
"default"
,
"warning"
,
"nobility"
,
"primary"
]
return
(
<
div
style=
{
{
marginRight
:
'8
px'
}
}
key=
{
key
}
>
<
StatusTag
type=
"success"
title=
{
item
.
memberRoleName
}
/>
<
div
style=
{
{
marginRight
:
'16
px'
}
}
key=
{
key
}
>
<
StatusTag
type=
{
statusList
[
key
]
}
title=
{
item
.
memberRoleName
}
/>
</
div
>
)
})
}
</
div
>
</
Col
>
<
Col
xxl=
{
4
}
xl=
{
4
}
lg=
{
4
}
md=
{
5
}
sm=
{
4
}
xs=
{
24
}
className=
{
styles
.
role
}
>
<
div
>
</
div
>
<
div
className=
{
styles
.
status
}
><
Badge
status=
{
STATUS_COLOR
[
userAuth
.
validateStatus
]
}
text=
{
userAuth
.
validateStatusDesc
}
></
Badge
></
div
>
</
div
>
<
div
className=
{
styles
.
otherValues
}
>
<
Link
to=
{
EDIT_USER_URL
}
>
修改会员信息
</
Link
>
<
div
className=
{
styles
.
divider
}
>
<
div
className=
{
styles
.
level
}
>
会员等级:
<
img
src=
{
LEVEL_IMAGE
[
userAuth
.
level
]
}
className=
{
styles
.
levelImg
}
/>
</
div
>
<
div
className=
{
styles
.
score
}
>
平台积分:
<
strong
>
{
userAuth
.
score
}
</
strong
>
</
div
>
</
Col
>
</
Row
>
</
Col
>
<
Col
xxl=
{
10
}
xl=
{
24
}
lg=
{
10
}
md=
{
24
}
sm=
{
24
}
>
<
Row
gutter=
{
[
8
,
8
]
}
align=
{
"middle"
}
>
<
Col
xxl=
{
12
}
lg=
{
12
}
md=
{
10
}
sm=
{
10
}
>
<
span
>
会员等级:
</
span
>
<
img
src=
{
LEVEL_IMAGE
[
userAuth
.
level
]
}
className=
{
styles
.
level
}
/>
</
Col
>
<
Col
xxl=
{
6
}
lg=
{
6
}
md=
{
10
}
sm=
{
10
}
xs=
{
24
}
>
平台积分:
<
strong
>
{
userAuth
.
score
}
</
strong
></
Col
>
<
Col
xxl=
{
6
}
lg=
{
6
}
md=
{
4
}
sm=
{
4
}
xs=
{
24
}
>
<
Link
to=
{
USER_CENTER_URL
}
>
进入会员中心
</
Link
>
</
Col
>
</
Row
>
</
Col
>
</
Row
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
)
...
...
src/pages/home/index.less
View file @
7d1a0658
.grid_container {
display: grid;
}
.ability {
margin-top: 16px;
.container {
display: flex;
flex-direction: row;
min-width: 1366px;
.left {
flex: 1;
.otherCenters {
margin-top: 24px;
}
.ability {
margin-top: 24px;
}
}
.right {
margin-left: 24px;
flex-basis: 386px;
.actions {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
.workBench {
width: 181px;
}
}
.commonMargin {
margin-bottom: 24px;
}
}
}
.controller {
background-color: @main-color;
height: 48px;
...
...
@@ -16,6 +47,7 @@
flex-direction: row;
margin-left: auto;
cursor: pointer;
width: 181px;
.icon {
font-size: 22px;
...
...
@@ -24,80 +56,3 @@
margin-left: 8px;
}
}
.advertise {
margin-top: 16px;
}
@media (min-width: 1600px) {
.grid_container {
// display: grid;
// grid-template-columns: 75% 25%;
// grid-template-columns: repeat(24, 1fr);
// grid-auto-flow: column dense;
// grid-column-gap: 16px;
.top {
display: grid;
grid-template-columns: repeat(24, 1fr);
grid-column-gap: 16px;
grid-row-gap: 16px;
.userCenter {
grid-column-start: 1;
grid-column-end: 19;
grid-row-start: 1;
}
.actions {
grid-column-start: 19;
grid-column-end: 25;
grid-row-start: 1;
}
.announce {
grid-column-start: 19;
grid-column-end: 25;
margin-top: -200px;
}
.recentVisit {
grid-column-start: 19;
grid-column-end: 25;
}
}
}
.bottom {
display: grid;
grid-template-columns: repeat(24, 1fr);
grid-column-gap: 16px;
grid-row-gap: 16px;
.otherCenter {
grid-column-start: 1;
grid-column-end: 19;
grid-row-start: 1;
margin-top: -430px;
}
.anyQuestion {
grid-column-start: 19;
grid-column-end: 25;
margin-top: 16px;
}
.advertise {
grid-column-start: 19;
grid-column-end: 25;
}
}
}
@media (max-width: 1599px) {
.userCenter {
margin: 16px 0;
}
.recentVisit {
margin-top: 16px;
}
}
@media (min-width: 1200px) and (max-width: 1599px) {
}
src/pages/home/index.tsx
View file @
7d1a0658
...
...
@@ -53,39 +53,16 @@ const Home: React.FC<{}> = () => {
return
(
<
PageHeaderWrapper
>
<
div
style=
{
{
minWidth
:
'1280px'
}
}
>
<
div
>
<
div
className=
{
styles
.
userGuaid
}
style=
{
{
display
:
visible
?
'none'
:
'none'
}
}
>
<
UseGuaid
/>
</
div
>
<
div
className=
{
styles
.
grid_container
}
>
<
div
className=
{
styles
.
top
}
>
<
div
className=
{
styles
.
actions
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
12
}
>
<
CustomWorkBench
handleChangeOrder=
{
handleChangeOrder
}
layouts=
{
layout
}
/></
Col
>
<
Col
span=
{
12
}
>
<
div
className=
{
styles
.
controller
}
onClick=
{
()
=>
setVisible
((
state
)
=>
!
state
)
}
>
<
CompassFilled
className=
{
styles
.
icon
}
/>
<
span
className=
{
styles
.
text
}
>
使用向导
</
span
>
</
div
>
</
Col
>
</
Row
>
</
div
>
<
div
className=
{
styles
.
container
}
>
<
div
className=
{
styles
.
left
}
>
<
div
className=
{
styles
.
userCenter
}
>
<
UserCenter
/>
</
div
>
<
div
className=
{
styles
.
announce
}
>
<
Row
gutter=
{
[
24
,
12
]
}
>
<
Col
xxl=
{
24
}
xl=
{
12
}
lg=
{
12
}
md=
{
24
}
sm=
{
24
}
><
LatestAnnounce
/></
Col
>
<
Col
xxl=
{
24
}
xl=
{
12
}
lg=
{
12
}
md=
{
24
}
sm=
{
24
}
><
RecentVisit
/></
Col
>
</
Row
>
</
div
>
</
div
>
<
div
className=
{
styles
.
bottom
}
>
<
div
className=
{
styles
.
otherCenter
}
>
<
div
className=
{
styles
.
otherCenters
}
>
{
layout
.
map
((
item
)
=>
{
const
RenderComponent
=
ComponentSelect
[
item
.
name
]
...
...
@@ -104,13 +81,32 @@ const Home: React.FC<{}> = () => {
})
}
</
div
>
<
div
className=
{
styles
.
anyQuestion
}
>
</
div
>
<
div
className=
{
styles
.
right
}
>
<
div
className=
{
styles
.
actions
}
>
<
div
className=
{
styles
.
workBench
}
>
<
CustomWorkBench
handleChangeOrder=
{
handleChangeOrder
}
layouts=
{
layout
}
/>
</
div
>
<
div
className=
{
styles
.
controller
}
onClick=
{
()
=>
setVisible
((
state
)
=>
!
state
)
}
>
<
CompassFilled
className=
{
styles
.
icon
}
/>
<
span
className=
{
styles
.
text
}
>
使用向导
</
span
>
</
div
>
</
div
>
<
div
className=
{
styles
.
commonMargin
}
>
<
LatestAnnounce
/>
</
div
>
<
div
className=
{
styles
.
commonMargin
}
>
<
RecentVisit
/>
</
div
>
<
div
className=
{
styles
.
commonMargin
}
>
<
AnyQuestion
/>
<
div
className=
{
styles
.
advertise
}
>
<
AdvertisementContainer
/>
</
div
>
<
div
className=
{
styles
.
commonMargin
}
>
<
AdvertisementContainer
/>
</
div
>
</
div
>
</
div
>
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/columns.ts
0 → 100644
View file @
7d1a0658
/*
* @Author: XieZhiXiong
* @Date: 2020-12-22 18:01:50
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-22 18:01:51
* @Description: 单据列表 弹窗表格列
*/
import
{
ORDER_TYPE2
,
PurchaseOrderInsideWorkStateTexts
,
}
from
'@/constants'
;
/**
* 采购订单-弹窗表格列
*/
export
const
purchaseOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
},
{
title
:
'订单摘要'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
},
{
title
:
'会员名称'
,
align
:
'center'
,
dataIndex
:
'supplyMembersName'
,
},
{
title
:
'下单时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
render
:
text
=>
ORDER_TYPE2
[
text
],
},
{
title
:
'订单状态'
,
align
:
'center'
,
dataIndex
:
'interiorState'
,
render
:
text
=>
PurchaseOrderInsideWorkStateTexts
[
text
],
},
];
/**
* 销售订单-弹窗表格列
*/
export
const
salesOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
},
{
title
:
'订单摘要'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
},
{
title
:
'会员名称'
,
align
:
'center'
,
dataIndex
:
'createMemberName'
,
},
{
title
:
'下单时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
render
:
text
=>
ORDER_TYPE2
[
text
],
},
{
title
:
'订单状态'
,
align
:
'center'
,
dataIndex
:
'interiorState'
,
render
:
text
=>
PurchaseOrderInsideWorkStateTexts
[
text
],
},
];
/**
* 加工入库单列表
*/
export
const
machiningWarehousingColumns
=
[
{
title
:
'通知单号'
,
align
:
'center'
,
dataIndex
:
'noticeNo'
,
},
{
title
:
'通知单摘要'
,
align
:
'center'
,
dataIndex
:
'summary'
,
},
{
title
:
'加工企业名称'
,
align
:
'center'
,
dataIndex
:
'processName'
,
},
{
title
:
'单据时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
},
{
title
:
'申请单状态'
,
align
:
'center'
,
dataIndex
:
'outerStatusName'
,
},
];
/**
* 加工发货单列表
*/
export
const
machiningDeliveryColumns
=
[
{
title
:
'通知单号'
,
align
:
'center'
,
dataIndex
:
'noticeNo'
,
},
{
title
:
'通知单摘要'
,
align
:
'center'
,
dataIndex
:
'summary'
,
},
{
title
:
'供应会员'
,
align
:
'center'
,
dataIndex
:
'supplierName'
,
},
{
title
:
'单据时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
},
{
title
:
'申请单状态'
,
align
:
'center'
,
dataIndex
:
'outerStatusName'
,
},
];
/**
* 售后发货、入库订单列表
*/
export
const
getAfterSaleColumns
=
(
isPurchaser
?:
boolean
)
=>
{
return
[
{
title
:
'申请单号'
,
align
:
'center'
,
dataIndex
:
'applyNo'
,
},
{
title
:
'申请单摘要'
,
align
:
'center'
,
dataIndex
:
'applyAbstract'
,
},
isPurchaser
?
{
title
:
'供应会员'
,
align
:
'center'
,
dataIndex
:
'supplierName'
,
}
:
{
title
:
'采购会员'
,
align
:
'center'
,
dataIndex
:
'consumerName'
,
},
{
title
:
'单据时间'
,
align
:
'center'
,
dataIndex
:
'applyTime'
,
},
{
title
:
'申请单状态'
,
align
:
'center'
,
dataIndex
:
'outerStatusName'
,
},
];
};
\ No newline at end of file
src/pages/transaction/stockSellStorage/bills/components/BillsForm/effects/useBusinessEffects.ts
View file @
7d1a0658
...
...
@@ -2,16 +2,14 @@
* @Author: XieZhiXiong
* @Date: 2020-09-16 15:16:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
14 16:55:09
* @LastEditTime: 2020-12-
22 18:04:58
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
ORDER_TYPE2
,
DEPENDENT_DOC_ORDER
,
DEPENDENT_DOC_EXCHANGE
,
DEPENDENT_DOC_RETURN
,
...
...
@@ -28,7 +26,6 @@ import {
DOC_TYPE_EXCHANGE_RECEIPT
,
DOC_TYPE_EXCHANGE_RETURN_INVOICE
,
DOC_TYPE_EXCHANGE_RETURN_RECEIPT
,
PurchaseOrderInsideWorkStateTexts
,
DELIVERY_TYPE
,
}
from
'@/constants'
;
import
Search
from
'@/components/NiceForm/components/Search'
;
...
...
@@ -40,257 +37,33 @@ import {
purchaseOrderBillSchema
,
machiningWarehousingBillSchema
,
machiningDeliveryBillSchema
,
afterSaleBillSchema
,
}
from
'../schema'
;
import
{
purchaseOrderColumns
,
salesOrderColumns
,
machiningWarehousingColumns
,
machiningDeliveryColumns
,
getAfterSaleColumns
,
}
from
'../columns'
;
import
{
fetchOrderPurchaseReceiptAddList
,
getOrderSalesInvoiceOrderList
,
getMachiningWarehousingList
,
getMachiningDeliveryList
,
getRefundDeliveryList
,
getRefundWarehousingList
,
getExchangeReturnDeliveryList
,
getExchangeReturnWarehousingList
,
getExchangeDeliveryList
,
getExchangeWarehousingList
,
}
from
'../fetchBillList'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
// 弹窗表格列-订单
// 采购订单-弹窗表格列
const
purchaseOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
},
{
title
:
'订单摘要'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
},
{
title
:
'会员名称'
,
align
:
'center'
,
dataIndex
:
'supplyMembersName'
,
},
{
title
:
'下单时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
render
:
text
=>
ORDER_TYPE2
[
text
],
},
{
title
:
'订单状态'
,
align
:
'center'
,
dataIndex
:
'interiorState'
,
render
:
text
=>
PurchaseOrderInsideWorkStateTexts
[
text
],
},
];
// 销售订单-弹窗表格列
const
salesOrderColumns
:
any
[]
=
[
{
title
:
'订单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
},
{
title
:
'订单摘要'
,
align
:
'center'
,
dataIndex
:
'orderThe'
,
},
{
title
:
'会员名称'
,
align
:
'center'
,
dataIndex
:
'createMemberName'
,
},
{
title
:
'下单时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
},
{
title
:
'订单类型'
,
align
:
'center'
,
dataIndex
:
'type'
,
render
:
text
=>
ORDER_TYPE2
[
text
],
},
{
title
:
'订单状态'
,
align
:
'center'
,
dataIndex
:
'interiorState'
,
render
:
text
=>
PurchaseOrderInsideWorkStateTexts
[
text
],
},
];
// 加工入库单列表
const
machiningWarehousingColumns
=
[
{
title
:
'通知单号'
,
align
:
'center'
,
dataIndex
:
'noticeNo'
,
},
{
title
:
'通知单摘要'
,
align
:
'center'
,
dataIndex
:
'summary'
,
},
{
title
:
'加工企业名称'
,
align
:
'center'
,
dataIndex
:
'processName'
,
},
{
title
:
'单据时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
},
{
title
:
'申请单状态'
,
align
:
'center'
,
dataIndex
:
'outerStatusName'
,
},
];
// 加工发货单列表
const
machiningDeliveryColumns
=
[
{
title
:
'通知单号'
,
align
:
'center'
,
dataIndex
:
'noticeNo'
,
},
{
title
:
'通知单摘要'
,
align
:
'center'
,
dataIndex
:
'summary'
,
},
{
title
:
'供应会员'
,
align
:
'center'
,
dataIndex
:
'supplierName'
,
},
{
title
:
'单据时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
},
{
title
:
'申请单状态'
,
align
:
'center'
,
dataIndex
:
'outerStatusName'
,
},
];
// 售后订单列表
const
afterSaleColumns
=
[
{
title
:
'申请单号'
,
align
:
'center'
,
dataIndex
:
'orderNo'
,
},
{
title
:
'申请单摘要'
,
align
:
'center'
,
dataIndex
:
'invoicesAbstract'
,
},
{
title
:
'会员名称'
,
align
:
'center'
,
dataIndex
:
'memberName'
,
},
{
title
:
'单据时间'
,
align
:
'center'
,
dataIndex
:
'createTime'
,
},
{
title
:
'申请单状态'
,
align
:
'center'
,
dataIndex
:
'state'
,
},
];
// 获取采购入库单相关数据
const
fetchOrderPurchaseReceiptAddList
=
async
(
params
:
any
)
=>
{
const
res
=
await
PublicApi
.
getOrderPurchaseReceiptAddList
({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
memberName
:
item
.
supplyMembersName
,
membersId
:
item
.
supplyMembersId
,
membersRoleId
:
item
.
supplyMembersRoleId
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取销售发货单相关数据
const
getOrderSalesInvoiceOrderList
=
async
(
params
:
any
)
=>
{
const
res
=
await
PublicApi
.
getOrderSalesInvoiceOrderList
({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
memberName
:
item
.
memberName
,
membersId
:
item
.
memberId
,
membersRoleId
:
item
.
memberRoleId
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取加工入库单单相关数据
const
getMachiningWarehousingList
=
async
(
params
:
any
)
=>
{
const
{
search
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getEnhanceSupplierToBeAddStorageList
({
noticeNo
:
search
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
memberName
:
item
.
processName
,
deliveryAddresId
:
+
item
.
receiverAddressId
,
fullAddress
:
item
.
receiveAddress
||
''
,
receiverName
:
item
.
receiveUserName
||
''
,
phone
:
item
.
receiveUserTel
||
''
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取加工发货单单相关数据
const
getMachiningDeliveryList
=
async
(
params
:
any
)
=>
{
const
{
search
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getEnhanceProcessToBeAddDeliveryList
({
noticeNo
:
search
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
memberName
:
item
.
supplierName
,
deliveryAddresId
:
+
item
.
receiverAddressId
,
fullAddress
:
item
.
receiveAddress
||
''
,
receiverName
:
item
.
receiveUserName
||
''
,
phone
:
item
.
receiveUserTel
||
''
,
})),
total
:
res
.
data
.
totalCount
,
};;
}
return
[];
};
// 获取关联组件对应的 params
const
getParams
=
type
=>
{
const
basicParams
=
{
...
...
@@ -363,31 +136,67 @@ const getParams = type => {
// 退货发货单
case
DOC_TYPE_RETURN_INVOICE
:
{
basicParams
.
modalProps
.
title
=
'选择售后单'
;
basicParams
.
columns
=
getAfterSaleColumns
(
true
);
basicParams
.
fetchTableData
=
getRefundDeliveryList
;
basicParams
.
formilyProps
.
ctx
.
schema
=
afterSaleBillSchema
(
true
);
basicParams
.
tableProps
.
rowKey
=
'applyNo'
;
basicParams
.
tableProps
.
lableKey
=
'applyNo'
;
break
;
}
// 退货入库单
case
DOC_TYPE_RETURN_RECEIPT
:
{
basicParams
.
modalProps
.
title
=
'选择售后单'
;
basicParams
.
columns
=
getAfterSaleColumns
(
false
);
basicParams
.
fetchTableData
=
getRefundWarehousingList
;
basicParams
.
formilyProps
.
ctx
.
schema
=
afterSaleBillSchema
(
false
);
basicParams
.
tableProps
.
rowKey
=
'applyNo'
;
basicParams
.
tableProps
.
lableKey
=
'applyNo'
;
break
;
}
// 换货退货发货单
case
DOC_TYPE_EXCHANGE_RETURN_INVOICE
:
{
basicParams
.
modalProps
.
title
=
'选择售后单'
;
basicParams
.
columns
=
getAfterSaleColumns
(
true
);
basicParams
.
fetchTableData
=
getExchangeReturnDeliveryList
;
basicParams
.
formilyProps
.
ctx
.
schema
=
afterSaleBillSchema
(
true
);
basicParams
.
tableProps
.
rowKey
=
'applyNo'
;
basicParams
.
tableProps
.
lableKey
=
'applyNo'
;
break
;
}
// 换货退货入库单
case
DOC_TYPE_EXCHANGE_RETURN_RECEIPT
:
{
basicParams
.
modalProps
.
title
=
'选择售后单'
;
basicParams
.
columns
=
getAfterSaleColumns
(
false
);
basicParams
.
fetchTableData
=
getExchangeReturnWarehousingList
;
basicParams
.
formilyProps
.
ctx
.
schema
=
afterSaleBillSchema
(
false
);
basicParams
.
tableProps
.
rowKey
=
'applyNo'
;
basicParams
.
tableProps
.
lableKey
=
'applyNo'
;
break
;
}
// 换货发货单
case
DOC_TYPE_EXCHANGE_INVOICE
:
{
basicParams
.
modalProps
.
title
=
'选择售后单'
;
basicParams
.
columns
=
getAfterSaleColumns
(
true
);
basicParams
.
fetchTableData
=
getExchangeDeliveryList
;
basicParams
.
formilyProps
.
ctx
.
schema
=
afterSaleBillSchema
(
true
);
basicParams
.
tableProps
.
rowKey
=
'applyNo'
;
basicParams
.
tableProps
.
lableKey
=
'applyNo'
;
break
;
}
// 换货入库单
case
DOC_TYPE_EXCHANGE_RECEIPT
:
{
break
;
}
// 换货退货发货单
case
DOC_TYPE_EXCHANGE_RETURN_INVOICE
:
{
basicParams
.
modalProps
.
title
=
'选择售后单'
;
basicParams
.
columns
=
getAfterSaleColumns
(
false
);
basicParams
.
fetchTableData
=
getExchangeWarehousingList
;
basicParams
.
formilyProps
.
ctx
.
schema
=
afterSaleBillSchema
(
false
);
basicParams
.
tableProps
.
rowKey
=
'applyNo'
;
basicParams
.
tableProps
.
lableKey
=
'applyNo'
;
break
;
}
...
...
@@ -518,7 +327,6 @@ export const useBusinessEffects = (context, actions) => {
// 关联单据改变
onFieldValueChange$
(
'orderNo'
).
subscribe
(
fieldState
=>
{
const
invoicesTypeIdVal
=
getFieldValue
(
'invoicesTypeId'
);
const
relevanceInvoicesVal
=
getFieldValue
(
'relevanceInvoices'
);
const
first
=
fieldState
.
value
&&
fieldState
.
value
[
0
];
// 设置单据公用的数据相关
...
...
@@ -622,6 +430,10 @@ export const useBusinessEffects = (context, actions) => {
case
DOC_TYPE_EXCHANGE_INVOICE
:
// 换货入库单
case
DOC_TYPE_EXCHANGE_RECEIPT
:
{
// 设置配送方式相关字段数据
setFieldValue
(
'transport'
,
DELIVERY_TYPE
[
first
.
deliveryType
]);
setFieldValue
(
'deliveryType'
,
first
.
deliveryType
);
// 获取明细数据 商品 数据
PublicApi
.
getAsReplaceGoodsPageReturnedGoods
({
replaceId
:
first
.
id
,
...
...
@@ -653,6 +465,10 @@ export const useBusinessEffects = (context, actions) => {
case
DOC_TYPE_RETURN_INVOICE
:
// 退货入库单
case
DOC_TYPE_RETURN_RECEIPT
:
{
// 设置配送方式相关字段数据
setFieldValue
(
'transport'
,
DELIVERY_TYPE
[
first
.
deliveryType
]);
setFieldValue
(
'deliveryType'
,
first
.
deliveryType
);
// 获取明细数据 商品 数据
PublicApi
.
getAsReturnGoodsPageReturnedGoods
({
returnId
:
first
.
id
,
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/fetchBillList.ts
0 → 100644
View file @
7d1a0658
/*
* @Author: XieZhiXiong
* @Date: 2020-12-22 17:57:26
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-22 18:53:56
* @Description: 获取 单据列表 弹窗数据接口相关
*/
import
{
PublicApi
}
from
'@/services/api'
;
import
moment
from
'moment'
;
// 获取采购入库单相关数据
export
const
fetchOrderPurchaseReceiptAddList
=
async
(
params
:
any
)
=>
{
const
res
=
await
PublicApi
.
getOrderPurchaseReceiptAddList
({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
memberName
:
item
.
supplyMembersName
,
membersId
:
item
.
supplyMembersId
,
membersRoleId
:
item
.
supplyMembersRoleId
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取销售发货单相关数据
export
const
getOrderSalesInvoiceOrderList
=
async
(
params
:
any
)
=>
{
const
res
=
await
PublicApi
.
getOrderSalesInvoiceOrderList
({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
memberName
:
item
.
memberName
,
membersId
:
item
.
memberId
,
membersRoleId
:
item
.
memberRoleId
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取加工入库单单相关数据
export
const
getMachiningWarehousingList
=
async
(
params
:
any
)
=>
{
const
{
search
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getEnhanceSupplierToBeAddStorageList
({
noticeNo
:
search
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
memberName
:
item
.
processName
,
deliveryAddresId
:
+
item
.
receiverAddressId
,
fullAddress
:
item
.
receiveAddress
||
''
,
receiverName
:
item
.
receiveUserName
||
''
,
phone
:
item
.
receiveUserTel
||
''
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取加工发货单单相关数据
export
const
getMachiningDeliveryList
=
async
(
params
:
any
)
=>
{
const
{
search
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getEnhanceProcessToBeAddDeliveryList
({
noticeNo
:
search
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
memberName
:
item
.
supplierName
,
deliveryAddresId
:
+
item
.
receiverAddressId
,
fullAddress
:
item
.
receiveAddress
||
''
,
receiverName
:
item
.
receiveUserName
||
''
,
phone
:
item
.
receiveUserTel
||
''
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取售后退货发货单单相关数据
export
const
getRefundDeliveryList
=
async
(
params
:
any
)
=>
{
const
{
search
,
startTime
,
endTime
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getAsReturnGoodsPageToBeAddReturnDeliveryGoods
({
applyNo
:
search
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
endTime
:
endTime
?
moment
(
+
endTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
id
:
item
.
returnId
,
memberName
:
item
.
supplierName
,
supplyMembersName
:
item
.
supplierName
,
supplyMembersId
:
item
.
parentMemberId
,
supplyMembersRoleId
:
item
.
parentMemberRoleId
,
deliveryAddresId
:
item
.
returnGoodsAddress
.
receiveId
,
fullAddress
:
item
.
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
item
.
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
item
.
returnGoodsAddress
.
receiveUserTel
||
''
,
deliveryType
:
item
.
returnGoodsAddress
.
deliveryType
||
''
,
orderNo
:
item
.
applyNo
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取售后退货入库单单相关数据
export
const
getRefundWarehousingList
=
async
(
params
:
any
)
=>
{
const
{
search
,
startTime
,
endTime
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getAsReturnGoodsPageToBeAddReturnGoodsStorage
({
applyNo
:
search
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
endTime
:
endTime
?
moment
(
+
endTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
id
:
item
.
returnId
,
memberName
:
item
.
consumerName
,
supplyMembersName
:
item
.
supplierName
,
supplyMembersId
:
item
.
parentMemberId
,
supplyMembersRoleId
:
item
.
parentMemberRoleId
,
deliveryAddresId
:
item
.
returnGoodsAddress
.
sendId
,
fullAddress
:
item
.
returnGoodsAddress
.
sendAddress
||
''
,
receiverName
:
item
.
returnGoodsAddress
.
sendUserName
||
''
,
phone
:
item
.
returnGoodsAddress
.
sendUserTel
||
''
,
deliveryType
:
item
.
returnGoodsAddress
.
deliveryType
||
''
,
orderNo
:
item
.
applyNo
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取售后换货退货发货单单相关数据
export
const
getExchangeReturnDeliveryList
=
async
(
params
:
any
)
=>
{
const
{
search
,
startTime
,
endTime
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getAsReplaceGoodsPageToBeAddReturnDeliveryGoods
({
applyNo
:
search
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
endTime
:
endTime
?
moment
(
+
endTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
id
:
item
.
replaceId
,
memberName
:
item
.
supplierName
,
supplyMembersName
:
item
.
supplierName
,
supplyMembersId
:
item
.
parentMemberId
,
supplyMembersRoleId
:
item
.
parentMemberRoleId
,
deliveryAddresId
:
item
.
returnGoodsAddress
.
receiveId
,
fullAddress
:
item
.
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
item
.
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
item
.
returnGoodsAddress
.
receiveUserTel
||
''
,
deliveryType
:
item
.
returnGoodsAddress
.
deliveryType
||
''
,
orderNo
:
item
.
applyNo
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取售后换货退货入库单单相关数据
export
const
getExchangeReturnWarehousingList
=
async
(
params
:
any
)
=>
{
const
{
search
,
startTime
,
endTime
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getAsReplaceGoodsPageToBeAddReturnGoodsStorage
({
applyNo
:
search
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
endTime
:
endTime
?
moment
(
+
endTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
id
:
item
.
replaceId
,
memberName
:
item
.
consumerName
,
supplyMembersName
:
item
.
supplierName
,
supplyMembersId
:
item
.
parentMemberId
,
supplyMembersRoleId
:
item
.
parentMemberRoleId
,
deliveryAddresId
:
item
.
returnGoodsAddress
.
receiveId
,
fullAddress
:
item
.
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
item
.
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
item
.
returnGoodsAddress
.
receiveUserTel
||
''
,
deliveryType
:
item
.
returnGoodsAddress
.
deliveryType
||
''
,
orderNo
:
item
.
applyNo
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取售后换货发货单单相关数据
export
const
getExchangeDeliveryList
=
async
(
params
:
any
)
=>
{
const
{
search
,
startTime
,
endTime
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getAsReplaceGoodsPageToBeAddReplaceDeliveryGoods
({
applyNo
:
search
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
endTime
:
endTime
?
moment
(
+
endTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
id
:
item
.
replaceId
,
memberName
:
item
.
supplierName
,
supplyMembersName
:
item
.
supplierName
,
supplyMembersId
:
item
.
parentMemberId
,
supplyMembersRoleId
:
item
.
parentMemberRoleId
,
deliveryAddresId
:
item
.
replaceGoodsAddress
.
receiveId
,
fullAddress
:
item
.
replaceGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
item
.
replaceGoodsAddress
.
receiveUserName
||
''
,
phone
:
item
.
replaceGoodsAddress
.
receiveUserTel
||
''
,
deliveryType
:
item
.
replaceGoodsAddress
.
deliveryType
||
''
,
orderNo
:
item
.
applyNo
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
// 获取售后换货入库单单相关数据
export
const
getExchangeWarehousingList
=
async
(
params
:
any
)
=>
{
const
{
search
,
startTime
,
endTime
,
...
rest
}
=
params
;
const
res
=
await
PublicApi
.
getAsReplaceGoodsPageToBeAddReplaceGoodsStorage
({
applyNo
:
search
,
startTime
:
startTime
?
moment
(
+
startTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
endTime
:
endTime
?
moment
(
+
endTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
null
,
...
rest
,
})
if
(
res
.
code
===
1000
)
{
return
{
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
id
:
item
.
replaceId
,
memberName
:
item
.
consumerName
,
supplyMembersName
:
item
.
supplierName
,
supplyMembersId
:
item
.
parentMemberId
,
supplyMembersRoleId
:
item
.
parentMemberRoleId
,
deliveryAddresId
:
item
.
replaceGoodsAddress
.
receiveId
,
fullAddress
:
item
.
replaceGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
item
.
replaceGoodsAddress
.
receiveUserName
||
''
,
phone
:
item
.
replaceGoodsAddress
.
receiveUserTel
||
''
,
deliveryType
:
item
.
replaceGoodsAddress
.
deliveryType
||
''
,
orderNo
:
item
.
applyNo
,
})),
total
:
res
.
data
.
totalCount
,
};
}
return
[];
};
\ No newline at end of file
src/pages/transaction/stockSellStorage/bills/components/BillsForm/index.tsx
View file @
7d1a0658
...
...
@@ -172,12 +172,9 @@ const BillsForm: React.FC<BillsFormProps> = ({
extraData
:
{
productName
:
item
.
productName
,
deliveryType
,
id
:
''
,
// 加工发货单需要,明细id
processNum
:
0
,
// 加工发货单需要,加工数量
orderNo
:
item
.
orderNo
,
// 订单编号
goodsCount
:
item
.
productCount
,
// 采购数量
price
:
item
.
price
,
// 加工发货、入库单需要,加工单价
totalPrice
:
0
,
// 加工发货、入库单需要,加工总价
id
:
item
.
produceNoticeOrderDetailId
,
// 加工发货单需要,明细id
},
}))
:
[];
...
...
@@ -448,15 +445,15 @@ const BillsForm: React.FC<BillsFormProps> = ({
fullAddress
:
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
returnGoodsAddress
.
receiveUserTel
||
''
,
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
}
]
:
[]
,
deliveryType
:
returnGoodsAddress
.
deliveryType
,
transport
:
DELIVERY_TYPE
[
returnGoodsAddress
.
deliveryType
],
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
});
}).
finally
(()
=>
{
setInfoLoading
(
false
);
...
...
@@ -495,15 +492,15 @@ const BillsForm: React.FC<BillsFormProps> = ({
fullAddress
:
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
returnGoodsAddress
.
receiveUserTel
||
''
,
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
}
]
:
[]
,
deliveryType
:
returnGoodsAddress
.
deliveryType
,
transport
:
DELIVERY_TYPE
[
returnGoodsAddress
.
deliveryType
],
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
});
}).
finally
(()
=>
{
setInfoLoading
(
false
);
...
...
@@ -543,15 +540,15 @@ const BillsForm: React.FC<BillsFormProps> = ({
fullAddress
:
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
returnGoodsAddress
.
receiveUserTel
||
''
,
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
}
]
:
[]
,
deliveryType
:
returnGoodsAddress
.
deliveryType
,
transport
:
DELIVERY_TYPE
[
returnGoodsAddress
.
deliveryType
],
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
});
}).
finally
(()
=>
{
setInfoLoading
(
false
);
...
...
@@ -590,15 +587,15 @@ const BillsForm: React.FC<BillsFormProps> = ({
fullAddress
:
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
returnGoodsAddress
.
receiveUserTel
||
''
,
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
}
]
:
[]
,
deliveryType
:
returnGoodsAddress
.
deliveryType
,
transport
:
DELIVERY_TYPE
[
returnGoodsAddress
.
deliveryType
],
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
});
}).
finally
(()
=>
{
setInfoLoading
(
false
);
...
...
@@ -638,15 +635,15 @@ const BillsForm: React.FC<BillsFormProps> = ({
fullAddress
:
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
returnGoodsAddress
.
receiveUserTel
||
''
,
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
}
]
:
[]
,
deliveryType
:
returnGoodsAddress
.
deliveryType
,
transport
:
DELIVERY_TYPE
[
returnGoodsAddress
.
deliveryType
],
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
});
}).
finally
(()
=>
{
setInfoLoading
(
false
);
...
...
@@ -685,15 +682,15 @@ const BillsForm: React.FC<BillsFormProps> = ({
fullAddress
:
returnGoodsAddress
.
receiveAddress
||
''
,
receiverName
:
returnGoodsAddress
.
receiveUserName
||
''
,
phone
:
returnGoodsAddress
.
receiveUserTel
||
''
,
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
}
]
:
[]
,
deliveryType
:
returnGoodsAddress
.
deliveryType
,
transport
:
DELIVERY_TYPE
[
returnGoodsAddress
.
deliveryType
],
supplyMembersName
:
supplierName
,
supplyMembersId
:
parentMemberId
,
supplyMembersRoleId
:
parentMemberRoleId
,
});
}).
finally
(()
=>
{
setInfoLoading
(
false
);
...
...
@@ -1013,7 +1010,49 @@ const BillsForm: React.FC<BillsFormProps> = ({
if
(
!
isEdit
)
{
return
;
}
PublicApi
.
postWarehouseInvoicesUpdata
({
id
:
+
id
,
invoicesAbstract
:
rest
.
invoicesAbstract
,
inventoryId
:
rest
.
inventoryId
,
inventoryRole
:
rest
.
inventoryRole
,
transactionTime
:
newTransactionTime
,
invoicesDetailsRequests
:
newInvoicesDetailsRequests
.
map
(
item
=>
{
const
{
extraData
:
{
id
,
orderNo
,
deliveryType
,
goodsCount
,
price
,
totalPrice
,
...
extraRest
},
itemName
,
amount
,
productCount
,
...
rest
}
=
item
;
return
{
...
rest
,
...
extraRest
,
goodsName
:
itemName
,
storageCount
:
productCount
,
productCount
:
goodsCount
,
produceNoticeOrderDetailId
:
id
,
};
}),
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setUnsaved
(
false
);
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
break
;
}
...
...
@@ -1065,7 +1104,49 @@ const BillsForm: React.FC<BillsFormProps> = ({
if
(
!
isEdit
)
{
return
;
}
PublicApi
.
postWarehouseInvoicesUpdata
({
id
:
+
id
,
invoicesAbstract
:
rest
.
invoicesAbstract
,
inventoryId
:
rest
.
inventoryId
,
inventoryRole
:
rest
.
inventoryRole
,
transactionTime
:
newTransactionTime
,
invoicesDetailsRequests
:
newInvoicesDetailsRequests
.
map
(
item
=>
{
const
{
extraData
:
{
id
,
orderNo
,
deliveryType
,
goodsCount
,
price
,
totalPrice
,
...
extraRest
},
itemName
,
amount
,
productCount
,
...
rest
}
=
item
;
return
{
...
rest
,
...
extraRest
,
goodsName
:
itemName
,
shipmentQuantity
:
productCount
,
productCount
:
goodsCount
,
produceNoticeOrderDetailId
:
id
,
};
}),
})
.
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
;
}
setUnsaved
(
false
);
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
break
;
}
...
...
@@ -1112,9 +1193,9 @@ const BillsForm: React.FC<BillsFormProps> = ({
}),
relevanceInvoicesId
:
orderNo
[
0
].
id
,
relevanceInvoices
:
rest
.
relevanceInvoices
,
supplyMembersName
:
billInfo
.
supplyMembersName
,
supplyMembersId
:
billInfo
.
supplyMembersId
,
supplyMembersRoleId
:
billInfo
.
supplyMembersRoleId
,
supplyMembersName
:
orderNo
[
0
]
.
supplyMembersName
,
supplyMembersId
:
orderNo
[
0
]
.
supplyMembersId
,
supplyMembersRoleId
:
orderNo
[
0
]
.
supplyMembersRoleId
,
invoicesTypeId
,
})
.
then
(
res
=>
{
...
...
@@ -1216,9 +1297,9 @@ const BillsForm: React.FC<BillsFormProps> = ({
}),
relevanceInvoicesId
:
orderNo
[
0
].
id
,
relevanceInvoices
:
rest
.
relevanceInvoices
,
supplyMembersName
:
billInfo
.
supplyMembersName
,
supplyMembersId
:
billInfo
.
supplyMembersId
,
supplyMembersRoleId
:
billInfo
.
supplyMembersRoleId
,
supplyMembersName
:
orderNo
[
0
]
.
supplyMembersName
,
supplyMembersId
:
orderNo
[
0
]
.
supplyMembersId
,
supplyMembersRoleId
:
orderNo
[
0
]
.
supplyMembersRoleId
,
invoicesTypeId
,
})
.
then
(
res
=>
{
...
...
@@ -1318,9 +1399,9 @@ const BillsForm: React.FC<BillsFormProps> = ({
}),
relevanceInvoicesId
:
orderNo
[
0
].
id
,
relevanceInvoices
:
rest
.
relevanceInvoices
,
supplyMembersName
:
billInfo
.
supplyMembersName
,
supplyMembersId
:
billInfo
.
supplyMembersId
,
supplyMembersRoleId
:
billInfo
.
supplyMembersRoleId
,
supplyMembersName
:
orderNo
[
0
]
.
supplyMembersName
,
supplyMembersId
:
orderNo
[
0
]
.
supplyMembersId
,
supplyMembersRoleId
:
orderNo
[
0
]
.
supplyMembersRoleId
,
invoicesTypeId
,
})
.
then
(
res
=>
{
...
...
@@ -1420,9 +1501,9 @@ const BillsForm: React.FC<BillsFormProps> = ({
}),
relevanceInvoicesId
:
orderNo
[
0
].
id
,
relevanceInvoices
:
rest
.
relevanceInvoices
,
supplyMembersName
:
billInfo
.
supplyMembersName
,
supplyMembersId
:
billInfo
.
supplyMembersId
,
supplyMembersRoleId
:
billInfo
.
supplyMembersRoleId
,
supplyMembersName
:
orderNo
[
0
]
.
supplyMembersName
,
supplyMembersId
:
orderNo
[
0
]
.
supplyMembersId
,
supplyMembersRoleId
:
orderNo
[
0
]
.
supplyMembersRoleId
,
invoicesTypeId
,
})
.
then
(
res
=>
{
...
...
src/pages/transaction/stockSellStorage/bills/components/BillsForm/schema/index.ts
View file @
7d1a0658
...
...
@@ -752,6 +752,84 @@ export const machiningDeliveryBillSchema: ISchema = {
},
};
// 售后发货、入库 弹窗 search schema
export
const
afterSaleBillSchema
=
(
isPurchaser
:
boolean
):
ISchema
=>
{
return
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
properties
:
{
search
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-mega-props'
:
{},
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-start'
,
tip
:
'输入 通知单号 进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
3
,
},
properties
:
{
applyAbstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'申请单摘要'
,
allowClear
:
true
,
},
},
...(
isPurchaser
?
{
supplierName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'供应会员'
,
allowClear
:
true
,
},
},
}
:
{
consumerName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'采购会员'
,
allowClear
:
true
,
},
},
}),
'[startTime, endTime]'
:
{
type
:
'string'
,
'x-component'
:
'DateSelect'
,
'x-component-props'
:
{
placeholder
:
'单据时间'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
}
}
},
},
},
},
},
}
};
export
const
goodsSearchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
...
...
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