|
@@ -441,8 +441,15 @@
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
v-if="item.bidType == 1"
|
|
|
>
|
|
|
+ <!-- v-model="item.bid" -->
|
|
|
<a-input-number
|
|
|
- v-model="item.bid"
|
|
|
+
|
|
|
+ v-decorator="[
|
|
|
+ 'bid',
|
|
|
+ {
|
|
|
+ rules: [{ required: true, message: '出价必填' }],
|
|
|
+ },
|
|
|
+ ]"
|
|
|
@change="showTip(index)"
|
|
|
:style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }"
|
|
|
style="width: 100%"
|
|
@@ -458,10 +465,15 @@
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
v-else
|
|
|
>
|
|
|
+ <!-- v-model="item.cpaBid" -->
|
|
|
<a-input-number
|
|
|
- v-model="item.cpaBid"
|
|
|
+
|
|
|
+ v-decorator="[
|
|
|
+ 'cpaBid',
|
|
|
+ {
|
|
|
+ rules: [{ required: true, message: '目标成本必填' }],
|
|
|
+ },]"
|
|
|
@change="showTip(index)"
|
|
|
- :style="{ borderColor: item.showTipCheck ? 'red' : '#d9d9d9' }"
|
|
|
style="width: 100%"
|
|
|
>
|
|
|
</a-input-number>
|
|
@@ -472,7 +484,7 @@
|
|
|
}}</span>
|
|
|
<span
|
|
|
style="color: red; font-weight: 700"
|
|
|
- v-else-if="item.ocpxActionType == 2 && item.cpaBid && item.cpaBid > 1"
|
|
|
+ v-else-if="item.ocpxActionType == 2 && getData('cpaBid') && getData('cpaBid') > 1"
|
|
|
>
|
|
|
行为出价大于1元,请注意!!!
|
|
|
</span>
|
|
@@ -492,7 +504,7 @@
|
|
|
@change="deep_conversion_bidTip(index)"
|
|
|
:style="{ borderColor: item.deepConversionBidCheck ? 'red' : '#d9d9d9' }"
|
|
|
style="width: 100%"
|
|
|
- :disabled="item.cpaBid == ''"
|
|
|
+ :disabled="getData('cpaBid')==null||getData('cpaBid') == ''"
|
|
|
></a-input-number>
|
|
|
<span style="color: red" v-if="item.deepConversionBidCheck"
|
|
|
>深度转化目标成本必须高于优化目标成本,且不得高于3000元</span
|
|
@@ -503,7 +515,12 @@
|
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
>
|
|
|
- <a-input v-model="item.unitName" @change="checkGroup($event, index)"></a-input>
|
|
|
+ <!-- v-model="item.unitName" -->
|
|
|
+ <a-input v-decorator="[
|
|
|
+ 'unitName',
|
|
|
+ {
|
|
|
+ rules: [{ required: true, message: '广告组必填' }],
|
|
|
+ },]" @change="checkGroup($event, index)"></a-input>
|
|
|
<span style="color: red" v-if="item.unitNameCheck">广告组名称重复</span>
|
|
|
</a-form-item>
|
|
|
</div>
|
|
@@ -540,11 +557,25 @@
|
|
|
></a-input>
|
|
|
</a-form-item>
|
|
|
<a-form-item
|
|
|
+ label="创建类型"
|
|
|
+ :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
+ :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
+ >
|
|
|
+ <a-radio-group
|
|
|
+ buttonStyle="solid"
|
|
|
+ v-decorator="['createType', { rules: [{ required: true, message: '请选择目标应用' }], initialValue: '0' }]"
|
|
|
+ @change="getPageSize"
|
|
|
+ >
|
|
|
+ <a-radio-button value="0">单品</a-radio-button>
|
|
|
+ <a-radio-button value="1">混搭</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item
|
|
|
label="选择视频"
|
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
>
|
|
|
- <a @click="getVideoList()">选择视频</a> {{ videoList.length + '/' + getData('createCount') }}
|
|
|
+ <a @click="getVideoList()">选择视频</a> {{ videoList.length + '/' + (getData('createType')=='0'?getData('createCount'):getData('createCount')*15) }}
|
|
|
<br />
|
|
|
<div v-if="videoList.length > 0 && showVideo" style="display:flex;flex-wrap:wrap">
|
|
|
<span v-for="(item, index) of videoList" :key="index" style="position: relative" class="width-video">
|
|
@@ -605,10 +636,11 @@
|
|
|
label="创意分类"
|
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
+ v-if="creativeCategorySwitch"
|
|
|
>
|
|
|
<a-cascader
|
|
|
:options="createOptions"
|
|
|
- v-decorator="['creativeCategory']"
|
|
|
+ v-decorator="['creativeCategory',{ rules: [{ required: true, message: '创意分类必选' }] }]"
|
|
|
:fieldNames="fieldNames"
|
|
|
placeholder="请选择创意分类"
|
|
|
/>
|
|
@@ -617,19 +649,19 @@
|
|
|
label="创意标签"
|
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
+ v-if="creativeCategorySwitch"
|
|
|
>
|
|
|
<a-select
|
|
|
mode="tags"
|
|
|
style="width: 100%"
|
|
|
placeholder="按回车生成标签"
|
|
|
- v-decorator="['creativeTag']"
|
|
|
+ v-decorator="['creativeTag',{ rules: [{ required: true, message: '创意标签必填' }] }]"
|
|
|
dropdownClassName="display-none-selset"
|
|
|
:token-separators="[',', ' ', ',']"
|
|
|
>
|
|
|
</a-select>
|
|
|
<span v-if="getData('creativeTag') && getData('creativeTag').length > 10" style="color: red"
|
|
|
- >创意标签最多填写10个,请删减</span
|
|
|
- >
|
|
|
+ >创意标签最多填写10个,请删减</span>
|
|
|
<br />
|
|
|
<a-popconfirm @confirm="getInfo()">
|
|
|
<div slot="title">
|
|
@@ -708,6 +740,7 @@
|
|
|
label="第三方ActionBar点击监控链接"
|
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
+ v-if="actionbarClickUrlSwitch"
|
|
|
>
|
|
|
<a-input v-decorator="['actionbarClickUrl']" placeholder="请输入第三方点击监控链接"> </a-input>
|
|
|
<span style="color: red; position: relative; top: -10px">仅加白使用</span>
|
|
@@ -759,7 +792,8 @@
|
|
|
>
|
|
|
<a-tabs type="card" @change="callback" v-model="active" class="check-video">
|
|
|
<div slot="tabBarExtraContent">
|
|
|
- 当前选择数量{{ sumContent + '/' + getData('createCount') }}
|
|
|
+ 当前选择数量
|
|
|
+ {{ sumContent + '/' + (getData('createType')=='0'?getData('createCount'):getData('createCount')*15) }}
|
|
|
<a-button type="primary" @click="tongbu()" :loading="tongbuLoading" style="margin-left:10px">
|
|
|
刷新素材</a-button
|
|
|
>
|
|
@@ -1181,6 +1215,8 @@ export default {
|
|
|
],
|
|
|
templateList: [],
|
|
|
allianceAccount: false,
|
|
|
+ creativeCategorySwitch: false,
|
|
|
+ actionbarClickUrlSwitch: false,
|
|
|
tongbuLoading: false,
|
|
|
convert: false,
|
|
|
convertId: '',
|
|
@@ -1249,7 +1285,7 @@ export default {
|
|
|
cunTitleVisible: false,
|
|
|
cunTitleList: [],
|
|
|
createCount: 0,
|
|
|
- tongbuLoading:false
|
|
|
+ tongbuLoading: false,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -1667,14 +1703,29 @@ export default {
|
|
|
sum += this.checkVideoWai[i].length
|
|
|
}
|
|
|
this.sumContent = sum
|
|
|
- if (sum > this.getData('createCount')) {
|
|
|
- this.$message.error('最多选择' + this.getData('createCount') + '个素材')
|
|
|
- this.checkVideo = []
|
|
|
- this.sumContent = this.sumContent - 5
|
|
|
- if (this.active == 0) {
|
|
|
- this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
- } else if (this.active == 1) {
|
|
|
- this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
+ if (this.getData('createType') == '0') {
|
|
|
+ if (sum > this.getData('createCount')) {
|
|
|
+ this.$message.error('最多选择' + this.getData('createCount') + '个素材')
|
|
|
+ this.checkVideo = []
|
|
|
+ this.sumContent = this.sumContent - 5
|
|
|
+
|
|
|
+ if (this.active == 0) {
|
|
|
+ this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
+ } else if (this.active == 1) {
|
|
|
+ this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (sum > this.getData('createCount') * 15) {
|
|
|
+ this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
|
|
|
+ this.checkVideo = []
|
|
|
+ this.sumContent = this.sumContent - 15
|
|
|
+
|
|
|
+ if (this.active == 0) {
|
|
|
+ this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
+ } else if (this.active == 1) {
|
|
|
+ this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1699,14 +1750,28 @@ export default {
|
|
|
sum += this.checkVideoWai[i].length
|
|
|
}
|
|
|
this.sumContent = sum
|
|
|
- if (sum > this.getData('createCount')) {
|
|
|
- this.$message.error('最多选择' + this.getData('createCount') + '个素材')
|
|
|
- this.checkVideo.pop()
|
|
|
- this.sumContent--
|
|
|
- if (this.active == 0) {
|
|
|
- this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
- } else if (this.active == 1) {
|
|
|
- this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
+
|
|
|
+ if (this.getData('createType') == '0') {
|
|
|
+ if (sum > this.getData('createCount')) {
|
|
|
+ this.$message.error('最多选择' + this.getData('createCount') + '个素材')
|
|
|
+ this.checkVideo.pop()
|
|
|
+ this.sumContent--
|
|
|
+ if (this.active == 0) {
|
|
|
+ this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
+ } else if (this.active == 1) {
|
|
|
+ this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (sum > this.getData('createCount') * 15) {
|
|
|
+ this.$message.error('最多选择' + this.getData('createCount') * 15 + '个素材')
|
|
|
+ this.checkVideo.pop()
|
|
|
+ this.sumContent--
|
|
|
+ if (this.active == 0) {
|
|
|
+ this.checkVideoAll[this.ipagination.current - 1] = this.checkVideo
|
|
|
+ } else if (this.active == 1) {
|
|
|
+ this.checkVideoWai[this.ipagination.current - 1] = this.checkVideo
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1872,11 +1937,11 @@ export default {
|
|
|
addGroup() {
|
|
|
this.allForm.group.push({
|
|
|
bidType: 10,
|
|
|
- bid: '',
|
|
|
- cpaBid: '',
|
|
|
+ // bid: '',
|
|
|
+ // cpaBid: '',
|
|
|
showTipCheck: false,
|
|
|
deepConversionBidCheck: false,
|
|
|
- unitName: '',
|
|
|
+ // unitName: '',
|
|
|
unitNameCheck: false,
|
|
|
deepConversionType: '',
|
|
|
deepConversionBid: '',
|
|
@@ -1896,7 +1961,7 @@ export default {
|
|
|
},
|
|
|
deep_conversion_bidTip(index) {
|
|
|
if (
|
|
|
- this.allForm.group[index].deepConversionBid < this.allForm.group[index].cpaBid ||
|
|
|
+ this.allForm.group[index].deepConversionBid < this.getData('cpaBid') ||
|
|
|
this.allForm.group[index].deepConversionBid > 3000
|
|
|
) {
|
|
|
this.allForm.group[index].deepConversionBidCheck = true
|
|
@@ -1920,13 +1985,13 @@ export default {
|
|
|
},
|
|
|
showTip(index) {
|
|
|
if (this.allForm.group[index].bidType == 1) {
|
|
|
- if (this.allForm.group[index].bid < 0.2 || this.allForm.group[index].bid > this.maxBid) {
|
|
|
+ if (this.getData('bid') < 0.2 || this.getData('bid') > this.maxBid) {
|
|
|
this.allForm.group[index].showTipCheck = true
|
|
|
} else {
|
|
|
this.allForm.group[index].showTipCheck = false
|
|
|
}
|
|
|
} else {
|
|
|
- if (this.allForm.group[index].cpaBid < 1 || this.allForm.group[index].cpaBid > this.maxBid) {
|
|
|
+ if (this.getData('cpaBid') < 1 || this.getData('cpaBid') > this.maxBid) {
|
|
|
this.allForm.group[index].showTipCheck = true
|
|
|
} else {
|
|
|
this.allForm.group[index].showTipCheck = false
|
|
@@ -2079,8 +2144,14 @@ export default {
|
|
|
},
|
|
|
handleSubmit(e) {
|
|
|
e.preventDefault()
|
|
|
- if (this.checkVideo.length < this.getData('createCount')) {
|
|
|
- this.$message.error('选择的素材不能小于创建条数')
|
|
|
+ if (
|
|
|
+ this.checkVideo.length <
|
|
|
+ (this.getData('createType') == '0' ? this.getData('createCount') : this.getData('createCount') * 15)
|
|
|
+ ) {
|
|
|
+ // this.$message.error('选择的素材不能小于创建条数')
|
|
|
+ this.getData('createType') == '0'
|
|
|
+ ? this.$message.error('选择的素材不能小于创建条数')
|
|
|
+ : this.$message.error('选择的素材不能小于创建条数*15')
|
|
|
} else {
|
|
|
this.form.validateFields((err, values) => {
|
|
|
if (!err) {
|
|
@@ -2088,8 +2159,7 @@ export default {
|
|
|
var groupArr = this.allForm.group.map((item) => {
|
|
|
return {
|
|
|
...item,
|
|
|
- cpaBid: item.cpaBid != '' ? item.cpaBid * 1000 : '',
|
|
|
- bid: item.bid != '' ? item.bid * 1000 : '',
|
|
|
+
|
|
|
deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
|
|
|
ocpxActionType: item.ocpxActionType,
|
|
|
bidType: item.bidType == 1 ? 2 : 10,
|
|
@@ -2097,6 +2167,8 @@ export default {
|
|
|
})
|
|
|
var json = {
|
|
|
...values,
|
|
|
+ cpaBid: values.cpaBid && values.cpaBid != '' ? values.cpaBid * 1000 : null,
|
|
|
+ bid: values.bid && values.bid != '' ? values.bid * 1000 : null,
|
|
|
convertId: this.convertId ? this.convertId.key : null,
|
|
|
dayBudget: values.dayBudget * 1000,
|
|
|
photoArr: this.checkVideo,
|
|
@@ -2167,6 +2239,18 @@ export default {
|
|
|
handleFocus() {
|
|
|
// console.log('focus')
|
|
|
},
|
|
|
+ getPageSize(data) {
|
|
|
+ if (data.target.value == '0') {
|
|
|
+ this.ipagination.pageSize = 5
|
|
|
+ } else if (data.target.value == '1') {
|
|
|
+ this.ipagination.pageSize = 15
|
|
|
+ }
|
|
|
+ this.videoList = []
|
|
|
+ this.checkVideo = []
|
|
|
+ this.checkVideoAll = []
|
|
|
+ this.checkVideoWai = []
|
|
|
+ this.sumContent = 0
|
|
|
+ },
|
|
|
filterOption(input, option) {
|
|
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
},
|
|
@@ -2308,13 +2392,19 @@ export default {
|
|
|
if (res.success) {
|
|
|
// console.log(res)
|
|
|
if (res.result) {
|
|
|
- if (res.result.alliance_account == 1) {
|
|
|
- this.allianceAccount = true
|
|
|
- } else {
|
|
|
- this.allianceAccount = false
|
|
|
- }
|
|
|
+ this.creativeCategorySwitch = res.result.creative_category_switch == 1 ? true : false
|
|
|
+ this.allianceAccount = res.result.alliance_account == 1 ? true : false
|
|
|
+ this.actionbarClickUrlSwitch = res.result.actionbar_click_url_switch == 1 ? true : false
|
|
|
+
|
|
|
+ // if (res.result.alliance_account == 1) {
|
|
|
+ // this.allianceAccount = true
|
|
|
+ // } else {
|
|
|
+ // this.allianceAccount = false
|
|
|
+ // }
|
|
|
} else {
|
|
|
this.allianceAccount = false
|
|
|
+ this.creativeCategorySwitch = false
|
|
|
+ this.actionbarClickUrlSwitch = false
|
|
|
}
|
|
|
}
|
|
|
})
|