Commit 956c6f55 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents bcb2fd0b 1a9671cf
......@@ -1139,5 +1139,5 @@ export default {
"49114": "Sorting cannot be repeated",
"49117": 'Sorting under the same recommendation label cannot be repeated',
"21055": "The payment request amount of the document in the current payment request is greater than the remaining payment amount of the document",
"49116": "The sorting cannot be empty when the recommended label is selected"
}
......@@ -1138,4 +1138,5 @@ export default {
"49114": "정렬은 중복될 수 없습니다.",
"49117": '같은 추천 탭 아래 정렬 중복 불가',
"21055": "현재 청구서에 증빙서류가 존재하는 청구금액은 증빙서류의 남은 지불금액보다 크다",
"49116": "추천 태그를 선택한 경우 정렬이 비워둘 수 없습니다."
}
......@@ -1139,4 +1139,5 @@ export default {
"49114": "排序不能重复",
"49117": "同一推荐标签下排序不能重复",
"21055": "当前请款单中存在单据的请款金额大于单据剩余支付金额",
"49116": "选择推荐标签的情况下排序不能为空"
}
......@@ -204,7 +204,7 @@ const createComponent = (
props: isDept
? omit(current, ['childrenData'])
: specialKey && specialKey === otherProps[floor - 1].type
? { label: labels[`${rest.join("-")}-${childProps.id}`] || [] , ...childProps }
? { label: labels[`${rest.join("-")}-${childProps?.id}`] || [] , ...childProps }
: childProps,
otherProps: otherProps[floor - 1],
childNodes: parentChildKeys,
......
......@@ -158,7 +158,8 @@ const EditPanelForm = () => {
const isCombination = componentType === 'combinationItem';
/** 如果是组合促销, 要是已经选择了一个组合促销数据,那么搜索活动商品列表时需要添加当前活动id */
let withActivityId = {};
if (isCombination) {
if (isCombination && parentKey) {
console.log("combination_", `combination_${+(parentKey) - 1}`, sameKeys, parentKey, selectedInfo)
const [,currentCombinationActivityId] = sameKeys[`combination_${+(parentKey) - 1}`][0].split('_');
withActivityId = currentCombinationActivityId === 'undefined' ? {} : { id: currentCombinationActivityId }
}
......
......@@ -68,8 +68,22 @@
.commodityItem {
flex-basis: 50%;
padding-right: 8px;
}
}
}
.footer {
margin-top: auto;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.btn {
font-size: 12px;
padding: 4px 8px;
background-color: rgb(239, 51, 70);
border-radius: 16px;
color: #fff;
}
}
......@@ -11,6 +11,7 @@ import SwapCoupon from './swapCoupon';
import SwapProduct from './swapProduct';
import { getIntl } from 'umi'
import { GetMarketingAdornActivityGoodsAdornResponse } from '@/services/MarketingV2Api';
import Price from '../../Price';
const intl = getIntl();
const { TabPane } = Tabs;
......@@ -151,15 +152,25 @@ const CommodityItem: React.FC<Iprops> = (props: Iprops) => {
const commodityProps = mode === 'horizontal' ? horizontalData : verticalData;
const renderFooter = () => {
return (
<div className={styles.footer}>
<Price originalPrice={commodityProps?.originalPrice!} discountPrice={commodityProps?.discountPrice} />
<div className={styles["btn"]}>
<div>{intl.formatMessage({id: 'activityPage.buyNow'})}</div>
</div>
</div>
)
}
return (
<div className={classNameStr} >
<div {...divProps} className={className}>
<Commodity
footer={renderFooter()}
{...commodityProps}
/>
</div>
</div>
);
};
......
......@@ -8,6 +8,7 @@ import styles from './swapCoupon.less';
import Tabbar from './tabbar';
import TabFooter from './tabFooter';
import { getIntl } from 'umi'
import Price from '../../Price';
const intl = getIntl();
const { TabPane } = Tabs;
......@@ -19,7 +20,7 @@ const SwapCoupon = (props) => {
const restProps = omit(other, ["getOperateState", "onClick", "onDrag", "onDragEnd", "onDragEnter", "onDragStart", "onMouseOver", "draggable"]);
const isEmpty = typeof restProps['productName'] === 'undefined';
const { onClick, onDrag, onDragEnd, onDragEnter, onDragStart, onMouseOver, getOperateState } = other as any;
const { onClick, onMouseOver, getOperateState } = other as any;
const divProps = {
onClick, onMouseOver,
......@@ -38,6 +39,14 @@ const SwapCoupon = (props) => {
);
}
const renderFooter = () => {
return (
<div className={styles.footer}>
<Price originalPrice={price} discountPrice={price} />
</div>
)
}
return (
<div className={className} {...divProps}>
<div className={styles.section}>
......@@ -49,6 +58,7 @@ const SwapCoupon = (props) => {
discountPrice={price}
tags={[intl.formatMessage({ id: 'activityPage.giveCoupon' })]}
buyBtn={false}
footer={renderFooter()}
/>
</div>
<div className={styles.tab}>
......
......@@ -9,6 +9,7 @@ import Tabbar from './tabbar';
import TabFooter from './tabFooter';
// import { useIntl} from 'umi'
import { getIntl } from 'umi'
import Price from '../../Price';
const intl = getIntl();
const { TabPane } = Tabs;
......@@ -38,6 +39,14 @@ const SwapProduct = (props) => {
);
}
const renderFooter = () => {
return (
<div className={styles.footer}>
<Price originalPrice={price} discountPrice={price} />
</div>
)
}
return (
<div className={className} {...divProps}>
<div className={styles.section}>
......@@ -49,6 +58,7 @@ const SwapProduct = (props) => {
discountPrice={price}
tags={[intl.formatMessage({ id: 'activityPage.complimentaryGoods' })]}
buyBtn={false}
footer={renderFooter()}
/>
</div>
<div className={styles.tab}>
......
......@@ -11,6 +11,22 @@
}
}
.footer {
margin-top: auto;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
.btn {
font-size: 12px;
padding: 4px 8px;
background-color: rgb(239, 51, 70);
border-radius: 16px;
color: #fff;
}
}
.hide {
......
......@@ -3,6 +3,7 @@ import { Commodity, Progress } from '@linkseeks/design-ui';
import styles from './index.less';
import classNames from 'classnames';
import { getIntl } from 'umi';
import Price from '../../Price';
const intl = getIntl();
interface IChildprops {
className: string,
......@@ -77,7 +78,17 @@ const Item: React.FC<IChildprops> = (props: IChildprops) => {
const divProps = {
onClick, onMouseOver,
};
console.log(other, "other");
const renderFooter = () => {
return (
<div className={styles.footer}>
<Price originalPrice={other?.price!} discountPrice={other?.activityPrice} />
<div className={styles["btn"]}>
<div>{intl.formatMessage({id: 'activityPage.buyNow'})}</div>
</div>
</div>
)
}
return (
<div className={styles.item}>
......@@ -86,9 +97,9 @@ const Item: React.FC<IChildprops> = (props: IChildprops) => {
name={other.productName}
image={other.productImgUrl}
mode="horizontal"
discountPrice={other.activityPrice}
price={other.price}
buyBtnText={intl.formatMessage({id: 'activityPage.buyNow'})}
// discountPrice={other.activityPrice}
// price={other.price}
// buyBtnText={intl.formatMessage({id: 'activityPage.buyNow'})}
progress={
<Progress
percent={50}
......@@ -101,6 +112,7 @@ const Item: React.FC<IChildprops> = (props: IChildprops) => {
}
/>
}
footer={renderFooter()}
/>
</div>
</div>
......
......@@ -9,12 +9,23 @@
flex-wrap: wrap;
.item {
flex: 50%;
// flex-basis: 50%;
width: 50%;
padding-right: 8px;
margin-bottom: 12px;
.couponItem {
height: 84px;
color: #EF3346;
.right {
// writing-mode: vertical-rl;
width: 15px;
font-size: 12px;
line-height: 12px;
margin: 0 0 0 4px;
word-wrap: break-word;
}
}
}
}
......@@ -15,15 +15,11 @@ interface Iprops {
status: boolean,
// visible: 0 | 1,
onClick: () => void,
// onDrag: () => void,
// onDragEnd: () => void,
// onDragEnter: () => void,
// onDragStart: () => void,
onMouseOver: () => void,
getOperateState: any,
}
const Coupon: React.FC<Iprops> & { Item: typeof CouponItem } = (props: Iprops) => {
const Coupon: React.FC<Iprops> & { Item: typeof Item } = (props: Iprops) => {
const { children, className, status = true, ...other } = props;
const visible = status;
const classNameStr = cx(
......@@ -54,10 +50,6 @@ interface ItemIprops {
children: React.ReactNode,
className: string,
onClick: () => void,
// onDrag: () => void,
// onDragEnd: () => void,
// onDragEnter: () => void,
// onDragStart: () => void,
onMouseOver: () => void,
draggable?: false
getOperateState: any,
......@@ -75,7 +67,6 @@ interface ItemIprops {
}
const Item: React.FC<ItemIprops> = (props: ItemIprops) => {
// const intl = useIntl();
const { children, className, ...other} = props;
const { onClick, onMouseOver, getOperateState, ...rest} = other;
const { denomination, tag, useConditionMoney, typeName } = rest as any;
......@@ -83,10 +74,21 @@ const Item: React.FC<ItemIprops> = (props: ItemIprops) => {
onClick, onMouseOver,
};
const isNotNull = useMemo(() => rest?.id && true, [rest]);
const right = () => {
return (
<div className={styles.right}>
{getIntl().formatMessage({ id: 'activityPage.pickNow' })}
</div>
)
}
return (
<div className={cx(styles.item)}>
<div {...divProps} className={className}>
<CouponsItem
<CouponsItem
currency={getIntl().formatMessage({ id: 'common.money' })}
rightRender={right()}
money={denomination}
isnull={!isNotNull}
typeName={typeName}
......
......@@ -14,11 +14,16 @@ const Price: React.FC<Iprops> = (props: Iprops) => {
<div className={styles.price}>
<div className={styles.originalPrice}>
<span className={styles.currency}>{getIntl().formatMessage({ id: 'common.money' })}</span>
<span>{originalPrice}/{unit}</span>
</div>
<div className={styles.discountPrice}>
{getIntl().formatMessage({ id: 'common.money' })}{discountPrice}/{unit}
<span>{originalPrice || discountPrice}/{unit}</span>
</div>
{
(originalPrice !== discountPrice || !originalPrice) && (
<div className={styles.discountPrice}>
{getIntl().formatMessage({ id: 'common.money' })}{discountPrice}/{unit}
</div>
) || null
}
</div>
)
}
......
......@@ -11,7 +11,6 @@ import SearchPannel from './components/SearchPannel';
import { getTemplateWebActivityPagePage, GetTemplateWebActivityPagePageRequest, GetTemplateWebActivityPagePageResponseDetail, postTemplateWebActivityPageDelete, postTemplateWebActivityPageOpenOffLine } from '@/services/TemplateV2Api';
import { useIntl } from 'umi'
const { Search } = Input;
type SearchParamsType = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment