|
@@ -5,6 +5,9 @@
|
|
|
<span class="policy-export-btn">销售政策列表</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
+ <span v-if="userInfo().roleName == '管理员'||userInfo().roleName == '销售总监'" class="add-acount-policy-btn">
|
|
|
+ <a-button @click="handleAddSale">销售对应人员</a-button>
|
|
|
+ </span>
|
|
|
<span v-if="userInfo().roleName !== '财务'" class="add-acount-policy-btn">
|
|
|
<a-button type="primary" @click="handleAddAccountPolicy">新增政策</a-button>
|
|
|
</span>
|
|
@@ -88,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>
|
|
@@ -185,7 +188,13 @@
|
|
|
<span>{{ text }} 至 {{ record.policyEndDate }}</span>
|
|
|
</span>
|
|
|
<span slot="remarks" slot-scope="text">
|
|
|
- <span>{{ text ? text : '-' }}</span>
|
|
|
+ <a-tooltip>
|
|
|
+ <template slot="title" v-if="text">
|
|
|
+ {{text}}
|
|
|
+ </template>
|
|
|
+ <span class="line-table-width">{{ text ? text : '-' }}</span>
|
|
|
+ </a-tooltip>
|
|
|
+
|
|
|
</span>
|
|
|
<span slot="action" slot-scope="text, record">
|
|
|
<a v-if="record.updateOperation.includes('查看')" @click="handleDetail(record)">操作</a>
|
|
@@ -250,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>
|
|
@@ -290,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">
|
|
@@ -318,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>
|
|
@@ -334,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>
|
|
@@ -372,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"
|
|
@@ -454,19 +500,22 @@
|
|
|
</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"
|
|
|
+
|
|
|
>
|
|
|
<a-select-option
|
|
|
v-for="item in saleShowOption"
|
|
|
- :key="item.userId"
|
|
|
- :value="item.userId"
|
|
|
+ :key="item.saleId"
|
|
|
+ :value="item.saleId"
|
|
|
+
|
|
|
>
|
|
|
- {{ item.userName }}
|
|
|
+ {{ item.saleName }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
@@ -484,6 +533,7 @@
|
|
|
{{ item }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
+ <!-- {{policyOperationForm.areaInfo}} -->
|
|
|
</a-form-model-item>
|
|
|
<a-form-model-item label="我司主体" prop="companySubjectName">
|
|
|
<a-select
|
|
@@ -521,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>
|
|
@@ -555,7 +604,13 @@
|
|
|
<a-select-option :value="3">服务费</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
- <a-form-model-item label="返点比例" prop="rebateRate">
|
|
|
+ <a-form-model-item :label="policyOperationForm.rebateType == 3?'服务费':'返点比例'" prop="rebateRate"
|
|
|
+ :rules="{
|
|
|
+ required: true,
|
|
|
+ message: policyOperationForm.rebateType == 3?'请输入服务费比例':'请输入返点比例',
|
|
|
+ trigger: 'blur',
|
|
|
+ }"
|
|
|
+ >
|
|
|
<a-input-number
|
|
|
v-model="policyOperationForm.rebateRate"
|
|
|
:step="0.01"
|
|
@@ -604,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="请输入备注"
|
|
@@ -612,11 +667,91 @@
|
|
|
@change="handleRemarksChange"
|
|
|
/>
|
|
|
</a-form-model-item>
|
|
|
- <div v-if="remarksStatus" style="color: #f00;margin-left: 140px">只能输入100个汉字</div>
|
|
|
</a-row>
|
|
|
</a-form-model>
|
|
|
</div>
|
|
|
</a-modal>
|
|
|
+
|
|
|
+ <!-- 销售对应人员 -->
|
|
|
+ <a-modal
|
|
|
+ v-if="saleVisible"
|
|
|
+ title="销售对应人员"
|
|
|
+ :visible="saleVisible"
|
|
|
+ @cancel="handleSaleCancel"
|
|
|
+ :width="1000"
|
|
|
+ :footer="null"
|
|
|
+ >
|
|
|
+ <a-button type="primary" style="margin-bottom:10px" id="mybtn" @click="addSaleInfo">新增</a-button>
|
|
|
+ <br>
|
|
|
+ 设定对应关系后,该销售助理可以查看、创建对应销售的政策以及下载该销售负责账户的结算单
|
|
|
+ <a-table
|
|
|
+ :columns="saleInfoColumns"
|
|
|
+ :data-source="saleInfoList"
|
|
|
+ bordered
|
|
|
+ tableLayout="auto"
|
|
|
+ :pagination="false"
|
|
|
+ :loading='saleLoading'
|
|
|
+ style="word-break: break-all;"
|
|
|
+ >
|
|
|
+ <div slot="saleName" slot-scope="text, records">
|
|
|
+ <span v-if="!records.edit">{{ text }}</span>
|
|
|
+ <a-select
|
|
|
+ v-else
|
|
|
+ show-search
|
|
|
+ v-model="records.saleIdContent"
|
|
|
+ placeholder="请选择销售"
|
|
|
+ option-filter-prop="children"
|
|
|
+ style="width: 200px"
|
|
|
+ :filter-option="filterOption"
|
|
|
+ :labelInValue="true"
|
|
|
+ >
|
|
|
+ <a-select-option v-for="(item, index) in salePersonList" :key="index" :value="item.key" :disabled="records.assistantIdContent?records.assistantIdContent.key == item.key:false">
|
|
|
+ {{item.label}}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </div>
|
|
|
+ <div slot="assistantName" slot-scope="text, records">
|
|
|
+ <span v-if="!records.edit">{{ text }}</span>
|
|
|
+ <a-select
|
|
|
+ v-else
|
|
|
+ show-search
|
|
|
+ v-model="records.assistantIdContent"
|
|
|
+ placeholder="请选择销售助理"
|
|
|
+ option-filter-prop="children"
|
|
|
+ style="width: 200px"
|
|
|
+ :filter-option="filterOption"
|
|
|
+ :labelInValue="true"
|
|
|
+ >
|
|
|
+ <a-select-option v-for="(item, index) in salePersonList" :key="index" :value="item.key" :disabled="records.saleIdContent?records.saleIdContent.key == item.key:false">
|
|
|
+ {{item.label}}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </div>
|
|
|
+ <div slot="action" slot-scope="text, records">
|
|
|
+ <div v-if="!records.edit">
|
|
|
+ <a @click="handleEdit(records)">编辑</a>
|
|
|
+ <a-divider type="vertical"/>
|
|
|
+ <a-popconfirm title="是否确认删除?" @confirm="() => handleDelete(records.id)">
|
|
|
+ <a>删除</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <a-button type="primary" @click="handleSale(records)">保存</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="handleSaleCancelOne(records)">取消</a-button>
|
|
|
+ </div>
|
|
|
+ </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>
|
|
|
<script>
|
|
@@ -762,18 +897,25 @@ export default {
|
|
|
areaInfo: [{required: true, message: '请选择区域', trigger: 'change'}],
|
|
|
companySubjectName: [{required: true, message: '请选择我司主体', trigger: 'change'}],
|
|
|
rebateRate: [{required: true, message: '请输入返点比例', trigger: 'blur'}],
|
|
|
+ rebateRateElse: [{required: true, message: '请输入请输入服务费比例', trigger: 'blur'}],
|
|
|
accountingPeriod: [{required: true, message: '请输入账期', trigger: 'blur'}],
|
|
|
dianPayCompanyName: [
|
|
|
{required: true, message: '请输入垫付公司', trigger: 'blur'},
|
|
|
{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: '请输入5-100个字符', trigger: 'blur' },
|
|
|
]
|
|
|
},
|
|
|
dataSource: [],
|
|
@@ -924,7 +1066,52 @@ export default {
|
|
|
saleShowOption: [],
|
|
|
addSubjectList: [],
|
|
|
rejectionReasonList: {},
|
|
|
- tableOnlyId: ''
|
|
|
+ tableOnlyId: '',
|
|
|
+ saleVisible: false,
|
|
|
+ saleInfoList: [],
|
|
|
+ salePersonList: [],
|
|
|
+ saleLoading:false,
|
|
|
+ saleInfoColumns: [
|
|
|
+ {
|
|
|
+ title: '销售名称',
|
|
|
+ dataIndex: 'saleName',
|
|
|
+ align: 'center',
|
|
|
+ key: 'saleName',
|
|
|
+ scopedSlots: { customRender: 'saleName' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '销售助理名称',
|
|
|
+ dataIndex: 'assistantName',
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: { customRender: 'assistantName' }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: { customRender: 'action' }
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ ipagination: {
|
|
|
+ current: 1,
|
|
|
+ pageSize: 10,
|
|
|
+
|
|
|
+ showTotal: (total, range) => {
|
|
|
+ return range[0] + "-" + range[1] + " 共" + total + "条"
|
|
|
+ },
|
|
|
+ showQuickJumper: true,
|
|
|
+ showSizeChanger:true,
|
|
|
+ pageSizeOptions: ['10', '30', '50'],
|
|
|
+ total: 0,
|
|
|
+ onChange: (current, pageSize) => {
|
|
|
+ // 切换分页时的回调,
|
|
|
+ // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
|
|
|
+ this.ipagination.current = current;
|
|
|
+ this.ipagination.pageSize= pageSize;
|
|
|
+ this.getSaleList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toLeaderVisible: false,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -938,6 +1125,160 @@ 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()
|
|
|
+ },
|
|
|
+ getSalePersonList(){
|
|
|
+ let params = {}
|
|
|
+ params.userId = this.userInfo().id
|
|
|
+
|
|
|
+ this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', params).then(result => {
|
|
|
+ if(result.success) {
|
|
|
+ this.salePersonList = result.result.map(item => {
|
|
|
+ return {
|
|
|
+ key: item.saleId,
|
|
|
+ label: item.saleName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(result.message)
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //新增
|
|
|
+ addSaleInfo(){
|
|
|
+ this.saleInfoList.push( {
|
|
|
+ saleId:undefined,
|
|
|
+ assistantId:undefined,
|
|
|
+ edit: true,
|
|
|
+ saleIdContent: undefined,
|
|
|
+ assistantIdContent: undefined
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取销售对应列表
|
|
|
+ getSaleList(){
|
|
|
+ let params = {}
|
|
|
+ params.userId = this.userInfo().id
|
|
|
+ params.pageNo = this.ipagination.current
|
|
|
+ params.pageSize = this.ipagination.pageSize
|
|
|
+ this.saleLoading = true
|
|
|
+ this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/list', params).then(result => {
|
|
|
+ this.saleLoading = false
|
|
|
+ if(result.success) {
|
|
|
+ this.saleInfoList = result.result.records.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ edit: false,
|
|
|
+ saleIdContent: undefined,
|
|
|
+ assistantIdContent: undefined
|
|
|
+ }
|
|
|
+ }) || []
|
|
|
+ this.ipagination.total = result.result.total || 0
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(result.message)
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //编辑销售对应人员按钮
|
|
|
+ handleEdit(item){
|
|
|
+ item.edit = true
|
|
|
+ item.saleIdContent = {key: item.saleId, label: item.saleName}
|
|
|
+ item.assistantIdContent = {key: item.assistantId, label: item.assistantName}
|
|
|
+ },
|
|
|
+ //删除销售对应人员按钮
|
|
|
+ handleDelete(id){
|
|
|
+ let params = {}
|
|
|
+ params.id = id
|
|
|
+ this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/delete', params).then(result => {
|
|
|
+ if(result.success) {
|
|
|
+ // 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){
|
|
|
+ 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.$message.error('请选择人员')
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //销售对应人员取消确定按钮
|
|
|
+ handleSaleCancelOne(item){
|
|
|
+
|
|
|
+ if(item.id){
|
|
|
+ item.edit = false
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.saleInfoList.pop()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //销售对应人员取消按钮
|
|
|
+ handleSaleCancel(){
|
|
|
+ this.saleVisible = false
|
|
|
+ },
|
|
|
+
|
|
|
calculationScope(data) {
|
|
|
let defaultScope = '';
|
|
|
switch (data) {
|
|
@@ -958,9 +1299,24 @@ export default {
|
|
|
handleFilterOption(input, option) {
|
|
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
|
},
|
|
|
+ filterOption(input, option) {
|
|
|
+ return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
|
+ },
|
|
|
handleAddTimesChange(date, dateString) {
|
|
|
this.policyOperationForm.addTimes = dateString;
|
|
|
},
|
|
|
+ showAreaInfo(data){
|
|
|
+ if(data){
|
|
|
+ var dataShow = this.saleShowOption.filter(item=>{
|
|
|
+ return item.saleId == data
|
|
|
+ })
|
|
|
+ this.policyOperationForm.areaInfo = dataShow[0].nickName
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.policyOperationForm.areaInfo = undefined
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
handleAddGetArea(data) {
|
|
|
const paramsData = {
|
|
|
userId: this.userInfo().id
|
|
@@ -968,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);
|
|
@@ -978,6 +1358,8 @@ export default {
|
|
|
}).catch(error => {
|
|
|
console.log(error, 'eeee');
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
handleExamineAll(data) {
|
|
|
const paramsData = {
|
|
@@ -1005,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 {
|
|
@@ -1204,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;
|
|
|
},
|
|
|
// 新增政策确定按钮
|
|
@@ -1309,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) {
|