|
@@ -106,6 +106,18 @@
|
|
|
:pagination="ipagination"
|
|
|
@change="sort"
|
|
|
>
|
|
|
+ <span slot="actionTwo" slot-scope="text, record">
|
|
|
+ <a-popconfirm @confirm="getInfo(record, 'allUnit')">
|
|
|
+ <div slot="title">
|
|
|
+ <div>
|
|
|
+ 计划名称:
|
|
|
+ <a-input placeholder="请输入" v-model="refuseReason" style="display: inline-block; width: 500px" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- <a-button slot="okText" type="primary" :disabled="refuseReason == ''">确定</a-button> -->
|
|
|
+ <a @click="setData(record)">复制此计划下所有组</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </span>
|
|
|
<template slot="campaignName" slot-scope="text, record">
|
|
|
<div style="display: flex; justify-content: center">
|
|
|
<a @click="toDetail(record)" class="count" v-show="!record.editName">{{ text }}</a>
|
|
@@ -193,51 +205,22 @@
|
|
|
</template>
|
|
|
</a-modal>
|
|
|
|
|
|
- <!-- 实时数据 -->
|
|
|
- <a-modal v-model="realTimeVisiable" title="广告计划实时数据" @afterClose="clear" width="80%" :maskClosable="false">
|
|
|
- <div class="optBody">
|
|
|
- <a-range-picker
|
|
|
- :disabled-date="disabledDate"
|
|
|
- format="YYYY-MM-DD"
|
|
|
- style="width: 250px"
|
|
|
- @change="dateValueChange"
|
|
|
- v-model="dateValue"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="tableBox" style="margin-top: 20px; min-height: 400px">
|
|
|
- <a-table
|
|
|
- size="middle"
|
|
|
- :columns="realTimeColumn"
|
|
|
- :dataSource="realTimeData"
|
|
|
- bordered
|
|
|
- :pagination="false"
|
|
|
- :scroll="{ x: scrollX }"
|
|
|
- :loading="realTimeLoading"
|
|
|
- ref="accountTable"
|
|
|
- style="word-break: break-all"
|
|
|
- >
|
|
|
- <span slot="ctr" slot-scope="text">{{ text | toPercentage }}</span>
|
|
|
- <span slot="action_ratio" slot-scope="text">{{ text | toPercentage }}</span>
|
|
|
- <span slot="photo_click_ratio" slot-scope="text">{{ text | toPercentage }}</span>
|
|
|
-
|
|
|
- <span slot="charge" slot-scope="text">{{ text | decimalsHandle }}</span>
|
|
|
- <span slot="activationCost" slot-scope="text, records">{{
|
|
|
- (records.activation / records.charge) | decimalsHandle
|
|
|
- }}</span>
|
|
|
- <span slot="event_register_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
|
|
|
- <span slot="form_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
|
|
|
- <span slot="event_order_paid_cost" slot-scope="text">{{ text | decimalsHandle }}</span>
|
|
|
+ <a-modal v-model="allUnitCopy" title="复制计划下所有组" width="80%" :maskClosable="false">
|
|
|
+ <a-form-item
|
|
|
+ label="是否修改定向与出价"
|
|
|
+ :labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"
|
|
|
+ :wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }"
|
|
|
+ >
|
|
|
+ <a-radio-group buttonStyle="solid" v-model="editUnit" @change="editUnitType">
|
|
|
+ <a-radio-button value="1">是</a-radio-button>
|
|
|
+ <a-radio-button value="2">否</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-form-item>
|
|
|
|
|
|
- <span slot="show" slot-scope="text">{{ text | formatCurrency }}</span>
|
|
|
- <span slot="photo_click" slot-scope="text">{{ text | formatCurrency }}</span>
|
|
|
- <span slot="aclick" slot-scope="text">{{ text | formatCurrency }}</span>
|
|
|
- <span slot="bclick" slot-scope="text">{{ text | formatCurrency }}</span>
|
|
|
- <span slot="activation" slot-scope="text">{{ text | formatCurrency }}</span>
|
|
|
- <span slot="event_register" slot-scope="text">{{ text | formatCurrency }}</span>
|
|
|
- <span slot="form_count" slot-scope="text">{{ text | formatCurrency }}</span>
|
|
|
- <span slot="event_order_paid" slot-scope="text">{{ text | formatCurrency }}</span>
|
|
|
- </a-table>
|
|
|
- </div>
|
|
|
+ <copyAllUnit ref="copyAllUnit" v-show="editUnit == '1'" @getUnitData="getUnitData" />
|
|
|
+ <template slot="footer">
|
|
|
+ <a-button key="submit" type="primary" @click="handleEditAllUnit"> 确定 </a-button>
|
|
|
+ </template>
|
|
|
</a-modal>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -252,7 +235,7 @@ import { deleteAction, getAction, postAction } from '@/api/manage'
|
|
|
|
|
|
import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
|
|
|
|
|
|
-// import copyGroup from './copyGroup'
|
|
|
+import copyAllUnit from '../account/copyAllUnit'
|
|
|
|
|
|
var columns = [
|
|
|
{
|
|
@@ -265,6 +248,16 @@ var columns = [
|
|
|
customRender: 'campaignName',
|
|
|
},
|
|
|
},
|
|
|
+ // {
|
|
|
+ // title: '操作',
|
|
|
+ // align: 'center',
|
|
|
+ // dataIndex: 'actionTwo',
|
|
|
+ // fixed: 'left',
|
|
|
+ // width: 200,
|
|
|
+ // scopedSlots: {
|
|
|
+ // customRender: 'actionTwo',
|
|
|
+ // },
|
|
|
+ // },
|
|
|
{
|
|
|
title: '计划单日预算金额',
|
|
|
align: 'center',
|
|
@@ -461,6 +454,7 @@ export default {
|
|
|
ARow,
|
|
|
countTo,
|
|
|
Treeselect,
|
|
|
+ copyAllUnit,
|
|
|
// copyGroup
|
|
|
},
|
|
|
data: function () {
|
|
@@ -550,6 +544,12 @@ export default {
|
|
|
campaignBudget: 'UNLIMITED',
|
|
|
unitId: '',
|
|
|
campaignId: '',
|
|
|
+ editUnit: '2',
|
|
|
+ allUnitCopy: false,
|
|
|
+ oldCampaignId: '',
|
|
|
+ oldCampaignName: '',
|
|
|
+ newCampaignId: '',
|
|
|
+ campaignType: '',
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
@@ -669,6 +669,41 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ getUnitData() {
|
|
|
+ this.addUser()
|
|
|
+ this.allUnitCopy = false
|
|
|
+ this.editUnit = '2'
|
|
|
+ },
|
|
|
+ handleEditAllUnit(e) {
|
|
|
+ if (this.editUnit == '1') {
|
|
|
+ this.$refs.copyAllUnit.handleSubmit(e)
|
|
|
+ } else {
|
|
|
+ postAction('/kuaishouCampaignCopyData/add', {
|
|
|
+ accountId: this.appId,
|
|
|
+ oldCampaignId: this.oldCampaignId,
|
|
|
+ oldCampaignName: this.oldCampaignName,
|
|
|
+ newCampaignId: this.newCampaignId,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.addUser()
|
|
|
+ this.allUnitCopy = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ editUnitType() {
|
|
|
+ if (this.editUnit == '2') {
|
|
|
+ } else {
|
|
|
+ var params = {
|
|
|
+ accountId: this.appId,
|
|
|
+ oldCampaignId: this.oldCampaignId,
|
|
|
+ oldCampaignName: this.oldCampaignName,
|
|
|
+ newCampaignId: this.newCampaignId,
|
|
|
+ campaignType: this.campaignType,
|
|
|
+ }
|
|
|
+ this.$refs.copyAllUnit.handleOk(params)
|
|
|
+ }
|
|
|
+ },
|
|
|
disabledDate(current) {
|
|
|
// console.log(current)
|
|
|
return (current && current > moment()) || (current && current < moment().subtract(7, 'days'))
|
|
@@ -777,7 +812,8 @@ export default {
|
|
|
d = d < 10 ? '0' + d : d
|
|
|
this.refuseReason = item.campaignName + '-' + y + '/' + MM + '/' + d
|
|
|
},
|
|
|
- getInfo(item) {
|
|
|
+ getInfo(item, type) {
|
|
|
+ this.editUnit == '2'
|
|
|
if (this.refuseReason == '') {
|
|
|
this.$message.error('请输入计划名称')
|
|
|
return
|
|
@@ -790,15 +826,13 @@ export default {
|
|
|
params.accountId = this.appId + ''
|
|
|
postAction('/kuaishou/batch/campaignCreate', params).then((res) => {
|
|
|
if (res.success) {
|
|
|
- this.jihua = true
|
|
|
- this.loadingGroup = false
|
|
|
- this.refuseReason = ''
|
|
|
- this.unitId = ''
|
|
|
- // 7156834
|
|
|
- this.planId = res.result
|
|
|
- this.campaignId = item.campaignId
|
|
|
- this.getDataList(item.campaignId)
|
|
|
- this.addUser()
|
|
|
+ if (type) {
|
|
|
+ this.allUnitCopy = true
|
|
|
+ this.oldCampaignId = item.campaignId
|
|
|
+ this.oldCampaignName = item.campaignName
|
|
|
+ this.newCampaignId = res.result
|
|
|
+ this.campaignType = item.campaignType
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message.error(res.message)
|
|
|
}
|