Commit dc36257ff892391a6ad32f151340ec0760e78496
1 parent
2d21111e
后端页面
Showing
25 changed files
with
1091 additions
and
264 deletions
src/api/Partner.js
| 1 | 1 | import request from '@/utils/request' |
| 2 | 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 | 12 | //根据ID查询合伙人信息 |
| 6 | 13 | export function GetPartnerById(data) { |
| 7 | 14 | return request({ | ... | ... |
src/api/ReservationSettings.js
| 1 | 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 | 12 | export function SettingReservation(params) { |
| 5 | 13 | return request({ | ... | ... |
src/api/RobotReservation.js
| ... | ... | @@ -45,4 +45,12 @@ export function CreateRobot(data){ |
| 45 | 45 | method:'post', |
| 46 | 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 | 57 | \ No newline at end of file | ... | ... |
src/api/incomeDetails.js
0 → 100644
src/api/user.js
| 1 | 1 | import request from '@/utils/request' |
| 2 | 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 | 62 | } |
| 39 | 63 | |
| 40 | 64 | |
| 41 | -// 最新修改固定单量 经理专员 | |
| 65 | +// 预约结算修改单量 | |
| 42 | 66 | export function UpdateNum(data){ |
| 43 | 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 | 77 | url:'/Num/UpdateNum', |
| 45 | 78 | method:'post', |
| 46 | 79 | data | ... | ... |
src/components/Breadcrumb/index.vue
| ... | ... | @@ -33,7 +33,7 @@ export default { |
| 33 | 33 | const first = matched[0] |
| 34 | 34 | |
| 35 | 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 | 39 | this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) |
| ... | ... | @@ -43,7 +43,7 @@ export default { |
| 43 | 43 | if (!name) { |
| 44 | 44 | return false |
| 45 | 45 | } |
| 46 | - return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase() | |
| 46 | + return name.trim().toLocaleLowerCase() === '首页'.toLocaleLowerCase() | |
| 47 | 47 | }, |
| 48 | 48 | pathCompile(path) { |
| 49 | 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 | 7 | <div class="right-menu"> |
| 8 | 8 | <el-dropdown class="avatar-container" trigger="click"> |
| 9 | 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 | 11 | <i class="el-icon-caret-bottom" /> |
| 12 | 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 | 15 | <el-dropdown-item> |
| 16 | 16 | Home |
| 17 | 17 | </el-dropdown-item> |
| 18 | 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 | 20 | <el-dropdown-item>Github</el-dropdown-item> |
| 21 | 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 | 23 | <el-dropdown-item>Docs</el-dropdown-item> |
| 24 | 24 | </a> |
| 25 | 25 | <el-dropdown-item divided @click.native="logout"> |
| 26 | - <span style="display:block;">Log Out</span> | |
| 26 | + <span style="display:block;">退出</span> | |
| 27 | 27 | </el-dropdown-item> |
| 28 | 28 | </el-dropdown-menu> |
| 29 | 29 | </el-dropdown> |
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | import { mapGetters } from 'vuex' |
| 36 | 36 | import Breadcrumb from '@/components/Breadcrumb' |
| 37 | 37 | import Hamburger from '@/components/Hamburger' |
| 38 | - | |
| 38 | +import {removeToken,removeUser} from '../../utils/auth.js' | |
| 39 | 39 | export default { |
| 40 | 40 | components: { |
| 41 | 41 | Breadcrumb, |
| ... | ... | @@ -52,7 +52,9 @@ export default { |
| 52 | 52 | this.$store.dispatch('app/toggleSideBar') |
| 53 | 53 | }, |
| 54 | 54 | async logout() { |
| 55 | - await this.$store.dispatch('user/logout') | |
| 55 | + // await this.$store.dispatch('user/logout') | |
| 56 | + removeToken() | |
| 57 | + removeUser() | |
| 56 | 58 | this.$router.push(`/login?redirect=${this.$route.fullPath}`) |
| 57 | 59 | } |
| 58 | 60 | } | ... | ... |
src/layout/components/Sidebar/Logo.vue
src/router/index.js
| ... | ... | @@ -99,24 +99,24 @@ export const constantRoutes = [{ |
| 99 | 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 | 122 | // appointment |
| ... | ... | @@ -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 | 153 | path: '/AdminManage', |
| 154 | 154 | component: Layout, |
| ... | ... | @@ -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 | 217 | // path: '/externalInfo', |
| ... | ... | @@ -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 | 245 | // record |
| 231 | 246 | { |
| ... | ... | @@ -352,15 +367,15 @@ export const constantRoutes = [{ |
| 352 | 367 | // } |
| 353 | 368 | // }, |
| 354 | 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 | 380 | path: 'missionNum', |
| 366 | 381 | name: 'missionNum', | ... | ... |
src/views/AdminManage/AdminManage.vue
| ... | ... | @@ -33,7 +33,7 @@ |
| 33 | 33 | </template> |
| 34 | 34 | </el-table-column> |
| 35 | 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 | 37 | style="text-align: right;margin-top: 10px;"> |
| 38 | 38 | </el-pagination> |
| 39 | 39 | </div> | ... | ... |
src/views/appointment/appointment.vue
| ... | ... | @@ -2,8 +2,8 @@ |
| 2 | 2 | <div class="container" style="margin:10px;"> |
| 3 | 3 | |
| 4 | 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 | 7 | </el-form-item> |
| 8 | 8 | <el-form-item label="开始时间"> |
| 9 | 9 | <el-date-picker v-model="model.startdate" type="date" placeholder="选择日期"> |
| ... | ... | @@ -55,6 +55,16 @@ |
| 55 | 55 | {{scope.row.UserPhone}} |
| 56 | 56 | </template> |
| 57 | 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 | 68 | <el-table-column prop="date" label="状态" width="100"> |
| 59 | 69 | <template slot-scope="scope"> |
| 60 | 70 | <el-tag type="success"> |
| ... | ... | @@ -122,9 +132,9 @@ |
| 122 | 132 | <el-button type="primary" @click="EidtRecord(scope.row)">编辑</el-button> |
| 123 | 133 | </template> |
| 124 | 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 | 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 | 138 | <el-button type="success" @click="Results(scope.row)" :disabled="scope.row.State==0?false:true"> |
| 129 | 139 | 预约结算</el-button> |
| 130 | 140 | </template> |
| ... | ... | @@ -134,7 +144,7 @@ |
| 134 | 144 | <el-button type="primary" @click="UpdateState(scope.row.id)">修改状态</el-button> |
| 135 | 145 | </template> |
| 136 | 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 | 148 | <template slot-scope="scope"> |
| 139 | 149 | <el-button type="success" @click="Results(scope.row)" :disabled="scope.row.State==0?false:true"> |
| 140 | 150 | 预约结算</el-button> |
| ... | ... | @@ -218,7 +228,11 @@ |
| 218 | 228 | import { |
| 219 | 229 | UpdnowNum, |
| 220 | 230 | SendPaymentAppointment, |
| 231 | + UpdVipNum | |
| 221 | 232 | } from '../../api/user.js' |
| 233 | + import { | |
| 234 | + UpdReservationStatus | |
| 235 | + } from '../../api/RobotReservation.js' | |
| 222 | 236 | import utils from '../../utils/utils.js' |
| 223 | 237 | import { |
| 224 | 238 | ReservationAreaList |
| ... | ... | @@ -226,7 +240,6 @@ |
| 226 | 240 | export default { |
| 227 | 241 | data() { |
| 228 | 242 | return { |
| 229 | - | |
| 230 | 243 | form: { |
| 231 | 244 | "id": 0, |
| 232 | 245 | "ReservationId": 0, |
| ... | ... | @@ -252,13 +265,14 @@ |
| 252 | 265 | ids: 0 |
| 253 | 266 | }, |
| 254 | 267 | model: { |
| 268 | + "UserId": 0, | |
| 255 | 269 | "State": '-1', |
| 256 | 270 | "startdate": "", |
| 257 | 271 | "enddate": "", |
| 258 | 272 | "KeyWord": "", |
| 259 | 273 | "TotalCount": 0, |
| 260 | 274 | "PageIndex": 1, |
| 261 | - "PageSize": 10, | |
| 275 | + "PageSize": 20, | |
| 262 | 276 | "Sort": [{ |
| 263 | 277 | "Field": "MakeTime", |
| 264 | 278 | "Type": 1 |
| ... | ... | @@ -272,6 +286,18 @@ |
| 272 | 286 | paramModel: { |
| 273 | 287 | "param": "", |
| 274 | 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 | 307 | methods: { |
| 282 | 308 | //导出 |
| 283 | 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 | 315 | console.log('导出数据', res) |
| 286 | 316 | if (res.data.code == 200) { |
| 287 | 317 | this.$message.success('导出成功') |
| ... | ... | @@ -305,9 +335,11 @@ |
| 305 | 335 | document.body.removeChild(a); // 删除 a 标签 |
| 306 | 336 | }, |
| 307 | 337 | // 完成预约线下收款 |
| 308 | - async Results(item) { | |
| 338 | + async Results(item) { | |
| 339 | + console.log('预约结算数据', item) | |
| 309 | 340 | Collection(item.id).then(res => { |
| 310 | 341 | this.$message.success(res.data.message) |
| 342 | + this.UpdRobotReservation(item) | |
| 311 | 343 | // 完成单数 |
| 312 | 344 | UpdnowNum(item.UserId).then(res => { |
| 313 | 345 | console.log('修改后的数据单量', res) |
| ... | ... | @@ -317,6 +349,17 @@ |
| 317 | 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 | 364 | UpdResultTime(item.id).then(res => { |
| 322 | 365 | if (res.data.code == 200) { |
| ... | ... | @@ -326,7 +369,7 @@ |
| 326 | 369 | } |
| 327 | 370 | }) |
| 328 | 371 | // 发送短信 |
| 329 | - this.paramModel.mobile=item.UserPhone | |
| 372 | + this.paramModel.mobile = item.UserPhone | |
| 330 | 373 | SendPaymentAppointment(this.paramModel).then(res => { |
| 331 | 374 | console.log('付款数据啊', res) |
| 332 | 375 | if (res.data.data.code == '000000') { |
| ... | ... | @@ -335,11 +378,24 @@ |
| 335 | 378 | console.log('发送短信失败') |
| 336 | 379 | } |
| 337 | 380 | }) |
| 338 | - console.log('付款参数',this.paramModel) | |
| 381 | + console.log('付款参数', this.paramModel) | |
| 339 | 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 | 399 | EidtRecord(item) { |
| 344 | 400 | this.dialogVisible = true |
| 345 | 401 | console.log('item', item) |
| ... | ... | @@ -374,20 +430,20 @@ |
| 374 | 430 | ShowRecord() { |
| 375 | 431 | GetAppointmentRecord(this.model).then(res => { |
| 376 | 432 | console.log(res) |
| 377 | - if(res.data.data.total>0){ | |
| 433 | + if (res.data.data.total > 0) { | |
| 378 | 434 | this.$message.success('查询成功') |
| 379 | 435 | res.data.data.rows.forEach((item, index) => { |
| 380 | 436 | item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd") |
| 381 | 437 | item.UpdateTime = utils.formatTime(item.UpdateTime, "yyyy-MM-dd") |
| 382 | 438 | item.MakeTime = utils.formatTime(item.MakeTime, "yyyy-MM-dd") |
| 383 | 439 | }) |
| 384 | - | |
| 440 | + | |
| 385 | 441 | this.tableData = res.data.data.rows |
| 386 | 442 | this.model.TotalCount = res.data.data.total |
| 387 | - }else{ | |
| 443 | + } else { | |
| 388 | 444 | this.$message.error('暂无数据') |
| 389 | 445 | } |
| 390 | - | |
| 446 | + | |
| 391 | 447 | }) |
| 392 | 448 | }, |
| 393 | 449 | // 状态查询预约情况 | ... | ... |
src/views/comment/comment.vue
src/views/externalInfo/externalInfo.vue
| ... | ... | @@ -89,7 +89,7 @@ |
| 89 | 89 | </template> |
| 90 | 90 | </el-table-column> |
| 91 | 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 | 93 | style="text-align:right;margin-top:10px;"> |
| 94 | 94 | </el-pagination> |
| 95 | 95 | <!-- 折叠面板 --> |
| ... | ... | @@ -118,32 +118,32 @@ |
| 118 | 118 | </el-form-item> |
| 119 | 119 | </el-form> |
| 120 | 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 | 122 | <template slot-scope="scope"> |
| 123 | 123 | {{scope.row.Id}} |
| 124 | 124 | </template> |
| 125 | 125 | </el-table-column> |
| 126 | - <el-table-column prop="beijintupian" label="头像" width="180"> | |
| 126 | + <el-table-column prop="beijintupian" label="头像" > | |
| 127 | 127 | <template slot-scope="scope"> |
| 128 | 128 | <img :src="scope.row.beijintupian" style="width: 40px;height: 40px;" /> |
| 129 | 129 | </template> |
| 130 | 130 | </el-table-column> |
| 131 | - <el-table-column prop="RecordName" label="微信名" width="180"> | |
| 131 | + <el-table-column prop="RecordName" label="微信名" > | |
| 132 | 132 | <template slot-scope="scope"> |
| 133 | 133 | {{scope.row.RecordName}} |
| 134 | 134 | </template> |
| 135 | 135 | </el-table-column> |
| 136 | - <el-table-column prop="RecordPhone" label="电话号码" width="180"> | |
| 136 | + <el-table-column prop="RecordPhone" label="电话号码"> | |
| 137 | 137 | <template slot-scope="scope"> |
| 138 | 138 | {{scope.row.RecordPhone}} |
| 139 | 139 | </template> |
| 140 | 140 | </el-table-column> |
| 141 | - <el-table-column prop="date" label="用户名" width="180"> | |
| 141 | + <el-table-column prop="date" label="用户名" > | |
| 142 | 142 | <template slot-scope="scope"> |
| 143 | 143 | {{scope.row.UserName}} |
| 144 | 144 | </template> |
| 145 | 145 | </el-table-column> |
| 146 | - <el-table-column prop="UserId" label="用户ID" width="180"> | |
| 146 | + <el-table-column prop="UserId" label="用户ID" > | |
| 147 | 147 | <template slot-scope="scope"> |
| 148 | 148 | {{scope.row.UserId}} |
| 149 | 149 | </template> |
| ... | ... | @@ -154,64 +154,64 @@ |
| 154 | 154 | </template> |
| 155 | 155 | </el-table-column> |
| 156 | 156 | |
| 157 | - <el-table-column prop="date" label="状态" width="180"> | |
| 157 | + <el-table-column prop="date" label="状态" > | |
| 158 | 158 | <template slot-scope="scope"> |
| 159 | 159 | <el-tag type="success"> |
| 160 | 160 | {{scope.row.State==0?'已预约':scope.row.State==1?'已取消':scope.row.State==2?'已完成':'未知'}} |
| 161 | 161 | </el-tag> |
| 162 | 162 | </template> |
| 163 | 163 | </el-table-column> |
| 164 | - <el-table-column prop="Remarks" label="备注" width="180"> | |
| 164 | + <el-table-column prop="Remarks" label="备注" > | |
| 165 | 165 | <template slot-scope="scope"> |
| 166 | 166 | {{scope.row.Remarks}} |
| 167 | 167 | </template> |
| 168 | 168 | </el-table-column> |
| 169 | - <el-table-column prop="date" label="车型" width="180"> | |
| 169 | + <el-table-column prop="date" label="车型" > | |
| 170 | 170 | <template slot-scope="scope"> |
| 171 | 171 | {{scope.row.CarModel}} |
| 172 | 172 | </template> |
| 173 | 173 | </el-table-column> |
| 174 | - <el-table-column prop="date" label="颜色" width="180"> | |
| 174 | + <el-table-column prop="date" label="颜色" > | |
| 175 | 175 | <template slot-scope="scope"> |
| 176 | 176 | {{scope.row.CarColour}} |
| 177 | 177 | </template> |
| 178 | 178 | </el-table-column> |
| 179 | - <el-table-column prop="date" label="划痕" width="180"> | |
| 179 | + <el-table-column prop="date" label="划痕" > | |
| 180 | 180 | <template slot-scope="scope"> |
| 181 | 181 | {{scope.row.Scratch}} |
| 182 | 182 | </template> |
| 183 | 183 | </el-table-column> |
| 184 | - <el-table-column prop="date" label="腐蚀" width="180"> | |
| 184 | + <el-table-column prop="date" label="腐蚀" > | |
| 185 | 185 | <template slot-scope="scope"> |
| 186 | 186 | {{scope.row.Corrosion}} |
| 187 | 187 | </template> |
| 188 | 188 | </el-table-column> |
| 189 | - <el-table-column prop="date" label="破损" width="180"> | |
| 189 | + <el-table-column prop="date" label="破损" > | |
| 190 | 190 | <template slot-scope="scope"> |
| 191 | 191 | {{scope.row.BeDamaged}} |
| 192 | 192 | </template> |
| 193 | 193 | </el-table-column> |
| 194 | - <el-table-column prop="date" label="飞漆" width="180"> | |
| 194 | + <el-table-column prop="date" label="飞漆" > | |
| 195 | 195 | <template slot-scope="scope"> |
| 196 | 196 | {{scope.row.FlyingPaint}} |
| 197 | 197 | </template> |
| 198 | 198 | </el-table-column> |
| 199 | - <el-table-column prop="date" label="地址" width="180"> | |
| 199 | + <el-table-column prop="date" label="地址" > | |
| 200 | 200 | <template slot-scope="scope"> |
| 201 | 201 | {{scope.row.Address}} |
| 202 | 202 | </template> |
| 203 | 203 | </el-table-column> |
| 204 | - <el-table-column prop="date" label="预约时间" width="180"> | |
| 204 | + <el-table-column prop="date" label="预约时间" > | |
| 205 | 205 | <template slot-scope="scope"> |
| 206 | 206 | {{scope.row.MakeTime}} |
| 207 | 207 | </template> |
| 208 | 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 | 210 | <template slot-scope="scope"> |
| 211 | 211 | {{scope.row.AddTime}} |
| 212 | 212 | </template> |
| 213 | 213 | </el-table-column> |
| 214 | - <el-table-column prop="ResultTime" label="付款时间" width="180"> | |
| 214 | + <el-table-column prop="ResultTime" label="付款时间" > | |
| 215 | 215 | <template slot-scope="scope"> |
| 216 | 216 | <!-- {{scope.row.RecordTime}} --> |
| 217 | 217 | {{scope.row.State==2?scope.row.ResultTime:''}} |
| ... | ... | @@ -219,7 +219,7 @@ |
| 219 | 219 | </el-table-column> |
| 220 | 220 | </el-table> |
| 221 | 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 | 223 | </el-pagination> |
| 224 | 224 | </div> |
| 225 | 225 | </el-collapse-item> |
| ... | ... | @@ -397,7 +397,7 @@ |
| 397 | 397 | </el-table-column> |
| 398 | 398 | </el-table> |
| 399 | 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 | 401 | </el-pagination> |
| 402 | 402 | </div> |
| 403 | 403 | </el-collapse-item> |
| ... | ... | @@ -522,6 +522,9 @@ |
| 522 | 522 | this.$message.error('暂无下级推广专员') |
| 523 | 523 | }else{ |
| 524 | 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 | 528 | this.ManageData = res.data.data |
| 526 | 529 | } |
| 527 | 530 | } else { |
| ... | ... | @@ -533,7 +536,7 @@ |
| 533 | 536 | SelectW(id) { |
| 534 | 537 | this.formCustomerW.RecordState=-1 |
| 535 | 538 | this.formCustomerW.UserId = id |
| 536 | - console.log('wwww') | |
| 539 | + // console.log('wwww') | |
| 537 | 540 | GetRecordByCustomerX(this.formCustomerW).then(res => { |
| 538 | 541 | console.log('查询出的数据', res) |
| 539 | 542 | if(res.data.code==200){ |
| ... | ... | @@ -542,10 +545,11 @@ |
| 542 | 545 | this.$message.error('暂无下级预约数据') |
| 543 | 546 | } else { |
| 544 | 547 | res.data.data.rows.forEach((item, index) => { |
| 548 | + item.RecordTime=utils.formatTime(item.RecordTime,"yyyy-MM-dd HH:mm:ss") | |
| 545 | 549 | item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss") |
| 546 | 550 | item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss") |
| 547 | 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 | 554 | this.SubData = res.data.data.rows |
| 551 | 555 | this.formCustomerW.TotalCount = res.data.data.total |
| ... | ... | @@ -557,6 +561,13 @@ |
| 557 | 561 | }, |
| 558 | 562 | // 查询 |
| 559 | 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 | 571 | GetRecordByCustomerX(this.formCustomerW).then(res => { |
| 561 | 572 | console.log('查询出的数据', res) |
| 562 | 573 | if (res.data.data.total == 0) { |
| ... | ... | @@ -564,9 +575,11 @@ |
| 564 | 575 | this.SubData=[] |
| 565 | 576 | } else { |
| 566 | 577 | res.data.data.rows.forEach((item, index) => { |
| 578 | + item.RecordTime=utils.formatTime(item.RecordTime,"yyyy-MM-dd HH:mm:ss") | |
| 567 | 579 | item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss") |
| 568 | 580 | item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss") |
| 569 | 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 | 584 | this.SubData = res.data.data.rows |
| 572 | 585 | this.formCustomerW.TotalCount = res.data.data.total |
| ... | ... | @@ -587,22 +600,33 @@ |
| 587 | 600 | item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss") |
| 588 | 601 | item.AddTime = utils.formatTime(item.AddTime, "yyyy-MM-dd HH:mm:ss") |
| 589 | 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 | 605 | this.Direct = res.data.data.rows |
| 592 | 606 | this.formCustomer.TotalCount = res.data.data.total |
| 607 | + console.log('shiti实体',this.formCustomer) | |
| 593 | 608 | } |
| 594 | 609 | }) |
| 595 | 610 | }, |
| 596 | 611 | //展示直推用户 |
| 597 | 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 | 619 | GetRecordByCustomerX(this.formCustomer).then(res => { |
| 599 | 620 | console.log('直推', res) |
| 600 | 621 | res.data.data.rows.forEach((item, index) => { |
| 622 | + item.MakeTime=utils.formatTime(item.MakeTime,"yyyy-MM-dd HH:mm:ss") | |
| 601 | 623 | item.ResultTime = utils.formatTime(item.ResultTime, "yyyy-MM-dd HH:mm:ss") |
| 602 | 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 | 627 | this.Direct = res.data.data.rows |
| 605 | 628 | this.formCustomer.TotalCount = res.data.data.total |
| 629 | + console.log('直推查询按钮',this.formCustomer) | |
| 606 | 630 | }) |
| 607 | 631 | }, |
| 608 | 632 | Pages(e) { | ... | ... |
src/views/login/index.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="login-container"> |
| 3 | 3 | <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left"> |
| 4 | - | |
| 5 | 4 | <div class="title-container"> |
| 6 | - <h3 class="title">尚腾汽车管理后台</h3> | |
| 5 | + <h3 class="title">尚腾汽车养护管理后台</h3> | |
| 7 | 6 | </div> |
| 8 | 7 | |
| 9 | 8 | <el-form-item prop="username"> |
| ... | ... | @@ -13,7 +12,7 @@ |
| 13 | 12 | <el-input |
| 14 | 13 | ref="username" |
| 15 | 14 | v-model="loginForm.username" |
| 16 | - placeholder="Username" | |
| 15 | + placeholder="用户名" | |
| 17 | 16 | name="username" |
| 18 | 17 | type="text" |
| 19 | 18 | tabindex="1" |
| ... | ... | @@ -30,7 +29,7 @@ |
| 30 | 29 | ref="password" |
| 31 | 30 | v-model="loginForm.password" |
| 32 | 31 | :type="passwordType" |
| 33 | - placeholder="Password" | |
| 32 | + placeholder="密码" | |
| 34 | 33 | name="password" |
| 35 | 34 | tabindex="2" |
| 36 | 35 | auto-complete="on" |
| ... | ... | @@ -41,7 +40,7 @@ |
| 41 | 40 | </span> |
| 42 | 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 | 45 | <div class="tips" v-if="false"> |
| 47 | 46 | <span style="margin-right:20px;">username: admin</span> | ... | ... |
src/views/moneys/moneys.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="container" style="margin: 10px;"> |
| 3 | 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 | 6 | </el-form-item> |
| 7 | 7 | <el-form-item label="状态"> |
| 8 | 8 | <el-select v-model="moneymodel.status" placeholder="请选择"> |
| ... | ... | @@ -17,17 +17,32 @@ |
| 17 | 17 | <el-button type="success" @click="AddOrUpdMoney(null)">新增</el-button> |
| 18 | 18 | </el-form-item> |
| 19 | 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 | 21 | <el-table-column prop="id" label="ID" v-if="false"> |
| 22 | 22 | <template slot-scope="scope"> |
| 23 | 23 | {{scope.row.id}} |
| 24 | 24 | </template> |
| 25 | 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 | 37 | <template slot-scope="scope"> |
| 28 | 38 | {{scope.row.username}} |
| 29 | 39 | </template> |
| 30 | 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 | 46 | <el-table-column prop="openid" label="OpenId" v-if="false"> |
| 32 | 47 | <template slot-scope="scope"> |
| 33 | 48 | {{scope.row.openid}} |
| ... | ... | @@ -43,27 +58,27 @@ |
| 43 | 58 | {{scope.row.userid}} |
| 44 | 59 | </template> |
| 45 | 60 | </el-table-column> |
| 46 | - <el-table-column prop="oldmoney" label="原金额"> | |
| 61 | + <el-table-column prop="oldmoney" label="原金额" align="center" v-if="false"> | |
| 47 | 62 | <template slot-scope="scope"> |
| 48 | 63 | ¥{{scope.row.oldmoney/100}} |
| 49 | 64 | </template> |
| 50 | 65 | </el-table-column> |
| 51 | - <el-table-column prop="nowmoney" label="余额"> | |
| 66 | + <el-table-column prop="nowmoney" label="余额" align="center"> | |
| 52 | 67 | <template slot-scope="scope"> |
| 53 | 68 | ¥{{scope.row.nowmoney/100}} |
| 54 | 69 | </template> |
| 55 | 70 | </el-table-column> |
| 56 | - <el-table-column prop="money" label="提现金额"> | |
| 71 | + <el-table-column prop="money" label="提现金额" align="center"> | |
| 57 | 72 | <template slot-scope="scope"> |
| 58 | 73 | ¥{{scope.row.money/100}} |
| 59 | 74 | </template> |
| 60 | 75 | </el-table-column> |
| 61 | - <el-table-column prop="add_time" label="提现时间"> | |
| 76 | + <el-table-column prop="add_time" label="提现时间" align="center"> | |
| 62 | 77 | <template slot-scope="scope"> |
| 63 | 78 | {{scope.row.add_time}} |
| 64 | 79 | </template> |
| 65 | 80 | </el-table-column> |
| 66 | - <el-table-column prop="status" label="状态"> | |
| 81 | + <el-table-column prop="status" label="状态" align="center"> | |
| 67 | 82 | <template slot-scope="scope"> |
| 68 | 83 | <el-tag :type="scope.row.status==0?'success':'warn'"> |
| 69 | 84 | {{scope.row.status==0?'成功':'失败'}} |
| ... | ... | @@ -75,7 +90,7 @@ |
| 75 | 90 | <el-button type="primary" @click="AddOrUpdMoney(scope.row)">编辑</el-button> |
| 76 | 91 | </template> |
| 77 | 92 | </el-table-column> |
| 78 | - <el-table-column label="删除" v-if="false"> | |
| 93 | + <el-table-column label="删除" > | |
| 79 | 94 | <template slot-scope="scope"> |
| 80 | 95 | <el-button type="danger" @click="DelMoney(scope.row.id)">删除</el-button> |
| 81 | 96 | </template> |
| ... | ... | @@ -87,16 +102,28 @@ |
| 87 | 102 | <el-dialog title="提示" :visible.sync="dialogVisible" width="30%"> |
| 88 | 103 | |
| 89 | 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 | 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 | 122 | </el-form-item> |
| 96 | 123 | <el-form-item label="提现金额" prop="money"> |
| 97 | 124 | <el-input v-model="form.money" placeholder="提现金额"></el-input> |
| 98 | 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 | 127 | <el-input v-model="form.nowmoney"></el-input> |
| 101 | 128 | </el-form-item> |
| 102 | 129 | </el-form> |
| ... | ... | @@ -124,11 +151,10 @@ |
| 124 | 151 | dialogVisible: false, |
| 125 | 152 | rules: { |
| 126 | 153 | username: [{ |
| 127 | - required: true, | |
| 128 | - message: '请输入用户名', | |
| 129 | - trigger: 'change' | |
| 130 | - }, | |
| 131 | - ], | |
| 154 | + required: true, | |
| 155 | + message: '请输入用户名', | |
| 156 | + trigger: 'change' | |
| 157 | + }, ], | |
| 132 | 158 | oldmoney: [{ |
| 133 | 159 | required: true, |
| 134 | 160 | message: '请输入金额(元)', |
| ... | ... | @@ -154,26 +180,29 @@ |
| 154 | 180 | }, |
| 155 | 181 | tableData: [], |
| 156 | 182 | moneymodel: { |
| 183 | + "UserId": 0, | |
| 157 | 184 | "status": 0, |
| 158 | 185 | "KeyWord": "", |
| 159 | 186 | "TotalCount": 0, |
| 160 | 187 | "PageIndex": 1, |
| 161 | 188 | "PageSize": 10, |
| 162 | 189 | "Sort": [{ |
| 163 | - "Field": "", | |
| 164 | - "Type": 0 | |
| 190 | + "Field": "add_time", | |
| 191 | + "Type": 1 | |
| 165 | 192 | }] |
| 166 | 193 | }, |
| 167 | 194 | form: { |
| 168 | 195 | "id": 0, |
| 196 | + "openid": "", | |
| 197 | + "remark": "", | |
| 169 | 198 | "username": "", |
| 170 | - "remark":'', | |
| 171 | - "openid":'', | |
| 172 | 199 | "userid": 0, |
| 200 | + "beijintupian": "", | |
| 201 | + "phone": "", | |
| 173 | 202 | "oldmoney": 0, |
| 174 | 203 | "nowmoney": 0, |
| 175 | 204 | "money": 0, |
| 176 | - "add_time": "2022-01-18T02:47:00.549Z", | |
| 205 | + "add_time": "2022-02-10T13:55:23.241Z", | |
| 177 | 206 | "status": 0 |
| 178 | 207 | } |
| 179 | 208 | } |
| ... | ... | @@ -182,6 +211,49 @@ |
| 182 | 211 | this.ShowMoneys() |
| 183 | 212 | }, |
| 184 | 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 | 258 | SubmitMoney() { |
| 187 | 259 | this.$refs.form.validate((valid) => { |
| ... | ... | @@ -213,15 +285,15 @@ |
| 213 | 285 | }) |
| 214 | 286 | }, |
| 215 | 287 | Pages(e) { |
| 216 | - this.moneymodel.PageIndex = e | |
| 288 | + this.moneymodel.PageIndex = e | |
| 217 | 289 | this.ShowMoneys() |
| 218 | 290 | }, |
| 219 | 291 | // 展示提现金额 |
| 220 | 292 | ShowMoneys() { |
| 221 | 293 | GetMoneyList(this.moneymodel).then(res => { |
| 222 | 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 | 298 | this.tableData = res.data.data.rows |
| 227 | 299 | this.moneymodel.TotalCount = res.data.data.total | ... | ... |
src/views/partner/partner.vue
| ... | ... | @@ -40,6 +40,12 @@ |
| 40 | 40 | {{scope.row.add_time}} |
| 41 | 41 | </template> |
| 42 | 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 | 49 | <el-table-column label="查看推广"> |
| 44 | 50 | <template slot-scope="scope"> |
| 45 | 51 | <el-button type="primary" @click="RedirectOrder(scope.row.id)">查看推广</el-button> |
| ... | ... | @@ -61,7 +67,7 @@ |
| 61 | 67 | </template> |
| 62 | 68 | </el-table-column> |
| 63 | 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 | 71 | style="text-align: right;margin-top: 10px;"> |
| 66 | 72 | </el-pagination> |
| 67 | 73 | <el-dialog title="提示" :visible.sync="dialogVisible" width="50%"> |
| ... | ... | @@ -92,16 +98,12 @@ |
| 92 | 98 | <el-button type="primary" @click="SubmitPartnerUser">确 定</el-button> |
| 93 | 99 | </span> |
| 94 | 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 | 107 | </el-dialog> |
| 106 | 108 | </div> |
| 107 | 109 | </template> |
| ... | ... | @@ -110,7 +112,8 @@ |
| 110 | 112 | import { |
| 111 | 113 | GetListPartner, |
| 112 | 114 | AddOrUpdatePartner, |
| 113 | - DelPartner | |
| 115 | + DelPartner, | |
| 116 | + UpdatePartner, | |
| 114 | 117 | } from '../../api/Partner.js' |
| 115 | 118 | import { |
| 116 | 119 | AddOrUpdatePartnerUser |
| ... | ... | @@ -121,8 +124,9 @@ |
| 121 | 124 | return { |
| 122 | 125 | dialogVisibleX: false, |
| 123 | 126 | dialogVisible: false, |
| 124 | - dialogVisibleR:false, | |
| 125 | - linkR:'', | |
| 127 | + dialogVisibleR: false, | |
| 128 | + ShieldTxt: true, | |
| 129 | + linkR: '', | |
| 126 | 130 | tableData: [], |
| 127 | 131 | model: { |
| 128 | 132 | "KeyWord": "", |
| ... | ... | @@ -168,6 +172,11 @@ |
| 168 | 172 | "User_id": 0, |
| 169 | 173 | "Partner_id": 0, |
| 170 | 174 | "status": 0 |
| 175 | + }, | |
| 176 | + //修改合伙人状态 | |
| 177 | + statusModel: { | |
| 178 | + "id": 0, | |
| 179 | + "status": 0 | |
| 171 | 180 | } |
| 172 | 181 | } |
| 173 | 182 | }, |
| ... | ... | @@ -175,6 +184,24 @@ |
| 175 | 184 | this.ShowPartner() |
| 176 | 185 | }, |
| 177 | 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 | 206 | Addsubordinate(id) { |
| 180 | 207 | console.log('id', id) |
| ... | ... | @@ -198,16 +225,16 @@ |
| 198 | 225 | } |
| 199 | 226 | }) |
| 200 | 227 | }, |
| 201 | - | |
| 228 | + | |
| 202 | 229 | // 查看订单 |
| 203 | 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 | 234 | // this.$router.push({ |
| 208 | 235 | // path: '/externalInfo?id=' +id |
| 209 | 236 | // }) |
| 210 | - | |
| 237 | + | |
| 211 | 238 | }, |
| 212 | 239 | Pages(e) { |
| 213 | 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 | 12 | </el-form-item> |
| 13 | 13 | </el-form> |
| 14 | 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 | 16 | <template slot-scope="scope"> |
| 17 | 17 | {{scope.row.id}} |
| 18 | 18 | </template> |
| 19 | 19 | </el-table-column> |
| 20 | - <el-table-column prop="date" label="领取人ID" width="180"> | |
| 20 | + <el-table-column prop="date" label="描述" > | |
| 21 | 21 | <template slot-scope="scope"> |
| 22 | - {{scope.row.getUser}} | |
| 22 | + {{scope.row.remark}} | |
| 23 | 23 | </template> |
| 24 | 24 | </el-table-column> |
| 25 | - <el-table-column prop="date" label="领取数量" width="180"> | |
| 25 | + <el-table-column prop="date" label="领取人ID" > | |
| 26 | 26 | <template slot-scope="scope"> |
| 27 | - {{scope.row.getNum}} | |
| 27 | + {{scope.row.getUser}} | |
| 28 | 28 | </template> |
| 29 | 29 | </el-table-column> |
| 30 | - <el-table-column prop="date" label="描述" width="180" v-if="false"> | |
| 30 | + <el-table-column prop="date" label="领取数量" > | |
| 31 | 31 | <template slot-scope="scope"> |
| 32 | - {{scope.row.remark}} | |
| 32 | + {{scope.row.getNum}} | |
| 33 | 33 | </template> |
| 34 | 34 | </el-table-column> |
| 35 | - <el-table-column prop="date" label="领取时间" width="180"> | |
| 35 | + | |
| 36 | + <el-table-column prop="date" label="领取时间" > | |
| 36 | 37 | <template slot-scope="scope"> |
| 37 | 38 | {{scope.row.add_time}} |
| 38 | 39 | </template> |
| 39 | 40 | </el-table-column> |
| 40 | - <el-table-column prop="date" label="修改时间" width="180"> | |
| 41 | + <el-table-column prop="date" label="修改时间" > | |
| 41 | 42 | <template slot-scope="scope"> |
| 42 | 43 | {{scope.row.update_time}} |
| 43 | 44 | </template> |
| 44 | 45 | </el-table-column> |
| 45 | - <el-table-column prop="date" label="状态" width="180"> | |
| 46 | + <el-table-column prop="date" label="状态" > | |
| 46 | 47 | <template slot-scope="scope"> |
| 47 | 48 | <el-tag :type="scope.row.status==0?'success':'warn'"> |
| 48 | 49 | {{scope.row.status==0?'正常':'未知'}} |
| ... | ... | @@ -63,16 +64,19 @@ |
| 63 | 64 | <el-pagination |
| 64 | 65 | background |
| 65 | 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 | 68 | </el-pagination> |
| 68 | 69 | <el-dialog title="提示" :visible.sync="dialogVisible" width="50%"> |
| 69 | 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 | 72 | <el-select v-model="recordAddUpdModel.getUser" placeholder="请选择"> |
| 72 | 73 | <el-option :label="item.username" :value="item.id" v-for="(item,index) in userlist" |
| 73 | 74 | :key="index"></el-option> |
| 74 | 75 | |
| 75 | 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 | 80 | </el-form-item> |
| 77 | 81 | <el-form-item label="领取数量" prop="getNum"> |
| 78 | 82 | <el-input v-model="recordAddUpdModel.getNum" placeholder="领取数量"></el-input> |
| ... | ... | @@ -106,7 +110,7 @@ |
| 106 | 110 | rulerecord: { |
| 107 | 111 | getUser: [{ |
| 108 | 112 | required: true, |
| 109 | - message: '请选择用户', | |
| 113 | + message: '请输入用户ID', | |
| 110 | 114 | trigger: 'blur' |
| 111 | 115 | }], |
| 112 | 116 | getNum: [{ |
| ... | ... | @@ -198,11 +202,11 @@ |
| 198 | 202 | AddOrUpdateRecord(this.recordAddUpdModel).then(res=>{ |
| 199 | 203 | console.log('res返沪',res) |
| 200 | 204 | if(res.data.code==200){ |
| 201 | - this.$message.success('操作') | |
| 205 | + this.$message.success('操作成功') | |
| 202 | 206 | this.ShowRecordList() |
| 203 | 207 | this.dialogVisible=false |
| 204 | 208 | }else{ |
| 205 | - this.$message.error('操作失败') | |
| 209 | + this.$message.error('暂无此用户ID') | |
| 206 | 210 | } |
| 207 | 211 | this.recordAddUpdModel.id = 0 |
| 208 | 212 | this.recordAddUpdModel.getUser = 0 | ... | ... |
src/views/system/calendar.vue
| ... | ... | @@ -3,7 +3,8 @@ |
| 3 | 3 | <div style="width: 1000px;margin: auto;"> |
| 4 | 4 | <el-button type="success" @click="AddYuYue" style="padding-top: 10px;">添加时间</el-button> |
| 5 | 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 | 8 | <template slot="dateCell" slot-scope="{date, data}" style="padding: 0px;"> |
| 8 | 9 | <div class="CalenDiv" :class="currentCount(data)>0?'IsSelectDay':'IsNoDay'"> |
| 9 | 10 | <p class="DataTimeString">{{ data.day.split('-').slice(1).join('-') }}</p> |
| ... | ... | @@ -13,6 +14,22 @@ |
| 13 | 14 | </template> |
| 14 | 15 | </el-calendar> |
| 15 | 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 | 33 | <el-dialog title="新增" :visible.sync="dialogVisible" width="50%"> |
| 17 | 34 | <el-form ref="form" :model="form" label-width="80px" :rules="ruleform"> |
| 18 | 35 | <el-form-item label="可预约人数" prop="ReservedPlaces"> |
| ... | ... | @@ -24,7 +41,7 @@ |
| 24 | 41 | </el-form-item> |
| 25 | 42 | <el-form-item label="至" prop="TimeOfAppointmentEnd"> |
| 26 | 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 | 45 | </el-form-item> |
| 29 | 46 | </el-form> |
| 30 | 47 | <span slot="footer" class="dialog-footer"> |
| ... | ... | @@ -39,7 +56,7 @@ |
| 39 | 56 | </el-form-item> |
| 40 | 57 | <el-form-item label="预约日期" prop="TimeOfAppointment"> |
| 41 | 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 | 60 | </el-form-item> |
| 44 | 61 | </el-form> |
| 45 | 62 | <span slot="footer" class="dialog-footer"> |
| ... | ... | @@ -55,6 +72,7 @@ |
| 55 | 72 | ReservationSettingsList, |
| 56 | 73 | SettingReservation, |
| 57 | 74 | UpadteReservation, |
| 75 | + RemoveDateSection, | |
| 58 | 76 | } from '../../api/ReservationSettings.js' |
| 59 | 77 | import utils from '../../utils/utils.js' |
| 60 | 78 | import { |
| ... | ... | @@ -64,10 +82,11 @@ |
| 64 | 82 | data() { |
| 65 | 83 | return { |
| 66 | 84 | dialogVisibleU: false, |
| 85 | + dialogVisibleR: false, | |
| 67 | 86 | dialogVisible: false, |
| 68 | 87 | model: { |
| 69 | 88 | pageIndex: 1, |
| 70 | - pageSize: 20, | |
| 89 | + pageSize: 50, | |
| 71 | 90 | sort: '', |
| 72 | 91 | sortOrder: '', |
| 73 | 92 | keyword: '', |
| ... | ... | @@ -80,6 +99,10 @@ |
| 80 | 99 | "TimeOfAppointmentEnd": '', |
| 81 | 100 | "ReservedPlaces": 0 |
| 82 | 101 | }, |
| 102 | + RemoveModel: { | |
| 103 | + "TimeOfAppointmentStart": "2022-02-1", | |
| 104 | + "TimeOfAppointmentEnd": "2022-02-5" | |
| 105 | + }, | |
| 83 | 106 | // 修改预约时间 |
| 84 | 107 | updform: { |
| 85 | 108 | "id": 0, |
| ... | ... | @@ -103,7 +126,7 @@ |
| 103 | 126 | message: '请选择预约日期', |
| 104 | 127 | trigger: 'change' |
| 105 | 128 | }], |
| 106 | - | |
| 129 | + | |
| 107 | 130 | }, |
| 108 | 131 | ruleform: { |
| 109 | 132 | ReservedPlaces: [{ |
| ... | ... | @@ -149,10 +172,26 @@ |
| 149 | 172 | } |
| 150 | 173 | }, |
| 151 | 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 | 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 | 195 | this.$refs.form.validate((valid) => { |
| 157 | 196 | if (valid) { |
| 158 | 197 | SettingReservation(this.form).then(res => { | ... | ... |
src/views/system/missionNum.vue
| ... | ... | @@ -39,7 +39,7 @@ |
| 39 | 39 | import { |
| 40 | 40 | UpdManage, |
| 41 | 41 | UpdMisser, |
| 42 | - UpdateNum, | |
| 42 | + UpdateNumS, | |
| 43 | 43 | GetModelNum, |
| 44 | 44 | } from '../../api/user.js' |
| 45 | 45 | export default { |
| ... | ... | @@ -78,7 +78,7 @@ |
| 78 | 78 | }, |
| 79 | 79 | // 修改经理专员固定单量 |
| 80 | 80 | UpdNums() { |
| 81 | - UpdateNum(this.modelnum).then(res => { | |
| 81 | + UpdateNumS(this.modelnum).then(res => { | |
| 82 | 82 | if (res.data.code == 200) { |
| 83 | 83 | this.$message.success('修改单量成功') |
| 84 | 84 | } else { | ... | ... |
src/views/system/robot.vue
| ... | ... | @@ -17,9 +17,9 @@ |
| 17 | 17 | {{scope.row.id}} |
| 18 | 18 | </template> |
| 19 | 19 | </el-table-column> |
| 20 | - <el-table-column prop="userName" label="用户姓名"> | |
| 20 | + <el-table-column prop="full_name" label="贵姓"> | |
| 21 | 21 | <template slot-scope="scope"> |
| 22 | - {{scope.row.userName}} | |
| 22 | + {{scope.row.full_name}} | |
| 23 | 23 | </template> |
| 24 | 24 | </el-table-column> |
| 25 | 25 | |
| ... | ... | @@ -51,14 +51,13 @@ |
| 51 | 51 | </template> |
| 52 | 52 | </el-table-column> |
| 53 | 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 | 55 | style="text-align: right;margin-top: 10px;"> |
| 56 | 56 | </el-pagination> |
| 57 | 57 | <el-dialog title="提示" :visible.sync="dialogVisible" width="30%"> |
| 58 | - | |
| 59 | 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 | 61 | </el-form-item> |
| 63 | 62 | <el-form-item label="电话号码" prop="phone"> |
| 64 | 63 | <el-input v-model="form.phone" placeholder="请输入电话号码"></el-input> |
| ... | ... | @@ -95,9 +94,9 @@ |
| 95 | 94 | return { |
| 96 | 95 | dialogVisible: false, |
| 97 | 96 | rules: { |
| 98 | - userName: [{ | |
| 97 | + full_name: [{ | |
| 99 | 98 | required: true, |
| 100 | - message: '请输入用户名', | |
| 99 | + message: '请输入贵姓', | |
| 101 | 100 | trigger: 'change' |
| 102 | 101 | }, ], |
| 103 | 102 | phone: [{ |
| ... | ... | @@ -128,6 +127,7 @@ |
| 128 | 127 | }, |
| 129 | 128 | TotalCount: 0, |
| 130 | 129 | form: { |
| 130 | + "full_name":'', | |
| 131 | 131 | "id": 0, |
| 132 | 132 | "userName": "", |
| 133 | 133 | "phone": "", |
| ... | ... | @@ -211,12 +211,14 @@ |
| 211 | 211 | if (obj == null) { |
| 212 | 212 | // 新增 |
| 213 | 213 | this.form.id = 0 |
| 214 | + this.form.full_name='' | |
| 214 | 215 | this.form.userName = '' |
| 215 | 216 | this.form.phone = '' |
| 216 | 217 | this.form.carModel ='' |
| 217 | 218 | } else { |
| 218 | 219 | // 修改 |
| 219 | 220 | this.form.id = obj.id |
| 221 | + this.form.full_name=obj.full_name | |
| 220 | 222 | this.form.userName = obj.userName |
| 221 | 223 | this.form.phone = obj.phone |
| 222 | 224 | this.form.carModel =obj.carModel | ... | ... |
src/views/system/updpassword.vue
src/views/user/index.vue
| 1 | 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 | 18 | <el-table style="margin-top: 5px;" v-loading="listLoading" :data="userlist" element-loading-text="Loading" |
| 4 | 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 | 30 | <el-table-column label="用户ID" width="120" align="center"> |
| 6 | 31 | <template slot-scope="scope"> |
| 7 | 32 | {{scope.row.id}} |
| 8 | 33 | </template> |
| 9 | 34 | </el-table-column> |
| 10 | - <el-table-column label="用户微信名" align="center" > | |
| 35 | + <el-table-column label="用户微信名" align="center"> | |
| 11 | 36 | <template slot-scope="scope"> |
| 12 | 37 | <span>{{ scope.row.username }}</span> |
| 13 | 38 | </template> |
| 14 | 39 | </el-table-column> |
| 15 | - <el-table-column label="别名" align="center" v-if="false"> | |
| 40 | + <el-table-column label="称呼" align="center"> | |
| 16 | 41 | <template slot-scope="scope"> |
| 17 | 42 | <span>{{ scope.row.full_name }}</span> |
| 18 | 43 | </template> |
| 19 | 44 | </el-table-column> |
| 20 | - <el-table-column label="用户电话" align="center"> | |
| 45 | + <el-table-column label="手机号码" align="center"> | |
| 21 | 46 | <template slot-scope="scope"> |
| 22 | 47 | <span>{{ scope.row.phone }}</span> |
| 23 | 48 | </template> |
| 24 | 49 | </el-table-column> |
| 25 | - <el-table-column label="备用电话" align="center"> | |
| 50 | + <el-table-column label="备用手机" align="center"> | |
| 26 | 51 | <template slot-scope="scope"> |
| 27 | 52 | <span>{{ scope.row.updphone }}</span> |
| 28 | 53 | </template> |
| ... | ... | @@ -32,6 +57,49 @@ |
| 32 | 57 | <span>{{ scope.row.address }}</span> |
| 33 | 58 | </template> |
| 34 | 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 | 103 | <el-table-column label="性别" align="center" v-if="false"> |
| 36 | 104 | <template slot-scope="scope"> |
| 37 | 105 | <el-tag :type="scope.row.sex==0?'success':'warn'"> |
| ... | ... | @@ -44,13 +112,11 @@ |
| 44 | 112 | <span>{{ scope.row.birthday }}</span> |
| 45 | 113 | </template> |
| 46 | 114 | </el-table-column> |
| 47 | - <!-- <el-table-column label="用户角色" align="center"> | |
| 115 | + <el-table-column label="注册时间" align="center" v-if="false"> | |
| 48 | 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 | 118 | </template> |
| 53 | - </el-table-column> --> | |
| 119 | + </el-table-column> | |
| 54 | 120 | <el-table-column label="用户角色" align="center"> |
| 55 | 121 | <template slot-scope="scope"> |
| 56 | 122 | <el-tag :key="scope.row.type" type="warning" effect="dark"> |
| ... | ... | @@ -78,6 +144,10 @@ |
| 78 | 144 | </span> |
| 79 | 145 | <template #dropdown> |
| 80 | 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 | 151 | <el-dropdown-item command="a">升级成客户经理 |
| 82 | 152 | </el-dropdown-item> |
| 83 | 153 | <el-dropdown-item command="e">升级成推广专员 |
| ... | ... | @@ -93,9 +163,138 @@ |
| 93 | 163 | </template> |
| 94 | 164 | </el-table-column> |
| 95 | 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 | 167 | style="text-align: right;margin-top: 10px;"> |
| 98 | 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 | 298 | <el-dialog title="编辑" :visible.sync="dialogVisible" width="50%"> |
| 100 | 299 | |
| 101 | 300 | <el-form ref="form" :model="form" label-width="80px" :rules="rules"> |
| ... | ... | @@ -192,7 +391,7 @@ |
| 192 | 391 | </template> |
| 193 | 392 | </el-table-column> |
| 194 | 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 | 395 | style="text-align: right;margin-top: 10px;"> |
| 197 | 396 | </el-pagination> |
| 198 | 397 | <span slot="footer" class="dialog-footer"> |
| ... | ... | @@ -200,16 +399,99 @@ |
| 200 | 399 | <el-button type="primary" @click="dialogVisibleCar = false">确 定</el-button> |
| 201 | 400 | </span> |
| 202 | 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"> </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 | 481 | </div> |
| 204 | 482 | </template> |
| 205 | 483 | <script> |
| 206 | 484 | import { |
| 485 | + GetUserByCar, | |
| 207 | 486 | GetUserList, |
| 208 | 487 | UpdateUserType, |
| 209 | 488 | DeleteUser, |
| 210 | 489 | Save, |
| 211 | 490 | Blacklist, |
| 212 | - NoBlacklist | |
| 491 | + NoBlacklist, | |
| 492 | + GetUserListByInviteeUserId, | |
| 493 | + GetCommissionerByManage, | |
| 494 | + GetUserListBytManager | |
| 213 | 495 | } from '@/api/user' |
| 214 | 496 | import { |
| 215 | 497 | GetVehicleListByUser, |
| ... | ... | @@ -220,9 +502,13 @@ |
| 220 | 502 | data() { |
| 221 | 503 | return { |
| 222 | 504 | tableData: [], |
| 505 | + radiodata: '', | |
| 506 | + dialogVisibleCom: false, | |
| 507 | + dialogVisibleSub: false, | |
| 508 | + dialogVisibleT: false, | |
| 223 | 509 | dialogVisible: false, |
| 224 | 510 | dialogVisibleCar: false, |
| 225 | - dialogVisiblecommissioner:false, | |
| 511 | + dialogVisiblecommissioner: false, | |
| 226 | 512 | rules: { |
| 227 | 513 | username: [{ |
| 228 | 514 | required: true, |
| ... | ... | @@ -266,16 +552,34 @@ |
| 266 | 552 | }], |
| 267 | 553 | |
| 268 | 554 | }, |
| 555 | + //经理下面的专员 | |
| 556 | + CommiserList: [], | |
| 557 | + // 条数 | |
| 558 | + ComTotalCount: 0, | |
| 269 | 559 | userlist: [], |
| 560 | + // 该用户下级信息 | |
| 561 | + SubList: [], | |
| 270 | 562 | listLoading: true, |
| 271 | 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 | 583 | total: 0, |
| 280 | 584 | updateType: { |
| 281 | 585 | UserId: 0, |
| ... | ... | @@ -320,7 +624,29 @@ |
| 320 | 624 | CarDefaultModel: { |
| 321 | 625 | "id": 0, |
| 322 | 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 | 655 | this.GetUserListHeadler(); |
| 330 | 656 | }, |
| 331 | 657 | methods: { |
| 658 | + PagesManager(e) { | |
| 659 | + this.ManagerModel.PageIndex = e | |
| 660 | + this.ShowManager() | |
| 661 | + }, | |
| 332 | 662 | Pages(e) { |
| 333 | 663 | this.parameter.pageIndex = e |
| 334 | 664 | this.GetUserListHeadler() |
| 335 | 665 | }, |
| 666 | + PageSub(e) { | |
| 667 | + this.SubModel.PageIndex = e | |
| 668 | + this.ShowSub() | |
| 669 | + }, | |
| 336 | 670 | PagesCar(e) { |
| 337 | 671 | this.CarModel.PageIndex = e |
| 338 | 672 | this.ShowCar() |
| 339 | 673 | }, |
| 340 | 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 | 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 | 681 | console.log('经理', this.userlist) |
| 347 | 682 | this.listLoading = false; |
| 348 | 683 | }); |
| 349 | 684 | }, |
| 685 | + // 提交查询 | |
| 686 | + SubmitUser(){ | |
| 687 | + this.GetUserListHeadler() | |
| 688 | + }, | |
| 350 | 689 | handleCommand(value, val, item) { |
| 351 | 690 | if (value == "a") { |
| 352 | 691 | this.UpdateUserTypeHeadler(val); |
| ... | ... | @@ -360,71 +699,130 @@ |
| 360 | 699 | if (value == "d") { |
| 361 | 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 | 709 | this.BlacklistSubmit(val) |
| 369 | 710 | } |
| 370 | - if(value=='g'){ | |
| 711 | + if (value == 'g') { | |
| 371 | 712 | // 取消拉黑 |
| 372 | 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 | 752 | this.$message.success('拉黑成功') |
| 380 | 753 | this.GetUserListHeadler() |
| 381 | - }else{ | |
| 754 | + } else { | |
| 382 | 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 | 763 | this.$message.success('取消拉黑成功') |
| 391 | 764 | this.GetUserListHeadler() |
| 392 | - }else{ | |
| 765 | + } else { | |
| 393 | 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 | 828 | SetDefault(item) { |
| ... | ... | @@ -436,10 +834,10 @@ |
| 436 | 834 | this.CarDefaultModel.UserId = this.CarModel.UserId |
| 437 | 835 | UpdateCarDefault(this.CarDefaultModel).then(res => { |
| 438 | 836 | console.log('默认', res) |
| 439 | - if(res.data.code==200){ | |
| 837 | + if (res.data.code == 200) { | |
| 440 | 838 | this.$message.success('修改默认车辆成功') |
| 441 | 839 | this.ShowCar() |
| 442 | - }else{ | |
| 840 | + } else { | |
| 443 | 841 | this.$message.error(res.data.message) |
| 444 | 842 | } |
| 445 | 843 | }) |
| ... | ... | @@ -540,7 +938,7 @@ |
| 540 | 938 | }, |
| 541 | 939 | }) |
| 542 | 940 | } else { |
| 543 | - this.$confirm('升级成客户经理失败', '消息', { | |
| 941 | + this.$confirm(res.data.message, '消息', { | |
| 544 | 942 | confirmButtonText: '确认', |
| 545 | 943 | cancelButtonText: '取消' |
| 546 | 944 | }) | ... | ... |
src/views/user/managerTable.vue
| 1 | 1 | <template> |
| 2 | 2 | <div id="app" class="app-container"> |
| 3 | 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 | 6 | </el-form-item> |
| 7 | 7 | <el-form-item> |
| 8 | 8 | <el-button type="primary" @click="onSubmit">查询</el-button> |
| ... | ... | @@ -45,6 +45,16 @@ |
| 45 | 45 | <span>{{ scope.row.address }}</span> |
| 46 | 46 | </template> |
| 47 | 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 | 58 | <el-table-column label="性别" align="center" v-if="false"> |
| 49 | 59 | <template slot-scope="scope"> |
| 50 | 60 | <el-tag :type="scope.row.sex==0?'success':'warn'"> | ... | ... |