|
@@ -39,6 +39,10 @@
|
|
||userInfo().id == 'a8c0a3d4df4f4b7083107a429b5391df'" class="add-acount-policy-btn">
|
|
||userInfo().id == 'a8c0a3d4df4f4b7083107a429b5391df'" class="add-acount-policy-btn">
|
|
<a-button @click="handleAddSale">销售对应人员</a-button>
|
|
<a-button @click="handleAddSale">销售对应人员</a-button>
|
|
</span>
|
|
</span>
|
|
|
|
+ <span v-if="userInfo().roleName == '管理员'
|
|
|
|
+ ||userInfo().roleName == '财务'" class="add-acount-policy-btn">
|
|
|
|
+ <a-button @click="exportPolicy" :loading="exportLoading">导出</a-button>
|
|
|
|
+ </span>
|
|
<span v-if="userInfo().roleName !== '财务' && userInfo().roleName != '法务'" class="add-acount-policy-btn">
|
|
<span v-if="userInfo().roleName !== '财务' && userInfo().roleName != '法务'" class="add-acount-policy-btn">
|
|
<a-button type="primary" @click="handleAddAccountPolicy">新增政策</a-button>
|
|
<a-button type="primary" @click="handleAddAccountPolicy">新增政策</a-button>
|
|
</span>
|
|
</span>
|
|
@@ -209,6 +213,10 @@
|
|
<span slot="dianPayCompanyRebateRate" slot-scope="text">
|
|
<span slot="dianPayCompanyRebateRate" slot-scope="text">
|
|
<span>{{ text ? text + '%' : '-' }}</span>
|
|
<span>{{ text ? text + '%' : '-' }}</span>
|
|
</span>
|
|
</span>
|
|
|
|
+ <span slot="delReason" slot-scope="text">
|
|
|
|
+ <span>{{ text ? text : '-' }}</span>
|
|
|
|
+ </span>
|
|
|
|
+
|
|
<span slot="accountingPeriod" slot-scope="text">
|
|
<span slot="accountingPeriod" slot-scope="text">
|
|
<span>{{ text ? text + '天' : '-' }}</span>
|
|
<span>{{ text ? text + '天' : '-' }}</span>
|
|
</span>
|
|
</span>
|
|
@@ -243,6 +251,8 @@
|
|
<a v-if="record.updateOperation.includes('提交审核')" @click="handleSubmitReview(record)">提交审核</a>
|
|
<a v-if="record.updateOperation.includes('提交审核')" @click="handleSubmitReview(record)">提交审核</a>
|
|
<a-divider v-if="record.updateOperation.includes('编辑')" type="vertical"/>
|
|
<a-divider v-if="record.updateOperation.includes('编辑')" type="vertical"/>
|
|
<a v-if="record.updateOperation.includes('编辑')" @click="handleEditTable(record)">编辑</a>
|
|
<a v-if="record.updateOperation.includes('编辑')" @click="handleEditTable(record)">编辑</a>
|
|
|
|
+ <a-divider v-if="record.updateOperation.includes('作废')" type="vertical"/>
|
|
|
|
+ <a v-if="record.updateOperation.includes('作废')" @click="handleVoid(record)">作废</a>
|
|
<!--
|
|
<!--
|
|
<a-divider v-if="record.updateOperation.includes('审核通过')" type="vertical"/>
|
|
<a-divider v-if="record.updateOperation.includes('审核通过')" type="vertical"/>
|
|
<a v-if="record.updateOperation.includes('审核通过')" @click="handleAuditSure(record)">审核通过</a>
|
|
<a v-if="record.updateOperation.includes('审核通过')" @click="handleAuditSure(record)">审核通过</a>
|
|
@@ -470,6 +480,37 @@
|
|
</div>
|
|
</div>
|
|
</a-modal>
|
|
</a-modal>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 作废原因 -->
|
|
|
|
+ <a-modal
|
|
|
|
+ v-if="voidOperationStatus"
|
|
|
|
+ title="作废原因"
|
|
|
|
+ dialog-class="rejection-reason-class"
|
|
|
|
+ :visible="voidOperationStatus"
|
|
|
|
+ @ok="handleVoidOk"
|
|
|
|
+ @cancel="
|
|
|
|
+ voidOperationStatus = false
|
|
|
|
+ reasonForm.desc = undefined
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <div>
|
|
|
|
+ <div class="reason-class-header">请输入作废原因:</div>
|
|
|
|
+ <a-form-model
|
|
|
|
+ ref="rejectRuleForm"
|
|
|
|
+ :model="reasonForm"
|
|
|
|
+ :rules="reasonRulesVoid"
|
|
|
|
+ >
|
|
|
|
+ <a-form-model-item label="" prop="desc">
|
|
|
|
+ <a-input
|
|
|
|
+ class="rejection-textarea-msg"
|
|
|
|
+ v-model="reasonForm.desc"
|
|
|
|
+ type="textarea"
|
|
|
|
+ placeholder="请输入至少五个字符"
|
|
|
|
+ />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-form-model>
|
|
|
|
+ </div>
|
|
|
|
+ </a-modal>
|
|
<!-- 新增、编辑政策 -->
|
|
<!-- 新增、编辑政策 -->
|
|
<a-modal
|
|
<a-modal
|
|
v-if="policyOperationStatus"
|
|
v-if="policyOperationStatus"
|
|
@@ -845,7 +886,7 @@
|
|
<script>
|
|
<script>
|
|
import moment from 'moment';
|
|
import moment from 'moment';
|
|
|
|
|
|
-import {getAction, postAction} from '@/api/manage';
|
|
|
|
|
|
+import {getAction, postAction, downFile} from '@/api/manage';
|
|
import {mapGetters} from 'vuex';
|
|
import {mapGetters} from 'vuex';
|
|
import {urlAcount} from './policy-management-server.js';
|
|
import {urlAcount} from './policy-management-server.js';
|
|
|
|
|
|
@@ -947,6 +988,10 @@ export default {
|
|
{
|
|
{
|
|
id: 4,
|
|
id: 4,
|
|
name: '审核拒绝'
|
|
name: '审核拒绝'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 5,
|
|
|
|
+ name: '作废'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
subTitleMsgStatus: false,
|
|
subTitleMsgStatus: false,
|
|
@@ -962,6 +1007,7 @@ export default {
|
|
rejectionReasonStatus: false,
|
|
rejectionReasonStatus: false,
|
|
auditPolicyStatus: false,
|
|
auditPolicyStatus: false,
|
|
policyOperationStatus: false,
|
|
policyOperationStatus: false,
|
|
|
|
+ voidOperationStatus: false,
|
|
totalAll: 0,
|
|
totalAll: 0,
|
|
policyOperationForm: {
|
|
policyOperationForm: {
|
|
defaultFormList: [
|
|
defaultFormList: [
|
|
@@ -989,6 +1035,7 @@ export default {
|
|
addTimes: [],
|
|
addTimes: [],
|
|
remarks: ''
|
|
remarks: ''
|
|
},
|
|
},
|
|
|
|
+ voidId: undefined,
|
|
reasonForm: {
|
|
reasonForm: {
|
|
desc: ''
|
|
desc: ''
|
|
},
|
|
},
|
|
@@ -1046,6 +1093,12 @@ export default {
|
|
{ min: 5, max: 100, message: '请输入5-100个字符', trigger: 'blur' },
|
|
{ min: 5, max: 100, message: '请输入5-100个字符', trigger: 'blur' },
|
|
]
|
|
]
|
|
},
|
|
},
|
|
|
|
+ reasonRulesVoid:{
|
|
|
|
+ desc: [
|
|
|
|
+ {required: true, message: '请输入推送作废理由', trigger: 'blur'},
|
|
|
|
+ { min: 5, max: 100, message: '请输入5-100个字符', trigger: 'blur' },
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
dataSource: [],
|
|
dataSource: [],
|
|
okType:3,
|
|
okType:3,
|
|
columns: [
|
|
columns: [
|
|
@@ -1166,6 +1219,13 @@ export default {
|
|
scopedSlots: {customRender: 'legalAffairsContent'}
|
|
scopedSlots: {customRender: 'legalAffairsContent'}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ title: '作废理由',
|
|
|
|
+ align: 'center',
|
|
|
|
+ dataIndex: 'delReason',
|
|
|
|
+ width: 200,
|
|
|
|
+ scopedSlots: {customRender: 'delReason'}
|
|
|
|
+ },
|
|
|
|
+ {
|
|
title: '备注',
|
|
title: '备注',
|
|
align: 'center',
|
|
align: 'center',
|
|
dataIndex: 'remarks',
|
|
dataIndex: 'remarks',
|
|
@@ -1255,6 +1315,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
toLeaderVisible: false,
|
|
toLeaderVisible: false,
|
|
|
|
+ exportLoading: false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -1267,6 +1328,42 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapGetters(['userInfo']),
|
|
...mapGetters(['userInfo']),
|
|
|
|
+ exportPolicy(){
|
|
|
|
+
|
|
|
|
+ this.exportLoading = true;
|
|
|
|
+ const paramsData = {
|
|
|
|
+ userId: this.userInfo().id,
|
|
|
|
+ companyName: this.configForm.companyName,
|
|
|
|
+ advertiserName: this.configForm.adverName,
|
|
|
|
+ productName: this.configForm.productName,
|
|
|
|
+ mediaType: this.configForm.creativeMedia === 'no' ? '' : this.configForm.creativeMedia,
|
|
|
|
+ rebateType: this.configForm.creativeRebate === 'no' ? '' : this.configForm.creativeRebate,
|
|
|
|
+ dianPayCompanyName: this.configForm.creativeAdvance,
|
|
|
|
+ saleId: this.configForm.creativeSale === 'no' ? '' : this.configForm.creativeSale,
|
|
|
|
+ promotionType: this.configForm.creativeOperate === 'no' ? '' : this.configForm.creativeOperate,
|
|
|
|
+ approvedStatus: this.configForm.searchStatus === 'no' ? '' : this.configForm.searchStatus,
|
|
|
|
+ startTime: this.configForm.time[0],
|
|
|
|
+ endTime: this.configForm.time[1],
|
|
|
|
+ pageNo: this.tablePag.page,
|
|
|
|
+ pageSize: this.tablePag.size
|
|
|
|
+ };
|
|
|
|
+ downFile(urlAcount + '/finance/cwjsPolicyInfo/list', paramsData).then(res => {
|
|
|
|
+ // console.log(res)
|
|
|
|
+ this.exportLoading=false;
|
|
|
|
+ let blob = new Blob([res], {
|
|
|
|
+ type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
|
|
+ })
|
|
|
|
+ // console.log(blob)
|
|
|
|
+ let downloadElement = document.createElement('a')
|
|
|
|
+ let href = window.URL.createObjectURL(blob) //创建下载的链接
|
|
|
|
+ downloadElement.href = href
|
|
|
|
+ downloadElement.download = '销售政策列表'+'.xlsx' //下载后文件名
|
|
|
|
+ document.body.appendChild(downloadElement)
|
|
|
|
+ downloadElement.click() //点击下载
|
|
|
|
+ document.body.removeChild(downloadElement) //下载完成移除元素
|
|
|
|
+ window.URL.revokeObjectURL(href) //释放掉blob对象
|
|
|
|
+ })
|
|
|
|
+ },
|
|
moment,
|
|
moment,
|
|
toLeader () {
|
|
toLeader () {
|
|
// this.queryByIdList
|
|
// this.queryByIdList
|
|
@@ -1724,6 +1821,11 @@ export default {
|
|
};
|
|
};
|
|
this.handleInitTable();
|
|
this.handleInitTable();
|
|
},
|
|
},
|
|
|
|
+ //作废操作
|
|
|
|
+ handleVoid(list){
|
|
|
|
+ this.voidOperationStatus = true
|
|
|
|
+ this.voidId = list.id
|
|
|
|
+ },
|
|
// 编辑按钮操作
|
|
// 编辑按钮操作
|
|
handleEditTable(list) {
|
|
handleEditTable(list) {
|
|
this.addType = 'edit';
|
|
this.addType = 'edit';
|
|
@@ -1856,6 +1958,36 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//领导审核理由
|
|
//领导审核理由
|
|
|
|
+ handleVoidOk() {
|
|
|
|
+ this.$refs.rejectRuleForm.validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ const params = {
|
|
|
|
+ policyId: this.voidId,
|
|
|
|
+ delReason: this.reasonForm.desc
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ getAction(urlAcount + '/finance/cwjsPolicyInfo/toVoidpolicy', params).then(result => {
|
|
|
|
+ if (result.code === 0) {
|
|
|
|
+
|
|
|
|
+ this.voidOperationStatus = false
|
|
|
|
+ this.reasonForm.desc = undefined
|
|
|
|
+ this.handleInitTable()
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.$message.error(result.message)
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log(error, 'eeee');
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ this.voidOperationStatus = false;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //领导审核理由
|
|
handleLeader() {
|
|
handleLeader() {
|
|
this.$refs.rejectRuleForm.validate(valid => {
|
|
this.$refs.rejectRuleForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|