|
@@ -267,7 +267,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="separate-module-con">
|
|
|
- <a-tabs v-model="selectPackageTabs">
|
|
|
+ <a-tabs v-model="selectPackageTabs" @change="handleSelectPackageTabs">
|
|
|
<a-tab-pane key="1" tab="新建定向">
|
|
|
<p class="rock-title">用户定向</p>
|
|
|
<a-form-model-item label="地域">
|
|
@@ -319,17 +319,46 @@
|
|
|
</a-form-model-item>
|
|
|
<div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '1'" class="adver-position-radio">
|
|
|
<div style="width: 60%;">
|
|
|
- <directional-logic ref="direct" packtype="directional" multitype="alone" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistinclude="configForm.updateGetingInclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
|
|
|
+ <directional-logic
|
|
|
+ ref="direct"
|
|
|
+ packtype="directional"
|
|
|
+ multitype="alone"
|
|
|
+ :defaultlist="directionalData"
|
|
|
+ :valueids="configForm.adRetargetingTagsType"
|
|
|
+ :updatelistinclude="configForm.updateGetingInclude" @selection-alone-event="handleSelectionAloneEvent"
|
|
|
+ @clearlist="handleClearlist"
|
|
|
+ >
|
|
|
+ </directional-logic>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '2'" class="adver-position-radio">
|
|
|
<div style="width: 60%;">
|
|
|
- <directional-logic ref="exclude" packtype="exclude" multitype="alone" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistexclude="configForm.updateGetingExclude" @selection-alone-event="handleSelectionAloneEvent"></directional-logic>
|
|
|
+ <directional-logic
|
|
|
+ ref="exclude"
|
|
|
+ packtype="exclude"
|
|
|
+ multitype="alone"
|
|
|
+ :defaultlist="directionalData"
|
|
|
+ :valueids="configForm.adRetargetingTagsType"
|
|
|
+ :updatelistexclude="configForm.updateGetingExclude" @selection-alone-event="handleSelectionAloneEvent"
|
|
|
+ @clearlist="handleClearlist"
|
|
|
+ >
|
|
|
+ </directional-logic>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="configForm.customPerson === 'a' && configForm.adRetargetingTagsType === '3'" class="adver-position-radio">
|
|
|
<div style="width: 60%;">
|
|
|
- <directional-logic ref="twoway" packtype="twoway" multitype="all" :defaultlist="directionalData" :valueids="configForm.adRetargetingTagsType" :updatelistinclude="configForm.updateGetingInclude" :updatelistexclude="configForm.updateGetingExclude" @selection-direct-event="handleDirectEvent" @selection-exclude-event="handleExcludeEvent"></directional-logic>
|
|
|
+ <directional-logic
|
|
|
+ ref="twoway"
|
|
|
+ packtype="twoway"
|
|
|
+ multitype="all"
|
|
|
+ :defaultlist="directionalData"
|
|
|
+ :valueids="configForm.adRetargetingTagsType"
|
|
|
+ :updatelistinclude="configForm.updateGetingInclude"
|
|
|
+ :updatelistexclude="configForm.updateGetingExclude" @selection-direct-event="handleDirectEvent"
|
|
|
+ @selection-exclude-event="handleExcludeEvent"
|
|
|
+ @clearlist="handleClearlist"
|
|
|
+ >
|
|
|
+ </directional-logic>
|
|
|
</div>
|
|
|
</div>
|
|
|
<a-form-model-item label="媒体定向">
|
|
@@ -555,6 +584,7 @@
|
|
|
:max="10000"
|
|
|
:step="0.01"
|
|
|
placeholder="请输入"
|
|
|
+ @blur="handleAdMinBidBlur"
|
|
|
/>
|
|
|
<span>~</span>
|
|
|
</a-form-model-item>
|
|
@@ -566,6 +596,7 @@
|
|
|
:max="10000"
|
|
|
:step="0.01"
|
|
|
placeholder="请输入"
|
|
|
+ @blur="handleAdMaxBidBlur"
|
|
|
/> 元
|
|
|
</a-form-model-item>
|
|
|
</div>
|
|
@@ -578,6 +609,7 @@
|
|
|
:max="10000"
|
|
|
:step="0.01"
|
|
|
placeholder="请输入"
|
|
|
+ @blur="handleAdMinBidBlur"
|
|
|
/>
|
|
|
<span>~</span>
|
|
|
</a-form-model-item>
|
|
@@ -589,6 +621,7 @@
|
|
|
:max="10000"
|
|
|
:step="0.01"
|
|
|
placeholder="请输入"
|
|
|
+ @blur="handleAdMaxBidBlur"
|
|
|
/> 元
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="浮动间隔" prop="adStepBid">
|
|
@@ -1061,7 +1094,7 @@ export default {
|
|
|
productSellingPoints: [], // 商品买点
|
|
|
adBudgetMode: 'BUDGET_MODE_DAY', // 预算类型
|
|
|
adDownloadUrl: '', // 下载链接
|
|
|
- accountBudget: 0, // 账户日预算
|
|
|
+ accountBudget: 1000, // 账户日预算
|
|
|
accountId: undefined, // 账户
|
|
|
dpLinkStartIndex: 1,
|
|
|
dpLinkEndIndex: 2,
|
|
@@ -1234,6 +1267,31 @@ export default {
|
|
|
methods: {
|
|
|
...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
moment,
|
|
|
+ handleSelectPackageTabs(e) {
|
|
|
+ if (e === '1') {
|
|
|
+ this.configForm.adAudiencePackageId = undefined;
|
|
|
+ this.packageMessageDetail = [];
|
|
|
+ }
|
|
|
+ else if (e === '2') {
|
|
|
+ this.configForm.adDistrict = 'NONE';
|
|
|
+ this.listArr = [];
|
|
|
+ this.configForm.adLocationType = 'HOME';
|
|
|
+ this.configForm.adGender = 'NONE';
|
|
|
+ this.configForm.adSelectAge = ['NONE'];
|
|
|
+ this.configForm.customPerson = 'NONE';
|
|
|
+ this.configForm.updateGetingInclude = [];
|
|
|
+ this.configForm.adRetargetingTagsInclude = '';
|
|
|
+ this.configForm.adRetargetingTagsExclude = '';
|
|
|
+ this.configForm.updateGetingExclude = [];
|
|
|
+ this.configForm.adRetargetingTagsType = '';
|
|
|
+ this.configForm.adPlatform = 'NONE';
|
|
|
+ this.configForm.adDeviceSelectType = ['NONE'];
|
|
|
+ this.configForm.adAndroidVersion = 'NONE';
|
|
|
+ this.configForm.adSelectAc = ['NONE'];
|
|
|
+ this.configForm.adHideIfExists = '0';
|
|
|
+ this.configForm.adAutoExtendEnabled = '0';
|
|
|
+ }
|
|
|
+ },
|
|
|
handleCustomPerson(e) {
|
|
|
const defaultValue = e.target.value;
|
|
|
if (defaultValue === 'NONE') {
|
|
@@ -1273,6 +1331,12 @@ export default {
|
|
|
handleFloatingInterval(e) {
|
|
|
this.configForm.adStepBid = Number(Number(e.target.value).toFixed(2));
|
|
|
},
|
|
|
+ handleAdMinBidBlur(e) {
|
|
|
+ this.configForm.adMinBid = Number(Number(e.target.value).toFixed(2));
|
|
|
+ },
|
|
|
+ handleAdMaxBidBlur(e) {
|
|
|
+ this.configForm.adMaxBid = Number(Number(e.target.value).toFixed(2));
|
|
|
+ },
|
|
|
handleDirectionalList() {
|
|
|
const paramsData = {
|
|
|
accountId: this.configForm.accountId
|
|
@@ -1305,6 +1369,12 @@ export default {
|
|
|
this.configForm.adRetargetingTagsInclude = '';
|
|
|
}
|
|
|
},
|
|
|
+ handleClearlist() {
|
|
|
+ this.configForm.updateGetingInclude = [];
|
|
|
+ this.configForm.adRetargetingTagsInclude = '';
|
|
|
+ this.configForm.adRetargetingTagsExclude = '';
|
|
|
+ this.configForm.updateGetingExclude = [];
|
|
|
+ },
|
|
|
handleDirectEvent(list) {
|
|
|
this.configForm.updateGetingInclude = list;
|
|
|
this.configForm.adRetargetingTagsInclude = list && list.join(',');
|
|
@@ -1376,6 +1446,7 @@ export default {
|
|
|
},
|
|
|
handleAdCpaBidBlur(e) {
|
|
|
const defaultValue = e.target.value;
|
|
|
+ this.configForm.adCpaBid = Number(Number(defaultValue).toFixed(2));
|
|
|
if (this.configForm.adBudget > 0 && defaultValue > this.configForm.adBudget) {
|
|
|
this.isAdCpaBidBlur = true;
|
|
|
this.adCpaBidBlurTxt = '出价不能大于预算';
|
|
@@ -1528,7 +1599,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleAccountMode(e) {
|
|
|
- this.configForm.accountBudget = 0;
|
|
|
+ if (e.target.value === '1') {
|
|
|
+ this.configForm.accountBudget = 0;
|
|
|
+ }
|
|
|
+ else if (e.target.value === '2') {
|
|
|
+ this.configForm.accountBudget = 1000;
|
|
|
+ }
|
|
|
},
|
|
|
handleAdDownLoadType(e) {
|
|
|
this.optimizationOption = [];
|
|
@@ -2037,6 +2113,20 @@ export default {
|
|
|
this.$message.error('请选择已有定向包');
|
|
|
return;
|
|
|
}
|
|
|
+ if (paramsFormData.customPerson === 'a') {
|
|
|
+ if (paramsFormData.adRetargetingTagsType === '1' && !paramsFormData.adRetargetingTagsInclude) {
|
|
|
+ this.$message.error('请选择人群');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else if (paramsFormData.adRetargetingTagsType === '2' && !paramsFormData.adRetargetingTagsExclude) {
|
|
|
+ this.$message.error('请选择人群');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else if (paramsFormData.adRetargetingTagsType === '3' && (!paramsFormData.adRetargetingTagsExclude || !paramsFormData.adRetargetingTagsInclude)) {
|
|
|
+ this.$message.error('请选择人群');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this.configForm.adScheduleType === 'SCHEDULE_START_END' && !this.configForm.launchDateRange.length) {
|
|
|
this.$message.error('请选择投放时间');
|
|
|
return;
|