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
fd8a41c6
Commit
fd8a41c6
authored
Apr 19, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-orderV2' into dev-srm
parents
1b5fbd68
f82ed487
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
345 additions
and
286 deletions
+345
-286
index.tsx
src/pages/handling/assign/detail/index.tsx
+36
-16
index.tsx
src/pages/handling/components/Query/index.tsx
+1
-0
DetailTab.tsx
.../handling/components/ReceiptDeliveryDetails/DetailTab.tsx
+4
-4
ReceiptDeliveryDetailsCard.tsx
...nts/ReceiptDeliveryDetails/ReceiptDeliveryDetailsCard.tsx
+0
-32
StatisticsTab.tsx
...dling/components/ReceiptDeliveryDetails/StatisticsTab.tsx
+4
-2
index.tsx
...ages/handling/components/ReceiptDeliveryDetails/index.tsx
+3
-4
index.tsx
src/pages/lxMall/commodity/index.tsx
+3
-1
search.tsx
src/pages/lxMall/commodity/search.tsx
+6
-1
index.tsx
...es/lxMall/commodityDetail/components/Interested/index.tsx
+4
-1
index.tsx
...omponents/ProductDescription/components/Comment/index.tsx
+19
-5
index.tsx
...l/commodityDetail/components/ProductDescription/index.tsx
+5
-3
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+15
-0
index.tsx
src/pages/lxMall/components/Recommand/index.tsx
+7
-8
index.tsx
src/pages/lxMall/pointsMall/index.tsx
+3
-1
index.tsx
src/pages/lxMall/purchaseOrder/index.tsx
+6
-7
index.ts
src/pages/procurement/tender/addBidRegister/schema/index.ts
+4
-0
addRepository.tsx
src/pages/repositories/addRepository.tsx
+3
-0
adjustRepository.tsx
src/pages/repositories/adjustRepository.tsx
+0
-0
commodity.tsx
src/pages/systemSetting/collection/commodity.tsx
+6
-1
information.tsx
src/pages/systemSetting/collection/information.tsx
+138
-134
shops.tsx
src/pages/systemSetting/collection/shops.tsx
+4
-0
index.tsx
src/pages/systemSetting/message/index.tsx
+2
-2
index.tsx
...rder/orderCollect/components/materialModalTable/index.tsx
+42
-42
index.tsx
...transaction/purchaseOrder/orderCollect/constant/index.tsx
+2
-2
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+1
-0
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+26
-19
index.tsx
...saction/purchaseRules/components/selectProcesss/index.tsx
+1
-1
No files found.
src/pages/handling/assign/detail/index.tsx
View file @
fd8a41c6
...
...
@@ -93,6 +93,8 @@ const Detail: React.FC<{}> = () => {
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
deliverAddressOption
,
setDeliverAddressOption
]
=
useState
([]);
const
[
activeAddress
,
setActiveAddress
]
=
useState
<
string
|
null
>
(
null
)
const
[
activeKey
,
setActiveKey
]
=
useState
<
string
>
(
"1"
);
const
hasProductNoDelievery
=
useMemo
(()
=>
{
let
res
=
false
if
(
pathname
===
`
${
PENDING_RECEIPT_PATH
}
/detail`
)
{
...
...
@@ -140,6 +142,12 @@ const Detail: React.FC<{}> = () => {
}
},
[
id
]);
useEffect
(()
=>
{
if
(
info
?.
pnoReceiveDeliverDetailDOList
?.
length
>
0
)
{
setActiveKey
(
"2"
);
}
},
[
info
.
pnoReceiveDeliverDetailDOList
])
// 确认生产通知单 -> 待提交审核生产通知单时需要同时提交他的发货地址
useEffect
(()
=>
{
if
(
isSetDeliverAddress
)
{
...
...
@@ -343,6 +351,14 @@ const Detail: React.FC<{}> = () => {
})
}
/**
* tab change
*/
const
handleTabChange
=
(
tabKey
)
=>
{
console
.
log
(
tabKey
)
setActiveKey
(
tabKey
);
}
return
(
<
PageHeaderWrapper
title=
{
...
...
@@ -444,22 +460,26 @@ const Detail: React.FC<{}> = () => {
{
info
&&
info
.
outerTaskType
!==
29
?
<
div
style=
{
{
marginTop
:
'20px'
}
}
>
<
ReceiptDeliveryDetailsCard
defaultActiveKey=
"1"
>
<
StatisticsTab
tabKey=
"1"
tab=
"收发货统计"
columns=
{
receiveColumns
(
info
.
source
===
SourceEnum
.
order
?
'order'
:
'product'
)
}
dataSource=
{
info
.
details
}
></
StatisticsTab
>
{
info
.
pnoReceiveDeliverDetailDOList
&&
info
.
pnoReceiveDeliverDetailDOList
.
length
>
0
?
<
DetailTab
tabKey=
"2"
tab=
"收发货明细"
columns=
{
receiptAndDeliveryDetailsColumns
}
dataSource=
{
info
.
pnoReceiveDeliverDetailDOList
}
handleConfirm=
{
handleConfirm
}
/>
:
null
}
</
ReceiptDeliveryDetailsCard
>
<
Card
bodyStyle=
{
{
padding
:
'10px 24px 24px 24px'
}
}
>
<
Tabs
activeKey=
{
activeKey
}
onChange=
{
handleTabChange
}
>
<
TabPane
key=
"1"
tab=
"收发货统计"
>
<
StatisticsTab
columns=
{
receiveColumns
(
info
.
source
===
SourceEnum
.
order
?
'order'
:
'product'
)
}
dataSource=
{
info
.
details
}
></
StatisticsTab
>
</
TabPane
>
{
info
.
pnoReceiveDeliverDetailDOList
&&
info
.
pnoReceiveDeliverDetailDOList
.
length
>
0
?
<
TabPane
key=
"2"
tab=
"收发货明细"
>
<
DetailTab
columns=
{
receiptAndDeliveryDetailsColumns
}
dataSource=
{
info
.
pnoReceiveDeliverDetailDOList
}
handleConfirm=
{
handleConfirm
}
/>
</
TabPane
>
:
null
}
</
Tabs
>
</
Card
>
</
div
>
:
null
}
...
...
src/pages/handling/components/Query/index.tsx
View file @
fd8a41c6
...
...
@@ -258,6 +258,7 @@ const Query: React.FC<{}> = (props) => {
service
(
params
).
then
(({
data
,
code
})
=>
{
setBatchLoading
(
false
);
if
(
code
===
1000
)
{
selectRowFns
.
setSelectedRowKeys
([]);
formActions
.
submit
();
}
})
...
...
src/pages/handling/components/ReceiptDeliveryDetails/DetailTab.tsx
View file @
fd8a41c6
...
...
@@ -7,10 +7,10 @@ import { history, Link } from 'umi'
import
{
ASSIGN_PENDING_RECEIVE_DETAIL
,
PENDING_DELIVERD_PATH
,
PENDING_RECEIPT_PATH
}
from
'../../common'
;
interface
Iprops
{
tab
:
string
,
//
tab: string,
columns
:
ColumnsType
<
any
>
,
dataSource
:
any
[],
tabKey
:
string
,
//
tabKey: string,
handleConfirm
:
(
type
:
string
,
params
:
any
)
=>
void
}
...
...
@@ -80,8 +80,8 @@ const DetailTab: React.FC<Iprops> = (props) => {
}
const
sorted
=
dataSource
&&
dataSource
.
sort
((
a
,
b
)
=>
a
.
deliveryBatch
-
b
.
deliveryBatch
)
||
[]
return
(
<
div
>
<
div
>
<
div
>
<
div
>
<
Radio
.
Group
value=
{
activeBatch
}
onChange=
{
handleOnChange
}
>
{
sorted
.
map
((
item
,
key
)
=>
{
...
...
src/pages/handling/components/ReceiptDeliveryDetails/ReceiptDeliveryDetailsCard.tsx
deleted
100644 → 0
View file @
1b5fbd68
import
React
from
'react'
;
import
{
Card
,
Tabs
}
from
'antd'
;
const
TabPane
=
Tabs
.
TabPane
interface
Iprops
{
defaultActiveKey
:
string
};
const
ReceiptDeliveryDetailsCard
:
React
.
FC
<
Iprops
>
=
(
props
)
=>
{
const
newChildren
=
React
.
Children
.
map
(
props
.
children
,
(
child
:
any
,
index
)
=>
{
if
(
child
)
{
return
(
<
TabPane
tab=
{
child
.
props
.
tab
}
key=
{
child
.
props
.
tabKey
.
toString
()
||
index
.
toString
()
}
>
{
child
}
</
TabPane
>
)
}
else
{
return
null
}
})
console
.
log
(
props
.
defaultActiveKey
)
return
(
<
Card
bodyStyle=
{
{
padding
:
'10px 24px 24px 24px'
}
}
>
<
Tabs
defaultActiveKey=
{
props
.
defaultActiveKey
}
>
{
newChildren
}
</
Tabs
>
</
Card
>
)
}
export
default
ReceiptDeliveryDetailsCard
src/pages/handling/components/ReceiptDeliveryDetails/StatisticsTab.tsx
View file @
fd8a41c6
...
...
@@ -2,12 +2,14 @@ import React from 'react';
import
{
Table
}
from
'antd'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
interface
Iprops
{
tab
:
string
,
//
tab: string,
columns
:
ColumnsType
<
any
>
,
dataSource
:
any
[],
tabKey
:
string
,
//
tabKey: string,
}
const
StatisticsTab
:
React
.
FC
<
Iprops
>
=
(
props
)
=>
{
const
{
columns
,
dataSource
}
=
props
;
return
(
...
...
src/pages/handling/components/ReceiptDeliveryDetails/index.tsx
View file @
fd8a41c6
import
ReceiptDeliveryDetailsCard
from
'./ReceiptDeliveryDetailsCard'
;
//
import ReceiptDeliveryDetailsCard from './ReceiptDeliveryDetailsCard';
import
DetailTab
from
'./DetailTab'
;
import
StatisticsTab
from
'./StatisticsTab'
;
export
{
ReceiptDeliveryDetailsCard
,
//
ReceiptDeliveryDetailsCard,
DetailTab
,
StatisticsTab
}
\ No newline at end of file
}
src/pages/lxMall/commodity/index.tsx
View file @
fd8a41c6
...
...
@@ -141,7 +141,9 @@ const Commodity: React.FC<CommodityPropsType> = (props) => {
}
setLoading
(
true
)
let
getFn
;
let
headers
=
{}
let
headers
=
{
type
:
1
}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
mall
:
getFn
=
PublicApi
.
postSearchShopEnterpriseGetCommodityList
...
...
src/pages/lxMall/commodity/search.tsx
View file @
fd8a41c6
...
...
@@ -95,6 +95,9 @@ const CommoditySearch: React.FC<CommodityPropsType> = (props) => {
}
setLoading
(
true
)
let
getFn
;
const
headers
:
{
type
:
number
}
=
{
type
:
1
}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
mall
:
getFn
=
PublicApi
.
postSearchShopEnterpriseGetCommodityList
...
...
@@ -104,16 +107,18 @@ const CommoditySearch: React.FC<CommodityPropsType> = (props) => {
getFn
=
PublicApi
.
postSearchShopStoreGetCommodityList
break
case
LAYOUT_TYPE
.
channel
:
headers
.
type
=
3
param
.
channelMemberId
=
memberId
getFn
=
PublicApi
.
postSearchShopChannelGetCommodityList
break
case
LAYOUT_TYPE
.
ichannel
:
headers
.
type
=
4
param
.
channelMemberId
=
memberId
getFn
=
PublicApi
.
postSearchShopChannelGetCommodityList
break
}
getFn
&&
getFn
(
param
).
then
(
res
=>
{
getFn
&&
getFn
(
param
,
{
headers
}
).
then
(
res
=>
{
setLoading
(
false
)
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
...
...
src/pages/lxMall/commodityDetail/components/Interested/index.tsx
View file @
fd8a41c6
...
...
@@ -31,12 +31,15 @@ const Interested: React.FC<InterestedPropsType> = (props) => {
current
:
1
,
pageSize
:
5
}
const
headers
:
any
=
{}
const
headers
:
any
=
{
type
:
1
}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
shop
:
case
LAYOUT_TYPE
.
mall
:
param
.
storeId
=
shopInfo
.
id
if
(
priceType
===
COMMODITY_TYPE
.
integral
)
{
headers
.
type
=
2
param
.
priceTypeList
=
[
3
]
getFn
=
PublicApi
.
postSearchShopScoreGetCommodityList
}
else
if
(
priceType
===
COMMODITY_TYPE
.
inquiry
)
{
...
...
src/pages/lxMall/commodityDetail/components/ProductDescription/components/Comment/index.tsx
View file @
fd8a41c6
...
...
@@ -4,6 +4,7 @@ import { Rate, Pagination, Spin } from 'antd'
import
ImageViewList
from
'../ImageViewList'
import
defaultAvatar
from
'@/assets/imgs/default_avatar.png'
import
{
PublicApi
}
from
'@/services/api'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
GetMemberCommentMallTradeHistoryPageResponseDetail
,
GetMemberCommentMallTradeSummaryResponse
}
from
'@/services/MemberApi'
import
isEmpty
from
'lodash/isEmpty'
import
NoData
from
'@/components/NoData'
...
...
@@ -13,11 +14,12 @@ import styles from './index.less'
interface
CommentPropsType
{
productIds
:
number
[],
setCount
:
Function
,
storeId
:
number
,
memberId
:
number
,
layoutType
:
LAYOUT_TYPE
}
const
Comment
:
React
.
FC
<
CommentPropsType
>
=
(
props
)
=>
{
const
{
productIds
,
setCount
,
storeId
}
=
props
const
{
productIds
,
setCount
,
memberId
,
layoutType
}
=
props
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
]
=
useState
<
number
>
(
10
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
...
...
@@ -46,8 +48,7 @@ const Comment: React.FC<CommentPropsType> = (props) => {
const
param
:
any
=
{
current
,
pageSize
,
productIds
:
productIds
.
toString
(),
// '2339'
shopId
:
storeId
,
productIds
:
productIds
.
toString
(),
}
if
(
type
===
'good'
)
{
param
.
starLevel
=
3
...
...
@@ -56,6 +57,11 @@ const Comment: React.FC<CommentPropsType> = (props) => {
}
else
if
(
type
===
'bad'
)
{
param
.
starLevel
=
1
}
if
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
{
param
.
channelMemberId
=
memberId
}
setSpinLoading
(
true
)
PublicApi
.
getMemberCommentMallTradeHistoryPage
(
param
).
then
(
res
=>
{
...
...
@@ -70,7 +76,15 @@ const Comment: React.FC<CommentPropsType> = (props) => {
}
const
fetchCommentSummary
=
()
=>
{
PublicApi
.
getMemberCommentMallTradeSummary
({
productIds
:
productIds
.
toString
(),
shopId
:
String
(
storeId
)
}).
then
(
res
=>
{
const
param
:
any
=
{
productIds
:
productIds
.
toString
()
}
if
(
layoutType
===
LAYOUT_TYPE
.
channel
||
layoutType
===
LAYOUT_TYPE
.
ichannel
)
{
param
.
channelMemberId
=
memberId
}
PublicApi
.
getMemberCommentMallTradeSummary
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setSummaryInfo
(
res
.
data
)
getCommentCountBySummary
(
res
.
data
.
rows
)
...
...
src/pages/lxMall/commodityDetail/components/ProductDescription/index.tsx
View file @
fd8a41c6
...
...
@@ -12,7 +12,7 @@ import Comment from './components/Comment'
import
Introduction
from
'./components/Introduction'
import
TradeRecord
from
'./components/TradeRecord'
import
Recommand
from
'./components/Recommand'
import
{
COMMODITY_TYPE
}
from
'@/constants'
import
{
COMMODITY_TYPE
,
LAYOUT_TYPE
}
from
'@/constants'
import
{
GetSearchShopStoreGetCommodityDetailResponse
}
from
'@/services/SearchApi'
import
cx
from
'classnames'
import
styles
from
'./index.less'
...
...
@@ -23,10 +23,12 @@ interface ProductDescriptionPropsType {
commodityDetail
:
GetSearchShopStoreGetCommodityDetailResponse
,
dataList
:
any
,
storeId
:
number
,
memberId
:
number
,
layoutType
:
LAYOUT_TYPE
,
}
const
ProductDescription
:
React
.
FC
<
ProductDescriptionPropsType
>
=
(
props
)
=>
{
const
{
commodityDetail
,
dataList
,
storeId
}
=
props
const
{
commodityDetail
,
dataList
,
storeId
,
memberId
,
layoutType
}
=
props
const
[
currentAnchor
,
setCurrentAnchor
]
=
useState
<
string
>
(
"#introduction"
)
const
[
productIds
,
setProductIds
]
=
useState
<
number
[]
>
([])
const
[
tradeRecordCount
,
setTradeRecordCount
]
=
useState
<
number
>
(
0
)
...
...
@@ -79,7 +81,7 @@ const ProductDescription: React.FC<ProductDescriptionPropsType> = (props) => {
</
Anchor
>
<
Introduction
commodityDetail=
{
commodityDetail
}
/>
<
TradeRecord
productIds=
{
productIds
}
storeId=
{
storeId
}
setCount=
{
(
count
)
=>
setTradeRecordCount
(
count
)
}
/>
<
Comment
productIds=
{
productIds
}
storeId=
{
storeId
}
setCount=
{
(
count
)
=>
setCommentCount
(
count
)
}
/>
<
Comment
productIds=
{
productIds
}
memberId=
{
memberId
}
layoutType=
{
layoutType
}
setCount=
{
(
count
)
=>
setCommentCount
(
count
)
}
/>
<
Recommand
dataList=
{
dataList
}
{
...
props
}
/>
</
div
>
)
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
fd8a41c6
...
...
@@ -124,6 +124,9 @@ const CommodityDetail = (props) => {
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
shop
:
param
.
storeId
=
shopId
headers
=
{
type
:
1
}
switch
(
priceType
)
{
case
COMMODITY_TYPE
.
prompt
:
param
.
priceTypeList
=
[
1
]
...
...
@@ -134,6 +137,9 @@ const CommodityDetail = (props) => {
getListFn
=
PublicApi
.
postSearchShopStoreGetCommodityList
break
case
COMMODITY_TYPE
.
integral
:
headers
=
{
type
:
2
}
param
.
priceTypeList
=
[
3
]
getListFn
=
PublicApi
.
postSearchShopScoreGetCommodityList
break
...
...
@@ -219,6 +225,15 @@ const CommodityDetail = (props) => {
getDetailFn
=
PublicApi
.
getSearchShopChannelGetCommodityDetail
break
default
:
if
(
type
===
"3"
)
{
headers
=
{
type
:
2
}
}
else
{
headers
=
{
type
:
1
}
}
getDetailFn
=
PublicApi
.
getSearchShopStoreGetCommodityDetail
break
}
...
...
src/pages/lxMall/components/Recommand/index.tsx
View file @
fd8a41c6
...
...
@@ -37,7 +37,7 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
for
(
const
id
of
categoryIds
)
{
const
resList
:
any
=
await
getListById
(
id
)
result
=
[...
result
,
...
resList
]
if
(
result
&&
result
.
length
>
=
5
)
{
if
(
result
&&
result
.
length
>
0
)
{
setList
(
result
)
break
}
...
...
@@ -66,24 +66,23 @@ const Recommand: React.FC<RecommandPropsType> = (props) => {
pageSize
:
5
,
customerCategoryId
:
categoryId
,
}
let
headers
=
{}
const
headers
:
{
type
:
number
}
=
{
type
:
1
}
let
getListFn
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
headers
=
{
type
:
3
}
headers
.
type
=
3
param
.
channelMemberId
=
memberId
getListFn
=
PublicApi
.
postSearchShopChannelGetCommodityList
break
case
LAYOUT_TYPE
.
ichannel
:
headers
=
{
type
:
4
}
headers
.
type
=
4
param
.
channelMemberId
=
memberId
getListFn
=
PublicApi
.
postSearchShopChannelGetCommodityList
break
default
:
headers
.
type
=
1
getListFn
=
PublicApi
.
postSearchShopEnterpriseGetCommodityList
break
}
...
...
src/pages/lxMall/pointsMall/index.tsx
View file @
fd8a41c6
...
...
@@ -81,7 +81,9 @@ const PointsMall: React.FC<CommodityPropsType> = (props) => {
param
=
Object
.
assign
(
param
,
filterParam
)
}
setLoading
(
true
)
let
headers
=
{}
let
headers
=
{
type
:
2
}
let
getFn
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
...
...
src/pages/lxMall/purchaseOrder/index.tsx
View file @
fd8a41c6
...
...
@@ -57,21 +57,20 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
*/
const
fetchPurchaseList
=
()
=>
{
let
getFn
let
headers
=
{}
const
headers
:
{
type
:
number
}
=
{
type
:
1
}
switch
(
layoutType
)
{
case
LAYOUT_TYPE
.
channel
:
headers
=
{
type
:
3
}
headers
.
type
=
3
getFn
=
PublicApi
.
getSearchShopPurchaseChannelGetPurchaseList
break
;
case
LAYOUT_TYPE
.
ichannel
:
headers
=
{
type
:
4
}
headers
.
type
=
4
getFn
=
PublicApi
.
getSearchShopPurchaseChannelGetPurchaseList
break
;
default
:
headers
.
type
=
1
getFn
=
PublicApi
.
getSearchShopPurchaseGetPurchaseList
break
;
}
...
...
src/pages/procurement/tender/addBidRegister/schema/index.ts
View file @
fd8a41c6
...
...
@@ -253,6 +253,10 @@ export const formSchema: ISchema = {
required
:
true
,
"x-rules"
:
[
{
required
:
true
,
message
:
'请填写详细地址'
,
},
{
limitByte
:
true
,
maxByte
:
100
,
},
...
...
src/pages/repositories/addRepository.tsx
View file @
fd8a41c6
...
...
@@ -46,6 +46,9 @@ const AddRepository:React.FC<{}> = (props) => {
params
[
'warehouseName'
]
=
prevState
.
props
.
enum
.
filter
((
item
:
any
)
=>
item
.
value
===
prevState
.
value
)[
0
][
'label'
]
}
})
addSchemaAction
.
getFieldState
(
'shopIds'
,
state
=>
{
params
[
'shopIds'
]
=
state
.
value
.
map
(
item
=>
state
.
props
[
'x-component-props'
].
dataSource
.
filter
(
_
=>
_
.
id
===
item
)[
0
])
})
let
res
=
await
PublicApi
.
postWarehouseFreightSpaceAdd
(
params
)
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
...
...
src/pages/repositories/adjustRepository.tsx
View file @
fd8a41c6
This diff is collapsed.
Click to expand it.
src/pages/systemSetting/collection/commodity.tsx
View file @
fd8a41c6
...
...
@@ -68,6 +68,11 @@ const Commodity: React.FC = () => {
break
}
el
.
target
=
'_blank'
;
el
.
id
=
detail
.
commodity
.
id
// 防止反复添加
if
(
!
document
.
getElementById
(
detail
.
commodity
.
id
))
{
document
.
body
.
appendChild
(
el
);
}
el
.
click
()
}
else
{
message
.
destroy
()
...
...
@@ -130,7 +135,7 @@ const Commodity: React.FC = () => {
PublicApi
.
postSearchShopCommodityCollectDeleteCommodityCollect
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
fetchCollectCommodityList
()
resolve
()
resolve
(
true
)
}
else
{
reject
()
}
...
...
src/pages/systemSetting/collection/information.tsx
View file @
fd8a41c6
import
React
,
{
useEffect
,
useState
}
from
'react'
import
cx
from
'classnames'
import
{
Pagination
,
message
,
Modal
}
from
'antd'
import
{
StarFilled
,
EyeOutlined
,
ClockCircleOutlined
}
from
'@ant-design/icons'
import
{
PublicApi
}
from
'@/services/api'
import
{
numFormat
}
from
'@/utils/numberFomat'
import
moment
from
'moment'
import
styles
from
'./index.less'
const
Information
:
React
.
FC
=
()
=>
{
const
[
list
,
setList
]
=
useState
([])
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
useEffect
(()
=>
{
fetchCollectInformationList
()
},
[
current
])
/**
* 获取收藏的资讯列表
*/
const
fetchCollectInformationList
=
()
=>
{
let
param
=
{
current
,
pageSize
}
//@ts-ignore
PublicApi
.
getManageContentInformationCollectList
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setList
(
res
.
data
.
data
)
setTotalCount
(
res
.
data
.
totalCount
)
}
})
}
const
handleChange
=
(
page
)
=>
{
setCurrent
(
page
)
}
const
linkToDetail
=
(
detail
)
=>
{
if
(
detail
.
status
===
2
)
{
let
el
=
document
.
createElement
(
'a'
)
el
.
href
=
`/infomation/detail?id=
${
detail
.
id
}
`
;
el
.
target
=
'_blank'
;
el
.
click
()
}
else
{
message
.
destroy
()
message
.
info
(
"该文章已下架"
)
}
}
const
handleCancelCollect
=
(
detail
)
=>
{
Modal
.
confirm
({
centered
:
true
,
className
:
styles
.
mallComfirm
,
content
:
`是否要取消收藏?`
,
onOk
:
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
param
=
{
informationId
:
detail
.
id
,
status
:
false
}
PublicApi
.
postManageContentInformationCollect
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
// fetchPurchaseList()
fetchCollectInformationList
()
resolve
()
}
else
{
reject
()
}
}).
catch
(()
=>
{
reject
()
})
})
}
})
}
return
(
<>
<
div
className=
{
styles
.
information_list
}
>
{
list
&&
list
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
information_list_item
}
key=
{
`information_list_item_${index}`
}
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
,
styles
.
morehalf
)
}
>
<
div
className=
{
styles
.
information_header_info
}
>
<
div
className=
{
styles
.
information_header_info_logo
}
>
<
img
src=
{
item
.
imageUrl
}
/>
</
div
>
<
div
className=
{
styles
.
information_header_info_content
}
>
<
div
className=
{
styles
.
information_header_info_content_name
}
onClick=
{
()
=>
linkToDetail
(
item
)
}
>
<
span
>
{
item
.
title
}
</
span
>
</
div
>
<
div
className=
{
styles
.
information_header_info_content_about
}
>
<
div
className=
{
styles
.
information_header_info_content_about_item
}
>
<
ClockCircleOutlined
/>
<
span
>
{
moment
(
item
.
createTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
span
>
</
div
>
<
div
className=
{
styles
.
information_header_info_content_about_item
}
>
<
EyeOutlined
/>
<
span
>
{
numFormat
(
item
.
readCount
)
}
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
)
}
>
<
span
className=
{
styles
.
date
}
>
{
moment
(
item
.
collectTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
span
>
</
div
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
)
}
onClick=
{
()
=>
handleCancelCollect
(
item
)
}
>
<
div
className=
{
cx
(
styles
.
collection_state
)
}
>
<
StarFilled
/>
<
label
>
收藏
</
label
>
</
div
>
</
div
>
</
div
>
))
}
</
div
>
{
totalCount
>
0
&&
(
<
div
className=
{
styles
.
pagination_wrap
}
>
<
Pagination
showSizeChanger=
{
false
}
current=
{
current
}
total=
{
totalCount
}
pageSize=
{
pageSize
}
onChange=
{
handleChange
}
/>
</
div
>
)
}
</>
)
}
export
default
Information
import
React
,
{
useEffect
,
useState
}
from
'react'
import
cx
from
'classnames'
import
{
Pagination
,
message
,
Modal
}
from
'antd'
import
{
StarFilled
,
EyeOutlined
,
ClockCircleOutlined
}
from
'@ant-design/icons'
import
{
PublicApi
}
from
'@/services/api'
import
{
numFormat
}
from
'@/utils/numberFomat'
import
moment
from
'moment'
import
styles
from
'./index.less'
const
Information
:
React
.
FC
=
()
=>
{
const
[
list
,
setList
]
=
useState
([])
const
[
current
,
setCurrent
]
=
useState
<
number
>
(
1
)
const
[
pageSize
,
setPageSize
]
=
useState
<
number
>
(
10
)
const
[
totalCount
,
setTotalCount
]
=
useState
<
number
>
(
0
)
useEffect
(()
=>
{
fetchCollectInformationList
()
},
[
current
])
/**
* 获取收藏的资讯列表
*/
const
fetchCollectInformationList
=
()
=>
{
const
param
:
any
=
{
current
,
pageSize
}
PublicApi
.
getManageContentInformationCollectList
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setList
(
res
.
data
.
data
)
setTotalCount
(
res
.
data
.
totalCount
)
}
})
}
const
handleChange
=
(
page
)
=>
{
setCurrent
(
page
)
}
const
linkToDetail
=
(
detail
)
=>
{
if
(
detail
.
status
===
2
)
{
const
el
=
document
.
createElement
(
'a'
)
el
.
href
=
`/infomation/detail?id=
${
detail
.
id
}
`
;
el
.
target
=
'_blank'
;
el
.
id
=
detail
.
id
if
(
!
document
.
getElementById
(
detail
.
id
))
{
document
.
body
.
appendChild
(
el
);
}
el
.
click
()
}
else
{
message
.
destroy
()
message
.
info
(
"该文章已下架"
)
}
}
const
handleCancelCollect
=
(
detail
)
=>
{
Modal
.
confirm
({
centered
:
true
,
className
:
styles
.
mallComfirm
,
content
:
`是否要取消收藏?`
,
onOk
:
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
param
=
{
informationId
:
detail
.
id
,
status
:
false
}
PublicApi
.
postManageContentInformationCollect
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
// fetchPurchaseList()
fetchCollectInformationList
()
resolve
(
true
)
}
else
{
reject
()
}
}).
catch
(()
=>
{
reject
()
})
})
}
})
}
return
(
<>
<
div
className=
{
styles
.
information_list
}
>
{
list
&&
list
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
information_list_item
}
key=
{
`information_list_item_${index}`
}
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
,
styles
.
morehalf
)
}
>
<
div
className=
{
styles
.
information_header_info
}
>
<
div
className=
{
styles
.
information_header_info_logo
}
>
<
img
src=
{
item
.
imageUrl
}
/>
</
div
>
<
div
className=
{
styles
.
information_header_info_content
}
>
<
div
className=
{
styles
.
information_header_info_content_name
}
onClick=
{
()
=>
linkToDetail
(
item
)
}
>
<
span
>
{
item
.
title
}
</
span
>
</
div
>
<
div
className=
{
styles
.
information_header_info_content_about
}
>
<
div
className=
{
styles
.
information_header_info_content_about_item
}
>
<
ClockCircleOutlined
/>
<
span
>
{
moment
(
item
.
createTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
span
>
</
div
>
<
div
className=
{
styles
.
information_header_info_content_about_item
}
>
<
EyeOutlined
/>
<
span
>
{
numFormat
(
item
.
readCount
)
}
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
)
}
>
<
span
className=
{
styles
.
date
}
>
{
moment
(
item
.
collectTime
).
format
(
"YYYY-MM-DD HH:mm"
)
}
</
span
>
</
div
>
<
div
className=
{
cx
(
styles
.
information_list_item_item
)
}
onClick=
{
()
=>
handleCancelCollect
(
item
)
}
>
<
div
className=
{
cx
(
styles
.
collection_state
)
}
>
<
StarFilled
/>
<
label
>
收藏
</
label
>
</
div
>
</
div
>
</
div
>
))
}
</
div
>
{
totalCount
>
0
&&
(
<
div
className=
{
styles
.
pagination_wrap
}
>
<
Pagination
showSizeChanger=
{
false
}
current=
{
current
}
total=
{
totalCount
}
pageSize=
{
pageSize
}
onChange=
{
handleChange
}
/>
</
div
>
)
}
</>
)
}
export
default
Information
src/pages/systemSetting/collection/shops.tsx
View file @
fd8a41c6
...
...
@@ -71,6 +71,10 @@ const Shops: React.FC = () => {
const
el
=
document
.
createElement
(
'a'
)
el
.
href
=
`/shop?shopId=
${
btoa
(
JSON
.
stringify
({
shopId
:
detail
.
id
,
memberId
:
detail
.
memberId
}))}
`
;
el
.
target
=
'_blank'
;
el
.
id
=
detail
.
id
if
(
!
document
.
getElementById
(
detail
.
id
))
{
document
.
body
.
appendChild
(
el
);
}
el
.
click
()
}
else
{
message
.
destroy
()
...
...
src/pages/systemSetting/message/index.tsx
View file @
fd8a41c6
...
...
@@ -93,8 +93,8 @@ const Message: React.FC<{}> = () => {
className=
{
styles
.
customList
}
pagination=
{
{
onChange
:
handlePaginationChange
,
pageSize
:
10
,
s
ize
:
"small"
,
pageSize
:
pagination
.
pageSize
,
s
howSizeChanger
:
true
,
showQuickJumper
:
true
,
total
:
dataSource
.
totalCount
,
showTotal
:
showTotal
,
...
...
src/pages/transaction/purchaseOrder/orderCollect/components/materialModalTable/index.tsx
View file @
fd8a41c6
...
...
@@ -96,42 +96,6 @@ export const AddressPop = (props) => {
</
Space
>
:
children
}
export
const
filterProductDataById
=
(
data
,
targetData
)
=>
{
return
targetData
.
reduce
(
async
(
prev
:
any
[],
next
)
=>
{
const
{
logistics
}
=
next
// 由于自选商品和进货单商品字段不一致,需手动同步
next
.
brand
=
next
.
brand
||
next
.
brandName
next
.
category
=
next
.
category
||
next
.
customerCategoryName
next
.
unit
=
next
.
unit
||
next
.
unitName
next
.
productName
=
next
.
productName
||
next
.
name
if
(
logistics
.
deliveryType
===
2
&&
logistics
.
sendAddress
)
{
const
{
code
,
data
}
=
await
PublicApi
.
getLogisticsShipperAddressGet
({
id
:
logistics
.
sendAddress
},
{
ttl
:
60
*
1000
,
useCache
:
true
})
logistics
.
render
=
data
}
else
{
logistics
.
render
=
DELIVERY_TYPE
[
logistics
.
deliveryType
]
}
// 配送方式外置, 用于接口字段冗余
next
.
deliveryType
=
logistics
.
deliveryType
// id 存在集合中, 采用target中的数据, 否则采用data中的数据
const
findResult
=
data
.
find
(
v
=>
v
.
id
===
next
.
id
)
// 由于迭代时,会出现promise的 已完成状态, 需转换一下,实现异步转同步化
if
(
!
Array
.
isArray
(
prev
))
{
prev
=
await
prev
}
if
(
findResult
)
{
// 已经选中过这一项, 则需要采用原有的商品列表
prev
.
push
(
findResult
)
}
else
{
prev
.
push
(
next
)
}
return
prev
},
[])
}
const
MaterialModalTable
:
React
.
FC
<
MaterialModalTableProps
>
=
(
props
)
=>
{
const
{
type
=
'checkbox'
,
schemaAction
,
confirmModal
,
currentRef
,
sectionProps
,
...
restProps
}
=
props
const
{
visible
,
setVisible
,
rowSelection
,
rowSelectionCtl
}
=
sectionProps
...
...
@@ -146,19 +110,55 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
}
},
[])
const
addMaterialProcessField
=
(
value
,
origin
)
=>
{
if
(
Array
.
isArray
(
value
))
{
let
processData
=
value
.
map
(
v
=>
{
let
temp
:
any
=
{};
temp
.
id
=
v
.
id
;
temp
.
code
=
v
.
materielNo
;
temp
.
name
=
v
.
materielName
;
temp
.
type
=
v
.
type
;
temp
.
category
=
v
.
category
;
temp
.
brand
=
v
.
brand
;
temp
.
unit
=
v
.
unit
;
temp
.
relevanceProductId
=
v
.
associatedDataId
;
temp
.
relevanceProductName
=
v
.
associatedGoods
;
temp
.
relevanceProductNo
=
v
.
associatedMaterielNo
;
temp
.
relevanceProductType
=
v
.
associatedType
;
temp
.
relevanceProductCategory
=
v
.
associatedCategory
;
temp
.
relevanceProductBrand
=
v
.
associatedBrand
;
temp
.
price
=
v
.
price
;
temp
.
inventory
=
v
.
bidCount
;
temp
.
taxInclusive
=
v
.
isHasTax
;
temp
.
taxRate
=
v
.
taxRate
;
// @ 配送方式 默认物流
temp
.
logistics
=
1
return
temp
})
let
originIds
=
origin
.
map
(
item
=>
item
.
id
)
processData
.
map
(
item
=>
{
if
(
!
originIds
.
includes
(
item
.
id
))
{
origin
.
push
(
item
)
}
})
return
origin
}
}
const
handleConfirm
=
async
()
=>
{
// 判断所选择的商品是否属于同一个工作流
console
.
log
(
rowSelectionCtl
,
'rowSelectionCtl'
)
// @ts-ignore
const
res
=
await
PublicApi
.
postOrderIsWorkFlow
({
memberId
:
rowSelectionCtl
.
selectRow
[
0
].
memberId
,
memberRoleId
:
rowSelectionCtl
.
selectRow
[
0
].
memberRoleId
,
productIds
:
rowSelectionCtl
.
select
edRowKeys
,
memberId
:
schemaAction
.
getFieldValue
(
'supplyMembersId'
)
,
memberRoleId
:
schemaAction
.
getFieldValue
(
'supplyMembersRoleId'
)
,
productIds
:
rowSelectionCtl
.
select
Row
.
map
(
item
=>
item
.
associatedDataId
)
,
orderModel
:
schemaAction
.
getFieldValue
(
'orderModel'
)
},
{
ctlType
:
'none'
})
if
(
res
.
code
===
1000
)
{
const
productData
=
schemaAction
.
getFieldValue
(
'orderProductRequests'
)
schemaAction
.
setFieldValue
(
'orderProductRequests'
,
a
wait
filterProductDataById
(
productData
,
rowSelectionCtl
.
selectRow
))
schemaAction
.
setFieldValue
(
'orderProductRequests'
,
a
ddMaterialProcessField
(
rowSelectionCtl
.
selectRow
,
productData
))
confirmModal
&&
confirmModal
()
setVisible
(
false
)
}
else
{
...
...
@@ -172,7 +172,7 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
...
values
,
contractId
,
}
return
fetchOrderApi
.
get
Product
List
(
params
)
return
fetchOrderApi
.
get
ContractPurchaseMateriel
List
(
params
)
}
...
...
@@ -186,7 +186,7 @@ const MaterialModalTable:React.FC<MaterialModalTableProps> = (props) => {
cancel=
{
()
=>
setVisible
(
false
)
}
fetchTableData=
{
fetchMaterialList
}
rowSelection=
{
rowSelection
}
resetModal=
{
{
destroyOnClose
:
true
,
forceRender
:
true
}
}
resetModal=
{
{
destroyOnClose
:
true
}
}
modalType=
'none'
tableProps=
{
{
rowKey
:
'id'
,
...
...
src/pages/transaction/purchaseOrder/orderCollect/constant/index.tsx
View file @
fd8a41c6
...
...
@@ -25,12 +25,12 @@ export const PriceComp = (props) => {
</
div
>
}
/
/ @采购合同下单 字段转换
/
** 采购合同下单 字段转换 */
export
const
procurementProcessField
=
(
value
)
=>
{
value
.
orderProductRequests
=
value
.
orderProductRequests
.
map
(
item
=>
{
// @todo 查询商品对应的最小起订数
// const { data, code } = await PublicApi.getProductCommodityGetCommodity({id: item.relevanceProductId})
delete
item
.
id
//
delete item.id
return
{
...
item
,
productId
:
item
.
relevanceProductId
,
...
...
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
fd8a41c6
...
...
@@ -74,6 +74,7 @@ export const useModelTypeChange = (callback) => {
const
utils
=
useLinkageUtils
()
// 下单模式发生改变时
FormEffectHooks
.
onFieldValueChange$
(
'orderModel'
).
subscribe
(
state
=>
{
console
.
log
(
state
.
value
,
'efffect'
)
callback
(
state
)
})
}
...
...
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
fd8a41c6
...
...
@@ -36,6 +36,7 @@ import { fetchOrderApi } from './apis'
import
MergeOrderModalTable
from
'./components/mergeOrderModalTable'
import
{
useMaterialTable
}
from
'./model/useMaterialTable'
import
ContractModalTable
from
'./components/contractModalTable'
import
MaterialModalTable
from
'./components/materialModalTable'
export
interface
PurchaseOrderDetailProps
{}
...
...
@@ -164,7 +165,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
// 订单商品
const
{
productAddButton
,
productRef
,
productColumns
,
productComponents
,
...
sectionProps
}
=
useProductTable
(
addSchemaAction
,
mergeRef
)
// 订单物料
const
{
materialAddButton
,
materialRef
,
materialColumns
,
materialComponents
,
...
rest
Props
}
=
useMaterialTable
(
addSchemaAction
)
const
{
materialAddButton
,
materialRef
,
materialColumns
,
materialComponents
,
...
surplus
Props
}
=
useMaterialTable
(
addSchemaAction
)
let
timerSignature
=
null
// 页面进入时, 当前所处的下单模式
...
...
@@ -618,29 +619,35 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
value
===
OrderModalType
.
CHANNEL_SPOT_MANUAL_ORDER
||
(
value
===
OrderModalType
.
CONSOLIDATED_ORDER
&&
quotationOrderValue
)
)
{
addSchemaAction
.
setFieldState
(
'orderProductRequests'
,
productState
=>
{
productState
.
props
[
"x-component-props"
]
=
{
...
productState
.
props
[
"x-component-props"
],
prefix
:
editable
?
productAddButton
:
''
,
}
})
setTimeout
(()
=>
{
addSchemaAction
.
setFieldState
(
'orderProductRequests'
,
productState
=>
{
productState
.
props
[
"x-component-props"
]
=
{
...
productState
.
props
[
"x-component-props"
],
prefix
:
editable
?
productAddButton
:
''
,
}
})
})
}
else
if
(
value
===
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
||
value
===
OrderModalType
.
PURCHASE_BIDDING_CONTRACT_ORDER
||
value
===
OrderModalType
.
PURCHASE_TENDER_CONTRACT_ORDER
)
{
addSchemaAction
.
setFieldState
(
'orderProductRequests'
,
productState
=>
{
productState
.
props
[
"x-component-props"
]
=
{
...
productState
.
props
[
"x-component-props"
],
prefix
:
editable
?
materialAddButton
:
''
,
}
})
setTimeout
(()
=>
{
addSchemaAction
.
setFieldState
(
'orderProductRequests'
,
productState
=>
{
productState
.
props
[
"x-component-props"
]
=
{
...
productState
.
props
[
"x-component-props"
],
prefix
:
editable
?
materialAddButton
:
''
,
}
})
},
300
)
}
else
{
addSchemaAction
.
setFieldState
(
'orderProductRequests'
,
productState
=>
{
productState
.
props
[
"x-component-props"
]
=
{
...
productState
.
props
[
"x-component-props"
],
prefix
:
''
,
}
setTimeout
(()
=>
{
addSchemaAction
.
setFieldState
(
'orderProductRequests'
,
productState
=>
{
productState
.
props
[
"x-component-props"
]
=
{
...
productState
.
props
[
"x-component-props"
],
prefix
:
''
,
}
})
})
}
// 选择某种类型时, 需显示对应的订单类型
...
...
@@ -724,7 +731,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
<
ContractModalTable
currentRef=
{
contractOrderRef
}
schemaAction=
{
addSchemaAction
}
/>
{
/* @todo 选择采购物料 */
}
{
/* <MaterialModalTable currentRef={materialRef} schemaAtion={addSchemaAction} /> */
}
<
MaterialModalTable
currentRef=
{
materialRef
}
schemaAction=
{
addSchemaAction
}
sectionProps=
{
surplusProps
}
/>
...
...
src/pages/transaction/purchaseRules/components/selectProcesss/index.tsx
View file @
fd8a41c6
...
...
@@ -61,7 +61,7 @@ const SelectProcesss = (props: ISchemaFieldComponentProps) => {
const
{
value
,
mutators
,
editable
}
=
props
useEffect
(()
=>
{
PublicApi
.
get
OrderTradingRulesTransactionProcessList
().
then
(
res
=>
{
PublicApi
.
get
ManagePurchaseProcesByMember
().
then
(
res
=>
{
setFieldState
({
dataSource
:
res
.
data
,
showMore
...
...
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