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
70bb4563
Commit
70bb4563
authored
Dec 03, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改首页默认logo, 消息页跳转
parent
00b2b8ef
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
78 additions
and
69 deletions
+78
-69
index.tsx
src/pages/handling/assign/add/index.tsx
+44
-46
content.tsx
src/pages/handling/components/ProcessDetail/content.tsx
+1
-3
index.less
src/pages/home/components/UserCenter/index.less
+17
-4
index.tsx
src/pages/home/components/UserCenter/index.tsx
+6
-6
index.less
src/pages/systemSetting/message/index.less
+2
-2
index.tsx
src/pages/systemSetting/message/index.tsx
+8
-8
No files found.
src/pages/handling/assign/add/index.tsx
View file @
70bb4563
...
...
@@ -21,7 +21,7 @@ import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
* @Date: 2020-10-12 11:36:38
* @Description: 新增生产通知单
*/
const
formActions
=
createFormActions
();
const
{
onFieldValueChange$
,
onFieldMount$
}
=
FormEffectHooks
...
...
@@ -35,11 +35,11 @@ const Add: React.FC<{}> = () => {
// 加工订单 modal 框
const
[
modalOrderVisible
,
setModalOrderVisible
]
=
useState
<
boolean
>
(
false
);
const
[
rowSelection
,
selectRowCtl
]
=
useRowSelectionTable
({
customKey
:
'fullId'
,
const
[
rowSelection
,
selectRowCtl
]
=
useRowSelectionTable
({
customKey
:
'fullId'
,
extendsSelection
:
{
getCheckboxProps
:
record
=>
({
disabled
:
record
.
purchaseCount
-
(
record
.
processNum
||
0
)
<=
0
,
disabled
:
record
.
purchaseCount
-
(
record
.
processNum
||
0
)
<=
0
,
}),
}
});
...
...
@@ -69,13 +69,13 @@ const Add: React.FC<{}> = () => {
{
title
:
'加工数量'
,
dataIndex
:
'processNum'
},
{
title
:
'加工单价'
,
dataIndex
:
'processUnitPrice'
},
{
title
:
'加工费'
,
dataIndex
:
'processTotalPrice'
},
{
title
:
'操作'
,
{
title
:
'操作'
,
render
:
(
text
,
record
)
=>
{
const
uniqueID
=
activeSource
==
'加工订单'
?
record
.
fullId
:
record
.
id
return
(
<
Space
>
<
ProcessDetail
<
ProcessDetail
skuId=
{
record
.
id
}
uniqueID=
{
uniqueID
}
type=
{
"view"
}
...
...
@@ -89,10 +89,10 @@ const Add: React.FC<{}> = () => {
>
<
a
>
查看
</
a
>
</
ProcessDetail
>
<
ProcessDetail
<
ProcessDetail
skuId=
{
record
.
id
}
uniqueID=
{
uniqueID
}
type=
{
"edit"
}
type=
{
"edit"
}
submit=
{
handleChangeSomeList
}
quantity=
{
record
.
processNum
}
processUnitPrice=
{
record
.
processUnitPrice
}
...
...
@@ -107,24 +107,24 @@ const Add: React.FC<{}> = () => {
<
a
onClick=
{
()
=>
handleRemoveRow
(
uniqueID
)
}
>
删除
</
a
>
</
Space
>
)
}
}
},
]
return
activeSource
!==
'加工订单'
?
tempColumns
.
filter
((
item
)
=>
!
blackList
.
includes
(
item
.
dataIndex
))
:
tempColumns
;
}
}
// 选择弹框 element
const
tableAddButton
=
()
=>
{
return
(
<
div
>
<
Button
onClick=
{
handleShowProcessModal
}
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
<
Button
onClick=
{
handleShowProcessModal
}
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
type=
'dashed'
>
选择
{
activeSource
}
</
Button
>
</
Button
>
</
div
>
)
}
...
...
@@ -134,7 +134,7 @@ const Add: React.FC<{}> = () => {
<
Radio
checked=
{
true
}
>
{
activeSource
}
</
Radio
>
)
}
// 流转记录
// 流转记录
const
RadioBtnGroup
=
()
=>
{
return
(
<
Radio
.
Group
...
...
@@ -151,7 +151,7 @@ const Add: React.FC<{}> = () => {
/**
* formEffect, 表单联动操作放这里操作,包括表单的生命周期等操作
*/
*/
const
formEffects
=
()
=>
()
=>
{
onFieldValueChange$
(
'source'
).
subscribe
((
state
)
=>
{
if
(
state
.
mounted
)
{
...
...
@@ -167,9 +167,9 @@ const Add: React.FC<{}> = () => {
let
options
=
[];
if
(
res
.
code
===
1000
)
{
options
=
res
.
data
.
data
.
map
((
item
)
=>
{
return
{
label
:
`
${
item
.
fullAddress
}
/
${
item
.
receiverName
}
/
${
item
.
phone
}
`
,
value
:
item
.
id
return
{
label
:
`
${
item
.
fullAddress
}
/
${
item
.
receiverName
}
/
${
item
.
phone
}
`
,
value
:
item
.
id
}}
)
}
...
...
@@ -178,7 +178,7 @@ const Add: React.FC<{}> = () => {
})
})
})
/**
* 当改变物流地址的时候,那么修改隐藏的3个字段,
* 1. receiveAddress 详细的物流地址
...
...
@@ -196,7 +196,7 @@ const Add: React.FC<{}> = () => {
formActions
.
setFieldValue
(
"receiveUserTel"
,
receiveUserTel
.
trim
());
formActions
.
setFieldValue
(
"receiverAddressId"
,
state
.
value
)
}
}
})
}
...
...
@@ -205,7 +205,7 @@ const Add: React.FC<{}> = () => {
const
handleShowProcessModal
=
()
=>
{
const
source
=
formActions
.
getFieldValue
(
'source'
);
if
(
source
==
1
)
{
setModalOrderVisible
(
true
);
setModalOrderVisible
(
true
);
}
else
{
setModalProductVisible
(
true
)
}
...
...
@@ -213,7 +213,7 @@ const Add: React.FC<{}> = () => {
/**
* 加工企业modal框 行勾选
* @param rows
* @param rows
*/
const
enterPriseOnOk
=
(
rows
)
=>
{
const
{
memberId
,
name
,
roleId
}
=
rows
.
selectRow
[
0
];
...
...
@@ -246,7 +246,7 @@ const Add: React.FC<{}> = () => {
/**
* 加工商品Modal框 行勾选回调
* @param rows
* @param rows
*/
const
processProductSelected
=
()
=>
{
console
.
log
(
productSelectRowCtl
);
...
...
@@ -257,7 +257,7 @@ const Add: React.FC<{}> = () => {
/**
* 加工订单Modal框 行勾选回调
* @param row
* @param row
*/
const
processOrderOnok
=
()
=>
{
console
.
log
(
selectRowCtl
);
...
...
@@ -270,13 +270,12 @@ const Add: React.FC<{}> = () => {
* 提交表单
*/
const
handleSubmit
=
(
values
:
any
)
=>
{
console
.
log
(
values
)
const
SELF_MENTION
=
2
;
// 自提
const
{
deliveryDate
,
const
{
deliveryDate
,
receivefullAddress
,
// receiveAddressID,
enclosure
=
[],
// receiveAddressID,
enclosure
=
[],
deliveryDesc
=
''
,
payDesc
=
''
,
taxDesc
=
''
,
...
...
@@ -293,13 +292,13 @@ const Add: React.FC<{}> = () => {
if
(
isSomeFieldNotFill
)
{
message
.
error
(
"通知单明细中有加工商品的加工数量或加工单价未填写"
);
return
return
}
setSubmitLoading
(
true
);
const
detailList
=
someLists
.
map
((
item
)
=>
{
return
{
orederNo
:
item
.
orderNo
,
// 如果是商品加工,那么他没有订单号
productId
:
item
.
id
,
// skuid
productId
:
item
.
id
,
// skuid
productName
:
item
.
name
,
category
:
item
.
customerCategoryName
,
brand
:
item
.
brandName
,
...
...
@@ -332,7 +331,7 @@ const Add: React.FC<{}> = () => {
},
details
:
detailList
}
if
(
values
.
deliveryType
==
SELF_MENTION
)
{
delete
postData
.
receiveAddress
;
delete
postData
.
receiveUserName
;
...
...
@@ -340,7 +339,6 @@ const Add: React.FC<{}> = () => {
delete
postData
.
receiverAddressId
}
console
.
log
(
postData
);
// return ;
PublicApi
.
postEnhanceSupplierToBeAddAdd
(
postData
)
.
then
(
data
=>
{
setSubmitLoading
(
false
);
...
...
@@ -373,7 +371,7 @@ const Add: React.FC<{}> = () => {
/**
* 移除数据, 这里有个bug,移除数据时,对应的modal的rowSelection 没有跟着删除
* 尝试从父组件给rowSelection
* @param id
* @param id
*/
const
handleRemoveRow
=
(
id
:
number
)
=>
{
const
currentList
=
formActions
.
getFieldValue
(
'Tabs.tab-2.layout.someLists'
);
...
...
@@ -403,7 +401,7 @@ const Add: React.FC<{}> = () => {
icon=
{
<
SaveOutlined
/>
}
loading=
{
submitLoading
}
onClick=
{
()
=>
formActions
.
submit
()
}
>
>
保存
</
Button
>,
]
}
...
...
@@ -424,22 +422,22 @@ const Add: React.FC<{}> = () => {
effects=
{
formEffects
()
}
/>
{
/* 加工企业 Modal 框 */
}
<
EnterPrise
visible=
{
modalEnterPriseVisible
}
<
EnterPrise
visible=
{
modalEnterPriseVisible
}
cancel=
{
()
=>
setEnterPriseModalVisible
(
false
)
}
onOk=
{
enterPriseOnOk
}
></
EnterPrise
>
{
/* 加工商品Modal框 */
}
<
ProcessProducts
visible=
{
modalProductVisible
}
cancel=
{
()
=>
setModalProductVisible
(
false
)
}
<
ProcessProducts
visible=
{
modalProductVisible
}
cancel=
{
()
=>
setModalProductVisible
(
false
)
}
onOk=
{
processProductSelected
}
rowSelection=
{
productRowSelection
}
></
ProcessProducts
>
<
ProcessOrder
visible=
{
modalOrderVisible
}
cancel=
{
()
=>
setModalOrderVisible
(
false
)
}
visible=
{
modalOrderVisible
}
cancel=
{
()
=>
setModalOrderVisible
(
false
)
}
onOk=
{
processOrderOnok
}
rowSelection=
{
rowSelection
}
>
...
...
src/pages/handling/components/ProcessDetail/content.tsx
View file @
70bb4563
...
...
@@ -5,8 +5,7 @@ import classnames from 'classnames';
import
{
FileList
,
UploadFile
}
from
'../../components/UploadFile'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
}
from
'@formily/antd'
import
{
useScroll
,
useDebounceFn
}
from
'@umijs/hooks'
;
import
{
min
}
from
'lodash'
;
import
{
useScroll
}
from
'@umijs/hooks'
;
const
actions
=
createFormActions
();
const
schema
=
{
...
...
@@ -64,7 +63,6 @@ interface Iprops {
const
Content
:
React
.
FC
<
Iprops
>
=
React
.
forwardRef
((
props
,
conftentRef
)
=>
{
const
{
id
,
name
,
category
,
brand
,
unitName
,
files
,
productProps
,
quantity
,
processUnitPrice
}
=
props
;
const
[
active
,
setActive
]
=
useState
<
string
>
(
"基本信息"
);
const
[
menu
,
setMenu
]
=
useState
([])
// const ref = useRef(null);
const
[
scroll
,
ref
]
=
useScroll
<
HTMLDivElement
>
();
...
...
src/pages/home/components/UserCenter/index.less
View file @
70bb4563
...
...
@@ -2,7 +2,7 @@
.container {
// width: 1206px;
.header {
padding: 0 24px;
display: flex;
...
...
@@ -26,7 +26,7 @@
font-weight: 400;
}
}
.images {
width: 216px;
height: 100%;
...
...
@@ -60,10 +60,23 @@
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;
display: flex;
justify-content: center;
align-items: center;
font-size: 18px;
}
}
.wrapper {
...
...
@@ -90,10 +103,10 @@
}
}
}
}
src/pages/home/components/UserCenter/index.tsx
View file @
70bb4563
...
...
@@ -16,7 +16,7 @@ const WEEKDAYS = ["天", "一","二", "三", "四", "五","六"];
const
LEVEL_IMAGE
=
[
level1
,
level2
,
level3
,
level4
];
const
EDIT_USER_URL
=
'/memberCenter/memberAbility/query'
;
const
USER_CENTER_URL
=
'/memberCenter/memberAbility/manage/maintain'
const
STATUS_COLOR
=
[
"default"
,
"processing"
,
"error"
,
"success"
]
const
STATUS_COLOR
:
(
"default"
|
"processing"
|
"error"
|
"success"
)[]
=
[
"default"
,
"processing"
,
"error"
,
"success"
]
const
UserCenter
:
React
.
FC
<
Iprops
>
=
()
=>
{
const
today
=
moment
();
...
...
@@ -37,7 +37,7 @@ const UserCenter: React.FC<Iprops> = () => {
</
div
>
<
div
className=
{
styles
.
date
}
>
{
today
.
format
(
'YYYY年MM月DD日'
)
}
星期
{
WEEKDAYS
[
today
.
day
()]
}
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
images
}
>
<
img
src=
{
home_user
}
/>
...
...
@@ -46,13 +46,14 @@ const UserCenter: React.FC<Iprops> = () => {
<
div
className=
{
styles
.
content
}
>
<
Row
className=
{
styles
.
row
}
>
<
Col
span=
{
11
}
className=
{
styles
.
user
}
>
{
/* http://10.0.0.25:4000/project/15/interface/api/38926 上传用户头像 */
}
<
div
className=
{
styles
.
pic
}
>
{
userAuth
.
logo
?
<
img
src=
{
userAuth
.
logo
||
''
}
/>
:
<
div
>
</
div
>
:
<
div
className=
{
styles
.
randomLogo
}
>
H
</
div
>
}
</
div
>
<
div
className=
{
styles
.
wrapper
}
>
<
div
className=
{
styles
.
company
}
>
...
...
@@ -91,4 +92,4 @@ const UserCenter: React.FC<Iprops> = () => {
)
}
export
default
UserCenter
\ No newline at end of file
export
default
UserCenter
src/pages/systemSetting/message/index.less
View file @
70bb4563
...
...
@@ -16,5 +16,6 @@
font-weight: 500;
// color: #303133;
display: inline-block;
cursor: pointer;
}
}
\ No newline at end of file
}
src/pages/systemSetting/message/index.tsx
View file @
70bb4563
...
...
@@ -3,13 +3,11 @@ import { history } from 'umi';
import
{
Card
,
List
,
Avatar
}
from
'antd'
;
import
styles
from
'./index.less'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
moment
from
'moment'
;
import
msg_system
from
'@/assets/imgs/msg_system.png'
import
msg_platform
from
'@/assets/imgs/msg_platform.png'
;
import
cx
from
'classnames'
;
const
Message
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
([])
...
...
@@ -17,7 +15,7 @@ const Message: React.FC<{}> = () => {
current
:
1
,
pageSize
:
10
,
}
useEffect
(()
=>
{
// @ts-ignore
...
...
@@ -41,7 +39,6 @@ const Message: React.FC<{}> = () => {
}
const
handlePaginationChange
=
(
page
,
pageSize
)
=>
{
console
.
log
(
page
,
pageSize
);
getList
({
page
,
pageSize
})
.
then
((
data
)
=>
{
console
.
log
(
data
);
...
...
@@ -51,17 +48,20 @@ const Message: React.FC<{}> = () => {
const
handleRead
=
(
id
,
url
:
string
)
=>
{
console
.
log
(
url
);
// /report/message/member/read
PublicApi
.
getReportMessageMemberRead
({
id
:
id
})
.
then
((
data
)
=>
{
if
(
url
)
{
history
.
push
(
url
);
if
(
/http/
.
test
(
url
))
{
location
.
href
=
url
}
else
{
history
.
push
(
url
);
}
}
})
}
const
renderMessage
=
(
data
)
=>
{
return
(
<>
<
StatusTag
type=
{
data
.
type
==
1
?
'primary'
:
'success'
}
title=
{
data
.
type
==
1
?
'系统消息'
:
'平台消息'
}
/>
...
...
@@ -79,7 +79,7 @@ const Message: React.FC<{}> = () => {
<
PageHeaderWrapper
>
<
Card
title=
"消息列表"
>
>
<
List
itemLayout=
"horizontal"
dataSource=
{
dataSource
.
data
}
...
...
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