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
144cc365
Commit
144cc365
authored
Dec 23, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改首页,加工以及结算
parent
9201571d
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
173 additions
and
94 deletions
+173
-94
balanceRoute.ts
config/routes/balanceRoute.ts
+10
-3
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
productNoticeSettlementDetail.tsx
...ceivable/settlementList/productNoticeSettlementDetail.tsx
+11
-12
index.tsx
src/pages/balance/components/SettleMethod/index.tsx
+23
-24
index.tsx
src/pages/balance/settleRules/corporateAccount/index.tsx
+4
-4
index.tsx
src/pages/balance/settleRules/memberSettle/index.tsx
+13
-4
info.tsx
src/pages/balance/settleRules/memberSettle/info.tsx
+33
-24
index.tsx
src/pages/handling/assign/processStock/index.tsx
+4
-1
content.tsx
src/pages/handling/components/ProcessDetail/content.tsx
+6
-2
UploadFile.tsx
src/pages/handling/components/UploadFile/UploadFile.tsx
+6
-2
index.less
src/pages/home/components/UserCenter/index.less
+6
-0
index.tsx
src/pages/home/components/UserCenter/index.tsx
+56
-18
No files found.
config/routes/balanceRoute.ts
View file @
144cc365
...
@@ -21,7 +21,7 @@ const BalancedRoute = {
...
@@ -21,7 +21,7 @@ const BalancedRoute = {
icon
:
'smile'
,
icon
:
'smile'
,
component
:
'@/pages/balance/settleRules/corporateAccount'
,
component
:
'@/pages/balance/settleRules/corporateAccount'
,
},
},
// 结算规则配置 -> 发票管理
// 结算规则配置 -> 发票管理
{
{
path
:
'/memberCenter/balance/settleRules/receiptList'
,
path
:
'/memberCenter/balance/settleRules/receiptList'
,
name
:
'receiptList'
,
name
:
'receiptList'
,
...
@@ -67,6 +67,14 @@ const BalancedRoute = {
...
@@ -67,6 +67,14 @@ const BalancedRoute = {
hideInMenu
:
true
,
hideInMenu
:
true
,
component
:
'@/pages/balance/settleRules/memberSettle/info'
component
:
'@/pages/balance/settleRules/memberSettle/info'
},
},
// 结算规则配置 -> 会员支付策略编辑
{
path
:
'/memberCenter/balance/settleRules/memberSettleList/edit'
,
name
:
'memberSettleDetailEdit'
,
icon
:
'smile'
,
hideInMenu
:
true
,
component
:
'@/pages/balance/settleRules/memberSettle/info'
},
]
]
},
},
// 平台结算管理
// 平台结算管理
...
@@ -177,4 +185,4 @@ const BalancedRoute = {
...
@@ -177,4 +185,4 @@ const BalancedRoute = {
]
]
}
}
export
default
BalancedRoute
export
default
BalancedRoute
\ No newline at end of file
src/locales/zh-CN/menu.ts
View file @
144cc365
...
@@ -620,4 +620,5 @@ export default {
...
@@ -620,4 +620,5 @@ export default {
'menu.balance.accountsReceivable.logisticsDetail'
:
'物流通知单结算明细'
,
'menu.balance.accountsReceivable.logisticsDetail'
:
'物流通知单结算明细'
,
'menu.balance.accountsReceivable.productNoticeSettlementDetail'
:
'生产通知单结算明细'
,
'menu.balance.accountsReceivable.productNoticeSettlementDetail'
:
'生产通知单结算明细'
,
'menu.balance.accountsReceivable.invoice'
:
'开票管理'
,
'menu.balance.accountsReceivable.invoice'
:
'开票管理'
,
'menu.balance.settleRules.memberSettleDetailEdit'
:
'编辑会员结算策略'
};
};
src/pages/balance/accountsReceivable/settlementList/productNoticeSettlementDetail.tsx
View file @
144cc365
...
@@ -31,7 +31,7 @@ const columns = [
...
@@ -31,7 +31,7 @@ const columns = [
{
title
:
'单据总额'
,
dataIndex
:
'orderAmount'
},
{
title
:
'单据总额'
,
dataIndex
:
'orderAmount'
},
{
title
:
'收货批次'
,
dataIndex
:
'batch'
},
{
title
:
'收货批次'
,
dataIndex
:
'batch'
},
{
title
:
'收货时间'
,
dataIndex
:
'receiveTime'
},
{
title
:
'收货时间'
,
dataIndex
:
'receiveTime'
},
{
title
:
'收货数量'
,
dataIndex
:
'receive
Time
'
},
{
title
:
'收货数量'
,
dataIndex
:
'receive
Count
'
},
// {title: '加工单价', dataIndex: 'processPrice'},
// {title: '加工单价', dataIndex: 'processPrice'},
{
title
:
'结算金额'
,
dataIndex
:
'settlementAmount'
},
{
title
:
'结算金额'
,
dataIndex
:
'settlementAmount'
},
]
]
...
@@ -45,7 +45,7 @@ interface infoType {
...
@@ -45,7 +45,7 @@ interface infoType {
payName
:
string
,
// 付款方
payName
:
string
,
// 付款方
orderTypeName
:
string
,
// 结算单据类型名称
orderTypeName
:
string
,
// 结算单据类型名称
totalCount
:
number
,
// 总单数
totalCount
:
number
,
// 总单数
amount
:
number
,
// 结算金额
amount
:
number
,
// 结算金额
statusName
:
string
// 结算状态名称
statusName
:
string
// 结算状态名称
}
}
...
@@ -86,7 +86,7 @@ const ProductNoticeSettlementDetail: React.FC = () => {
...
@@ -86,7 +86,7 @@ const ProductNoticeSettlementDetail: React.FC = () => {
const
receiveStartTime
=
values
.
receiveStartTime
?.
format
(
format
);
const
receiveStartTime
=
values
.
receiveStartTime
?.
format
(
format
);
const
receiveEndTime
=
values
.
receiveEndTime
?.
format
(
format
);
const
receiveEndTime
=
values
.
receiveEndTime
?.
format
(
format
);
ref
.
current
.
reload
({...
values
,
startTime
,
endTime
,
receiveStartTime
,
receiveEndTime
});
ref
.
current
.
reload
({...
values
,
startTime
,
endTime
,
receiveStartTime
,
receiveEndTime
});
}
}
return
(
return
(
<
PageHeaderWrapper
<
PageHeaderWrapper
...
@@ -96,21 +96,21 @@ const ProductNoticeSettlementDetail: React.FC = () => {
...
@@ -96,21 +96,21 @@ const ProductNoticeSettlementDetail: React.FC = () => {
style=
{
{
padding
:
'0'
}
}
style=
{
{
padding
:
'0'
}
}
onBack=
{
()
=>
history
.
goBack
()
}
onBack=
{
()
=>
history
.
goBack
()
}
title=
{
title=
{
<
AvatarWrap
<
AvatarWrap
info=
{
{
info=
{
{
aloneTxt
:
'单'
,
aloneTxt
:
'单'
,
name
:
"结算单号:"
name
:
"结算单号:"
}
}
}
}
extra=
{
(
extra=
{
(
<
span
style=
{
{
fontSize
:
12
}
}
>
{
infoDetail
?.
settlementNo
}
</
span
>
<
span
style=
{
{
fontSize
:
12
}
}
>
{
infoDetail
?.
settlementNo
}
</
span
>
)
}
)
}
/>
/>
}
}
>
>
<
Descriptions
<
Descriptions
column=
{
3
}
column=
{
3
}
style=
{
{
style=
{
{
padding
:
'0 32px'
,
padding
:
'0 32px'
,
}
}
}
}
>
>
<
Descriptions
.
Item
label=
"结算日期"
>
{
infoDetail
?.
settlementDate
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算日期"
>
{
infoDetail
?.
settlementDate
}
</
Descriptions
.
Item
>
...
@@ -133,7 +133,7 @@ const ProductNoticeSettlementDetail: React.FC = () => {
...
@@ -133,7 +133,7 @@ const ProductNoticeSettlementDetail: React.FC = () => {
currentRef=
{
ref
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchListData
(
params
)
}
fetchTableData=
{
(
params
:
any
)
=>
fetchListData
(
params
)
}
controlRender=
{
controlRender=
{
<
NiceForm
<
NiceForm
components=
{
{
RangePicker
}
}
components=
{
{
RangePicker
}
}
actions=
{
formActions
}
actions=
{
formActions
}
expressionScope=
{
{
expressionScope=
{
{
...
@@ -161,4 +161,4 @@ const ProductNoticeSettlementDetail: React.FC = () => {
...
@@ -161,4 +161,4 @@ const ProductNoticeSettlementDetail: React.FC = () => {
)
)
}
}
export
default
ProductNoticeSettlementDetail
export
default
ProductNoticeSettlementDetail
\ No newline at end of file
src/pages/balance/components/SettleMethod/index.tsx
View file @
144cc365
...
@@ -16,7 +16,7 @@ const MONTH = 2;
...
@@ -16,7 +16,7 @@ const MONTH = 2;
registerValidationRules
({
registerValidationRules
({
settleMethodRule
:
value
=>
{
settleMethodRule
:
value
=>
{
const
{
active
,
otherValues
}
=
value
;
const
{
active
,
otherValues
}
=
value
;
const
isNumber
=
/^
\d
+$/
;
// 数字
const
isNumber
=
/^
\d
+$/
;
// 数字
const
pattern
=
/
[
0-9
]
+
\.[
0-9
]
*/
;
const
pattern
=
/
[
0-9
]
+
\.[
0-9
]
*/
;
if
(
active
==
MONTH
)
{
if
(
active
==
MONTH
)
{
...
@@ -33,7 +33,7 @@ const SettleMethod = (props) => {
...
@@ -33,7 +33,7 @@ const SettleMethod = (props) => {
const
handleChange
=
(
e
,
type
)
=>
{
const
handleChange
=
(
e
,
type
)
=>
{
if
(
active
==
type
)
{
if
(
active
==
type
)
{
return
;
return
;
}
}
const
previewValue
=
otherValues
const
previewValue
=
otherValues
// setActive(type)
// setActive(type)
props
.
onChange
({
props
.
onChange
({
...
@@ -44,16 +44,18 @@ const SettleMethod = (props) => {
...
@@ -44,16 +44,18 @@ const SettleMethod = (props) => {
const
handleInputChange
=
(
value
,
type
)
=>
{
const
handleInputChange
=
(
value
,
type
)
=>
{
const
target
=
type
-
1
;
const
target
=
type
-
1
;
console
.
log
(
target
);
const
temp
=
[...
otherValues
];
const
temp
=
[...
otherValues
];
temp
[
target
]
=
value
;
temp
[
target
]
=
value
;
console
.
log
(
temp
[
target
]);
props
.
onChange
({
props
.
onChange
({
active
:
type
,
active
:
type
,
otherValues
:
temp
otherValues
:
temp
})
})
}
}
if
(
!
monthVisible
&&
!
daysVisible
)
{
return
null
}
return
(
return
(
<
div
>
<
div
>
{
{
...
@@ -69,11 +71,11 @@ const SettleMethod = (props) => {
...
@@ -69,11 +71,11 @@ const SettleMethod = (props) => {
<
div
className=
{
styles
.
days
}
>
<
div
className=
{
styles
.
days
}
>
<
div
style=
{
{
margin
:
'0 20px 0 12px'
}
}
>
账期天数
</
div
>
<
div
style=
{
{
margin
:
'0 20px 0 12px'
}
}
>
账期天数
</
div
>
<
div
>
<
div
>
<
Input
<
Input
addonAfter=
{
"天"
}
addonAfter=
{
"天"
}
value=
{
otherValues
[
DAY
-
1
]
}
value=
{
otherValues
[
DAY
-
1
]
}
onChange=
{
(
e
)
=>
handleInputChange
(
e
.
target
.
value
,
DAY
)
}
onChange=
{
(
e
)
=>
handleInputChange
(
e
.
target
.
value
,
DAY
)
}
disabled=
{
active
!==
DAY
}
disabled=
{
active
!==
DAY
}
style=
{
{
width
:
'160px'
}
}
style=
{
{
width
:
'160px'
}
}
/></
div
>
/></
div
>
</
div
>
</
div
>
...
@@ -93,22 +95,16 @@ const SettleMethod = (props) => {
...
@@ -93,22 +95,16 @@ const SettleMethod = (props) => {
<
div
className=
{
styles
.
days
}
>
<
div
className=
{
styles
.
days
}
>
<
div
style=
{
{
marginRight
:
'20px'
}
}
>
每月结算日期:每月
</
div
>
<
div
style=
{
{
marginRight
:
'20px'
}
}
>
每月结算日期:每月
</
div
>
<
div
><
Input
addonAfter=
{
"号"
}
style=
{
{
width
:
'160px'
}
}
value=
{
otherValues
[
MONTH
-
1
]
}
onChange=
{
(
e
)
=>
handleInputChange
(
e
.
target
.
value
,
MONTH
)
}
disabled=
{
active
!==
MONTH
}
/></
div
>
</
div
>
<
div
><
Input
addonAfter=
{
"号"
}
style=
{
{
width
:
'160px'
}
}
value=
{
otherValues
[
MONTH
-
1
]
}
onChange=
{
(
e
)
=>
handleInputChange
(
e
.
target
.
value
,
MONTH
)
}
disabled=
{
active
!==
MONTH
}
/></
div
>
</
div
>
</
div
>
</
div
>
:
null
:
null
}
}
<
div
>
{
!
monthVisible
&&
!
daysVisible
?
<
div
>
请在pass平台配置结算方式,否则无法创建会员策略
</
div
>
:
null
}
</
div
>
</
div
>
</
div
>
)
)
}
}
const
Index
=
(
props
)
=>
{
const
Index
=
(
props
)
=>
{
const
editable
=
props
.
editable
;
const
value
=
props
.
value
||
{
active
:
0
,
otherValues
:
[
30
,
1
]};
const
value
=
props
.
value
||
{
active
:
0
,
otherValues
:
[
30
,
1
]};
const
componentProps
=
props
.
props
[
'x-component-props'
]
||
{};
const
componentProps
=
props
.
props
[
'x-component-props'
]
||
{};
const
options
=
componentProps
.
options
||
{};
const
options
=
componentProps
.
options
||
{};
...
@@ -117,7 +113,7 @@ const Index = (props) => {
...
@@ -117,7 +113,7 @@ const Index = (props) => {
// const componentProps = props.props['x-component-props'] || {};
// const componentProps = props.props['x-component-props'] || {};
const
defaultValue
=
componentProps
.
default
||
{};
const
defaultValue
=
componentProps
.
default
||
{};
if
(
!
options
.
days
&&
!
options
.
month
)
{
if
(
!
options
.
days
&&
!
options
.
month
)
{
return
return
}
}
if
(
typeof
props
.
initialValue
==
'undefined'
)
{
if
(
typeof
props
.
initialValue
==
'undefined'
)
{
props
.
mutators
.
change
(
defaultValue
)
props
.
mutators
.
change
(
defaultValue
)
...
@@ -131,12 +127,16 @@ const Index = (props) => {
...
@@ -131,12 +127,16 @@ const Index = (props) => {
props
.
mutators
.
change
(
value
);
props
.
mutators
.
change
(
value
);
}
}
if
(
!
editable
)
{
return
value
.
active
==
1
?
`账期(默认), 账期天数
${
value
.
otherValues
[
0
]}
天 `
:
`月结: 每月
${
value
.
otherValues
[
1
]}
号`
}
return
(
return
(
<
div
>
<
div
>
<
SettleMethod
<
SettleMethod
value=
{
value
}
value=
{
value
}
daysVisible=
{
options
.
days
}
daysVisible=
{
options
.
days
}
monthVisible=
{
options
.
month
}
monthVisible=
{
options
.
month
}
onChange=
{
onChange
}
onChange=
{
onChange
}
/>
/>
</
div
>
</
div
>
...
@@ -144,4 +144,4 @@ const Index = (props) => {
...
@@ -144,4 +144,4 @@ const Index = (props) => {
}
}
Index
.
isFieldComponent
=
true
;
Index
.
isFieldComponent
=
true
;
export
default
Index
;
export
default
Index
;
\ No newline at end of file
src/pages/balance/settleRules/corporateAccount/index.tsx
View file @
144cc365
...
@@ -100,7 +100,7 @@ const PARAM_TO_TYPE = {
...
@@ -100,7 +100,7 @@ const PARAM_TO_TYPE = {
const
CorporateAccount
=
()
=>
{
const
CorporateAccount
=
()
=>
{
const
[
configs
,
setConfigs
]
=
useState
<
Config
[]
>
([]);
const
[
configs
,
setConfigs
]
=
useState
<
Config
[]
>
([]);
const
[
unsaved
,
setUnsaved
]
=
useState
<
boolean
>
(
false
)
const
[
unsaved
,
setUnsaved
]
=
useState
<
boolean
>
(
false
)
const
[
datas
,
setDatas
]
=
useState
<
AccountDetal
>
(
null
);
//
const [datas, setDatas] = useState<AccountDetal>(null);
const
changeEdit
=
(
name
:
string
,
res
:
any
,
type
:
string
)
=>
{
const
changeEdit
=
(
name
:
string
,
res
:
any
,
type
:
string
)
=>
{
let
temp
=
[...
configs
];
let
temp
=
[...
configs
];
const
index
=
temp
.
findIndex
((
row
)
=>
row
.
name
===
name
);
const
index
=
temp
.
findIndex
((
row
)
=>
row
.
name
===
name
);
...
@@ -139,13 +139,13 @@ const CorporateAccount = () => {
...
@@ -139,13 +139,13 @@ const CorporateAccount = () => {
}
}
useEffect
(()
=>
{
useEffect
(()
=>
{
const
{
memberId
}
=
getAuth
()
||
{};
const
{
memberId
,
memberRoleId
}
=
getAuth
()
||
{};
// 进行基础赋值, fetchData
// 进行基础赋值, fetchData
///settle/accounts/corporate/account/getDetail
///settle/accounts/corporate/account/getDetail
async
function
fetchData
()
{
async
function
fetchData
()
{
const
{
data
}
=
await
PublicApi
.
getSettleAccountsCorporateAccountGetDetail
(
{
memberId
:
memberId
}
);
const
{
data
}
=
await
PublicApi
.
getSettleAccountsCorporateAccountGetDetail
();
console
.
log
(
data
);
console
.
log
(
data
);
setDatas
(
data
);
//
setDatas(data);
setConfigs
(
setConfigs
(
[
[
{
{
...
...
src/pages/balance/settleRules/memberSettle/index.tsx
View file @
144cc365
...
@@ -15,7 +15,7 @@ import StatusSwitch from '@/components/StatusSwitch';
...
@@ -15,7 +15,7 @@ import StatusSwitch from '@/components/StatusSwitch';
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
history
}
from
'umi'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
indexSchema
}
from
'./schema'
;
import
{
indexSchema
}
from
'./schema'
;
const
formActions
=
createFormActions
();
const
formActions
=
createFormActions
();
...
@@ -70,6 +70,16 @@ const MemberSettle: React.FC<{}> = () => {
...
@@ -70,6 +70,16 @@ const MemberSettle: React.FC<{}> = () => {
)
)
}
}
},
},
{
title
:
'操作'
,
render
:
(
text
,
record
)
=>
{
return
(
<
Space
>
<
Link
to=
{
`/memberCenter/balance/settleRules/memberSettleList/edit?id=${record.id}`
}
>
修改
</
Link
>
</
Space
>
)
}
}
]
]
const
goToCreate
=
()
=>
{
const
goToCreate
=
()
=>
{
...
@@ -98,7 +108,7 @@ const MemberSettle: React.FC<{}> = () => {
...
@@ -98,7 +108,7 @@ const MemberSettle: React.FC<{}> = () => {
)
)
}
}
}
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
schema=
{
indexSchema
}
schema=
{
indexSchema
}
/>
/>
}
}
...
@@ -108,4 +118,4 @@ const MemberSettle: React.FC<{}> = () => {
...
@@ -108,4 +118,4 @@ const MemberSettle: React.FC<{}> = () => {
)
)
}
}
export
default
MemberSettle
export
default
MemberSettle
\ No newline at end of file
src/pages/balance/settleRules/memberSettle/info.tsx
View file @
144cc365
...
@@ -55,33 +55,40 @@ const MemberSettleAdd: React.FC = () => {
...
@@ -55,33 +55,40 @@ const MemberSettleAdd: React.FC = () => {
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
unsaved
,
setUnsaved
]
=
useState
(
true
);
const
[
unsaved
,
setUnsaved
]
=
useState
(
true
);
const
isAdd
=
!
id
&&
!
preview
;
const
isAdd
=
!
id
&&
!
preview
;
const
isEdit
=
history
.
location
.
pathname
.
includes
(
"edit"
);
const
tableAddButton
=
()
=>
{
const
tableAddButton
=
()
=>
{
return
(
return
(
<
div
>
<
div
>
<
Button
{
onClick=
{
()
=>
setVisible
(
true
)
}
isAdd
||
isEdit
style=
{
{
marginBottom
:
16
}
}
?
<
Button
block
onClick=
{
()
=>
setVisible
(
true
)
}
icon=
{
<
PlusOutlined
/>
}
style=
{
{
marginBottom
:
16
}
}
type=
'dashed'
block
>
icon=
{
<
PlusOutlined
/>
}
选择适用会员
type=
'dashed'
</
Button
>
>
选择适用会员
</
Button
>
:
null
}
</
div
>
</
div
>
)
)
}
}
const
columns
=
common_columns
.
concat
(
const
columns
=
common_columns
.
concat
(
[
isAdd
||
isEdit
{
?
[
title
:
'操作'
,
{
render
:
(
text
,
record
)
=>
{
title
:
'操作'
,
return
(
render
:
(
text
,
record
)
=>
{
<
div
onClick=
{
()
=>
handleRemove
(
record
.
uniqueId
)
}
>
删除
</
div
>
return
(
)
<
div
onClick=
{
()
=>
handleRemove
(
record
.
uniqueId
)
}
>
删除
</
div
>
)
}
}
}
}
]
]
:
[
]
);
);
const
handleCancelAddMember
=
()
=>
{
const
handleCancelAddMember
=
()
=>
{
...
@@ -210,14 +217,17 @@ const MemberSettleAdd: React.FC = () => {
...
@@ -210,14 +217,17 @@ const MemberSettleAdd: React.FC = () => {
return
(
return
(
<
PageHeaderWrapper
<
PageHeaderWrapper
onBack=
{
()
=>
window
.
history
.
back
()
}
onBack=
{
()
=>
window
.
history
.
back
()
}
extra=
{
[
extra=
{
<
Button
loading=
{
submitLoading
}
key=
"1"
type=
"primary"
onClick=
{
handleClick
}
>
(
保存
<
Button
loading=
{
submitLoading
}
key=
"1"
type=
"primary"
onClick=
{
handleClick
}
style=
{
{
display
:
isAdd
||
isEdit
?
'block'
:
'none'
}
}
>
</
Button
>,
保存
]
}
</
Button
>
)
}
>
>
<
Card
>
<
Card
>
<
NiceForm
<
NiceForm
editable=
{
isAdd
||
isEdit
}
actions=
{
formActions
}
actions=
{
formActions
}
initialValues=
{
initialValue
}
initialValues=
{
initialValue
}
expressionScope=
{
{
expressionScope=
{
{
...
@@ -234,7 +244,6 @@ const MemberSettleAdd: React.FC = () => {
...
@@ -234,7 +244,6 @@ const MemberSettleAdd: React.FC = () => {
)
)
}
}
}
}
/>
/>
<
ModalTable
<
ModalTable
modalTitle=
'选择适用会员'
modalTitle=
'选择适用会员'
confirm=
{
handleOkAddMember
}
confirm=
{
handleOkAddMember
}
...
...
src/pages/handling/assign/processStock/index.tsx
View file @
144cc365
...
@@ -143,7 +143,10 @@ const processStock: React.FC<{}> = () => {
...
@@ -143,7 +143,10 @@ const processStock: React.FC<{}> = () => {
}
}
const
url
=
'/memberCenter/tranactionAbility/stockSellStorage/bills/detail'
;
const
url
=
'/memberCenter/tranactionAbility/stockSellStorage/bills/detail'
;
const
type
=
[
PENDING_ADD_PROCESS_PATH
,
ASSIGN_PENDING_RECEIVE
].
includes
(
pathname
)
?
'storage'
:
'delivery'
const
type
=
[
PENDING_ADD_PROCESS_PATH
,
ASSIGN_PENDING_RECEIVE
].
includes
(
pathname
)
?
'storage'
:
'delivery'
const
id
=
type
===
'storage'
?
record
.
storageId
:
record
.
deliveryId
const
id
=
type
===
'storage'
?
record
.
storageId
:
record
.
deliveryId
;
if
(
!
id
)
{
return
null
}
return
(
return
(
<
EyePreview
url=
{
`${url}?id=${id}`
}
>
{
record
[
`${type}No`
]
}
</
EyePreview
>
<
EyePreview
url=
{
`${url}?id=${id}`
}
>
{
record
[
`${type}No`
]
}
</
EyePreview
>
)
)
...
...
src/pages/handling/components/ProcessDetail/content.tsx
View file @
144cc365
...
@@ -29,8 +29,8 @@ const schema = {
...
@@ -29,8 +29,8 @@ const schema = {
message
:
'请填写加工数量'
message
:
'请填写加工数量'
},
},
{
{
pattern
:
/^
\d
+
$/
,
pattern
:
/^
[
1-9
][
0-9
]
*
(\.[
0-9
]{1,2})?
$/
,
message
:
'请填写
数字
'
message
:
'请填写
整数或保留两位小数
'
}
}
]
]
},
},
...
@@ -41,6 +41,10 @@ const schema = {
...
@@ -41,6 +41,10 @@ const schema = {
{
{
required
:
true
,
required
:
true
,
message
:
'请填写加工单价'
message
:
'请填写加工单价'
},
{
pattern
:
/^
[
1-9
][
0-9
]
*
(\.[
0-9
]{1,2})?
$/
,
message
:
'请填写整数或保留两位小数'
}
}
]
]
}
}
...
...
src/pages/handling/components/UploadFile/UploadFile.tsx
View file @
144cc365
...
@@ -13,7 +13,11 @@ const UploadFile = (props) => {
...
@@ -13,7 +13,11 @@ const UploadFile = (props) => {
if
(
!
isSizeLimit
)
{
if
(
!
isSizeLimit
)
{
message
.
error
(
`上传文件不超过
${
fileMaxSize
}
K!`
);
message
.
error
(
`上传文件不超过
${
fileMaxSize
}
K!`
);
}
}
return
isSizeLimit
;
const
isPdf
=
file
.
type
===
'application/pdf'
;
if
(
!
isPdf
)
{
message
.
error
(
'仅支持上传PDF文件!'
);
}
return
isSizeLimit
&&
isPdf
;
}
}
const
uploadProps
=
{
const
uploadProps
=
{
...
@@ -46,7 +50,7 @@ const UploadFile = (props) => {
...
@@ -46,7 +50,7 @@ const UploadFile = (props) => {
setLoading
(
false
)
setLoading
(
false
)
}
}
},
},
//
beforeUpload: beforeUpload,
beforeUpload
:
beforeUpload
,
// transformFile: () => {}
// transformFile: () => {}
};
};
...
...
src/pages/home/components/UserCenter/index.less
View file @
144cc365
...
@@ -52,6 +52,12 @@
...
@@ -52,6 +52,12 @@
width: 56px;
width: 56px;
margin-right: 12px;
margin-right: 12px;
.logo {
height: 56px;
width: 56px;
border-radius: 50%;
}
.randomLogo {
.randomLogo {
background-color: #255BA3;
background-color: #255BA3;
height: 100%;
height: 100%;
...
...
src/pages/home/components/UserCenter/index.tsx
View file @
144cc365
import
React
,
{
useReducer
}
from
'react'
;
import
React
,
{
useReducer
}
from
'react'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
Badge
,
Upload
}
from
'antd'
;
import
{
Badge
,
Upload
,
message
,
Spin
}
from
'antd'
;
import
level1
from
'@/assets/imgs/level1.png'
;
import
level1
from
'@/assets/imgs/level1.png'
;
import
level2
from
'@/assets/imgs/level2.png'
;
import
level2
from
'@/assets/imgs/level2.png'
;
import
level3
from
'@/assets/imgs/level3.png'
;
import
level3
from
'@/assets/imgs/level3.png'
;
...
@@ -10,6 +10,8 @@ import { Link } from 'umi';
...
@@ -10,6 +10,8 @@ import { Link } from 'umi';
import
{
getAuth
}
from
'@/utils/auth'
;
import
{
getAuth
}
from
'@/utils/auth'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
home_user
from
'@/assets/imgs/home_user.png'
;
import
home_user
from
'@/assets/imgs/home_user.png'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
import
{
PublicApi
}
from
'@/services/api'
;
interface
Iprops
{}
interface
Iprops
{}
const
WEEKDAYS
=
[
"天"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
];
const
WEEKDAYS
=
[
"天"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
];
...
@@ -20,10 +22,10 @@ const STATUS_COLOR: ("default" | "processing" | "error" | "success")[] = ["defau
...
@@ -20,10 +22,10 @@ const STATUS_COLOR: ("default" | "processing" | "error" | "success")[] = ["defau
function
reducer
(
state
,
action
)
{
function
reducer
(
state
,
action
)
{
switch
(
action
.
type
)
{
switch
(
action
.
type
)
{
case
'
increment
'
:
case
'
uploading
'
:
return
{
count
:
state
.
count
+
1
};
return
{
...
state
,
loading
:
true
};
case
'd
ecrement
'
:
case
'd
one
'
:
return
{
count
:
state
.
count
-
1
};
return
{
...
state
,
loading
:
false
,
logo
:
action
.
payload
.
url
}
default
:
default
:
throw
new
Error
();
throw
new
Error
();
}
}
...
@@ -36,11 +38,46 @@ const UserCenter: React.FC<Iprops> = () => {
...
@@ -36,11 +38,46 @@ const UserCenter: React.FC<Iprops> = () => {
const
hasChangeMemberAuth
=
userAuth
?.
urls
.
includes
(
EDIT_USER_URL
);
const
hasChangeMemberAuth
=
userAuth
?.
urls
.
includes
(
EDIT_USER_URL
);
const
hasCenterAuth
=
userAuth
?.
urls
.
includes
(
USER_CENTER_URL
);
const
hasCenterAuth
=
userAuth
?.
urls
.
includes
(
USER_CENTER_URL
);
const
currentRole
=
userAuth
.
roles
.
filter
((
item
)
=>
item
.
memberRoleId
===
userAuth
.
memberRoleId
)
const
currentRole
=
userAuth
.
roles
.
filter
((
item
)
=>
item
.
memberRoleId
===
userAuth
.
memberRoleId
)
// const [state, dispatch] = useReducer(reducer, {
})
const
[
state
,
dispatch
]
=
useReducer
(
reducer
,
{
loading
:
false
,
logo
:
userAuth
.
logo
})
if
(
!
userAuth
)
{
if
(
!
userAuth
)
{
return
null
return
null
}
}
const
uploadProps
=
{
name
:
'file'
,
action
:
'/api/file/file/upload'
,
headers
:
{},
data
:
{
fileType
:
UPLOAD_TYPE
},
disabled
:
state
.
loading
,
showUploadList
:
false
,
onChange
(
info
)
{
if
(
info
.
file
.
status
===
'uploading'
)
{
dispatch
({
type
:
'uploading'
})
return
;
}
if
(
info
.
file
.
status
===
'done'
)
{
const
{
code
,
data
}
=
info
.
file
.
response
if
(
code
===
1000
)
{
console
.
log
(
'upload success'
)
PublicApi
.
postMemberBusinessLogoAdd
({
logo
:
data
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
dispatch
({
type
:
'done'
,
payload
:
{
url
:
data
}})
}
})
}
}
},
beforeUpload
(
file
){
const
isJpgOrPng
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
||
file
.
type
===
'image/jpg'
;
if
(
!
isJpgOrPng
)
{
message
.
error
(
'仅支持上传JPEG/JPG/PNG文件!'
);
}
return
isJpgOrPng
;
}
}
return
(
return
(
<
div
className=
{
styles
.
container
}
>
<
div
className=
{
styles
.
container
}
>
<
div
className=
{
styles
.
header
}
>
<
div
className=
{
styles
.
header
}
>
...
@@ -58,19 +95,20 @@ const UserCenter: React.FC<Iprops> = () => {
...
@@ -58,19 +95,20 @@ const UserCenter: React.FC<Iprops> = () => {
</
div
>
</
div
>
<
div
className=
{
styles
.
content
}
>
<
div
className=
{
styles
.
content
}
>
{
/* http://10.0.0.25:4000/project/15/interface/api/38926 上传用户头像 */
}
{
/* http://10.0.0.25:4000/project/15/interface/api/38926 上传用户头像 */
}
<
div
className=
{
styles
.
userLogo
}
>
<
Spin
spinning=
{
state
.
loading
}
>
{
/* {
<
div
className=
{
styles
.
userLogo
}
>
userAuth.logo
<
div
className=
{
styles
.
randomLogo
}
>
? <img src={userAuth.logo || ''} />
{
: <div className={styles.randomLogo}>H</div>
state
.
logo
} */
}
?
<
img
src=
{
state
.
logo
||
''
}
className=
{
styles
.
logo
}
/>
<
div
className=
{
styles
.
randomLogo
}
>
:
<
span
className=
{
styles
.
text
}
>
H
</
span
>
<
span
className=
{
styles
.
text
}
>
H
</
span
>
}
<
Upload
>
<
Upload
{
...
uploadProps
}
>
<
span
className=
{
styles
.
upload
}
>
修改
</
span
>
<
span
className=
{
styles
.
upload
}
>
修改
</
span
>
</
Upload
>
</
Upload
>
</
div
>
</
div
>
</
div
>
</
div
>
</
Spin
>
<
div
className=
{
styles
.
infos
}
>
<
div
className=
{
styles
.
infos
}
>
<
div
>
<
div
>
<
div
className=
{
styles
.
companyName
}
>
<
div
className=
{
styles
.
companyName
}
>
...
...
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