|
@@ -91,10 +91,10 @@
|
|
|
>
|
|
|
<a-select-option
|
|
|
v-for="item in allSaleListOption"
|
|
|
- :key="item.userId"
|
|
|
- :value="item.userName"
|
|
|
+ :key="item.saleId"
|
|
|
+ :value="item.saleName"
|
|
|
>
|
|
|
- {{ item.userName }}
|
|
|
+ {{ item.saleName }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -259,11 +259,11 @@
|
|
|
<div class="line-quen-left">
|
|
|
<div class="policy-line-left">
|
|
|
<span class="line-left-spn">公司名称:</span>
|
|
|
- <span class="line-right-spn">{{ queryByIdList.companyName || '-' }}</span>
|
|
|
+ <span class="line-right-spn-else">{{ queryByIdList.companyName || '-' }}</span>
|
|
|
</div>
|
|
|
<div class="policy-line-left">
|
|
|
<span class="line-left-spn">广告主:</span>
|
|
|
- <span class="line-right-spn">{{ queryByIdList.advertiserName || '-' }}</span>
|
|
|
+ <span class="line-right-spn-else">{{ queryByIdList.advertiserName || '-' }}</span>
|
|
|
</div>
|
|
|
<div class="policy-line-left">
|
|
|
<span class="line-left-spn">产品名称:</span>
|
|
@@ -299,7 +299,7 @@
|
|
|
</div>
|
|
|
<div class="policy-line-left">
|
|
|
<span class="line-left-spn">集团简称:</span>
|
|
|
- <span class="line-right-spn">{{ queryByIdList.groupAbbreviation || '-' }}</span>
|
|
|
+ <span class="line-right-spn-else">{{ queryByIdList.groupAbbreviation || '-' }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="line-quen-right">
|
|
@@ -327,7 +327,7 @@
|
|
|
<div v-if="queryByIdList.isDianPay === 1">
|
|
|
<div class="policy-line-right">
|
|
|
<span class="line-left-spn">垫付公司:</span>
|
|
|
- <span class="line-right-spn">{{ queryByIdList.dianPayCompanyName }}</span>
|
|
|
+ <span class="line-right-spn-else">{{ queryByIdList.dianPayCompanyName }}</span>
|
|
|
</div>
|
|
|
<div class="policy-line-right">
|
|
|
<span class="line-left-spn">垫付返点:</span>
|
|
@@ -343,11 +343,18 @@
|
|
|
<span class="line-left-spn">备注:</span>
|
|
|
<span class="line-right-spn-else">{{ queryByIdList.remarks || '-' }}</span>
|
|
|
</div>
|
|
|
+ <div class="policy-line-right" v-if="queryByIdList.theBossContent">
|
|
|
+ <span class="line-left-spn">领导审核原因:</span>
|
|
|
+ <span class="line-right-spn-else">{{ queryByIdList.theBossContent || '-' }}</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="queryByIdList.updateOperation.includes('审核拒绝')" solt="footer" class="audit-policy-footer">
|
|
|
- <div></div>
|
|
|
- <div>
|
|
|
+ <div solt="footer" class="audit-policy-footer" style="justify-content: flex-end;">
|
|
|
+ <div v-if="queryByIdList.theBossRight == 'yes'">
|
|
|
+ <a-button type="primary" @click="toLeader" class="cancel-btn">转领导审批</a-button>
|
|
|
+ </div>
|
|
|
+ <div v-if="queryByIdList.updateOperation.includes('审核拒绝')">
|
|
|
<a-button type="default" class="cancel-btn" @click="handleAuditCancel">审核拒绝</a-button>
|
|
|
<a-button type="primary" @click="handleAuditSure">审核通过</a-button>
|
|
|
</div>
|
|
@@ -381,6 +388,36 @@
|
|
|
</a-form-model>
|
|
|
</div>
|
|
|
</a-modal>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 领导审核原因 -->
|
|
|
+ <a-modal
|
|
|
+ v-if="toLeaderVisible"
|
|
|
+ title="推送领导审核原因"
|
|
|
+ dialog-class="rejection-reason-class"
|
|
|
+ :visible="toLeaderVisible"
|
|
|
+ @ok="handleLeader"
|
|
|
+ @cancel="handleRejectCancel"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <div class="reason-class-header">请输入领导审核原因:</div>
|
|
|
+ <a-form-model
|
|
|
+ ref="rejectRuleForm"
|
|
|
+ :model="reasonForm"
|
|
|
+ :rules="reasonRules"
|
|
|
+ >
|
|
|
+ <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
|
|
|
v-if="policyOperationStatus"
|
|
@@ -463,13 +500,14 @@
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="销售" prop="createUserId">
|
|
|
+ <!-- @change="showAreaInfo" -->
|
|
|
<a-select
|
|
|
v-model="policyOperationForm.createUserId"
|
|
|
style="width: 100px"
|
|
|
show-search
|
|
|
allow-clear
|
|
|
:filter-option="handleFilterOption"
|
|
|
- @change="showAreaInfo"
|
|
|
+
|
|
|
>
|
|
|
<a-select-option
|
|
|
v-for="item in saleShowOption"
|
|
@@ -481,8 +519,8 @@
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item label="区域" prop="areaInfo" v-if="policyOperationForm.areaInfo">
|
|
|
- <!-- <a-select
|
|
|
+ <a-form-model-item label="区域" prop="areaInfo">
|
|
|
+ <a-select
|
|
|
v-model="policyOperationForm.areaInfo"
|
|
|
placeholder="请选择区域"
|
|
|
allow-clear
|
|
@@ -494,8 +532,8 @@
|
|
|
>
|
|
|
{{ item }}
|
|
|
</a-select-option>
|
|
|
- </a-select> -->
|
|
|
- {{policyOperationForm.areaInfo}}
|
|
|
+ </a-select>
|
|
|
+ <!-- {{policyOperationForm.areaInfo}} -->
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="我司主体" prop="companySubjectName">
|
|
|
<a-select
|
|
@@ -533,12 +571,11 @@
|
|
|
<template slot="title">由销售人员自行定义的集团系列产品简称</template>
|
|
|
<a-icon class="settlement-header-icon" type="question-circle"/>
|
|
|
</a-tooltip>
|
|
|
- <a-form-model-item label="集团简称">
|
|
|
+ <a-form-model-item label="集团简称" prop="groupAbbreviation">
|
|
|
<a-input
|
|
|
v-model="policyOperationForm.groupAbbreviation"
|
|
|
placeholder="请输入集团简称"
|
|
|
allow-clear
|
|
|
- @change="handleGroupAbbreviationChange"
|
|
|
/>
|
|
|
</a-form-model-item>
|
|
|
<div v-if="subTitleMsgStatus" style="color: #f00;margin-left: 140px">只能输入30个汉字</div>
|
|
@@ -622,7 +659,7 @@
|
|
|
@change="handleAddTimesChange"
|
|
|
/>
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item label="备注">
|
|
|
+ <a-form-model-item label="备注" prop="remarks">
|
|
|
<a-input
|
|
|
v-model="policyOperationForm.remarks"
|
|
|
placeholder="请输入备注"
|
|
@@ -630,7 +667,6 @@
|
|
|
@change="handleRemarksChange"
|
|
|
/>
|
|
|
</a-form-model-item>
|
|
|
- <div v-if="remarksStatus" style="color: #f00;margin-left: 140px">只能输入200个汉字</div>
|
|
|
</a-row>
|
|
|
</a-form-model>
|
|
|
</div>
|
|
@@ -645,7 +681,7 @@
|
|
|
:width="1000"
|
|
|
:footer="null"
|
|
|
>
|
|
|
- <a-button type="default" style="margin-bottom:10px" id="mybtn" @click="addSaleInfo">新增</a-button>
|
|
|
+ <a-button type="primary" style="margin-bottom:10px" id="mybtn" @click="addSaleInfo">新增</a-button>
|
|
|
<br>
|
|
|
设定对应关系后,该销售助理可以查看、创建对应销售的政策以及下载该销售负责账户的结算单
|
|
|
<a-table
|
|
@@ -653,7 +689,7 @@
|
|
|
:data-source="saleInfoList"
|
|
|
bordered
|
|
|
tableLayout="auto"
|
|
|
- :pagination="ipagination"
|
|
|
+ :pagination="false"
|
|
|
:loading='saleLoading'
|
|
|
style="word-break: break-all;"
|
|
|
>
|
|
@@ -706,6 +742,15 @@
|
|
|
</div>
|
|
|
|
|
|
</a-table>
|
|
|
+ <a-pagination
|
|
|
+ style="display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ margin-top: 10px;"
|
|
|
+ :total="ipagination.total"
|
|
|
+ :show-total="total => `共 ${ipagination.total} 条`"
|
|
|
+ size="small"
|
|
|
+ @change="handleCurrey"
|
|
|
+ />
|
|
|
</a-modal>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -859,12 +904,18 @@ export default {
|
|
|
{validator: handleCharacterLen30, trigger: 'blur'}
|
|
|
],
|
|
|
dianPayCompanyRebateRate: [{required: true, message: '请输入垫付返点', trigger: 'blur'}],
|
|
|
- addTimes: [{required: true, message: '请选择时间', trigger: 'change'}]
|
|
|
+ addTimes: [{required: true, message: '请选择时间', trigger: 'change'}],
|
|
|
+ remarks:[
|
|
|
+ { min: 0, max: 200, message: '只能输入200个汉字', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ groupAbbreviation:[
|
|
|
+ { min: 0, max: 30, message: '只能输入30个汉字', trigger: 'blur' },
|
|
|
+ ],
|
|
|
},
|
|
|
reasonRules: {
|
|
|
desc: [
|
|
|
{required: true, message: '请输入审核拒绝理由', trigger: 'blur'},
|
|
|
- {validator: handleCharacterLen100, trigger: 'blur'}
|
|
|
+ { min: 5, max: 100, message: '请输入最少五个汉字', trigger: 'blur' },
|
|
|
]
|
|
|
},
|
|
|
dataSource: [],
|
|
@@ -1060,6 +1111,7 @@ export default {
|
|
|
this.getSaleList()
|
|
|
}
|
|
|
},
|
|
|
+ toLeaderVisible: false,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -1073,8 +1125,20 @@ export default {
|
|
|
methods: {
|
|
|
...mapGetters(['userInfo']),
|
|
|
moment,
|
|
|
+ toLeader () {
|
|
|
+ // this.queryByIdList
|
|
|
+ this.toLeaderVisible = true
|
|
|
+ },
|
|
|
+ handleCurrey (current, pageSize) {
|
|
|
+ // 切换分页时的回调,
|
|
|
+ // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
|
|
|
+ this.ipagination.current = current;
|
|
|
+ this.ipagination.pageSize= pageSize;
|
|
|
+ this.getSaleList()
|
|
|
+ },
|
|
|
//新建销售对应人员
|
|
|
handleAddSale(){
|
|
|
+ this.ipagination.current = 1
|
|
|
this.saleVisible = true
|
|
|
this.getSaleList()
|
|
|
this.getSalePersonList()
|
|
@@ -1084,7 +1148,7 @@ export default {
|
|
|
params.userId = this.userInfo().id
|
|
|
|
|
|
this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', params).then(result => {
|
|
|
- if(result.code === 0) {
|
|
|
+ if(result.success) {
|
|
|
this.salePersonList = result.result.map(item => {
|
|
|
return {
|
|
|
key: item.saleId,
|
|
@@ -1118,7 +1182,7 @@ export default {
|
|
|
this.saleLoading = true
|
|
|
this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/list', params).then(result => {
|
|
|
this.saleLoading = false
|
|
|
- if(result.code === 0) {
|
|
|
+ if(result.success) {
|
|
|
this.saleInfoList = result.result.records.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
@@ -1148,38 +1212,55 @@ export default {
|
|
|
params.id = id
|
|
|
this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/delete', params).then(result => {
|
|
|
if(result.success) {
|
|
|
- this.getSaleList()
|
|
|
+ // this.getSaleList()
|
|
|
+
|
|
|
+ if(this.saleInfoList.length < 2 && this.ipagination.current > 1) {
|
|
|
+ this.ipagination.current = this.ipagination.current - 1
|
|
|
+ this.getSaleList()
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.getSaleList()
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//销售对应人员确定按钮
|
|
|
handleSale(item){
|
|
|
- let params = {}
|
|
|
- params.id = item.id?item.id:null
|
|
|
- params.saleId = item.saleIdContent.key
|
|
|
- params.saleName = item.saleIdContent.label.replace(/[\r\n]/g, "").trim();
|
|
|
- params.assistantId = item.assistantIdContent.key
|
|
|
- params.assistantName = item.assistantIdContent.label.replace(/[\r\n]/g, "").trim();
|
|
|
- params.createUserId = this.userInfo().id
|
|
|
- if(item.id) {
|
|
|
- this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/edit', params).then(result => {
|
|
|
- if(result.success) {
|
|
|
- this.getSaleList()
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(result.message)
|
|
|
- }
|
|
|
- })
|
|
|
+ if(item.saleIdContent){
|
|
|
+ let params = {}
|
|
|
+ params.id = item.id?item.id:null
|
|
|
+ params.saleId = item.saleIdContent.key
|
|
|
+ params.saleName = item.saleIdContent.label.replace(/[\r\n]/g, "").trim();
|
|
|
+ params.assistantId = item.assistantIdContent.key
|
|
|
+ params.assistantName = item.assistantIdContent.label.replace(/[\r\n]/g, "").trim();
|
|
|
+ params.createUserId = this.userInfo().id
|
|
|
+ if(item.id) {
|
|
|
+ this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/edit', params).then(result => {
|
|
|
+ if(result.success) {
|
|
|
+ this.getSaleList()
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$message.error(result.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ else {
|
|
|
+
|
|
|
+ this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/add', params).then(result => {
|
|
|
+ if(result.success) {
|
|
|
+ this.getSaleList()
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.$message.error(result.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
else {
|
|
|
- this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/add', params).then(result => {
|
|
|
- if(result.success) {
|
|
|
- this.getSaleList()
|
|
|
- }
|
|
|
- else{
|
|
|
- this.$message.error(result.message)
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$message.error('请选择人员')
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -1243,9 +1324,33 @@ export default {
|
|
|
getAction(urlAcount + '/finance/cwjsPolicyInfo/queryAeraByUserId', paramsData).then(result => {
|
|
|
if (result.code === 0) {
|
|
|
const defaultList = result.result[0].UserCompany;
|
|
|
- // this.saleShowOption = defaultList;
|
|
|
+ this.saleShowOption = defaultList.map(item=>{
|
|
|
+ return {
|
|
|
+ saleId: item.userId,
|
|
|
+ saleName: item.userName
|
|
|
+ }
|
|
|
+ });
|
|
|
this.addAreaList = defaultList[0].nickName.split(',');
|
|
|
this.addSubjectList = result.result[0].companySubjects;
|
|
|
+ getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getCwSaleAndAssistantList', paramsData).then(result => {
|
|
|
+ if (result.code === 0) {
|
|
|
+ for (let i = 0; i < result.result.length; i++) {
|
|
|
+ if( this.saleShowOption[0].saleId == result.result[i].saleId){
|
|
|
+
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.saleShowOption.push(result.result[i])
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(result.message);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ console.log(error, 'eeee');
|
|
|
+ });
|
|
|
}
|
|
|
else {
|
|
|
this.$message.error(result.message);
|
|
@@ -1253,16 +1358,7 @@ export default {
|
|
|
}).catch(error => {
|
|
|
console.log(error, 'eeee');
|
|
|
});
|
|
|
- getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getCwSaleAndAssistantList', paramsData).then(result => {
|
|
|
- if (result.code === 0) {
|
|
|
- this.saleShowOption = result.result
|
|
|
- }
|
|
|
- else {
|
|
|
- this.$message.error(result.message);
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- console.log(error, 'eeee');
|
|
|
- });
|
|
|
+
|
|
|
|
|
|
},
|
|
|
handleExamineAll(data) {
|
|
@@ -1291,8 +1387,8 @@ export default {
|
|
|
const paramsData = {
|
|
|
userId: this.userInfo().id
|
|
|
};
|
|
|
- getAction(urlAcount + '/finance/cwjsPolicyInfo/getAllSaleList', paramsData).then(result => {
|
|
|
- if (result.code === 200) {
|
|
|
+ getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', paramsData).then(result => {
|
|
|
+ if (result.success) {
|
|
|
this.allSaleListOption = result.result || [];
|
|
|
}
|
|
|
else {
|
|
@@ -1490,7 +1586,7 @@ export default {
|
|
|
// 新增政策按钮
|
|
|
handleAddAccountPolicy() {
|
|
|
this.addType = 'add';
|
|
|
- this.policyOperationForm.createUserId = this.saleShowOption[0].userId || '';
|
|
|
+ this.policyOperationForm.createUserId = this.userInfo().id;
|
|
|
this.policyOperationStatus = true;
|
|
|
},
|
|
|
// 新增政策确定按钮
|
|
@@ -1595,10 +1691,28 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //领导审核理由
|
|
|
+ handleLeader() {
|
|
|
+ this.$refs.rejectRuleForm.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ const params = {
|
|
|
+ id: this.tableOnlyId || this.queryByIdList.id,
|
|
|
+ type: 4,
|
|
|
+ value: this.reasonForm.desc
|
|
|
+ };
|
|
|
+ this.handleExamineAll(params);
|
|
|
+ this.handleRejectCancel();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 审核拒绝取消按钮
|
|
|
handleRejectCancel() {
|
|
|
this.reasonForm.desc = '';
|
|
|
this.rejectAuditStatus = false;
|
|
|
+ this.toLeaderVisible = false
|
|
|
},
|
|
|
// 查看的按钮
|
|
|
handleDetail(list) {
|