diff --git a/src/pages/coupon/CouponConfig/components/FullReduce.tsx b/src/pages/coupon/CouponConfig/components/FullReduce.tsx
index 08e295e..208692f 100644
--- a/src/pages/coupon/CouponConfig/components/FullReduce.tsx
+++ b/src/pages/coupon/CouponConfig/components/FullReduce.tsx
@@ -174,7 +174,7 @@ export default function FullReduce({
{/* 实物兑换券选择兑换物品 */}
{classifyInfo.code === "dhyhq" && (
*兑换物品仅限一个} rules={[{ required: true, message: '请选择' }]}>
-
+
)}
{
return request.get(`${MKT_HOST}/erp/activity/change/coupon/info`, { params });
}
-/**
- * 保存奖品变更信息(优惠券)
- */
-export function saveChangeGift(params: MktConponSpace.ConListParams): http.PromiseResp {
- return request.post(`${MKT_HOST}/erp/activity/change/gift/save`, params);
-}
/**
* 变更奖项名称(礼包奖品名称)
diff --git a/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/Coupons.tsx b/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/Coupons.tsx
index 8a5ff9c..c46ca23 100644
--- a/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/Coupons.tsx
+++ b/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/Coupons.tsx
@@ -17,7 +17,7 @@ import {
deleteConfigList,
batchDeleteCoupon,
} from "@/pages/coupon/CouponConfig/api"; //删除优惠券配置
-import { getCouponChangeDetails, saveChangeCoupon, saveChangeGift, saveChangeAwardName } from '../../api';
+import { getCouponChangeDetails, saveChangeCoupon, saveChangeAwardName } from '../../api';
import { useStore } from "@/pages/mkt/ActivityCreate/index";
const { Column } = Table;
@@ -174,22 +174,7 @@ export default function Coupons({
if (!(coupon.index === undefined || coupon.itemIndex === undefined)) {
_savaList[coupon.index].giftItems[coupon.itemIndex] = pa;
}
- }
- /**优惠券变更 */
- if (coupon.giftItemId) {
- //@ts-ignore
- saveChangeGift({ ...pa, giftItemId: coupon.giftItemId, activityNo, giftId: value[0] && value[0].giftId }).then(res => {
- message.success("奖品变更成功");
- if (!(coupon.index === undefined || coupon.itemIndex === undefined)) {
- _savaList[coupon.index].giftItems[coupon.itemIndex] = { ...pa, giftItemId: coupon.giftItemId };
- }
- onChange && onChange([..._savaList]);
- }).catch(err => {
- message.error(err);
- });
- }
- if (!coupon.giftItemId && !coupon.confNo) {
- //新增
+ } else {
if (coupon.index !== undefined) {
_savaList[coupon.index].giftItems.push(pa);
setSaveList([..._savaList]);
@@ -372,21 +357,21 @@ export default function Coupons({
});
}}
>
- {itemIndex + 1}.{item.aliasName}
+ {itemIndex + 1}.{item.aliasName}
- {item.aliasName && !readOnly && (
+ {((item.aliasName && !readOnly) || changeEnable) && (
_onDelete(index, itemIndex)}
>
-
)}
- {item.aliasName && changeEnable && item.giftItemId && (
+ {/* {item.aliasName && changeEnable && item.giftItemId && (
- )}
+ )} */}
))}
@@ -418,8 +403,8 @@ export default function Coupons({
{!record.awardName.includes("谢谢惠顾") && (
setCoupon({
@@ -538,7 +523,7 @@ export default function Coupons({
{/* 优惠券配置 */}
setCoupon({ ...coupon, visible: false, confNo: undefined })}
onSave={_onSava}
remark="市场活动"
diff --git a/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignIn.tsx b/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignIn.tsx
index 9607a7d..e35c1c7 100644
--- a/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignIn.tsx
+++ b/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignIn.tsx
@@ -47,13 +47,13 @@ export default function index() {
gifts: fileds.gifts,
},
};
- if (changeEnable && pa.endTime == data.endTime) {
- message.info("暂无变更项");
- return;
- }
+ // if (changeEnable && pa.endTime == data.endTime) {
+ // message.info("暂无变更项");
+ // return;
+ // }
setSaveLoading(true);
const api = changeEnable ? saveChangeSignInApi : saveSignInApi;
- api(changeEnable ? { endTime, activityNo } : pa).then((res) => {
+ api(pa).then((res) => {
message.success("签到有礼保存成功");
getFlowConfig(activityNo);
})
diff --git a/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignupGifts.tsx b/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignupGifts.tsx
index eeceaf1..80f22a1 100644
--- a/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignupGifts.tsx
+++ b/src/pages/mkt/ActivityCreate/ExternalPromotion/components/ActivityFlow/SignupGifts.tsx
@@ -56,20 +56,7 @@ function SignupGifts({ value, onChange, disabled }: Props) {
const _tempDataSource = currentData.map((item) => (item.couponCode === tempObj.couponCode ? tempObj : item));
setGiftList(_tempDataSource);
onChange && onChange([{ ...value && value[0], giftItems: _tempDataSource }]);
- }
- /**优惠券变更 */
- if (coupon.giftItemId) {
- //@ts-ignore
- saveChangeGift({ ...pa, giftItemId: coupon.giftItemId, activityNo, giftId: value[0] && value[0].giftId }).then(res => {
- message.success("奖品变更成功");
- const _tempDataSource = currentData.map((item) => (item.giftItemId === coupon.giftItemId ? { ...pa, giftItemId: coupon.giftItemId } : item));
- setGiftList(_tempDataSource);
- onChange && onChange([{ ...value && value[0], giftItems: _tempDataSource }]);
- }).catch(err => {
- message.error(err);
- });
- }
- if (!coupon.confNo && !coupon.giftItemId) {
+ } else {
// 新增优惠券
currentData.push(pa);
setGiftList(currentData);
@@ -89,7 +76,7 @@ function SignupGifts({ value, onChange, disabled }: Props) {
}
- disabled={disabled}
+ disabled={disabled && !changeEnable}
onClick={() => setCoupon({
...coupon,
visible: true,
@@ -156,14 +143,14 @@ function SignupGifts({ value, onChange, disabled }: Props) {
record: ExternalPromotion.giftItems,
index: number
) => (
- disabled ? (
+ disabled && !changeEnable ? (
<>
- setCoupon({ ...coupon, visible: true, confNo: record.couponCode })}>{changeEnable ? "编辑" : "查看"}
- {record.giftItemId && (
+ setCoupon({ ...coupon, visible: true, confNo: record.couponCode })}>查看
+ {/* {record.giftItemId && (
setCoupon({ ...coupon, visible: true, giftItemId: record.giftItemId })}>
{!!changeEnable && 替换后续发放优惠券}
- )}
+ )} */}
>
) : (
@@ -199,7 +186,7 @@ function SignupGifts({ value, onChange, disabled }: Props) {
setCoupon({ ...coupon, visible: false, confNo: undefined, giftItemId: undefined })}
- disabled={coupon.giftItemId ? false : disabled}
+ disabled={coupon.giftItemId ? false : disabled && !changeEnable}
onSave={onSave}
remark="市场活动"
confNo={coupon.confNo}