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
shenshaokai
jinfa-platform
Commits
15792e00
Commit
15792e00
authored
Aug 30, 2021
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
f8145db1
f96d8657
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
809 additions
and
192 deletions
+809
-192
index.tsx
...ges/afterService/components/ExchangeDeliverInfo/index.tsx
+3
-18
index.tsx
...es/afterService/components/ExchangeReceivedInfo/index.tsx
+3
-18
index.tsx
...ice/components/RefundModal/UploadPaymentVoucher/index.tsx
+6
-7
index.tsx
src/pages/afterService/components/ReturnAnalysis/index.tsx
+1
-16
index.tsx
src/pages/afterService/components/ReturnDetailInfo/index.tsx
+8
-3
adjustRepository.tsx
src/pages/repositories/adjustRepository.tsx
+13
-6
batchPositionSetting.tsx
src/pages/repositories/components/batchPositionSetting.tsx
+75
-63
positionSetting.tsx
src/pages/repositories/components/positionSetting.tsx
+14
-0
index.tsx
src/pages/repositories/index.tsx
+16
-1
index.tsx
src/pages/repositories/schema/index.tsx
+39
-3
index.tsx
...ction/marketingAbility/paltformSign/readySubmit/index.tsx
+1
-0
add.tsx
.../marketingAbility/paltformSign/readySubmitExamine/add.tsx
+4
-2
index.tsx
...arketingAbility/paltformSign/readySubmitExamine/index.tsx
+9
-13
index.tsx
...ransaction/marketingAbility/paltformSign/search/index.tsx
+1
-0
add.tsx
...arketingAbility/selfManagement/readySubmitExamine/add.tsx
+54
-3
index.less
...eadySubmitExamine/components/partakeUserLayout/index.less
+79
-0
index.tsx
...readySubmitExamine/components/partakeUserLayout/index.tsx
+132
-0
index.less
...ment/readySubmitExamine/components/rulesLayout/index.less
+33
-0
index.tsx
...ement/readySubmitExamine/components/rulesLayout/index.tsx
+0
-0
index.less
...ement/readySubmitExamine/components/shopLayout/index.less
+24
-0
index.tsx
...gement/readySubmitExamine/components/shopLayout/index.tsx
+97
-0
index.ts
...lity/selfManagement/readySubmitExamine/constants/index.ts
+169
-0
index.ts
...s/transaction/purchaseOrder/orderCollectB2b/apis/index.ts
+1
-1
index.tsx
...nsaction/purchaseOrder/orderCollectB2b/constant/index.tsx
+16
-23
index.tsx
...pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
+6
-10
usePaymentInfo.tsx
...on/purchaseOrder/orderCollectB2b/model/usePaymentInfo.tsx
+2
-2
index.ts
...transaction/purchaseOrder/orderCollectB2b/schema/index.ts
+1
-1
useReadyAddOrder.tsx
...on/purchaseOrder/readyAddOrder/model/useReadyAddOrder.tsx
+2
-2
No files found.
src/pages/afterService/components/ExchangeDeliverInfo/index.tsx
View file @
15792e00
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-2
0 15:33:06
* @LastEditTime: 2021-08-2
7 09:44:33
* @Description: 换货发货统计、换货发货明细
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -122,32 +122,27 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
},
{
title
:
'换货数量'
,
dataIndex
:
'replaceCount'
,
align
:
'center'
,
},
{
title
:
'已换货发货/未换货发货'
,
...
...
@@ -171,12 +166,10 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
{
title
:
'已换货收货'
,
dataIndex
:
'receiveCount'
,
align
:
'center'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
},
];
...
...
@@ -188,47 +181,39 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
},
{
title
:
'换货数量'
,
dataIndex
:
'count'
,
align
:
'center'
,
},
{
title
:
'换货发货数量'
,
dataIndex
:
'deliveryCount'
,
align
:
'center'
,
},
{
title
:
'换货入库数量'
,
dataIndex
:
'storageCount'
,
align
:
'center'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
},
];
...
...
src/pages/afterService/components/ExchangeReceivedInfo/index.tsx
View file @
15792e00
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-2
0 17:51:50
* @LastEditTime: 2021-08-2
7 09:43:32
* @Description: 换货退货收货统计、换货退货发货明细
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -124,32 +124,27 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
},
{
title
:
'换货数量'
,
dataIndex
:
'replaceCount'
,
align
:
'center'
,
},
{
title
:
'已退货发货/未退货发货'
,
...
...
@@ -173,12 +168,10 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
{
title
:
'已退货收货'
,
dataIndex
:
'receiveCount'
,
align
:
'center'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
},
];
...
...
@@ -190,47 +183,39 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
},
{
title
:
'换货数量'
,
dataIndex
:
'count'
,
align
:
'center'
,
},
{
title
:
'退货发货数量'
,
dataIndex
:
'deliveryCount'
,
align
:
'center'
,
},
{
title
:
'退货入库数量'
,
dataIndex
:
'storageCount'
,
align
:
'center'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
},
];
...
...
src/pages/afterService/components/RefundModal/UploadPaymentVoucher/index.tsx
View file @
15792e00
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-09 10:34:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
6-09 15:53:08
* @LastEditTime: 2021-0
8-27 15:37:47
* @Description: 上传支付凭证
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -66,10 +66,6 @@ export type ValueType = {
export
type
SubmitValueType
=
{
/**
* 账户id
*/
id
:
number
,
/**
* 支付凭证 ,PayProveBO
*/
payProve
?:
{
...
...
@@ -122,6 +118,10 @@ interface IProps {
* 采购商角色id
*/
purchaserRoleId
:
number
,
/**
* 弹窗提交 loading
*/
submitLoading
:
boolean
;
}
const
UploadPaymentVoucher
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
...
...
@@ -131,6 +131,7 @@ const UploadPaymentVoucher: React.FC<IProps> = (props: IProps) => {
onSubmit
,
purchaserId
,
purchaserRoleId
,
submitLoading
,
}
=
props
;
const
[
bankAccount
,
setBankAccount
]
=
useState
<
BankAccount
>
({
name
:
''
,
...
...
@@ -140,7 +141,6 @@ const UploadPaymentVoucher: React.FC<IProps> = (props: IProps) => {
});
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
refundDisabled
,
setRefundDisabled
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
// 获取对公账户信息
const
getSettleAccountsGetMemberAccountConfig
=
()
=>
{
...
...
@@ -194,7 +194,6 @@ const UploadPaymentVoucher: React.FC<IProps> = (props: IProps) => {
return
;
}
onSubmit
({
id
,
payProve
:
{
...
rest
,
fileList
:
fileList
.
map
(
item
=>
item
.
status
===
'done'
&&
({
...
...
src/pages/afterService/components/ReturnAnalysis/index.tsx
View file @
15792e00
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
19 17:24:00
* @LastEditTime: 2021-08-
27 09:44:08
* @Description: 退货收货统计、退货发货明细
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -124,7 +124,6 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
...
...
@@ -134,22 +133,18 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
},
{
title
:
'退货数量'
,
dataIndex
:
'returnCount'
,
align
:
'center'
,
},
{
title
:
'已退货发货/未退货发货'
,
...
...
@@ -173,12 +168,10 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
{
title
:
'已退货收货'
,
dataIndex
:
'receiveCount'
,
align
:
'center'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
},
];
...
...
@@ -190,7 +183,6 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
{
title
:
'商品ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
...
...
@@ -200,37 +192,30 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
},
{
title
:
'退货数量'
,
dataIndex
:
'count'
,
align
:
'center'
,
},
{
title
:
'退货发货数量'
,
dataIndex
:
'deliveryCount'
,
align
:
'center'
,
},
{
title
:
'退货入库数量'
,
dataIndex
:
'storageCount'
,
align
:
'center'
,
},
{
title
:
'差异数量'
,
dataIndex
:
'differenceCount'
,
align
:
'center'
,
},
];
...
...
src/pages/afterService/components/ReturnDetailInfo/index.tsx
View file @
15792e00
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 18:02:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
12 18:10:38
* @LastEditTime: 2021-08-
27 16:09:15
* @Description: 退款明细
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -306,8 +306,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
};
const
handleRefundConfirm
=
(
values
,
modalName
)
=>
{
setSubmitLoading
(
true
);
if
(
onRefund
)
{
setSubmitLoading
(
true
);
onRefund
(
values
).
finally
(()
=>
{
setSubmitLoading
(
false
);
setRefundModalVisible
(
false
);
...
...
@@ -317,7 +317,11 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
const
handlePaymentVoucherSubmit
=
(
value
)
=>
{
if
(
onRefund
)
{
return
onRefund
(
value
);
setSubmitLoading
(
true
);
return
onRefund
({
...
value
,
id
:
refundModalValue
.
id
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
setPaymentVoucherVisible
(
false
);
});
}
return
Promise
.
reject
();
};
...
...
@@ -490,6 +494,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
onSubmit=
{
handlePaymentVoucherSubmit
}
purchaserId=
{
refundModalValue
.
purchaserId
}
purchaserRoleId=
{
refundModalValue
.
purchaserRoleId
}
submitLoading=
{
submitLoading
}
/>
</
MellowCard
>
);
...
...
src/pages/repositories/adjustRepository.tsx
View file @
15792e00
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
import
{
history
,
Prompt
}
from
'umi'
import
moment
from
'moment'
import
{
Button
,
Card
,
Row
,
Tabs
,
Tag
}
from
'antd'
import
{
Button
,
Card
,
Row
,
Tabs
,
Tag
,
Col
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
SaveOutlined
,
...
...
@@ -204,11 +204,11 @@ const AddRepository:React.FC<{}> = (props) => {
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
className=
'addRepository'
title=
"仓位库存调拨"
extra=
{
[
<
Button
key=
"1"
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
保存
</
Button
>,
]
}
//
extra={[
//
<Button key="1" onClick={() => addSchemaAction.submit()} type="primary" icon={<SaveOutlined />}>
//
保存
//
</Button>,
//
]}
>
<
Card
className=
''
>
<
FormProvider
>
...
...
@@ -216,6 +216,13 @@ const AddRepository:React.FC<{}> = (props) => {
<
Tabs
type=
'card'
defaultActiveKey=
'tab1'
onChange=
{
topTableChange
}
>
<
Tabs
.
TabPane
key=
'tab1'
tab=
'仓位设置'
>
<
PositionSetting
onFieldChange=
{
onPublicFieldChange
}
addSchemaAction=
{
addSchemaAction
}
schema=
{
repositTabOneSchema
}
formSubmit=
{
formSubmit
}
/>
<
Row
>
<
Col
offset=
{
6
}
style=
{
{
marginTop
:
40
}
}
>
<
Button
key=
"1"
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
保存
</
Button
>
</
Col
>
</
Row
>
</
Tabs
.
TabPane
>
<
Tabs
.
TabPane
key=
'tab2'
tab=
'库存调入\调出'
>
<
Tabs
defaultActiveKey=
'tab2-1'
tabPosition=
'left'
>
...
...
src/pages/repositories/components/batchPositionSetting.tsx
View file @
15792e00
...
...
@@ -315,6 +315,18 @@ const BatchPositionSetting:React.FC<BatchPositionSettingProps> = (props) => {
align
:
'center'
,
key
:
'unitName'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'upperMemberName'
,
align
:
'center'
,
key
:
'upperMemberName'
,
},
{
title
:
'供应库存'
,
dataIndex
:
'upperStockCount'
,
align
:
'center'
,
key
:
'upperStockCount'
,
},
]
const
formSearch
:
ISchema
=
{
...
...
@@ -513,75 +525,75 @@ const BatchPositionSetting:React.FC<BatchPositionSettingProps> = (props) => {
schema=
{
schema
}
/>
<
ModalTable
modalTitle=
'选择会员'
confirm=
{
handleOkAddMember
}
cancel=
{
handleCancelAddMember
}
visible=
{
visibleChannelMember
}
columns=
{
columnsSetMember
}
rowSelection=
{
memberRowSelection
}
fetchTableData=
{
params
=>
fetchMemberList
(
params
)
}
formilyProps=
{
{
ctx
:
{
schema
:
formSearch
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
Select
}
,
effects
:
(
$
,
actions
)
=>
{
actions
.
reset
()
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
}
modalTitle=
'选择会员'
confirm=
{
handleOkAddMember
}
cancel=
{
handleCancelAddMember
}
visible=
{
visibleChannelMember
}
columns=
{
columnsSetMember
}
rowSelection=
{
memberRowSelection
}
fetchTableData=
{
params
=>
fetchMemberList
(
params
)
}
formilyProps=
{
{
ctx
:
{
schema
:
formSearch
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
,
Select
}
,
effects
:
(
$
,
actions
)
=>
{
actions
.
reset
()
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
}
}
}
resetModal=
{
{
destroyOnClose
:
true
}
}
tableProps=
{
{
rowKey
:
'memberId'
}
}
/>
<
ModalTable
modalTitle=
'选择商品'
confirm=
{
handleOkAddProduct
}
cancel=
{
handleCancel
AddProduct
}
visible=
{
visibleChannelR
roduct
}
columns=
{
columnsSetP
roduct
}
rowSelection=
{
productRowSelection
}
fetchTableData=
{
params
=>
fetchProductList
(
params
)
}
formilyProps=
{
{
ctx
:
{
schema
:
formProduct
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
}
,
effects
:
(
$
,
actions
)
=>
{
actions
.
reset
()
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
}
}
resetModal=
{
{
destroyOnClose
:
true
}
}
tableProps=
{
{
rowKey
:
'memberId'
}
}
/>
<
ModalTable
modalTitle=
'选择商品'
confirm=
{
handleOk
AddProduct
}
cancel=
{
handleCancelAddP
roduct
}
visible=
{
visibleChannelR
roduct
}
columns=
{
columnsSetProduct
}
rowSelection=
{
productRowSelection
}
fetchTableData=
{
params
=>
fetchProductList
(
params
)
}
formilyProps=
{
{
ctx
:
{
schema
:
formProduct
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
}
,
effects
:
(
$
,
actions
)
=>
{
actions
.
reset
()
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
}
}
}
resetModal=
{
{
destroyOnClose
:
true
}
}
tableProps=
{
{
rowKey
:
'id'
,
// onRow: (record) => (
{
// onClick: () =>
{
// productRowCtl.setSelectRow([record]);
// productRowCtl.setSelectedRowKeys([record.id]);
//
},
//
})
}
}
/>
}
resetModal=
{
{
destroyOnClose
:
true
}
}
tableProps=
{
{
rowKey
:
'id'
,
// onRow: (record) => (
{
// onClick: () =>
{
// productRowCtl.setSelectRow([record]);
// productRowCtl.setSelectedRowKeys([record.id]);
//
},
//
})
}
}
/>
</>
)
...
...
src/pages/repositories/components/positionSetting.tsx
View file @
15792e00
...
...
@@ -220,6 +220,8 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
addSchemaAction
.
setFieldValue
(
'brand'
,
selectResult
.
brandName
)
addSchemaAction
.
setFieldValue
(
'unit'
,
selectResult
.
unitName
)
addSchemaAction
.
setFieldValue
(
'productId'
,
selectResult
.
id
)
addSchemaAction
.
setFieldValue
(
'upperMemberName'
,
selectResult
.
upperMemberName
)
addSchemaAction
.
setFieldValue
(
'upperStockCount'
,
selectResult
.
upperStockCount
)
addSchemaAction
.
setFieldState
(
'inventory'
,
state
=>
{
state
.
props
[
"x-props"
]
=
{
addonAfter
:
<
div
style=
{
{
marginLeft
:
4
}
}
>
{
selectResult
.
unitName
}
</
div
>
...
...
@@ -332,6 +334,18 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
align
:
'center'
,
key
:
'unitName'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'upperMemberName'
,
align
:
'center'
,
key
:
'upperMemberName'
,
},
{
title
:
'供应库存'
,
dataIndex
:
'upperStockCount'
,
align
:
'center'
,
key
:
'upperStockCount'
,
}
]
const
formSearch
:
ISchema
=
{
...
...
src/pages/repositories/index.tsx
View file @
15792e00
...
...
@@ -85,11 +85,26 @@ const Repositories: React.FC<{}> = () => {
key
:
'unit'
,
},
{
title
:
'库存'
,
title
:
'
现有
库存'
,
dataIndex
:
'inventory'
,
key
:
'inventory'
,
},
{
title
:
'已用库存'
,
dataIndex
:
'alreadyiInventory'
,
key
:
'alreadyiInventory'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'upperMemberName'
,
key
:
'upperMemberName'
,
},
{
title
:
'供应库存'
,
dataIndex
:
'upperStockCount'
,
key
:
'upperStockCount'
,
},
{
title
:
'仓位状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
...
...
src/pages/repositories/schema/index.tsx
View file @
15792e00
...
...
@@ -295,7 +295,19 @@ export const repositMoreSchema: ISchema = padRequiredMessage({
// }
],
default
:
1
}
},
upperMemberName
:
{
type
:
'string'
,
title
:
'供应会员'
,
"x-component"
:
'Text'
,
default
:
'暂无'
},
upperStockCount
:
{
type
:
'number'
,
title
:
'供应库存'
,
"x-component"
:
'Text'
,
default
:
'暂无'
},
}
}
}
...
...
@@ -527,7 +539,19 @@ export const repositDetailSchema: ISchema = padRequiredMessage({
// }
],
default
:
1
}
},
upperMemberName
:
{
type
:
'string'
,
title
:
'供应会员'
,
"x-component"
:
'Text'
,
default
:
'暂无'
},
upperStockCount
:
{
type
:
'number'
,
title
:
'供应库存'
,
"x-component"
:
'Text'
,
default
:
'暂无'
},
}
}
}
...
...
@@ -925,7 +949,19 @@ export const repositTabOneSchema: ISchema = padRequiredMessage({
// }
],
default
:
1
}
},
upperMemberName
:
{
type
:
'string'
,
title
:
'供应会员'
,
"x-component"
:
'Text'
,
default
:
'暂无'
},
upperStockCount
:
{
type
:
'number'
,
title
:
'供应库存'
,
"x-component"
:
'Text'
,
default
:
'暂无'
},
}
}
}
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmit/index.tsx
View file @
15792e00
...
...
@@ -122,6 +122,7 @@ const ReadySubmit = () => {
reload=
{
ref
}
columns=
{
columns
}
effects=
"id"
rowKey=
"activityId"
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPageTobeSubmitSignUp
}
selectedRow=
{
true
}
fetchRowkeys=
{
(
e
)
=>
setRowKeys
(
e
)
}
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/add.tsx
View file @
15792e00
...
...
@@ -28,7 +28,8 @@ const TABLINK = [
]
const
DetialLayout
=
()
=>
{
const
{
query
:
{
activityId
,
signUpId
}
}
=
history
.
location
;
const
{
query
:
{
activityId
,
signUpId
},
pathname
}
=
history
.
location
;
const
[
path
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
[
unsaved
,
setUnsaved
]
=
useState
<
boolean
>
(
false
);
const
[
productList
,
setProductList
]
=
useState
<
any
[]
>
([]);
...
...
@@ -107,7 +108,8 @@ const DetialLayout = () => {
signUpId
!==
null
&&
(
params
.
id
=
signUpId
)
if
(
!
isEmpty
(
productList
))
{
setLoading
(
true
)
PublicApi
.
postMarketingPlatformActivitySignupSave
({
...
params
}).
then
(
res
=>
{
const
fieldApi
=
(
path
===
'add'
?
PublicApi
.
postMarketingPlatformActivitySignupSave
:
PublicApi
.
postMarketingPlatformActivitySignupUpdate
)
fieldApi
({
...
params
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
setLoading
(
false
)
return
...
...
src/pages/transaction/marketingAbility/paltformSign/readySubmitExamine/index.tsx
View file @
15792e00
...
...
@@ -89,19 +89,15 @@ const ReadySubmitExamine = () => {
dataIndex
:
'state'
,
render
:
(
text
,
record
)
=>
(
<>
{
record
.
button
===
7
&&
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/edit?activityId=${record.activityId}&signUpId=${record.id}`
)
}
>
修改报名资料
</
Button
>
}
{
record
.
button
===
6
&&
(
<>
<
Popconfirm
title=
"确定要提交吗?"
disabled=
{
!
record
.
id
}
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
<
Button
type=
'link'
disabled=
{
!
record
.
id
}
>
提交审核
</
Button
>
</
Popconfirm
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/add?activityId=${record.activityId}`
)
}
>
填写报名资料
</
Button
>
</>
)
}
{
record
.
update
&&
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/edit?activityId=${record.activityId}&signUpId=${record.id}`
)
}
>
修改报名资料
</
Button
>
}
{
record
.
submit
&&
(
<
Popconfirm
title=
"确定要提交吗?"
disabled=
{
!
record
.
id
}
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleSubmit
(
record
.
id
)
}
>
<
Button
type=
'link'
disabled=
{
!
record
.
id
}
>
提交审核
</
Button
>
</
Popconfirm
>
)
}
{
record
.
save
&&
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/marketingAbility/paltformSign/readySubmitExamine/add?activityId=${record.activityId}`
)
}
>
填写报名资料
</
Button
>
}
</>
)
},
...
...
src/pages/transaction/marketingAbility/paltformSign/search/index.tsx
View file @
15792e00
...
...
@@ -102,6 +102,7 @@ const Search = () => {
<
TableLayout
columns=
{
columns
}
effects=
"id"
rowKey=
"activityId"
fetch=
{
PublicApi
.
getMarketingPlatformActivitySignupPage
}
useStateEffects=
{
useStateEffects
}
schema=
{
{
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/add.tsx
View file @
15792e00
...
...
@@ -6,6 +6,9 @@ import { SaveOutlined } from '@ant-design/icons';
import
PeripheralLayout
from
'@/pages/transaction/components/detailLayout'
;
import
BasicInfoLayout
from
'./components/basicInfoLayout'
;
import
RulesLayout
from
'./components/rulesLayout'
;
import
ShopLayout
from
'./components/shopLayout'
;
import
ProductListLayout
from
'../../paltformSign/readySubmitExamine/components/productListLayout'
;
import
PartakeUserLayout
from
'./components/partakeUserLayout'
;
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -14,9 +17,55 @@ const layout: any = {
};
const
AddedMarketing
=
()
=>
{
const
{
query
:
{
activityId
,
signUpId
}
}
=
history
.
location
;
const
focus$
=
useEventEmitter
();
const
[
form
]
=
Form
.
useForm
();
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
[
unsaved
,
setUnsaved
]
=
useState
<
boolean
>
(
false
);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
shopList
,
setShopList
]
=
useState
<
any
[]
>
([]);
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
({});
const
[
productList
,
setProductList
]
=
useState
<
any
[]
>
([]);
const
[
memberLevelList
,
setMemberLevelList
]
=
useState
<
any
[]
>
([]);
const
[
memberType
,
setMemberType
]
=
useState
<
any
[]
>
([]);
const
handleGetShopList
=
(
mall
)
=>
{
console
.
log
(
mall
,
10086
)
const
shopList
=
mall
.
filter
(
item
=>
item
.
checked
)
form
.
setFieldsValue
({
"shopList"
:
shopList
.
map
(
item
=>
{
return
{
shopId
:
item
.
id
,
shopName
:
item
.
name
,
logo
:
item
.
logoUrl
,
}
})
})
}
const
handleGetDataSoure
=
(
e
)
=>
{
if
(
!
unsaved
)
{
setUnsaved
(
true
)
}
setProductList
([...
e
])
}
const
handleGetLevel
=
(
levels
)
=>
{
const
list
=
levels
.
map
(
item
=>
{
return
{
id
:
item
.
id
,
memberLevelId
:
item
.
id
,
memberType
:
item
.
memberType
,
memberTypeName
:
item
.
memberTypeName
,
roleType
:
item
.
roleId
,
roleTypeName
:
item
.
roleName
,
level
:
item
.
level
,
levelTypeName
:
item
.
levelTypeName
,
levelTag
:
item
.
levelTag
,
}
})
setMemberLevelList
([...
list
])
}
return
(
<
PeripheralLayout
detail=
'新增营销活动'
...
...
@@ -26,7 +75,6 @@ const AddedMarketing = () => {
{
id
:
'activityProductLayout'
,
title
:
'活动商品'
},
{
id
:
'partakeUserLayout'
,
title
:
'参与用户'
},
{
id
:
'shopLayout'
,
title
:
'适用商城'
},
{
id
:
'applyMemberLayout'
,
title
:
'适用会员'
},
]
}
effect=
{
<
Button
...
...
@@ -44,7 +92,10 @@ const AddedMarketing = () => {
{
...
layout
}
>
<
BasicInfoLayout
form=
{
form
}
focus
$=
{
focus$
}
/>
<
RulesLayout
focus
$=
{
focus$
}
/>
<
RulesLayout
form=
{
form
}
focus
$=
{
focus$
}
/>
<
ProductListLayout
signUpId=
{
signUpId
!==
'null'
&&
signUpId
}
data=
{
dataSource
}
getDataSource=
{
handleGetDataSoure
}
/>
<
PartakeUserLayout
onGetLevel=
{
handleGetLevel
}
onSetLevel=
{
memberLevelList
}
setMemberType=
{
memberType
}
/>
<
ShopLayout
onGetShopList=
{
handleGetShopList
}
onSetShopList=
{
shopList
}
/>
</
Form
>
}
/>
...
...
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/partakeUserLayout/index.less
0 → 100644
View file @
15792e00
.rulesLayout {
:global {
.ant-checkbox {
display: none;
}
.ant-checkbox-wrapper {
min-width: 56px;
text-align: center;
color: rgba(0, 0, 0, 0.85);
font-weight: 400;
padding: 5.6px 0px;
border: 1px solid transparent;
box-shadow: 0 2px 0 rgb(0 0 0 / 2%);
border-color: #d9d9d9;
}
.ant-checkbox-wrapper-checked {
color: @main-color;
border-color: @main-color;
}
}
}
.cell {
display: flex;
align-items: center;
h5 { margin-bottom: 2em; }
.label {
flex: 0 0 25%;
color: #909399;
}
.content {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
.selector {
width: 68px;
height: 32px;
color: #252D37;
background: #FAFBFC;
text-align: center;
line-height: 32px;
}
}
}
.colStyle {
position: relative;
padding: 10px 16px;
border-color: transparent;
background-color: #FAFBFC;
cursor: pointer;
.cell {
h5 { margin-bottom: 0px; }
.label,
.content {
flex: 1;
}
}
:global {
.ant-checkbox-wrapper {
width: 100%;
height: 100%;
display: block;
position: absolute;
left: 0;
top: 0;
.ant-checkbox {
display: none;
}
}
.ant-checkbox-wrapper-checked {
border: 1px solid @main-color;
}
}
}
.shopLevelConfigChecked {
border: 1px solid;
border-color: @main-color;
box-sizing: border-box;
}
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/partakeUserLayout/index.tsx
0 → 100644
View file @
15792e00
import
React
,
{
useCallback
,
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Checkbox
,
Row
,
Col
,
Image
}
from
'antd'
;
import
CardLayout
from
'../card'
;
import
cx
from
'classnames'
;
import
style
from
'./index.less'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
isEmpty
}
from
'@/components/NiceForm/components/AntUpload/shared'
;
import
IMG_LEVEL1
from
'@/assets/imgs/level1.png'
;
import
IMG_LEVEL2
from
'@/assets/imgs/level2.png'
;
import
IMG_LEVEL3
from
'@/assets/imgs/level3.png'
;
import
IMG_LEVEL4
from
'@/assets/imgs/level4.png'
;
const
PIC_MAP
=
{
1
:
IMG_LEVEL1
,
2
:
IMG_LEVEL2
,
3
:
IMG_LEVEL3
,
4
:
IMG_LEVEL4
,
};
interface
PartakeUserLayoutProps
{
/** 返回等级 */
onGetLevel
?:
(
e
:
any
)
=>
void
,
/** 回显数据 */
onSetLevel
?:
any
[],
/** 会员类型 */
setMemberType
?:
any
[]
}
const
PartakeUserLayout
:
React
.
FC
<
PartakeUserLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
onGetLevel
,
onSetLevel
,
setMemberType
}
=
props
const
[
allUser
,
setAllUser
]
=
useState
<
any
[]
>
([]);
const
[
user
,
setUser
]
=
useState
<
Number
[]
>
([]);
const
[
levelConfig
,
setLevelConfig
]
=
useState
<
any
[]
>
([]);
const
suitableMemberTypeList
=
useCallback
(
async
()
=>
{
await
PublicApi
.
getMarketingCouponSuitableMemberTypeList
().
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
setAllUser
(
res
.
data
)
})
},
[])
const
handleChange
=
(
e
)
=>
{
setUser
(
e
.
filter
(
_item
=>
_item
!==
1
&&
_item
!==
2
))
}
useEffect
(()
=>
{
suitableMemberTypeList
()
},
[])
useEffect
(()
=>
{
if
(
!
isEmpty
(
user
))
{
PublicApi
.
getMemberManageMarketingSuitableLevelConfigPage
({
levelConfigIds
:
''
,
roleIds
:
''
,
memberTypes
:
''
,
current
:
'1'
,
pageSize
:
'999'
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
setLevelConfig
(
res
.
data
.
data
)
})
}
},
[
user
])
const
handleLevelConfig
=
(
e
)
=>
{
const
data
=
[...
levelConfig
]
onGetLevel
(
data
.
filter
(
item
=>
e
.
includes
(
item
.
id
)))
}
return
(
<
CardLayout
id=
"partakeUserLayout"
title=
"参与用户"
weight
>
<
Form
.
Item
name=
"allUser"
label=
"适用新老会员"
tooltip=
"当天平台审核通过的平台会员为新会员,非当天审核通过的平台会员为老会员"
rules=
{
[{
required
:
true
,
message
:
'请选择适用新老会员'
}]
}
className=
{
style
.
rulesLayout
}
>
<
Checkbox
.
Group
onChange=
{
handleChange
}
>
{
allUser
.
map
(
item
=>
(
<
Checkbox
key=
{
`allUser${item.value}`
}
value=
{
item
.
value
}
>
{
item
.
name
}
</
Checkbox
>
))
}
</
Checkbox
.
Group
>
</
Form
.
Item
>
{
!
isEmpty
(
user
)
&&
(
<
Form
.
Item
name=
"memberLevelList"
>
<
Checkbox
.
Group
onChange=
{
handleLevelConfig
}
>
<
Row
gutter=
{
[
24
,
24
]
}
>
{
levelConfig
.
map
(
item
=>
(
<
Col
span=
{
12
}
key=
{
item
.
id
}
>
<
div
className=
{
style
.
colStyle
}
>
<
Row
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
cell
}
>
<
h5
className=
{
style
.
label
}
>
会员类型:
</
h5
>
<
h5
className=
{
style
.
content
}
>
{
item
.
memberTypeName
}
</
h5
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
cell
}
>
<
h5
className=
{
style
.
label
}
>
会员角色:
</
h5
>
<
h5
className=
{
style
.
content
}
>
{
item
.
roleName
}
</
h5
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
cell
}
>
<
h5
className=
{
style
.
label
}
>
等级类型:
</
h5
>
<
h5
className=
{
style
.
content
}
>
{
item
.
levelTypeName
}
</
h5
>
</
div
>
</
Col
>
<
Col
span=
{
6
}
>
<
div
className=
{
style
.
cell
}
>
<
h5
className=
{
style
.
label
}
>
等级标签:
</
h5
>
<
h5
className=
{
style
.
content
}
><
Image
width=
{
56
}
height=
{
16
}
preview=
{
false
}
src=
{
PIC_MAP
[
item
.
level
]
}
/></
h5
>
</
div
>
</
Col
>
</
Row
>
<
Checkbox
value=
{
item
.
id
}
/>
</
div
>
</
Col
>
))
}
</
Row
>
</
Checkbox
.
Group
>
</
Form
.
Item
>
)
}
</
CardLayout
>
)
}
export
default
PartakeUserLayout
;
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/rulesLayout/index.less
0 → 100644
View file @
15792e00
.rulesLayout {
:global {
.ant-radio-button-wrapper {
min-width: 80px;
max-width: 80px;
text-align: center;
padding-left: 0px;
padding-right: 0px;
}
.ant-checkbox {
display: none;
}
.ant-checkbox-wrapper {
min-width: 80px;
max-width: 80px;
text-align: center;
color: rgba(0, 0, 0, 0.85);
font-weight: 400;
padding: 5.6px 0px;
border: 1px solid transparent;
// box-shadow: 0 2px 0 rgb(0 0 0 / 2%);
border-color: #d9d9d9;
justify-content: center;
}
.ant-checkbox-wrapper-checked {
color: @main-color;
border-color: @main-color;
}
.inputWidth {
width: 160px;
}
}
}
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/rulesLayout/index.tsx
View file @
15792e00
This diff is collapsed.
Click to expand it.
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/shopLayout/index.less
0 → 100644
View file @
15792e00
.shopListLayout {
display: flex;
align-items: center;
border: 1px solid transparent;
border-color: #5C626A;
padding: 8px 16px;
cursor: pointer;
.shopListLogo {
width: 32px;
height: 32px;
border-radius: 50%;
overflow: hidden;
}
.shopListName {
color: #5C626A;
margin-left: 10px;
}
}
.shopListLayoutChecked {
border-color: @main-color;
.shopListName {
color: @main-color;
}
}
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/components/shopLayout/index.tsx
0 → 100644
View file @
15792e00
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Form
,
Row
,
Col
,
Image
}
from
'antd'
;
import
cx
from
'classnames'
;
import
CardLayout
from
'../card'
;
import
style
from
'./index.less'
;
import
{
isEmpty
}
from
'lodash'
;
import
{
PublicApi
}
from
'@/services/api'
;
type
ShopItem
=
{
describe
?:
string
environment
?:
number
,
id
?:
number
,
isDefault
?:
number
,
logoUrl
?:
string
,
name
?:
string
state
?:
number
,
type
?:
number
,
url
?:
string
,
checked
?:
boolean
,
}
interface
shopListProps
{
/** 返回选择商城 */
onGetShopList
?:
(
e
:
any
)
=>
void
,
/** 回显数据 */
onSetShopList
?:
any
[],
}
const
ShopLayout
:
React
.
FC
<
shopListProps
>
=
(
props
:
any
)
=>
{
const
{
onGetShopList
,
onSetShopList
}
=
props
;
const
[
mallList
,
setMallList
]
=
useState
<
ShopItem
[]
>
([]);
useEffect
(()
=>
{
PublicApi
.
getManageShopFindByMemberType
().
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
setMallList
(
res
.
data
)
})
},
[])
const
handleShopList
=
(
index
)
=>
{
let
mall
=
[...
mallList
]
const
newData
=
mall
.
map
((
_item
,
_i
)
=>
{
if
(
_i
===
index
)
{
return
{
...
_item
,
checked
:
!
_item
.
checked
}
}
return
_item
;
})
setMallList
(
newData
)
onGetShopList
(
newData
)
}
useEffect
(()
=>
{
if
(
!
isEmpty
(
onSetShopList
))
{
mallList
.
forEach
(
item
=>
{
onSetShopList
.
filter
(
_item
=>
_item
.
shopId
===
item
.
id
).
forEach
(
v
=>
{
if
(
v
.
shopId
===
item
.
id
)
{
item
.
checked
=
true
}
})
})
setMallList
([...
mallList
]);
onGetShopList
([...
mallList
])
}
console
.
log
(
onSetShopList
,
mallList
)
},
[
onSetShopList
])
return
(
<
CardLayout
id=
"shopLayout"
title=
"适用商城"
weight
>
<
Form
.
Item
name=
"shopList"
>
<
Row
gutter=
{
[
16
,
16
]
}
>
{
mallList
.
map
((
item
:
ShopItem
,
index
:
number
)
=>
(
<
Col
span=
{
6
}
key=
{
item
.
id
}
>
<
div
className=
{
cx
(
style
.
shopListLayout
,
item
.
checked
&&
style
.
shopListLayoutChecked
)
}
onClick=
{
()
=>
handleShopList
(
index
)
}
>
<
div
className=
{
style
.
shopListLogo
}
>
<
Image
width=
{
32
}
height=
{
32
}
src=
{
item
.
logoUrl
}
preview=
{
false
}
/>
</
div
>
<
span
className=
{
style
.
shopListName
}
>
{
item
.
name
}
</
span
>
</
div
>
</
Col
>
))
}
</
Row
>
</
Form
.
Item
>
</
CardLayout
>
)
}
export
default
ShopLayout
src/pages/transaction/marketingAbility/selfManagement/readySubmitExamine/constants/index.ts
0 → 100644
View file @
15792e00
/**
* 活动类型
*/
type
activityType
=
{
lable
:
string
,
value
:
number
,
}[]
export
const
ACTIVITYTYPEARRAY
:
activityType
=
[
{
lable
:
'特价促销'
,
value
:
1
},
{
lable
:
'直降促销'
,
value
:
2
},
{
lable
:
'折价促销'
,
value
:
3
},
{
lable
:
'满量促销'
,
value
:
4
},
{
lable
:
'满额促销'
,
value
:
5
},
{
lable
:
'赠送促销'
,
value
:
6
},
{
lable
:
'多件促销'
,
value
:
7
},
{
lable
:
'组合促销'
,
value
:
8
},
{
lable
:
'拼团'
,
value
:
9
},
{
lable
:
'抽奖'
,
value
:
10
},
{
lable
:
'砍价'
,
value
:
11
},
{
lable
:
'秒杀'
,
value
:
12
},
{
lable
:
'换购'
,
value
:
13
},
{
lable
:
'预售'
,
value
:
14
},
{
lable
:
'套餐'
,
value
:
15
},
{
lable
:
'试用'
,
value
:
16
},
]
/** 叠加活动类型 */
export
const
OVERLAYACTIVITYTYPE
=
(
int
)
=>
{
switch
(
Number
(
int
))
{
case
1
:
case
2
:
case
3
:
return
[
{
label
:
'满量促销'
,
value
:
4
},
{
label
:
'满额促销'
,
value
:
5
},
{
label
:
'赠送促销'
,
value
:
6
},
{
label
:
'换购'
,
value
:
13
},
]
case
4
:
case
5
:
return
[
{
label
:
'特价促销'
,
value
:
1
},
{
label
:
'直降促销'
,
value
:
2
},
{
label
:
'折扣促销'
,
value
:
3
},
{
label
:
'赠送促销'
,
value
:
6
},
{
label
:
'换购'
,
value
:
13
},
]
case
6
:
return
[
{
label
:
'特价促销'
,
value
:
1
},
{
label
:
'直降促销'
,
value
:
2
},
{
label
:
'折扣促销'
,
value
:
3
},
{
label
:
'满量促销'
,
value
:
4
},
{
label
:
'满额促销'
,
value
:
5
},
{
label
:
'多件促销'
,
value
:
7
},
{
label
:
'组合促销'
,
value
:
8
},
{
label
:
'换购'
,
value
:
13
},
]
case
7
:
case
8
:
return
[
{
label
:
'赠送促销'
,
value
:
6
},
{
label
:
'换购'
,
value
:
13
},
]
case
13
:
return
[
{
label
:
'特价促销'
,
value
:
1
},
{
label
:
'直降促销'
,
value
:
2
},
{
label
:
'折扣促销'
,
value
:
3
},
{
label
:
'满量促销'
,
value
:
4
},
{
label
:
'满额促销'
,
value
:
5
},
{
label
:
'多件促销'
,
value
:
6
},
{
label
:
'组合促销'
,
value
:
7
},
{
label
:
'换购'
,
value
:
8
},
]
}
}
/** 超限规则 */
export
const
OVERRUNRULETYPE
=
(
int
)
=>
{
switch
(
Number
(
int
))
{
case
1
:
case
2
:
case
3
:
case
8
:
case
12
:
return
[
{
label
:
'原价购买'
,
value
:
1
},
{
label
:
'不可购买'
,
value
:
2
},
]
case
4
:
case
5
:
case
6
:
case
7
:
case
13
:
return
[
{
label
:
'不可购买'
,
value
:
2
},
{
label
:
'按个人限购最高级享受优惠'
,
value
:
1
},
]
}
}
/** 满量/满额/赠送促销类型 */
export
const
PROMOTIONTYPE
=
(
int
)
=>
{
switch
(
Number
(
int
))
{
case
4
:
return
{
name
:
"type"
,
tooltip
:
"满量减为订单满足要求购买的数量后,订单金额减去设定的优惠金额,满量折则为订单金额乘以设定的折扣"
,
label
:
"满量促销类型"
,
message
:
"请选择满量促销类型"
,
radio
:
[
{
label
:
'满量减'
,
value
:
1
},
{
label
:
'满量折'
,
value
:
2
},
]
}
case
5
:
return
{
name
:
"type"
,
tooltip
:
"满额减为订单满足要求购买的总额后,订单金额减去设定的优惠金额,满额折则为订单金额乘以设定的折扣"
,
label
:
"满额促销类型"
,
message
:
"请选择满额促销类型"
,
radio
:
[
{
label
:
'满额减'
,
value
:
1
},
{
label
:
'满额折'
,
value
:
2
},
]
}
case
6
:
return
{
name
:
"giveType"
,
tooltip
:
"满额赠为订单满足要求购买的金额后,赠送商品或优惠劵,买商品赠为购买活动商品时,赠送商品或优惠劵"
,
label
:
"赠送促销类型"
,
message
:
"请选择赠送促销类型"
,
radio
:
[
{
label
:
'满额赠'
,
value
:
1
},
{
label
:
'买商品赠'
,
value
:
2
},
]
}
}
}
/** 满量/额减 */
export
const
LADDERBOLIST
=
(
int
,
type
=
1
)
=>
{
switch
(
Number
(
int
))
{
case
4
:
return
{
tooltip
:
type
===
1
?
'优惠金额为最后订单总额减去的优惠金额'
:
'折扣为最后订单总额的折扣,输入数字,如85折,输入85,9折输入90'
,
label
:
`满量
${
type
===
1
?
'减'
:
'折'
}
`
,
message
:
`请新增满量
${
type
===
1
?
'减'
:
'折'
}
`
,
addon
:
'数量'
,
addonAfter
:
type
===
1
?
'减'
:
'打'
,
addonBefore
:
type
===
1
?
'元'
:
'折'
,
}
case
5
:
return
{
tooltip
:
type
===
1
?
'优惠金额为最后订单总额减去的优惠金额'
:
'折扣为最后订单总额的折扣,输入数字,如85折,输入85,9折输入90'
,
label
:
`满额
${
type
===
1
?
'减'
:
'折'
}
`
,
message
:
`请新增满额
${
type
===
1
?
'减'
:
'折'
}
`
,
addon
:
'元'
,
addonAfter
:
type
===
1
?
'减'
:
'打'
,
addonBefore
:
type
===
1
?
'元'
:
'折'
,
}
case
7
:
return
{
tooltip
:
'折扣为最后订单总额的折扣,输入数字,如85折,输入85,9折输入90'
,
label
:
'优惠规则'
,
addon
:
'件'
,
message
:
'请新增优惠规则'
,
addonAfter
:
'打'
,
addonBefore
:
'折'
,
}
}
}
src/pages/transaction/purchaseOrder/orderCollectB2b/apis/index.ts
View file @
15792e00
...
...
@@ -37,7 +37,7 @@ export const fetchOrderApi = {
},
/** 获取支付信息列表 */
async
getPayInfoList
(
params
)
{
const
{
data
}
=
await
PublicApi
.
postOrderBuyerCreateB2bPaymentFind
(
params
)
const
{
data
}
=
await
PublicApi
.
postOrderBuyerCreateB2bPaymentFind
(
params
,
{
ctlType
:
'none'
}
)
return
data
},
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/constant/index.tsx
View file @
15792e00
...
...
@@ -23,7 +23,7 @@ export const PriceComp = (props) => {
</
div
>
}
/** 修改
合同
下单 初始值转换 */
/** 修改
b2b询价报价
下单 初始值转换 */
export
const
procurmentRenderInit
=
(
initValue
:
any
)
=>
{
return
{
...
...
@@ -42,29 +42,23 @@ export const procurmentRenderInit = (initValue: any) => {
digest
:
initValue
.
digest
,
deliverDate
:
initValue
.
consignee
.
deliverDate
,
theInvoiceId
:
initValue
.
invoice
?.
invoiceId
||
null
,
hasContract
:
initValue
.
hasContract
,
contractNo
:
initValue
.
contract
.
contractNo
,
contract
:
{...
initValue
.
contract
},
quoteNo
:
initValue
.
quoteNo
,
}
}
/** 修改
采购合同
下单 回显商品字段转换 */
/** 修改
b2b询价报价
下单 回显商品字段转换 */
export
const
procurementRenderField
=
(
data
)
=>
{
const
_orderProductRequests
=
data
.
product
.
products
return
_orderProductRequests
.
map
(
item
=>
{
return
{
...
item
,
// 此id为sukId
relevanceProductId
:
item
.
quotedSkuId
,
// relevanceSkuId: item.quotedSkuId,
relevanceProductName
:
item
.
quotedName
,
relevanceProductBrand
:
item
.
quotedBrand
,
relevanceProductCategory
:
item
.
quotedCategory
,
relevanceProductSpec
:
item
.
quotedSpec
,
productId
:
item
.
skuId
,
productName
:
item
.
name
,
logistics
:
item
.
deliverType
,
id
:
item
.
productId
,
code
:
item
.
productNo
,
type
:
item
.
spec
,
unitPrice
:
item
.
price
,
purchaseCount
:
item
.
quantity
,
taxInclusive
:
item
.
tax
,
money
:
item
.
amount
,
// 冗余memberId memberRoleId查询自提地址使用
memberId
:
data
.
vendorMemberId
,
memberRoleId
:
data
.
vendorRoleId
,
...
...
@@ -316,11 +310,10 @@ export const productInfoColumns: any[] = [
key
:
'unitPrice'
,
},
{
title
:
'
会员折扣
'
,
dataIndex
:
'
memberPrice
'
,
title
:
'
库存
'
,
dataIndex
:
'
stock
'
,
align
:
'center'
,
key
:
'memberPrice'
,
render
:
(
text
,
record
)
=>
record
.
isMemberPrice
&&
text
?
text
*
100
+
'%'
:
null
key
:
'stock'
,
},
{
title
:
'采购数量'
,
...
...
@@ -358,11 +351,11 @@ export const productInfoColumns: any[] = [
align
:
'center'
,
key
:
'logistics'
,
render
:
(
t
,
r
)
=>
{
if
(
r
.
logistics
?.
deliveryType
===
1
)
if
(
r
.
logistics
===
1
)
return
"物流(默认)"
else
if
(
r
.
logistics
?.
deliveryType
===
2
)
return
<
AddressPop
pickInfo=
{
t
}
>
{
DELIVERY_TYPE
[
t
.
deliveryType
]
}
</
AddressPop
>
else
if
(
r
.
logistics
?.
deliveryType
===
3
)
else
if
(
r
.
logistics
===
2
)
return
<
AddressPop
pickInfo=
{
t
}
>
{
DELIVERY_TYPE
[
t
]
}
</
AddressPop
>
else
if
(
r
.
logistics
===
3
)
return
"无需配送"
}
},
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/index.tsx
View file @
15792e00
...
...
@@ -9,7 +9,7 @@ import { SaveOutlined, LinkOutlined, PlusOutlined } from '@ant-design/icons'
import
NiceForm
from
'@/components/NiceForm'
import
{
mergeAllSchemas
}
from
'./schema'
import
{
useModelTypeChange
,
useEditHideField
,
useOrderFormInitEffect
,
useProductTableChangeForPay
,
useOrderUpdateChangeOther
}
from
'./effects'
import
{
orderCombination
,
orderTypeLabelMap
,
procurementProcessField
}
from
'./constant'
import
{
orderCombination
,
orderTypeLabelMap
,
procurementProcessField
,
procurementRenderField
,
procurmentRenderInit
}
from
'./constant'
import
{
OrderModalType
}
from
'@/constants/order'
import
ProductModalTable
from
'./components/productModalTable'
import
InquiryModalTable
from
'./components/inquiryModalTable'
...
...
@@ -143,18 +143,14 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
useEffect
(()
=>
{
if
(
id
)
{
setFormLoading
(
true
)
// @ts-ignore
PublicApi
.
getOrderProcurementOrderDetails
({
id
PublicApi
.
getOrderBuyerCreateDetail
({
orderId
:
id
}).
then
(
res
=>
{
const
{
data
}
=
res
setInitFormValue
({
...
data
,
products
:
[],
deliveryTime
:
formatTimeString
(
data
.
deliveryTime
)
})
const
_orderProductRequests
=
procurementRenderField
(
data
)
setInitFormValue
(()
=>
procurmentRenderInit
(
data
))
setTimeout
(()
=>
{
addSchemaAction
.
setFieldValue
(
'products'
,
data
.
orderProductRequests
)
addSchemaAction
.
setFieldValue
(
'products'
,
_
orderProductRequests
)
},
1000
)
setFormLoading
(
false
)
})
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/model/usePaymentInfo.tsx
View file @
15792e00
...
...
@@ -4,7 +4,7 @@ import { ISchemaFormActions, ISchemaFormAsyncActions } from '@formily/antd'
import
{
useEffect
,
useState
,
useRef
}
from
'react'
import
{
PublicApi
}
from
'@/services/api'
export
const
usePaymentInfo
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
memberId
:
any
,
memberRoleId
:
any
,
orderProducts
:
any
):
any
=>
{
export
const
usePaymentInfo
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
memberId
:
any
,
memberRoleId
:
any
,
orderProducts
:
any
=
[]
):
any
=>
{
const
paywayData
=
useRef
<
any
>
({})
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
paymentInformationColumns
)
// const { schemaActions, detailData } = useContext(ReadyAddOrderDetailContext)
...
...
@@ -58,7 +58,7 @@ export const usePaymentInfo = (ctx: ISchemaFormActions | ISchemaFormAsyncActions
const
handleSave
=
row
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
newData
=
[...
ctx
.
getFieldValue
(
'payments'
)];
const
index
=
newData
.
findIndex
(
item
=>
row
.
payCount
===
item
.
payCount
);
const
index
=
newData
.
findIndex
(
item
=>
row
.
batchNo
===
item
.
batchNo
);
const
item
=
newData
[
index
];
newData
.
splice
(
index
,
1
,
{
...
item
,
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/schema/index.ts
View file @
15792e00
...
...
@@ -96,7 +96,7 @@ const basicInfo: ISchema = {
"x-linkages"
:
[
{
type
:
'value:schema'
,
target
:
"
supplyMembers
Name"
,
target
:
"
vendorMember
Name"
,
condition
:
`{{$self.editable && !!$value}}`
,
schema
:
{
"x-component-props"
:
{
...
...
src/pages/transaction/purchaseOrder/readyAddOrder/model/useReadyAddOrder.tsx
View file @
15792e00
...
...
@@ -22,8 +22,8 @@ export const useSelfTable = () => {
}
const
handleEdit
=
(
record
:
any
)
=>
{
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/srm/edit?id=
${
record
.
orderId
}${
record
.
type
===
4
?
'&type=4'
:
''
}
`
)
// history.push(`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/edit?id=${record.id}${record.type === 4 ? '&type=4' : ''
}`)
const
{
orderType
}
=
record
history
.
push
(
`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/
${
orderType
===
1
?
'b2b'
:
'srm'
}
/edit?id=
${
record
.
orderId
}
`
)
}
/** 参照后台数据生成 */
...
...
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