Commit da5ecfd3 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix(营销能力): 修复bug

parent e76a0bc9
......@@ -29,6 +29,7 @@ const RecordLayout: React.FC<ProgressProps> = (props: any) => {
useEffect(() => {
if (!isEmpty(context)) {
console.log(context, 10086)
setLogStatus(context.externalLogs ? LOGSTATESTYPE.EXTERNALSTATES : LOGSTATESTYPE.INTERIORSTATES)
setData(context)
}
......
......@@ -65,6 +65,7 @@ const lotteryNumType = {
}
/** 活动类型 */
export const GeneralEffect = (int, data) => {
const allowActivity = (data?.allowActivity ? data.allowActivity : []);
switch (Number(int)) {
case 1:
case 2:
......@@ -73,7 +74,7 @@ export const GeneralEffect = (int, data) => {
{
col: [
{
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
......@@ -129,7 +130,7 @@ export const GeneralEffect = (int, data) => {
</>
},
{
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
......@@ -159,7 +160,7 @@ export const GeneralEffect = (int, data) => {
</>
},
{
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity && data.allowActivity.map((item, index) => (
label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
......@@ -194,7 +195,7 @@ export const GeneralEffect = (int, data) => {
</Space>
},
{
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
......@@ -219,7 +220,7 @@ export const GeneralEffect = (int, data) => {
col: [
{ label: '优惠规则', extra: `任选 ${data.num} 件, 付 ${data.price} 元` },
{
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
......@@ -319,7 +320,7 @@ export const GeneralEffect = (int, data) => {
</>
},
{
label: '叠加活动类型', extra: <Space wrap>{data.allowActivity.map((item, index) => (
label: '叠加活动类型', extra: <Space wrap>{allowActivity.map((item, index) => (
<StatusTag key={`default_key_${index}`} type="default" title={ACTIVITYTYPENAME[item]} />
))}
</Space>
......
......@@ -76,7 +76,7 @@ const CollocationLayout: React.FC<CollocationLayoutProps> = (props: any) => {
status: 5,
productImgUrl: item.mainPic,
unit: item.unitName,
price: item.unitPrice['0-0']
price: item.unitPrice && item.unitPrice['0-0']
}
})
})
......
......@@ -65,8 +65,8 @@ const DetialLayout = () => {
}
const handleGeneralEffect = (data: any, int?: number) => {
console.log(data, 10086)
if (!isEmpty(data)) {
console.log(GeneralEffect(int, data))
setGeneralEffect(GeneralEffect(int, data))
}
}
......
......@@ -84,16 +84,65 @@ const DetialLayout = () => {
}
let { data } = res;
let externalLogStates: any = []
data.outerTaskStepList.forEach((item: any) => {
externalLogStates.push({
state: item.step,
stateName: null,
isExecute: item.isExecute,
operationalProcess: item.taskName,
roleName: item.roleName,
let interiorLogStates: any = [];
let externalLogs: any = [];
let interiorLogs: any = [];
if (data.outerTaskStepList) {
data.outerTaskStepList.forEach((item: any) => {
externalLogStates.push({
state: item.step,
stateName: null,
isExecute: item.isExecute,
operationalProcess: item.taskName,
roleName: item.roleName,
})
})
})
data.externalLogStates = externalLogStates;
data.externalLogStates = externalLogStates;
}
if (data.innerTaskStepList) {
data.innerTaskStepList.forEach((item: any) => {
interiorLogStates.push({
state: item.step,
stateName: null,
isExecute: item.isExecute,
operationalProcess: item.taskName,
roleName: item.roleName,
})
})
data.interiorLogStates = interiorLogStates;
}
if (data.outerRecordDOList) {
data.outerRecordDOList.forEach((item: any, index: number) => {
externalLogs.push({
operation: item.operate,
createTime: item.operateTime,
roleName: item.roleName,
auditOpinion: item.opinion,
stateName: item.statusName,
id: index + 1,
state: item.status,
step: index,
})
})
data.externalLogs = externalLogs;
}
if (data.innerRecordDOList) {
data.innerRecordDOList.forEach((item: any, index: number) => {
interiorLogs.push({
department: item.department,
position: item.jobTitle,
operation: item.operate,
createTime: item.operateTime,
roleName: item.operator,
auditOpinion: item.opinion,
stateName: item.statusName,
id: index + 1,
state: item.status,
step: index,
})
})
data.interiorLogs = interiorLogs;
}
setValue(data.activityType)
setDataSource(data);
handleBasicEffect(data);
......
......@@ -92,6 +92,7 @@ const DetialLayout = () => {
operationalProcess: item.taskName,
roleName: item.roleName,
})
data.externalLogStates = externalLogStates;
})
data.innerTaskList.forEach((item: any) => {
interiorLogStates.push({
......@@ -101,6 +102,7 @@ const DetialLayout = () => {
operationalProcess: item.taskName,
roleName: item.roleName,
})
data.interiorLogStates = interiorLogStates;
})
data.outerRecordDOList.forEach((item: any, index: number) => {
externalLogs.push({
......@@ -113,6 +115,7 @@ const DetialLayout = () => {
state: item.status,
step: index,
})
data.externalLogs = externalLogs;
})
data.innerRecordDOList.forEach((item: any, index: number) => {
interiorLogs.push({
......@@ -132,11 +135,8 @@ const DetialLayout = () => {
state: item.step,
step: item.step,
})
data.interiorLogs = interiorLogs;
})
data.externalLogStates = externalLogStates;
data.interiorLogStates = interiorLogStates;
data.externalLogs = externalLogs;
data.interiorLogs = interiorLogs;
setAllusers([
{
title: '适用用户',
......
......@@ -59,7 +59,7 @@ const PartakeUserLayout: React.FC<PartakeUserLayoutProps> = (props: any) => {
}
const levelConfigPage = (memberTypes) => {
PublicApi.getMemberManageMarketingSuitableLevelConfigPage({ levelConfigIds: '', roleIds: '', memberTypes, current: '1', pageSize: '999' }).then(res => {
PublicApi.getMemberManageMarketingSuitableLevelConfigPage({ levelConfigIds: '', roleIds: '', memberTypes: '', current: '1', pageSize: '999' }).then(res => {
if (res.code !== 1000) {
return
}
......
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