Commit 51eb16b3 by crushh

update: dist

parent 959dd52c
......@@ -79,7 +79,7 @@
</el-form-item>
<el-form-item label="氛围弹幕">
<el-switch v-model="baseForm.bulletFlag" :active-value="1" :inactive-value="0" @change="handleDateChange" />
<div class="tips mt10">开启后,如有三名以上用户获奖后,活动首页将轮播展示用户中奖信息。</div>
<div class="tips mt10">开启后,如有三名以上用户获奖后,活动首页将轮播展示用户中奖信息。</div>
</el-form-item>
<el-form-item label="广告位">
<el-switch v-model="baseForm.adsFlag" :active-value="1" :inactive-value="0" />
......
......@@ -18,13 +18,11 @@
{{ el }}
</el-menu-item>
</el-menu>
<div class="iphone" v-if="menuActive == 0">
<div class="iphone">
<span class="gameTitle">{{ gameName }}</span>
<img src="../../../assets/img/Navbar.png" alt="" />
<gameTemplate :bgImg="bgImg" :tipsImg="tipsImg" :boxImg="boxImg" :adImg="adImg" :ruleData="ruleData" :templateId="templateId" :bullet="bullet" />
</div>
<div class="iphone" v-else>
<img :src="computedImg" />
<gameTemplate :bgImg="bgImg" :tipsImg="tipsImg" :boxImg="boxImg" :adImg="adImg" :ruleData="ruleData" :templateId="templateId" :bullet="bullet" v-if="menuActive == 0" />
<img :src="computedImg" v-else style="min-height:724px;" />
</div>
</div>
<div class="rightForm" v-show="!isInfo">
......@@ -385,10 +383,9 @@ export default {
// 校验必填
return Promise.all([this.$refs.baseConfig.nextStep('noNext'), this.$refs.prizeConfig.nextStep('noNext'), this.$refs.ruleConfig.nextStep('noNext')]).then(val => {
console.log(val);
if (!val.includes(false) && !val.includes(0)) {
if (!val.includes(false)) {
return true;
} else {
val.includes(0) ? this.$message.error('请确认必填字段都已填写且通过校验') : '';
return false;
}
});
......@@ -492,6 +489,7 @@ export default {
margin: 0 20px 0 13px;
position: relative;
overflow-y: auto;
overflow-x: hidden;
img {
width: 375px;
}
......
......@@ -162,6 +162,7 @@ img {
object-fit: fill;
}
.template-game {
height: 724px;
}
.bg-image {
width: 375px;
......
......@@ -294,6 +294,9 @@ export default {
}
}
});
this.$nextTick(() => {
this.$refs.prizeForm.clearValidate();
});
},
prizeStockRule(row) {
......@@ -377,7 +380,6 @@ export default {
this.prizeForm.gamePrizeList[index].optNum ? delete this.prizeForm.gamePrizeList[index].optNum : '';
this.prizeForm.gamePrizeList[index].prizeImageUrl ? delete this.prizeForm.gamePrizeList[index].prizeImageUrl : '';
if (val == 0) {
this.calculateRate();
this.prizeForm.gamePrizeList[index].prizeImageUrl = '';
this.prizeForm.gamePrizeList[index].prizeName = '谢谢参与';
this.prizeForm.gamePrizeList[index].prizeNumber = 1;
......@@ -386,6 +388,7 @@ export default {
this.prizeForm.gamePrizeList[index].prizeImageUrl = { imgUrl: this.imgeType[3], code: this.imgeType[3] };
}
this.$refs.prizeForm.clearValidate(`gamePrizeList.${index}.prizeStock`);
this.calculateRate();
this.prizeForm.gamePrizeList = this.prizeForm.gamePrizeList.splice(0);
},
handlePrizeNumChange(val, index) {
......@@ -430,7 +433,10 @@ export default {
this.scrollToError(this);
}
});
if (!this.boolVal) return false;
if (!this.boolVal) {
this.$message.error('请确认奖品配置的必填字段都已填写且通过校验');
return false;
}
this.prizeForm.gamePrizeList.forEach(item => {
if (item.prizeType == 2 && item.status != 0 && !item.isOld) {
invalid = true;
......
......@@ -417,7 +417,10 @@ export default {
this.scrollToError(this);
}
});
if (!this.boolVal) return 0;
if (!this.boolVal) {
this.$message.error('请确认规则设置的必填字段都已填写且通过校验');
return false;
}
return true;
},
nextStep(noNext) {
......
......@@ -41,11 +41,10 @@
<el-button class="check-detail" @click="toDetailPage(2)">查看详情</el-button>
</div>
</dm-sub-title>
<el-radio-group class="customize" v-model="dimension" @change="radioChange" v-if="isCard">
<el-radio-button label="1" value="1">卡券</el-radio-button>
<el-radio-button label="2" value="2">积分</el-radio-button>
<el-radio-group class="customize" v-model="dimension" @change="radioChange" v-show="dimensionOpt.length > 1">
<el-radio-button :label="item.label" v-for="item in dimensionOpt" :key="item.label">{{ item.value }}</el-radio-button>
</el-radio-group>
<el-table :data="prizeList" style="width:100%" :span-method="objectSpanMethod" v-if="dimension == '1'" class="mt20">
<el-table :data="prizeList" style="width:100%" :span-method="objectSpanMethod" v-if="dimension == 1" class="mt20">
<el-table-column v-for="v in tableHeader" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="v.prop" :prop="v.prop" :label="v.label" :formatter="v.formatter" :sortable="v.sortable" :fixed="v.fixed">
<template slot="header" v-if="v.tipsContent">
{{ v.label }}
......@@ -97,7 +96,7 @@ const tableHead = [
}
},
{
label: '库存',
label: '奖品数量',
prop: 'prizeTotalStock',
minWidth: '88',
formatter: function(row) {
......@@ -118,7 +117,7 @@ const tableHead = [
minWidth: '120',
tipsContent: '奖项中奖人数/中奖人数',
formatter: function(row) {
return `<span>${!isNaN(row.prizeWinningRate) ? row.prizeWinningRate + '%' : '- -'}</span>`;
return `<span>${row.prizeWinningRate ? row.prizeWinningRate + '%' : '- -'}</span>`;
}
},
{
......@@ -214,6 +213,14 @@ const pointHead = [
fixed: 'right'
}
];
const cardOpt = {
label: 1,
value: '卡券'
};
const pointOpt = {
label: 2,
value: '积分'
};
export default {
components: { TargetGroup },
data() {
......@@ -230,8 +237,9 @@ export default {
2: 'dm-status--info',
3: 'dm-status--error'
},
dimensionOpt: [],
baseData: {},
dimension: '1',
dimension: 1,
// type number:数字、time:时间、amount:金额、rate:百分比
originActivityData: [
[
......@@ -433,9 +441,15 @@ export default {
this.isCard = true;
this.getGameCardWriteOff(gameId); // 卡券核销数据
this.getGamePrize(1);
} else {
} else if (gamePrizeList.map(item => item.prizeType).includes(1)) {
this.getGamePrize(2);
}
if (gamePrizeList.map(item => item.prizeType).includes(2)) {
this.dimensionOpt.push(cardOpt);
}
if (gamePrizeList.map(item => item.prizeType).includes(1)) {
this.dimensionOpt.push(pointOpt);
}
});
},
getGamePrize(prizeType) {
......@@ -490,7 +504,7 @@ export default {
item.value = numFormat(value);
break;
case 'rate':
item.value = !isNaN(value) ? value + '%' : '- -';
item.value = value ? value + '%' : '- -';
break;
}
if (['shareCnt', 'openCardCnt'].includes(item.key)) {
......
......@@ -286,6 +286,12 @@
</el-table-column>
<el-table-column align="left" min-width="100" prop="sourceName" label="活动名称"></el-table-column>
<el-table-column align="left" min-width="100" prop="sourceCreatorName" label="活动创建人"></el-table-column>
<template v-if="isMoreAccount">
<el-table-column label="扣费规则" prop="accountRule" min-width="120">
<template slot-scope="{ row }">{{ accountRule(row.accountRule) }}</template>
</el-table-column>
<el-table-column label="费用归属部门" prop="accountDepartName" min-width="120" :formatter="(row, col, val) => val || '--'"></el-table-column>
</template>
<el-table-column align="left" min-width="100" prop="countNum" label="计费条数"></el-table-column>
<el-table-column align="left" min-width="100" prop="fee" label="消费金额(元)">
<template slot-scope="scope">{{ Number(scope.row.fee / 1000).toFixed(2) }}</template>
......
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