|
@@ -5,13 +5,16 @@
|
|
<span class="policy-export-btn">结算单信息</span>
|
|
<span class="policy-export-btn">结算单信息</span>
|
|
<span>
|
|
<span>
|
|
<a-tooltip>
|
|
<a-tooltip>
|
|
- <template slot="title">显示运营人员上传账户消耗截图,运营人员可查看自己所上传数据,销售人员可查看自己所负责产品的消耗截图数据</template>
|
|
|
|
|
|
+ <template slot="title">
|
|
|
|
+ 显示运营人员上传账户消耗截图,运营人员可查看自己所上传数据,销售人员可查看自己所负责产品的消耗截图数据
|
|
|
|
+ </template>
|
|
<a-icon class="settlement-header-icon" type="question-circle"/>
|
|
<a-icon class="settlement-header-icon" type="question-circle"/>
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
显示列表信息,销售人员只能操作与自己相关的项目
|
|
显示列表信息,销售人员只能操作与自己相关的项目
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
|
|
+ <!-- v-if="userInfo().roleName !== '财务'" -->
|
|
<span class="add-acount-policy-btn"><a-button @click="handleDownloadProfit">下载利润表</a-button></span>
|
|
<span class="add-acount-policy-btn"><a-button @click="handleDownloadProfit">下载利润表</a-button></span>
|
|
<span class="add-acount-policy-btn"><a-button @click="handleDownloadSettlement">下载结算单</a-button></span>
|
|
<span class="add-acount-policy-btn"><a-button @click="handleDownloadSettlement">下载结算单</a-button></span>
|
|
<span class="add-acount-policy-btn"><a-button type="primary" @click="handleUploadAccount">上传截图</a-button></span>
|
|
<span class="add-acount-policy-btn"><a-button type="primary" @click="handleUploadAccount">上传截图</a-button></span>
|
|
@@ -221,37 +224,59 @@
|
|
:label-col="labelCol"
|
|
:label-col="labelCol"
|
|
:wrapper-col="wrapperCol"
|
|
:wrapper-col="wrapperCol"
|
|
>
|
|
>
|
|
- <a-form-model-item label="选择广告主公司名称" prop="name6">
|
|
|
|
- <a-select v-model="settlementModalForm.name6" 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="settlementModalForm.advertiserId"
|
|
|
|
+ placeholder="请选择广告主名称"
|
|
|
|
+ :filter-option="handleFilterOption"
|
|
|
|
+ show-search
|
|
|
|
+ @change="handleAdverOptionChange"
|
|
|
|
+ >
|
|
|
|
+ <a-select-option
|
|
|
|
+ v-for="item in allAdverListOption"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ >
|
|
|
|
+ {{ item.name }}
|
|
|
|
+ </a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
- <a-form-model-item label="选择产品名称" prop="name7">
|
|
|
|
- <a-select v-model="settlementModalForm.name7" 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="settlementModalForm.productId"
|
|
|
|
+ placeholder="请选择产品名称"
|
|
|
|
+ :filter-option="handleFilterOption"
|
|
|
|
+ show-search
|
|
|
|
+ @change="handleProductIdChange"
|
|
|
|
+ >
|
|
|
|
+ <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-form-model-item label="选择媒体">
|
|
- <a-radio-group v-model="settlementModalForm.name9" button-style="solid">
|
|
|
|
- <a-radio-button value="a">头条</a-radio-button>
|
|
|
|
- <a-radio-button value="b">快手</a-radio-button>
|
|
|
|
|
|
+ <a-radio-group v-model="settlementModalForm.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-radio-group>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
- <a-form-model-item label="时间" prop="time">
|
|
|
|
|
|
+ <a-form-model-item label="时间" prop="uploadYears">
|
|
<a-month-picker
|
|
<a-month-picker
|
|
- v-model="settlementModalForm.time"
|
|
|
|
|
|
+ v-model="settlementModalForm.uploadYears"
|
|
format="YYYY-MM"
|
|
format="YYYY-MM"
|
|
placeholder="请选择时间"
|
|
placeholder="请选择时间"
|
|
- @change="handleLaunchData"
|
|
|
|
|
|
+ @change="handleUploadYears"
|
|
/>
|
|
/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="账户数量">
|
|
<a-form-model-item label="账户数量">
|
|
- <span>23</span>
|
|
|
|
|
|
+ <span>{{ downLoadAccountNum }}</span>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
<a-form-model-item label="截图已上传">
|
|
<a-form-model-item label="截图已上传">
|
|
- <span>20</span>
|
|
|
|
|
|
+ <span>{{ downLoadImgNum }}</span>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
</div>
|
|
</div>
|
|
@@ -275,9 +300,9 @@
|
|
:wrapper-col="wrapperCol"
|
|
:wrapper-col="wrapperCol"
|
|
>
|
|
>
|
|
<a-form-model-item label="选择媒体">
|
|
<a-form-model-item label="选择媒体">
|
|
- <a-radio-group v-model="profitModalForm.name9" button-style="solid">
|
|
|
|
- <a-radio-button value="a">头条</a-radio-button>
|
|
|
|
- <a-radio-button value="b">快手</a-radio-button>
|
|
|
|
|
|
+ <a-radio-group v-model="profitModalForm.mediaId" 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="时间" prop="launchDateRange">
|
|
<a-form-model-item label="时间" prop="launchDateRange">
|
|
@@ -309,13 +334,17 @@ export default {
|
|
name: 'settlement-information',
|
|
name: 'settlement-information',
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ userOperateList: ['快手运营总监', '运营助理', '运营专员', '头条运营经理', '外部运营经理', '快手运营', '商务运营', '运营总经理', '直播运营', '头条运营总监', '快手运营助理', '快手运营经理', '头条运营', '头条运营助理'],
|
|
|
|
+ userSaleList: ['外部销售', '销售总监', '销售', '销售助理', '销售支持经理', '销售AM'],
|
|
|
|
+ downLoadAccountNum: 0,
|
|
|
|
+ downLoadImgNum: 0,
|
|
mode2: ['month', 'month'],
|
|
mode2: ['month', 'month'],
|
|
allAdverListOption: [],
|
|
allAdverListOption: [],
|
|
allProductListOption: [],
|
|
allProductListOption: [],
|
|
controlLoading: false,
|
|
controlLoading: false,
|
|
allSaleListOption: [],
|
|
allSaleListOption: [],
|
|
profitModalForm: {
|
|
profitModalForm: {
|
|
- name9: 'a',
|
|
|
|
|
|
+ mediaId: 1,
|
|
launchDateRange: []
|
|
launchDateRange: []
|
|
},
|
|
},
|
|
profitModalRules: {
|
|
profitModalRules: {
|
|
@@ -326,18 +355,16 @@ export default {
|
|
labelCol: {span: 7},
|
|
labelCol: {span: 7},
|
|
wrapperCol: {span: 14},
|
|
wrapperCol: {span: 14},
|
|
settlementModalForm: {
|
|
settlementModalForm: {
|
|
- name6: undefined,
|
|
|
|
- name7: undefined,
|
|
|
|
- name8: undefined,
|
|
|
|
- name9: 'a',
|
|
|
|
- name10: 'a',
|
|
|
|
- time: ''
|
|
|
|
|
|
+ advertiserId: undefined,
|
|
|
|
+ productId: undefined,
|
|
|
|
+ mediaId: 1,
|
|
|
|
+ uploadYears: ''
|
|
},
|
|
},
|
|
settlementModalRules: {
|
|
settlementModalRules: {
|
|
- name6: [{required: true, message: '请选择广告主公司名称', trigger: 'change'}],
|
|
|
|
- name7: [{required: true, message: '请选择产品名称', trigger: 'change'}],
|
|
|
|
|
|
+ advertiserId: [{required: true, message: '请选择广告主公司名称', trigger: 'change'}],
|
|
|
|
+ productId: [{required: true, message: '请选择产品名称', trigger: 'change'}],
|
|
name8: [{required: true, message: '请选择项目名称', trigger: 'change'}],
|
|
name8: [{required: true, message: '请选择项目名称', trigger: 'change'}],
|
|
- time: [{required: true, message: '请选择时间', trigger: 'change'}]
|
|
|
|
|
|
+ uploadYears: [{required: true, message: '请选择时间', trigger: 'change'}]
|
|
},
|
|
},
|
|
policyOperationForm: {
|
|
policyOperationForm: {
|
|
advertiserId: undefined,
|
|
advertiserId: undefined,
|
|
@@ -435,6 +462,32 @@ export default {
|
|
this.configForm.time = [moment(value[0]).format('YYYY-MM'), moment(value[1]).format('YYYY-MM')];
|
|
this.configForm.time = [moment(value[0]).format('YYYY-MM'), moment(value[1]).format('YYYY-MM')];
|
|
this.mode2 = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]];
|
|
this.mode2 = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]];
|
|
},
|
|
},
|
|
|
|
+ handleProductIdChange(e) {
|
|
|
|
+ this.handleGetDownLoadAllNum();
|
|
|
|
+ },
|
|
|
|
+ handleMediaIdChange(e) {
|
|
|
|
+ this.handleGetDownLoadAllNum();
|
|
|
|
+ },
|
|
|
|
+ handleGetDownLoadAllNum() {
|
|
|
|
+ const {advertiserId, productId, mediaId, uploadYears} = this.settlementModalForm;
|
|
|
|
+ const paramsData = {
|
|
|
|
+ advertiserId,
|
|
|
|
+ productId,
|
|
|
|
+ mediaId,
|
|
|
|
+ uploadYears: uploadYears ? moment(uploadYears).format('YYYY-MM') : ''
|
|
|
|
+ };
|
|
|
|
+ postAction(urlAcount + '/finance/settLementFileController/getAccountNumAndImgNum', paramsData).then(result => {
|
|
|
|
+ if (result.success) {
|
|
|
|
+ this.downLoadAccountNum = result.result.accountNum;
|
|
|
|
+ this.downLoadImgNum = result.result.imageNum;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 获取所有的广告主列表
|
|
// 获取所有的广告主列表
|
|
handleGetAllAdverList() {
|
|
handleGetAllAdverList() {
|
|
const paramsData = {
|
|
const paramsData = {
|
|
@@ -454,6 +507,7 @@ export default {
|
|
},
|
|
},
|
|
handleAdverOptionChange(e) {
|
|
handleAdverOptionChange(e) {
|
|
this.policyOperationForm.productId = undefined;
|
|
this.policyOperationForm.productId = undefined;
|
|
|
|
+ this.settlementModalForm.productId = undefined;
|
|
const paramsData = {
|
|
const paramsData = {
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
pageSize: 1000,
|
|
pageSize: 1000,
|
|
@@ -525,12 +579,29 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleLaunchDateRange(date, dateString) {
|
|
handleLaunchDateRange(date, dateString) {
|
|
- this.profitModalForm.launchDateRange = dateString;
|
|
|
|
|
|
+ this.profitModalForm.launchDateRange = dateString[0] ? dateString : [];
|
|
},
|
|
},
|
|
handleProfitModalSure() {
|
|
handleProfitModalSure() {
|
|
this.$refs.profitModalForm.validate(valid => {
|
|
this.$refs.profitModalForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- console.log('条件完全');
|
|
|
|
|
|
+ const {mediaId, launchDateRange} = this.profitModalForm;
|
|
|
|
+ const paramsData = {
|
|
|
|
+ mediaId,
|
|
|
|
+ startTime: launchDateRange[0],
|
|
|
|
+ endTime: launchDateRange[1]
|
|
|
|
+ };
|
|
|
|
+ const urlData = mediaId === 1 ? '/finance/exportReportController/porfitReportBytedance' : '/finance/exportReportController/porfitReportKuaiShou';
|
|
|
|
+ getAction(urlAcount + urlData, paramsData).then(result => {
|
|
|
|
+ if (result.code === -1) {
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ window.location.href = `${urlAcount}${urlData}?startTime=${paramsData.startTime}&endTime=${paramsData.endTime}`;
|
|
|
|
+ this.handleSettlementModalnCancel();
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ });
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
console.log('error submit!!');
|
|
console.log('error submit!!');
|
|
@@ -542,24 +613,50 @@ export default {
|
|
this.profitModalStatus = false;
|
|
this.profitModalStatus = false;
|
|
},
|
|
},
|
|
handleSettlementModalSure() {
|
|
handleSettlementModalSure() {
|
|
- console.log(this.settlementModalForm, '下载结算单确定按钮');
|
|
|
|
this.$refs.settlementModalForm.validate(valid => {
|
|
this.$refs.settlementModalForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- console.log('条件完全');
|
|
|
|
|
|
+ const {advertiserId, productId, mediaId, uploadYears} = this.settlementModalForm;
|
|
|
|
+ const paramsData = {
|
|
|
|
+ advertiserId,
|
|
|
|
+ productId,
|
|
|
|
+ mediaId,
|
|
|
|
+ uploadYears: moment(uploadYears).format('YYYY-MM')
|
|
|
|
+ };
|
|
|
|
+ const urlData = mediaId === 1 ? '/finance/exportReportController/settlementReportBytedance' : '/finance/exportReportController/settlementReportKuaiShou';
|
|
|
|
+ getAction(urlAcount + urlData, paramsData).then(result => {
|
|
|
|
+ if (result.code === -1) {
|
|
|
|
+ this.$message.error(result.message);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ window.location.href = `${urlAcount}${urlData}?advertiserId=${advertiserId}&productId=${productId}&mediaId=${mediaId}&uploadYears=${paramsData.uploadYears}`;
|
|
|
|
+ this.handleSettlementModalnCancel();
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ });
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- console.log('error submit!!');
|
|
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleSettlementModalnCancel() {
|
|
handleSettlementModalnCancel() {
|
|
|
|
+ this.settlementModalForm = {
|
|
|
|
+ advertiserId: undefined,
|
|
|
|
+ productId: undefined,
|
|
|
|
+ mediaId: 1,
|
|
|
|
+ uploadYears: ''
|
|
|
|
+ };
|
|
this.settlementModalStatus = false;
|
|
this.settlementModalStatus = false;
|
|
},
|
|
},
|
|
// 月份时间选择器
|
|
// 月份时间选择器
|
|
handleLaunchData(date, dateString) {
|
|
handleLaunchData(date, dateString) {
|
|
this.policyOperationForm.uploadYears = dateString;
|
|
this.policyOperationForm.uploadYears = dateString;
|
|
},
|
|
},
|
|
|
|
+ handleUploadYears(date, dateString) {
|
|
|
|
+ this.settlementModalForm.uploadYearss = dateString;
|
|
|
|
+ this.handleGetDownLoadAllNum();
|
|
|
|
+ },
|
|
// 查询的按钮
|
|
// 查询的按钮
|
|
handleQueryList() {
|
|
handleQueryList() {
|
|
this.tablePag = {
|
|
this.tablePag = {
|
|
@@ -589,11 +686,18 @@ export default {
|
|
this.policyOperationForm.settlementList = formData.filter(item => file.uid !== item.uid);
|
|
this.policyOperationForm.settlementList = formData.filter(item => file.uid !== item.uid);
|
|
},
|
|
},
|
|
beforeUpload(file) {
|
|
beforeUpload(file) {
|
|
|
|
+ let reg = /[\u4E00-\u9FA5]|[A-Za-z]/g;
|
|
|
|
+ const name = file.name.split('.')[0];
|
|
|
|
+ let finallyResult = name.match(reg);
|
|
const isZip = file.type.includes('png') || file.type.includes('jpeg');
|
|
const isZip = file.type.includes('png') || file.type.includes('jpeg');
|
|
if (!isZip) {
|
|
if (!isZip) {
|
|
this.$message.error('请上传正确的图片');
|
|
this.$message.error('请上传正确的图片');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ if (finallyResult && finallyResult.length) {
|
|
|
|
+ this.$message.error('请修改正确的图片名称');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
this.cosUpload(file);
|
|
this.cosUpload(file);
|
|
},
|
|
},
|
|
handleMd5(file) {
|
|
handleMd5(file) {
|
|
@@ -664,7 +768,7 @@ export default {
|
|
uid: file.name,
|
|
uid: file.name,
|
|
name: file.name,
|
|
name: file.name,
|
|
status: 'done',
|
|
status: 'done',
|
|
- url: '//' + data.Location
|
|
|
|
|
|
+ url: 'https://' + data.Location
|
|
});
|
|
});
|
|
// that.handleMd5(file);
|
|
// that.handleMd5(file);
|
|
}
|
|
}
|
|
@@ -740,7 +844,8 @@ export default {
|
|
productId: list.productId,
|
|
productId: list.productId,
|
|
mediaId: list.mediaId,
|
|
mediaId: list.mediaId,
|
|
uploadYears: list.uploadYears,
|
|
uploadYears: list.uploadYears,
|
|
- operateUserId: list.operateUserId
|
|
|
|
|
|
+ createUserId: list.operateUserId,
|
|
|
|
+ accountId: list.accountId
|
|
};
|
|
};
|
|
this.$confirm({
|
|
this.$confirm({
|
|
title: '提示',
|
|
title: '提示',
|
|
@@ -762,17 +867,14 @@ export default {
|
|
},
|
|
},
|
|
// 下载利润单
|
|
// 下载利润单
|
|
handleDownloadProfit() {
|
|
handleDownloadProfit() {
|
|
- console.log('下载利润单');
|
|
|
|
this.profitModalStatus = true;
|
|
this.profitModalStatus = true;
|
|
},
|
|
},
|
|
// 下载结算单
|
|
// 下载结算单
|
|
handleDownloadSettlement() {
|
|
handleDownloadSettlement() {
|
|
- console.log('下载结算单');
|
|
|
|
this.settlementModalStatus = true;
|
|
this.settlementModalStatus = true;
|
|
},
|
|
},
|
|
// 上传截图
|
|
// 上传截图
|
|
handleUploadAccount() {
|
|
handleUploadAccount() {
|
|
- console.log('上传截图');
|
|
|
|
this.policyOperationStatus = true;
|
|
this.policyOperationStatus = true;
|
|
}
|
|
}
|
|
}
|
|
}
|