|
@@ -27,6 +27,11 @@
|
|
|
margin: 0 8px 0 2px;
|
|
|
}
|
|
|
</style>
|
|
|
+<style scoped>
|
|
|
+::v-deep .ant-radio-group{
|
|
|
+ width: 100%!important;
|
|
|
+}
|
|
|
+</style>
|
|
|
<template>
|
|
|
<a-card :body-style="{ padding: '24px 32px' }" :bordered="false" class="group-creat">
|
|
|
<a-form @submit="handleSubmit" :form="form">
|
|
@@ -90,6 +95,24 @@
|
|
|
<span style="color:red"> 需加白使用</span>
|
|
|
<div v-if="uriCheck">
|
|
|
<a-input placeholder="请填写链接" v-decorator="['schemaUri', { rules: [{ message:'链接不能为空'}] }]" />
|
|
|
+ <br /><br />
|
|
|
+ <a
|
|
|
+ v-if="getData('schemaUri')"
|
|
|
+ @click="
|
|
|
+ clickTrackUrlShow = true
|
|
|
+ clickTrackUrlShowType = '3'
|
|
|
+ "
|
|
|
+ style="margin-right: 10px; position: relative; top: -20px"
|
|
|
+ >收藏调起链接</a
|
|
|
+ >
|
|
|
+ <a
|
|
|
+ @click="
|
|
|
+ getClickTrackUrlList('3')
|
|
|
+ clickTrackUrlShowType = '3'
|
|
|
+ "
|
|
|
+ style="margin-right: 10px; position: relative; top: -20px"
|
|
|
+ >调起链接列表</a
|
|
|
+ >
|
|
|
</div>
|
|
|
</a-form-item>
|
|
|
|
|
@@ -119,6 +142,24 @@
|
|
|
placeholder="请填写链接"
|
|
|
v-decorator="['url', { rules: [{ required: true, message: '链接不能为空' }] }]"
|
|
|
/>
|
|
|
+ <br /><br />
|
|
|
+ <a
|
|
|
+ v-if="getData('url')"
|
|
|
+ @click="
|
|
|
+ clickTrackUrlShow = true
|
|
|
+ clickTrackUrlShowType = '4'
|
|
|
+ "
|
|
|
+ style="margin-right: 10px; position: relative; top: -20px"
|
|
|
+ >收藏链接</a
|
|
|
+ >
|
|
|
+ <a
|
|
|
+ @click="
|
|
|
+ getClickTrackUrlList('4')
|
|
|
+ clickTrackUrlShowType = '4'
|
|
|
+ "
|
|
|
+ style="margin-right: 10px; position: relative; top: -20px"
|
|
|
+ >链接列表</a
|
|
|
+ >
|
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item
|
|
@@ -397,21 +438,31 @@
|
|
|
<div style="width: 100%" v-for="(item, index) of allForm.group" :key="index">
|
|
|
<div style="clear: both"></div>
|
|
|
<a-form-item
|
|
|
+ label="选择商品"
|
|
|
+ :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
+ :wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
+ v-if="isLibrary"
|
|
|
+ >
|
|
|
+ <a @click="getProductList()">选择商品</a>
|
|
|
+ <p v-if="!!outerShowId">{{outerShowId.split('@')[2]}}</p>
|
|
|
+ </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-model="item.bidType" @change="resData(index)">
|
|
|
- <a-radio-button :value="1">点击数</a-radio-button>
|
|
|
+ <a-radio-button :value="1" :disabled="campaignBidType == '1'">点击数</a-radio-button>
|
|
|
|
|
|
- <a-radio-button :value="10">转化数</a-radio-button>
|
|
|
+ <a-radio-button :value="10" v-if="campaignBidType != '1'">转化数</a-radio-button>
|
|
|
+ <a-radio-button :value="12" v-else>转化数</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 } }"
|
|
|
- v-if="item.bidType == 10"
|
|
|
+ v-if="item.bidType == 10||item.bidType == 12"
|
|
|
>
|
|
|
<a-select v-model="item.ocpxActionType" @change="getDeepTypesList" allowClear>
|
|
|
<a-select-option :value="items.ocpx_action_type" v-for="items in ocpxActionList"
|
|
@@ -444,14 +495,14 @@
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
>
|
|
|
<a-radio-group defaultValue="1">
|
|
|
- <a-radio value="1">{{ item.bidType == 1 ? '点击计费' : '展示计费(oCPM)' }}</a-radio>
|
|
|
+ <a-radio value="1">{{ campaignBidType == '1'?'最大转化':item.bidType == 1 ? '点击计费' : '展示计费(oCPM)' }}</a-radio>
|
|
|
</a-radio-group>
|
|
|
</a-form-item>
|
|
|
<a-form-item
|
|
|
label="出价"
|
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
- v-if="item.bidType == 1"
|
|
|
+ v-if="item.bidType == 1&&campaignBidType != '1'"
|
|
|
>
|
|
|
<!-- v-model="item.bid" -->
|
|
|
<a-input-number
|
|
@@ -470,11 +521,12 @@
|
|
|
>不得低于0.2元,不得高于项目最高出价{{ maxBid }}元</span
|
|
|
> -->
|
|
|
</a-form-item>
|
|
|
+
|
|
|
<a-form-item
|
|
|
label="目标成本"
|
|
|
:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
- v-else
|
|
|
+ v-else-if="item.bidType != 1 && campaignBidType != '1'"
|
|
|
>
|
|
|
<!-- v-model="item.cpaBid" -->
|
|
|
<a-input-number
|
|
@@ -506,7 +558,8 @@
|
|
|
:wrapperCol="{ lg: { span: 10 }, sm: { span: 17 } }"
|
|
|
v-if="
|
|
|
(item.ocpxActionType == 180 || item.ocpxActionType == 53) &&
|
|
|
- item.deepConversionType != ''
|
|
|
+ item.deepConversionType != ''&&
|
|
|
+ campaignBidType != '1'
|
|
|
"
|
|
|
>
|
|
|
<a-input-number
|
|
@@ -997,7 +1050,7 @@
|
|
|
</div>
|
|
|
</a-modal>
|
|
|
|
|
|
- <a-modal title="监测链接名称" v-model="clickTrackUrlShow">
|
|
|
+ <a-modal :title="clickTrackUrlShowType=='3'?'调起链接名称':clickTrackUrlShowType=='4'?'链接名称':'监测链接名称'" v-model="clickTrackUrlShow">
|
|
|
<template slot="footer">
|
|
|
<a-button
|
|
|
key="submit"
|
|
@@ -1008,17 +1061,17 @@
|
|
|
确定
|
|
|
</a-button>
|
|
|
</template>
|
|
|
- <a-input placeholder="请输入监测链接名称" v-model="trackUrlName" @blur="changeTrackUrlName" style="width: 100%" />
|
|
|
+ <a-input :placeholder="clickTrackUrlShowType=='3'?'调起链接名称':clickTrackUrlShowType=='4'?'链接名称':'监测链接名称'" v-model="trackUrlName" @blur="changeTrackUrlName" style="width: 100%" />
|
|
|
<span style="color: red" v-if="!showTrackUrlNameElse">名称重复</span>
|
|
|
</a-modal>
|
|
|
- <a-modal title="监测链接列表" v-model="clickTrackUrlList" :width="1000" :footer="null">
|
|
|
+ <a-modal :title="clickTrackUrlShowType=='3'?'调起链接列表':clickTrackUrlShowType=='4'?'链接列表':'监测链接列表'" v-model="clickTrackUrlList" :width="1000" :footer="null">
|
|
|
<a-spin :spinning="spinning">
|
|
|
<a-row :gutter="10" class="onlny-click-track">
|
|
|
<a-col :sm="24" style="margin-bottom: 20px; z-index: 10">
|
|
|
<a-card class="search-box" style="over-flow: auto">
|
|
|
<!-- <a-input v-model="trackName"></a-input> -->
|
|
|
<a-input-search
|
|
|
- placeholder="请输入监测链接名称"
|
|
|
+ placeholder="请输入名称"
|
|
|
enter-button="Search"
|
|
|
size="large"
|
|
|
@search="onSearch"
|
|
@@ -1106,6 +1159,48 @@
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-modal>
|
|
|
+ <a-modal title="选择商品" v-model="libraryVisible" :width="1000"
|
|
|
+ @ok="libraryVisible = false;outerShowId=outerId;libraryPage.current=1;libraryName=null"
|
|
|
+ @cancel="libraryVisible = false;libraryList=[];outerId=undefined;libraryPage.current=1;libraryName=null">
|
|
|
+ <a-row :gutter="24">
|
|
|
+
|
|
|
+
|
|
|
+ <a-col :span="10">
|
|
|
+ <a-input-search
|
|
|
+ placeholder="请输入产品名称"
|
|
|
+ enter-button="搜索"
|
|
|
+ size="large"
|
|
|
+ @search="libraryPage.current=1;getProductList()"
|
|
|
+ style="width: 100%; margin-bottom: 20px"
|
|
|
+ v-model="libraryName"
|
|
|
+ />
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+
|
|
|
+ </a-row>
|
|
|
+ <a-card style="width:100%">
|
|
|
+ <a-radio-group v-model="outerId">
|
|
|
+ <a-card-grid style="width: 25%;" :hoverable="false" v-for="(item, index) in libraryList" :key="index">
|
|
|
+ <a-radio :value="item.outer_id+'@'+item.product_id+'@'+item.product_name"><h3>{{item.product_name}}</h3>
|
|
|
+ <p>ID:{{item.outer_id}}</p></a-radio>
|
|
|
+
|
|
|
+ </a-card-grid>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-card>
|
|
|
+ <div style="text-align: right">
|
|
|
+ <a-pagination
|
|
|
+ size="small"
|
|
|
+ :showTotal="libraryPage.showTotal"
|
|
|
+ style="float: right"
|
|
|
+ v-if="libraryList.length > 0"
|
|
|
+ showQuickJumper
|
|
|
+ :pageSize.sync="libraryPage.pageSize"
|
|
|
+ :total="libraryPage.total"
|
|
|
+ v-model="libraryPage.current"
|
|
|
+ @change="getProductList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </a-modal>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -1392,6 +1487,7 @@ export default {
|
|
|
loading: false,
|
|
|
campaignTemplateId: '',
|
|
|
campaignType: null,
|
|
|
+ campaignBidType: null,
|
|
|
maxBid: 0,
|
|
|
allForm: {
|
|
|
dayBudget: '0',
|
|
@@ -1399,18 +1495,7 @@ export default {
|
|
|
scheduleTime: '1',
|
|
|
scheduleTimeData:
|
|
|
'000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
|
|
- group: [{
|
|
|
- bidType: 10,
|
|
|
- // bid: '',
|
|
|
- // cpaBid: '',
|
|
|
- showTipCheck: false,
|
|
|
- deepConversionBidCheck: false,
|
|
|
- // unitName: '',
|
|
|
- unitNameCheck: false,
|
|
|
- deepConversionType: '',
|
|
|
- deepConversionBid: '',
|
|
|
- ocpxActionType: 2,
|
|
|
- }],
|
|
|
+ group: [],
|
|
|
groupTypeData: null,
|
|
|
fail: [],
|
|
|
success: [],
|
|
@@ -1438,7 +1523,30 @@ export default {
|
|
|
createCount: 0,
|
|
|
tongbuLoading: false,
|
|
|
ocpxActionList: [],
|
|
|
- deepTypesList: []
|
|
|
+ deepTypesList: [],
|
|
|
+ libraryVisible:false,
|
|
|
+ isLibrary:false,
|
|
|
+ libraryId:null,
|
|
|
+ libraryName:null,
|
|
|
+ libraryList:[],
|
|
|
+ outerId:undefined,
|
|
|
+ outerShowId:undefined,
|
|
|
+ libraryPage:{
|
|
|
+ current: 1,
|
|
|
+ pageSize: 8,
|
|
|
+ // pageSizeOptions: ['10', '20', '30'],
|
|
|
+ showTotal: (total, range) => {
|
|
|
+ return range[0] + '-' + range[1] + ' 共' + total + '条'
|
|
|
+ },
|
|
|
+ showQuickJumper: true,
|
|
|
+ // showSizeChanger: true,
|
|
|
+ total: 0,
|
|
|
+ onChange: (current) => {
|
|
|
+ // 切换分页时的回调,
|
|
|
+ // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
|
|
|
+ this.libraryPage.current = current
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -1474,8 +1582,11 @@ export default {
|
|
|
params.campaignType = localStorage.getItem('campaignType')
|
|
|
params.sceneIds = this.allForm.allianceAccount == '1' ? this.allForm.sceneId : [5]
|
|
|
params.appId = value?value:null
|
|
|
-
|
|
|
- this.postDataAction('/kuaishou/batch/conversionInfos', params).then(res=>{
|
|
|
+ var url = '/kuaishou/batch/conversionInfos'
|
|
|
+ if(this.campaignBidType == '1'){
|
|
|
+ url = '/kuaishou/batch/mcbConversionInfos'
|
|
|
+ }
|
|
|
+ this.postDataAction(url, params).then(res=>{
|
|
|
if(res.success){
|
|
|
this.ocpxActionList = res.result.data.ocpx_types
|
|
|
}
|
|
@@ -1819,10 +1930,18 @@ export default {
|
|
|
this.form.setFieldsValue({
|
|
|
clickTrackUrl: item.trackUrl,
|
|
|
})
|
|
|
- } else {
|
|
|
+ } else if (this.clickTrackUrlShowType == '2') {
|
|
|
this.form.setFieldsValue({
|
|
|
actionbarClickUrl: item.trackUrl,
|
|
|
})
|
|
|
+ }else if (this.clickTrackUrlShowType == '3') {
|
|
|
+ this.form.setFieldsValue({
|
|
|
+ schemaUri: item.trackUrl,
|
|
|
+ })
|
|
|
+ }else if (this.clickTrackUrlShowType == '4') {
|
|
|
+ this.form.setFieldsValue({
|
|
|
+ url: item.trackUrl,
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
removeClickTrackUrl(item) {
|
|
@@ -1871,7 +1990,11 @@ export default {
|
|
|
params.trackName = this.trackUrlName
|
|
|
params.trackType = this.clickTrackUrlShowType
|
|
|
params.trackUrl =
|
|
|
- this.clickTrackUrlShowType == '1' ? this.getData('clickTrackUrl') : this.getData('actionbarClickUrl')
|
|
|
+ this.clickTrackUrlShowType == '1' ?
|
|
|
+ this.getData('clickTrackUrl') :
|
|
|
+ this.clickTrackUrlShowType == '2'?this.getData('actionbarClickUrl'):
|
|
|
+ this.clickTrackUrlShowType == '3'?this.getData('schemaUri'):
|
|
|
+ this.clickTrackUrlShowType == '4'?this.getData('url'):this.getData('clickTrackUrl')
|
|
|
postAction('/kuaishou/kuaiShouTrackUrlCollection/add', params).then((res) => {
|
|
|
if (res.success) {
|
|
|
this.clickTrackUrlShow = false
|
|
@@ -2219,18 +2342,20 @@ export default {
|
|
|
this.checkedTrue = e.target.checked
|
|
|
},
|
|
|
addGroup() {
|
|
|
- this.allForm.group.push({
|
|
|
- bidType: 10,
|
|
|
- // bid: '',
|
|
|
- // cpaBid: '',
|
|
|
- showTipCheck: false,
|
|
|
- deepConversionBidCheck: false,
|
|
|
- // unitName: '',
|
|
|
- unitNameCheck: false,
|
|
|
- deepConversionType: '',
|
|
|
- deepConversionBid: '',
|
|
|
- ocpxActionType: this.allForm.groupTypeData.isActivate == '1' ? 180 : 2,
|
|
|
- })
|
|
|
+ this.allForm.group.push( {
|
|
|
+ bidType: this.campaignBidType == '1'? 12:10,
|
|
|
+ // bid: '',
|
|
|
+ // cpaBid: '',
|
|
|
+ showTipCheck: false,
|
|
|
+ deepConversionBidCheck: false,
|
|
|
+ // unitName: '',
|
|
|
+ unitNameCheck: false,
|
|
|
+ deepConversionType: '',
|
|
|
+ deepConversionBid: '',
|
|
|
+ ocpxActionType: this.campaignBidType == '1'? undefined:2,
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
resData(index) {
|
|
|
// this.allForm.group[index].bid = ''
|
|
@@ -2315,8 +2440,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
cpaBidCheck(rule, value, callback) {
|
|
|
- if (value < 1) {
|
|
|
- callback('不得低于1元')
|
|
|
+ if (value < 0.1) {
|
|
|
+ callback('不得低于0.1元')
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
@@ -2479,9 +2604,10 @@ export default {
|
|
|
|
|
|
deepConversionBid: item.deepConversionBid != '' ? item.deepConversionBid * 1000 : '',
|
|
|
ocpxActionType: item.ocpxActionType,
|
|
|
- bidType: item.bidType == 1 ? 2 : 10,
|
|
|
+ bidType: item.bidType == 1 ? 2 : item.bidType,
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
var json = {
|
|
|
...values,
|
|
|
cpaBid: values.cpaBid && values.cpaBid != '' ? values.cpaBid * 1000 : null,
|
|
@@ -2511,6 +2637,12 @@ export default {
|
|
|
? this.allForm.scheduleTimeData
|
|
|
: '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
|
|
|
}
|
|
|
+ if(!!this.outerShowId){
|
|
|
+ params.libraryId = this.libraryId
|
|
|
+ params.outerId = this.outerShowId.split('@')[0]
|
|
|
+ params.productId = this.outerShowId.split('@')[1]
|
|
|
+ params.detailUnitType = this.campaignType == '2'?0:this.campaignType == '5'?1:this.campaignType == '7'?2:0
|
|
|
+ }
|
|
|
postAction('/batch/kuaiShouGroupTemplate/submitUnitTask', params).then((res) => {
|
|
|
this.loading = false
|
|
|
if (res.success) {
|
|
@@ -2739,6 +2871,25 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getProductList(){
|
|
|
+ postAction('/batch/kuaiShouGroupTemplate/productList',{
|
|
|
+ accountId: localStorage.getItem('campaignAccountId'),
|
|
|
+ libraryId: this.libraryId,
|
|
|
+ libraryName:this.libraryName,
|
|
|
+ page:this.libraryPage.current,
|
|
|
+ pageSize:this.libraryPage.pageSize
|
|
|
+ }).then(result=>{
|
|
|
+ if(result.code == 0){
|
|
|
+ this.libraryVisible = true
|
|
|
+ this.libraryList = result.data.details
|
|
|
+ this.libraryPage.total = result.data.total_count
|
|
|
+ if(!!this.outerShowId){
|
|
|
+ this.outerId = this.outerShowId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
watch: {
|
|
|
timeSeries(val) {
|
|
@@ -2783,23 +2934,21 @@ export default {
|
|
|
// }
|
|
|
},
|
|
|
},
|
|
|
+ created(){
|
|
|
+ this.campaignBidType = localStorage.getItem('campaignBidType')
|
|
|
+ },
|
|
|
mounted: function () {
|
|
|
+
|
|
|
this.getOcpxActionList()
|
|
|
- this.getDeepTypesList(2)
|
|
|
+ // this.getDeepTypesList(2)
|
|
|
this.step = localStorage.getItem('step')
|
|
|
this.getTemplate(localStorage.getItem('campaignAccountId'))
|
|
|
this.getAppList()
|
|
|
// this.getCampaignList()
|
|
|
this.campaignType = localStorage.getItem('campaignType')
|
|
|
+
|
|
|
this.getMould()
|
|
|
- // getAction('/kuaishou/batch/getIsActivate', {
|
|
|
- // accountId: localStorage.getItem('campaignAccountId'),
|
|
|
- // }).then((res) => {
|
|
|
- // if (res.success) {
|
|
|
- // this.allForm.groupTypeData = res.result
|
|
|
- // // this.addGroup()
|
|
|
- // }
|
|
|
- // })
|
|
|
+ this.addGroup()
|
|
|
getAction('/kuaishou/batch/getWhiteList', {
|
|
|
accountId: localStorage.getItem('campaignAccountId'),
|
|
|
}).then((res) => {
|
|
@@ -2852,6 +3001,16 @@ export default {
|
|
|
}).then((res) => {
|
|
|
this.createCount = res.result
|
|
|
})
|
|
|
+
|
|
|
+ postAction('/batch/kuaiShouGroupTemplate/getLibraryConfig',{
|
|
|
+ accountId: localStorage.getItem('campaignAccountId'),
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.success){
|
|
|
+ this.isLibrary = res.result.isLibrary
|
|
|
+ this.libraryId = res.result.libraryId
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
}
|
|
|
</script>
|