|
@@ -1,10 +1,12 @@
|
|
|
<template>
|
|
|
<el-button size="mini" type="text" @click="handleCutBook">
|
|
|
- <span><i class="el-icon-sort"></i>切书切平台</span>
|
|
|
+ <span><i class="el-icon-sort"></i>切书切平台</span>
|
|
|
<el-dialog :title="title" :visible.sync="open" width="330px" append-to-body @close="addClose">
|
|
|
- <el-form :model="queryPlatform" :rules="rules" ref="platFormCutBook" label-position="right" label-width="80px" :inline="true">
|
|
|
+ <el-form :model="queryPlatform" :rules="rules" ref="platFormCutBook" label-position="right" label-width="80px"
|
|
|
+ :inline="true">
|
|
|
<el-form-item label="开始时间" prop="beginTime">
|
|
|
- <el-date-picker v-model="queryPlatform.beginTime" size="small" style="width: 200px" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" placeholder="选择开始时间" />
|
|
|
+ <el-date-picker v-model="queryPlatform.beginTime" size="small" style="width: 200px" format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd" type="date" placeholder="选择开始时间" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="期数" prop="periodId">
|
|
|
<el-select v-model="queryPlatform.periodId" size="small" placeholder="选择期数" filterable clearable>
|
|
@@ -12,12 +14,14 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="书城" prop="platformId">
|
|
|
- <el-select v-model="queryPlatform.platformId" @change="selectZh" size="small" placeholder="选择书城" filterable clearable>
|
|
|
+ <el-select v-model="queryPlatform.platformId" @change="selectZh" size="small" placeholder="选择书城"
|
|
|
+ filterable clearable>
|
|
|
<el-option v-for="item in bookCity" :key="item.id" :label="item.platformName" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="账号" prop="platformAccountId">
|
|
|
- <el-select v-model="queryPlatform.platformAccountId" :disabled="!queryPlatform.platformId" size="small" placeholder="选择账号" filterable clearable>
|
|
|
+ <el-select v-model="queryPlatform.platformAccountId" :disabled="!queryPlatform.platformId" size="small"
|
|
|
+ placeholder="选择账号" filterable clearable>
|
|
|
<el-option v-for="item in accList" :key="item.id" :label="item.account" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -27,8 +31,10 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="项目组" prop="businessGroupId">
|
|
|
- <el-select v-model="queryPlatform.businessGroupId" size="small" placeholder="选择项目组" filterable clearable>
|
|
|
- <el-option v-for="item in teamsList" :key="item.id" :label="item.businessGroupName" :value="item.id" />
|
|
|
+ <el-select v-model="queryPlatform.businessGroupId" size="small" placeholder="选择项目组" filterable
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="item in teamsList" :key="item.id" :label="item.businessGroupName"
|
|
|
+ :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="投放状态" prop="putStatus">
|
|
@@ -41,12 +47,16 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="投放渠道" prop="putChannel">
|
|
|
<el-select v-model="queryPlatform.putChannel" size="small" placeholder="选择投放渠道" filterable>
|
|
|
- <el-option :label="item.label" :value="item.value" :key="item.value" v-for="item in channelList"/>
|
|
|
+ <el-option :label="item.label" :value="item.value" :key="item.value" v-for="item in channelList" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="充值模板" prop="rechargeTemplate">
|
|
|
<el-input v-model="queryPlatform.rechargeTemplate" size="small" placeholder="输入充值模板" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="回本系数" prop="backCoefficient">
|
|
|
+ <el-input-number v-model="queryPlatform.backCoefficient" size="small" :min="0" :max="1"
|
|
|
+ style="width: 140px" :step="0.1" placeholder="输入回本系数" />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
<el-input v-model="queryPlatform.remark" type="textarea" size="small" placeholder="输入备注" />
|
|
|
</el-form-item>
|
|
@@ -64,13 +74,15 @@ import { cutBookPlatform, checkTime } from "@/api/accounts/account";
|
|
|
import { formatDateYMD } from "@/utils"
|
|
|
import { channelList } from "@/utils/const.js"
|
|
|
export default {
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
title: '',
|
|
|
open: false,
|
|
|
channelList: channelList,
|
|
|
accList: [], // 账号
|
|
|
- queryPlatform: {},
|
|
|
+ queryPlatform: {
|
|
|
+ backCoefficient: 1
|
|
|
+ },
|
|
|
rules: {
|
|
|
beginTime: [
|
|
|
{ required: true, message: '请选择开始时间', trigger: 'blur' }
|
|
@@ -89,6 +101,9 @@ export default {
|
|
|
],
|
|
|
putChannel: [
|
|
|
{ required: true, message: '请选择投放渠道', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ backCoefficient: [
|
|
|
+ { required: true, message: '请选择回本系数', trigger: 'blur' }
|
|
|
]
|
|
|
}
|
|
|
}
|
|
@@ -118,17 +133,17 @@ export default {
|
|
|
methods: {
|
|
|
handleCutBook() {
|
|
|
this.title = this.value.resourceName + '切书切平台'
|
|
|
- const { periodId, platformId, platformAccountId, bookId, id, businessGroupId, putStatus, putChannel, rechargeTemplate } = this.value
|
|
|
- this.queryPlatform = { periodId, platformId, platformAccountId, bookId, resourceId: id, beginTime: formatDateYMD(new Date()), businessGroupId, putStatus, putChannel, rechargeTemplate }
|
|
|
+ const { periodId, platformId, platformAccountId, bookId, id, businessGroupId, putStatus, putChannel, rechargeTemplate, backCoefficient } = this.value
|
|
|
+ this.queryPlatform = { periodId, platformId, platformAccountId, backCoefficient, bookId, resourceId: id, beginTime: formatDateYMD(new Date()), businessGroupId, putStatus, putChannel, rechargeTemplate }
|
|
|
this.open = true
|
|
|
- if(platformId) {
|
|
|
+ if (platformId) {
|
|
|
this.selectZh(platformId, platformAccountId)
|
|
|
}
|
|
|
},
|
|
|
/** 关闭弹窗调用 */
|
|
|
addClose() {
|
|
|
this.open = false
|
|
|
- this.queryPlatform = {}
|
|
|
+ this.queryPlatform = { backCoefficient: 1 }
|
|
|
},
|
|
|
selectZh(e, id) {
|
|
|
this.queryPlatform.platformAccountId = id || null
|
|
@@ -163,16 +178,16 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
- .cutBook{
|
|
|
- display: inline;
|
|
|
- line-height: normal;
|
|
|
- }
|
|
|
- .dropdownItem {
|
|
|
- cursor: pointer;
|
|
|
- color: #409EFF;
|
|
|
- font-size: 12px;
|
|
|
- padding: 4px 0;
|
|
|
- display: inline;
|
|
|
- line-height: normal;
|
|
|
- }
|
|
|
-</style>
|
|
|
+.cutBook {
|
|
|
+ display: inline;
|
|
|
+ line-height: normal;
|
|
|
+}
|
|
|
+
|
|
|
+.dropdownItem {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #409EFF;
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 4px 0;
|
|
|
+ display: inline;
|
|
|
+ line-height: normal;
|
|
|
+}</style>
|