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
e3b33a96
Commit
e3b33a96
authored
Jan 06, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:交易规则中查询已设置交易规则的列表接口添加type字段,处理新增交易规则时选中非交易类型规则和电子合同项联动问题,修复采购订单列表售后功能
parent
6434f070
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
9 deletions
+42
-9
userDetail.tsx
src/pages/authConfig/userSystem/userDetail.tsx
+1
-1
index.tsx
src/pages/transaction/purchaseOrder/index.tsx
+22
-5
RuleSetting.tsx
...s/transaction/transactionRules/components/RuleSetting.tsx
+19
-3
No files found.
src/pages/authConfig/userSystem/userDetail.tsx
View file @
e3b33a96
...
...
@@ -101,7 +101,7 @@ const AddUser: React.FC<{}> = () => {
// 模拟请求
const
fetchUserList
=
async
(
params
:
any
)
=>
{
const
data
=
await
PublicApi
.
getMemberRolePage
(
params
)
const
data
=
await
PublicApi
.
getMemberRolePage
Byname
(
params
)
return
data
.
data
}
...
...
src/pages/transaction/purchaseOrder/index.tsx
View file @
e3b33a96
import
React
,
{
useState
,
useRef
}
from
'react'
import
{
Card
,
Button
,
Modal
,
Row
,
Col
}
from
'antd'
import
{
Card
,
Button
,
Modal
,
Row
,
Col
,
message
}
from
'antd'
import
{
StandardTable
}
from
'god'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PublicApi
}
from
'@/services/api'
...
...
@@ -69,15 +69,31 @@ const showDataSource = [
const
PurchaseOrder
:
React
.
FC
<
PurchaseOrderProps
>
=
(
props
)
=>
{
const
[
saleVisible
,
setSaleVisible
]
=
useState
<
any
>
(
false
)
const
[
checkedId
,
setCheckedId
]
=
useState
<
any
>
()
const
[
recordId
,
setRecordId
]
=
useState
<
any
>
()
const
ref
=
useRef
<
any
>
({})
// 售后唤起弹窗 @todo
const
handleSaleAfter
=
(
id
)
=>
{
setSaleVisible
(
true
)
setRecordId
(
id
)
}
const
handleOk
=
()
=>
{
if
(
checkedId
)
{
switch
(
checkedId
)
{
case
1
:
history
.
push
(
`/memberCenter/afterService/exchangeApplication/exchangePrSubmit/add?orderId=
${
recordId
}
`
)
break
;
case
2
:
history
.
push
(
`/memberCenter/afterService/returnApplication/returnPrSubmit/add?orderId=
${
recordId
}
`
)
break
;
case
3
:
history
.
push
(
`/memberCenter/afterService/repairApplication/repairPrSubmit/add?orderId=
${
recordId
}
`
)
break
;
}
}
else
{
message
.
error
(
"请选择售后类型"
)
}
}
const
handleEvaluate
=
(
id
)
=>
{
...
...
@@ -92,8 +108,9 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
key
:
'ctl'
,
render
:
(
text
,
record
)
=>
<>
{
record
.
externalState
===
PurchaseOrderOutWorkState
.
FINISH_ORDER
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleEvaluate
(
record
.
id
)
}
>
评价
</
Button
>
}
{
/* todo */
}
{
/* <Button type='link' onClick={() => handleSaleAfter(record.id)}>售后</Button> */
}
{
record
.
receivingTimes
>=
1
&&
<
Button
type=
'link'
onClick=
{
()
=>
handleSaleAfter
(
record
.
id
)
}
>
售后
</
Button
>
}
</>
}
])
...
...
src/pages/transaction/transactionRules/components/RuleSetting.tsx
View file @
e3b33a96
...
...
@@ -278,9 +278,13 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
// // 查询已设置交易规则的列表
const
fatchSetedProducts
=
(
id
)
=>
{
PublicApi
.
getOrderTradingRulesProductIdList
({
shopId
:
id
}).
then
(
res
=>
{
const
{
data
,
code
}
=
res
setIdNotInList
(()
=>
data
?.
productIds
||
[])
let
transactionProcesssId
=
addSchemaAction
.
getFieldValue
(
"transactionProcesssId"
)
addSchemaAction
.
getFieldState
(
"transactionProcesssId"
,
state
=>
{
let
type
=
state
.
dataSource
.
filter
(
item
=>
item
.
id
===
transactionProcesssId
)[
0
][
"type"
]
PublicApi
.
getOrderTradingRulesProductIdList
({
shopId
:
id
,
type
}).
then
(
res
=>
{
const
{
data
,
code
}
=
res
setIdNotInList
(()
=>
data
?.
productIds
||
[])
})
})
}
...
...
@@ -315,6 +319,18 @@ const RuleSetting:React.FC<RuleSettingProps> = (props) => {
})
fatchSetedProducts
(
parentState
.
value
[
0
])
})
$
(
'onFieldInputChange'
,
'transactionProcesssId'
).
subscribe
(
parentState
=>
{
// 不是下单交易类型 隐藏电子合同
if
(
parentState
.
dataSource
.
filter
(
item
=>
item
.
id
===
parentState
.
value
)[
0
][
"type"
]
!==
1
)
{
setFieldState
(
"MEGA_LAYOUT1_1"
,
state
=>
{
state
.
visible
=
false
})
}
else
{
setFieldState
(
"MEGA_LAYOUT1_1"
,
state
=>
{
state
.
visible
=
true
})
}
})
}
}
onSubmit=
{
handleSubmit
}
actions=
{
addSchemaAction
}
...
...
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