|
@@ -12,7 +12,9 @@
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <span class="add-acount-policy-btn"><a-button type="primary" @click="handleUploadAccount">上传账户数据</a-button></span>
|
|
|
|
|
|
+ <span v-if="userSaleList.includes(userInfo().roleName)" class="add-acount-policy-btn">
|
|
|
|
+ <a-button type="primary" @click="handleUploadAccount">上传账户数据</a-button>
|
|
|
|
+ </span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="control-con-header">
|
|
<div class="control-con-header">
|
|
@@ -28,45 +30,53 @@
|
|
label="广告主名称:"
|
|
label="广告主名称:"
|
|
:colon="false"
|
|
:colon="false"
|
|
>
|
|
>
|
|
- <a-input v-model="configForm.creativeAdvance" placeholder="请输入广告主名称"/>
|
|
|
|
|
|
+ <a-input v-model="configForm.advertiserName" placeholder="请输入广告主名称" allow-clear/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
class="grid-form-item"
|
|
class="grid-form-item"
|
|
label="产品名称:"
|
|
label="产品名称:"
|
|
:colon="false"
|
|
:colon="false"
|
|
>
|
|
>
|
|
- <a-input v-model="configForm.creativeAdvance11" placeholder="请输入产品名称"/>
|
|
|
|
|
|
+ <a-input v-model="configForm.productName" placeholder="请输入产品名称" allow-clear/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
class="grid-form-item"
|
|
class="grid-form-item"
|
|
label="项目名称:"
|
|
label="项目名称:"
|
|
:colon="false"
|
|
:colon="false"
|
|
>
|
|
>
|
|
- <a-input v-model="configForm.creativeAdvance22" placeholder="请输入项目名称"/>
|
|
|
|
|
|
+ <a-input v-model="configForm.projectName" placeholder="请输入项目名称" allow-clear/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
class="grid-form-item"
|
|
class="grid-form-item"
|
|
label="账户名称:"
|
|
label="账户名称:"
|
|
:colon="false"
|
|
:colon="false"
|
|
>
|
|
>
|
|
- <a-input v-model="configForm.creativeAdvance33" placeholder="请输入账户名称"/>
|
|
|
|
|
|
+ <a-input v-model="configForm.accountName" placeholder="请输入账户名称" allow-clear/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-row>
|
|
</a-row>
|
|
<a-row>
|
|
<a-row>
|
|
- <a-form-item label="销售:">
|
|
|
|
- <a-select v-model="configForm.creativeSale" style="width: 100px">
|
|
|
|
- <a-select-option :value="2">不限</a-select-option>
|
|
|
|
- <a-select-option value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-select-option>
|
|
|
|
- <a-select-option value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-select-option>
|
|
|
|
- <a-select-option value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL">大图竖图</a-select-option>
|
|
|
|
- <a-select-option value="CREATIVE_IMAGE_MODE_UNION_SPLASH">开屏</a-select-option>
|
|
|
|
|
|
+ <a-form-item label="负责人:">
|
|
|
|
+ <a-select
|
|
|
|
+ v-model="configForm.createUserName"
|
|
|
|
+ style="width: 100px"
|
|
|
|
+ :filter-option="handleFilterOption"
|
|
|
|
+ show-search
|
|
|
|
+ allow-clear
|
|
|
|
+ >
|
|
|
|
+ <a-select-option
|
|
|
|
+ v-for="item in allSaleListOption"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :value="item.realname"
|
|
|
|
+ >
|
|
|
|
+ {{ item.realname }}
|
|
|
|
+ </a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- <a-form-item label="负责人:">
|
|
|
|
- <a-select v-model="configForm.creativeMedia" style="width: 100px">
|
|
|
|
- <a-select-option :value="2">不限</a-select-option>
|
|
|
|
- <a-select-option value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">快手</a-select-option>
|
|
|
|
- <a-select-option value="CREATIVE_IMAGE_MODE_LARGE">头条</a-select-option>
|
|
|
|
|
|
+ <a-form-item label="媒体类型:">
|
|
|
|
+ <a-select v-model="configForm.mediaId" style="width: 100px">
|
|
|
|
+ <a-select-option value="no">不限</a-select-option>
|
|
|
|
+ <a-select-option :value="1">头条</a-select-option>
|
|
|
|
+ <a-select-option :value="2">快手</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
@@ -77,6 +87,7 @@
|
|
<a-range-picker
|
|
<a-range-picker
|
|
v-model="configForm.time"
|
|
v-model="configForm.time"
|
|
format="YYYY-MM-DD"
|
|
format="YYYY-MM-DD"
|
|
|
|
+ @change="handleAddTimesChange"
|
|
/>
|
|
/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item class="form-handle-btn">
|
|
<a-form-item class="form-handle-btn">
|
|
@@ -95,14 +106,45 @@
|
|
:dataSource="dataSource"
|
|
:dataSource="dataSource"
|
|
:pagination="false"
|
|
:pagination="false"
|
|
:scroll="{x: 1800}"
|
|
:scroll="{x: 1800}"
|
|
|
|
+ :loading="controlLoading"
|
|
>
|
|
>
|
|
- <span slot="acountRelax" slot-scope="text, record">
|
|
|
|
|
|
+ <span slot="advertiserName" slot-scope="text">
|
|
|
|
+ <a-tooltip placement="top">
|
|
|
|
+ <template slot="title">
|
|
|
|
+ <span>{{ text }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <span>{{ text }}</span>
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </span>
|
|
|
|
+ <span slot="productName" slot-scope="text">
|
|
|
|
+ <a-tooltip placement="top">
|
|
|
|
+ <template slot="title">
|
|
|
|
+ <span>{{ text }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <span>{{ text }}</span>
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </span>
|
|
|
|
+ <span slot="accountName" slot-scope="text">
|
|
|
|
+ <a-tooltip placement="top">
|
|
|
|
+ <template slot="title">
|
|
|
|
+ <span>{{ text }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ <span>{{ text }}</span>
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </span>
|
|
|
|
+ <span slot="mediaId" slot-scope="text">
|
|
|
|
+ <span>{{ text === 1 ? '头条' : '快手' }}</span>
|
|
|
|
+ </span>
|
|
|
|
+ <span slot="operateType" slot-scope="text">
|
|
|
|
+ <span>{{ text === 1 ? '自运营' : '代运营' }}</span>
|
|
|
|
+ </span>
|
|
|
|
+ <span slot="status" slot-scope="text, record">
|
|
<a-switch :checked="text === 0" @change="handleSwitchChang($event, record)"/>
|
|
<a-switch :checked="text === 0" @change="handleSwitchChang($event, record)"/>
|
|
</span>
|
|
</span>
|
|
<span slot="action" slot-scope="text, record">
|
|
<span slot="action" slot-scope="text, record">
|
|
<a @click="handleSettleDel(record)">删除</a>
|
|
<a @click="handleSettleDel(record)">删除</a>
|
|
<a-divider type="vertical"/>
|
|
<a-divider type="vertical"/>
|
|
- <a>更多</a>
|
|
|
|
|
|
+ <a disabled>更多</a>
|
|
</span>
|
|
</span>
|
|
</a-table>
|
|
</a-table>
|
|
<a-pagination
|
|
<a-pagination
|
|
@@ -116,12 +158,13 @@
|
|
@showSizeChange="onShowSizeChange"
|
|
@showSizeChange="onShowSizeChange"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
- <!-- 新增、编辑政策 -->
|
|
|
|
|
|
+ <!-- 上传账户数据 -->
|
|
<a-modal
|
|
<a-modal
|
|
v-if="policyOperationStatus"
|
|
v-if="policyOperationStatus"
|
|
title="账户上传"
|
|
title="账户上传"
|
|
:visible="policyOperationStatus"
|
|
:visible="policyOperationStatus"
|
|
dialog-class="settlement-modal-class"
|
|
dialog-class="settlement-modal-class"
|
|
|
|
+ :confirmLoading="confirmLoading"
|
|
@ok="handlePolicyOperationSure"
|
|
@ok="handlePolicyOperationSure"
|
|
@cancel="handlePolicyOperationCancel"
|
|
@cancel="handlePolicyOperationCancel"
|
|
>
|
|
>
|
|
@@ -134,47 +177,79 @@
|
|
:label-col="labelCol"
|
|
:label-col="labelCol"
|
|
:wrapper-col="wrapperCol"
|
|
:wrapper-col="wrapperCol"
|
|
>
|
|
>
|
|
- <a-form-model-item label="选择广告主公司名称" prop="name6">
|
|
|
|
- <a-select v-model="policyOperationForm.name6" placeholder="请选择广告主公司名称">
|
|
|
|
- <a-select-option :value="1">快手</a-select-option>
|
|
|
|
- <a-select-option :value="2">头条</a-select-option>
|
|
|
|
- </a-select>
|
|
|
|
|
|
+ <a-form-model-item label="选择媒体">
|
|
|
|
+ <a-radio-group v-model="policyOperationForm.mediaId" button-style="solid" @change="handleMediaIdChange">
|
|
|
|
+ <a-radio-button :value="1">头条</a-radio-button>
|
|
|
|
+ <a-radio-button :value="2">快手</a-radio-button>
|
|
|
|
+ </a-radio-group>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
- <a-form-model-item label="选择产品名称" prop="name7">
|
|
|
|
- <a-select v-model="policyOperationForm.name7" placeholder="请选择产品名称">
|
|
|
|
- <a-select-option :value="1">快手</a-select-option>
|
|
|
|
- <a-select-option :value="2">头条</a-select-option>
|
|
|
|
|
|
+ <a-form-model-item label="选择广告主公司名称" prop="advertiserId">
|
|
|
|
+ <a-select
|
|
|
|
+ v-model="policyOperationForm.advertiserId"
|
|
|
|
+ placeholder="请选择广告主名称"
|
|
|
|
+ :filter-option="handleFilterOption"
|
|
|
|
+ show-search
|
|
|
|
+ @change="handleAdverOptionChange"
|
|
|
|
+ >
|
|
|
|
+ <a-select-option
|
|
|
|
+ v-for="item in allAdverListOption"
|
|
|
|
+ :key="item.advertiserId"
|
|
|
|
+ :value="item.advertiserId"
|
|
|
|
+ >
|
|
|
|
+ {{ item.advertiserName }}
|
|
|
|
+ </a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
- <a-form-model-item label="选择项目名称" prop="name8">
|
|
|
|
- <a-select v-model="policyOperationForm.name8" placeholder="请选择项目名称">
|
|
|
|
- <a-select-option :value="1">快手</a-select-option>
|
|
|
|
- <a-select-option :value="2">头条</a-select-option>
|
|
|
|
|
|
+ <a-form-model-item label="选择产品名称" prop="productId">
|
|
|
|
+ <a-select
|
|
|
|
+ v-model="policyOperationForm.productId"
|
|
|
|
+ placeholder="请选择产品名称"
|
|
|
|
+ :filter-option="handleFilterOption"
|
|
|
|
+ show-search
|
|
|
|
+ @change="handleProductOptionChange"
|
|
|
|
+ >
|
|
|
|
+ <a-select-option
|
|
|
|
+ v-for="item in allProductListOption"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ >
|
|
|
|
+ {{ item.productName }}
|
|
|
|
+ </a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
- <a-form-model-item label="选择媒体">
|
|
|
|
- <a-radio-group v-model="policyOperationForm.name9" button-style="solid">
|
|
|
|
- <a-radio-button value="a">头条</a-radio-button>
|
|
|
|
- <a-radio-button value="b">快手</a-radio-button>
|
|
|
|
- </a-radio-group>
|
|
|
|
|
|
+ <a-form-model-item label="选择项目名称" prop="projectId">
|
|
|
|
+ <a-select
|
|
|
|
+ v-model="policyOperationForm.projectId"
|
|
|
|
+ placeholder="请选择产品名称"
|
|
|
|
+ :filter-option="handleFilterOption"
|
|
|
|
+ show-search
|
|
|
|
+ >
|
|
|
|
+ <a-select-option
|
|
|
|
+ v-for="item in allProjectListOption"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ >
|
|
|
|
+ {{ item.projectName }}
|
|
|
|
+ </a-select-option>
|
|
|
|
+ </a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="运营方式">
|
|
<a-form-model-item label="运营方式">
|
|
- <a-radio-group v-model="policyOperationForm.name10" button-style="solid">
|
|
|
|
- <a-radio-button value="a">自运营</a-radio-button>
|
|
|
|
- <a-radio-button value="b">代运营</a-radio-button>
|
|
|
|
|
|
+ <a-radio-group v-model="policyOperationForm.operateType" button-style="solid">
|
|
|
|
+ <a-radio-button :value="1">自运营</a-radio-button>
|
|
|
|
+ <a-radio-button :value="2">代运营</a-radio-button>
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="附件上传">
|
|
<a-form-model-item label="附件上传">
|
|
<a-upload
|
|
<a-upload
|
|
name="file"
|
|
name="file"
|
|
- :file-list="fileList"
|
|
|
|
- :before-upload="beforeUpload"
|
|
|
|
- @change="handleChange"
|
|
|
|
|
|
+ :file-list="policyOperationForm.fileList"
|
|
|
|
+ :customRequest="handleCustomRequest"
|
|
|
|
+ :remove="handleRemoveUpload"
|
|
>
|
|
>
|
|
- <a-button><a-icon type="upload" />文件上传</a-button>
|
|
|
|
|
|
+ <a-button><a-icon type="upload"/>文件上传</a-button>
|
|
</a-upload>
|
|
</a-upload>
|
|
<a class="file-down-title" @click="handleFileDownTitle">文件格式下载</a>
|
|
<a class="file-down-title" @click="handleFileDownTitle">文件格式下载</a>
|
|
- <p class="upload-txt-rules">支持扩展名:.xlxs</p>
|
|
|
|
|
|
+ <p class="upload-txt-rules">支持扩展名:.xlsx、.xls</p>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
</div>
|
|
</div>
|
|
@@ -183,67 +258,61 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import {mapGetters} from 'vuex';
|
|
import {mapGetters} from 'vuex';
|
|
-
|
|
|
|
-import BMF from 'browser-md5-file';
|
|
|
|
-let COS = require('cos-js-sdk-v5');
|
|
|
|
-let cos = new COS({
|
|
|
|
- SecretId: 'AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets',
|
|
|
|
- SecretKey: 'tXzuwMfplTTK3c9GFUyETilasvQfePu9'
|
|
|
|
-});
|
|
|
|
|
|
+import moment from 'moment';
|
|
|
|
+import {getAction, postFileAction} from '@/api/manage';
|
|
|
|
+import {urlAcount} from './settlement-account-server.js';
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'settlement-account',
|
|
name: 'settlement-account',
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- fileList: [],
|
|
|
|
|
|
+ userSaleList: ['外部销售', '销售总监', '销售', '销售助理', '销售支持经理', '销售AM', '媒介', '管理员'],
|
|
|
|
+ confirmLoading: false,
|
|
|
|
+ allProjectListOption: [],
|
|
|
|
+ allAdverListOption: [],
|
|
|
|
+ allProductListOption: [],
|
|
|
|
+ controlLoading: false,
|
|
|
|
+ allSaleListOption: [],
|
|
labelCol: {span: 7},
|
|
labelCol: {span: 7},
|
|
wrapperCol: {span: 14},
|
|
wrapperCol: {span: 14},
|
|
policyOperationForm: {
|
|
policyOperationForm: {
|
|
- name6: undefined,
|
|
|
|
- name7: undefined,
|
|
|
|
- name8: undefined,
|
|
|
|
- name9: 'a',
|
|
|
|
- name10: 'a',
|
|
|
|
|
|
+ advertiserId: undefined,
|
|
|
|
+ productId: undefined,
|
|
|
|
+ projectId: undefined,
|
|
|
|
+ mediaId: 1,
|
|
|
|
+ operateType: 1,
|
|
|
|
+ fileList: []
|
|
},
|
|
},
|
|
policyOperationRules: {
|
|
policyOperationRules: {
|
|
- name6: [{required: true, message: '请选择广告主公司名称', trigger: 'change'}],
|
|
|
|
- name7: [{required: true, message: '请选择产品名称', trigger: 'change'}],
|
|
|
|
- name8: [{required: true, message: '请选择项目名称', trigger: 'change'}],
|
|
|
|
|
|
+ advertiserId: [{required: true, message: '请选择广告主公司名称', trigger: 'change'}],
|
|
|
|
+ productId: [{required: true, message: '请选择产品名称', trigger: 'change'}],
|
|
|
|
+ projectId: [{required: true, message: '请选择项目名称', trigger: 'change'}]
|
|
},
|
|
},
|
|
policyOperationStatus: false,
|
|
policyOperationStatus: false,
|
|
- totalAll: 100,
|
|
|
|
- dataSource: [
|
|
|
|
- {
|
|
|
|
- status: '腾讯科技有限公司',
|
|
|
|
- accountId_dictText: '腾讯科技有限公司',
|
|
|
|
- creativeImageMode: '产品名称',
|
|
|
|
- accountId: '快手',
|
|
|
|
- createTime: '何甜甜',
|
|
|
|
- validBalance: '待审核',
|
|
|
|
- accountBudget: '是',
|
|
|
|
- adCpaBidStr: '80天',
|
|
|
|
- acountRelax: 0
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ totalAll: 0,
|
|
|
|
+ dataSource: [],
|
|
settlementColumns: [
|
|
settlementColumns: [
|
|
{
|
|
{
|
|
title: '广告主主体名称',
|
|
title: '广告主主体名称',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'status',
|
|
|
|
- width: 150
|
|
|
|
|
|
+ dataIndex: 'advertiserName',
|
|
|
|
+ width: 240,
|
|
|
|
+ ellipsis: true,
|
|
|
|
+ scopedSlots: {customRender: 'advertiserName'}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '产品名称',
|
|
title: '产品名称',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'accountId_dictText',
|
|
|
|
- width: 150,
|
|
|
|
- scopedSlots: {customRender: 'accountId_dictText'}
|
|
|
|
|
|
+ dataIndex: 'productName',
|
|
|
|
+ ellipsis: true,
|
|
|
|
+ width: 200,
|
|
|
|
+ scopedSlots: {customRender: 'productName'}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '项目名称',
|
|
title: '项目名称',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'creativeImageMode',
|
|
|
|
- width: 150
|
|
|
|
|
|
+ dataIndex: 'projectName',
|
|
|
|
+ width: 180
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '账户ID',
|
|
title: '账户ID',
|
|
@@ -253,36 +322,38 @@ export default {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '账户名称',
|
|
title: '账户名称',
|
|
- dataIndex: 'createTime',
|
|
|
|
|
|
+ dataIndex: 'accountName',
|
|
align: 'center',
|
|
align: 'center',
|
|
- width: 150
|
|
|
|
|
|
+ width: 160,
|
|
|
|
+ ellipsis: true,
|
|
|
|
+ scopedSlots: {customRender: 'accountName'}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '媒体',
|
|
title: '媒体',
|
|
- dataIndex: 'validBalance',
|
|
|
|
|
|
+ dataIndex: 'mediaId',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 150,
|
|
width: 150,
|
|
- scopedSlots: {customRender: 'validBalance'}
|
|
|
|
|
|
+ scopedSlots: {customRender: 'mediaId'}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '负责人',
|
|
title: '负责人',
|
|
- dataIndex: 'accountBudget',
|
|
|
|
|
|
+ dataIndex: 'createUserName',
|
|
width: 180,
|
|
width: 180,
|
|
align: 'center'
|
|
align: 'center'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '运营方式',
|
|
title: '运营方式',
|
|
- dataIndex: 'adCpaBidStr',
|
|
|
|
|
|
+ dataIndex: 'operateType',
|
|
align: 'center',
|
|
align: 'center',
|
|
width: 150,
|
|
width: 150,
|
|
- scopedSlots: {customRender: 'adCpaBidStr'}
|
|
|
|
|
|
+ scopedSlots: {customRender: 'operateType'}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '账户状态',
|
|
title: '账户状态',
|
|
align: 'center',
|
|
align: 'center',
|
|
- dataIndex: 'acountRelax',
|
|
|
|
|
|
+ dataIndex: 'status',
|
|
width: 150,
|
|
width: 150,
|
|
- scopedSlots: {customRender: 'acountRelax'}
|
|
|
|
|
|
+ scopedSlots: {customRender: 'status'}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '操作',
|
|
title: '操作',
|
|
@@ -291,16 +362,16 @@ export default {
|
|
width: 250,
|
|
width: 250,
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
scopedSlots: {customRender: 'action'}
|
|
scopedSlots: {customRender: 'action'}
|
|
- },
|
|
|
|
|
|
+ }
|
|
],
|
|
],
|
|
configForm: {
|
|
configForm: {
|
|
- creativeAdvance: '',
|
|
|
|
- creativeAdvance11: '',
|
|
|
|
- creativeAdvance22: '',
|
|
|
|
- creativeAdvance33: '',
|
|
|
|
|
|
+ advertiserName: '',
|
|
|
|
+ productName: '',
|
|
|
|
+ projectName: '',
|
|
|
|
+ accountName: '',
|
|
creativeSale: 2,
|
|
creativeSale: 2,
|
|
- creativeMedia: 2,
|
|
|
|
- time: []
|
|
|
|
|
|
+ mediaId: 'no',
|
|
|
|
+ time: [moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
|
|
},
|
|
},
|
|
tablePag: {
|
|
tablePag: {
|
|
page: 1,
|
|
page: 1,
|
|
@@ -311,122 +382,235 @@ export default {
|
|
created() {
|
|
created() {
|
|
this.searchForm = this.$form.createForm(this);
|
|
this.searchForm = this.$form.createForm(this);
|
|
},
|
|
},
|
|
|
|
+ mounted() {
|
|
|
|
+ this.handleInitTable();
|
|
|
|
+ this.handleGetAllSaleList();
|
|
|
|
+ this.handleGetAllAdverList(1);
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
...mapGetters(['userInfo']),
|
|
...mapGetters(['userInfo']),
|
|
- // 文件格式下载
|
|
|
|
- handleFileDownTitle() {
|
|
|
|
- console.log('文件格式下载');
|
|
|
|
|
|
+ moment,
|
|
|
|
+ handleMediaIdChange(e) {
|
|
|
|
+ this.policyOperationForm.advertiserId = undefined;
|
|
|
|
+ this.policyOperationForm.productId = undefined;
|
|
|
|
+ this.policyOperationForm.projectId = undefined;
|
|
|
|
+ this.policyOperationForm.operateType = 1;
|
|
|
|
+ this.policyOperationForm.fileList = [];
|
|
|
|
+ this.handleGetAllAdverList(e.target.value)
|
|
},
|
|
},
|
|
- beforeUpload(file) {
|
|
|
|
- this.cosUpload(file);
|
|
|
|
|
|
+ handleAddTimesChange(date, dateString) {
|
|
|
|
+ this.configForm.time = dateString;
|
|
},
|
|
},
|
|
- handleMd5(file) {
|
|
|
|
- let bmf = new BMF();
|
|
|
|
- let that = this;
|
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
|
- bmf.md5(file, (err, md5) => {
|
|
|
|
- getAction('kuaishouPopulationPackage/checkPopulationPackage', {signature: md5}).then(result => {
|
|
|
|
- if (result.code === 200) {
|
|
|
|
- that.personNameDisabled = false;
|
|
|
|
- that.personResourceDisabled = false;
|
|
|
|
- resolve();
|
|
|
|
- }
|
|
|
|
- else if (result.code === 201) {
|
|
|
|
- that.$message.error(result.message);
|
|
|
|
- that.personForm.name = result.result.orientationName;
|
|
|
|
- that.personForm.resource = result.result.type;
|
|
|
|
- that.personNameDisabled = true;
|
|
|
|
- that.personResourceDisabled = true;
|
|
|
|
- reject();
|
|
|
|
- }
|
|
|
|
- }).catch(error => {
|
|
|
|
- console.log(error, 'eeee');
|
|
|
|
- reject();
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
+ handleProductOptionChange(e) {
|
|
|
|
+ this.policyOperationForm.projectId = undefined;
|
|
|
|
+ const paramsData = {
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 1000,
|
|
|
|
+ mediaId: this.policyOperationForm.mediaId === 1 ? '1,3' : '2,4',
|
|
|
|
+ advertiserId: this.policyOperationForm.advertiserId,
|
|
|
|
+ productId: e
|
|
|
|
+ };
|
|
|
|
+ getAction('/ctop/project/list', paramsData).then(result => {
|
|
|
|
+ if (result.success) {
|
|
|
|
+ this.allProjectListOption = result.result.records || [];
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- handleChange(info) {
|
|
|
|
- this.fileList = info.fileList;
|
|
|
|
|
|
+ handleAdverOptionChange(e) {
|
|
|
|
+ this.policyOperationForm.productId = undefined;
|
|
|
|
+ this.policyOperationForm.projectId = undefined;
|
|
|
|
+ const paramsData = {
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 1000,
|
|
|
|
+ advertiserId: e
|
|
|
|
+ };
|
|
|
|
+ getAction('/ctop/product/list', paramsData).then(result => {
|
|
|
|
+ if (result.success) {
|
|
|
|
+ this.allProductListOption = result.result.records || [];
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- cosUpload(file) {
|
|
|
|
- let that = this;
|
|
|
|
- let date = new Date();
|
|
|
|
- let y = date.getFullYear();
|
|
|
|
- let MM = date.getMonth() + 1;
|
|
|
|
- MM = MM < 10 ? '0' + MM : MM;
|
|
|
|
- let d = date.getDate();
|
|
|
|
- d = d < 10 ? '0' + d : d;
|
|
|
|
- let timeElse = new Date().getTime();
|
|
|
|
- let arr = file.name.split('.');
|
|
|
|
- let str = '';
|
|
|
|
- for (let i = 0; i < arr.length; i++) {
|
|
|
|
- if (i === arr.length - 1) {
|
|
|
|
|
|
+ handleFilterOption(input, option) {
|
|
|
|
+ return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
|
|
+ },
|
|
|
|
+ // 获取所有的广告主列表
|
|
|
|
+ handleGetAllAdverList(type) {
|
|
|
|
+ const paramsData = {
|
|
|
|
+ userId: this.userInfo().id,
|
|
|
|
+ mediaId: type,
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 1000
|
|
|
|
+ };
|
|
|
|
+ getAction('/ctop/projectMember/participateListV3', paramsData).then(result => {
|
|
|
|
+ if (result.success) {
|
|
|
|
+ this.allAdverListOption = result.result || [];
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- if (i === arr.length - 2) {
|
|
|
|
- str += arr[i];
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- str += arr[i] + '.';
|
|
|
|
- }
|
|
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 获取所有的媒体 枚举值
|
|
|
|
+ handleGetAllSaleList() {
|
|
|
|
+ const paramsData = {
|
|
|
|
+ userId: this.userInfo().id
|
|
|
|
+ };
|
|
|
|
+ getAction(urlAcount + '/finance/settLementController/getResponsibleUserByIds', paramsData).then(result => {
|
|
|
|
+ if (result.code === 0) {
|
|
|
|
+ this.allSaleListOption = result.result || [];
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 获取默认的列表数据
|
|
|
|
+ handleInitTable() {
|
|
|
|
+ this.controlLoading = true;
|
|
|
|
+ const paramsData = {
|
|
|
|
+ createUserId: this.userInfo().id,
|
|
|
|
+ advertiserName: this.configForm.advertiserName,
|
|
|
|
+ productName: this.configForm.productName,
|
|
|
|
+ projectName: this.configForm.projectName,
|
|
|
|
+ accountName: this.configForm.accountName,
|
|
|
|
+ createUserName: this.configForm.createUserName,
|
|
|
|
+ mediaId: this.configForm.mediaId === 'no' ? '' : this.configForm.mediaId,
|
|
|
|
+ startTime: this.configForm.time[0],
|
|
|
|
+ endTime: this.configForm.time[1],
|
|
|
|
+ pageNo: this.tablePag.page,
|
|
|
|
+ pageSize: this.tablePag.size
|
|
|
|
+ };
|
|
|
|
+ getAction(urlAcount + '/finance/settLementController/getSettlementList', paramsData).then(result => {
|
|
|
|
+ if (result.code === 0) {
|
|
|
|
+ let defaultList = result.result.list;
|
|
|
|
+ this.dataSource = defaultList;
|
|
|
|
+ this.totalAll = result.result.total;
|
|
}
|
|
}
|
|
|
|
+ else {
|
|
|
|
+ this.dataSource = [];
|
|
|
|
+ this.totalAll = 0;
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ this.controlLoading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 文件格式下载
|
|
|
|
+ handleFileDownTitle() {
|
|
|
|
+ const {mediaId} = this.policyOperationForm;
|
|
|
|
+ if (mediaId === 1) {
|
|
|
|
+ window.location.href = 'http://media-1301855440.cos.ap-chongqing.myqcloud.com/undefined/2021-08-17/%E5%A4%B4%E6%9D%A1%E8%B4%A6%E6%88%B7%E4%B8%8A%E4%BC%A0%E6%A8%A1%E6%9D%BF-1629185054420.xlsx';
|
|
}
|
|
}
|
|
- cos.putObject(
|
|
|
|
- {
|
|
|
|
- Bucket: 'media-1301855440',
|
|
|
|
- Region: 'ap-chongqing',
|
|
|
|
- // 存储桶所在地域,必须字段
|
|
|
|
- Key: that.uploadType + '/' + y + '-' + MM + '-' + d + '/' + str + '-' + timeElse + '.' + arr[arr.length - 1],
|
|
|
|
- StorageClass: 'STANDARD',
|
|
|
|
- Body: file // 上传文件对象
|
|
|
|
- },
|
|
|
|
- function (err, data) {
|
|
|
|
- if (err) {
|
|
|
|
- that.$message.error('上传失败!!!' + err);
|
|
|
|
|
|
+ else if (mediaId === 2) {
|
|
|
|
+ window.location.href = 'http://media-1301855440.cos.ap-chongqing.myqcloud.com/undefined/2021-08-17/%E5%BF%AB%E6%89%8B%E8%B4%A6%E6%88%B7%E4%B8%8A%E4%BC%A0%E6%A8%A1%E6%9D%BF-1629185318124.xlsx';
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleCustomRequest(info) {
|
|
|
|
+ const isZip = info.file.name.indexOf('xlsx') !== -1 || info.file.name.indexOf('xls') !== -1;
|
|
|
|
+ if (!isZip) {
|
|
|
|
+ this.$message.error('上传模板只能是 xls、xlsx格式!');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.policyOperationForm.fileList = [];
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.policyOperationForm.fileList.push(info.file);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleRemoveUpload(data) {
|
|
|
|
+ let index = this.policyOperationForm.fileList.indexOf(data);
|
|
|
|
+ let newUploadFile = this.policyOperationForm.fileList;
|
|
|
|
+ newUploadFile.splice(index, 1);
|
|
|
|
+ this.policyOperationForm.fileList = newUploadFile;
|
|
|
|
+ },
|
|
|
|
+ // 上传确定按钮操作
|
|
|
|
+ handlePolicyOperationSure() {
|
|
|
|
+ const {advertiserId, productId, projectId, mediaId, operateType, fileList} = this.policyOperationForm;
|
|
|
|
+ this.$refs.policyOperationForm.validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ if (!fileList.length) {
|
|
|
|
+ this.$message.error('请上传文件');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- that.loadingElse = false;
|
|
|
|
- that.fileList.push({
|
|
|
|
- uid: file.name,
|
|
|
|
- name: file.name,
|
|
|
|
- status: 'done',
|
|
|
|
- url: '//' + data.Location
|
|
|
|
|
|
+ let paramsData = new FormData();
|
|
|
|
+ paramsData.append('advertiserId', advertiserId);
|
|
|
|
+ paramsData.append('productId', productId);
|
|
|
|
+ paramsData.append('projectId', projectId);
|
|
|
|
+ paramsData.append('mediaId', mediaId);
|
|
|
|
+ paramsData.append('operateType', operateType);
|
|
|
|
+ paramsData.append('file', fileList[0]);
|
|
|
|
+ paramsData.append('createUserId', this.userInfo().id);
|
|
|
|
+ this.confirmLoading = true;
|
|
|
|
+ postFileAction(urlAcount + '/finance/settLementController/settlementAccountImport', paramsData, {
|
|
|
|
+ headers: {
|
|
|
|
+ 'Content-Type': 'multipart/form-data'
|
|
|
|
+ }
|
|
|
|
+ }).then(result => {
|
|
|
|
+ if (result.code === 0) {
|
|
|
|
+ this.$message.success(result.message);
|
|
|
|
+ this.handlePolicyOperationCancel();
|
|
|
|
+ this.handleInitTable();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ this.confirmLoading = false;
|
|
});
|
|
});
|
|
- if (that.fileList.length > 1) {
|
|
|
|
- that.fileList = that.fileList.slice(-1);
|
|
|
|
- }
|
|
|
|
- const isZip = file.type.includes('xlxs');
|
|
|
|
- const fileOvesize = file.size > (1024 * 1024 * 1024);
|
|
|
|
- if (!isZip) {
|
|
|
|
- that.$message.error('只能上传xlxs格式的文件');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (fileOvesize) {
|
|
|
|
- that.$message.error('文件大小不能超过1G');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- // that.handleMd5(file);
|
|
|
|
}
|
|
}
|
|
- );
|
|
|
|
- },
|
|
|
|
- // 上传确定按钮操作
|
|
|
|
- handlePolicyOperationSure() {
|
|
|
|
- console.log('上传确定按钮操作');
|
|
|
|
|
|
+ else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 上传取消按钮操作
|
|
// 上传取消按钮操作
|
|
handlePolicyOperationCancel() {
|
|
handlePolicyOperationCancel() {
|
|
- console.log('上传取消按钮操作');
|
|
|
|
|
|
+ this.policyOperationForm = {
|
|
|
|
+ advertiserId: undefined,
|
|
|
|
+ productId: undefined,
|
|
|
|
+ projectId: undefined,
|
|
|
|
+ mediaId: 1,
|
|
|
|
+ operateType: 1,
|
|
|
|
+ fileList: []
|
|
|
|
+ };
|
|
this.policyOperationStatus = false;
|
|
this.policyOperationStatus = false;
|
|
},
|
|
},
|
|
// 删除操作
|
|
// 删除操作
|
|
handleSettleDel(list) {
|
|
handleSettleDel(list) {
|
|
- console.log(list, '删除操作');
|
|
|
|
let that = this;
|
|
let that = this;
|
|
this.$confirm({
|
|
this.$confirm({
|
|
title: '提示',
|
|
title: '提示',
|
|
- content: '确认删除该条数据',
|
|
|
|
- onOk() {}
|
|
|
|
|
|
+ content: '是否确认删除该条数据',
|
|
|
|
+ onOk() {
|
|
|
|
+ getAction(urlAcount + '/finance/settLementController/deleteSettlementById', {id: list.id}).then(result => {
|
|
|
|
+ if (result.code === 0) {
|
|
|
|
+ that.handleInitTable();
|
|
|
|
+ that.$message.success('删除成功');
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ that.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ });
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 分页操作按钮
|
|
// 分页操作按钮
|
|
@@ -435,24 +619,54 @@ export default {
|
|
page: current,
|
|
page: current,
|
|
size: pageSize
|
|
size: pageSize
|
|
};
|
|
};
|
|
- // this.handleInitTable();
|
|
|
|
|
|
+ this.handleInitTable();
|
|
},
|
|
},
|
|
// table 开关 操作按钮
|
|
// table 开关 操作按钮
|
|
handleSwitchChang(checked, data) {
|
|
handleSwitchChang(checked, data) {
|
|
- console.log(checked, data, '------');
|
|
|
|
|
|
+ const paramsData = {
|
|
|
|
+ id: data.id,
|
|
|
|
+ status: checked ? 0 : 1
|
|
|
|
+ };
|
|
|
|
+ getAction(urlAcount + '/finance/settLementController/updSettlementStatusById', paramsData).then(result => {
|
|
|
|
+ if (result.code === 0) {
|
|
|
|
+ this.$message.success(result.message);
|
|
|
|
+ this.handleInitTable();
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 账户上传按钮
|
|
// 账户上传按钮
|
|
handleUploadAccount() {
|
|
handleUploadAccount() {
|
|
- console.log('上传账户数据');
|
|
|
|
this.policyOperationStatus = true;
|
|
this.policyOperationStatus = true;
|
|
},
|
|
},
|
|
// 查询的按钮
|
|
// 查询的按钮
|
|
handleQueryList() {
|
|
handleQueryList() {
|
|
- console.log(this.configForm, '搜索的按钮');
|
|
|
|
|
|
+ this.tablePag = {
|
|
|
|
+ page: 1,
|
|
|
|
+ size: 10
|
|
|
|
+ };
|
|
|
|
+ this.handleInitTable();
|
|
},
|
|
},
|
|
// 重置的按钮
|
|
// 重置的按钮
|
|
handleResetList() {
|
|
handleResetList() {
|
|
- console.log(this.configForm, '重置的按钮');
|
|
|
|
|
|
+ this.configForm = {
|
|
|
|
+ advertiserName: '',
|
|
|
|
+ productName: '',
|
|
|
|
+ projectName: '',
|
|
|
|
+ accountName: '',
|
|
|
|
+ creativeSale: 2,
|
|
|
|
+ mediaId: 'no',
|
|
|
|
+ time: [moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')]
|
|
|
|
+ };
|
|
|
|
+ this.tablePag = {
|
|
|
|
+ page: 1,
|
|
|
|
+ size: 10
|
|
|
|
+ };
|
|
|
|
+ this.handleInitTable();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|