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
be53efc4
Commit
be53efc4
authored
Dec 17, 2020
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
fe3ea95e
0008a665
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
580 additions
and
122 deletions
+580
-122
logisticsRoutes.ts
config/routes/logisticsRoutes.ts
+2
-23
index.tsx
...vice/exchangeApplication/exchangePrAddLogistics/index.tsx
+2
-2
index.tsx
...erService/exchangeManage/exchangePrAddLogistics/index.tsx
+2
-2
index.tsx
...rService/returnApplication/returnPrAddLogistics/index.tsx
+2
-2
info.tsx
src/pages/balance/settleRules/memberSettle/info.tsx
+14
-9
index.tsx
src/pages/balance/settleRules/memberSettle/schema/index.tsx
+1
-1
columns.tsx
src/pages/handling/assign/add/columns.tsx
+28
-0
formEffects.tsx
src/pages/handling/assign/add/formEffects.tsx
+48
-0
index.tsx
src/pages/handling/assign/add/index.tsx
+0
-0
schema.tsx
src/pages/handling/assign/add/schema.tsx
+117
-33
index.tsx
src/pages/handling/assign/processStock/index.tsx
+3
-3
useRowSelection.tsx
src/pages/handling/common/useRowSelection.tsx
+2
-2
index.tsx
src/pages/handling/components/EnterPrise/index.tsx
+13
-5
schema.tsx
src/pages/handling/components/EnterPrise/schema.tsx
+1
-1
content.tsx
src/pages/handling/components/ProcessDetail/content.tsx
+6
-6
index.tsx
src/pages/handling/components/ProcessDetail/index.tsx
+6
-2
UploadFile.tsx
src/pages/handling/components/UploadFile/UploadFile.tsx
+2
-5
ModalTableOrder.tsx
...ges/logistics/addLogistics/components/ModalTableOrder.tsx
+304
-0
index.tsx
src/pages/logistics/addLogistics/index.tsx
+0
-0
ModalTableOrder.tsx
...ics/logisticsSubmit/detail/components/ModalTableOrder.tsx
+1
-1
goods.tsx
...ges/logistics/logisticsSubmit/detail/components/goods.tsx
+0
-0
index.tsx
src/pages/lxMall/channel/index.tsx
+13
-12
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+6
-2
index.tsx
src/pages/lxMall/index/index.tsx
+4
-4
index.tsx
src/pages/lxMall/shop/index.tsx
+2
-1
index.tsx
src/utils/index.tsx
+1
-6
No files found.
config/routes/logisticsRoutes.ts
View file @
be53efc4
...
...
@@ -127,13 +127,6 @@ const LogisticsRoute: RouterChild = {
path
:
'/memberCenter/logisticsAbility/logisticsSubmit'
,
name
:
'logisticsSubmit'
,
routes
:
[
// 新增
{
path
:
'/memberCenter/logisticsAbility/logisticsSubmit/addLogistics'
,
name
:
'addToOrderSubmit'
,
component
:
'@/pages/logistics/addLogistics'
,
hideInMenu
:
true
},
// 快递单查询
{
path
:
'/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList'
,
...
...
@@ -154,31 +147,17 @@ const LogisticsRoute: RouterChild = {
component
:
'@/pages/logistics/logisticsSubmit/toOrderSumitList'
,
},
// 待提交物流单-新增
// {
// path: '/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add',
// name: 'addToOrderSubmit',
// component: '@/pages/logistics/logisticsSubmit/toOrderSubmitDetail',
// hideInMenu: true
// },
// 待提交物流单-新增
{
path
:
'/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add'
,
name
:
'addToOrderSubmit'
,
component
:
'@/pages/logistics/
logisticsSubmit/detail
'
,
component
:
'@/pages/logistics/
addLogistics
'
,
hideInMenu
:
true
},
// 待提交物流单-编辑
// {
// path: '/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/edit',
// name: 'editToOrderSubmit',
// component: '@/pages/logistics/logisticsSubmit/toOrderSubmitDetail',
// hideInMenu: true
// },
// 待提交物流单-编辑
{
path
:
'/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/edit'
,
name
:
'editToOrderSubmit'
,
component
:
'@/pages/logistics/
logisticsSubmit/detail
'
,
component
:
'@/pages/logistics/
addLogistics
'
,
hideInMenu
:
true
},
]
...
...
src/pages/afterService/exchangeApplication/exchangePrAddLogistics/index.tsx
View file @
be53efc4
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-18 11:22:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
09 17:06:14
* @LastEditTime: 2020-12-
17 14:54:03
* @Description: 待新增换货发货单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -104,7 +104,7 @@ const ExchangePrAddLogistics: React.FC = () => {
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?createType=${4}&
shipmentOrderCode=${record.returnDeliveryNo}&relevanceOrderId=${record.replaceId}&relevanceType=${2
}`
)
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?createType=${4}&
id=${record.replaceId
}`
)
}
>
新增
...
...
src/pages/afterService/exchangeManage/exchangePrAddLogistics/index.tsx
View file @
be53efc4
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-18 11:22:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
09 17:10:48
* @LastEditTime: 2020-12-
17 15:09:13
* @Description: 待新增换货发货单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -104,7 +104,7 @@ const ReturnPrAddLogistics: React.FC = () => {
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?createType=${5}&
shipmentOrderCode=${record.replaceDeliveryNo}&relevanceOrderId=${record.replaceId}&relevanceType=${3
}`
)
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?createType=${5}&
id=${record.replaceId
}`
)
}
>
新增
...
...
src/pages/afterService/returnApplication/returnPrAddLogistics/index.tsx
View file @
be53efc4
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
09 17:14:37
* @LastEditTime: 2020-12-
17 15:13:16
* @Description: 待新增退货发货单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
...
...
@@ -109,7 +109,7 @@ const ReturnPrAddLogistics: React.FC = () => {
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?createType=${6}&
shipmentOrderCode=${record.returnDeliveryNo}&relevanceOrderId=${record.returnId}&relevanceType=${4
}`
)
history
.
push
(
`/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add?createType=${6}&
id=${record.returnId
}`
)
}
>
新增
...
...
src/pages/balance/settleRules/memberSettle/info.tsx
View file @
be53efc4
...
...
@@ -49,7 +49,7 @@ const common_columns: any = [
]
const
MemberSettleAdd
:
React
.
FC
=
()
=>
{
const
[
visible
,
setVisible
]
=
useState
(
false
)
const
[
memberRowSelection
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'
i
d'
});
const
[
memberRowSelection
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'
uniqueI
d'
});
const
[
initialValue
,
setInitialValue
]
=
useState
({});
const
{
id
,
preview
}
=
usePageStatus
();
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
...
...
@@ -77,7 +77,7 @@ const MemberSettleAdd: React.FC = () => {
title
:
'操作'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
onClick=
{
()
=>
handleRemove
(
record
.
member
Id
)
}
>
删除
</
div
>
<
div
onClick=
{
()
=>
handleRemove
(
record
.
unique
Id
)
}
>
删除
</
div
>
)
}
}
...
...
@@ -102,7 +102,11 @@ const MemberSettleAdd: React.FC = () => {
const
fetchMemberData
=
async
(
params
:
any
)
=>
{
//member/manage/lower/page/bynamerole
const
{
data
}
=
await
PublicApi
.
getMemberManageLowerPageBynamerole
(
params
);
return
data
return
{
...
data
,
data
:
data
.
data
.
map
((
v
)
=>
({...
v
,
uniqueId
:
v
.
memberId
+
"_"
+
v
.
roleId
})),
totalCount
:
data
.
totalCount
}
}
// 获取适用会员下拉搜索框
...
...
@@ -155,11 +159,11 @@ const MemberSettleAdd: React.FC = () => {
const
handleRemove
=
(
id
:
number
)
=>
{
const
string
=
'Tabs.memberTab.someLists'
;
const
chooseList
=
formActions
.
getFieldValue
(
string
);
const
res
=
chooseList
.
filter
((
item
)
=>
item
.
member
Id
!==
id
);
const
res
=
chooseList
.
filter
((
item
)
=>
item
.
unique
Id
!==
id
);
formActions
.
setFieldValue
(
string
,
res
);
// 必须设置key
memberRowCtl
.
setSelectRow
(
res
);
memberRowCtl
.
setSelectedRowKeys
(
res
.
map
((
item
)
=>
item
.
member
Id
))
memberRowCtl
.
setSelectedRowKeys
(
res
.
map
((
item
)
=>
item
.
unique
Id
))
}
// 从PAAS平台--规则配置--平台规则配置取已勾选的结算方式决定是否显示结算方式
...
...
@@ -188,10 +192,11 @@ const MemberSettleAdd: React.FC = () => {
otherValues
:
[
res
.
data
.
settlementDays
,
res
.
data
.
settlementDate
],
}
})
formActions
.
setFieldValue
(
'Tabs.memberTab.someLists'
,
res
.
data
.
memberList
);
const
list
=
res
.
data
.
memberList
.
map
((
item
)
=>
({...
item
,
uniqueId
:
item
.
memberId
+
"_"
+
item
.
roleId
}))
formActions
.
setFieldValue
(
'Tabs.memberTab.someLists'
,
list
);
// 必须设置key
memberRowCtl
.
setSelectRow
(
res
.
data
.
memberL
ist
);
memberRowCtl
.
setSelectedRowKeys
(
res
.
data
.
memberList
.
map
((
item
)
=>
item
.
memberId
))
memberRowCtl
.
setSelectRow
(
l
ist
);
memberRowCtl
.
setSelectedRowKeys
(
res
.
data
.
memberList
.
map
((
item
)
=>
item
.
memberId
+
"_"
+
item
.
roleId
))
}
else
{
message
.
error
({
content
:
res
.
message
})
}
...
...
@@ -238,7 +243,7 @@ const MemberSettleAdd: React.FC = () => {
rowSelection=
{
memberRowSelection
}
fetchTableData=
{
params
=>
fetchMemberData
(
params
)
}
tableProps=
{
{
rowKey
:
'
i
d'
,
rowKey
:
'
uniqueI
d'
,
}
}
formilyProps=
{
{
...
...
src/pages/balance/settleRules/memberSettle/schema/index.tsx
View file @
be53efc4
...
...
@@ -129,7 +129,7 @@ export const addSchema = {
},
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
rowKey
:
'
member
Id'
,
rowKey
:
'
unique
Id'
,
prefix
:
"{{tableAddButton}}"
,
columns
:
"{{tableColumns}}"
// columns: "{{tableColumns}}",
...
...
src/pages/handling/assign/add/columns.tsx
0 → 100644
View file @
be53efc4
import
React
from
'react'
;
export
const
productColumns
=
[
// { title: '订单号', dataIndex: 'orderNo' },
{
title
:
'商品ID'
,
dataIndex
:
'commodityId'
},
{
title
:
'商品名称'
,
dataIndex
:
'name'
},
{
title
:
'品类'
,
dataIndex
:
'customerCategoryName'
},
{
title
:
'品牌'
,
dataIndex
:
'brandName'
},
{
title
:
'单位'
,
dataIndex
:
'unitName'
},
// { title: '订单数量', dataIndex: 'orderTotal' },
// { title: '剩余加工数量', dataIndex: 'restTotal' },
{
title
:
'加工数量'
,
dataIndex
:
'processNum'
},
{
title
:
'加工单价'
,
dataIndex
:
'processUnitPrice'
},
{
title
:
'加工费'
,
dataIndex
:
'processTotalPrice'
},
]
export
const
orderColumns
=
[
{
title
:
'订单号'
,
dataIndex
:
'orderNo'
},
{
title
:
'商品ID'
,
dataIndex
:
'commodityId'
},
{
title
:
'商品名称'
,
dataIndex
:
'name'
},
{
title
:
'品类'
,
dataIndex
:
'customerCategoryName'
},
{
title
:
'品牌'
,
dataIndex
:
'brandName'
},
{
title
:
'单位'
,
dataIndex
:
'unitName'
},
{
title
:
'订单数量'
,
dataIndex
:
'orderTotal'
},
{
title
:
'剩余加工数量'
,
dataIndex
:
'restTotal'
},
{
title
:
'加工数量'
,
dataIndex
:
'processNum'
},
{
title
:
'加工单价'
,
dataIndex
:
'processUnitPrice'
},
{
title
:
'加工费'
,
dataIndex
:
'processTotalPrice'
},
]
src/pages/handling/assign/add/formEffects.tsx
View file @
be53efc4
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
onFieldValueChange$
,
onFieldMount$
}
=
FormEffectHooks
/**
* formEffect, 表单联动操作放这里操作,包括表单的生命周期等操作
*/
export
const
formEffects
=
()
=>
{
const
formActions
=
createFormActions
()
// 当物流为 物流时,那么填充
onFieldMount$
(
'receivefullAddress'
).
subscribe
((
state
)
=>
{
PublicApi
.
getLogisticsReceiverAddressPage
({
current
:
'1'
,
pageSize
:
'99'
})
.
then
((
res
)
=>
{
let
options
=
[];
if
(
res
.
code
===
1000
)
{
options
=
res
.
data
.
data
.
map
((
item
)
=>
{
return
{
label
:
`
${
item
.
fullAddress
}
/
${
item
.
receiverName
}
/
${
item
.
phone
}
`
,
value
:
item
.
id
}}
)
}
formActions
.
setFieldState
(
"receivefullAddress"
,
(
state
)
=>
{
state
.
props
[
"x-component-props"
][
"options"
]
=
options
;
})
})
})
/**
* 当改变物流地址的时候,那么修改隐藏的3个字段,
* 1. receiveAddress 详细的物流地址
* 2. receiveUserName 收货人
* 3. receiveUserTel 收货人电话
*/
onFieldValueChange$
(
'receivefullAddress'
).
subscribe
((
state
)
=>
{
if
(
state
.
visible
)
{
const
options
=
state
.
props
[
"x-component-props"
][
"options"
];
const
target
=
options
.
filter
((
item
)
=>
item
.
value
==
state
.
value
)[
0
];
if
(
target
)
{
const
[
receiveAddress
,
receiveUserName
,
receiveUserTel
]
=
target
.
label
.
split
(
"/"
);
formActions
.
setFieldValue
(
"receiveAddress"
,
receiveAddress
.
trim
());
formActions
.
setFieldValue
(
"receiveUserName"
,
receiveUserName
.
trim
());
formActions
.
setFieldValue
(
"receiveUserTel"
,
receiveUserTel
.
trim
());
formActions
.
setFieldValue
(
"receiverAddressId"
,
state
.
value
)
}
}
})
}
src/pages/handling/assign/add/index.tsx
View file @
be53efc4
This diff is collapsed.
Click to expand it.
src/pages/handling/assign/add/schema.tsx
View file @
be53efc4
/*
* @Author: your name
* @Date: 2020-10-12 13:37:06
* @LastEditTime: 2020-10-16 16:55:22
* @Description: 新建生产通知单 schema
*/
import
React
from
'react'
;
import
{
Space
,
Menu
,
Dropdown
}
from
'antd'
;
import
{
DownOutlined
}
from
'@ant-design/icons'
;
import
ProcessDetail
from
'../../components/ProcessDetail'
import
{
innerWorkFlowRecordColumn
,
outerWorkflowRecordsColumn
}
from
'../detail/columns'
;
// 流转记录
export
const
historyColumn
=
[
...
...
@@ -90,7 +80,30 @@ const basicTab = {
value
:
2
}
],
default
:
1
"x-linkages"
:
[
{
"type"
:
"value:state"
,
"target"
:
"*(productList, productSource)"
,
"condition"
:
"{{ $self.value === 1 }}"
,
state
:
{
display
:
false
,
},
otherwise
:{
//条件不满足时控制bbb字段的编辑状态
display
:
true
}
},
{
"type"
:
"value:state"
,
"target"
:
"*(orderList, orderSource)"
,
"condition"
:
"{{ $self.value === 2 }}"
,
state
:
{
display
:
false
,
},
otherwise
:{
//条件不满足时控制bbb字段的编辑状态
display
:
true
}
},
]
},
deliveryDate
:
{
...
...
@@ -157,17 +170,19 @@ const basicTab = {
type
:
'string'
,
display
:
false
},
doc
No
:
{
notice
No
:
{
type
:
'string'
,
title
:
'通知单号'
,
'x-component'
:
'Text'
editable
:
false
,
// 'x-component': 'Text'
},
doc
Time
:
{
create
Time
:
{
type
:
'string'
,
title
:
'单据时间'
,
'x-component'
:
'Text'
editable
:
false
// 'x-component': 'I'
},
s
tatus
:
{
outerS
tatus
:
{
type
:
'string'
,
title
:
'外部状态'
,
'x-component'
:
'Children'
,
...
...
@@ -175,7 +190,7 @@ const basicTab = {
children
:
'待提交通知单'
}
},
status2
:
{
innerStatus
:
{
type
:
'string'
,
title
:
'内部状态'
,
'x-component'
:
'Children'
,
...
...
@@ -209,14 +224,32 @@ const detailTab = {
labelAlign
:
'left'
},
properties
:
{
selectedSource
:
{
orderSource
:
{
type
:
'string'
,
title
:
'通知单来源'
,
'x-component'
:
'
Children
'
,
'x-component'
:
'
Radio
'
,
'x-component-props'
:
{
children
:
'{{source}}'
,
options
:
[{
label
:
'加工订单'
,
value
:
1
,
}],
defaultValue
:
1
,
},
},
someLists
:
{
productSource
:
{
type
:
'string'
,
title
:
'通知单来源'
,
'x-component'
:
'Radio'
,
'x-component-props'
:
{
options
:
[{
label
:
'加工商品'
,
value
:
2
,
}],
defaultValue
:
2
,
},
},
// 加工商品
productList
:
{
type
:
'array:number'
,
'x-mega-props'
:
{
wrapperCol
:
24
,
...
...
@@ -224,8 +257,8 @@ const detailTab = {
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
rowKey
:
(
record
)
=>
record
.
id
+
"_"
+
record
.
fullId
,
prefix
:
"{{tableAddButton}}"
,
columns
:
"{{
noticesDetail
Column}}"
prefix
:
"{{table
Product
AddButton}}"
,
columns
:
"{{
renderProduct
Column}}"
// columns: "{{tableColumns}}",
},
'x-rules'
:
[
...
...
@@ -233,8 +266,29 @@ const detailTab = {
required
:
true
,
message
:
'请选择要加工的商品'
}
]
],
},
// 订单
orderList
:
{
type
:
'array:number'
,
'x-mega-props'
:
{
wrapperCol
:
24
,
},
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
rowKey
:
(
record
)
=>
record
.
id
+
"_"
+
record
.
fullId
,
prefix
:
"{{tableOrderAddButton}}"
,
columns
:
"{{renderOrderColumn}}"
// columns: "{{tableColumns}}",
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择要加工的商品'
}
]
},
}
}
}
...
...
@@ -380,19 +434,49 @@ const historyRecord = {
properties
:
{
controller
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
"x-component"
:
'aaa'
,
"x-component-props"
:
{
options
:
[
{
label
:
'外部流转'
,
value
:
1
},
{
label
:
'内部流转'
,
value
:
2
}
],
optionType
:
'button'
,
},
'x-linkages'
:
[
{
type
:
'value:visible'
,
target
:
'outerWorkFlow'
,
condition
:
'{{$value === 1}}'
},
{
type
:
'value:visible'
,
target
:
'innerWorkFlow'
,
condition
:
'{{$value === 2}}'
},
],
},
outerWorkFlow
:
{
type
:
'array:number'
,
'x-mega-props'
:
{
wrapperCol
:
24
,
},
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
c
hildren
:
'{{RadioBtnGroup}}'
c
olumns
:
outerWorkflowRecordsColumn
}
},
historyTable
:
{
type
:
'object'
,
'x-component'
:
'Table'
,
innerWorkFlow
:
{
type
:
'array:number'
,
'x-mega-props'
:
{
wrapperCol
:
24
,
},
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
columns
:
historyColumn
}
rowKey
:
(
record
)
=>
record
.
id
,
columns
:
innerWorkFlowRecordColumn
// columns: "{{tableColumns}}",
},
}
}
}
...
...
src/pages/handling/assign/processStock/index.tsx
View file @
be53efc4
...
...
@@ -23,12 +23,12 @@ import {
ASSIGN_PENDING_RECEIVE
,
PENDING_RECEIPT_PATH
,
}
from
'../../common'
;
import
{
action
}
from
'mobx'
;
const
formActions
=
createFormActions
();
const
ADD_PROCESS_PATH
=
'/memberCenter/tranactionAbility/stockSellStorage/bills/add'
;
const
ADD_DELIVERY_PATH
=
'/memberCenter/tranactionAbility/stockSellStorage/bills/add'
;
const
ADD_LOGISTICS_PATH
=
'/memberCenter/logisticsAbility/logisticsSubmit/toOrderSumitList/add'
;
const
DETAIL_LOGISTICS_PATH
=
'/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail'
const
SERVICE_MAPS
=
{
...
...
@@ -174,8 +174,8 @@ const processStock: React.FC<{}> = () => {
<
a
onClick=
{
()
=>
handleVisible
(
record
.
id
)
}
>
审核
</
a
>
</
Popconfirm
>
),
[
OuterAndInnerStatus
.
pending_add_logistics
]:
<
Link
to
=
{
`
${
ADD_LOGISTICS_PATH
}
?createType=3&
shipmentOrderId=
${
record
.
deliveryId
}
&shipmentOrderCode=
${
record
.
deliveryNo
}
&relevanceOrderI
d=
${
record
.
id
}
`
}
>
新增物流单
<
/Link>
,
[
OuterAndInnerStatus
.
pending_confirm_logistics
]:
<
Link
to
=
{
`
${
ADD_LOGISTICS_PATH
}
?createType=3&shipmentOrderId=
${
record
.
deliveryId
}
&shipmentOrderCode=
${
record
.
deliveryNo
}
&relevanceOrderId=
${
record
.
id
}
&isPreview=1
`
}
>
查看物流单
<
/Link>
,
[
OuterAndInnerStatus
.
pending_add_logistics
]:
<
Link
to
=
{
`
${
ADD_LOGISTICS_PATH
}
?createType=3&
i
d=
${
record
.
id
}
`
}
>
新增物流单
<
/Link>
,
[
OuterAndInnerStatus
.
pending_confirm_logistics
]:
<
Link
to
=
{
`
${
DETAIL_LOGISTICS_PATH
}
?id=
${
record
.
id
}
`
}
>
查看物流单
<
/Link>
,
[
OuterAndInnerStatus
.
pending_confirm_deliver
]:
<
Link
to
=
{
`
${
PENDING_DELIVERD_PATH
}
/detail?id=
${
record
.
id
}
`
}
>
发货
<
/Link>
,
[
OuterAndInnerStatus
.
pending_add_process_in_warehouse
]:
(
<
Link
...
...
src/pages/handling/common/useRowSelection.tsx
View file @
be53efc4
...
...
@@ -11,9 +11,9 @@ export const useRowSelection = (options) => {
type
:
type
,
selectedRowKeys
:
selectedKeys
,
onSelect
:
async
(
record
:
any
,
selected
:
boolean
,
selectedRows
:
any
[],
nativeEvent
)
=>
{
const
tempKey
=
record
[
primaryKey
];
//
const tempKey = record[primaryKey];
if
(
type
===
'radio'
)
{
setSelectedKeys
(
record
[
tempKey
]);
setSelectedKeys
(
[
record
[
primaryKey
]
]);
setSelectedRows
(
selectedRows
);
return
;
}
...
...
src/pages/handling/components/EnterPrise/index.tsx
View file @
be53efc4
...
...
@@ -9,15 +9,23 @@ import { schema } from './schema';
const
actions
=
createAsyncFormActions
();
const
{
onFieldInit$
,
onFieldMount$
}
=
FormEffectHooks
const
EnterPrise
=
({
visible
,
cancel
,
...
restProps
})
=>
{
const
[
selectRow
,
memberRowCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
,
type
:
'radio'
});
const
EnterPrise
=
({
visible
,
cancel
,
rowSelection
,
...
restProps
})
=>
{
//
const [selectRow, memberRowCtl] = useRowSelectionTable({ customKey: 'id', type: 'radio'});
const
fetchData
=
useCallback
(
async
(
params
:
any
)
=>
{
let
res
=
await
PublicApi
.
getMemberManageLowerPageBynamerole
(
params
);
return
res
;
console
.
log
(
res
);
return
{
...
res
,
code
:
res
.
code
,
data
:
{
data
:
res
.
data
.
data
.
map
((
v
)
=>
({...
v
,
uniqueId
:
v
.
memberId
+
"_"
+
v
.
roleId
})),
total
:
res
.
data
.
code
}
};
},
[]);
const
onOk
=
()
=>
{
restProps
.
onOk
(
memberRowCtl
)
restProps
.
onOk
()
cancel
();
}
...
...
@@ -51,7 +59,7 @@ const EnterPrise = ({visible, cancel, ...restProps}) => {
schema=
{
schema
}
actions=
{
actions
}
effects=
{
effects
}
expressionScope=
{
{
rowSelection
:
selectRow
}
}
expressionScope=
{
{
rowSelection
:
rowSelection
}
}
></
SearchForm
>
:
null
}
...
...
src/pages/handling/components/EnterPrise/schema.tsx
View file @
be53efc4
...
...
@@ -132,7 +132,7 @@ export const schema = {
"x-component"
:
"Table"
,
"x-component-props"
:
{
"columns"
:
columns
,
"rowKey"
:
"
i
d"
,
"rowKey"
:
"
uniqueI
d"
,
"pagination"
:
false
,
"rowSelection"
:
"{{rowSelection}}"
}
...
...
src/pages/handling/components/ProcessDetail/content.tsx
View file @
be53efc4
...
...
@@ -110,6 +110,7 @@ const Content: React.FC<Iprops> = React.forwardRef((props, conftentRef) => {
const
handleFormSubmit
=
(
value
)
=>
{
props
.
formSubmit
(
value
);
}
return
(
<
div
className=
{
styles
.
container
}
>
<
div
className=
{
styles
.
menu
}
>
...
...
@@ -165,20 +166,19 @@ const Content: React.FC<Iprops> = React.forwardRef((props, conftentRef) => {
<
div
className=
{
styles
.
header
}
>
{
"附件"
}
</
div
>
<
div
className=
{
styles
.
info
}
>
{
files
.
length
===
0
&&
props
.
type
!=
'edit'
files
.
length
===
0
?
<
p
>
无
</
p
>
:
null
}
{
files
.
map
((
item
,
key
)
=>
{
:
props
.
type
!=
'edit'
?
files
.
map
((
item
,
key
)
=>
{
return
(
<
FileList
name=
{
item
.
name
}
url=
{
item
.
url
}
key=
{
key
}
/>
)
})
:
null
}
{
props
.
type
==
'edit'
?
<
UploadFile
onChange=
{
props
.
fileOnChange
}
fileMaxSize=
{
20
*
1024
}
/>
?
<
UploadFile
fileList=
{
files
}
onChange=
{
props
.
fileOnChange
}
fileMaxSize=
{
20
*
1024
}
/>
:
null
}
</
div
>
...
...
src/pages/handling/components/ProcessDetail/index.tsx
View file @
be53efc4
...
...
@@ -17,6 +17,7 @@ interface Iprops {
productName
:
string
,
unitName
:
string
,
uniqueID
:
string
,
files
:
any
[],
}
interface
IfileProps
{
...
...
@@ -28,7 +29,7 @@ const ProcessDetail: React.FC<Iprops> = (props) => {
const
{
skuId
,
type
,
productName
,
...
rest
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
info
,
setInfo
]
=
useState
<
any
>
({})
const
[
files
,
setFiles
]
=
useState
<
IfileProps
[]
>
(
[]
)
const
[
files
,
setFiles
]
=
useState
<
IfileProps
[]
>
(
()
=>
props
.
files
)
const
contentRef
=
useRef
(
null
)
const
onClose
=
()
=>
{
...
...
@@ -68,8 +69,11 @@ const ProcessDetail: React.FC<Iprops> = (props) => {
}
}
useEffect
(()
=>
{
setFiles
(
props
.
files
);
},
[
props
.
files
])
const
formSubmit
=
(
values
)
=>
{
console
.
log
(
values
);
!!
props
.
submit
&&
props
.
submit
({
files
:
files
,
uniqueID
:
props
.
uniqueID
,
...
...
src/pages/handling/components/UploadFile/UploadFile.tsx
View file @
be53efc4
...
...
@@ -4,7 +4,6 @@ import { Upload, Button, message } from 'antd';
import
{
UploadOutlined
}
from
'@ant-design/icons'
import
{
UPLOAD_TYPE
}
from
'@/constants'
import
FileListItem
from
'./FileList'
;
import
url
from
'*.svg'
;
const
UploadFile
=
(
props
)
=>
{
const
{
fileList
=
[],
onChange
,
fileMaxSize
=
20
}
=
props
...
...
@@ -51,8 +50,7 @@ const UploadFile = (props) => {
};
const
removeFile
=
(
key
)
=>
{
const
res
=
fileList
.
filter
((
item
)
=>
item
!=
key
);
console
.
log
(
res
);
const
res
=
fileList
.
filter
((
item
)
=>
item
.
name
!=
key
);
onChange
(
res
);
}
...
...
@@ -63,7 +61,7 @@ const UploadFile = (props) => {
fileList
.
map
((
item
,
key
)
=>
{
return
(
<
FileListItem
key=
{
item
}
key=
{
key
}
name=
{
item
.
name
}
url=
{
item
.
url
}
removeFile=
{
removeFile
}
...
...
@@ -77,7 +75,6 @@ const UploadFile = (props) => {
</
Upload
>
<
div
className=
{
styles
.
tips
}
>
一次上传一个文件,每个附件大小不能超过
{
fileMaxSize
/
1024
}
M
</
div
>
</
div
>
)
}
...
...
src/pages/logistics/addLogistics/components/ModalTableOrder.tsx
0 → 100644
View file @
be53efc4
import
React
,
{
ReactText
,
useRef
,
useEffect
,
useLayoutEffect
,
useState
}
from
'react'
;
import
{
StandardTable
}
from
'god'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
NestTable
from
'@/components/NestTable'
;
import
{
IStandardTableProps
}
from
'god/dist/src/standard-table'
;
import
{
Row
,
Col
,
Modal
,
Form
,
Radio
}
from
'antd'
;
import
Search
from
'@/components//NiceForm/components/Search'
;
import
SearchSelect
from
'@/components//NiceForm/components/SearchSelect'
;
import
Submit
from
'@/components//NiceForm/components/Submit'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
DateSelect
from
'@/components//NiceForm/components/DateSelect'
;
import
{
PublicApi
}
from
'@/services/api'
;
export
interface
ModalTableProps
extends
IStandardTableProps
<
any
>
{
width
?:
number
,
confirm
?:
Function
,
cancel
?(),
visible
?:
boolean
,
resetModal
?:
object
,
useNestTable
?:
boolean
,
// 是否使用嵌套表格
nestColumns
?:
any
[],
nestTableProps
?:
any
,
// fix: 新增参数, 为true时每次开启弹窗都会重新reload接口
forceRender
?:
boolean
,
invoicesNo
?:
string
,
// 对应订单号/售后单号
relevanceType
?:
number
,
//对应单据类型
}
export
const
logisticsDeliverySearchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
invoicesNo
:
{
type
:
'string'
,
'x-component'
:
'ModalSearch'
,
'x-component-props'
:
{
placeholder
:
'单据号'
,
align
:
'flex-left'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
style
:
{
marginRight
:
0
}
},
colStyle
:
{
marginTop
:
20
,
},
},
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'会员名称'
,
style
:
{
width
:
160
}
}
},
invoicesAbstract
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'单据摘要'
,
style
:
{
width
:
160
}
}
},
"[startTransactionTime,endTransactionTime]"
:
{
type
:
'string'
,
"x-component"
:
"dateSelect"
,
"x-component-props"
:
{
placeholder
:
'单据时间(全部)'
,
}
},
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
span
:
1
},
"x-component-props"
:
{
children
:
'查询'
}
}
}
}
}
}
export
const
otherSearchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
applyNo
:
{
type
:
'string'
,
'x-component'
:
'ModalSearch'
,
'x-component-props'
:
{
placeholder
:
'申请单号'
,
align
:
'flex-left'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
style
:
{
marginRight
:
0
}
},
colStyle
:
{
marginTop
:
20
,
},
},
properties
:
{
memberName
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'会员名称'
,
style
:
{
width
:
160
}
}
},
applyAbstract
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'单据摘要'
,
style
:
{
width
:
160
}
}
},
"[startTime,endTime]"
:
{
type
:
'string'
,
"x-component"
:
"dateSelect"
,
"x-component-props"
:
{
placeholder
:
'单据时间(全部)'
,
}
},
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
span
:
1
},
"x-component-props"
:
{
children
:
'查询'
}
}
}
}
}
}
const
ModalTableOrder
:
React
.
FC
<
ModalTableProps
>
=
(
props
)
=>
{
const
{
width
=
704
,
confirm
,
cancel
,
visible
,
currentRef
,
resetModal
,
forceRender
,
useNestTable
=
false
,
nestColumns
,
nestTableProps
,
invoicesNo
,
relevanceType
,
...
resetTable
}
=
props
const
selfRef
=
currentRef
||
useRef
<
any
>
({})
useEffect
(()
=>
{
if
(
visible
&&
forceRender
)
{
// 重新开启时需reload接口
// fix: 去掉自动reload接口, 防止重复请求
// fix: 新增forceRender接口, 用于控制弹窗是否需要reload
selfRef
.
current
.
reload
&&
selfRef
.
current
.
reload
()
}
else
{
selfRef
.
current
.
resetField
&&
selfRef
.
current
.
resetField
({
validate
:
false
})
}
},
[
visible
])
const
[
form
]
=
Form
.
useForm
();
const
[
type
,
setType
]
=
useState
<
number
>
(
1
);
const
[
modalTitle
,
setmodalTitle
]
=
useState
<
string
>
(
'订单'
);
useEffect
(()
=>
{
console
.
log
(
relevanceType
)
setType
(
relevanceType
)
},
[
visible
])
useEffect
(()
=>
{
form
.
setFieldsValue
({
radio
:
type
})
},
[
type
])
const
fetchData
=
(
parmas
?:
any
)
=>
{
return
new
Promise
(
resolve
=>
{
switch
(
type
)
{
case
1
:
PublicApi
.
getOrderLogisticsOrderList
({
...
parmas
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
res
.
data
.
data
.
forEach
((
item
:
any
)
=>
{
item
.
applyNo
=
item
.
orderNo
item
.
applyAbstract
=
item
.
orderThe
item
.
applyTime
=
item
.
createTime
})
resolve
(
res
.
data
)
}
})
break
;
case
2
:
PublicApi
.
getAsReplaceGoodsPageToBeAddReturnByLogistics
({
...
parmas
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
res
.
data
.
data
.
forEach
((
item
:
any
)
=>
{
item
.
id
=
item
.
applyId
})
resolve
(
res
.
data
)
}
})
break
;
case
3
:
PublicApi
.
getAsReplaceGoodsPageToBeAddReplaceByLogistics
({
...
parmas
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
res
.
data
.
data
.
forEach
((
item
:
any
)
=>
{
item
.
id
=
item
.
applyId
})
resolve
(
res
.
data
)
}
})
break
;
case
4
:
PublicApi
.
getAsReturnGoodsPageByLogistics
({
...
parmas
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
res
.
data
.
data
.
forEach
((
item
:
any
)
=>
{
item
.
id
=
item
.
applyId
})
resolve
(
res
.
data
)
}
})
break
;
}
})
}
return
(
<
Modal
width=
{
width
}
title=
{
modalTitle
}
onOk=
{
()
=>
confirm
(
type
)
}
onCancel=
{
cancel
}
visible=
{
visible
}
{
...
resetModal
}
maskClosable=
{
false
}
>
{
useNestTable
?
(
<
NestTable
NestColumns=
{
nestColumns
}
className=
"common_tb"
rowClassName=
{
(
_
,
index
)
=>
(
index
%
2
)
===
0
&&
"tb_bg"
}
{
...
nestTableProps
}
/>
)
:
(
<
StandardTable
tableType=
'small'
currentRef=
{
selfRef
}
fetchTableData=
{
(
params
)
=>
fetchData
(
params
)
}
formRender=
{
(
child
,
ps
)
=>
<
Row
justify=
'space-between'
style=
{
{
marginBottom
:
16
}
}
>
<
Col
span=
{
18
}
style=
{
{
zIndex
:
99
}
}
>
<
Form
form=
{
form
}
>
<
Form
.
Item
name=
'radio'
label=
'单据选择'
>
<
Radio
.
Group
onChange=
{
(
e
)
=>
{
setType
(
e
.
target
.
value
);
selfRef
.
current
.
reload
();
}
}
>
<
Radio
value=
{
1
}
>
订单
</
Radio
>
<
Radio
value=
{
2
}
>
换货申请单(退货发货)
</
Radio
>
<
Radio
value=
{
3
}
>
换货申请单(换货发货)
</
Radio
>
<
Radio
value=
{
4
}
>
退货申请单
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
>
</
Col
>
<
Col
style=
{
{
marginTop
:
4
}
}
>
{
ps
}
</
Col
>
<
Col
span=
{
18
}
style=
{
{
zIndex
:
99
}
}
>
{
child
}
</
Col
>
</
Row
>
}
formilyProps=
{
{
ctx
:
{
schema
:
type
===
1
?
logisticsDeliverySearchSchema
:
otherSearchSchema
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
DateSelect
},
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
type
===
1
?
'invoicesNo'
:
'applyNo'
,
FORM_FILTER_PATH
,
);
}
}
}
}
{
...
resetTable
}
/>
)
}
</
Modal
>
)
}
ModalTableOrder
.
defaultProps
=
{}
export
default
ModalTableOrder
src/pages/logistics/addLogistics/index.tsx
View file @
be53efc4
This diff is collapsed.
Click to expand it.
src/pages/logistics/logisticsSubmit/detail/components/ModalTableOrder.tsx
View file @
be53efc4
...
...
@@ -156,7 +156,7 @@ export const otherSearchSchema: ISchema = {
}
}
const
ModalTableOrder
:
React
.
FC
<
ModalTableProps
>
=
(
props
)
=>
{
const
{
width
=
704
,
confirm
,
cancel
,
visible
,
currentRef
,
resetModal
,
forceRender
,
useNestTable
=
false
,
nestColumns
,
nestTableProps
,
invoicesNo
,
relevanceType
,
...
resetTable
}
=
props
const
{
width
=
704
,
confirm
,
cancel
,
visible
,
currentRef
,
resetModal
,
forceRender
,
useNestTable
=
false
,
nestColumns
,
nestTableProps
,
invoicesNo
,
relevanceType
=
1
,
...
resetTable
}
=
props
const
selfRef
=
currentRef
||
useRef
<
any
>
({})
useEffect
(()
=>
{
if
(
visible
&&
forceRender
)
{
...
...
src/pages/logistics/logisticsSubmit/detail/components/goods.tsx
View file @
be53efc4
src/pages/lxMall/channel/index.tsx
View file @
be53efc4
...
...
@@ -53,12 +53,12 @@ const ChannelIndex: React.FC<ChannelIndexPropsType> = (props) => {
},
[
shopInfo
])
const
findFirstAdvertsByType
=
(
templateId
)
=>
{
let
params
=
{
const
params
:
any
=
{
templateId
,
type
:
1
,
memberId
}
//@ts-ignore
PublicApi
.
getTemplateChannelFindAdvertsByType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setFirstAdvertList
(
res
.
data
)
...
...
@@ -67,12 +67,12 @@ const ChannelIndex: React.FC<ChannelIndexPropsType> = (props) => {
}
const
findSecondAdvertsByType
=
(
templateId
)
=>
{
let
params
=
{
const
params
:
any
=
{
templateId
,
type
:
2
,
memberId
}
//@ts-ignore
PublicApi
.
getTemplateChannelFindAdvertsByType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setSecondAdvertList
(
res
.
data
)
...
...
@@ -85,9 +85,11 @@ const ChannelIndex: React.FC<ChannelIndexPropsType> = (props) => {
*/
const
fetchFirstCategory
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
const
params
:
any
=
{
memberId
}
//@ts-ignore
PublicApi
.
getTemplateChannelFindAllFirstCategory
({
memberId
}).
then
(
res
=>
{
PublicApi
.
getTemplateChannelFindAllFirstCategory
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setCategoryList
(
res
.
data
)
resolve
(
res
.
data
)
...
...
@@ -101,13 +103,12 @@ const ChannelIndex: React.FC<ChannelIndexPropsType> = (props) => {
*/
const
fetchCategoryById
=
(
categoryId
,
templateId
)
=>
{
return
new
Promise
((
resolve
)
=>
{
let
param
=
{
const
param
:
any
=
{
templateId
:
templateId
,
categoryId
,
memberId
}
// @ts-ignore
PublicApi
.
getTemplateChannelFindFirstCategoryDetail
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
...
...
@@ -117,11 +118,11 @@ const ChannelIndex: React.FC<ChannelIndexPropsType> = (props) => {
}
const
getCategoryComponents
=
async
(
templateId
)
=>
{
le
t
result
=
[]
le
t
firstCategory
:
any
=
await
fetchFirstCategory
()
cons
t
result
=
[]
cons
t
firstCategory
:
any
=
await
fetchFirstCategory
()
for
(
le
t
item
of
firstCategory
)
{
le
t
categoryDetail
:
any
=
await
fetchCategoryById
(
item
.
id
,
templateId
)
for
(
cons
t
item
of
firstCategory
)
{
cons
t
categoryDetail
:
any
=
await
fetchCategoryById
(
item
.
id
,
templateId
)
result
.
push
(
<
ShopFloorLine
linkUrl=
{
`${GlobalConfig.channelRootRoute}/commodity?channelId=${shopUrlParam}&categoryId=${item.id}&categoryName=${btoa(encodeURIComponent(item.name))}`
}
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
be53efc4
...
...
@@ -709,15 +709,19 @@ const CommodityDetail = (props) => {
}
}
}
if
(
unitPricePicList
.
leng
ht
>
0
)
{
if
(
unitPricePicList
.
leng
th
>
0
)
{
setCurrentPriceRange
(
sortUnitPrice
(
unitPricePicList
[
0
].
unitPrice
))
initStockCount
(
unitPricePicList
)
}
// setStockCount(unitPricePicList[0].stockCount)
setCommodityImgList
(
tempImgList
)
setAttributeList
(
tempAttrList
)
}
/**
* 初始化库存信息 每个规格库存总和
* @param unitPricePicList
*/
const
initStockCount
=
(
unitPricePicList
:
any
)
=>
{
if
(
!
unitPricePicList
)
{
return
...
...
src/pages/lxMall/index/index.tsx
View file @
be53efc4
...
...
@@ -40,7 +40,7 @@ const MallIndex: React.FC<MallIndexPropsType> = (props) => {
templateId
:
mallTemplateId
,
type
:
1
}
PublicApi
.
getTemplate
Platform
FindAdvertsByType
(
params
).
then
(
res
=>
{
PublicApi
.
getTemplate
AdornWebEnterprise
FindAdvertsByType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setFirstAdvertList
(
res
.
data
)
}
...
...
@@ -52,7 +52,7 @@ const MallIndex: React.FC<MallIndexPropsType> = (props) => {
templateId
:
mallTemplateId
,
type
:
2
}
PublicApi
.
getTemplate
Platform
FindAdvertsByType
(
params
).
then
(
res
=>
{
PublicApi
.
getTemplate
AdornWebEnterprise
FindAdvertsByType
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setSecondAdvertList
(
res
.
data
)
}
...
...
@@ -64,7 +64,7 @@ const MallIndex: React.FC<MallIndexPropsType> = (props) => {
*/
const
fetchFirstCategory
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
PublicApi
.
getTemplate
Platform
FindAllFirstCategory
().
then
(
res
=>
{
PublicApi
.
getTemplate
WebCategoryWeb
FindAllFirstCategory
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setCategoryList
(
res
.
data
)
resolve
(
res
.
data
)
...
...
@@ -83,7 +83,7 @@ const MallIndex: React.FC<MallIndexPropsType> = (props) => {
categoryId
}
PublicApi
.
getTemplate
PlatformFindFirstCategoryDetail
(
param
).
then
(
res
=>
{
PublicApi
.
getTemplate
AdornWebEnterpriseCategoryAdorn
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
...
...
src/pages/lxMall/shop/index.tsx
View file @
be53efc4
...
...
@@ -58,7 +58,8 @@ const ShopIndex: React.FC<ChannelIndexPropsType> = (props) => {
const
params
:
any
=
{
templateId
:
shopInfo
.
templateId
,
type
:
2
,
memberId
memberId
,
roleId
:
shopInfo
.
roleId
}
PublicApi
.
getTemplateShopFindAdvertsByType
(
params
).
then
(
res
=>
{
...
...
src/utils/index.tsx
View file @
be53efc4
...
...
@@ -520,13 +520,8 @@ export const findLastIndexFlowState = (data: any[], customKey = 'isExecute'): nu
}
// 循环数据,找到状态值,一直覆盖
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
!
data
[
i
][
customKey
])
{
if
(
data
[
i
][
customKey
])
{
index
=
i
;
break
;
}
// 循环到最后如果 index 还是为 0 的话,说明工作流全部跑完了,此时 index 为 data.length - 1
if
(
i
===
data
.
length
-
1
&&
index
===
0
)
{
index
=
data
.
length
-
1
;
}
}
return
index
;
...
...
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