Commit dc36257ff892391a6ad32f151340ec0760e78496

Authored by wwk
1 parent 2d21111e

后端页面

src/api/Partner.js
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 import utils from '../utils/utils.js' 2 import utils from '../utils/utils.js'
3 3
4 - 4 +//修改合伙人状态
  5 +export function UpdatePartner(data){
  6 + return request({
  7 + url:'/Partner/UpdatePartner',
  8 + method:'post',
  9 + data
  10 + })
  11 +}
5 //根据ID查询合伙人信息 12 //根据ID查询合伙人信息
6 export function GetPartnerById(data) { 13 export function GetPartnerById(data) {
7 return request({ 14 return request({
src/api/ReservationSettings.js
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 2
  3 +//移除时间段的时间
  4 +export function RemoveDateSection(data){
  5 + return request({
  6 + url:'/ReservationSettings/RemoveDateSection',
  7 + method:'post',
  8 + data
  9 + })
  10 +}
3 // 设置可预约信息 11 // 设置可预约信息
4 export function SettingReservation(params) { 12 export function SettingReservation(params) {
5 return request({ 13 return request({
src/api/RobotReservation.js
@@ -45,4 +45,12 @@ export function CreateRobot(data){ @@ -45,4 +45,12 @@ export function CreateRobot(data){
45 method:'post', 45 method:'post',
46 data 46 data
47 }) 47 })
  48 +}
  49 +//修改滚屏预约状态
  50 +export function UpdReservationStatus(data){
  51 + return request({
  52 + url:'/RobotReservation/UpdReservationStatus',
  53 + method:'post',
  54 + data
  55 + })
48 } 56 }
49 \ No newline at end of file 57 \ No newline at end of file
src/api/incomeDetails.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +import utils from '../utils/utils.js'
  3 +// 查询所有分成数据
  4 +export function GetListIncomeDetails(data){
  5 + return request({
  6 + url:'/IncomeDetails/GetListIncomeDetails',
  7 + method:'post',
  8 + data
  9 + })
  10 +}
  11 +
src/api/user.js
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 import utils from '../utils/utils.js' 2 import utils from '../utils/utils.js'
3 3
  4 +//根据userid修改VIP特权次数
  5 +export function UpdVipNum(data){
  6 + return request({
  7 + url:`/Users/UpdVipNum?${utils.ObjectToQureyParams(data)}`,
  8 + method:'post',
  9 + data
  10 + })
  11 +}
  12 +//查询用户数据包含车辆信息
  13 +export function GetUserByCar(data){
  14 + return request({
  15 + url:'/Users/GetUserByCar',
  16 + method:'post',
  17 + data
  18 + })
  19 +}
4 20
  21 +//根据用户ID查询下级数据
  22 +export function GetUserListByInviteeUserId(data){
  23 + return request({
  24 + url:'/Users/GetUserList',
  25 + method:'post',
  26 + data
  27 + })
  28 +}
5 29
6 30
7 //修改密码 31 //修改密码
@@ -38,9 +62,18 @@ export function DelAdmin(data){ @@ -38,9 +62,18 @@ export function DelAdmin(data){
38 } 62 }
39 63
40 64
41 -// 最新修改固定单量 经理专员 65 +// 预约结算修改单量
42 export function UpdateNum(data){ 66 export function UpdateNum(data){
43 return request({ 67 return request({
  68 + url:'/Users/UpdateNum',
  69 + method:'post',
  70 + data
  71 + })
  72 +}
  73 +
  74 +// 设置经理专员单量
  75 +export function UpdateNumS(data){
  76 + return request({
44 url:'/Num/UpdateNum', 77 url:'/Num/UpdateNum',
45 method:'post', 78 method:'post',
46 data 79 data
src/components/Breadcrumb/index.vue
@@ -33,7 +33,7 @@ export default { @@ -33,7 +33,7 @@ export default {
33 const first = matched[0] 33 const first = matched[0]
34 34
35 if (!this.isDashboard(first)) { 35 if (!this.isDashboard(first)) {
36 - matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched) 36 + matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched)
37 } 37 }
38 38
39 this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) 39 this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
@@ -43,7 +43,7 @@ export default { @@ -43,7 +43,7 @@ export default {
43 if (!name) { 43 if (!name) {
44 return false 44 return false
45 } 45 }
46 - return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase() 46 + return name.trim().toLocaleLowerCase() === '首页'.toLocaleLowerCase()
47 }, 47 },
48 pathCompile(path) { 48 pathCompile(path) {
49 // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561 49 // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
src/icons/logo.jpg 0 → 100644

15.5 KB

src/layout/components/Navbar.vue
@@ -7,23 +7,23 @@ @@ -7,23 +7,23 @@
7 <div class="right-menu"> 7 <div class="right-menu">
8 <el-dropdown class="avatar-container" trigger="click"> 8 <el-dropdown class="avatar-container" trigger="click">
9 <div class="avatar-wrapper"> 9 <div class="avatar-wrapper">
10 - <img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar"> 10 + <img src="../../icons/logo.jpg" class="user-avatar">
11 <i class="el-icon-caret-bottom" /> 11 <i class="el-icon-caret-bottom" />
12 </div> 12 </div>
13 - <el-dropdown-menu slot="dropdown" class="user-dropdown">  
14 - <router-link to="/"> 13 + <el-dropdown-menu slot="dropdown" class="user-dropdown" >
  14 + <router-link to="/" v-if="false">
15 <el-dropdown-item> 15 <el-dropdown-item>
16 Home 16 Home
17 </el-dropdown-item> 17 </el-dropdown-item>
18 </router-link> 18 </router-link>
19 - <a target="_blank" href="https://github.com/PanJiaChen/vue-admin-template/"> 19 + <a target="_blank" href="https://github.com/PanJiaChen/vue-admin-template/" v-if="false">
20 <el-dropdown-item>Github</el-dropdown-item> 20 <el-dropdown-item>Github</el-dropdown-item>
21 </a> 21 </a>
22 - <a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/"> 22 + <a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/" v-if="false">
23 <el-dropdown-item>Docs</el-dropdown-item> 23 <el-dropdown-item>Docs</el-dropdown-item>
24 </a> 24 </a>
25 <el-dropdown-item divided @click.native="logout"> 25 <el-dropdown-item divided @click.native="logout">
26 - <span style="display:block;">Log Out</span> 26 + <span style="display:block;">退出</span>
27 </el-dropdown-item> 27 </el-dropdown-item>
28 </el-dropdown-menu> 28 </el-dropdown-menu>
29 </el-dropdown> 29 </el-dropdown>
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 import { mapGetters } from 'vuex' 35 import { mapGetters } from 'vuex'
36 import Breadcrumb from '@/components/Breadcrumb' 36 import Breadcrumb from '@/components/Breadcrumb'
37 import Hamburger from '@/components/Hamburger' 37 import Hamburger from '@/components/Hamburger'
38 - 38 +import {removeToken,removeUser} from '../../utils/auth.js'
39 export default { 39 export default {
40 components: { 40 components: {
41 Breadcrumb, 41 Breadcrumb,
@@ -52,7 +52,9 @@ export default { @@ -52,7 +52,9 @@ export default {
52 this.$store.dispatch('app/toggleSideBar') 52 this.$store.dispatch('app/toggleSideBar')
53 }, 53 },
54 async logout() { 54 async logout() {
55 - await this.$store.dispatch('user/logout') 55 + // await this.$store.dispatch('user/logout')
  56 + removeToken()
  57 + removeUser()
56 this.$router.push(`/login?redirect=${this.$route.fullPath}`) 58 this.$router.push(`/login?redirect=${this.$route.fullPath}`)
57 } 59 }
58 } 60 }
src/layout/components/Sidebar/Logo.vue
@@ -25,7 +25,7 @@ export default { @@ -25,7 +25,7 @@ export default {
25 data() { 25 data() {
26 return { 26 return {
27 title: 'Vue Admin Template', 27 title: 'Vue Admin Template',
28 - logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png' 28 + logo: '../../../icons/logo.png'
29 } 29 }
30 } 30 }
31 } 31 }
src/router/index.js
@@ -99,24 +99,24 @@ export const constantRoutes = [{ @@ -99,24 +99,24 @@ export const constantRoutes = [{
99 icon: 'table' 99 icon: 'table'
100 } 100 }
101 }, 101 },
102 - {  
103 - path: 'manager',  
104 - name: 'manager',  
105 - component: () => import('@/views/user/manager'),  
106 - meta: {  
107 - title: '客户经理下级',  
108 - icon: 'table'  
109 - }  
110 - },  
111 - {  
112 - path: 'commissioner',  
113 - name: 'manager',  
114 - component: () => import('@/views/user/commissioner'),  
115 - meta: {  
116 - title: '推广专员下级',  
117 - icon: 'table'  
118 - }  
119 - } 102 + // {
  103 + // path: 'manager',
  104 + // name: 'manager',
  105 + // component: () => import('@/views/user/manager'),
  106 + // meta: {
  107 + // title: '客户经理下级',
  108 + // icon: 'table'
  109 + // }
  110 + // },
  111 + // {
  112 + // path: 'commissioner',
  113 + // name: 'manager',
  114 + // component: () => import('@/views/user/commissioner'),
  115 + // meta: {
  116 + // title: '推广专员下级',
  117 + // icon: 'table'
  118 + // }
  119 + // }
120 ] 120 ]
121 }, 121 },
122 // appointment 122 // appointment
@@ -135,20 +135,20 @@ export const constantRoutes = [{ @@ -135,20 +135,20 @@ export const constantRoutes = [{
135 }] 135 }]
136 }, 136 },
137 137
138 - {  
139 - path: '/appointByUserId',  
140 - component: Layout,  
141 - redirect: '/appointByUserId',  
142 - children: [{  
143 - path: 'appointByUserId',  
144 - name: '查询预约',  
145 - component: () => import('@/views/appointByUserId/appointByUserId'),  
146 - meta: {  
147 - title: '查询预约',  
148 - icon: 'el-icon-s-help',  
149 - }  
150 - }]  
151 - }, 138 + // {
  139 + // path: '/appointByUserId',
  140 + // component: Layout,
  141 + // redirect: '/appointByUserId',
  142 + // children: [{
  143 + // path: 'appointByUserId',
  144 + // name: '查询预约',
  145 + // component: () => import('@/views/appointByUserId/appointByUserId'),
  146 + // meta: {
  147 + // title: '查询预约',
  148 + // icon: 'el-icon-s-help',
  149 + // }
  150 + // }]
  151 + // },
152 { 152 {
153 path: '/AdminManage', 153 path: '/AdminManage',
154 component: Layout, 154 component: Layout,
@@ -197,6 +197,21 @@ export const constantRoutes = [{ @@ -197,6 +197,21 @@ export const constantRoutes = [{
197 } 197 }
198 }] 198 }]
199 }, 199 },
  200 + // 分成管理
  201 + {
  202 + path: '/proportion',
  203 + component: Layout,
  204 + redirect: 'proportion',
  205 + children: [{
  206 + path: 'proportion',
  207 + name: '分成管理',
  208 + component: () => import('@/views/proportion/proportion'),
  209 + meta: {
  210 + title: '分成管理',
  211 + icon: 'el-icon-s-help'
  212 + }
  213 + }]
  214 + },
200 // 外部数据 215 // 外部数据
201 // { 216 // {
202 // path: '/externalInfo', 217 // path: '/externalInfo',
@@ -212,20 +227,20 @@ export const constantRoutes = [{ @@ -212,20 +227,20 @@ export const constantRoutes = [{
212 // } 227 // }
213 // }] 228 // }]
214 // }, 229 // },
215 - {  
216 - path: '/comment',  
217 - component: Layout,  
218 - redirect: '/comment',  
219 - children: [{  
220 - path: 'comment',  
221 - name: '评价管理',  
222 - component: () => import('@/views/comment/comment'),  
223 - meta: {  
224 - title: '评价管理',  
225 - icon: 'el-icon-s-help'  
226 - }  
227 - }]  
228 - }, 230 + // {
  231 + // path: '/comment',
  232 + // component: Layout,
  233 + // redirect: '/comment',
  234 + // children: [{
  235 + // path: 'comment',
  236 + // name: '评价管理',
  237 + // component: () => import('@/views/comment/comment'),
  238 + // meta: {
  239 + // title: '评价管理',
  240 + // icon: 'el-icon-s-help'
  241 + // }
  242 + // }]
  243 + // },
229 244
230 // record 245 // record
231 { 246 {
@@ -352,15 +367,15 @@ export const constantRoutes = [{ @@ -352,15 +367,15 @@ export const constantRoutes = [{
352 // } 367 // }
353 // }, 368 // },
354 // rulesstr 369 // rulesstr
355 - {  
356 - path: 'rulesstr',  
357 - name: 'rulesstr',  
358 - component: () => import('@/views/system/rulesstr'),  
359 - meta: {  
360 - title: '补贴规则设置',  
361 - icon: 'table'  
362 - }  
363 - }, 370 + // {
  371 + // path: 'rulesstr',
  372 + // name: 'rulesstr',
  373 + // component: () => import('@/views/system/rulesstr'),
  374 + // meta: {
  375 + // title: '补贴规则设置',
  376 + // icon: 'table'
  377 + // }
  378 + // },
364 { 379 {
365 path: 'missionNum', 380 path: 'missionNum',
366 name: 'missionNum', 381 name: 'missionNum',
src/views/AdminManage/AdminManage.vue
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 </template> 33 </template>
34 </el-table-column> 34 </el-table-column>
35 </el-table> 35 </el-table>
36 - <el-pagination background layout="prev, pager, next" :total="model.TotalCount" @current-page="Pages" 36 + <el-pagination background layout="prev, pager, next" :total="model.TotalCount" @current-change="Pages"
37 style="text-align: right;margin-top: 10px;"> 37 style="text-align: right;margin-top: 10px;">
38 </el-pagination> 38 </el-pagination>
39 </div> 39 </div>
src/views/appointment/appointment.vue
@@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
2 <div class="container" style="margin:10px;"> 2 <div class="container" style="margin:10px;">
3 3
4 <el-form :inline="true" :model="model" class="demo-form-inline"> 4 <el-form :inline="true" :model="model" class="demo-form-inline">
5 - <el-form-item label="关键字">  
6 - <el-input v-model="model.KeyWord" placeholder="关键字"></el-input> 5 + <el-form-item label="用户ID">
  6 + <el-input v-model="model.UserId" placeholder="用户ID"></el-input>
7 </el-form-item> 7 </el-form-item>
8 <el-form-item label="开始时间"> 8 <el-form-item label="开始时间">
9 <el-date-picker v-model="model.startdate" type="date" placeholder="选择日期"> 9 <el-date-picker v-model="model.startdate" type="date" placeholder="选择日期">
@@ -55,6 +55,16 @@ @@ -55,6 +55,16 @@
55 {{scope.row.UserPhone}} 55 {{scope.row.UserPhone}}
56 </template> 56 </template>
57 </el-table-column> 57 </el-table-column>
  58 + <el-table-column prop="date" label="备用手机号" width="120">
  59 + <template slot-scope="scope">
  60 + {{scope.row.BeiYongPhone}}
  61 + </template>
  62 + </el-table-column>
  63 + <el-table-column prop="date" label="贵姓" width="120">
  64 + <template slot-scope="scope">
  65 + {{scope.row.Full_Name}}
  66 + </template>
  67 + </el-table-column>
58 <el-table-column prop="date" label="状态" width="100"> 68 <el-table-column prop="date" label="状态" width="100">
59 <template slot-scope="scope"> 69 <template slot-scope="scope">
60 <el-tag type="success"> 70 <el-tag type="success">
@@ -122,9 +132,9 @@ @@ -122,9 +132,9 @@
122 <el-button type="primary" @click="EidtRecord(scope.row)">编辑</el-button> 132 <el-button type="primary" @click="EidtRecord(scope.row)">编辑</el-button>
123 </template> 133 </template>
124 </el-table-column> 134 </el-table-column>
125 - <el-table-column prop="date" label="操作" width="220" fixed="right"> 135 + <el-table-column prop="date" label="操作" width="220" fixed="right">
126 <template slot-scope="scope"> 136 <template slot-scope="scope">
127 - <el-button type="danger" @click="DelInfo(scope.row.id)">删除</el-button> 137 + <el-button type="danger" @click="DelInfo(scope.row.id)" v-if="false">删除</el-button>
128 <el-button type="success" @click="Results(scope.row)" :disabled="scope.row.State==0?false:true"> 138 <el-button type="success" @click="Results(scope.row)" :disabled="scope.row.State==0?false:true">
129 预约结算</el-button> 139 预约结算</el-button>
130 </template> 140 </template>
@@ -134,7 +144,7 @@ @@ -134,7 +144,7 @@
134 <el-button type="primary" @click="UpdateState(scope.row.id)">修改状态</el-button> 144 <el-button type="primary" @click="UpdateState(scope.row.id)">修改状态</el-button>
135 </template> 145 </template>
136 </el-table-column> --> 146 </el-table-column> -->
137 - <el-table-column prop="date" label="预约结算" width="180" fixed="right" v-if="false"> 147 + <el-table-column prop="date" label="预约结算" width="180" fixed="right" v-if="false">
138 <template slot-scope="scope"> 148 <template slot-scope="scope">
139 <el-button type="success" @click="Results(scope.row)" :disabled="scope.row.State==0?false:true"> 149 <el-button type="success" @click="Results(scope.row)" :disabled="scope.row.State==0?false:true">
140 预约结算</el-button> 150 预约结算</el-button>
@@ -218,7 +228,11 @@ @@ -218,7 +228,11 @@
218 import { 228 import {
219 UpdnowNum, 229 UpdnowNum,
220 SendPaymentAppointment, 230 SendPaymentAppointment,
  231 + UpdVipNum
221 } from '../../api/user.js' 232 } from '../../api/user.js'
  233 + import {
  234 + UpdReservationStatus
  235 + } from '../../api/RobotReservation.js'
222 import utils from '../../utils/utils.js' 236 import utils from '../../utils/utils.js'
223 import { 237 import {
224 ReservationAreaList 238 ReservationAreaList
@@ -226,7 +240,6 @@ @@ -226,7 +240,6 @@
226 export default { 240 export default {
227 data() { 241 data() {
228 return { 242 return {
229 -  
230 form: { 243 form: {
231 "id": 0, 244 "id": 0,
232 "ReservationId": 0, 245 "ReservationId": 0,
@@ -252,13 +265,14 @@ @@ -252,13 +265,14 @@
252 ids: 0 265 ids: 0
253 }, 266 },
254 model: { 267 model: {
  268 + "UserId": 0,
255 "State": '-1', 269 "State": '-1',
256 "startdate": "", 270 "startdate": "",
257 "enddate": "", 271 "enddate": "",
258 "KeyWord": "", 272 "KeyWord": "",
259 "TotalCount": 0, 273 "TotalCount": 0,
260 "PageIndex": 1, 274 "PageIndex": 1,
261 - "PageSize": 10, 275 + "PageSize": 20,
262 "Sort": [{ 276 "Sort": [{
263 "Field": "MakeTime", 277 "Field": "MakeTime",
264 "Type": 1 278 "Type": 1
@@ -272,6 +286,18 @@ @@ -272,6 +286,18 @@
272 paramModel: { 286 paramModel: {
273 "param": "", 287 "param": "",
274 "mobile": "" 288 "mobile": ""
  289 + },
  290 + // 修改滚屏预约状态
  291 + UpdRobot: {
  292 + "userName": "",
  293 + "ReservationStatus": ""
  294 + },
  295 + // 导出Excel参数
  296 + ExcelModel: {
  297 + "startdate": "",
  298 + "enddate": "",
  299 + "UserId": 0,
  300 + "State": -1
275 } 301 }
276 } 302 }
277 }, 303 },
@@ -281,7 +307,11 @@ @@ -281,7 +307,11 @@
281 methods: { 307 methods: {
282 //导出 308 //导出
283 onSubmit() { 309 onSubmit() {
284 - deriveExcel(null).then(res => { 310 + this.ExcelModel.startdate=this.model.startdate
  311 + this.ExcelModel.enddate=this.model.enddate
  312 + this.ExcelModel.State=this.model.State
  313 + this.ExcelModel.UserId=this.model.UserId
  314 + deriveExcel(this.ExcelModel).then(res => {
285 console.log('导出数据', res) 315 console.log('导出数据', res)
286 if (res.data.code == 200) { 316 if (res.data.code == 200) {
287 this.$message.success('导出成功') 317 this.$message.success('导出成功')
@@ -305,9 +335,11 @@ @@ -305,9 +335,11 @@
305 document.body.removeChild(a); // 删除 a 标签 335 document.body.removeChild(a); // 删除 a 标签
306 }, 336 },
307 // 完成预约线下收款 337 // 完成预约线下收款
308 - async Results(item) { 338 + async Results(item) {
  339 + console.log('预约结算数据', item)
309 Collection(item.id).then(res => { 340 Collection(item.id).then(res => {
310 this.$message.success(res.data.message) 341 this.$message.success(res.data.message)
  342 + this.UpdRobotReservation(item)
311 // 完成单数 343 // 完成单数
312 UpdnowNum(item.UserId).then(res => { 344 UpdnowNum(item.UserId).then(res => {
313 console.log('修改后的数据单量', res) 345 console.log('修改后的数据单量', res)
@@ -317,6 +349,17 @@ @@ -317,6 +349,17 @@
317 console.log('单量完成失败') 349 console.log('单量完成失败')
318 } 350 }
319 }) 351 })
  352 + // 修改VIP
  353 + let models = {
  354 + UserId: item.UserId
  355 + }
  356 + UpdVipNum(models).then(res => {
  357 + if (res.data.code == 200) {
  358 + console.log('特权次数已用')
  359 + } else {
  360 + console.log('特权次数未用')
  361 + }
  362 + })
320 // 付款时间 363 // 付款时间
321 UpdResultTime(item.id).then(res => { 364 UpdResultTime(item.id).then(res => {
322 if (res.data.code == 200) { 365 if (res.data.code == 200) {
@@ -326,7 +369,7 @@ @@ -326,7 +369,7 @@
326 } 369 }
327 }) 370 })
328 // 发送短信 371 // 发送短信
329 - this.paramModel.mobile=item.UserPhone 372 + this.paramModel.mobile = item.UserPhone
330 SendPaymentAppointment(this.paramModel).then(res => { 373 SendPaymentAppointment(this.paramModel).then(res => {
331 console.log('付款数据啊', res) 374 console.log('付款数据啊', res)
332 if (res.data.data.code == '000000') { 375 if (res.data.data.code == '000000') {
@@ -335,11 +378,24 @@ @@ -335,11 +378,24 @@
335 console.log('发送短信失败') 378 console.log('发送短信失败')
336 } 379 }
337 }) 380 })
338 - console.log('付款参数',this.paramModel) 381 + console.log('付款参数', this.paramModel)
339 this.ShowRecord() 382 this.ShowRecord()
340 383
341 }) 384 })
342 }, 385 },
  386 + // // 添加滚动设置
  387 + UpdRobotReservation(item) {
  388 + this.UpdRobot.userName = item.UserName
  389 + this.UpdRobot.ReservationStatus = '已完成'
  390 + UpdReservationStatus(this.UpdRobot).then(res => {
  391 + console.log('数据', res)
  392 + if (res.data.code == 200) {
  393 + console.log('修改完毕')
  394 + } else {
  395 + console.log('修改失败')
  396 + }
  397 + })
  398 + },
343 EidtRecord(item) { 399 EidtRecord(item) {
344 this.dialogVisible = true 400 this.dialogVisible = true
345 console.log('item', item) 401 console.log('item', item)
@@ -374,20 +430,20 @@ @@ -374,20 +430,20 @@
374 ShowRecord() { 430 ShowRecord() {
375 GetAppointmentRecord(this.model).then(res => { 431 GetAppointmentRecord(this.model).then(res => {
376 console.log(res) 432 console.log(res)
377 - if(res.data.data.total>0){ 433 + if (res.data.data.total > 0) {
378 this.$message.success('查询成功') 434 this.$message.success('查询成功')
379 res.data.data.rows.forEach((item, index) => { 435 res.data.data.rows.forEach((item, index) => {
380 item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd") 436 item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd")
381 item.UpdateTime = utils.formatTime(item.UpdateTime, "yyyy-MM-dd") 437 item.UpdateTime = utils.formatTime(item.UpdateTime, "yyyy-MM-dd")
382 item.MakeTime = utils.formatTime(item.MakeTime, "yyyy-MM-dd") 438 item.MakeTime = utils.formatTime(item.MakeTime, "yyyy-MM-dd")
383 }) 439 })
384 - 440 +
385 this.tableData = res.data.data.rows 441 this.tableData = res.data.data.rows
386 this.model.TotalCount = res.data.data.total 442 this.model.TotalCount = res.data.data.total
387 - }else{ 443 + } else {
388 this.$message.error('暂无数据') 444 this.$message.error('暂无数据')
389 } 445 }
390 - 446 +
391 }) 447 })
392 }, 448 },
393 // 状态查询预约情况 449 // 状态查询预约情况
src/views/comment/comment.vue
@@ -381,6 +381,7 @@ @@ -381,6 +381,7 @@
381 </script> 381 </script>
382 382
383 <style> 383 <style>
  384 +
384 .avatar-uploader .el-upload { 385 .avatar-uploader .el-upload {
385 border: 1px dashed #d9d9d9; 386 border: 1px dashed #d9d9d9;
386 border-radius: 6px; 387 border-radius: 6px;
src/views/externalInfo/externalInfo.vue
@@ -89,7 +89,7 @@ @@ -89,7 +89,7 @@
89 </template> 89 </template>
90 </el-table-column> 90 </el-table-column>
91 </el-table> 91 </el-table>
92 - <el-pagination background layout="prev, pager, next" :total="model.TotalCount" @current-page="Pages" 92 + <el-pagination background layout="prev, pager, next" :total="model.TotalCount" @current-change="Pages"
93 style="text-align:right;margin-top:10px;"> 93 style="text-align:right;margin-top:10px;">
94 </el-pagination> 94 </el-pagination>
95 <!-- 折叠面板 --> 95 <!-- 折叠面板 -->
@@ -118,32 +118,32 @@ @@ -118,32 +118,32 @@
118 </el-form-item> 118 </el-form-item>
119 </el-form> 119 </el-form>
120 <el-table :data="Direct" style="width: 100%"> 120 <el-table :data="Direct" style="width: 100%">
121 - <el-table-column prop="date" label="ID" width="180"> 121 + <el-table-column prop="date" label="ID" >
122 <template slot-scope="scope"> 122 <template slot-scope="scope">
123 {{scope.row.Id}} 123 {{scope.row.Id}}
124 </template> 124 </template>
125 </el-table-column> 125 </el-table-column>
126 - <el-table-column prop="beijintupian" label="头像" width="180"> 126 + <el-table-column prop="beijintupian" label="头像" >
127 <template slot-scope="scope"> 127 <template slot-scope="scope">
128 <img :src="scope.row.beijintupian" style="width: 40px;height: 40px;" /> 128 <img :src="scope.row.beijintupian" style="width: 40px;height: 40px;" />
129 </template> 129 </template>
130 </el-table-column> 130 </el-table-column>
131 - <el-table-column prop="RecordName" label="微信名" width="180"> 131 + <el-table-column prop="RecordName" label="微信名" >
132 <template slot-scope="scope"> 132 <template slot-scope="scope">
133 {{scope.row.RecordName}} 133 {{scope.row.RecordName}}
134 </template> 134 </template>
135 </el-table-column> 135 </el-table-column>
136 - <el-table-column prop="RecordPhone" label="电话号码" width="180"> 136 + <el-table-column prop="RecordPhone" label="电话号码">
137 <template slot-scope="scope"> 137 <template slot-scope="scope">
138 {{scope.row.RecordPhone}} 138 {{scope.row.RecordPhone}}
139 </template> 139 </template>
140 </el-table-column> 140 </el-table-column>
141 - <el-table-column prop="date" label="用户名" width="180"> 141 + <el-table-column prop="date" label="用户名" >
142 <template slot-scope="scope"> 142 <template slot-scope="scope">
143 {{scope.row.UserName}} 143 {{scope.row.UserName}}
144 </template> 144 </template>
145 </el-table-column> 145 </el-table-column>
146 - <el-table-column prop="UserId" label="用户ID" width="180"> 146 + <el-table-column prop="UserId" label="用户ID" >
147 <template slot-scope="scope"> 147 <template slot-scope="scope">
148 {{scope.row.UserId}} 148 {{scope.row.UserId}}
149 </template> 149 </template>
@@ -154,64 +154,64 @@ @@ -154,64 +154,64 @@
154 </template> 154 </template>
155 </el-table-column> 155 </el-table-column>
156 156
157 - <el-table-column prop="date" label="状态" width="180"> 157 + <el-table-column prop="date" label="状态" >
158 <template slot-scope="scope"> 158 <template slot-scope="scope">
159 <el-tag type="success"> 159 <el-tag type="success">
160 {{scope.row.State==0?'已预约':scope.row.State==1?'已取消':scope.row.State==2?'已完成':'未知'}} 160 {{scope.row.State==0?'已预约':scope.row.State==1?'已取消':scope.row.State==2?'已完成':'未知'}}
161 </el-tag> 161 </el-tag>
162 </template> 162 </template>
163 </el-table-column> 163 </el-table-column>
164 - <el-table-column prop="Remarks" label="备注" width="180"> 164 + <el-table-column prop="Remarks" label="备注" >
165 <template slot-scope="scope"> 165 <template slot-scope="scope">
166 {{scope.row.Remarks}} 166 {{scope.row.Remarks}}
167 </template> 167 </template>
168 </el-table-column> 168 </el-table-column>
169 - <el-table-column prop="date" label="车型" width="180"> 169 + <el-table-column prop="date" label="车型" >
170 <template slot-scope="scope"> 170 <template slot-scope="scope">
171 {{scope.row.CarModel}} 171 {{scope.row.CarModel}}
172 </template> 172 </template>
173 </el-table-column> 173 </el-table-column>
174 - <el-table-column prop="date" label="颜色" width="180"> 174 + <el-table-column prop="date" label="颜色" >
175 <template slot-scope="scope"> 175 <template slot-scope="scope">
176 {{scope.row.CarColour}} 176 {{scope.row.CarColour}}
177 </template> 177 </template>
178 </el-table-column> 178 </el-table-column>
179 - <el-table-column prop="date" label="划痕" width="180"> 179 + <el-table-column prop="date" label="划痕" >
180 <template slot-scope="scope"> 180 <template slot-scope="scope">
181 {{scope.row.Scratch}} 181 {{scope.row.Scratch}}
182 </template> 182 </template>
183 </el-table-column> 183 </el-table-column>
184 - <el-table-column prop="date" label="腐蚀" width="180"> 184 + <el-table-column prop="date" label="腐蚀" >
185 <template slot-scope="scope"> 185 <template slot-scope="scope">
186 {{scope.row.Corrosion}} 186 {{scope.row.Corrosion}}
187 </template> 187 </template>
188 </el-table-column> 188 </el-table-column>
189 - <el-table-column prop="date" label="破损" width="180"> 189 + <el-table-column prop="date" label="破损" >
190 <template slot-scope="scope"> 190 <template slot-scope="scope">
191 {{scope.row.BeDamaged}} 191 {{scope.row.BeDamaged}}
192 </template> 192 </template>
193 </el-table-column> 193 </el-table-column>
194 - <el-table-column prop="date" label="飞漆" width="180"> 194 + <el-table-column prop="date" label="飞漆" >
195 <template slot-scope="scope"> 195 <template slot-scope="scope">
196 {{scope.row.FlyingPaint}} 196 {{scope.row.FlyingPaint}}
197 </template> 197 </template>
198 </el-table-column> 198 </el-table-column>
199 - <el-table-column prop="date" label="地址" width="180"> 199 + <el-table-column prop="date" label="地址" >
200 <template slot-scope="scope"> 200 <template slot-scope="scope">
201 {{scope.row.Address}} 201 {{scope.row.Address}}
202 </template> 202 </template>
203 </el-table-column> 203 </el-table-column>
204 - <el-table-column prop="date" label="预约时间" width="180"> 204 + <el-table-column prop="date" label="预约时间" >
205 <template slot-scope="scope"> 205 <template slot-scope="scope">
206 {{scope.row.MakeTime}} 206 {{scope.row.MakeTime}}
207 </template> 207 </template>
208 </el-table-column> 208 </el-table-column>
209 - <el-table-column prop="date" label="添加时间" width="180" v-if="false"> 209 + <el-table-column prop="date" label="添加时间" v-if="false">
210 <template slot-scope="scope"> 210 <template slot-scope="scope">
211 {{scope.row.AddTime}} 211 {{scope.row.AddTime}}
212 </template> 212 </template>
213 </el-table-column> 213 </el-table-column>
214 - <el-table-column prop="ResultTime" label="付款时间" width="180"> 214 + <el-table-column prop="ResultTime" label="付款时间" >
215 <template slot-scope="scope"> 215 <template slot-scope="scope">
216 <!-- {{scope.row.RecordTime}} --> 216 <!-- {{scope.row.RecordTime}} -->
217 {{scope.row.State==2?scope.row.ResultTime:''}} 217 {{scope.row.State==2?scope.row.ResultTime:''}}
@@ -219,7 +219,7 @@ @@ -219,7 +219,7 @@
219 </el-table-column> 219 </el-table-column>
220 </el-table> 220 </el-table>
221 <el-pagination background layout="prev, pager, next" :total="formCustomer.TotalCount" 221 <el-pagination background layout="prev, pager, next" :total="formCustomer.TotalCount"
222 - @current-page="PagesCustomer" style="text-align:right;margin-top:10px;"> 222 + @current-change="PagesCustomer" style="text-align:right;margin-top:10px;">
223 </el-pagination> 223 </el-pagination>
224 </div> 224 </div>
225 </el-collapse-item> 225 </el-collapse-item>
@@ -397,7 +397,7 @@ @@ -397,7 +397,7 @@
397 </el-table-column> 397 </el-table-column>
398 </el-table> 398 </el-table>
399 <el-pagination background layout="prev, pager, next" :total="formCustomer.TotalCount" 399 <el-pagination background layout="prev, pager, next" :total="formCustomer.TotalCount"
400 - @current-page="PagesCustomer" style="text-align:right;margin-top:10px;"> 400 + @current-change="PagesCustomer" style="text-align:right;margin-top:10px;">
401 </el-pagination> 401 </el-pagination>
402 </div> 402 </div>
403 </el-collapse-item> 403 </el-collapse-item>
@@ -522,6 +522,9 @@ @@ -522,6 +522,9 @@
522 this.$message.error('暂无下级推广专员') 522 this.$message.error('暂无下级推广专员')
523 }else{ 523 }else{
524 this.$message.success('查询下级推广专员成功') 524 this.$message.success('查询下级推广专员成功')
  525 + res.data.data.forEach((item,index)=>{
  526 + item.phone = item.phone.substr(0, 3) + '****' + item.phone.substr(7)
  527 + })
525 this.ManageData = res.data.data 528 this.ManageData = res.data.data
526 } 529 }
527 } else { 530 } else {
@@ -533,7 +536,7 @@ @@ -533,7 +536,7 @@
533 SelectW(id) { 536 SelectW(id) {
534 this.formCustomerW.RecordState=-1 537 this.formCustomerW.RecordState=-1
535 this.formCustomerW.UserId = id 538 this.formCustomerW.UserId = id
536 - console.log('wwww') 539 + // console.log('wwww')
537 GetRecordByCustomerX(this.formCustomerW).then(res => { 540 GetRecordByCustomerX(this.formCustomerW).then(res => {
538 console.log('查询出的数据', res) 541 console.log('查询出的数据', res)
539 if(res.data.code==200){ 542 if(res.data.code==200){
@@ -542,10 +545,11 @@ @@ -542,10 +545,11 @@
542 this.$message.error('暂无下级预约数据') 545 this.$message.error('暂无下级预约数据')
543 } else { 546 } else {
544 res.data.data.rows.forEach((item, index) => { 547 res.data.data.rows.forEach((item, index) => {
  548 + item.RecordTime=utils.formatTime(item.RecordTime,"yyyy-MM-dd HH:mm:ss")
545 item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss") 549 item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss")
546 item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss") 550 item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss")
547 item.MakeTime = utils.formatTime(item.MakeTime, "yyyy-MM-dd HH:mm:ss") 551 item.MakeTime = utils.formatTime(item.MakeTime, "yyyy-MM-dd HH:mm:ss")
548 - 552 + item.RecordPhone = item.RecordPhone.substr(0, 3) + '****' + item.RecordPhone.substr(7)
549 }) 553 })
550 this.SubData = res.data.data.rows 554 this.SubData = res.data.data.rows
551 this.formCustomerW.TotalCount = res.data.data.total 555 this.formCustomerW.TotalCount = res.data.data.total
@@ -557,6 +561,13 @@ @@ -557,6 +561,13 @@
557 }, 561 },
558 // 查询 562 // 查询
559 GetSubData(){ 563 GetSubData(){
  564 + console.log('最终查询获取时间',this.formCustomerW)
  565 + if(this.formCustomerW.StartResultTime!=''){
  566 + this.formCustomerW.StartResultTime=utils.formatTime(this.formCustomerW.StartResultTime,"yyyy-MM-dd")
  567 + }
  568 + if(this.formCustomerW.EndResultTime!=''){
  569 + this.formCustomerW.EndResultTime=utils.formatTime(this.formCustomerW.EndResultTime,"yyyy-MM-dd")
  570 + }
560 GetRecordByCustomerX(this.formCustomerW).then(res => { 571 GetRecordByCustomerX(this.formCustomerW).then(res => {
561 console.log('查询出的数据', res) 572 console.log('查询出的数据', res)
562 if (res.data.data.total == 0) { 573 if (res.data.data.total == 0) {
@@ -564,9 +575,11 @@ @@ -564,9 +575,11 @@
564 this.SubData=[] 575 this.SubData=[]
565 } else { 576 } else {
566 res.data.data.rows.forEach((item, index) => { 577 res.data.data.rows.forEach((item, index) => {
  578 + item.RecordTime=utils.formatTime(item.RecordTime,"yyyy-MM-dd HH:mm:ss")
567 item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss") 579 item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss")
568 item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss") 580 item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss")
569 item.MakeTime = utils.formatTime(item.MakeTime, "yyyy-MM-dd HH:mm:ss") 581 item.MakeTime = utils.formatTime(item.MakeTime, "yyyy-MM-dd HH:mm:ss")
  582 + item.RecordPhone = item.RecordPhone.substr(0, 3) + '****' + item.RecordPhone.substr(7)
570 }) 583 })
571 this.SubData = res.data.data.rows 584 this.SubData = res.data.data.rows
572 this.formCustomerW.TotalCount = res.data.data.total 585 this.formCustomerW.TotalCount = res.data.data.total
@@ -587,22 +600,33 @@ @@ -587,22 +600,33 @@
587 item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss") 600 item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss")
588 item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss") 601 item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss")
589 item.MakeTime = utils.formatTime(item.MakeTime, "yyyy-MM-dd HH:mm:ss") 602 item.MakeTime = utils.formatTime(item.MakeTime, "yyyy-MM-dd HH:mm:ss")
  603 + item.RecordPhone = item.RecordPhone.substr(0, 3) + '****' + item.RecordPhone.substr(7)
590 }) 604 })
591 this.Direct = res.data.data.rows 605 this.Direct = res.data.data.rows
592 this.formCustomer.TotalCount = res.data.data.total 606 this.formCustomer.TotalCount = res.data.data.total
  607 + console.log('shiti实体',this.formCustomer)
593 } 608 }
594 }) 609 })
595 }, 610 },
596 //展示直推用户 611 //展示直推用户
597 ShowZT() { 612 ShowZT() {
  613 + if(this.formCustomer.StartResultTime!=''){
  614 + this.formCustomer.StartResultTime=utils.formatTime(this.formCustomer.StartResultTime,"yyyy-MM-dd")
  615 + }
  616 + if(this.formCustomer.EndResultTime!=''){
  617 + this.formCustomer.EndResultTime=utils.formatTime(this.formCustomer.EndResultTime,"yyyy-MM-dd")
  618 + }
598 GetRecordByCustomerX(this.formCustomer).then(res => { 619 GetRecordByCustomerX(this.formCustomer).then(res => {
599 console.log('直推', res) 620 console.log('直推', res)
600 res.data.data.rows.forEach((item, index) => { 621 res.data.data.rows.forEach((item, index) => {
  622 + item.MakeTime=utils.formatTime(item.MakeTime,"yyyy-MM-dd HH:mm:ss")
601 item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss") 623 item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss")
602 item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss") 624 item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss")
  625 + item.UserPhone = item.UserPhone.substr(0, 3) + '****' + item.UserPhone.substr(7)
603 }) 626 })
604 this.Direct = res.data.data.rows 627 this.Direct = res.data.data.rows
605 this.formCustomer.TotalCount = res.data.data.total 628 this.formCustomer.TotalCount = res.data.data.total
  629 + console.log('直推查询按钮',this.formCustomer)
606 }) 630 })
607 }, 631 },
608 Pages(e) { 632 Pages(e) {
src/views/login/index.vue
1 <template> 1 <template>
2 <div class="login-container"> 2 <div class="login-container">
3 <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left"> 3 <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
4 -  
5 <div class="title-container"> 4 <div class="title-container">
6 - <h3 class="title">尚腾汽车管理后台</h3> 5 + <h3 class="title">尚腾汽车养护管理后台</h3>
7 </div> 6 </div>
8 7
9 <el-form-item prop="username"> 8 <el-form-item prop="username">
@@ -13,7 +12,7 @@ @@ -13,7 +12,7 @@
13 <el-input 12 <el-input
14 ref="username" 13 ref="username"
15 v-model="loginForm.username" 14 v-model="loginForm.username"
16 - placeholder="Username" 15 + placeholder="用户名"
17 name="username" 16 name="username"
18 type="text" 17 type="text"
19 tabindex="1" 18 tabindex="1"
@@ -30,7 +29,7 @@ @@ -30,7 +29,7 @@
30 ref="password" 29 ref="password"
31 v-model="loginForm.password" 30 v-model="loginForm.password"
32 :type="passwordType" 31 :type="passwordType"
33 - placeholder="Password" 32 + placeholder="密码"
34 name="password" 33 name="password"
35 tabindex="2" 34 tabindex="2"
36 auto-complete="on" 35 auto-complete="on"
@@ -41,7 +40,7 @@ @@ -41,7 +40,7 @@
41 </span> 40 </span>
42 </el-form-item> 41 </el-form-item>
43 42
44 - <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">Login</el-button> 43 + <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">登录系统</el-button>
45 44
46 <div class="tips" v-if="false"> 45 <div class="tips" v-if="false">
47 <span style="margin-right:20px;">username: admin</span> 46 <span style="margin-right:20px;">username: admin</span>
src/views/moneys/moneys.vue
1 <template> 1 <template>
2 <div class="container" style="margin: 10px;"> 2 <div class="container" style="margin: 10px;">
3 <el-form :inline="true" :model="moneymodel" class="demo-form-inline"> 3 <el-form :inline="true" :model="moneymodel" class="demo-form-inline">
4 - <el-form-item label="关键字">  
5 - <el-input v-model="moneymodel.KeyWord" placeholder="关键字"></el-input> 4 + <el-form-item label="用户ID">
  5 + <el-input v-model="moneymodel.UserId" placeholder="用户ID"></el-input>
6 </el-form-item> 6 </el-form-item>
7 <el-form-item label="状态"> 7 <el-form-item label="状态">
8 <el-select v-model="moneymodel.status" placeholder="请选择"> 8 <el-select v-model="moneymodel.status" placeholder="请选择">
@@ -17,17 +17,32 @@ @@ -17,17 +17,32 @@
17 <el-button type="success" @click="AddOrUpdMoney(null)">新增</el-button> 17 <el-button type="success" @click="AddOrUpdMoney(null)">新增</el-button>
18 </el-form-item> 18 </el-form-item>
19 </el-form> 19 </el-form>
20 - <el-table :data="tableData" style="width: 100%"> 20 + <el-table :data="tableData" style="width: 100%" :show-summary="true" :summary-method="getSummaries">
21 <el-table-column prop="id" label="ID" v-if="false"> 21 <el-table-column prop="id" label="ID" v-if="false">
22 <template slot-scope="scope"> 22 <template slot-scope="scope">
23 {{scope.row.id}} 23 {{scope.row.id}}
24 </template> 24 </template>
25 </el-table-column> 25 </el-table-column>
26 - <el-table-column prop="username" label="用户微信名"> 26 + <el-table-column label="用户编号" align="center" prop="userid">
  27 + <template slot-scope="scope">
  28 + {{scope.row.userid}}
  29 + </template>
  30 + </el-table-column>
  31 + <el-table-column label="头像" align="center" prop="beijintupian">
  32 + <template slot-scope="scope">
  33 + <img :src="scope.row.beijintupian" style="width: 50px;height: 50px;">
  34 + </template>
  35 + </el-table-column>
  36 + <el-table-column label="用户微信名" width="150" align="center" prop="username">
27 <template slot-scope="scope"> 37 <template slot-scope="scope">
28 {{scope.row.username}} 38 {{scope.row.username}}
29 </template> 39 </template>
30 </el-table-column> 40 </el-table-column>
  41 + <el-table-column label="手机号" align="center" prop="phone">
  42 + <template slot-scope="scope">
  43 + {{scope.row.phone}}
  44 + </template>
  45 + </el-table-column>
31 <el-table-column prop="openid" label="OpenId" v-if="false"> 46 <el-table-column prop="openid" label="OpenId" v-if="false">
32 <template slot-scope="scope"> 47 <template slot-scope="scope">
33 {{scope.row.openid}} 48 {{scope.row.openid}}
@@ -43,27 +58,27 @@ @@ -43,27 +58,27 @@
43 {{scope.row.userid}} 58 {{scope.row.userid}}
44 </template> 59 </template>
45 </el-table-column> 60 </el-table-column>
46 - <el-table-column prop="oldmoney" label="原金额"> 61 + <el-table-column prop="oldmoney" label="原金额" align="center" v-if="false">
47 <template slot-scope="scope"> 62 <template slot-scope="scope">
48 ¥{{scope.row.oldmoney/100}} 63 ¥{{scope.row.oldmoney/100}}
49 </template> 64 </template>
50 </el-table-column> 65 </el-table-column>
51 - <el-table-column prop="nowmoney" label="余额"> 66 + <el-table-column prop="nowmoney" label="余额" align="center">
52 <template slot-scope="scope"> 67 <template slot-scope="scope">
53 ¥{{scope.row.nowmoney/100}} 68 ¥{{scope.row.nowmoney/100}}
54 </template> 69 </template>
55 </el-table-column> 70 </el-table-column>
56 - <el-table-column prop="money" label="提现金额"> 71 + <el-table-column prop="money" label="提现金额" align="center">
57 <template slot-scope="scope"> 72 <template slot-scope="scope">
58 ¥{{scope.row.money/100}} 73 ¥{{scope.row.money/100}}
59 </template> 74 </template>
60 </el-table-column> 75 </el-table-column>
61 - <el-table-column prop="add_time" label="提现时间"> 76 + <el-table-column prop="add_time" label="提现时间" align="center">
62 <template slot-scope="scope"> 77 <template slot-scope="scope">
63 {{scope.row.add_time}} 78 {{scope.row.add_time}}
64 </template> 79 </template>
65 </el-table-column> 80 </el-table-column>
66 - <el-table-column prop="status" label="状态"> 81 + <el-table-column prop="status" label="状态" align="center">
67 <template slot-scope="scope"> 82 <template slot-scope="scope">
68 <el-tag :type="scope.row.status==0?'success':'warn'"> 83 <el-tag :type="scope.row.status==0?'success':'warn'">
69 {{scope.row.status==0?'成功':'失败'}} 84 {{scope.row.status==0?'成功':'失败'}}
@@ -75,7 +90,7 @@ @@ -75,7 +90,7 @@
75 <el-button type="primary" @click="AddOrUpdMoney(scope.row)">编辑</el-button> 90 <el-button type="primary" @click="AddOrUpdMoney(scope.row)">编辑</el-button>
76 </template> 91 </template>
77 </el-table-column> 92 </el-table-column>
78 - <el-table-column label="删除" v-if="false"> 93 + <el-table-column label="删除" >
79 <template slot-scope="scope"> 94 <template slot-scope="scope">
80 <el-button type="danger" @click="DelMoney(scope.row.id)">删除</el-button> 95 <el-button type="danger" @click="DelMoney(scope.row.id)">删除</el-button>
81 </template> 96 </template>
@@ -87,16 +102,28 @@ @@ -87,16 +102,28 @@
87 <el-dialog title="提示" :visible.sync="dialogVisible" width="30%"> 102 <el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
88 103
89 <el-form ref="form" :model="form" label-width="80px" :rules="rules"> 104 <el-form ref="form" :model="form" label-width="80px" :rules="rules">
90 - <el-form-item label="用户名" prop="username">  
91 - <el-input v-model="form.username" placeholder="用户名"></el-input> 105 + <el-form-item label="用户编号" prop="userid">
  106 + <el-input v-model="form.userid" placeholder="用户编号"></el-input>
  107 + </el-form-item>
  108 + <el-form-item label="头像" prop="beijintupian">
  109 + <el-input v-model="form.beijintupian" placeholder="头像"></el-input>
92 </el-form-item> 110 </el-form-item>
93 - <el-form-item label="原提现金额" prop="oldmoney">  
94 - <el-input v-model="form.oldmoney" placeholder="原提现金额"></el-input> 111 + <el-form-item label="微信名" prop="username">
  112 + <el-input v-model="form.username" placeholder="微信名"></el-input>
  113 + </el-form-item>
  114 + <el-form-item label="手机号" prop="phone">
  115 + <el-input v-model="form.phone" placeholder="手机号"></el-input>
  116 + </el-form-item>
  117 + <!-- <el-form-item label="用户名" prop="username">
  118 + <el-input v-model="form.username" placeholder="用户名"></el-input>
  119 + </el-form-item> -->
  120 + <el-form-item label="原提现金额" prop="oldmoney" >
  121 + <el-input v-model="form.oldmoney" placeholder="原提现金额" ></el-input>
95 </el-form-item> 122 </el-form-item>
96 <el-form-item label="提现金额" prop="money"> 123 <el-form-item label="提现金额" prop="money">
97 <el-input v-model="form.money" placeholder="提现金额"></el-input> 124 <el-input v-model="form.money" placeholder="提现金额"></el-input>
98 </el-form-item> 125 </el-form-item>
99 - <el-form-item label="剩余金额" prop="nowmoney" v-if="false"> 126 + <el-form-item label="剩余金额" prop="nowmoney" v-if="false">
100 <el-input v-model="form.nowmoney"></el-input> 127 <el-input v-model="form.nowmoney"></el-input>
101 </el-form-item> 128 </el-form-item>
102 </el-form> 129 </el-form>
@@ -124,11 +151,10 @@ @@ -124,11 +151,10 @@
124 dialogVisible: false, 151 dialogVisible: false,
125 rules: { 152 rules: {
126 username: [{ 153 username: [{
127 - required: true,  
128 - message: '请输入用户名',  
129 - trigger: 'change'  
130 - },  
131 - ], 154 + required: true,
  155 + message: '请输入用户名',
  156 + trigger: 'change'
  157 + }, ],
132 oldmoney: [{ 158 oldmoney: [{
133 required: true, 159 required: true,
134 message: '请输入金额(元)', 160 message: '请输入金额(元)',
@@ -154,26 +180,29 @@ @@ -154,26 +180,29 @@
154 }, 180 },
155 tableData: [], 181 tableData: [],
156 moneymodel: { 182 moneymodel: {
  183 + "UserId": 0,
157 "status": 0, 184 "status": 0,
158 "KeyWord": "", 185 "KeyWord": "",
159 "TotalCount": 0, 186 "TotalCount": 0,
160 "PageIndex": 1, 187 "PageIndex": 1,
161 "PageSize": 10, 188 "PageSize": 10,
162 "Sort": [{ 189 "Sort": [{
163 - "Field": "",  
164 - "Type": 0 190 + "Field": "add_time",
  191 + "Type": 1
165 }] 192 }]
166 }, 193 },
167 form: { 194 form: {
168 "id": 0, 195 "id": 0,
  196 + "openid": "",
  197 + "remark": "",
169 "username": "", 198 "username": "",
170 - "remark":'',  
171 - "openid":'',  
172 "userid": 0, 199 "userid": 0,
  200 + "beijintupian": "",
  201 + "phone": "",
173 "oldmoney": 0, 202 "oldmoney": 0,
174 "nowmoney": 0, 203 "nowmoney": 0,
175 "money": 0, 204 "money": 0,
176 - "add_time": "2022-01-18T02:47:00.549Z", 205 + "add_time": "2022-02-10T13:55:23.241Z",
177 "status": 0 206 "status": 0
178 } 207 }
179 } 208 }
@@ -182,6 +211,49 @@ @@ -182,6 +211,49 @@
182 this.ShowMoneys() 211 this.ShowMoneys()
183 }, 212 },
184 methods: { 213 methods: {
  214 + // 自定义合计
  215 + getSummaries(param){
  216 + console.log(param)
  217 + const {
  218 + columns,
  219 + data
  220 + } = param;
  221 + const sums = [];
  222 + columns.forEach((column, index) => {
  223 + if(index === 0) {
  224 + sums[index] = '合计';
  225 + return;
  226 + }
  227 + if(index==4){
  228 + const values = data.map((item) => Number(item[column.property]));
  229 + let nums=0
  230 + values.forEach((item,index)=>{
  231 + nums+=item/100
  232 + })
  233 + sums[index]=nums
  234 + }
  235 + if(index==5){
  236 + const values = data.map((item) => Number(item[column.property]));
  237 + let mons=0
  238 + values.forEach((item,index)=>{
  239 + mons+=item/100
  240 + })
  241 + sums[index]=mons
  242 + }
  243 + // alert(JSON.stringify(columns[index].nowmoney))
  244 + // alert(JSON.stringify(data))
  245 + // alert(JSON.stringify(column.property))
  246 + // switch(column.property) {
  247 + // case "nowmoney":
  248 + // // alert(sums[index])
  249 + // sums[index] =this.tableData.map(()=>{item.nowmoney})//值取自后台
  250 + // break;
  251 + // default:
  252 + // break;
  253 + // }
  254 + });
  255 + return sums;
  256 + },
185 // 提交添加或者修改 257 // 提交添加或者修改
186 SubmitMoney() { 258 SubmitMoney() {
187 this.$refs.form.validate((valid) => { 259 this.$refs.form.validate((valid) => {
@@ -213,15 +285,15 @@ @@ -213,15 +285,15 @@
213 }) 285 })
214 }, 286 },
215 Pages(e) { 287 Pages(e) {
216 - this.moneymodel.PageIndex = e 288 + this.moneymodel.PageIndex = e
217 this.ShowMoneys() 289 this.ShowMoneys()
218 }, 290 },
219 // 展示提现金额 291 // 展示提现金额
220 ShowMoneys() { 292 ShowMoneys() {
221 GetMoneyList(this.moneymodel).then(res => { 293 GetMoneyList(this.moneymodel).then(res => {
222 console.log('提现记录', res) 294 console.log('提现记录', res)
223 - res.data.data.rows.forEach((item,index)=>[  
224 - item.add_time=utils.formatTime(item.add_time,"yyyy-MM-dd HH:mm:ss") 295 + res.data.data.rows.forEach((item, index) => [
  296 + item.add_time = utils.formatTime(item.add_time, "yyyy-MM-dd HH:mm:ss")
225 ]) 297 ])
226 this.tableData = res.data.data.rows 298 this.tableData = res.data.data.rows
227 this.moneymodel.TotalCount = res.data.data.total 299 this.moneymodel.TotalCount = res.data.data.total
src/views/partner/partner.vue
@@ -40,6 +40,12 @@ @@ -40,6 +40,12 @@
40 {{scope.row.add_time}} 40 {{scope.row.add_time}}
41 </template> 41 </template>
42 </el-table-column> 42 </el-table-column>
  43 + <el-table-column label="屏蔽">
  44 + <template slot-scope="scope">
  45 + <el-button type="primary" @click="ShieldPerSon(scope.row.id)">屏蔽
  46 + </el-button>
  47 + </template>
  48 + </el-table-column>
43 <el-table-column label="查看推广"> 49 <el-table-column label="查看推广">
44 <template slot-scope="scope"> 50 <template slot-scope="scope">
45 <el-button type="primary" @click="RedirectOrder(scope.row.id)">查看推广</el-button> 51 <el-button type="primary" @click="RedirectOrder(scope.row.id)">查看推广</el-button>
@@ -61,7 +67,7 @@ @@ -61,7 +67,7 @@
61 </template> 67 </template>
62 </el-table-column> 68 </el-table-column>
63 </el-table> 69 </el-table>
64 - <el-pagination background layout="prev, pager, next" :total="model.TotalCount" @current-page="Pages" 70 + <el-pagination background layout="prev, pager, next" :total="model.TotalCount" @current-change="Pages"
65 style="text-align: right;margin-top: 10px;"> 71 style="text-align: right;margin-top: 10px;">
66 </el-pagination> 72 </el-pagination>
67 <el-dialog title="提示" :visible.sync="dialogVisible" width="50%"> 73 <el-dialog title="提示" :visible.sync="dialogVisible" width="50%">
@@ -92,16 +98,12 @@ @@ -92,16 +98,12 @@
92 <el-button type="primary" @click="SubmitPartnerUser">确 定</el-button> 98 <el-button type="primary" @click="SubmitPartnerUser">确 定</el-button>
93 </span> 99 </span>
94 </el-dialog> 100 </el-dialog>
95 - <el-dialog  
96 - title="外部链接"  
97 - :visible.sync="dialogVisibleR"  
98 - width="50%"  
99 - >  
100 - <span>外部链接:{{linkR}}</span>  
101 - <span slot="footer" class="dialog-footer">  
102 - <el-button @click="dialogVisibleR = false">取 消</el-button>  
103 - <el-button type="primary" @click="dialogVisibleR = false">确 定</el-button>  
104 - </span> 101 + <el-dialog title="外部链接" :visible.sync="dialogVisibleR" width="50%">
  102 + <span>外部链接:{{linkR}}</span>
  103 + <span slot="footer" class="dialog-footer">
  104 + <el-button @click="dialogVisibleR = false">取 消</el-button>
  105 + <el-button type="primary" @click="dialogVisibleR = false">确 定</el-button>
  106 + </span>
105 </el-dialog> 107 </el-dialog>
106 </div> 108 </div>
107 </template> 109 </template>
@@ -110,7 +112,8 @@ @@ -110,7 +112,8 @@
110 import { 112 import {
111 GetListPartner, 113 GetListPartner,
112 AddOrUpdatePartner, 114 AddOrUpdatePartner,
113 - DelPartner 115 + DelPartner,
  116 + UpdatePartner,
114 } from '../../api/Partner.js' 117 } from '../../api/Partner.js'
115 import { 118 import {
116 AddOrUpdatePartnerUser 119 AddOrUpdatePartnerUser
@@ -121,8 +124,9 @@ @@ -121,8 +124,9 @@
121 return { 124 return {
122 dialogVisibleX: false, 125 dialogVisibleX: false,
123 dialogVisible: false, 126 dialogVisible: false,
124 - dialogVisibleR:false,  
125 - linkR:'', 127 + dialogVisibleR: false,
  128 + ShieldTxt: true,
  129 + linkR: '',
126 tableData: [], 130 tableData: [],
127 model: { 131 model: {
128 "KeyWord": "", 132 "KeyWord": "",
@@ -168,6 +172,11 @@ @@ -168,6 +172,11 @@
168 "User_id": 0, 172 "User_id": 0,
169 "Partner_id": 0, 173 "Partner_id": 0,
170 "status": 0 174 "status": 0
  175 + },
  176 + //修改合伙人状态
  177 + statusModel: {
  178 + "id": 0,
  179 + "status": 0
171 } 180 }
172 } 181 }
173 }, 182 },
@@ -175,6 +184,24 @@ @@ -175,6 +184,24 @@
175 this.ShowPartner() 184 this.ShowPartner()
176 }, 185 },
177 methods: { 186 methods: {
  187 + //屏蔽合伙人
  188 + ShieldPerSon(id) {
  189 + this.statusModel.id=id
  190 + this.ShieldTxt = !this.ShieldTxt
  191 + if(this.ShieldTxt){
  192 + this.statusModel.status=0
  193 + }else{
  194 + this.statusModel.status=-99
  195 + }
  196 + UpdatePartner(this.statusModel).then(res => {
  197 + if (res.code == 200) {
  198 + this.$message.success('操作成功')
  199 + this.ShowPartner()
  200 + } else {
  201 + this.$message.error('屏蔽失败')
  202 + }
  203 + })
  204 + },
178 // 新增销售经理 205 // 新增销售经理
179 Addsubordinate(id) { 206 Addsubordinate(id) {
180 console.log('id', id) 207 console.log('id', id)
@@ -198,16 +225,16 @@ @@ -198,16 +225,16 @@
198 } 225 }
199 }) 226 })
200 }, 227 },
201 - 228 +
202 // 查看订单 229 // 查看订单
203 RedirectOrder(id) { 230 RedirectOrder(id) {
204 - let links='https://shangten.yiqituancity.com/#/externalInfo?id='+utils.Encrypt(id)  
205 - this.linkR=links  
206 - this.dialogVisibleR=true 231 + let links = 'https://shangten.yiqituancity.com/#/externalInfo?id=' + utils.Encrypt(id)
  232 + this.linkR = links
  233 + this.dialogVisibleR = true
207 // this.$router.push({ 234 // this.$router.push({
208 // path: '/externalInfo?id=' +id 235 // path: '/externalInfo?id=' +id
209 // }) 236 // })
210 - 237 +
211 }, 238 },
212 Pages(e) { 239 Pages(e) {
213 this.model.PageIndex = e 240 this.model.PageIndex = e
src/views/proportion/proportion.vue 0 → 100644
  1 +<template>
  2 + <div class="container" style="padding: 10px;">
  3 + <el-form :inline="true" :model="model" class="demo-form-inline">
  4 + <el-form-item label="预约ID" v-if="false">
  5 + <el-input v-model="model.RecordId" placeholder="预约ID"></el-input>
  6 + </el-form-item>
  7 + <el-form-item label="用户ID">
  8 + <el-input v-model="model.UserId" placeholder="用户ID"></el-input>
  9 + </el-form-item>
  10 + <el-form-item label="用户名" >
  11 + <el-input v-model="model.KeyWord" placeholder="用户名"></el-input>
  12 + </el-form-item>
  13 + <el-form-item>
  14 + <el-button type="primary" @click="onSubmit">查询</el-button>
  15 + </el-form-item>
  16 + </el-form>
  17 + <el-table :data="DetailModel" border style="width: 100%">
  18 + <el-table-column fixed prop="date" label="ID" v-if="false">
  19 + <template slot-scope="scope">
  20 + {{scope.row.id}}
  21 + </template>
  22 + </el-table-column>
  23 + <el-table-column fixed prop="date" label="预约ID">
  24 + <template slot-scope="scope">
  25 + {{scope.row.RecordId}}
  26 + </template>
  27 + </el-table-column>
  28 + <el-table-column prop="name" label="分成金额">
  29 + <<template slot-scope="scope">
  30 + ¥{{scope.row.Money/100}}
  31 + </template>
  32 + </el-table-column>
  33 + <el-table-column prop="province" label="用户">
  34 + <<template slot-scope="scope">
  35 + {{scope.row.OperatinUser}}
  36 + </template>
  37 + </el-table-column>
  38 + <el-table-column prop="city" label="添加时间">
  39 + <<template slot-scope="scope">
  40 + {{scope.row.AddTime}}
  41 + </template>
  42 + </el-table-column>
  43 + <el-table-column prop="address" label="用户ID">
  44 + <<template slot-scope="scope">
  45 + {{scope.row.UserId}}
  46 + </template>
  47 + </el-table-column>
  48 + </el-table>
  49 + <el-pagination background layout="prev, pager, next" :total="model.TotalCount" style="text-align: right;margin-top: 10px;" @current-page="Pages">
  50 + </el-pagination>
  51 + </div>
  52 +</template>
  53 +
  54 +<script>
  55 + import {
  56 + GetListIncomeDetails
  57 + } from '../../api/incomeDetails.js'
  58 + import utils from '../../utils/utils.js'
  59 + export default {
  60 + data() {
  61 + return {
  62 +
  63 + model: {
  64 + "RecordId": 0,
  65 + "UserId": 0,
  66 + "KeyWord": "",
  67 + "TotalCount": 0,
  68 + "PageIndex": 1,
  69 + "PageSize": 20,
  70 + "Sort": [{
  71 + "Field": "",
  72 + "Type": 0
  73 + }]
  74 + },
  75 + DetailModel:[],
  76 +
  77 + }
  78 + },
  79 + created() {
  80 + this.ShowDetail()
  81 + },
  82 + methods: {
  83 + // 提交查询
  84 + onSubmit(){
  85 + this.ShowDetail()
  86 + },
  87 + Pages(e){
  88 + this.model.PageIndex=e
  89 + this.ShowDetail()
  90 + },
  91 + handleClick(row) {
  92 + console.log(row);
  93 + },
  94 + //查询所有分成数据
  95 + ShowDetail() {
  96 + GetListIncomeDetails(this.model).then(res => {
  97 + console.log('分成数据', res)
  98 + res.data.data.rows.forEach((item,index)=>{
  99 + item.AddTime=utils.formatTime(item.AddTime,"yyyy-MM-dd HH:mm:ss")
  100 + })
  101 + this.DetailModel=res.data.data.rows
  102 + this.model.TotalCount=res.data.data.total
  103 + })
  104 + }
  105 + },
  106 +
  107 + }
  108 +</script>
  109 +
  110 +<style>
  111 +</style>
src/views/record/record.vue
@@ -12,37 +12,38 @@ @@ -12,37 +12,38 @@
12 </el-form-item> 12 </el-form-item>
13 </el-form> 13 </el-form>
14 <el-table :data="tableData" style="width: 100%"> 14 <el-table :data="tableData" style="width: 100%">
15 - <el-table-column prop="date" label="ID" width="180" v-if="false"> 15 + <el-table-column prop="date" label="ID" v-if="false">
16 <template slot-scope="scope"> 16 <template slot-scope="scope">
17 {{scope.row.id}} 17 {{scope.row.id}}
18 </template> 18 </template>
19 </el-table-column> 19 </el-table-column>
20 - <el-table-column prop="date" label="领取人ID" width="180"> 20 + <el-table-column prop="date" label="描述" >
21 <template slot-scope="scope"> 21 <template slot-scope="scope">
22 - {{scope.row.getUser}} 22 + {{scope.row.remark}}
23 </template> 23 </template>
24 </el-table-column> 24 </el-table-column>
25 - <el-table-column prop="date" label="领取数量" width="180"> 25 + <el-table-column prop="date" label="领取人ID" >
26 <template slot-scope="scope"> 26 <template slot-scope="scope">
27 - {{scope.row.getNum}} 27 + {{scope.row.getUser}}
28 </template> 28 </template>
29 </el-table-column> 29 </el-table-column>
30 - <el-table-column prop="date" label="描述" width="180" v-if="false"> 30 + <el-table-column prop="date" label="领取数量" >
31 <template slot-scope="scope"> 31 <template slot-scope="scope">
32 - {{scope.row.remark}} 32 + {{scope.row.getNum}}
33 </template> 33 </template>
34 </el-table-column> 34 </el-table-column>
35 - <el-table-column prop="date" label="领取时间" width="180"> 35 +
  36 + <el-table-column prop="date" label="领取时间" >
36 <template slot-scope="scope"> 37 <template slot-scope="scope">
37 {{scope.row.add_time}} 38 {{scope.row.add_time}}
38 </template> 39 </template>
39 </el-table-column> 40 </el-table-column>
40 - <el-table-column prop="date" label="修改时间" width="180"> 41 + <el-table-column prop="date" label="修改时间" >
41 <template slot-scope="scope"> 42 <template slot-scope="scope">
42 {{scope.row.update_time}} 43 {{scope.row.update_time}}
43 </template> 44 </template>
44 </el-table-column> 45 </el-table-column>
45 - <el-table-column prop="date" label="状态" width="180"> 46 + <el-table-column prop="date" label="状态" >
46 <template slot-scope="scope"> 47 <template slot-scope="scope">
47 <el-tag :type="scope.row.status==0?'success':'warn'"> 48 <el-tag :type="scope.row.status==0?'success':'warn'">
48 {{scope.row.status==0?'正常':'未知'}} 49 {{scope.row.status==0?'正常':'未知'}}
@@ -63,16 +64,19 @@ @@ -63,16 +64,19 @@
63 <el-pagination 64 <el-pagination
64 background 65 background
65 layout="prev, pager, next" 66 layout="prev, pager, next"
66 - :total="recordmodel.TotalCount" @current-page="Pages" style="text-align: right;margin-top: 10px;"> 67 + :total="recordmodel.TotalCount" @current-change="Pages" style="text-align: right;margin-top: 10px;">
67 </el-pagination> 68 </el-pagination>
68 <el-dialog title="提示" :visible.sync="dialogVisible" width="50%"> 69 <el-dialog title="提示" :visible.sync="dialogVisible" width="50%">
69 <el-form ref="recordAddUpdModel" :model="recordAddUpdModel" label-width="80px" :rules="rulerecord"> 70 <el-form ref="recordAddUpdModel" :model="recordAddUpdModel" label-width="80px" :rules="rulerecord">
70 - <el-form-item label="用户" prop="getUser"> 71 + <!-- <el-form-item label="用户" prop="getUser">
71 <el-select v-model="recordAddUpdModel.getUser" placeholder="请选择"> 72 <el-select v-model="recordAddUpdModel.getUser" placeholder="请选择">
72 <el-option :label="item.username" :value="item.id" v-for="(item,index) in userlist" 73 <el-option :label="item.username" :value="item.id" v-for="(item,index) in userlist"
73 :key="index"></el-option> 74 :key="index"></el-option>
74 75
75 </el-select> 76 </el-select>
  77 + </el-form-item> -->
  78 + <el-form-item label="用户ID" prop="getUser">
  79 + <el-input v-model="recordAddUpdModel.getUser" placeholder="用户ID"></el-input>
76 </el-form-item> 80 </el-form-item>
77 <el-form-item label="领取数量" prop="getNum"> 81 <el-form-item label="领取数量" prop="getNum">
78 <el-input v-model="recordAddUpdModel.getNum" placeholder="领取数量"></el-input> 82 <el-input v-model="recordAddUpdModel.getNum" placeholder="领取数量"></el-input>
@@ -106,7 +110,7 @@ @@ -106,7 +110,7 @@
106 rulerecord: { 110 rulerecord: {
107 getUser: [{ 111 getUser: [{
108 required: true, 112 required: true,
109 - message: '请选择用户', 113 + message: '请输入用户ID',
110 trigger: 'blur' 114 trigger: 'blur'
111 }], 115 }],
112 getNum: [{ 116 getNum: [{
@@ -198,11 +202,11 @@ @@ -198,11 +202,11 @@
198 AddOrUpdateRecord(this.recordAddUpdModel).then(res=>{ 202 AddOrUpdateRecord(this.recordAddUpdModel).then(res=>{
199 console.log('res返沪',res) 203 console.log('res返沪',res)
200 if(res.data.code==200){ 204 if(res.data.code==200){
201 - this.$message.success('操作') 205 + this.$message.success('操作成功')
202 this.ShowRecordList() 206 this.ShowRecordList()
203 this.dialogVisible=false 207 this.dialogVisible=false
204 }else{ 208 }else{
205 - this.$message.error('操作失败') 209 + this.$message.error('暂无此用户ID')
206 } 210 }
207 this.recordAddUpdModel.id = 0 211 this.recordAddUpdModel.id = 0
208 this.recordAddUpdModel.getUser = 0 212 this.recordAddUpdModel.getUser = 0
src/views/system/calendar.vue
@@ -3,7 +3,8 @@ @@ -3,7 +3,8 @@
3 <div style="width: 1000px;margin: auto;"> 3 <div style="width: 1000px;margin: auto;">
4 <el-button type="success" @click="AddYuYue" style="padding-top: 10px;">添加时间</el-button> 4 <el-button type="success" @click="AddYuYue" style="padding-top: 10px;">添加时间</el-button>
5 <el-button type="primary" @click="UpdYuYue" style="padding-top: 10px;">满员修改</el-button> 5 <el-button type="primary" @click="UpdYuYue" style="padding-top: 10px;">满员修改</el-button>
6 - <el-calendar > 6 + <el-button type="danger" @click="RemoveYuYue" style="padding-top: 10px;">还原时间</el-button>
  7 + <el-calendar>
7 <template slot="dateCell" slot-scope="{date, data}" style="padding: 0px;"> 8 <template slot="dateCell" slot-scope="{date, data}" style="padding: 0px;">
8 <div class="CalenDiv" :class="currentCount(data)>0?'IsSelectDay':'IsNoDay'"> 9 <div class="CalenDiv" :class="currentCount(data)>0?'IsSelectDay':'IsNoDay'">
9 <p class="DataTimeString">{{ data.day.split('-').slice(1).join('-') }}</p> 10 <p class="DataTimeString">{{ data.day.split('-').slice(1).join('-') }}</p>
@@ -13,6 +14,22 @@ @@ -13,6 +14,22 @@
13 </template> 14 </template>
14 </el-calendar> 15 </el-calendar>
15 </div> 16 </div>
  17 + <el-dialog title="还原" :visible.sync="dialogVisibleR" width="50%">
  18 + <el-form ref="form" :model="RemoveModel" label-width="80px" :rules="ruleform">
  19 + <el-form-item label="开始预约" prop="TimeOfAppointmentStart">
  20 + <el-date-picker type="date" placeholder="选择日期" v-model="RemoveModel.TimeOfAppointmentStart"
  21 + style="width: 100%;"></el-date-picker>
  22 + </el-form-item>
  23 + <el-form-item label="至" prop="TimeOfAppointmentEnd">
  24 + <el-date-picker type="date" placeholder="选择日期" v-model="RemoveModel.TimeOfAppointmentEnd"
  25 + style="width: 100%;"></el-date-picker>
  26 + </el-form-item>
  27 + </el-form>
  28 + <span slot="footer" class="dialog-footer">
  29 + <el-button @click="dialogVisibleR = false">取 消</el-button>
  30 + <el-button type="primary" @click="SubmitRemove">确 定</el-button>
  31 + </span>
  32 + </el-dialog>
16 <el-dialog title="新增" :visible.sync="dialogVisible" width="50%"> 33 <el-dialog title="新增" :visible.sync="dialogVisible" width="50%">
17 <el-form ref="form" :model="form" label-width="80px" :rules="ruleform"> 34 <el-form ref="form" :model="form" label-width="80px" :rules="ruleform">
18 <el-form-item label="可预约人数" prop="ReservedPlaces"> 35 <el-form-item label="可预约人数" prop="ReservedPlaces">
@@ -24,7 +41,7 @@ @@ -24,7 +41,7 @@
24 </el-form-item> 41 </el-form-item>
25 <el-form-item label="至" prop="TimeOfAppointmentEnd"> 42 <el-form-item label="至" prop="TimeOfAppointmentEnd">
26 <el-date-picker type="date" placeholder="选择日期" v-model="form.TimeOfAppointmentEnd" 43 <el-date-picker type="date" placeholder="选择日期" v-model="form.TimeOfAppointmentEnd"
27 - style="width: 100%;" ></el-date-picker> 44 + style="width: 100%;"></el-date-picker>
28 </el-form-item> 45 </el-form-item>
29 </el-form> 46 </el-form>
30 <span slot="footer" class="dialog-footer"> 47 <span slot="footer" class="dialog-footer">
@@ -39,7 +56,7 @@ @@ -39,7 +56,7 @@
39 </el-form-item> 56 </el-form-item>
40 <el-form-item label="预约日期" prop="TimeOfAppointment"> 57 <el-form-item label="预约日期" prop="TimeOfAppointment">
41 <el-date-picker type="date" placeholder="选择日期" v-model="updform.TimeOfAppointment" 58 <el-date-picker type="date" placeholder="选择日期" v-model="updform.TimeOfAppointment"
42 - style="width: 100%;" ></el-date-picker> 59 + style="width: 100%;"></el-date-picker>
43 </el-form-item> 60 </el-form-item>
44 </el-form> 61 </el-form>
45 <span slot="footer" class="dialog-footer"> 62 <span slot="footer" class="dialog-footer">
@@ -55,6 +72,7 @@ @@ -55,6 +72,7 @@
55 ReservationSettingsList, 72 ReservationSettingsList,
56 SettingReservation, 73 SettingReservation,
57 UpadteReservation, 74 UpadteReservation,
  75 + RemoveDateSection,
58 } from '../../api/ReservationSettings.js' 76 } from '../../api/ReservationSettings.js'
59 import utils from '../../utils/utils.js' 77 import utils from '../../utils/utils.js'
60 import { 78 import {
@@ -64,10 +82,11 @@ @@ -64,10 +82,11 @@
64 data() { 82 data() {
65 return { 83 return {
66 dialogVisibleU: false, 84 dialogVisibleU: false,
  85 + dialogVisibleR: false,
67 dialogVisible: false, 86 dialogVisible: false,
68 model: { 87 model: {
69 pageIndex: 1, 88 pageIndex: 1,
70 - pageSize: 20, 89 + pageSize: 50,
71 sort: '', 90 sort: '',
72 sortOrder: '', 91 sortOrder: '',
73 keyword: '', 92 keyword: '',
@@ -80,6 +99,10 @@ @@ -80,6 +99,10 @@
80 "TimeOfAppointmentEnd": '', 99 "TimeOfAppointmentEnd": '',
81 "ReservedPlaces": 0 100 "ReservedPlaces": 0
82 }, 101 },
  102 + RemoveModel: {
  103 + "TimeOfAppointmentStart": "2022-02-1",
  104 + "TimeOfAppointmentEnd": "2022-02-5"
  105 + },
83 // 修改预约时间 106 // 修改预约时间
84 updform: { 107 updform: {
85 "id": 0, 108 "id": 0,
@@ -103,7 +126,7 @@ @@ -103,7 +126,7 @@
103 message: '请选择预约日期', 126 message: '请选择预约日期',
104 trigger: 'change' 127 trigger: 'change'
105 }], 128 }],
106 - 129 +
107 }, 130 },
108 ruleform: { 131 ruleform: {
109 ReservedPlaces: [{ 132 ReservedPlaces: [{
@@ -149,10 +172,26 @@ @@ -149,10 +172,26 @@
149 } 172 }
150 }, 173 },
151 methods: { 174 methods: {
  175 + // 移除指定时间段的时间
  176 + RemoveYuYue() {
  177 + this.dialogVisibleR = true
  178 + },
  179 + // 提交还原数据
  180 + SubmitRemove(){
  181 + RemoveDateSection(this.RemoveModel).then(res => {
  182 + if (res.data.code == 200) {
  183 + this.$message.success('操作成功')
  184 + this.dialogVisibleR = false
  185 + this.ShowYuYue()
  186 + } else {
  187 + this.$message.error('操作失败');
  188 + }
  189 + })
  190 + },
152 // 提交新增预约时间 191 // 提交新增预约时间
153 SubmitAdd() { 192 SubmitAdd() {
154 - console.log('时间',this.form.TimeOfAppointmentStart)  
155 - console.log('form',this.form) 193 + console.log('时间', this.form.TimeOfAppointmentStart)
  194 + console.log('form', this.form)
156 this.$refs.form.validate((valid) => { 195 this.$refs.form.validate((valid) => {
157 if (valid) { 196 if (valid) {
158 SettingReservation(this.form).then(res => { 197 SettingReservation(this.form).then(res => {
src/views/system/missionNum.vue
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
39 import { 39 import {
40 UpdManage, 40 UpdManage,
41 UpdMisser, 41 UpdMisser,
42 - UpdateNum, 42 + UpdateNumS,
43 GetModelNum, 43 GetModelNum,
44 } from '../../api/user.js' 44 } from '../../api/user.js'
45 export default { 45 export default {
@@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
78 }, 78 },
79 // 修改经理专员固定单量 79 // 修改经理专员固定单量
80 UpdNums() { 80 UpdNums() {
81 - UpdateNum(this.modelnum).then(res => { 81 + UpdateNumS(this.modelnum).then(res => {
82 if (res.data.code == 200) { 82 if (res.data.code == 200) {
83 this.$message.success('修改单量成功') 83 this.$message.success('修改单量成功')
84 } else { 84 } else {
src/views/system/robot.vue
@@ -17,9 +17,9 @@ @@ -17,9 +17,9 @@
17 {{scope.row.id}} 17 {{scope.row.id}}
18 </template> 18 </template>
19 </el-table-column> 19 </el-table-column>
20 - <el-table-column prop="userName" label="用户姓名"> 20 + <el-table-column prop="full_name" label="贵姓">
21 <template slot-scope="scope"> 21 <template slot-scope="scope">
22 - {{scope.row.userName}} 22 + {{scope.row.full_name}}
23 </template> 23 </template>
24 </el-table-column> 24 </el-table-column>
25 25
@@ -51,14 +51,13 @@ @@ -51,14 +51,13 @@
51 </template> 51 </template>
52 </el-table-column> 52 </el-table-column>
53 </el-table> 53 </el-table>
54 - <el-pagination background layout="prev, pager, next" :total="TotalCount" @current-page="Pages" 54 + <el-pagination background layout="prev, pager, next" :total="TotalCount" @current-change="Pages"
55 style="text-align: right;margin-top: 10px;"> 55 style="text-align: right;margin-top: 10px;">
56 </el-pagination> 56 </el-pagination>
57 <el-dialog title="提示" :visible.sync="dialogVisible" width="30%"> 57 <el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
58 -  
59 <el-form ref="form" :model="form" label-width="80px" :rules="rules"> 58 <el-form ref="form" :model="form" label-width="80px" :rules="rules">
60 - <el-form-item label="姓名" prop="userName">  
61 - <el-input v-model="form.userName" placeholder="请输入姓名"></el-input> 59 + <el-form-item label="贵姓" prop="full_name">
  60 + <el-input v-model="form.full_name" placeholder="请输入贵姓"></el-input>
62 </el-form-item> 61 </el-form-item>
63 <el-form-item label="电话号码" prop="phone"> 62 <el-form-item label="电话号码" prop="phone">
64 <el-input v-model="form.phone" placeholder="请输入电话号码"></el-input> 63 <el-input v-model="form.phone" placeholder="请输入电话号码"></el-input>
@@ -95,9 +94,9 @@ @@ -95,9 +94,9 @@
95 return { 94 return {
96 dialogVisible: false, 95 dialogVisible: false,
97 rules: { 96 rules: {
98 - userName: [{ 97 + full_name: [{
99 required: true, 98 required: true,
100 - message: '请输入用户名', 99 + message: '请输入贵姓',
101 trigger: 'change' 100 trigger: 'change'
102 }, ], 101 }, ],
103 phone: [{ 102 phone: [{
@@ -128,6 +127,7 @@ @@ -128,6 +127,7 @@
128 }, 127 },
129 TotalCount: 0, 128 TotalCount: 0,
130 form: { 129 form: {
  130 + "full_name":'',
131 "id": 0, 131 "id": 0,
132 "userName": "", 132 "userName": "",
133 "phone": "", 133 "phone": "",
@@ -211,12 +211,14 @@ @@ -211,12 +211,14 @@
211 if (obj == null) { 211 if (obj == null) {
212 // 新增 212 // 新增
213 this.form.id = 0 213 this.form.id = 0
  214 + this.form.full_name=''
214 this.form.userName = '' 215 this.form.userName = ''
215 this.form.phone = '' 216 this.form.phone = ''
216 this.form.carModel ='' 217 this.form.carModel =''
217 } else { 218 } else {
218 // 修改 219 // 修改
219 this.form.id = obj.id 220 this.form.id = obj.id
  221 + this.form.full_name=obj.full_name
220 this.form.userName = obj.userName 222 this.form.userName = obj.userName
221 this.form.phone = obj.phone 223 this.form.phone = obj.phone
222 this.form.carModel =obj.carModel 224 this.form.carModel =obj.carModel
src/views/system/updpassword.vue
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 this.model.oldpassword='' 53 this.model.oldpassword=''
54 this.model.newpassword='' 54 this.model.newpassword=''
55 removeToken() 55 removeToken()
56 - removeToken() 56 + removeUser()
57 localStorage.removeItem('userRole') 57 localStorage.removeItem('userRole')
58 setTimeout(()=>{ 58 setTimeout(()=>{
59 this.$router.push({ 59 this.$router.push({
src/views/user/index.vue
1 <template> 1 <template>
2 - <div id="app" class="app-container"> 2 + <div id="app" class="app-container" style="margin: 10px;">
  3 + <el-form :inline="true" :model="parameter" class="demo-form-inline">
  4 + <el-form-item label="用户ID">
  5 + <el-input v-model="parameter.UserId" placeholder="用户ID"></el-input>
  6 + </el-form-item>
  7 + <el-form-item label="手机号">
  8 + <!-- <el-select v-model="formInline.region" placeholder="活动区域">
  9 + <el-option label="区域一" value="shanghai"></el-option>
  10 + <el-option label="区域二" value="beijing"></el-option>
  11 + </el-select> -->
  12 + <el-input v-model="parameter.Phone" placeholder="手机号"></el-input>
  13 + </el-form-item>
  14 + <el-form-item>
  15 + <el-button type="primary" @click="SubmitUser">查询</el-button>
  16 + </el-form-item>
  17 + </el-form>
3 <el-table style="margin-top: 5px;" v-loading="listLoading" :data="userlist" element-loading-text="Loading" 18 <el-table style="margin-top: 5px;" v-loading="listLoading" :data="userlist" element-loading-text="Loading"
4 border fit highlight-current-row> 19 border fit highlight-current-row>
  20 + <el-table-column label="上线" align="center">
  21 + <template slot-scope="scope">
  22 + {{scope.row.ParentUserId}}
  23 + </template>
  24 + </el-table-column>
  25 + <el-table-column label="微信头像" width="120" align="center">
  26 + <template slot-scope="scope">
  27 + <img :src="scope.row.beijintupian" style="width: 50px;height: 50px;" />
  28 + </template>
  29 + </el-table-column>
5 <el-table-column label="用户ID" width="120" align="center"> 30 <el-table-column label="用户ID" width="120" align="center">
6 <template slot-scope="scope"> 31 <template slot-scope="scope">
7 {{scope.row.id}} 32 {{scope.row.id}}
8 </template> 33 </template>
9 </el-table-column> 34 </el-table-column>
10 - <el-table-column label="用户微信名" align="center" > 35 + <el-table-column label="用户微信名" align="center">
11 <template slot-scope="scope"> 36 <template slot-scope="scope">
12 <span>{{ scope.row.username }}</span> 37 <span>{{ scope.row.username }}</span>
13 </template> 38 </template>
14 </el-table-column> 39 </el-table-column>
15 - <el-table-column label="别名" align="center" v-if="false"> 40 + <el-table-column label="称呼" align="center">
16 <template slot-scope="scope"> 41 <template slot-scope="scope">
17 <span>{{ scope.row.full_name }}</span> 42 <span>{{ scope.row.full_name }}</span>
18 </template> 43 </template>
19 </el-table-column> 44 </el-table-column>
20 - <el-table-column label="用户电话" align="center"> 45 + <el-table-column label="手机号码" align="center">
21 <template slot-scope="scope"> 46 <template slot-scope="scope">
22 <span>{{ scope.row.phone }}</span> 47 <span>{{ scope.row.phone }}</span>
23 </template> 48 </template>
24 </el-table-column> 49 </el-table-column>
25 - <el-table-column label="备用电话" align="center"> 50 + <el-table-column label="备用手机" align="center">
26 <template slot-scope="scope"> 51 <template slot-scope="scope">
27 <span>{{ scope.row.updphone }}</span> 52 <span>{{ scope.row.updphone }}</span>
28 </template> 53 </template>
@@ -32,6 +57,49 @@ @@ -32,6 +57,49 @@
32 <span>{{ scope.row.address }}</span> 57 <span>{{ scope.row.address }}</span>
33 </template> 58 </template>
34 </el-table-column> 59 </el-table-column>
  60 +
  61 +
  62 + <el-table-column label="车型" align="center">
  63 + <template slot-scope="scope">
  64 + <span>{{ scope.row.CarModel }}</span>
  65 + </template>
  66 + </el-table-column>
  67 + <el-table-column label="颜色" align="center">
  68 + <template slot-scope="scope">
  69 + <span>{{ scope.row.CarColour }}</span>
  70 + </template>
  71 + </el-table-column>
  72 + <el-table-column label="划痕" align="center">
  73 + <template slot-scope="scope">
  74 + <span>{{ scope.row.Scratch }}</span>
  75 + </template>
  76 + </el-table-column>
  77 + <el-table-column label="腐蚀" align="center">
  78 + <template slot-scope="scope">
  79 + <span>{{ scope.row.Corrosion}}</span>
  80 + </template>
  81 + </el-table-column>
  82 + <el-table-column label="破损" align="center">
  83 + <template slot-scope="scope">
  84 + <span>{{ scope.row.BeDamaged }}</span>
  85 + </template>
  86 + </el-table-column>
  87 + <el-table-column label="飞漆" align="center">
  88 + <template slot-scope="scope">
  89 + <span>{{ scope.row.FlyingPaint }}</span>
  90 + </template>
  91 + </el-table-column>
  92 +
  93 + <el-table-column label="余额" align="center" v-if="false">
  94 + <template slot-scope="scope">
  95 + <span>¥{{ scope.row.balance/100 }}</span>
  96 + </template>
  97 + </el-table-column>
  98 + <el-table-column label="已完成单数" align="center" v-if="false">
  99 + <template slot-scope="scope">
  100 + <span>{{scope.row.nowNum }}</span>
  101 + </template>
  102 + </el-table-column>
35 <el-table-column label="性别" align="center" v-if="false"> 103 <el-table-column label="性别" align="center" v-if="false">
36 <template slot-scope="scope"> 104 <template slot-scope="scope">
37 <el-tag :type="scope.row.sex==0?'success':'warn'"> 105 <el-tag :type="scope.row.sex==0?'success':'warn'">
@@ -44,13 +112,11 @@ @@ -44,13 +112,11 @@
44 <span>{{ scope.row.birthday }}</span> 112 <span>{{ scope.row.birthday }}</span>
45 </template> 113 </template>
46 </el-table-column> 114 </el-table-column>
47 - <!-- <el-table-column label="用户角色" align="center"> 115 + <el-table-column label="注册时间" align="center" v-if="false">
48 <template slot-scope="scope"> 116 <template slot-scope="scope">
49 - <el-tag :key="scope.row.status" type="warning" effect="dark">  
50 - {{ scope.row.remark }}  
51 - </el-tag> 117 + {{ scope.row.add_time }}
52 </template> 118 </template>
53 - </el-table-column> --> 119 + </el-table-column>
54 <el-table-column label="用户角色" align="center"> 120 <el-table-column label="用户角色" align="center">
55 <template slot-scope="scope"> 121 <template slot-scope="scope">
56 <el-tag :key="scope.row.type" type="warning" effect="dark"> 122 <el-tag :key="scope.row.type" type="warning" effect="dark">
@@ -78,6 +144,10 @@ @@ -78,6 +144,10 @@
78 </span> 144 </span>
79 <template #dropdown> 145 <template #dropdown>
80 <el-dropdown-menu> 146 <el-dropdown-menu>
  147 + <el-dropdown-item command="h">查看客户
  148 + </el-dropdown-item>
  149 + <el-dropdown-item command="i">查看专员
  150 + </el-dropdown-item>
81 <el-dropdown-item command="a">升级成客户经理 151 <el-dropdown-item command="a">升级成客户经理
82 </el-dropdown-item> 152 </el-dropdown-item>
83 <el-dropdown-item command="e">升级成推广专员 153 <el-dropdown-item command="e">升级成推广专员
@@ -93,9 +163,138 @@ @@ -93,9 +163,138 @@
93 </template> 163 </template>
94 </el-table-column> 164 </el-table-column>
95 </el-table> 165 </el-table>
96 - <el-pagination background layout="prev, pager, next" :total="total" @current-page="Pages" 166 + <el-pagination background layout="prev, pager, next" :total="parameter.TotalCount" @current-change="Pages"
97 style="text-align: right;margin-top: 10px;"> 167 style="text-align: right;margin-top: 10px;">
98 </el-pagination> 168 </el-pagination>
  169 + <el-dialog title="查看客户" :visible.sync="dialogVisibleSub" width="100%">
  170 + <el-table :data="SubList" element-loading-text="Loading" border fit highlight-current-row>
  171 + <el-table-column label="用户ID" width="120" align="center">
  172 + <template slot-scope="scope">
  173 + {{scope.row.id}}
  174 + </template>
  175 + </el-table-column>
  176 + <el-table-column label="用户微信名" align="center">
  177 + <template slot-scope="scope">
  178 + <span>{{ scope.row.username }}</span>
  179 + </template>
  180 + </el-table-column>
  181 + <el-table-column label="别名" align="center" v-if="false">
  182 + <template slot-scope="scope">
  183 + <span>{{ scope.row.full_name }}</span>
  184 + </template>
  185 + </el-table-column>
  186 + <el-table-column label="用户电话" align="center">
  187 + <template slot-scope="scope">
  188 + <span>{{ scope.row.phone }}</span>
  189 + </template>
  190 + </el-table-column>
  191 + <el-table-column label="备用电话" align="center">
  192 + <template slot-scope="scope">
  193 + <span>{{ scope.row.updphone }}</span>
  194 + </template>
  195 + </el-table-column>
  196 + <el-table-column label="地址" align="center">
  197 + <template slot-scope="scope">
  198 + <span>{{ scope.row.address }}</span>
  199 + </template>
  200 + </el-table-column>
  201 + <el-table-column label="余额" align="center">
  202 + <template slot-scope="scope">
  203 + <span>¥{{ scope.row.balance/100 }}</span>
  204 + </template>
  205 + </el-table-column>
  206 + <el-table-column label="已完成单数" align="center">
  207 + <template slot-scope="scope">
  208 + <span>{{scope.row.nowNum }}</span>
  209 + </template>
  210 + </el-table-column>
  211 + <el-table-column label="性别" align="center" v-if="false">
  212 + <template slot-scope="scope">
  213 + <el-tag :type="scope.row.sex==0?'success':'warn'">
  214 + <span>{{ scope.row.sex==0?'男':'女'}}</span>
  215 + </el-tag>
  216 + </template>
  217 + </el-table-column>
  218 + <el-table-column label="生日" align="center" v-if="false">
  219 + <template slot-scope="scope">
  220 + <span>{{ scope.row.birthday }}</span>
  221 + </template>
  222 + </el-table-column>
  223 + </el-table>
  224 + <span slot="footer" class="dialog-footer">
  225 + <el-button @click="dialogVisibleSub = false">取 消</el-button>
  226 + <el-button type="primary" @click="dialogVisibleSub = false">确 定</el-button>
  227 + </span>
  228 + <el-pagination background layout="prev, pager, next" :total="SubModel.TotalCount" @current-change="PageSub"
  229 + style="text-align: center;margin-top: 10px;">
  230 + </el-pagination>
  231 + </el-dialog>
  232 +
  233 + <el-dialog title="查看专员" :visible.sync="dialogVisibleCom" width="100%">
  234 + <el-table :data="CommiserList" element-loading-text="Loading" border fit highlight-current-row>
  235 + <el-table-column label="用户ID" width="120" align="center">
  236 + <template slot-scope="scope">
  237 + {{scope.row.id}}
  238 + </template>
  239 + </el-table-column>
  240 + <el-table-column label="用户微信名" align="center">
  241 + <template slot-scope="scope">
  242 + <span>{{ scope.row.username }}</span>
  243 + </template>
  244 + </el-table-column>
  245 + <el-table-column label="别名" align="center" v-if="false">
  246 + <template slot-scope="scope">
  247 + <span>{{ scope.row.full_name }}</span>
  248 + </template>
  249 + </el-table-column>
  250 + <el-table-column label="用户电话" align="center">
  251 + <template slot-scope="scope">
  252 + <span>{{ scope.row.phone }}</span>
  253 + </template>
  254 + </el-table-column>
  255 + <el-table-column label="备用电话" align="center">
  256 + <template slot-scope="scope">
  257 + <span>{{ scope.row.updphone }}</span>
  258 + </template>
  259 + </el-table-column>
  260 + <el-table-column label="地址" align="center">
  261 + <template slot-scope="scope">
  262 + <span>{{ scope.row.address }}</span>
  263 + </template>
  264 + </el-table-column>
  265 + <el-table-column label="余额" align="center" >
  266 + <template slot-scope="scope">
  267 + <span>¥{{ scope.row.balance/100 }}</span>
  268 + </template>
  269 + </el-table-column>
  270 + <el-table-column label="已完成单数" align="center" >
  271 + <template slot-scope="scope">
  272 + <span>{{scope.row.nowNum }}</span>
  273 + </template>
  274 + </el-table-column>
  275 + <el-table-column label="性别" align="center" v-if="false">
  276 + <template slot-scope="scope">
  277 + <el-tag :type="scope.row.sex==0?'success':'warn'">
  278 + <span>{{ scope.row.sex==0?'男':'女'}}</span>
  279 + </el-tag>
  280 + </template>
  281 + </el-table-column>
  282 + <el-table-column label="生日" align="center" v-if="false">
  283 + <template slot-scope="scope">
  284 + <span>{{ scope.row.birthday }}</span>
  285 + </template>
  286 + </el-table-column>
  287 + </el-table>
  288 + <span slot="footer" class="dialog-footer">
  289 + <el-button @click="dialogVisibleCom = false">取 消</el-button>
  290 + <el-button type="primary" @click="dialogVisibleCom = false">确 定</el-button>
  291 + </span>
  292 + <el-pagination background layout="prev, pager, next" :total="ComTotalCount"
  293 + style="text-align: center;margin-top: 10px;">
  294 + </el-pagination>
  295 + </el-dialog>
  296 +
  297 +
99 <el-dialog title="编辑" :visible.sync="dialogVisible" width="50%"> 298 <el-dialog title="编辑" :visible.sync="dialogVisible" width="50%">
100 299
101 <el-form ref="form" :model="form" label-width="80px" :rules="rules"> 300 <el-form ref="form" :model="form" label-width="80px" :rules="rules">
@@ -192,7 +391,7 @@ @@ -192,7 +391,7 @@
192 </template> 391 </template>
193 </el-table-column> 392 </el-table-column>
194 </el-table> 393 </el-table>
195 - <el-pagination background layout="prev, pager, next" :total="CarModel.TotalCount" @current-page="PagesCar" 394 + <el-pagination background layout="prev, pager, next" :total="CarModel.TotalCount" @current-change="PagesCar"
196 style="text-align: right;margin-top: 10px;"> 395 style="text-align: right;margin-top: 10px;">
197 </el-pagination> 396 </el-pagination>
198 <span slot="footer" class="dialog-footer"> 397 <span slot="footer" class="dialog-footer">
@@ -200,16 +399,99 @@ @@ -200,16 +399,99 @@
200 <el-button type="primary" @click="dialogVisibleCar = false">确 定</el-button> 399 <el-button type="primary" @click="dialogVisibleCar = false">确 定</el-button>
201 </span> 400 </span>
202 </el-dialog> 401 </el-dialog>
  402 +
  403 + <el-dialog title="上级ID编号" :visible.sync="dialogVisibleT" width="90%">
  404 + <el-form :inline="true">
  405 + <el-form-item label="关键字">
  406 + <el-input v-model="ManagerModel.KeyWord" placeholder="关键字查询"></el-input>
  407 + </el-form-item>
  408 + <el-form-item>
  409 + <el-button type="success" @click="SubmitManager">提交</el-button>
  410 + </el-form-item>
  411 + </el-form>
  412 + <!-- <el-input v-model="updateType.ParentUserId" placeholder="请输入上级ID"></el-input> -->
  413 + <el-table :data="ManagerList" element-loading-text="Loading" border fit highlight-current-row
  414 + ref="multipleTable" @row-click="singleElection">
  415 + <el-table-column label="" width="65">
  416 + <template slot-scope="scope">
  417 + <el-radio class="radio" :label="scope.$index" v-model="radiodata">&nbsp;</el-radio>
  418 + </template>
  419 + </el-table-column>
  420 + <el-table-column label="用户ID" width="120" align="center">
  421 + <template slot-scope="scope">
  422 + {{scope.row.id}}
  423 + </template>
  424 + </el-table-column>
  425 + <el-table-column label="用户微信名" align="center">
  426 + <template slot-scope="scope">
  427 + <span>{{ scope.row.username }}</span>
  428 + </template>
  429 + </el-table-column>
  430 + <el-table-column label="别名" align="center" v-if="false">
  431 + <template slot-scope="scope">
  432 + <span>{{ scope.row.full_name }}</span>
  433 + </template>
  434 + </el-table-column>
  435 + <el-table-column label="用户电话" align="center">
  436 + <template slot-scope="scope">
  437 + <span>{{ scope.row.phone }}</span>
  438 + </template>
  439 + </el-table-column>
  440 + <el-table-column label="备用电话" align="center">
  441 + <template slot-scope="scope">
  442 + <span>{{ scope.row.updphone }}</span>
  443 + </template>
  444 + </el-table-column>
  445 + <el-table-column label="地址" align="center">
  446 + <template slot-scope="scope">
  447 + <span>{{ scope.row.address }}</span>
  448 + </template>
  449 + </el-table-column>
  450 + <el-table-column label="余额" align="center">
  451 + <template slot-scope="scope">
  452 + <span>¥{{ scope.row.balance/100 }}</span>
  453 + </template>
  454 + </el-table-column>
  455 + <el-table-column label="已完成单数" align="center">
  456 + <template slot-scope="scope">
  457 + <span>{{scope.row.nowNum }}</span>
  458 + </template>
  459 + </el-table-column>
  460 + <el-table-column label="性别" align="center" v-if="false">
  461 + <template slot-scope="scope">
  462 + <el-tag :type="scope.row.sex==0?'success':'warn'">
  463 + <span>{{ scope.row.sex==0?'男':'女'}}</span>
  464 + </el-tag>
  465 + </template>
  466 + </el-table-column>
  467 + <el-table-column label="生日" align="center" v-if="false">
  468 + <template slot-scope="scope">
  469 + <span>{{ scope.row.birthday }}</span>
  470 + </template>
  471 + </el-table-column>
  472 + </el-table>
  473 + <el-pagination background layout="prev, pager, next" :total="ManagerModel.TotalCount"
  474 + @current-change="PagesManager" style="text-align: right;margin-top: 10px;">
  475 + </el-pagination>
  476 + <span slot="footer" class="dialog-footer">
  477 + <el-button @click="dialogVisibleT = false">取 消</el-button>
  478 + <el-button type="primary" @click="UpdateUserType">确 定</el-button>
  479 + </span>
  480 + </el-dialog>
203 </div> 481 </div>
204 </template> 482 </template>
205 <script> 483 <script>
206 import { 484 import {
  485 + GetUserByCar,
207 GetUserList, 486 GetUserList,
208 UpdateUserType, 487 UpdateUserType,
209 DeleteUser, 488 DeleteUser,
210 Save, 489 Save,
211 Blacklist, 490 Blacklist,
212 - NoBlacklist 491 + NoBlacklist,
  492 + GetUserListByInviteeUserId,
  493 + GetCommissionerByManage,
  494 + GetUserListBytManager
213 } from '@/api/user' 495 } from '@/api/user'
214 import { 496 import {
215 GetVehicleListByUser, 497 GetVehicleListByUser,
@@ -220,9 +502,13 @@ @@ -220,9 +502,13 @@
220 data() { 502 data() {
221 return { 503 return {
222 tableData: [], 504 tableData: [],
  505 + radiodata: '',
  506 + dialogVisibleCom: false,
  507 + dialogVisibleSub: false,
  508 + dialogVisibleT: false,
223 dialogVisible: false, 509 dialogVisible: false,
224 dialogVisibleCar: false, 510 dialogVisibleCar: false,
225 - dialogVisiblecommissioner:false, 511 + dialogVisiblecommissioner: false,
226 rules: { 512 rules: {
227 username: [{ 513 username: [{
228 required: true, 514 required: true,
@@ -266,16 +552,34 @@ @@ -266,16 +552,34 @@
266 }], 552 }],
267 553
268 }, 554 },
  555 + //经理下面的专员
  556 + CommiserList: [],
  557 + // 条数
  558 + ComTotalCount: 0,
269 userlist: [], 559 userlist: [],
  560 + // 该用户下级信息
  561 + SubList: [],
270 listLoading: true, 562 listLoading: true,
271 parameter: { 563 parameter: {
272 - pageIndex: 1,  
273 - pageSize: 10,  
274 - sort: "id",  
275 - sortOrder: 2,  
276 - keyword: "",  
277 - status: 1 564 + "UserId": 0,
  565 + "Phone": "",
  566 + "KeyWord": "",
  567 + "TotalCount": 0,
  568 + "PageIndex": 1,
  569 + "PageSize": 20,
  570 + "Sort": [{
  571 + "Field": "id",
  572 + "Type": 0
  573 + }]
278 }, 574 },
  575 + // {
  576 + // pageIndex: 1,
  577 + // pageSize: 10,
  578 + // sort: "id",
  579 + // sortOrder: 2,
  580 + // keyword: "",
  581 + // status: 1
  582 + // },
279 total: 0, 583 total: 0,
280 updateType: { 584 updateType: {
281 UserId: 0, 585 UserId: 0,
@@ -320,7 +624,29 @@ @@ -320,7 +624,29 @@
320 CarDefaultModel: { 624 CarDefaultModel: {
321 "id": 0, 625 "id": 0,
322 "UserId": 0 626 "UserId": 0
323 - } 627 + },
  628 + SubModel: {
  629 + "ParentUserId": 0,
  630 + "KeyWord": "",
  631 + "TotalCount": 0,
  632 + "PageIndex": 1,
  633 + "PageSize": 10,
  634 + "Sort": [{
  635 + "Field": "",
  636 + "Type": 0
  637 + }]
  638 + },
  639 + ManagerModel: {
  640 + "KeyWord": "",
  641 + "TotalCount": 0,
  642 + "PageIndex": 1,
  643 + "PageSize": 10,
  644 + "Sort": [{
  645 + "Field": "id",
  646 + "Type": 0
  647 + }]
  648 + },
  649 + ManagerList: []
324 } 650 }
325 }, 651 },
326 652
@@ -329,24 +655,37 @@ @@ -329,24 +655,37 @@
329 this.GetUserListHeadler(); 655 this.GetUserListHeadler();
330 }, 656 },
331 methods: { 657 methods: {
  658 + PagesManager(e) {
  659 + this.ManagerModel.PageIndex = e
  660 + this.ShowManager()
  661 + },
332 Pages(e) { 662 Pages(e) {
333 this.parameter.pageIndex = e 663 this.parameter.pageIndex = e
334 this.GetUserListHeadler() 664 this.GetUserListHeadler()
335 }, 665 },
  666 + PageSub(e) {
  667 + this.SubModel.PageIndex = e
  668 + this.ShowSub()
  669 + },
336 PagesCar(e) { 670 PagesCar(e) {
337 this.CarModel.PageIndex = e 671 this.CarModel.PageIndex = e
338 this.ShowCar() 672 this.ShowCar()
339 }, 673 },
340 GetUserListHeadler() { 674 GetUserListHeadler() {
341 - GetUserList(this.parameter).then(res => {  
342 - res.data.data.forEach((item, index) => { 675 + GetUserByCar(this.parameter).then(res => {
  676 + res.data.data.rows.forEach((item, index) => {
343 item.birthday = utils.formatTime(item.birthday, "yyyy-MM-dd") 677 item.birthday = utils.formatTime(item.birthday, "yyyy-MM-dd")
344 }) 678 })
345 - this.userlist = res.data.data 679 + this.userlist = res.data.data.rows
  680 + this.parameter.TotalCount=res.data.data.total
346 console.log('经理', this.userlist) 681 console.log('经理', this.userlist)
347 this.listLoading = false; 682 this.listLoading = false;
348 }); 683 });
349 }, 684 },
  685 + // 提交查询
  686 + SubmitUser(){
  687 + this.GetUserListHeadler()
  688 + },
350 handleCommand(value, val, item) { 689 handleCommand(value, val, item) {
351 if (value == "a") { 690 if (value == "a") {
352 this.UpdateUserTypeHeadler(val); 691 this.UpdateUserTypeHeadler(val);
@@ -360,71 +699,130 @@ @@ -360,71 +699,130 @@
360 if (value == "d") { 699 if (value == "d") {
361 this.ShowCar(val) 700 this.ShowCar(val)
362 } 701 }
363 - if(value =="e"){  
364 - this.UpdateUserType(val) 702 + if (value == "e") {
  703 + this.ShowUpgrade(val)
  704 + // this.UpdateUserType(val)
  705 + // this.dialogVisibleT=true
365 } 706 }
366 - if(value=='f'){ 707 + if (value == 'f') {
367 // 拉黑 708 // 拉黑
368 this.BlacklistSubmit(val) 709 this.BlacklistSubmit(val)
369 } 710 }
370 - if(value=='g'){ 711 + if (value == 'g') {
371 // 取消拉黑 712 // 取消拉黑
372 this.NoBlacklistSubmit(val) 713 this.NoBlacklistSubmit(val)
373 } 714 }
  715 + if (value == 'h') {
  716 + // 显示下级信息
  717 + this.ShowSub(val)
  718 + }
  719 + if (value == 'i') {
  720 + // 显示经理下面的专员
  721 + this.ShowCommissioner(val)
  722 + }
  723 + },
  724 + // 显示经理下面的专员
  725 + ShowCommissioner(val) {
  726 + this.dialogVisibleCom = true
  727 + let json = {
  728 + UserId: val
  729 + }
  730 + GetCommissionerByManage(json).then(res => {
  731 + console.log('数据专员', res)
  732 + this.CommiserList = res.data.data
  733 + this.ComTotalCount = res.data.data.length
  734 + })
  735 + },
  736 + // 查询该用户下级数据
  737 + ShowSub(val) {
  738 + this.dialogVisibleSub = true
  739 + console.log('val数据', val)
  740 + this.SubModel.ParentUserId = val
  741 + GetUserListByInviteeUserId(this.SubModel).then(res => {
  742 + console.log('查询数据', res)
  743 + this.SubModel.TotalCount = res.data.data.total
  744 + this.SubList = res.data.data.rows
  745 + console.log('查询下级数据', this.SubList)
  746 + })
374 }, 747 },
375 - BlacklistSubmit(id){ 748 + BlacklistSubmit(id) {
376 // 拉黑 749 // 拉黑
377 - Blacklist(id).then(res=>{  
378 - if(res.data.code==200){ 750 + Blacklist(id).then(res => {
  751 + if (res.data.code == 200) {
379 this.$message.success('拉黑成功') 752 this.$message.success('拉黑成功')
380 this.GetUserListHeadler() 753 this.GetUserListHeadler()
381 - }else{ 754 + } else {
382 this.$message.error('拉黑失败') 755 this.$message.error('拉黑失败')
383 } 756 }
384 }) 757 })
385 }, 758 },
386 - NoBlacklistSubmit(id){ 759 + NoBlacklistSubmit(id) {
387 // 取消拉黑 760 // 取消拉黑
388 - NoBlacklist(id).then(res=>{  
389 - if(res.data.code==200){ 761 + NoBlacklist(id).then(res => {
  762 + if (res.data.code == 200) {
390 this.$message.success('取消拉黑成功') 763 this.$message.success('取消拉黑成功')
391 this.GetUserListHeadler() 764 this.GetUserListHeadler()
392 - }else{ 765 + } else {
393 this.$message.error('取消拉黑失败') 766 this.$message.error('取消拉黑失败')
394 } 767 }
395 }) 768 })
396 }, 769 },
397 - UpdateUserType(UserId){  
398 - // 修改成销售专员  
399 - this.updateType = {  
400 - UserId: UserId,  
401 - UserType: 3,  
402 - ParentUserId: 0  
403 - };  
404 - this.$confirm('确定把该用户升级成推广专员?', '消息', {  
405 - confirmButtonText: '确认',  
406 - cancelButtonText: '取消',  
407 - callback: (action) => {  
408 - if (action == "confirm") {  
409 - UpdateUserType(this.updateType).then(res => {  
410 - if (res.data.code == 200) {  
411 - this.$confirm('该用户已升级成推广专员', '消息', {  
412 - confirmButtonText: '确认',  
413 - cancelButtonText: '取消',  
414 - callback: (action) => {  
415 - this.GetUserListHeadler();  
416 - },  
417 - })  
418 - } else {  
419 - this.$confirm('升级成推广专员失败', '消息', {  
420 - confirmButtonText: '确认',  
421 - cancelButtonText: '取消'  
422 - })  
423 - }  
424 - });  
425 - }  
426 - },  
427 - }) 770 + // 查询销售经理 (升级推广专员)
  771 + ShowManager() {
  772 + GetUserListBytManager(this.ManagerModel).then(res => {
  773 + console.log('销售经理', res)
  774 + this.ManagerModel.TotalCount = res.data.data.total
  775 + this.ManagerList = res.data.data.rows
  776 + })
  777 + },
  778 + SubmitManager() {
  779 + this.ShowManager()
  780 + },
  781 + // 选择推广经理
  782 + singleElection(row) {
  783 + console.log('数据啊啊啊row', row)
  784 + this.updateType.ParentUserId = row.id
  785 + },
  786 + // 升级推广专员打开页面传参
  787 + ShowUpgrade(val) {
  788 + this.dialogVisibleT = true
  789 + this.ShowManager()
  790 + // 升级成推广专员
  791 + this.updateType.UserId = val
  792 + this.updateType.UserType = 3
  793 + console.log('ID', this.updateType)
  794 + },
  795 + UpdateUserType() {
  796 + // 修改成推广专员
  797 + // this.updateType = {
  798 + // UserId: UserId,
  799 + // UserType: 3,
  800 + // ParentUserId: 0
  801 + // };
  802 + this.$confirm('确定把该用户升级成推广专员?', '消息', {
  803 + confirmButtonText: '确认',
  804 + cancelButtonText: '取消',
  805 + callback: (action) => {
  806 + if (action == "confirm") {
  807 + UpdateUserType(this.updateType).then(res => {
  808 + if (res.data.code == 200) {
  809 + this.$confirm('该用户已升级成推广专员', '消息', {
  810 + confirmButtonText: '确认',
  811 + cancelButtonText: '取消',
  812 + callback: (action) => {
  813 + this.GetUserListHeadler();
  814 + },
  815 + })
  816 + } else {
  817 + this.$confirm(res.data.message, '消息', {
  818 + confirmButtonText: '确认',
  819 + cancelButtonText: '取消'
  820 + })
  821 + }
  822 + });
  823 + }
  824 + },
  825 + })
428 }, 826 },
429 // 设为默认车辆 827 // 设为默认车辆
430 SetDefault(item) { 828 SetDefault(item) {
@@ -436,10 +834,10 @@ @@ -436,10 +834,10 @@
436 this.CarDefaultModel.UserId = this.CarModel.UserId 834 this.CarDefaultModel.UserId = this.CarModel.UserId
437 UpdateCarDefault(this.CarDefaultModel).then(res => { 835 UpdateCarDefault(this.CarDefaultModel).then(res => {
438 console.log('默认', res) 836 console.log('默认', res)
439 - if(res.data.code==200){ 837 + if (res.data.code == 200) {
440 this.$message.success('修改默认车辆成功') 838 this.$message.success('修改默认车辆成功')
441 this.ShowCar() 839 this.ShowCar()
442 - }else{ 840 + } else {
443 this.$message.error(res.data.message) 841 this.$message.error(res.data.message)
444 } 842 }
445 }) 843 })
@@ -540,7 +938,7 @@ @@ -540,7 +938,7 @@
540 }, 938 },
541 }) 939 })
542 } else { 940 } else {
543 - this.$confirm('升级成客户经理失败', '消息', { 941 + this.$confirm(res.data.message, '消息', {
544 confirmButtonText: '确认', 942 confirmButtonText: '确认',
545 cancelButtonText: '取消' 943 cancelButtonText: '取消'
546 }) 944 })
src/views/user/managerTable.vue
1 <template> 1 <template>
2 <div id="app" class="app-container"> 2 <div id="app" class="app-container">
3 <el-form :inline="true" :model="parameter" class="demo-form-inline"> 3 <el-form :inline="true" :model="parameter" class="demo-form-inline">
4 - <el-form-item label="关键字">  
5 - <el-input v-model="parameter.keyword" placeholder="关键字"></el-input> 4 + <el-form-item label="用户ID">
  5 + <el-input v-model="parameter.keyword" placeholder="用户ID"></el-input>
6 </el-form-item> 6 </el-form-item>
7 <el-form-item> 7 <el-form-item>
8 <el-button type="primary" @click="onSubmit">查询</el-button> 8 <el-button type="primary" @click="onSubmit">查询</el-button>
@@ -45,6 +45,16 @@ @@ -45,6 +45,16 @@
45 <span>{{ scope.row.address }}</span> 45 <span>{{ scope.row.address }}</span>
46 </template> 46 </template>
47 </el-table-column> 47 </el-table-column>
  48 + <el-table-column label="余额" align="center">
  49 + <template slot-scope="scope">
  50 + <span>¥{{ scope.row.balance/100 }}</span>
  51 + </template>
  52 + </el-table-column>
  53 + <el-table-column label="已完成单数" align="center">
  54 + <template slot-scope="scope">
  55 + <span>{{scope.row.nowNum }}</span>
  56 + </template>
  57 + </el-table-column>
48 <el-table-column label="性别" align="center" v-if="false"> 58 <el-table-column label="性别" align="center" v-if="false">
49 <template slot-scope="scope"> 59 <template slot-scope="scope">
50 <el-tag :type="scope.row.sex==0?'success':'warn'"> 60 <el-tag :type="scope.row.sex==0?'success':'warn'">