|
@@ -0,0 +1,564 @@
|
|
|
+<style>
|
|
|
+.create-unit .ant-form-item-control {
|
|
|
+ line-height: inherit;
|
|
|
+}
|
|
|
+.create-unit .ant-tabs-bar {
|
|
|
+ width: 50%;
|
|
|
+ margin: auto;
|
|
|
+ margin-bottom: 16px;
|
|
|
+ border-bottom: 1px solid #e8e8e8;
|
|
|
+ outline: none;
|
|
|
+ -webkit-transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
|
+ transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
|
+}
|
|
|
+.create-unit .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active {
|
|
|
+ color: #fff;
|
|
|
+ background: #1890ff !important;
|
|
|
+ border-color: #1890ff !important;
|
|
|
+ border-bottom: 1px solid #1890ff !important;
|
|
|
+}
|
|
|
+.create-unit .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
|
|
|
+ height: 40px;
|
|
|
+ margin: 0;
|
|
|
+ margin-right: 2px;
|
|
|
+ padding: 0 16px;
|
|
|
+ line-height: 38px;
|
|
|
+ background: #fafafa;
|
|
|
+ border: 1px solid #e8e8e8 !important;
|
|
|
+ border-radius: 4px 4px 0 0 !important;
|
|
|
+ -webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
|
+ transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
|
+}
|
|
|
+</style>
|
|
|
+<template>
|
|
|
+ <div class="create-unit">
|
|
|
+ <a-card :body-style="{ padding: '24px 32px' }" :bordered="false">
|
|
|
+ <a-form-model ref="unitCreate" :model="form" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
|
+ <a-tabs type="card" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
|
+ <a-tab-pane
|
|
|
+ :key="item.account.accountId"
|
|
|
+ :tab="'账户:' + item.account.accountName"
|
|
|
+ v-for="(item, index) of form.accountArr"
|
|
|
+ >
|
|
|
+ <a-form-model-item label="计划下组是否相同" prop="campaignAgreement">
|
|
|
+ <a-radio-group v-model="item.account.campaignAgreement" buttonStyle="solid" @change="nameTypeChange">
|
|
|
+ <a-radio-button :value="0">是</a-radio-button>
|
|
|
+ <a-radio-button :value="1">否</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="计划下组数量" prop="unitCount">
|
|
|
+ <a-input-number v-model="item.account.unitCount" :min="1" :max="10" @change="changeCreateTotal(item)" />
|
|
|
+ </a-form-model-item>
|
|
|
+ <!-- <a-form-model-item label="计划名称" prop="campaign"> -->
|
|
|
+ <a-tabs type="card" v-if="item.account.campaignAgreement == 1">
|
|
|
+ <a-tab-pane
|
|
|
+ :key="campaign.campaignId"
|
|
|
+ :tab="'计划:' + campaign.campaignName"
|
|
|
+ v-for="(campaign, campaignIndex) of item.account.campaignList"
|
|
|
+ >
|
|
|
+ <a-form-model-item
|
|
|
+ ref="unitName"
|
|
|
+ v-for="(unitName, indexUnit) of campaign.unitNames"
|
|
|
+ :key="indexUnit"
|
|
|
+ :label="indexUnit == 0 ? '组名称' : ''"
|
|
|
+ v-bind="indexUnit !== 0 ? formItemLayout : {}"
|
|
|
+ :prop="
|
|
|
+ 'accountArr.' +
|
|
|
+ index +
|
|
|
+ '.account.campaignList.' +
|
|
|
+ campaignIndex +
|
|
|
+ '.unitNames.' +
|
|
|
+ indexUnit +
|
|
|
+ '.value'
|
|
|
+ "
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '组名称必填',
|
|
|
+ trigger: 'blur',
|
|
|
+ }"
|
|
|
+ ><a-input v-model="unitName.value" placeholder="请输入组名称" style="width: 60%; margin-right: 8px" />
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="投放范围" v-if="item.account.allianceAccount">
|
|
|
+ <a-radio-group buttonStyle="solid" v-model="campaign.allianceAccount">
|
|
|
+ <a-radio-button value="1">默认</a-radio-button>
|
|
|
+ <a-radio-button value="2">联盟广告</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-tab-pane>
|
|
|
+ </a-tabs>
|
|
|
+ <div v-else>
|
|
|
+ <a-form-model-item
|
|
|
+ ref="unitName"
|
|
|
+ v-for="(unitName, indexUnit) of item.account.campaignOne.unitNames"
|
|
|
+ :key="indexUnit"
|
|
|
+ :label="indexUnit == 0 ? '组名称' : ''"
|
|
|
+ v-bind="indexUnit !== 0 ? formItemLayout : {}"
|
|
|
+ :prop="'accountArr.' + index + '.account.campaignOne.unitNames.' + indexUnit + '.value'"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '组名称必填',
|
|
|
+ trigger: 'blur',
|
|
|
+ }"
|
|
|
+ ><a-input v-model="unitName.value" placeholder="请输入组名称" style="width: 60%; margin-right: 8px" />
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="投放范围" v-if="item.account.allianceAccount">
|
|
|
+ <a-radio-group buttonStyle="solid" v-model="item.account.campaignOne.allianceAccount">
|
|
|
+ <a-radio-button value="1">默认</a-radio-button>
|
|
|
+ <a-radio-button value="2">联盟广告</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-form-model-item>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- </a-form-model-item> -->
|
|
|
+ </a-tab-pane>
|
|
|
+ <!-- <a-tab-pane key="2" tab="Tab 2"> Content of Tab Pane 2 </a-tab-pane>
|
|
|
+ <a-tab-pane key="3" tab="Tab 3"> Content of Tab Pane 3 </a-tab-pane> -->
|
|
|
+ </a-tabs>
|
|
|
+ <a-form-model-item
|
|
|
+ :wrapperCol="{
|
|
|
+ xs: { span: 24, offset: 0 },
|
|
|
+ sm: { span: 20, offset: 7 },
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <a-button type="primary" html-type="submit" @click="submitForm('unitCreate')"> 提交 </a-button>
|
|
|
+ <a-button style="margin-left: 10px" @click="resetForm('unitCreate')"> 重置 </a-button>
|
|
|
+ </a-form-model-item>
|
|
|
+ <!-- <a-form-model-item
|
|
|
+ ref="unitName"
|
|
|
+ prop="unitName"
|
|
|
+ v-for="(domain, index) in tabList[activeIndex].form.unitName"
|
|
|
+ :key="index"
|
|
|
+ :label="index === 0 ? '组名称' : ''"
|
|
|
+ :prop="'unitName.' + index + '.value'"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: '组名称必填',
|
|
|
+ trigger: 'blur',
|
|
|
+ }"
|
|
|
+ ><a-input v-model="domain.value" placeholder="请输入组名称" style="width: 60%; margin-right: 8px" />
|
|
|
+ </a-form-model-item> -->
|
|
|
+ </a-form-model>
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { deleteAction, postAction, getAction } from '@/api/manage'
|
|
|
+import moment from 'moment'
|
|
|
+import { mapActions, mapGetters } from 'vuex'
|
|
|
+import Treeselect from '@/views/modules/Statistics/components/Treeselect.vue'
|
|
|
+export default {
|
|
|
+ name: 'create-unit',
|
|
|
+ components: {
|
|
|
+ Treeselect,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ labelCol: { span: 7 },
|
|
|
+ wrapperCol: { span: 17 },
|
|
|
+ formItemLayout: {
|
|
|
+ labelCol: {
|
|
|
+ xs: { span: 7 },
|
|
|
+ sm: { span: 7 },
|
|
|
+ },
|
|
|
+ wrapperCol: {
|
|
|
+ xs: { span: 17, offset: 0 },
|
|
|
+ sm: { span: 17, offset: 7 },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ form: {
|
|
|
+ accountArr: [
|
|
|
+ {
|
|
|
+ account: {
|
|
|
+ accountId: 23212,
|
|
|
+ accountName: '环球黑卡',
|
|
|
+ campaignAgreement: 0,
|
|
|
+ unitCount: 1,
|
|
|
+ allianceAccount: true,
|
|
|
+ campaignType: 2,
|
|
|
+ campaignList: [
|
|
|
+ { campaignId: 1231231, campaignName: '测试', unitNames: [{ value: '' }], allianceAccount: '1' },
|
|
|
+ { campaignId: 12331, campaignName: '测`试', unitNames: [{ value: '' }], allianceAccount: '1' },
|
|
|
+ { campaignId: 123311, campaignName: '测1试', unitNames: [{ value: '' }], allianceAccount: '1' },
|
|
|
+ { campaignId: 123312, campaignName: '测3试', unitNames: [{ value: '' }], allianceAccount: '1' },
|
|
|
+ ],
|
|
|
+ campaignOne: { unitNames: [{ value: '' }], allianceAccount: '1' },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ account: {
|
|
|
+ accountId: 232121,
|
|
|
+ accountName: '环球黑卡2',
|
|
|
+ campaignAgreement: 0,
|
|
|
+ campaignType: 3,
|
|
|
+ allianceAccount: false,
|
|
|
+ unitCount: 1,
|
|
|
+ campaignList: [
|
|
|
+ { campaignId: 1231231, campaignName: '测试', unitNames: [{ value: '' }], allianceAccount: '1' },
|
|
|
+ ],
|
|
|
+ campaignOne: { unitNames: [{ value: '' }], allianceAccount: '1' },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ account: {
|
|
|
+ accountId: 232,
|
|
|
+ accountName: '环球黑卡`2',
|
|
|
+ campaignAgreement: 0,
|
|
|
+ campaignType: 4,
|
|
|
+ allianceAccount: false,
|
|
|
+ unitCount: 1,
|
|
|
+ campaignList: [
|
|
|
+ { campaignId: 1231231, campaignName: '测试', unitNames: [{ value: '' }], allianceAccount: '1' },
|
|
|
+ ],
|
|
|
+ campaignOne: { unitNames: [{ value: '' }], allianceAccount: '1' },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ tabList: [
|
|
|
+ {
|
|
|
+ key: 'article',
|
|
|
+ tab: '账户1',
|
|
|
+ form: {
|
|
|
+ campaignAgreement: 0,
|
|
|
+ unitName: [{ value: '' }],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'app',
|
|
|
+ tab: '账户2',
|
|
|
+ form: {
|
|
|
+ campaignAgreement: 0,
|
|
|
+ unitName: [{ value: '' }],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'project',
|
|
|
+ tab: '账户3',
|
|
|
+ form: {
|
|
|
+ campaignAgreement: 1,
|
|
|
+ unitName: [{ value: '' }],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ key: 'article',
|
|
|
+ activeIndex: 0,
|
|
|
+ accountIds: [],
|
|
|
+ active: null,
|
|
|
+ promotionName: '',
|
|
|
+ tabs: [],
|
|
|
+ dayBudgetSchedule: [{ one: '' }, { one: '' }, { one: '' }, { one: '' }, { one: '' }, { one: '' }, { one: '' }],
|
|
|
+ type: '2',
|
|
|
+ typeList: {},
|
|
|
+ appList: {},
|
|
|
+ showBudgetDaily: false,
|
|
|
+ campaignName: '',
|
|
|
+ campaignBudget: 'UNLIMITED',
|
|
|
+ dayBudget: 0,
|
|
|
+ appId: '0', //应用目标
|
|
|
+ showApp: true,
|
|
|
+ redirectUrl: '', // 链接地址
|
|
|
+ showRedirect: false,
|
|
|
+ urlType: '1',
|
|
|
+ showUrlType: false,
|
|
|
+ channelType: '1',
|
|
|
+ showChannelType: false,
|
|
|
+ loading: false,
|
|
|
+
|
|
|
+ url: {
|
|
|
+ dictListUrl: 'toutiao/dictitem/list',
|
|
|
+ appListUrl: '/kuaishou/kuaiShouCreateAppTemplate/list',
|
|
|
+ insertTemplateUrl: '/kuaishou/batch/campaignCreate',
|
|
|
+ },
|
|
|
+ createTotal: [],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ submitForm(formName) {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ alert('submit!')
|
|
|
+ console.log(this.tabList)
|
|
|
+ } else {
|
|
|
+ console.log('error submit!!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ resetForm(formName) {
|
|
|
+ this.$refs[formName].resetFields()
|
|
|
+ },
|
|
|
+ onTabChange(key, type) {
|
|
|
+ console.log(key, type)
|
|
|
+ this[type] = key
|
|
|
+ this.activeIndex = this.tabList.findIndex((item) => this.key == item.key)
|
|
|
+ },
|
|
|
+ ...mapGetters(['nickname', 'avatar', 'userInfo']),
|
|
|
+ numberReturn(num) {
|
|
|
+ var arr = ['一', '二', '三', '四', '五', '六', '天']
|
|
|
+ return arr[num]
|
|
|
+ },
|
|
|
+ getCampaignId(campaignId) {
|
|
|
+ alert(1)
|
|
|
+ },
|
|
|
+ changeCreateTotal(item) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // if()
|
|
|
+ console.log(item)
|
|
|
+ var arr = []
|
|
|
+ for (let i = 0; i < item.account.unitCount; i++) {
|
|
|
+ arr.push({ value: '' })
|
|
|
+ }
|
|
|
+ item.account.campaignOne.unitNames = JSON.parse(JSON.stringify(arr))
|
|
|
+ item.account.campaignList.forEach((element) => {
|
|
|
+ element.unitNames = JSON.parse(JSON.stringify(arr))
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ nameTypeChange(e) {
|
|
|
+ console.log(e.target.value)
|
|
|
+ if (e.target.value == 1) {
|
|
|
+ if (this.accountIds.length > 0) {
|
|
|
+ postAction('/kuaishou/crossAccount/getAuthName', { accountArr: this.accountIds }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.tabs = res.result.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ campaignNames: JSON.parse(JSON.stringify(this.createTotal)),
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.active = res.result[0].accountId
|
|
|
+ } else {
|
|
|
+ this.tabs = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getChangeAll(name, indexBest, index, items) {
|
|
|
+ var node = document.getElementsByClassName('rending')[indexBest]
|
|
|
+ var v = '{{' + name + '}}-'
|
|
|
+ if (document.selection) {
|
|
|
+ //IE
|
|
|
+ node.focus()
|
|
|
+ var sel = document.selection.createRange()
|
|
|
+ sel.text = v
|
|
|
+ sel.select()
|
|
|
+ items.campaignName = v
|
|
|
+ } else if (node.selectionStart || node.selectionStart == '0') {
|
|
|
+ //MOZILLA/GOOGLE
|
|
|
+ var startPos = node.selectionStart
|
|
|
+ var endPos = node.selectionEnd
|
|
|
+ var restoreTop = node.scrollTop
|
|
|
+ node.value = node.value.substring(0, startPos) + v + node.value.substring(endPos, node.value.length)
|
|
|
+ if (restoreTop > 0) {
|
|
|
+ node.scrollTop = restoreTop
|
|
|
+ }
|
|
|
+ items.campaignName = node.value
|
|
|
+ node.focus()
|
|
|
+ node.selectionStart = startPos + v.length
|
|
|
+ node.selectionEnd = startPos + v.length
|
|
|
+ // this.campaignName = node.value
|
|
|
+ } else {
|
|
|
+ //OTHER
|
|
|
+ node.value += v
|
|
|
+ items.campaignName = node.value
|
|
|
+ node.focus()
|
|
|
+ // this.campaignName = node.value
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getChange(name, index) {
|
|
|
+ console.log(index, document.getElementsByClassName('rending'))
|
|
|
+ var node = document.getElementsByClassName('rending')[index]
|
|
|
+ var v = '{{' + name + '}}-'
|
|
|
+ if (document.selection) {
|
|
|
+ //IE
|
|
|
+ node.focus()
|
|
|
+ var sel = document.selection.createRange()
|
|
|
+ sel.text = v
|
|
|
+ sel.select()
|
|
|
+ this.campaignName = v
|
|
|
+ } else if (node.selectionStart || node.selectionStart == '0') {
|
|
|
+ //MOZILLA/GOOGLE
|
|
|
+ var startPos = node.selectionStart
|
|
|
+ var endPos = node.selectionEnd
|
|
|
+ var restoreTop = node.scrollTop
|
|
|
+ node.value = node.value.substring(0, startPos) + v + node.value.substring(endPos, node.value.length)
|
|
|
+ if (restoreTop > 0) {
|
|
|
+ node.scrollTop = restoreTop
|
|
|
+ }
|
|
|
+ this.campaignName = node.value
|
|
|
+ node.focus()
|
|
|
+ node.selectionStart = startPos + v.length
|
|
|
+ node.selectionEnd = startPos + v.length
|
|
|
+ // this.campaignName = node.value
|
|
|
+ } else {
|
|
|
+ //OTHER
|
|
|
+ node.value += v
|
|
|
+ this.campaignName = node.value
|
|
|
+ node.focus()
|
|
|
+ // this.campaignName = node.value
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleConfirmValue(rule, value, callback) {
|
|
|
+ if (value == '' || value < 500 || value >= 100000000) {
|
|
|
+ callback('请输入正确预算金额')
|
|
|
+ }
|
|
|
+ callback()
|
|
|
+ },
|
|
|
+
|
|
|
+ handleConfirmAppId(rule, value, callback) {
|
|
|
+ if (this.type == 2 && (this.appId == '0' || this.appId == '')) {
|
|
|
+ callback('请选择目标应用')
|
|
|
+ }
|
|
|
+ callback()
|
|
|
+ },
|
|
|
+
|
|
|
+ handleSubmit(e) {
|
|
|
+ e.preventDefault()
|
|
|
+ this.form.validateFields((err, values) => {
|
|
|
+ if (!err) {
|
|
|
+ this.loading = true
|
|
|
+
|
|
|
+ let params = {}
|
|
|
+ params.type = values.type
|
|
|
+ // params.campaignBudget = this.campaignBudget
|
|
|
+ if (this.campaignBudget == 'UNLIMITED') {
|
|
|
+ params.dayBudget = 0
|
|
|
+ } else if (this.campaignBudget == 'AS_BUDGET') {
|
|
|
+ params.dayBudget = values.dayBudget * 1000
|
|
|
+ } else {
|
|
|
+ params.dayBudgetSchedule = this.dayBudgetSchedule.map((item) => {
|
|
|
+ if (item.one == '') {
|
|
|
+ return 0
|
|
|
+ } else {
|
|
|
+ return item.one * 1000
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // if (this.getData('nameType') == 0) {
|
|
|
+ // var dataArr = this.campaignName.split('-')
|
|
|
+ // if (dataArr[dataArr.length - 1] == '') {
|
|
|
+ // dataArr.pop()
|
|
|
+ // }
|
|
|
+ // params.campaignName = dataArr.join('-')
|
|
|
+ // } else {
|
|
|
+ // params.nameArr = this.tabs.map((item) => {
|
|
|
+ // return {
|
|
|
+ // accountId: item.accountId,
|
|
|
+ // campaignNames: item.campaignNames.map((i) => {
|
|
|
+ // return i.campaignName
|
|
|
+ // }),
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
+ params.accountArr = this.accountIds
|
|
|
+ params.nameType = values.nameType
|
|
|
+ params.createTotal = values.createTotal
|
|
|
+ console.log(params)
|
|
|
+
|
|
|
+ postAction('/kuaishou/crossAccount/batchCampaignCreate', params).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('创建成功')
|
|
|
+ localStorage.setItem('campaignId', res.result)
|
|
|
+ this.loading = false
|
|
|
+ this.nextStep(res.result)
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onChange(value) {
|
|
|
+ console.log(value)
|
|
|
+ },
|
|
|
+ showBudgetStatusChange() {
|
|
|
+ if (this.campaignBudget == 'UNLIMITED') {
|
|
|
+ this.showBudgetDaily = false
|
|
|
+ this.dayBudget = 0
|
|
|
+ } else {
|
|
|
+ this.showBudgetDaily = true
|
|
|
+ this.dayBudget = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ typeChange() {
|
|
|
+ if (this.type == 2) {
|
|
|
+ this.promotionName = '提升应用安装'
|
|
|
+ this.showApp = true
|
|
|
+ this.showRedirect = false
|
|
|
+ this.showUrlType = false
|
|
|
+ this.showChannelType = false
|
|
|
+ }
|
|
|
+ if (this.type == 3) {
|
|
|
+ this.promotionName = '获取电商下单'
|
|
|
+ this.showApp = false
|
|
|
+ this.showRedirect = true
|
|
|
+ this.showUrlType = true
|
|
|
+ this.showChannelType = false
|
|
|
+ }
|
|
|
+ if (this.type == 4) {
|
|
|
+ this.promotionName = '推广品牌活动'
|
|
|
+ this.showApp = false
|
|
|
+ this.showRedirect = true
|
|
|
+ this.showUrlType = false
|
|
|
+ this.showChannelType = false
|
|
|
+ }
|
|
|
+ if (this.type == 5) {
|
|
|
+ this.promotionName = '收集销售线索'
|
|
|
+ this.showApp = false
|
|
|
+ this.showRedirect = true
|
|
|
+ this.showUrlType = false
|
|
|
+ this.showChannelType = true
|
|
|
+ }
|
|
|
+ this.campaignName = this.promotionName + '_' + moment(new Date())
|
|
|
+ },
|
|
|
+ handleChange(value) {
|
|
|
+ console.log(`selected ${value}`)
|
|
|
+ },
|
|
|
+ handleBlur() {
|
|
|
+ console.log('blur')
|
|
|
+ },
|
|
|
+ handleFocus() {
|
|
|
+ console.log('focus')
|
|
|
+ },
|
|
|
+ filterOption(input, option) {
|
|
|
+ return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ },
|
|
|
+ nextStep() {
|
|
|
+ this.$emit('nextStep')
|
|
|
+ },
|
|
|
+ // getData(className) {
|
|
|
+ // return this.form.getFieldValue(className)
|
|
|
+ // },
|
|
|
+ getLOLTrue(accountId) {
|
|
|
+ getAction('/kuaishou/batch/getWhiteList', {
|
|
|
+ accountId: accountId,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ console.log(res)
|
|
|
+ if (res.result) {
|
|
|
+ if (res.result.alliance_account == 1) {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted: function () {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // this.changeCreateTotal()
|
|
|
+ this.activeIndex = this.tabList.findIndex((item) => this.key == item.key)
|
|
|
+ })
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|