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
a80cf1bd
Commit
a80cf1bd
authored
May 14, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复订单工作量取值问题
parent
88e6c2c3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
16 deletions
+33
-16
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+30
-16
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+1
-0
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+1
-0
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+1
-0
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
a80cf1bd
...
...
@@ -2,27 +2,29 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
4-22 14:54:25
* @LastEditTime: 2021-0
5-14 17:12:16
* @Description: 维修商品抽屉组件
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
from
'react'
;
import
{
Drawer
,
Button
,
Pagination
,
message
}
from
'antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
moment
from
'moment'
;
import
BigNumber
from
'bignumber.js'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
PurchaseOrderOutWorkStateTexts
,
ORDER_TYPE2
,
PAYWAY
,
PAY_CHANNEL
,
PayOutWorkState
,
}
from
'@/constants'
;
import
{
ORDER_TYPE_INQUIRY_CONTRACT
,
ORDER_TYPE_BIDDING_CONTRACT
,
ORDER_TYPE_TENDER_CONTRACT
,
}
from
'@/constants/order'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NestTable
from
'@/components/NestTable'
;
import
{
goodItem
,
OrderList
Params
,
OrderList
Res
}
from
'./interface'
;
import
{
goodItem
,
OrderListRes
}
from
'./interface'
;
import
{
listSearchSchema
}
from
'./schema'
;
import
styles
from
'./index.less'
;
import
{
PublicApi
}
from
'@/services/api'
;
...
...
@@ -74,6 +76,10 @@ interface GoodsDrawerProps {
* 流程类型:1.订单交易流程 2.售后换货流程 3.售后退货流程 4.售后维修流程
*/
afterType
:
1
|
2
|
3
|
4
;
/**
* 订单类型
*/
orderType
:
number
;
};
interface
GoodsDrawerState
{
...
...
@@ -160,7 +166,13 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
// 获取订单列表
getOrderList
=
async
()
=>
{
const
{
page
,
size
,
searchVal
}
=
this
.
state
;
const
{
fetchOrderList
,
afterType
}
=
this
.
props
;
const
{
fetchOrderList
,
afterType
,
orderType
}
=
this
.
props
;
const
isMateriel
=
(
orderType
===
ORDER_TYPE_INQUIRY_CONTRACT
||
orderType
===
ORDER_TYPE_BIDDING_CONTRACT
||
orderType
===
ORDER_TYPE_TENDER_CONTRACT
);
if
(
!
fetchOrderList
)
{
return
;
...
...
@@ -203,14 +215,16 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
return
;
}
processEnumRes
=
await
PublicApi
.
postOrderGetProcessEnum
({
list
:
payload
,
},
{
ctlType
:
'none'
,
});
if
(
processEnumRes
.
code
!==
1000
)
{
message
.
error
(
'获取工作流枚举失败,请稍候再试'
);
return
;
if
(
!
isMateriel
)
{
processEnumRes
=
await
PublicApi
.
postOrderGetProcessEnum
({
list
:
payload
,
},
{
ctlType
:
'none'
,
});
if
(
processEnumRes
.
code
!==
1000
)
{
message
.
error
(
'获取工作流枚举失败,请稍候再试'
);
return
;
}
}
}
...
...
@@ -224,7 +238,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
orderListRes
.
data
.
forEach
(
item
=>
{
if
(
item
.
productDateilss
)
{
item
.
productDateilss
.
forEach
(
product
=>
{
product
.
processEnum
=
processEnumRes
.
data
[
i
]
?
processEnumRes
.
data
[
i
].
processEnum
:
undefined
;
product
.
processEnum
=
!
isMateriel
?
processEnumRes
.
data
[
i
]
?
processEnumRes
.
data
[
i
].
processEnum
:
undefined
:
item
.
processEnum
;
// product.processEnum = mockMap[Math.floor(Math.random()*2 + 1)];
i
++
;
// 防止重复添加数据
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
a80cf1bd
...
...
@@ -692,6 +692,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
NestColumns
:
[
tableColumn
,
childTableColumn
],
}
}
searchable=
{
!
orderId
}
orderType=
{
orderTypeValue
}
/>
<
Prompt
when=
{
unsaved
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
a80cf1bd
...
...
@@ -618,6 +618,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
NestColumns
:
[
tableColumn
,
childTableColumn
],
}
}
searchable=
{
!
orderId
}
orderType=
{
orderTypeValue
}
/>
<
Prompt
when=
{
unsaved
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
a80cf1bd
...
...
@@ -750,6 +750,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
NestColumns
:
[
tableColumn
,
childTableColumn
],
}
}
searchable=
{
!
orderId
}
orderType=
{
orderTypeValue
}
/>
<
ReturnInfoDrawer
...
...
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