管理员维护客户

This commit is contained in:
“wanyongkang”
2023-08-11 15:12:33 +08:00
parent ea892f49c7
commit f9579aa89f
6 changed files with 149 additions and 36 deletions

View File

@@ -1,6 +1,17 @@
<template>
<div v-loading="loading">
<el-card class="box-card">
<el-select v-model="manager" @change="select_manager" size="small" style="margin-right:5px;width:110px;float:left;" v-if="$local.isRoot()" placeholder="管理员">
<el-option
v-for="item in manegers"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-date-picker
v-model="sell_detail_month"
size="small"
@@ -14,6 +25,8 @@
<el-button type="primary" size="small" plain>跟进记录</el-button>
</router-link>
<p>
{{sell_detail.cost_mogu}}&nbsp;&nbsp;<span style="color:red">||</span>
{{sell_detail.cost_not_mogu}}<br>
{{sell_detail.sell_percent}}&nbsp;&nbsp;<span style="color:red">||</span>
{{sell_detail.cost_percent}}&nbsp;&nbsp;<span style="color:red">||</span>
{{sell_detail.cost_register}}&nbsp;&nbsp;<span style="color:red">||</span>
@@ -35,8 +48,7 @@
size="small"
style="margin-right:5px;"
start-placeholder="A阶段开始时间"
end-placeholder="A阶段结束时间"
:default-time="['00:00:00', '00:00:00']">
end-placeholder="A阶段结束时间">
</el-date-picker>
<el-date-picker
v-model="new_month"
@@ -45,8 +57,7 @@
size="small"
style="margin-right:5px;"
start-placeholder="B阶段开始时间"
end-placeholder="B阶段开始时间"
:default-time="['00:00:00', '00:00:00']">
end-placeholder="B阶段开始时间">
</el-date-picker>
<!-- <el-date-picker
v-model="searchModel.month"
@@ -94,7 +105,8 @@
<el-table :data="retData.Data" :height="$getHeight(200)"
@sort-change="sort"
row-key="Id" border>
<el-table-column prop="follow_status" label="状态">
<el-table-column v-if="$local.isRoot()" prop="ManagerName" label="客户经理"></el-table-column>
<el-table-column prop="follow_status" label="跟进状态">
<template slot-scope="scope">
<el-link @click="click_follow_status(scope.row)">{{scope.row.follow_status}}</el-link>
</template>
@@ -104,8 +116,8 @@
<el-link @click="click_username(scope.row)">{{scope.row.UserName}}</el-link>
</template>
</el-table-column>
<el-table-column prop="is_verify" label="是否实名"></el-table-column>
<el-table-column prop="CreateTime" label="注册时间"></el-table-column>
<el-table-column prop="last_pay_time" label="最后消费时间"></el-table-column>
<el-table-column label="总消费" sortable="all_amount">
<template slot-scope="scope">
<el-link @click="click_all_amount(scope.row,1)">{{scope.row.all_amount}}</el-link>
@@ -162,12 +174,11 @@
:value="item.value">
</el-option>
</el-select>
<el-input style="margin:5px 0" v-model="set_follow_status.remark" size="small" placeholder="请输入备注"></el-input>
<el-input style="margin:5px 0" v-model="set_follow_status.remark" size="small" placeholder="请输入跟进记录"></el-input>
<el-table :data="follow_status_list" border>
<el-table-column prop="create_time" label="时间"></el-table-column>
<el-table-column v-if="$local.isRoot()" prop="op_user" label="维护经理"></el-table-column>
<el-table-column prop="record" width="230" label="跟进记录"></el-table-column>
<el-table-column prop="remark" label="备注"></el-table-column>
<el-table-column prop="remark" label="跟进记录"></el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="follow_status_change_fall = false"> </el-button>
@@ -220,11 +231,10 @@
</div>
</template>
<script>
import * as dateUtil from '@/extend/js/dateFormatUtil'
export default {
name: 'userIndex',
components: {
phoneHide: () => import('@/components/common/phonehide')
},
data () {
return {
@@ -250,7 +260,8 @@ export default {
},
cost_type: '0',
money1: null,
money2: null
money2: null,
manager_id:0
},
types: [],
user_info: {},
@@ -268,32 +279,58 @@ export default {
cost_list: [],
account_list: [],
account_fall: false,
last_month: null,
new_month: null,
last_month: [new Date(new Date().getFullYear(),new Date().getMonth()-1),new Date(new Date().getFullYear(),new Date().getMonth()-1,new Date().getDate(),new Date().getHours(),new Date().getMinutes(),new Date().getSeconds())],
new_month: [new Date(new Date().getFullYear(),new Date().getMonth()),new Date()],
cost_types: [{
value: '0',
label: '总消费'
label: '总消费金额筛选'
}, {
value: '1',
label: '上月消费'
label: 'A阶段消费筛选'
}, {
value: '2',
label: '本月消费'
label: 'B阶段消费筛选'
}],
sell_detail: {},
sell_detail_month: null,
temps: null
temps: null,
manegers: [{
value: '选项1',
label: '黄金糕'
}],
manager: 0,
isroot:false
}
},
created () {
this.$store.commit('setCurrentNav', '用户管理>>消费统计')
this.get()
this.sell_detail_info()
var currentUser = this.$local.getUserByCache()
this.isroot = currentUser.Manager.IsRootUser
if (this.isroot) {
this.manager_list()
}
},
methods: {
sell_detail_info () {
this.$api.get(this.$api.phpURL + 'manager/SellInfo/getOne', {sell_month: this.sell_detail_month}).then(res => {
this.sell_detail = res.data
if (this.isroot) {
this.$api.get(this.$api.phpURL + 'manager/SellInfo/getOne', {sell_month: this.sell_detail_month,manager_id: this.manager}).then(res => {
this.sell_detail = res.data
})
} else {
this.$api.get(this.$api.phpURL + 'manager/SellInfo/getOne', {sell_month: this.sell_detail_month}).then(res => {
this.sell_detail = res.data
})
}
},
manager_list () {
this.$api.get(this.$api.phpURL + 'manager/SellInfo/getManagerList',).then(res => {
this.manegers = res.data
})
},
// eslint-disable-next-line standard/object-curly-even-spacing
@@ -315,18 +352,24 @@ export default {
}
this.searchModel.PageIndex = 1
this.searchModel.sortLable = null
if (this.searchModel.money1 || this.searchModel.money2) {
if (!(this.searchModel.money1 && this.searchModel.money2)) {
if (this.searchModel.money1) {
if (!(this.searchModel.money1)) {
this.$message({
message: '请正确填写消费范围',
type: 'warning'
})
return
}
if (!(this.searchModel.money2)) {
this.searchModel.money2 = 999999999;
}
}
this.get()
},
get () {
if (this.isroot) {
this.searchModel.manager_id = this.manager;
}
this.loading = true
this.$api.get(this.$api.phpURL + 'manager/UserFollow/getList', {PageIndex: this.searchModel.PageIndex, search: this.searchModel}).then(res => {
this.retData.Data = res.data.list
@@ -385,16 +428,20 @@ export default {
this.account_loading = false
})
},
select_manager() {
this.get();
this.sell_detail_info();
},
setStatus (status) {
switch (status) {
case 1:
return '待跟进-未购买'
return '待跟进'
case 2:
return '跟进超时-未购买'
return '跟进'
case 3:
return '跟进-消费减少'
return '跟进完成'
case 4:
return '跟进超时-消费减少'