管理员维护客户
This commit is contained in:
16
src/App.vue
16
src/App.vue
@@ -30,14 +30,14 @@ export default {
|
||||
// This is the visitor identifier:
|
||||
const visitorId = result.visitorId
|
||||
console.log(visitorId)
|
||||
this.$api.post(this.$api.phpURL + 'api/Verify/index', {code: visitorId}).then(res => {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (res.msg == 'false') {
|
||||
// eslint-disable-next-line camelcase
|
||||
alert('访问错误!错误码:' + visitorId)
|
||||
window.location.href = 'http://www.juip.com'
|
||||
}
|
||||
})
|
||||
// this.$api.post(this.$api.phpURL + 'api/Verify/index', {code: visitorId}).then(res => {
|
||||
// // eslint-disable-next-line eqeqeq
|
||||
// if (res.msg == 'false') {
|
||||
// // eslint-disable-next-line camelcase
|
||||
// alert('访问错误!错误码:' + visitorId)
|
||||
// window.location.href = 'http://www.juip.com'
|
||||
// }
|
||||
// })
|
||||
})()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<el-table-column prop="Name" label="姓名"></el-table-column>
|
||||
<el-table-column prop="id_code" label="身份证号"></el-table-column>
|
||||
<el-table-column prop="is_verify" label="实名状态"></el-table-column>
|
||||
<el-table-column label="一毛钱天卡" >
|
||||
<!-- <el-table-column label="一毛钱天卡" >
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip content="请先查看是否已经使用" placement="top">
|
||||
<el-switch
|
||||
@@ -55,7 +55,7 @@
|
||||
</el-switch>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作" width="400px">
|
||||
<template slot-scope="scope">
|
||||
<span class="handel cursor edit" @click="showUpdateTest(scope.row)">设置测试</span>
|
||||
|
||||
60
src/components/user/register.vue
Normal file
60
src/components/user/register.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-table :data="retData.Data" size="medium" :height="$getHeight(100)" row-key="Id" border>
|
||||
<el-table-column prop="CreateTime" label="注册时间"></el-table-column>
|
||||
<el-table-column prop="LoginCode" label="会员号"></el-table-column>
|
||||
<el-table-column prop="RestAmount" label="测试限额/领用数">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.TestCountLimit==0?'3':scope.row.TestCountLimit}}/{{scope.row.UseTestCount==0?'--':scope.row.UseTestCount}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Name" label="姓名"></el-table-column>
|
||||
<el-table-column prop="id_code" label="身份证号"></el-table-column>
|
||||
<el-table-column prop="is_verify" label="实名状态"></el-table-column>
|
||||
<el-table-column label="操作" width="400px">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.ManagerId == 0" class="handel cursor edit" @click="getUser(scope.row)">领取用户</span>
|
||||
<span v-if="scope.row.ManagerId != 0">已领取</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="text-align:center;">
|
||||
<p>共 {{retData.TotalCount}} 条</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "userregister",
|
||||
data() {
|
||||
return {
|
||||
isRoot:false,
|
||||
loading: false,
|
||||
retData: { TotalCount: 0, Data: [] },
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this.$store.commit('setCurrentNav', '用户管理>>领取用户')
|
||||
var currentUser = this.$local.getUserByCache()
|
||||
this.IsRoot = currentUser.Manager.IsRootUser
|
||||
this.get()
|
||||
|
||||
},
|
||||
methods: {
|
||||
get() {
|
||||
this.$api.get(this.$api.phpURL + "user/user/getRegisterList").then(res => {
|
||||
this.retData = res;
|
||||
});
|
||||
},
|
||||
getUser(r) {
|
||||
this.$api
|
||||
.post(this.$api.phpURL + "user/user/getNewUser", r.Id)
|
||||
.then(res => {
|
||||
this.get();
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -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}} <span style="color:red">||</span>
|
||||
{{sell_detail.cost_not_mogu}}<br>
|
||||
{{sell_detail.sell_percent}} <span style="color:red">||</span>
|
||||
{{sell_detail.cost_percent}} <span style="color:red">||</span>
|
||||
{{sell_detail.cost_register}} <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,33 +279,59 @@ 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 () {
|
||||
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
|
||||
sort ({column, prop, order }) {
|
||||
@@ -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 '跟进超时-消费减少'
|
||||
|
||||
@@ -6,7 +6,7 @@ const devUrlNew = 'http://localhost:5000/api/'
|
||||
const testUrlNew = 'http://localhost:5000/api/'
|
||||
const prodUrlNew = 'http://www.juip.com/api/'// "http://api.yk.hncore.net/api/"/"http://hapi.hncore.net/api"
|
||||
|
||||
const devPhpUrlNew = 'http://autophp.wyk/'
|
||||
const devPhpUrlNew = 'http://juip.wyk/'
|
||||
const prodPhpUrlNew = 'http://php-api.juip.com/'
|
||||
|
||||
var baseURL = devUrlNew
|
||||
|
||||
@@ -41,6 +41,12 @@ let router = new Router({
|
||||
name: 'users',
|
||||
component: resolve => require(['@/components/user/index'], resolve)
|
||||
},
|
||||
// 新注册用户领取
|
||||
{
|
||||
path: 'user/register',
|
||||
name: 'userregister',
|
||||
component: resolve => require(['@/components/user/register'], resolve)
|
||||
},
|
||||
// 用户改价
|
||||
{
|
||||
path: 'user/search',
|
||||
|
||||
Reference in New Issue
Block a user