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
d1dd0b8d
Commit
d1dd0b8d
authored
Nov 30, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 装修目录下文案提取
parent
45de8cd6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
31 deletions
+31
-31
common.ts
src/locales/zh-CN/common.ts
+4
-0
editor.ts
src/locales/zh-CN/editor.ts
+4
-0
index.tsx
src/pages/editor/components/drawer/commodityDrawer/index.tsx
+12
-11
schema.tsx
...pages/editor/components/drawer/commodityDrawer/schema.tsx
+8
-7
index.tsx
src/pages/editor/components/drawer/couponsDrawer/index.tsx
+2
-11
index.tsx
src/pages/shop/templateDetail/index.tsx
+1
-2
No files found.
src/locales/zh-CN/common.ts
View file @
d1dd0b8d
...
...
@@ -37,12 +37,16 @@
'common.unit.individual.character'
:
'个字符'
,
/** text */
'common.text.to'
:
'至'
,
'common.text.longest'
:
'最长'
,
'common.text.select'
:
'选择'
,
'common.text.most'
:
'最多'
,
'common.text.platform'
:
'平台'
,
'common.text.business'
:
'商家'
,
'common.text.platform.activity'
:
'平台活动'
,
'common.text.business.activity'
:
'商家活动'
,
'common.text.search'
:
'搜索'
,
'common.text.validity.date'
:
'有效期'
,
/** form */
'common.form.name.placeholder'
:
'请输入姓名'
,
...
...
src/locales/zh-CN/editor.ts
View file @
d1dd0b8d
...
...
@@ -16,13 +16,17 @@ export default {
'editor.drawer.activity.columns.startTime'
:
'有效期'
,
'editor.drawer.activity.columns.memberName'
:
'所属'
,
'editor.drawer.activity.title'
:
'选择活动'
,
'editor.drawer.commodity.title'
:
'选择商品'
,
'editor.drawer.coupons.title'
:
'选择优惠券'
,
'editor.drawer.activity.product.title'
:
'选择活动商品'
,
'editor.drawer.activity.product.search.id'
:
'输入活动ID进行搜索'
,
'editor.drawer.activity.columns.productInfo'
:
'商品信息'
,
'editor.columns.category'
:
'品类'
,
'editor.columns.brand'
:
'品牌'
,
'editor.columns.commodityId'
:
'商品ID'
,
'editor.columns.memberName'
:
'商家名称'
,
'editor.columns.unit'
:
'单价'
,
'editor.columns.unitName'
:
'价格'
,
'editor.columns.activityPrice'
:
'活动价'
,
}
src/pages/editor/components/drawer/commodityDrawer/index.tsx
View file @
d1dd0b8d
import
React
,
{
useState
,
useRef
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
Drawer
,
Button
,
message
,
Space
,
Tooltip
}
from
'antd'
;
import
{
FormEffectHooks
}
from
'@formily/antd'
import
{
StandardTable
}
from
'god'
;
...
...
@@ -47,6 +47,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
const
[
expandedRowKeys
,
setExpandedRowKeys
]
=
useState
<
any
>
([]);
const
ref
=
useRef
<
any
>
({});
const
{
memberId
,
memberRoleId
}
=
getAuth
()
||
{}
const
intl
=
useIntl
()
useEffect
(()
=>
{
setSelectedRowKeys
(
selectId
?
[
selectId
]
:
[]);
...
...
@@ -62,8 +63,8 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
<
img
src=
{
ActivityImage
}
style=
{
{
width
:
24
,
height
:
24
,
borderRadius
:
4
}
}
/>
<
span
>
{
item
?.
name
}
</
span
>
<
div
className=
{
styles
[
'defaultTag'
]
}
>
{
item
?.
type
}
</
div
>
<
StatusTag
title=
{
item
?.
belongType
===
1
?
'平台活动'
:
'商家活动'
}
type=
{
item
?.
belongType
===
1
?
'primary'
:
'success'
}
/>
<
div
style=
{
{
color
:
'#301333'
}
}
>
有效期:
{
item
.
startTime
&&
moment
(
item
.
startTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
至
{
item
.
endTime
&&
moment
(
item
.
endTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
</
div
>
<
StatusTag
title=
{
item
?.
belongType
===
1
?
intl
.
formatMessage
({
id
:
'common.text.platform.activity'
})
:
intl
.
formatMessage
({
id
:
'common.text.business.activity'
})
}
type=
{
item
?.
belongType
===
1
?
'primary'
:
'success'
}
/>
<
div
style=
{
{
color
:
'#301333'
}
}
>
{
intl
.
formatMessage
({
id
:
'common.text.validity.date'
})
}
:
{
item
.
startTime
&&
moment
(
item
.
startTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
{
intl
.
formatMessage
({
id
:
'common.text.to'
})
}
{
item
.
endTime
&&
moment
(
item
.
endTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
</
div
>
</
Space
>
</
a
>
);
...
...
@@ -74,7 +75,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
const
columns
=
[
{
title
:
'商品信息'
,
title
:
intl
.
formatMessage
({
id
:
'editor.drawer.activity.columns.productInfo'
})
,
dataIndex
:
'name'
,
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -87,7 +88,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
)
},
{
title
:
'品类'
,
title
:
intl
.
formatMessage
({
id
:
'editor.columns.category'
})
,
dataIndex
:
'customerCategory'
,
render
:
(
_
,
_record
)
=>
{
let
_list
=
[];
...
...
@@ -100,12 +101,12 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
}
},
{
title
:
'品牌'
,
title
:
intl
.
formatMessage
({
id
:
'editor.columns.brand'
})
,
dataIndex
:
'brand'
,
render
:
(
_
,
_record
)
=>
<
span
>
{
_record
?.
brand
?.
name
}
</
span
>
},
{
title
:
'价格'
,
title
:
intl
.
formatMessage
({
id
:
'editor.columns.unitName'
})
,
dataIndex
:
'unitName'
,
render
:
(
_text
,
_record
)
=>
{
return
(
...
...
@@ -126,7 +127,7 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
onConfirm
?.(
selectedRows
);
}
}
else
{
message
.
warning
(
'请选择一条记录'
)
message
.
warning
(
intl
.
formatMessage
({
id
:
'common.tip.select.required'
})
)
}
}
...
...
@@ -183,14 +184,14 @@ const CommodityDrawer: React.FC<CommodityDrawerProps> = (props: CommodityDrawerP
bodyStyle=
{
drawerStyle
}
footerStyle=
{
drawerStyle
}
width=
{
1200
}
title=
{
'选择商品'
}
title=
{
intl
.
formatMessage
({
id
:
'editor.drawer.commodity.title'
})
}
visible=
{
visible
}
onClose=
{
onClose
}
destroyOnClose
footer=
{
<
div
style=
{
{
textAlign
:
'right'
,
}
}
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
取消
</
Button
>
<
Button
onClick=
{
_onConfirm
}
type=
"primary"
>
确定
</
Button
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
{
intl
.
formatMessage
({
id
:
'common.button.cancel'
})
}
</
Button
>
<
Button
onClick=
{
_onConfirm
}
type=
"primary"
>
{
intl
.
formatMessage
({
id
:
'common.button.confirm'
})
}
</
Button
>
</
div
>
}
>
...
...
src/pages/editor/components/drawer/commodityDrawer/schema.ts
→
src/pages/editor/components/drawer/commodityDrawer/schema.ts
x
View file @
d1dd0b8d
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
FormattedMessage
}
from
'umi'
const
CommoditySchema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -8,7 +9,7 @@ const CommoditySchema: ISchema = {
type
:
'string'
,
'x-component'
:
'ModalSearch'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
placeholder
:
<
FormattedMessage
id=
'common.text.search'
/>
,
allowClear
:
true
,
align
:
'flex-start'
,
},
...
...
@@ -29,14 +30,14 @@ const CommoditySchema: ISchema = {
idInList
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'商品ID'
,
placeholder
:
<
FormattedMessage
id=
'common.text.commodityId'
/>
,
allowClear
:
true
,
},
},
memberName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'商家名称'
,
placeholder
:
<
FormattedMessage
id=
'common.text.memberName'
/>
,
allowClear
:
true
,
},
},
...
...
@@ -44,7 +45,7 @@ const CommoditySchema: ISchema = {
type
:
'string'
,
'x-component'
:
'CustomInputSearch'
,
'x-component-props'
:
{
placeholder
:
'品牌'
,
placeholder
:
<
FormattedMessage
id=
'common.text.brand'
/>
,
showSearch
:
true
,
showArrow
:
true
,
defaultActiveFirstOption
:
false
,
...
...
@@ -60,7 +61,7 @@ const CommoditySchema: ISchema = {
type
:
'string'
,
'x-component'
:
'CustomCategorySearch'
,
'x-component-props'
:
{
placeholder
:
'品类'
,
placeholder
:
<
FormattedMessage
id=
'common.text.category'
/>
,
showSearch
:
true
,
notFoundContent
:
null
,
style
:
{
width
:
'174px'
},
...
...
@@ -72,7 +73,7 @@ const CommoditySchema: ISchema = {
type
:
'array'
,
'x-component'
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
placeholder
:
[
<
FormattedMessage
id=
'common.form.startTime.placeholder'
/>,<
FormattedMessage
id=
'common.form.endTime.placeholder'
/>
],
allowClear
:
true
,
},
},
...
...
@@ -82,7 +83,7 @@ const CommoditySchema: ISchema = {
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
children
:
<
FormattedMessage
id=
'common.button.query'
/>
,
},
},
},
...
...
src/pages/editor/components/drawer/couponsDrawer/index.tsx
View file @
d1dd0b8d
import
React
,
{
useState
,
useRef
,
useMemo
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
Drawer
,
Button
,
message
,
Space
,
Typography
}
from
'antd'
;
import
{
PlayCircleOutlined
,
PoweroffOutlined
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
...
...
@@ -15,11 +15,6 @@ import CouponPlatformIcon from '@/assets/couponIcons/coupon_platform.png';
import
CouponShopIcon
from
'@/assets/couponIcons/coupon_shop.png'
;
import
*
as
tableSchemas
from
'./schema'
;
const
options
=
[
{
label
:
'平台'
,
value
:
1
},
{
label
:
'商家'
,
value
:
2
},
];
interface
CouponsDrawerProps
{
visible
:
boolean
,
onClose
:
()
=>
void
,
...
...
@@ -37,6 +32,7 @@ const CouponsDrawer: React.FC<CouponsDrawerProps> = (props: CouponsDrawerProps)
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
(
selectId
?
[
selectId
]
:
[]);
const
[
selectedRows
,
setSelectedRows
]
=
useState
<
any
>
([]);
const
ref
=
useRef
<
any
>
({});
const
intl
=
useIntl
()
const
_schema
=
useMemo
(()
=>
{
return
tableSchemas
[
`CouponSchema
${
type
}
`
]
},
[
type
])
...
...
@@ -120,11 +116,6 @@ const CouponsDrawer: React.FC<CouponsDrawerProps> = (props: CouponsDrawerProps)
}
}
const
_onRadioChange
=
(
e
:
any
)
=>
{
setType
(
e
.
target
.
value
);
ref
?.
current
?.
reload
();
}
const
fetchTableData
=
async
(
params
:
any
)
=>
{
const
_params
=
{
...
params
,
shopId
};
const
{
data
}
=
await
getMarketingCouponActivityPageSelectPage
(
_params
);
...
...
src/pages/shop/templateDetail/index.tsx
View file @
d1dd0b8d
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
useIntl
}
from
'umi'
import
{
useIntl
,
getLocale
}
from
'umi'
import
{
LayoutOutlined
,
EyeOutlined
,
PushpinOutlined
}
from
'@ant-design/icons'
import
cx
from
'classnames'
import
{
message
}
from
'antd'
...
...
@@ -27,7 +27,6 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
useEffect
(()
=>
{
fetchDetail
()
},
[])
const
fetchDetail
=
()
=>
{
...
...
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