zm^2
戴余标 2 years ago
parent 2a38e78d19
commit 3f6376ff46

@ -18,7 +18,8 @@ const app = {
remindReceivablesPlan: 0,
endContract: 0,
totalNum: 0
}
},
crmCustomerNumForC: 0
},
mutations: {
@ -54,7 +55,7 @@ const app = {
reject(error)
})
crmCustomerNumForC().then(res => {
console.log(res.data)
commit('SET_CUSTOMERNUM', res.data)
}).catch(() => {})
})
}

@ -250,7 +250,11 @@ const permission = {
messageItem.children[0].meta.num = num
Vue.set(state.crmRouters, 1, messageItem)
},
SET_CUSTOMERNUM: (state, num) => {
const messageItem = state.crmRouters[3]
messageItem.children[0].meta.num = num
Vue.set(state.crmRouters, 3, messageItem)
},
SET_GROUPSLIST: (state, data) => {
state.groupsList = data
}

@ -1,107 +1,58 @@
<template>
<create-view
:loading="loading"
:body-style="{ height: '100%'}">
<flexbox
direction="column"
align="stretch"
class="pool-add-container">
<create-view :loading="loading" :body-style="{ height: '100%' }">
<flexbox direction="column" align="stretch" class="pool-add-container">
<flexbox class="pool-add-header">
<div style="flex:1;font-size:17px;color:#333;font-weight: bold;">{{ title }}</div>
<i
class="el-icon-close close"
@click="hidenView" />
<i class="el-icon-close close" @click="hidenView" />
</flexbox>
<div class="pool-add-content">
<create-sections
v-if="baseFrom"
title="基本信息">
<flexbox
style="margin-top: 8px;"
direction="column"
align="stretch">
<el-form
ref="ruleForm"
:model="baseFrom"
:rules="baseRules"
label-position="top"
class="pool-add-items">
<el-form-item
prop="pool_name"
class="pool-add-item pool-add-item__left">
<div
slot="label"
style="display: inline-block;">
<create-sections v-if="baseFrom" title="基本信息">
<flexbox style="margin-top: 8px;" direction="column" align="stretch">
<el-form ref="ruleForm" :model="baseFrom" :rules="baseRules" label-position="top" class="pool-add-items">
<el-form-item prop="pool_name" class="pool-add-item pool-add-item__left">
<div slot="label" style="display: inline-block;">
<div class="xr-form-label">
公海名称
</div>
</div>
<el-input v-model="baseFrom.pool_name" :maxlength="100" />
</el-form-item>
<el-form-item
prop="adminUsers"
class="pool-add-item pool-add-item__right">
<div
slot="label"
style="display: inline-block;">
<el-form-item prop="adminUsers" class="pool-add-item pool-add-item__right">
<div slot="label" style="display: inline-block;">
<div class="xr-form-label">
公海管理员<el-tooltip
content="客户公海管理员可对客户公海客户进行领取、分配、删除、导出等操作"
effect="dark"
placement="top">
公海管理员<el-tooltip content="客户公海管理员可对客户公海客户进行领取、分配、删除、导出等操作" effect="dark" placement="top">
<i class="wk wk-help wk-help-tips" />
</el-tooltip>
</div>
</div>
<xh-user-cell
:radio="false"
:value="baseFrom.adminUsers"
@value-change="userChange" />
<xh-user-cell :radio="false" :value="baseFrom.adminUsers" @value-change="userChange" />
</el-form-item>
<el-form-item
prop="memberUsers"
class="pool-add-item pool-add-item__left">
<div
slot="label"
style="display: inline-block;">
<el-form-item prop="memberUsers" class="pool-add-item pool-add-item__left">
<div slot="label" style="display: inline-block;">
<div class="xr-form-label">
公海成员<el-tooltip
content="客户公海规则对客户公海成员生效(超级管理员除外),客户公海成员可查看以及领取公海客户"
effect="dark"
placement="top">
公海成员<el-tooltip content="客户公海规则对客户公海成员生效(超级管理员除外),客户公海成员可查看以及领取公海客户" effect="dark" placement="top">
<i class="wk wk-help wk-help-tips" />
</el-tooltip>
</div>
</div>
<xh-struc-user-cell
:value="baseFrom.memberUsers"
@value-change="strcUserChange" />
<xh-struc-user-cell :value="baseFrom.memberUsers" @value-change="strcUserChange" />
</el-form-item>
</el-form>
</flexbox>
</create-sections>
<create-sections
v-if="recycleRuleData"
title="规则设置">
<flexbox
class="row"
align="stretch">
<div class="row-label">客户类型列表</div>
<create-sections v-if="recycleRuleData" title="规则设置">
<flexbox class="row" align="stretch">
<div class="row-label">客户类型</div>
<div class="row-content">
<el-select
v-model="baseFrom.customerTypes">
<el-option
v-for="itemOption in customerTypes"
:key="itemOption.value"
:label="itemOption.name"
:value="itemOption.value"/>
v-model="baseFrom.customer_type" multiple filterable allow-create default-first-option
placeholder="请选择客户类型" class="customer_select">
<el-option v-for="item in options" :key="item.index" :label="item.index" :value="item" />
</el-select>
</div>
</flexbox>
<flexbox
class="row"
align="stretch">
<flexbox class="row" align="stretch">
<div class="row-label">前负责人领取规则</div>
<div class="row-content">
<el-radio-group v-model="baseFrom.before_owner_conf">
@ -116,9 +67,7 @@
</div>
</flexbox>
<flexbox
class="row"
align="stretch">
<flexbox class="row" align="stretch">
<div class="row-label">领取频率规则</div>
<div class="row-content">
<el-radio-group v-model="baseFrom.receive_conf">
@ -133,9 +82,7 @@
</div>
</flexbox>
<flexbox
class="row"
align="stretch">
<flexbox class="row" align="stretch">
<div class="row-label">提醒规则</div>
<div class="row-content">
<el-radio-group v-model="baseFrom.remind_conf">
@ -150,9 +97,7 @@
</div>
</flexbox>
<flexbox
class="row"
align="stretch">
<flexbox class="row" align="stretch">
<div class="row-label">收回规则</div>
<div class="row-content">
<el-radio-group v-model="baseFrom.recycle_conf">
@ -164,32 +109,21 @@
<template v-if="baseFrom.recycle_conf == 1">
<recycle-rule
v-for="(item, index) in recycleRuleData"
:key="index"
:data="item"
:level-customer="levelCustomerName"
:true-label="index + 1"
:is-edit="isEdit"
/>
v-for="(item, index) in recycleRuleData" :key="index" :data="item"
:level-customer="levelCustomerName" :true-label="index + 1" :is-edit="isEdit" />
</template>
<flexbox
class="row"
align="stretch">
<flexbox class="row" align="stretch">
<div class="row-label">公海字段设置</div>
<div class="row-content">
<div class="field-set">
<div class="field-set__name">
选择公海字段
</div>
<flexbox
wrap="wrap">
<flexbox wrap="wrap">
<el-checkbox
v-for="(item, index) in customerPoolFields"
:key="index"
v-model="item.is_hidden"
:true-label="0"
:false-label="1">{{ item.name }}</el-checkbox>
v-for="(item, index) in customerPoolFields" :key="index"
v-model="item.is_hidden" :true-label="0" :false-label="1">{{ item.name }}</el-checkbox>
</flexbox>
</div>
</div>
@ -198,13 +132,8 @@
</div>
<div class="handle-bar">
<el-button
class="handle-button"
@click.native="hidenView">取消</el-button>
<el-button
v-debounce="saveClick"
class="handle-button"
type="primary">保存</el-button>
<el-button class="handle-button" @click.native="hidenView">取消</el-button>
<el-button v-debounce="saveClick" class="handle-button" type="primary"></el-button>
</div>
</flexbox>
</create-view>
@ -264,6 +193,7 @@ export default {
}
return {
options: [],
loading: false,
baseFrom: null,
baseRules: {
@ -280,7 +210,6 @@ export default {
recycleRuleData: null,
levelCustomerName: [], //
customerPoolFields: [],
customerTypes: [], //
requestFields: {
before_owner_day: '前负责人限制领取天数需大于0',
receive_count: '领取频率限制个数需大于0',
@ -322,7 +251,7 @@ export default {
},
getCustomerTypes() {
crmCustomerType().then(res => {
this.customerTypes = res.data || []
this.options = res.data || []
}).catch(() => { })
},
/**
@ -353,7 +282,6 @@ export default {
users: data.user_info,
strucs: data.department_info
},
customerTypes: data.crm_customer_type,//
before_owner_conf: data.before_owner_conf, // 0 1
before_owner_day: data.before_owner_day,
receive_conf: data.receive_conf, // 0 1
@ -416,7 +344,6 @@ export default {
users: [],
strucs: []
},
customerTypes: [],
before_owner_conf: 0, // 0 1
before_owner_day: '',
receive_conf: 0, // 0 1
@ -573,7 +500,6 @@ export default {
*/
getRequestParams() {
const params = {}
for (const key in this.baseFrom) {
if (!this.requestFieldsVerify(key)) {
this.$message.error(this.requestFields[key])
@ -594,6 +520,11 @@ export default {
params.department_ids = adminStrucs.map(item => {
return item.id
}).join(',')
} else if (key == 'customer_type') {
params.customer_type = this.baseFrom.customer_type.map(item => {
return item
}).join(',')
console.log(params.customer_type)
} else {
params[key] = this.baseFrom[key]
}
@ -688,6 +619,7 @@ export default {
margin-bottom: 20px;
padding: 0 10px;
flex-shrink: 0;
.close {
display: block;
font-size: 24px;
@ -696,6 +628,7 @@ export default {
padding: 10px;
cursor: pointer;
}
.close:hover {
color: $xr-color-primary;
}
@ -734,9 +667,11 @@ export default {
flex-shrink: 0;
// overflow: hidden;
padding-bottom: 10px;
&__left {
padding-right: 25px;
}
&__right {
padding-left: 25px;
}
@ -747,6 +682,7 @@ export default {
font-size: 12px;
word-wrap: break-word;
word-break: break-all;
.wk-help {
margin-left: 5px;
}
@ -757,6 +693,7 @@ export default {
padding: 8px 15px 0;
font-size: 13px;
color: #333;
&-label {
width: 120px;
margin-top: 10px;
@ -766,12 +703,14 @@ export default {
&-content {
flex: 1;
margin-left: 20px;
.el-radio-group {
margin: 8px 0;
}
.xr-input {
margin-bottom: 8px;
.el-input {
width: 80px;
margin: 0 8px;
@ -803,9 +742,12 @@ export default {
margin-bottom: 8px;
}
}
.customer_select{
width: 50%;
}
.handle-bar {
position: relative;
.handle-button {
float: right;
margin-top: 5px;

@ -142,7 +142,6 @@ export default {
}
},
mounted() {
console.log('aaaaaa' + this.items[0].num)
this.buttonCollapse = this.collapse
},
methods: {

Loading…
Cancel
Save