Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
shenshaokai
jinfa-admin
Commits
7d8a2f06
Commit
7d8a2f06
authored
Jan 18, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into dev
parents
4e498ad0
f37e90be
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
131 additions
and
79 deletions
+131
-79
index.tsx
src/pages/home/index.tsx
+1
-1
index.tsx
src/pages/message/index.tsx
+1
-1
index.tsx
...ingsPanel/propsSettings/components/BrandSetting/index.tsx
+1
-1
index.tsx
...opsSettings/components/CategoryreCommendSetting/index.tsx
+1
-1
index.tsx
src/pages/rfq/details/index.tsx
+6
-5
index.tsx
src/pages/rfqOffer/details/index.tsx
+7
-6
payWayTable.tsx
...s/ruleSettingManage/paySetting/components/payWayTable.tsx
+3
-2
settingIndex.tsx
src/pages/ruleSettingManage/paySetting/settingIndex.tsx
+39
-23
detail.tsx
src/pages/ruleSettingManage/payStrategy/detail.tsx
+15
-10
schema.tsx
...eSettingManage/platformSettlementStrategy/info/schema.tsx
+3
-3
index.tsx
...leSettingManage/platformSettlementStrategy/list/index.tsx
+9
-2
schema.tsx
...eSettingManage/platformSettlementStrategy/list/schema.tsx
+4
-5
index.tsx
src/pages/ruleSettingManage/schema/index.tsx
+1
-1
template.tsx
src/pages/systemManage/sensitiveWords/template.tsx
+18
-7
index.tsx
src/pages/systemManage/unit/index.tsx
+3
-3
template.tsx
src/pages/systemManage/unit/template.tsx
+19
-8
index.ts
src/utils/index.ts
+0
-0
No files found.
src/pages/home/index.tsx
View file @
7d8a2f06
...
...
@@ -177,7 +177,7 @@ const Home: React.FC<{}> = () => {
<
Badge
status=
{
PROCESS_STATUS
[
key
]
}
text=
{
item
.
name
}
></
Badge
>
</
div
>
</
div
>
<
div
><
Link
to=
{
item
.
url
}
>
查看
<
RightOutlined
/></
Link
></
div
>
<
div
><
Link
to=
{
item
.
link
}
>
查看
<
RightOutlined
/></
Link
></
div
>
</
div
>
</
Col
>
)
...
...
src/pages/message/index.tsx
View file @
7d8a2f06
...
...
@@ -36,7 +36,7 @@ const Message: React.FC<{}> = () => {
}
const
handleRead
=
(
id
,
url
:
string
)
=>
{
PublicApi
.
postReportMessagePlatformRead
({
id
:
id
})
PublicApi
.
postReportMessagePlatformRead
({
id
:
id
}
,
{
ctlType
:
'none'
}
)
.
then
((
data
)
=>
{
if
(
url
)
{
if
(
/http/
.
test
(
url
))
{
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/BrandSetting/index.tsx
View file @
7d8a2f06
...
...
@@ -213,7 +213,7 @@ const BrandSetting: React.FC<ShopSettingPropsType> = (props) => {
<
Col
>
<
Form
.
Item
className=
{
styles
.
mar_bot_0
}
name=
"
shop
Name"
name=
"
brand
Name"
>
<
Input
.
Search
style=
{
{
width
:
240
}
}
...
...
src/pages/pageCustomized/settingsPanel/propsSettings/components/CategoryreCommendSetting/index.tsx
View file @
7d8a2f06
...
...
@@ -157,7 +157,7 @@ const CategoryRecommendSetting: React.FC<CategoryRecommendSettingPropsType> = (p
<
Row
>
{
categoryResponseList
.
map
((
item
,
index
)
=>
(
<
Col
span=
{
4
}
className=
{
styles
.
category_item
}
key=
{
`category_item_${index}`
}
>
<
Col
span=
{
6
}
className=
{
styles
.
category_item
}
key=
{
`category_item_${index}`
}
>
<
Checkbox
value=
{
item
.
categoryId
}
>
{
item
.
categoryName
}
</
Checkbox
>
</
Col
>
))
...
...
src/pages/rfq/details/index.tsx
View file @
7d8a2f06
...
...
@@ -139,6 +139,7 @@ const Details: React.FC<{}> = (props) => {
title
:
'序号'
,
key
:
'inquiryListId'
,
dataIndex
:
'inquiryListId'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<>
{
index
+
1
}
</>
},
{
title
:
'操作角色'
,
key
:
'roleName'
,
...
...
@@ -233,12 +234,13 @@ const Details: React.FC<{}> = (props) => {
progressDot
current=
{
Number
(
data
.
externalState
-
1
)
}
>
{
detailData
.
externalStateStep
.
item
s
.
map
((
item
,
index
)
=>
{
{
Object
.
keys
(
data
).
length
>
0
&&
data
.
externalInquiryListStateResponse
s
.
map
((
item
,
index
)
=>
{
return
(
<
Step
key=
{
index
}
title=
{
item
.
title
}
description=
{
item
.
desc
}
title=
{
item
.
roleName
}
description=
{
item
.
operationalProcess
}
status=
{
item
.
isExecute
?
'finish'
:
'wait'
}
/>
);
})
}
...
...
@@ -323,4 +325,4 @@ const Details: React.FC<{}> = (props) => {
)
}
export
default
Details
\ No newline at end of file
export
default
Details
src/pages/rfqOffer/details/index.tsx
View file @
7d8a2f06
...
...
@@ -112,6 +112,7 @@ const Details: React.FC<{}> = (props) => {
title
:
'序号'
,
key
:
'inquiryListId'
,
dataIndex
:
'inquiryListId'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<>
{
index
+
1
}
</>
},
{
title
:
'操作角色'
,
key
:
'roleName'
,
...
...
@@ -223,12 +224,13 @@ const Details: React.FC<{}> = (props) => {
progressDot
current=
{
Number
(
data
.
externalState
-
1
)
}
>
{
detailData
.
externalStateStep
.
item
s
.
map
((
item
,
index
)
=>
{
{
Object
.
keys
(
data
).
length
>
0
&&
data
.
externalRequisitionFormResponse
s
.
map
((
item
,
index
)
=>
{
return
(
<
Step
key=
{
index
}
title=
{
item
.
title
}
description=
{
item
.
desc
}
title=
{
item
.
roleName
}
description=
{
item
.
operationalProcess
}
status=
{
item
.
isExecute
?
'finish'
:
'wait'
}
/>
);
})
}
...
...
@@ -236,7 +238,7 @@ const Details: React.FC<{}> = (props) => {
</
div
>
<
div
className=
{
style
.
item_wrap
}
>
<
div
className=
{
style
.
mainCol_title
}
style=
{
view
===
2
?
{
paddingBottom
:
'0px'
}
:
{
paddingBottom
:
'24px'
}
}
>
报价商品
</
div
>
<
StandardTable
<
StandardTable
currentRef=
{
ref
}
columns=
{
inquiryGoods
}
tableProps=
{
{
rowKew
:
'id'
}
}
...
...
@@ -319,4 +321,4 @@ const Details: React.FC<{}> = (props) => {
)
}
export
default
Details
\ No newline at end of file
export
default
Details
src/pages/ruleSettingManage/paySetting/components/payWayTable.tsx
View file @
7d8a2f06
...
...
@@ -6,6 +6,7 @@ import SetUpModal from './setUpModal';
interface
payWayTableParams
{
name
?:
string
,
payWayId
?:
number
,
payParametersList
?:
any
,
payParametersListResponses
?:
any
,
visible
?:
boolean
,
...
...
@@ -22,7 +23,7 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => {
const
[
edit
,
setedit
]
=
useState
<
any
>
({});
const
[
modifyIndex
,
setModifyIndex
]
=
useState
<
any
>
(
0
)
const
[
modify
,
setmodify
]
=
useState
<
boolean
>
(
false
);
const
{
name
,
payParametersListResponses
,
payParametersList
,
visible
,
onType
,
onGet
,
onDel
,
onEdit
,
id
}
=
props
;
const
{
name
,
payParametersListResponses
,
payParametersList
,
visible
,
onType
,
onGet
,
onDel
,
onEdit
,
id
,
payWayId
}
=
props
;
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'参数代码'
,
...
...
@@ -87,7 +88,7 @@ const PayWayTable: React.FC<payWayTableParams> = (props) => {
<
Button
style=
{
{
marginBottom
:
16
,
marginTop
:
24
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
setmodalvisible
(
true
);
setType
(
id
);
setmodify
(
false
)
}
}
type=
'dashed'
>
新增参数配置
</
Button
>
{
i
d
!==
2
&&
payWayI
d
!==
2
&&
<>
<
div
style=
{
{
borderLeft
:
'2px solid #00B37A'
,
margin
:
'41px 0 8px'
,
padding
:
'1px 5px'
}
}
>
{
name
}
转账到银行卡参数配置
</
div
>
<
Table
...
...
src/pages/ruleSettingManage/paySetting/settingIndex.tsx
View file @
7d8a2f06
...
...
@@ -6,7 +6,7 @@
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Button
,
Card
,
Tabs
,
Space
,
Input
,
InputNumber
,
message
}
from
'antd'
;
import
{
Button
,
Card
,
Tabs
,
Space
,
Input
,
InputNumber
,
message
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
PayWayRadio
from
'./components/payWayRadio'
;
...
...
@@ -38,6 +38,7 @@ const PayWaySetTemplate: React.FC<{}> = () => {
arr
.
push
({
id
:
item
.
id
,
way
:
item
.
way
,
payWayId
:
item
.
payWayId
,
isPitchOn
:
item
.
isPitchOn
?
item
.
isPitchOn
:
0
,
payType
:
item
.
payType
,
payParametersList
:
item
.
payParametersList
?
item
.
payParametersList
:
[],
...
...
@@ -98,27 +99,43 @@ const PayWaySetTemplate: React.FC<{}> = () => {
const
onHnadleSubmit
=
()
=>
{
let
conditions
=
false
;
let
wayName
=
''
;
payItem
.
forEach
(
item
=>
{
if
(
item
.
id
===
2
&&
item
.
isPitchOn
===
1
)
{
if
(
item
.
payParametersAddListRequests
.
length
>
0
)
{
conditions
=
true
try
{
payItem
.
forEach
(
item
=>
{
if
(
item
.
payWayId
===
2
&&
item
.
isPitchOn
===
1
)
{
console
.
log
(
1
)
if
(
item
.
payParametersAddListRequests
.
length
>
0
)
{
conditions
=
true
}
else
{
conditions
=
false
wayName
=
`
${
item
.
way
}
缺少支付参数配置`
throw
new
Error
}
}
else
if
(
item
.
payWayId
===
1
&&
item
.
isPitchOn
===
1
)
{
if
(
item
.
payParametersAddListRequests
.
length
>
0
&&
item
.
payParametersList
.
length
>
0
)
{
conditions
=
true
}
else
{
conditions
=
false
wayName
=
`
${
item
.
way
}
缺少支付参数配置`
throw
new
Error
}
}
else
if
(
item
.
payWayId
===
6
&&
item
.
isPitchOn
===
1
)
{
if
(
item
.
payParametersAddListRequests
.
length
>
0
)
{
const
data
=
item
.
payParametersAddListRequests
[
0
]
if
(
data
.
code
&&
data
.
value
&&
data
.
describe
)
{
conditions
=
true
}
else
{
conditions
=
false
wayName
=
`请配置
${
item
.
way
}
的参数`
throw
new
Error
}
}
}
else
{
conditions
=
false
wayName
=
item
.
way
return
}
}
else
if
(
item
.
id
===
1
&&
item
.
isPitchOn
===
1
)
{
if
(
item
.
payParametersAddListRequests
.
length
>
0
&&
item
.
payParametersList
.
length
>
0
)
{
conditions
=
true
}
else
{
conditions
=
false
wayName
=
item
.
way
return
}
}
else
{
conditions
=
true
}
}
)
}
)
}
catch
{
message
.
error
(
wayName
)
}
if
(
conditions
)
{
PublicApi
.
postPayCollectionParametersAdd
({
platformPayWays
:
payItem
...
...
@@ -127,8 +144,6 @@ const PayWaySetTemplate: React.FC<{}> = () => {
history
.
push
(
'/ruleSettingManager/paySetting'
)
}
})
}
else
{
message
.
error
(
`请新增
${
wayName
}
的支付参数配置`
)
}
}
...
...
@@ -179,9 +194,10 @@ const PayWaySetTemplate: React.FC<{}> = () => {
selectId=
{
payItem
[
idx
].
id
}
onChange=
{
(
value
)
=>
onChangeRaido
(
value
,
idx
)
}
/>
{
(
payItem
[
idx
].
id
===
1
||
payItem
[
idx
].
i
d
===
2
)
&&
{
(
payItem
[
idx
].
payWayId
===
1
||
payItem
[
idx
].
payWayI
d
===
2
)
&&
<
PayWayTable
id=
{
payItem
[
idx
].
id
}
payWayId=
{
payItem
[
idx
].
payWayId
}
onType=
{
payItem
[
idx
].
payType
}
name=
{
payItem
[
idx
].
way
}
payParametersList=
{
payItem
[
idx
].
payParametersList
}
...
...
@@ -193,7 +209,7 @@ const PayWaySetTemplate: React.FC<{}> = () => {
/>
}
{
(
payItem
[
idx
].
i
d
===
6
&&
!!
payItem
[
idx
].
isPitchOn
)
&&
(
payItem
[
idx
].
payWayI
d
===
6
&&
!!
payItem
[
idx
].
isPitchOn
)
&&
<
div
style=
{
{
marginTop
:
42
}
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
初始申请额度不超过
...
...
src/pages/ruleSettingManage/payStrategy/detail.tsx
View file @
7d8a2f06
...
...
@@ -45,8 +45,14 @@ const payActions = createFormActions()
* @return {type}
*/
const
fetchMemberList
=
async
(
params
)
=>
{
const
res
=
await
PublicApi
.
getMemberManageAllProviderPage
(
params
)
return
res
.
data
return
new
Promise
(
resolve
=>
{
PublicApi
.
getPayGetMembers
(
params
).
then
(
res
=>
{
res
.
data
.
data
.
forEach
((
item
:
any
)
=>
{
item
.
name
=
item
.
memberName
})
resolve
(
res
.
data
)
})
})
}
const
PaySetting
:
React
.
FC
<
{}
>
=
()
=>
{
...
...
@@ -61,20 +67,20 @@ const PaySetting: React.FC<{}> = () => {
levelList
:
[],
roleList
:
[]
})
const
[
memberRowSelection
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'
memberI
d'
})
const
[
memberRowSelection
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'
i
d'
})
const
[
optionType
,
setoptionType
]
=
useState
(
0
)
const
{
preview
,
pageStatus
}
=
usePageStatus
()
// const initValue = useInitValue(PublicApi.getPayPayMemberTacticsDetails)
const
columnsSetMember
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'
memberI
d'
,
dataIndex
:
'
i
d'
,
align
:
'center'
,
key
:
'
memberI
d'
,
key
:
'
i
d'
,
},
{
title
:
'会员名称'
,
dataIndex
:
'
n
ame'
,
dataIndex
:
'
memberN
ame'
,
align
:
'center'
,
key
:
'name'
,
},
...
...
@@ -130,7 +136,7 @@ const PaySetting: React.FC<{}> = () => {
// 弹出会员
const
handleAddMemberBtn
=
()
=>
{
const
checkBoxs
=
payActions
.
getFieldValue
(
'applyMember'
)
memberRowCtl
.
setSelectedRowKeys
(
checkBoxs
.
map
(
v
=>
v
.
memberI
d
))
memberRowCtl
.
setSelectedRowKeys
(
checkBoxs
.
map
(
v
=>
v
.
i
d
))
memberRowCtl
.
setSelectRow
(
checkBoxs
)
setvisible
(
true
)
console
.
log
(
visibleChannelMember
)
...
...
@@ -191,7 +197,7 @@ const PaySetting: React.FC<{}> = () => {
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
let
{
data
}
=
res
.
data
memberRowCtl
.
setSelectedRowKeys
(
data
.
map
(
v
=>
v
.
memberI
d
))
memberRowCtl
.
setSelectedRowKeys
(
data
.
map
(
v
=>
v
.
i
d
))
memberRowCtl
.
setSelectRow
(
data
)
payActions
.
setFieldValue
(
'applyMember'
,
data
)
}
...
...
@@ -417,7 +423,6 @@ const PaySetting: React.FC<{}> = () => {
}
}
//新增
console
.
log
(
param
,
10086
)
if
(
param
.
memberIdRoleIds
.
length
===
0
&&
values
.
isSelected
===
0
)
{
message
.
error
(
'请选择指定的会员'
);
return
...
...
@@ -495,7 +500,7 @@ const PaySetting: React.FC<{}> = () => {
}
}
tableProps=
{
{
rowKey
:
'
memberI
d'
rowKey
:
'
i
d'
}
}
/>
</
PageHeaderWrapper
>
...
...
src/pages/ruleSettingManage/platformSettlementStrategy/info/schema.tsx
View file @
7d8a2f06
...
...
@@ -140,7 +140,7 @@ export const memberSchema: ISchema = {
type
:
'string'
,
'x-component'
:
'ModalSearch'
,
'x-component-props'
:
{
placeholder
:
'
商品
名称'
,
placeholder
:
'
搜索会员
名称'
,
align
:
'flex-left'
,
},
},
...
...
@@ -172,7 +172,7 @@ export const memberSchema: ISchema = {
type
:
'string'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'选择会员
角色
'
,
placeholder
:
'选择会员
类型
'
,
style
:
{
width
:
'200px'
},
allowClear
:
true
,
}
...
...
@@ -181,7 +181,7 @@ export const memberSchema: ISchema = {
type
:
'string'
,
enum
:
[],
"x-component-props"
:
{
placeholder
:
'选择会员
角色
'
,
placeholder
:
'选择会员
等级
'
,
style
:
{
width
:
'200px'
},
allowClear
:
true
,
}
...
...
src/pages/ruleSettingManage/platformSettlementStrategy/list/index.tsx
View file @
7d8a2f06
...
...
@@ -4,7 +4,7 @@
*/
import
React
,
{
useRef
}
from
'react'
;
import
{
Card
,
Button
,
Space
}
from
'antd'
;
import
{
Card
,
Button
,
Space
,
Popconfirm
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
StandardTable
}
from
'god'
;
import
{
PublicApi
}
from
'@/services/api'
;
...
...
@@ -77,7 +77,14 @@ const MemberSettle: React.FC<{}> = () => {
return
(
<
Space
>
<
Link
to=
{
`/ruleSettingManager/platformSettlementStrategy/edit?id=${record.id}`
}
>
修改
</
Link
>
<
Button
type=
"link"
onClick=
{
()
=>
handleRemove
({
id
:
record
.
id
})
}
>
删除
</
Button
>
<
Popconfirm
title=
"确定删除?"
onConfirm=
{
()
=>
handleRemove
({
id
:
record
.
id
})
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
>
删除
</
Button
>
</
Popconfirm
>
</
Space
>
)
}
...
...
src/pages/ruleSettingManage/platformSettlementStrategy/list/schema.tsx
View file @
7d8a2f06
...
...
@@ -22,13 +22,13 @@ const schema: ISchema = {
},
},
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
type
:
'string'
,
'x-component'
:
'Search'
,
"x-mega-props"
:
{
"span"
:
2
},
'x-component-props'
:
{
placeholder
:
'搜索
'
,
placeholder
:
'搜索
策略名称'
,
advanced
:
false
,
},
},
...
...
@@ -37,4 +37,4 @@ const schema: ISchema = {
}
}
export
default
schema
\ No newline at end of file
export
default
schema
src/pages/ruleSettingManage/schema/index.tsx
View file @
7d8a2f06
...
...
@@ -55,7 +55,7 @@ export const strategyDetailTab = (props: any, usePageStatus: any) => {
"x-component"
:
'checkbox'
,
'x-component-props'
:
{
},
required
:
fals
e
,
required
:
tru
e
,
}
}
}
...
...
src/pages/systemManage/sensitiveWords/template.tsx
View file @
7d8a2f06
...
...
@@ -17,24 +17,35 @@ const tailLayout = {
const
{
TextArea
}
=
Input
;
const
Template
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
lodaing
,
setLodaing
]
=
useState
<
boolean
>
(
false
);
const
{
pathname
,
query
}
=
history
.
location
;
const
type
=
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
];
const
onFinish
=
(
values
:
any
)
=>
{
if
(
type
===
'add'
)
{
PublicApi
.
postManageSensitiveWordAdd
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
PublicApi
.
postManageSensitiveWordAdd
({...
values
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
();
},
2000
)
message
.
success
(
'新增敏感词成功'
)
setLodaing
(
true
)
}
}).
catch
(()
=>
{
setLodaing
(
false
)
})
}
else
{
values
.
id
=
query
.
id
;
PublicApi
.
postManageSensitiveWordUpdate
(
values
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
PublicApi
.
postManageSensitiveWordUpdate
({...
values
},
{
ctlType
:
'none'
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
();
},
2000
)
message
.
success
(
'修改敏感词成功'
)
setLodaing
(
true
)
}
}).
catch
(()
=>
{
setLodaing
(
false
)
})
}
}
...
...
@@ -76,7 +87,7 @@ const Template:React.FC<{}> = () => {
</
Form
.
Item
>
<
Form
.
Item
{
...
tailLayout
}
>
<
Space
size=
{
24
}
>
<
Button
type=
'primary'
htmlType=
"submit"
>
保存
</
Button
>
<
Button
type=
'primary'
loading=
{
lodaing
}
htmlType=
"submit"
>
保存
</
Button
>
<
Popconfirm
onConfirm=
{
confirmCancel
}
title=
"确定要执行这个操作?"
...
...
src/pages/systemManage/unit/index.tsx
View file @
7d8a2f06
...
...
@@ -16,8 +16,8 @@ const SensitiveWords: React.FC<{}> = () => {
await
PublicApi
.
getManageUnitUpdateUnitStatus
({
id
:
id
,
status
:
_status
})
ref
.
current
.
reload
()
}
const
confirmCancel
=
(
id
:
number
)
=>
{
PublicApi
.
postManageSensitiveWordDelete
({
ids
:
[
id
]
}).
then
(
res
=>
{
const
confirmCancel
=
(
id
:
any
)
=>
{
PublicApi
.
getManageUnitDeleteUnit
({
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
message
.
success
(
'删除成功'
)
ref
.
current
.
reload
()
...
...
@@ -132,7 +132,7 @@ const SensitiveWords: React.FC<{}> = () => {
name
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'
属性
名称'
,
placeholder
:
'
单位
名称'
,
},
'x-component'
:
'Search'
}
...
...
src/pages/systemManage/unit/template.tsx
View file @
7d8a2f06
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
history
}
from
'umi'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
...
...
@@ -16,24 +16,35 @@ const tailLayout = {
const
Template
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
lodaing
,
setLodaing
]
=
useState
<
boolean
>
(
false
);
const
{
pathname
,
query
}
=
history
.
location
;
const
type
=
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
];
const
onFinish
=
(
values
:
any
)
=>
{
if
(
type
===
'add'
)
{
PublicApi
.
postManageUnitSaveOrUpdateUnit
(
values
).
then
(
res
=>
{
PublicApi
.
postManageUnitSaveOrUpdateUnit
(
{...
values
},
{
ctlType
:
'none'
}
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
// message.success('新增单位成功')
setTimeout
(()
=>
{
history
.
goBack
();
},
2000
)
message
.
success
(
'新增单位成功'
)
setLodaing
(
true
)
}
}).
catch
(()
=>
{
setLodaing
(
false
)
})
}
else
{
values
.
id
=
query
.
id
;
PublicApi
.
postManageUnitSaveOrUpdateUnit
(
values
).
then
(
res
=>
{
PublicApi
.
postManageUnitSaveOrUpdateUnit
(
{...
values
},
{
ctlType
:
'none'
}
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
// message.success('修改单位成功')
setTimeout
(()
=>
{
history
.
goBack
();
},
2000
)
message
.
success
(
'修改单位成功'
)
setLodaing
(
true
)
}
}).
catch
(()
=>
{
setLodaing
(
false
)
})
}
}
...
...
@@ -76,7 +87,7 @@ const Template: React.FC<{}> = () => {
</
Form
.
Item
>
<
Form
.
Item
{
...
tailLayout
}
>
<
Space
size=
{
24
}
>
<
Button
type=
'primary'
htmlType=
"submit"
>
保存
</
Button
>
<
Button
type=
'primary'
loading=
{
lodaing
}
htmlType=
"submit"
>
保存
</
Button
>
<
Popconfirm
onConfirm=
{
confirmCancel
}
title=
"确定要执行这个操作?"
...
...
src/utils/index.ts
View file @
7d8a2f06
This diff is collapsed.
Click to expand it.
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