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
91bac5ea
Commit
91bac5ea
authored
Dec 11, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug
parent
02f6968f
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
137 additions
and
131 deletions
+137
-131
index.tsx
src/pages/afterService/components/GoodsDrawer/index.tsx
+3
-7
index.ts
...pages/afterService/components/GoodsDrawer/schema/index.ts
+2
-2
useBusinessEffects.ts
...mit/components/ExchangeForm/effects/useBusinessEffects.ts
+4
-20
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+38
-8
index.ts
.../exchangePrSubmit/components/ExchangeForm/schema/index.ts
+5
-7
index.tsx
...terService/exchangeApplication/exchangePrSubmit/index.tsx
+11
-11
useBusinessEffects.ts
...ubmit/components/RepairForm/effects/useBusinessEffects.ts
+2
-2
index.tsx
...pplication/repairPrSubmit/components/RepairForm/index.tsx
+20
-5
index.ts
...tion/repairPrSubmit/components/RepairForm/schema/index.ts
+5
-12
index.tsx
...s/afterService/repairApplication/repairPrSubmit/index.tsx
+12
-12
useBusinessEffects.ts
...ubmit/components/ReturnForm/effects/useBusinessEffects.ts
+0
-26
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+15
-5
index.ts
...tion/returnPrSubmit/components/ReturnForm/schema/index.ts
+3
-0
index.tsx
...s/afterService/returnApplication/returnPrSubmit/index.tsx
+12
-12
index.tsx
src/utils/index.tsx
+5
-2
No files found.
src/pages/afterService/components/GoodsDrawer/index.tsx
View file @
91bac5ea
...
...
@@ -2,20 +2,16 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-1
0 17:56:20
* @LastEditTime: 2020-12-1
1 11:04:53
* @Description: 维修商品抽屉组件
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Drawer
,
Button
,
Pagination
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetOrderOneBatchOrderListResponse
}
from
'@/services/OrderApi'
;
import
{
PurchaseOrderInsideWorkStateTexts
,
ORDER_TYPE2
}
from
'@/constants'
;
import
{
PurchaseOrderOutWorkStateTexts
,
ORDER_TYPE2
}
from
'@/constants'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NestTable
from
'@/components/NestTable'
;
import
{
goodItem
,
OrderListParams
,
OrderListRes
}
from
'./interface'
;
...
...
@@ -155,7 +151,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
title
:
'订单状态'
,
dataIndex
:
'externalState'
,
align
:
'center'
,
render
:
text
=>
PurchaseOrder
Inside
WorkStateTexts
[
text
],
render
:
text
=>
PurchaseOrder
Out
WorkStateTexts
[
text
],
},
{
title
:
'订单类型'
,
...
...
src/pages/afterService/components/GoodsDrawer/schema/index.ts
View file @
91bac5ea
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-1
1-02 13:47:58
* @LastEditTime: 2020-1
2-11 10:58:36
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -75,7 +75,7 @@ export const listSearchSchema: ISchema = {
{
label
:
ORDER_TYPE2
[
ORDER_TYPE2_CHANNEL_POINTS
],
value
:
ORDER_TYPE2_CHANNEL_POINTS
},
],
'x-component-props'
:
{
placeholder
:
'
外部状态
(全部)'
,
placeholder
:
'
订单类型
(全部)'
,
allowClear
:
true
,
},
},
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/effects/useBusinessEffects.ts
View file @
91bac5ea
...
...
@@ -2,34 +2,18 @@
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
08 13:51:2
1
* @LastEditTime: 2020-12-
11 10:29:5
1
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
}
from
'@/constants'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
// 获取采购入库单相关数据
const
fetchOrderPurchaseReceiptAddList
=
async
(
params
:
any
)
=>
{
const
res
=
await
PublicApi
.
getOrderPurchaseReceiptAddList
({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
}
return
[];
};
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
getFieldValue
,
...
...
@@ -72,14 +56,14 @@ export const useBusinessEffects = (context, actions) => {
// 已换货数量
const
replacedCountValue
=
getFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`rep
airGoodsList.
${
$1
}
.replacedCount
`
return
`rep
laceGoodsList.
${
$1
}
.extraData
`
}),
state
=>
state
.
value
,
state
=>
state
.
value
.
replacedCount
,
);
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`rep
air
GoodsList.
${
$1
}
.replaceCount`
return
`rep
lace
GoodsList.
${
$1
}
.replaceCount`
}),
state
=>
{
if
(
+
value
>
replacedCountValue
)
{
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
91bac5ea
...
...
@@ -47,6 +47,7 @@ interface DetailInfo {
outerStatusName
?:
string
,
innerStatus
?:
number
,
innerStatusName
?:
string
,
deliveryType
?:
number
,
}
const
ExchangeForm
:
React
.
FC
<
BillsFormProps
>
=
({
...
...
@@ -184,6 +185,18 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
supplierName
,
parentMemberId
,
parentMemberRoleId
,
evaluate
,
goodsDetailList
,
innerTaskList
,
manualReturnGoodsAddress
,
replaceDeliveryGoodsList
,
replaceStatisticsList
,
taskType
,
consumerName
,
outerTaskList
,
replaceBatch
,
replaceId
,
...
rest
}
=
res
.
data
;
...
...
@@ -248,7 +261,16 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
pageSize
:
`
${
99999
}
`
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setReplaceGoodsList
(
res
.
data
);
setReplaceGoodsList
({
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
extraData
:
{
replacedCount
:
item
.
purchaseCount
||
0
,
// 已换货数量,这里取 采购数量判断即可
id
:
item
.
orderRecordId
,
},
})),
totalCount
:
res
.
data
.
totalCount
,
});
setGoodsValue
(
res
.
data
&&
res
.
data
.
data
?
res
.
data
.
data
.
map
(
item
=>
item
.
orderRecordId
)
:
[]);
}
}).
finally
(()
=>
{
...
...
@@ -292,6 +314,13 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
deliveryAddress
=
{},
proofFileList
=
[],
replaceGoodsList
=
[],
outerStatus
,
outerStatusName
,
innerStatus
,
innerStatusName
,
applyNo
,
applyTime
,
...
rest
}
=
value
;
...
...
@@ -334,9 +363,9 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
,
sendId
:
deliveryType
===
1
?
shippingAddress
.
sendI
d
:
shippingAddress
.
i
d
:
deliveryType
===
2
?
pickupAddress
.
sendI
d
:
pickupAddress
.
i
d
:
''
,
},
...
...
@@ -345,13 +374,13 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
filePath
:
item
.
data
.
url
,
})),
replaceGoodsList
:
replaceGoodsList
.
map
(({
id
,
replaceCount
,
brand
,
unit
,
extraData
,
...
rest
})
=>
({
orderRecordId
:
id
,
orderRecordId
:
extraData
.
id
,
replaceCount
:
+
replaceCount
,
brand
:
brand
||
''
,
unit
:
unit
||
''
,
...
...
@@ -415,8 +444,6 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
existing
?
existing
:
{
id
:
item
.
id
,
orderRecordId
:
item
.
orderId
,
orderNo
:
item
.
orderNo
,
productId
:
item
.
productId
,
productName
:
item
.
productName
,
...
...
@@ -426,8 +453,11 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
purchaseCount
:
item
.
purchaseCount
,
purchasePrice
:
item
.
price
,
purchaseAmount
:
+
(
item
.
price
*
item
.
purchaseCount
).
toFixed
(
2
),
replacedCount
:
item
.
replaceCount
||
item
.
purchaseCount
||
0
,
// 已换货数量
replaceReason
:
''
,
extraData
:
{
replacedCount
:
item
.
replaceCount
||
item
.
purchaseCount
||
0
,
// 已换货数量
id
:
item
.
id
,
},
};
value
.
push
(
atom
);
});
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/schema/index.ts
View file @
91bac5ea
...
...
@@ -60,6 +60,7 @@ const supplierSchema: ISchema = {
placeholder
:
'搜索'
,
align
:
'flex-start'
,
advanced
:
false
,
tip
:
'输入 供应会员名称 进行搜索'
,
},
},
},
...
...
@@ -211,6 +212,8 @@ export const addBillSchema: ISchema = {
'x-component-props'
:
{
renderAddition
:
()
=>
null
,
renderRemove
:
'{{renderListTableRemove}}'
,
renderMoveDown
:
()
=>
null
,
renderMoveUp
:
()
=>
null
,
operationsWidth
:
100
,
operations
:
{
align
:
'center'
,
...
...
@@ -315,16 +318,11 @@ export const addBillSchema: ISchema = {
type
:
'string'
,
display
:
false
,
},
// 不用于展示,只用于收集值
orderId
:
{
//
其他数据,
不用于展示,只用于收集值
extraData
:
{
type
:
'string'
,
display
:
false
,
},
// 已换货数量
replacedCount
:
{
type
:
'string'
,
visible
:
false
,
},
},
}
},
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/index.tsx
View file @
91bac5ea
...
...
@@ -137,6 +137,17 @@ const ExchangePrSubmit: React.FC = () => {
提交
</
Button
>
)
}
{
(
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_UNCOMMITTED
||
record
.
outerStatus
===
EXCHANGE_OUTER_STATUS_FAILED
)
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/exchangeApplication/exchangePrSubmit/edit?id=${record.replaceId}`
)
}
>
编辑
</
Button
>
)
}
{
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_UNCOMMITTED
&&
(
<
Popconfirm
title=
"确定要删除吗?"
...
...
@@ -152,17 +163,6 @@ const ExchangePrSubmit: React.FC = () => {
</
Button
>
</
Popconfirm
>
)
}
{
(
record
.
innerStatus
===
EXCHANGE_INNER_STATUS_UNCOMMITTED
||
record
.
outerStatus
===
EXCHANGE_OUTER_STATUS_FAILED
)
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/exchangeApplication/exchangePrSubmit/edit?id=${record.replaceId}`
)
}
>
编辑
</
Button
>
)
}
</>
),
},
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/effects/useBusinessEffects.ts
View file @
91bac5ea
...
...
@@ -33,9 +33,9 @@ export const useBusinessEffects = (context, actions) => {
// 已维修数量
const
repairedCountValue
=
getFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`repairGoodsList.
${
$1
}
.
repairedCount
`
return
`repairGoodsList.
${
$1
}
.
extraData
`
}),
state
=>
state
.
value
,
state
=>
state
.
value
.
repairedCount
,
);
setFieldState
(
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/index.tsx
View file @
91bac5ea
...
...
@@ -122,6 +122,17 @@ const RepairForm: React.FC<BillsFormProps> = ({
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setRepairGoodsList
(
res
.
data
);
setRepairGoodsList
({
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
extraData
:
{
id
:
item
.
orderRecordId
,
orderId
:
item
.
orderId
,
repairedCount
:
item
.
purchaseCount
||
0
,
// 已维修数量,这里取 采购数量判断即可
},
})),
totalCount
:
res
.
data
.
totalCount
,
});
setGoodsValue
(
res
.
data
&&
res
.
data
.
data
?
res
.
data
.
data
.
map
(
item
=>
item
.
orderRecordId
)
:
[]);
}
}).
finally
(()
=>
{
...
...
@@ -197,13 +208,14 @@ const RepairForm: React.FC<BillsFormProps> = ({
filePath
:
item
.
data
.
url
,
})),
repairGoodsList
:
repairGoodsList
.
map
(({
id
,
repairCount
,
brand
,
unit
,
extraData
,
...
rest
})
=>
({
orderRecordId
:
id
,
orderId
:
extraData
.
orderId
,
orderRecordId
:
extraData
.
id
,
repairCount
:
+
repairCount
,
brand
:
brand
||
''
,
unit
:
unit
||
''
,
...
...
@@ -211,6 +223,7 @@ const RepairForm: React.FC<BillsFormProps> = ({
})),
...
rest
,
};
PublicApi
.
postAsRepairGoodsSave
(
payload
)
.
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -262,8 +275,6 @@ const RepairForm: React.FC<BillsFormProps> = ({
existing
?
existing
:
{
id
:
item
.
id
,
orderId
:
item
.
orderId
,
orderNo
:
item
.
orderNo
,
productId
:
item
.
productId
,
productName
:
item
.
productName
,
...
...
@@ -271,8 +282,12 @@ const RepairForm: React.FC<BillsFormProps> = ({
brand
:
item
.
unitName
,
unit
:
item
.
costPrice
,
purchaseCount
:
item
.
purchaseCount
,
repairedCount
:
item
.
repairCount
||
item
.
purchaseCount
||
0
,
// 已维修数量
repairReason
:
''
,
extraData
:
{
id
:
item
.
id
,
orderId
:
item
.
orderId
,
repairedCount
:
item
.
repairCount
||
item
.
purchaseCount
||
0
,
// 已维修数量
},
};
value
.
push
(
atom
);
});
...
...
src/pages/afterService/repairApplication/repairPrSubmit/components/RepairForm/schema/index.ts
View file @
91bac5ea
...
...
@@ -60,6 +60,7 @@ const supplierSchema: ISchema = {
placeholder
:
'搜索'
,
align
:
'flex-start'
,
advanced
:
false
,
tip
:
'输入 供应会员名称 进行搜索'
,
},
},
},
...
...
@@ -211,6 +212,8 @@ export const addBillSchema: ISchema = {
'x-component-props'
:
{
renderAddition
:
()
=>
null
,
renderRemove
:
'{{renderListTableRemove}}'
,
renderMoveDown
:
()
=>
null
,
renderMoveUp
:
()
=>
null
,
operationsWidth
:
100
,
operations
:
{
align
:
'center'
,
...
...
@@ -301,21 +304,11 @@ export const addBillSchema: ISchema = {
}
],
},
// 不用于展示,只用于收集值
id
:
{
//
其他数据,
不用于展示,只用于收集值
extraData
:
{
type
:
'string'
,
display
:
false
,
},
// 不用于展示,只用于收集值
orderId
:
{
type
:
'string'
,
display
:
false
,
},
// 已维修数量
repairedCount
:
{
type
:
'string'
,
visible
:
false
,
},
},
}
},
...
...
src/pages/afterService/repairApplication/repairPrSubmit/index.tsx
View file @
91bac5ea
...
...
@@ -130,6 +130,18 @@ const RepairPrSubmit: React.FC = () => {
提交
</
Button
>
)
}
{
/* 外部状态为不接受申请 或者 内部状态为 待提交申请 都可以进行编辑 */
}
{
(
record
.
outerStatus
===
REPAIR_OUTER_STATUS_FAILED
||
record
.
innerStatus
===
REPAIR_INNER_STATUS_UNCOMMITTED
)
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/repairApplication/repairPrSubmit/edit?id=${record.applyId}`
)
}
>
编辑
</
Button
>
)
}
{
record
.
innerStatus
===
REPAIR_INNER_STATUS_UNCOMMITTED
&&
(
<
Popconfirm
title=
"确定要删除吗?"
...
...
@@ -145,18 +157,6 @@ const RepairPrSubmit: React.FC = () => {
</
Button
>
</
Popconfirm
>
)
}
{
/* 外部状态为不接受申请 或者 内部状态为 待提交申请 都可以进行编辑 */
}
{
(
record
.
outerStatus
===
REPAIR_OUTER_STATUS_FAILED
||
record
.
innerStatus
===
REPAIR_INNER_STATUS_UNCOMMITTED
)
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/repairApplication/repairPrSubmit/edit?id=${record.applyId}`
)
}
>
编辑
</
Button
>
)
}
</>
),
},
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/effects/useBusinessEffects.ts
View file @
91bac5ea
...
...
@@ -48,29 +48,4 @@ export const useBusinessEffects = (context, actions) => {
break
};
});
// 校验退货数量
onFieldInputChange$
(
'returnGoodsList.*.returnCount'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
// 已退货数量
const
replacedCountValue
=
getFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`returnGoodsList.
${
$1
}
.returnedCount`
}),
state
=>
state
.
value
,
);
setFieldState
(
FormPath
.
transform
(
name
,
/
\d
/
,
$1
=>
{
return
`returnGoodsList.
${
$1
}
.returnCount`
}),
state
=>
{
if
(
+
value
>
replacedCountValue
)
{
state
.
errors
=
'填写值已超过最大可退货数量,请重新填写'
;
}
else
{
state
.
errors
=
''
;
}
}
);
});
}
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
91bac5ea
...
...
@@ -267,6 +267,18 @@ const ReturnForm: React.FC<BillsFormProps> = ({
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setReturnGoodsList
(
res
.
data
);
setReturnGoodsList
({
data
:
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
returnedCount
:
item
.
purchaseCount
||
0
,
// 已退货数量,这里取 采购数量判断即可
extraData
:
{
id
:
item
.
orderRecordId
,
returnReason
:
item
.
returnReason
,
payList
:
item
.
payList
,
},
})),
totalCount
:
res
.
data
.
totalCount
,
});
setGoodsValue
(
res
.
data
&&
res
.
data
.
data
?
res
.
data
.
data
.
map
(
item
=>
item
.
orderRecordId
)
:
[]);
}
}).
finally
(()
=>
{
...
...
@@ -321,8 +333,6 @@ const ReturnForm: React.FC<BillsFormProps> = ({
...
rest
}
=
values
;
console
.
log
(
'value'
,
values
)
setSubmitLoading
(
true
);
const
payload
=
{
...
...
@@ -357,9 +367,9 @@ const ReturnForm: React.FC<BillsFormProps> = ({
,
sendId
:
deliveryType
===
1
?
shippingAddress
.
sendI
d
:
shippingAddress
.
i
d
:
deliveryType
===
2
?
pickupAddress
.
sendI
d
:
pickupAddress
.
i
d
:
''
,
},
...
...
@@ -531,7 +541,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
);
return
(
<
Spin
spinning=
{
infoLoading
}
>
<
Spin
spinning=
{
infoLoading
||
returnGoodsLoading
}
>
<
PageHeaderWrapper
style=
{
{
padding
:
24
,
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/schema/index.ts
View file @
91bac5ea
...
...
@@ -60,6 +60,7 @@ const supplierSchema: ISchema = {
placeholder
:
'搜索'
,
align
:
'flex-start'
,
advanced
:
false
,
tip
:
'输入 供应会员名称 进行搜索'
,
},
},
},
...
...
@@ -211,6 +212,8 @@ export const addBillSchema: ISchema = {
'x-component-props'
:
{
renderAddition
:
()
=>
null
,
renderRemove
:
'{{renderListTableRemove}}'
,
renderMoveDown
:
()
=>
null
,
renderMoveUp
:
()
=>
null
,
operationsWidth
:
100
,
operations
:
{
align
:
'center'
,
...
...
src/pages/afterService/returnApplication/returnPrSubmit/index.tsx
View file @
91bac5ea
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 10:13:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
09 14:31:30
* @LastEditTime: 2020-12-
11 11:12:44
* @Description: 待提交退货申请单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -142,6 +142,17 @@ const ReturnPrSubmit: React.FC = () => {
提交
</
Button
>
)
}
{
(
record
.
innerStatus
===
RETURN_INNER_STATUS_UNCOMMITTED
||
record
.
outerStatus
===
RETURN_OUTER_STATUS_FAILED
)
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/returnApplication/returnPrSubmit/edit?id=${record.returnId}`
)
}
>
编辑
</
Button
>
)
}
{
record
.
innerStatus
===
RETURN_INNER_STATUS_UNCOMMITTED
&&
(
<
Popconfirm
title=
"确定要删除吗?"
...
...
@@ -157,17 +168,6 @@ const ReturnPrSubmit: React.FC = () => {
</
Button
>
</
Popconfirm
>
)
}
{
(
record
.
innerStatus
===
RETURN_INNER_STATUS_UNCOMMITTED
||
record
.
outerStatus
===
RETURN_OUTER_STATUS_FAILED
)
&&
(
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/returnApplication/returnPrSubmit/edit?id=${record.returnId}`
)
}
>
编辑
</
Button
>
)
}
</>
),
},
...
...
src/utils/index.tsx
View file @
91bac5ea
...
...
@@ -449,7 +449,9 @@ export function normalizeFiledata(url: any): any {
name
:
fileName
,
status
:
'done'
,
url
,
data
:
url
,
// formily Upload value 需要这个字段
data
:
{
url
,
},
// formily Upload value 需要这个字段
};
};
...
...
@@ -519,7 +521,8 @@ export const findLastIndexFlowState = (data: any[], customKey = 'isExecute'): nu
// 循环数据,找到状态值,一直覆盖
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
!
data
[
i
][
customKey
])
{
index
=
i
-
1
;
index
=
i
;
break
;
}
// 循环到最后如果 index 还是为 0 的话,说明工作流全部跑完了,此时 index 为 data.length - 1
if
(
i
===
data
.
length
-
1
&&
index
===
0
)
{
...
...
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