This commit is contained in:
faiz 2024-10-31 16:00:47 +08:00
parent f42ab11f4c
commit aecb0e3c93
36 changed files with 18570 additions and 17194 deletions

View File

@ -4,8 +4,8 @@ ENV = 'development'
# http://mer.crmeb.net/admin
# base api
# www.shop.xyz
VUE_APP_BASE_API = 'http://www.shop.xyz'
# VUE_APP_BASE_API = 'http://test.tropjoin.com'
# VUE_APP_BASE_API = 'http://www.shop.xyz'
VUE_APP_BASE_API = 'http://test.tropjoin.com'
# VUE_APP_BASE_API = 'https://api.tropjoin.com'
# socket 连接地址

View File

@ -1,51 +1,56 @@
# CRMEB多商户
# CRMEB 多商户
## 开发规范
统一使用ES6 语法
统一使用 ES6 语法
方法注释
/*
* th => 表头
* data => 数据
* fileName => 文件名
* fileType => 文件类型
* sheetName => sheet页名
*/
export default function toExcel ({ th, data, fileName, fileType, sheetName })
行注释 //
/\*
- th => 表头
- data => 数据
- fileName => 文件名
- fileType => 文件类型
- sheetName => sheet 页名
\*/
export default function toExcel ({ th, data, fileName, fileType, sheetName })
行注释 //
### 命名
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
例如:商品模块
product 商品
├─ product 商品管理
├─productList 商品管理目录
├- index.vue 首页
├─ product 商品管理
├─productList 商品管理目录
├- index.vue 首页
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
类名函数命名 大驼峰式 例如addUser
变量命名 小驼峰式 例如user 或者 userInfo _userinfo user-info
变量命名 小驼峰式 例如user 或者 userInfo \_userinfo user-info
常量 采用全大些下划线命名 例如VUE_APP_API_URl
### 文件管理规范
pages 页面模块必须件文件夹区分
api 接口一个模块一个文件
组建 一个组建一个文件夹
plugins 插件一个插件一个文件夹
vuex 路由状态管理一个模块在modules 中建一个文件夹
router 一个模块一个模块在modules 中建一个文件夹
style 样式尽量采用iView自带组建common.less 系统通用样式不要轻易动
自定义通用样式 style.less,每次添加必须加注释页面独立样式在在页面内写后缀less 格式
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
utils 自定义工具js 独立命名,一般不用新建文件夹
vuex 路由状态管理,一个模块在 modules 中建一个文件夹
router 一个模块一个模块在 modules 中建一个文件夹
style 样式尽量采用 iView 自带组建common.less 系统通用样式不要轻易动
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀 less 格式
组建样式 styles 中添加文件夹 composents 对应 components 目录新建样式文件
utils 自定义工具 js 独立命名,一般不用新建文件夹
## 模块命名
~~~
```
├─ login 登录
├─ dashboard 首页
├─ product 商品管理
├─ order 系统订单管理
├─ promoter 分销
├─ promoter 服务
├─ user 用户管理
├─ accounts 财务管理
├─ merchant 商户管理
@ -60,10 +65,13 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
├─ userFeedback 用户反馈
├─ error-page 错误页
~~~
```
## 目录结构
主要目录结构及说明:
~~~
```
├── public # 静态资源
│ ├── favicon.ico # favicon图标
@ -72,7 +80,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ ├── api # 所有接口api
│ │ └──request.js # 请求封装
│ │ └──accounts.js # 有关财务的接口
│ │ └──promoter.js # 有关分销的接口
│ │ └──promoter.js # 有关服务的接口
│ │ └──app.js # 有关应用(小程序、公众号)的接口
│ │ └──cms.js # 有关内容(文章管理、分类)的接口
│ │ └──home.js # 有关首页的接口
@ -126,9 +134,9 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ │ └──productExamine # 商品审核
│ │ └──productComment # 商品评论管理
│ │ └──order # 订单管理
│ │ └──promoter # 分销
│ │ └──user # 分销员列表
│ │ └──config # 分销设置
│ │ └──promoter # 服务
│ │ └──user # 服务员列表
│ │ └──config # 服务设置
│ │ └──cms # 内容
│ │ └──addArticle # 添加文章/编辑文章
│ │ └──article # 文章管理
@ -162,7 +170,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ │ └──picture # 素材管理
│ │ └──groupData # 组合设置
│ │ └──list # 组合数据
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/分销特权/分销海报/充值金额配置
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/服务特权/服务海报/充值金额配置
│ │ └──setting # 设置-权限管理
│ │ └──systemRole # 身份管理
│ │ └──systemAdmin # 管理员管理
@ -200,7 +208,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ │ └──merchant.js # 有关商户
│ │ └──order.js # 有关订单
│ │ └──product.js # 有关商品
│ │ └──promoter.js # 有关分销
│ │ └──promoter.js # 有关服务
│ │ └──routine.js # 有关小程序
│ │ └──safe.js # 有关维护
│ │ └──setting.js # 有关权限
@ -225,9 +233,11 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
├── postcss.config.js # postcss 配置
└── package.json # package.json
~~~
```
## 开发打包项目
~~~
````
# 进入项目目录
$ cd admin-iView
@ -260,4 +270,5 @@ npm run lint
# code format check and auto fix
npm run lint -- --fix
```
```
````

View File

@ -1,51 +1,56 @@
# CRMEB多商户
# CRMEB 多商户
## 开发规范
统一使用ES6 语法
统一使用 ES6 语法
方法注释
/*
* th => 表头
* data => 数据
* fileName => 文件名
* fileType => 文件类型
* sheetName => sheet页名
*/
export default function toExcel ({ th, data, fileName, fileType, sheetName })
行注释 //
/\*
- th => 表头
- data => 数据
- fileName => 文件名
- fileType => 文件类型
- sheetName => sheet 页名
\*/
export default function toExcel ({ th, data, fileName, fileType, sheetName })
行注释 //
### 命名
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
例如:商品模块
product 商品
├─ product 商品管理
├─productList 商品管理目录
├- index.vue 首页
├─ product 商品管理
├─productList 商品管理目录
├- index.vue 首页
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
类名函数命名 大驼峰式 例如addUser
变量命名 小驼峰式 例如user 或者 userInfo _userinfo user-info
变量命名 小驼峰式 例如user 或者 userInfo \_userinfo user-info
常量 采用全大些下划线命名 例如VUE_APP_API_URl
### 文件管理规范
pages 页面模块必须件文件夹区分
api 接口一个模块一个文件
组建 一个组建一个文件夹
plugins 插件一个插件一个文件夹
vuex 路由状态管理一个模块在modules 中建一个文件夹
router 一个模块一个模块在modules 中建一个文件夹
style 样式尽量采用iView自带组建common.less 系统通用样式不要轻易动
自定义通用样式 style.less,每次添加必须加注释页面独立样式在在页面内写后缀less 格式
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
utils 自定义工具js 独立命名,一般不用新建文件夹
vuex 路由状态管理,一个模块在 modules 中建一个文件夹
router 一个模块一个模块在 modules 中建一个文件夹
style 样式尽量采用 iView 自带组建common.less 系统通用样式不要轻易动
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀 less 格式
组建样式 styles 中添加文件夹 composents 对应 components 目录新建样式文件
utils 自定义工具 js 独立命名,一般不用新建文件夹
## 模块命名
~~~
```
├─ login 登录
├─ dashboard 首页
├─ product 商品管理
├─ order 系统订单管理
├─ promoter 分销
├─ promoter 服务
├─ user 用户管理
├─ accounts 财务管理
├─ merchant 商户管理
@ -60,10 +65,13 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
├─ userFeedback 用户反馈
├─ error-page 错误页
~~~
```
## 目录结构
主要目录结构及说明:
~~~
```
├── public # 静态资源
│ ├── favicon.ico # favicon图标
@ -72,7 +80,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ ├── api # 所有接口api
│ │ └──request.js # 请求封装
│ │ └──accounts.js # 有关财务的接口
│ │ └──promoter.js # 有关分销的接口
│ │ └──promoter.js # 有关服务的接口
│ │ └──app.js # 有关应用(小程序、公众号)的接口
│ │ └──cms.js # 有关内容(文章管理、分类)的接口
│ │ └──home.js # 有关首页的接口
@ -126,9 +134,9 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ │ └──productExamine # 商品审核
│ │ └──productComment # 商品评论管理
│ │ └──order # 订单管理
│ │ └──promoter # 分销
│ │ └──user # 分销员列表
│ │ └──config # 分销设置
│ │ └──promoter # 服务
│ │ └──user # 服务员列表
│ │ └──config # 服务设置
│ │ └──cms # 内容
│ │ └──addArticle # 添加文章/编辑文章
│ │ └──article # 文章管理
@ -162,7 +170,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ │ └──picture # 素材管理
│ │ └──groupData # 组合设置
│ │ └──list # 组合数据
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/分销特权/分销海报/充值金额配置
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/服务特权/服务海报/充值金额配置
│ │ └──setting # 设置-权限管理
│ │ └──systemRole # 身份管理
│ │ └──systemAdmin # 管理员管理
@ -200,7 +208,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ │ └──merchant.js # 有关商户
│ │ └──order.js # 有关订单
│ │ └──product.js # 有关商品
│ │ └──promoter.js # 有关分销
│ │ └──promoter.js # 有关服务
│ │ └──routine.js # 有关小程序
│ │ └──safe.js # 有关维护
│ │ └──setting.js # 有关权限
@ -225,9 +233,11 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
├── postcss.config.js # postcss 配置
└── package.json # package.json
~~~
```
## 开发打包项目
~~~
````
# 进入项目目录
$ cd admin-iView
@ -260,4 +270,5 @@ npm run lint
# code format check and auto fix
npm run lint -- --fix
```
```
````

View File

@ -1,4 +1,4 @@
# CRMEB多商户
# CRMEB 多商户
```bash
@ -7,52 +7,56 @@ cp -r dist/. ../shop-many/public/
```
## 开发规范
统一使用ES6 语法
统一使用 ES6 语法
方法注释
/*
* th => 表头
* data => 数据
* fileName => 文件名
* fileType => 文件类型
* sheetName => sheet页名
*/
export default function toExcel ({ th, data, fileName, fileType, sheetName })
行注释 //
/\*
- th => 表头
- data => 数据
- fileName => 文件名
- fileType => 文件类型
- sheetName => sheet 页名
\*/
export default function toExcel ({ th, data, fileName, fileType, sheetName })
行注释 //
### 命名
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
例如:商品模块
product 商品
├─ product 商品管理
├─productList 商品管理目录
├- index.vue 首页
├─ product 商品管理
├─productList 商品管理目录
├- index.vue 首页
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
类名函数命名 大驼峰式 例如addUser
变量命名 小驼峰式 例如user 或者 userInfo _userinfo user-info
变量命名 小驼峰式 例如user 或者 userInfo \_userinfo user-info
常量 采用全大些下划线命名 例如VUE_APP_API_URl
### 文件管理规范
pages 页面模块必须件文件夹区分
api 接口一个模块一个文件
组建 一个组建一个文件夹
plugins 插件一个插件一个文件夹
vuex 路由状态管理一个模块在modules 中建一个文件夹
router 一个模块一个模块在modules 中建一个文件夹
style 样式尽量采用iView自带组建common.less 系统通用样式不要轻易动
自定义通用样式 style.less,每次添加必须加注释页面独立样式在在页面内写后缀less 格式
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
utils 自定义工具js 独立命名,一般不用新建文件夹
vuex 路由状态管理,一个模块在 modules 中建一个文件夹
router 一个模块一个模块在 modules 中建一个文件夹
style 样式尽量采用 iView 自带组建common.less 系统通用样式不要轻易动
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀 less 格式
组建样式 styles 中添加文件夹 composents 对应 components 目录新建样式文件
utils 自定义工具 js 独立命名,一般不用新建文件夹
## 模块命名
~~~
```
├─ login 登录
├─ dashboard 首页
├─ product 商品管理
├─ order 系统订单管理
├─ promoter 分销
├─ promoter 服务
├─ user 用户管理
├─ accounts 财务管理
├─ merchant 商户管理
@ -67,9 +71,11 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
├─ userFeedback 用户反馈
├─ error-page 错误页
~~~
```
## 开发打包项目
~~~
````
# 进入项目目录
$ cd admin-iView
@ -102,4 +108,5 @@ npm run lint
# code format check and auto fix
npm run lint -- --fix
```
```
````

View File

@ -1,51 +1,56 @@
# CRMEB多商户
# CRMEB 多商户
## 开发规范
统一使用ES6 语法
统一使用 ES6 语法
方法注释
/*
* th => 表头
* data => 数据
* fileName => 文件名
* fileType => 文件类型
* sheetName => sheet页名
*/
export default function toExcel ({ th, data, fileName, fileType, sheetName })
行注释 //
/\*
- th => 表头
- data => 数据
- fileName => 文件名
- fileType => 文件类型
- sheetName => sheet 页名
\*/
export default function toExcel ({ th, data, fileName, fileType, sheetName })
行注释 //
### 命名
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
例如:商品模块
product 商品
├─ product 商品管理
├─productList 商品管理目录
├- index.vue 首页
├─ product 商品管理
├─productList 商品管理目录
├- index.vue 首页
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
类名函数命名 大驼峰式 例如addUser
变量命名 小驼峰式 例如user 或者 userInfo _userinfo user-info
变量命名 小驼峰式 例如user 或者 userInfo \_userinfo user-info
常量 采用全大些下划线命名 例如VUE_APP_API_URl
### 文件管理规范
pages 页面模块必须件文件夹区分
api 接口一个模块一个文件
组建 一个组建一个文件夹
plugins 插件一个插件一个文件夹
vuex 路由状态管理一个模块在modules 中建一个文件夹
router 一个模块一个模块在modules 中建一个文件夹
style 样式尽量采用iView自带组建common.less 系统通用样式不要轻易动
自定义通用样式 style.less,每次添加必须加注释页面独立样式在在页面内写后缀less 格式
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
utils 自定义工具js 独立命名,一般不用新建文件夹
vuex 路由状态管理,一个模块在 modules 中建一个文件夹
router 一个模块一个模块在 modules 中建一个文件夹
style 样式尽量采用 iView 自带组建common.less 系统通用样式不要轻易动
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀 less 格式
组建样式 styles 中添加文件夹 composents 对应 components 目录新建样式文件
utils 自定义工具 js 独立命名,一般不用新建文件夹
## 模块命名
~~~
```
├─ login 登录
├─ dashboard 首页
├─ product 商品管理
├─ order 系统订单管理
├─ promoter 分销
├─ promoter 服务
├─ user 用户管理
├─ accounts 财务管理
├─ merchant 商户管理
@ -60,10 +65,13 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
├─ userFeedback 用户反馈
├─ error-page 错误页
~~~
```
## 目录结构
主要目录结构及说明:
~~~
```
├── public # 静态资源
│ ├── favicon.ico # favicon图标
@ -72,7 +80,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ ├── api # 所有接口api
│ │ └──request.js # 请求封装
│ │ └──accounts.js # 有关财务的接口
│ │ └──promoter.js # 有关分销的接口
│ │ └──promoter.js # 有关服务的接口
│ │ └──app.js # 有关应用(小程序、公众号)的接口
│ │ └──cms.js # 有关内容(文章管理、分类)的接口
│ │ └──home.js # 有关首页的接口
@ -126,9 +134,9 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ │ └──productExamine # 商品审核
│ │ └──productComment # 商品评论管理
│ │ └──order # 订单管理
│ │ └──promoter # 分销
│ │ └──user # 分销员列表
│ │ └──config # 分销设置
│ │ └──promoter # 服务
│ │ └──user # 服务员列表
│ │ └──config # 服务设置
│ │ └──cms # 内容
│ │ └──addArticle # 添加文章/编辑文章
│ │ └──article # 文章管理
@ -162,7 +170,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ │ └──picture # 素材管理
│ │ └──groupData # 组合设置
│ │ └──list # 组合数据
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/分销特权/分销海报/充值金额配置
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/服务特权/服务海报/充值金额配置
│ │ └──setting # 设置-权限管理
│ │ └──systemRole # 身份管理
│ │ └──systemAdmin # 管理员管理
@ -200,7 +208,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
│ │ └──merchant.js # 有关商户
│ │ └──order.js # 有关订单
│ │ └──product.js # 有关商品
│ │ └──promoter.js # 有关分销
│ │ └──promoter.js # 有关服务
│ │ └──routine.js # 有关小程序
│ │ └──safe.js # 有关维护
│ │ └──setting.js # 有关权限
@ -225,9 +233,11 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
├── postcss.config.js # postcss 配置
└── package.json # package.json
~~~
```
## 开发打包项目
~~~
````
# 进入项目目录
$ cd admin-iView
@ -260,4 +270,5 @@ npm run lint
# code format check and auto fix
npm run lint -- --fix
```
```
````

View File

@ -2,49 +2,49 @@
import request from './request'
/**
* @description 分销设置 -- 详情
* @description 服务设置 -- 详情
*/
export function configApi() {
return request.get('config/others/lst')
}
/**
* @description 分销设置 -- 表单提交
* @description 服务设置 -- 表单提交
*/
export function configUpdateApi(data) {
return request.post('config/others/update', data)
}
/**
* @description 分销设置 -- 表单提交
* @description 服务设置 -- 表单提交
*/
export function productCheckApi() {
return request.post('store/product/check')
}
/**
* @description 分销-- 列表
* @description 服务-- 列表
*/
export function promoterListApi(data) {
return request.get('user/promoter/lst', data)
}
/**
* @description 推广-- 列表
* @description 邀请-- 列表
*/
export function spreadListApi(uid, data) {
return request.get(`user/spread/lst/${uid}`, data)
}
/**
* @description 推广人订单 -- 列表
* @description 邀请人订单 -- 列表
*/
export function spreadOrderListApi(uid, data) {
return request.get(`user/spread/order/${uid}`, data)
}
/**
* @description 推广人 -- 清除上级推广
* @description 邀请人 -- 清除邀请
*/
export function spreadClearApi(uid) {
return request.post(`user/spread/clear/${uid}`)
@ -122,67 +122,67 @@ export function updateEextensionApi(type, data) {
return request.post(`agreement/${type}`, data)
}
/**
* @description 分销等级 -- 获取分销等级规则
* @description 服务等级 -- 获取服务等级规则
*/
export function getBrokerageApi(key) {
return request.get(`agreement/${key}`)
}
/**
* @description 分销等级 -- 编辑分销等级规则
* @description 服务等级 -- 编辑服务等级规则
*/
export function updateBrokerageApi(type, data) {
return request.post(`agreement/${type}`, data)
}
/**
* @description 分销等级 -- 添加
* @description 服务等级 -- 添加
*/
export function membershipDataAddApi(data) {
return request.post(`user/brokerage/create`, data)
}
/**
* @description 分销等级 -- 列表
* @description 服务等级 -- 列表
*/
export function distributionLevelLst(data) {
return request.get(`user/brokerage/lst`, data)
}
/**
* @description 分销等级 -- 列表
* @description 服务等级 -- 列表
*/
export function distributionDetail(id) {
return request.get(`user/brokerage/detail/${id}`)
}
/**
* @description 分销等级 -- 编辑
* @description 服务等级 -- 编辑
*/
export function distributionUpdate(id, data) {
return request.post(`user/brokerage/update/${id}`, data)
}
/**
* @description 分销等级 -- 删除
* @description 服务等级 -- 删除
*/
export function distributionDelete(id) {
return request.delete(`user/brokerage/delete/${id}`)
}
/**
* @description 分销员列表 -- 获取分销等级
* @description 服务员列表 -- 获取服务等级
*/
export function getDistributionLevel() {
return request.get(`user/brokerage/options`)
}
/**
* @description 分销员列表 -- 获取分销数据
* @description 服务员列表 -- 获取服务数据
*/
export function distributionStatistics(data) {
return request.get(`user/promoter/count`, data)
}
/**
* @description 分销员列表 -- 编辑分销员等级
* @description 服务员列表 -- 编辑服务员等级
*/
export function distributionLevelUpdate(id) {
return request.get(`user/spread/${id}/form`)
}
/**
* @description 分销订单 -- 列表
* @description 服务订单 -- 列表
*/
export function spreadOrderLst(data) {
return request.get('spread/order/lst', data)

View File

@ -148,7 +148,7 @@ export function batchChangeGroupApi(data) {
return request.get(`user/batch_change_group/form`, data)
}
/**
* @description 用户列表 -- 设置分销
* @description 用户列表 -- 设置服务
*/
export function changePrommoterApi(data) {
return request.get(`user/batch_spread_form`, data)

View File

@ -92,8 +92,8 @@ export default {
//
swiperConfig: {
title:
"最多可添加10张图片建议宽度750*345px鼠标拖拽左侧圆点可调整图片 顺序",
maxList: 10,
"最多可添加20张图片建议宽度750*345px鼠标拖拽左侧圆点可调整图片 顺序",
maxList: 20,
list: [
{
img: "",

View File

@ -119,8 +119,8 @@ export default {
},
//
swiperConfig: {
title: '最多可添加10张图片建议宽度750*345px鼠标拖拽左侧圆点可调整图片顺序',
maxList: 10,
title: '最多可添加20张图片建议宽度750*345px鼠标拖拽左侧圆点可调整图片顺序',
maxList: 20,
isSmall: true,
list: [
{

View File

@ -16,7 +16,7 @@ const promoterRouter =
path: 'config',
name: 'PromoterConfig',
meta: {
title: '分销配置',
title: '服务配置',
noCache: true
},
component: () => import('@/views/promoter/config/index')
@ -43,7 +43,7 @@ const promoterRouter =
path: 'user',
name: 'AccountsUser',
meta: {
title: '分销员列表',
title: '服务员列表',
noCache: true
},
component: () => import('@/views/promoter/user/index')
@ -52,7 +52,7 @@ const promoterRouter =
path: 'orderList',
name: 'OrderList',
meta: {
title: '分销订单',
title: '服务订单',
noCache: true
},
component: () => import('@/views/promoter/order/index')
@ -79,7 +79,7 @@ const promoterRouter =
path: 'gift',
name: 'AccountsGift',
meta: {
title: '分销礼包',
title: '服务礼包',
noCache: true
},
component: () => import('@/views/promoter/gift/index')
@ -88,7 +88,7 @@ const promoterRouter =
path: 'membership_level',
name: 'PromoterLevel',
meta: {
title: '分销等级',
title: '服务等级',
noCache: true
},
component: () => import('@/views/promoter/membershipLevel/index')
@ -97,7 +97,7 @@ const promoterRouter =
path: 'distribution',
name: 'distributionRules',
meta: {
title: '分销等级规则',
title: '服务等级规则',
noCache: true
},
component: () => import('@/views/promoter/distributionRules/index')

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,7 @@
"font_family": "iconfont",
"css_prefix_text": "icon",
"description": "",
"glyphs": [
{
"glyphs": [{
"icon_id": "38535244",
"name": "待发货-积分",
"font_class": "daifahuo-jifen",
@ -490,7 +489,7 @@
},
{
"icon_id": "37924885",
"name": "待核销-分销礼包",
"name": "待核销-服务礼包",
"font_class": "daihexiao-fenxiaolibao",
"unicode": "e72e",
"unicode_decimal": 59182
@ -553,7 +552,7 @@
},
{
"icon_id": "37107580",
"name": "分销管理",
"name": "服务管理",
"font_class": "fenxiaoguanli",
"unicode": "e721",
"unicode_decimal": 59169
@ -784,7 +783,7 @@
},
{
"icon_id": "34383556",
"name": "推广人数",
"name": "邀请人数",
"font_class": "tuiguangrenshu",
"unicode": "e6c1",
"unicode_decimal": 59073

View File

@ -4,8 +4,7 @@
"font_family": "iconfont",
"css_prefix_text": "icon",
"description": "",
"glyphs": [
{
"glyphs": [{
"icon_id": "38535244",
"name": "待发货-积分",
"font_class": "daifahuo-jifen",
@ -490,7 +489,7 @@
},
{
"icon_id": "37924885",
"name": "待核销-分销礼包",
"name": "待核销-服务礼包",
"font_class": "daihexiao-fenxiaolibao",
"unicode": "e72e",
"unicode_decimal": 59182
@ -553,7 +552,7 @@
},
{
"icon_id": "37107580",
"name": "分销管理",
"name": "服务管理",
"font_class": "fenxiaoguanli",
"unicode": "e721",
"unicode_decimal": 59169
@ -784,7 +783,7 @@
},
{
"icon_id": "34383556",
"name": "推广人数",
"name": "邀请人数",
"font_class": "tuiguangrenshu",
"unicode": "e6c1",
"unicode_decimal": 59073

View File

@ -374,13 +374,13 @@
<li class="dib">
<span class="icon iconfont">&#xe7e9;</span>
<div class="name">分销订单</div>
<div class="name">服务订单</div>
<div class="code-name">&amp;#xe7e9;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe7ea;</span>
<div class="name">推广人排行</div>
<div class="name">邀请人排行</div>
<div class="code-name">&amp;#xe7ea;</div>
</li>
@ -566,7 +566,7 @@
<li class="dib">
<span class="icon iconfont">&#xe7cf;</span>
<div class="name">推广人排行</div>
<div class="name">邀请人排行</div>
<div class="code-name">&amp;#xe7cf;</div>
</li>
@ -1226,7 +1226,7 @@
<li class="dib">
<span class="icon iconfont">&#xe742;</span>
<div class="name">分销等级</div>
<div class="name">服务等级</div>
<div class="code-name">&amp;#xe742;</div>
</li>
@ -1784,7 +1784,7 @@
<li class="dib">
<span class="icon iconfont">&#xe6d8;</span>
<div class="name">我的推广</div>
<div class="name">我的邀请</div>
<div class="code-name">&amp;#xe6d8;</div>
</li>
@ -2558,7 +2558,7 @@
<li class="dib">
<span class="icon iconfont">&#xe63b;</span>
<div class="name">推广</div>
<div class="name">邀请</div>
<div class="code-name">&amp;#xe63b;</div>
</li>
@ -4165,7 +4165,7 @@
<li class="dib">
<span class="icon iconfont icon-fenxiaodingdan"></span>
<div class="name">
分销订单
服务订单
</div>
<div class="code-name">.icon-fenxiaodingdan
</div>
@ -4174,7 +4174,7 @@
<li class="dib">
<span class="icon iconfont icon-tuiguangrenpaihang1"></span>
<div class="name">
推广人排行
邀请人排行
</div>
<div class="code-name">.icon-tuiguangrenpaihang1
</div>
@ -4453,7 +4453,7 @@
<li class="dib">
<span class="icon iconfont icon-tuiguangrenpaihang"></span>
<div class="name">
推广人排行
邀请人排行
</div>
<div class="code-name">.icon-tuiguangrenpaihang
</div>
@ -5443,7 +5443,7 @@
<li class="dib">
<span class="icon iconfont icon-fenxiaodengji"></span>
<div class="name">
分销等级
服务等级
</div>
<div class="code-name">.icon-fenxiaodengji
</div>
@ -6280,7 +6280,7 @@
<li class="dib">
<span class="icon iconfont icon-wodetuiguang"></span>
<div class="name">
我的推广
我的邀请
</div>
<div class="code-name">.icon-wodetuiguang
</div>
@ -7441,7 +7441,7 @@
<li class="dib">
<span class="icon iconfont icon-tuiguang"></span>
<div class="name">
推广
邀请
</div>
<div class="code-name">.icon-tuiguang
</div>
@ -9523,7 +9523,7 @@
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fenxiaodingdan"></use>
</svg>
<div class="name">分销订单</div>
<div class="name">服务订单</div>
<div class="code-name">#icon-fenxiaodingdan</div>
</li>
@ -9531,7 +9531,7 @@
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-tuiguangrenpaihang1"></use>
</svg>
<div class="name">推广人排行</div>
<div class="name">邀请人排行</div>
<div class="code-name">#icon-tuiguangrenpaihang1</div>
</li>
@ -9779,7 +9779,7 @@
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-tuiguangrenpaihang"></use>
</svg>
<div class="name">推广人排行</div>
<div class="name">邀请人排行</div>
<div class="code-name">#icon-tuiguangrenpaihang</div>
</li>
@ -10659,7 +10659,7 @@
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fenxiaodengji"></use>
</svg>
<div class="name">分销等级</div>
<div class="name">服务等级</div>
<div class="code-name">#icon-fenxiaodengji</div>
</li>
@ -11403,7 +11403,7 @@
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-wodetuiguang"></use>
</svg>
<div class="name">我的推广</div>
<div class="name">我的邀请</div>
<div class="code-name">#icon-wodetuiguang</div>
</li>
@ -12435,7 +12435,7 @@
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-tuiguang"></use>
</svg>
<div class="name">推广</div>
<div class="name">邀请</div>
<div class="code-name">#icon-tuiguang</div>
</li>

View File

@ -370,14 +370,14 @@
},
{
"icon_id": "28548808",
"name": "分销订单",
"name": "服务订单",
"font_class": "fenxiaodingdan",
"unicode": "e7e9",
"unicode_decimal": 59369
},
{
"icon_id": "28548809",
"name": "推广人排行",
"name": "邀请人排行",
"font_class": "tuiguangrenpaihang1",
"unicode": "e7ea",
"unicode_decimal": 59370
@ -594,7 +594,7 @@
},
{
"icon_id": "28009481",
"name": "推广人排行",
"name": "邀请人排行",
"font_class": "tuiguangrenpaihang",
"unicode": "e7cf",
"unicode_decimal": 59343
@ -1364,7 +1364,7 @@
},
{
"icon_id": "21903923",
"name": "分销等级",
"name": "服务等级",
"font_class": "fenxiaodengji",
"unicode": "e742",
"unicode_decimal": 59202
@ -2015,7 +2015,7 @@
},
{
"icon_id": "17580220",
"name": "我的推广",
"name": "我的邀请",
"font_class": "wodetuiguang",
"unicode": "e6d8",
"unicode_decimal": 59096
@ -2918,7 +2918,7 @@
},
{
"icon_id": "539040",
"name": "推广",
"name": "邀请",
"font_class": "tuiguang",
"unicode": "e63b",
"unicode_decimal": 58939

View File

@ -1,33 +1,55 @@
<template>
<div class="box-card statistics">
<div class="box-card statistics">
<el-row :gutter="14" v-if="statisticsData" class="panel-group">
<el-col :span="8" class="content">
<div class="card-panel">
<div class="card-panel-description">
<div class="card-panel-text">
<span class="card-order">新增用户</span>
<span class="card-date">今日</span>
</div>
<count-to
:start-val="0"
:end-val="statisticsData.today.userNum"
:duration="3000"
class="card-panel-num"
/>
<div class="card-panel-compared">
周环比
<i :class="Number(statisticsData.lastWeekRate.userNum)>=0?'up':'down'">
{{ statisticsData.lastWeekRate.userNum ? (statisticsData.lastWeekRate.userNum*100*1000/1000).toFixed(2) : 0.00 }}%</i>
<i :class="Number(statisticsData.lastWeekRate.userNum)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" />
</div>
<div class="card-panel-date">
<span class="date_text">昨日数据</span>
<span class="date_num">{{ statisticsData.yesterday.userNum }}</span>
</div>
</div>
</div>
</el-col>
<!-- <el-col :span="8" class="content">
<el-col :span="8" class="content">
<div class="card-panel">
<div class="card-panel-description">
<div class="card-panel-text">
<span class="card-order">新增用户</span>
<span class="card-date">今日</span>
</div>
<count-to
:start-val="0"
:end-val="statisticsData.today.userNum"
:duration="3000"
class="card-panel-num"
/>
<div class="card-panel-compared">
周环比
<i
:class="
Number(statisticsData.lastWeekRate.userNum) >= 0
? 'up'
: 'down'
"
>
{{
statisticsData.lastWeekRate.userNum
? (
(statisticsData.lastWeekRate.userNum * 100 * 1000) /
1000
).toFixed(2)
: 0.0
}}%</i
>
<i
:class="
Number(statisticsData.lastWeekRate.userNum) >= 0
? 'el-icon-caret-top'
: 'el-icon-caret-bottom'
"
/>
</div>
<div class="card-panel-date">
<span class="date_text">昨日数据</span>
<span class="date_num">{{
statisticsData.yesterday.userNum
}}</span>
</div>
</div>
</div>
</el-col>
<!-- <el-col :span="8" class="content">
<div class="card-panel">
<div class="card-panel-description">
<div class="card-panel-text">
@ -53,53 +75,78 @@
</div>
</div>
</el-col> -->
<el-col :span="8" class="content" style="border:none">
<div class="card-panel">
<div class="card-panel-description">
<div class="card-panel-text">
<span class="card-order">店铺数</span>
<span class="card-date">今日</span>
</div>
<count-to
:start-val="0"
:end-val="statisticsData.today.storeNum"
:duration="3000"
class="card-panel-num"
/>
<div class="card-panel-compared">
周环比
<i :class="Number(statisticsData.lastWeekRate.storeNum)>=0?'up':'down'">
{{ statisticsData.lastWeekRate.storeNum ? (statisticsData.lastWeekRate.storeNum*100*1000/1000).toFixed(2) : 0.00 }}%</i>
<i :class="Number(statisticsData.lastWeekRate.storeNum)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" />
</div>
<div class="card-panel-date">
<span class="date_text">昨日数据</span>
<span class="date_num">{{ statisticsData.yesterday.storeNum }}</span>
</div>
</div>
<el-col :span="8" class="content" style="border: none">
<div class="card-panel">
<div class="card-panel-description">
<div class="card-panel-text">
<span class="card-order">店铺数</span>
<span class="card-date">今日</span>
</div>
</el-col>
<el-col :span="8" class="content">
<div class="card-panel">
<div class="card-panel-description">
<div class="card-panel-text">
<span class="card-order">{{ statisticsData.prize.title }}</span>
<!-- <span class="card-date">今日</span> -->
</div>
<div class="card-panel-box">
<div class="card-panel-content" v-for="item in statisticsData.prize.list">
<count-to
:start-val="0"
:end-val="item.c"
:duration="3000"
class="card-panel-num"
/>
<span>{{ item.u }}</span>
</div>
</div>
</div>
<count-to
:start-val="0"
:end-val="statisticsData.today.storeNum"
:duration="3000"
class="card-panel-num"
/>
<div class="card-panel-compared">
周环比
<i
:class="
Number(statisticsData.lastWeekRate.storeNum) >= 0
? 'up'
: 'down'
"
>
{{
statisticsData.lastWeekRate.storeNum
? (
(statisticsData.lastWeekRate.storeNum * 100 * 1000) /
1000
).toFixed(2)
: 0.0
}}%</i
>
<i
:class="
Number(statisticsData.lastWeekRate.storeNum) >= 0
? 'el-icon-caret-top'
: 'el-icon-caret-bottom'
"
/>
</div>
</el-col>
<div class="card-panel-date">
<span class="date_text">昨日数据</span>
<span class="date_num">{{
statisticsData.yesterday.storeNum
}}</span>
</div>
</div>
</div>
</el-col>
<el-col :span="8" class="content">
<div class="card-panel">
<div class="card-panel-description">
<div class="card-panel-text">
<span class="card-order">{{ statisticsData.prize.title }}</span>
<!-- <span class="card-date">今日</span> -->
</div>
<div class="card-panel-box">
<div
class="card-panel-content"
v-for="item in statisticsData.prize.list"
>
<count-to
:start-val="0"
:end-val="item.c"
:duration="3000"
class="card-panel-num"
/>
<span>{{ item.u }}</span>
</div>
</div>
</div>
</div>
</el-col>
</el-row>
<!-- <el-row :gutter="14" class="panel-group-count">
<el-col :span="3" class="card-panel-item">
@ -130,7 +177,7 @@
<router-link :to=" { path:`${roterPre}` + '/promoter/user' } ">
<div class="card-panel-count">
<span class="iconfont icon-fenxiaoguanli" style="color: #B27FEB;"></span>
<span class="panel-text">分销管理</span>
<span class="panel-text">服务管理</span>
</div>
</router-link>
</el-col>
@ -167,62 +214,63 @@
</router-link>
</el-col>
</el-row> -->
</div>
</div>
</template>
<script>
import CountTo from "vue-count-to";
import { roterPre } from '@/settings'
import { statisticsApi } from '@/api/home'
import { roterPre } from "@/settings";
import { statisticsApi } from "@/api/home";
export default {
name: 'BaseInfo',
components: {
CountTo
},
data() {
return {
statisticsData: {
prize:{
list:[],
title:''
}
name: "BaseInfo",
components: {
CountTo,
},
data() {
return {
statisticsData: {
prize: {
list: [],
title: "",
},
roterPre: roterPre,
},
roterPre: roterPre,
};
},
mounted() {
this.getList();
},
methods: {
getdate() {
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = year + " 年 " + month + " 月 " + strDate + " 日 ";
return currentdate;
},
mounted() {
this.getList()
getList() {
this.listLoading = true;
statisticsApi(this.tableFrom)
.then((res) => {
if (res.status === 200) {
this.statisticsData = res.data;
}
this.listLoading = false;
})
.catch((res) => {
this.listLoading = false;
this.$message.error(res.message);
});
},
methods: {
getdate() {
var date = new Date()
var year = date.getFullYear()
var month = date.getMonth() + 1
var strDate = date.getDate()
if (month >= 1 && month <= 9) {
month = '0' + month
}
if (strDate >= 0 && strDate <= 9) {
strDate = '0' + strDate
}
var currentdate = year + ' 年 ' + month + ' 月 ' + strDate + ' 日 '
return currentdate
},
getList() {
this.listLoading = true
statisticsApi(this.tableFrom).then(res => {
if(res.status === 200){
this.statisticsData = res.data
}
this.listLoading = false
}).catch(res => {
this.listLoading = false
this.$message.error(res.message)
})
}
}
}
},
};
</script>
<style lang="scss" scoped>
@ -233,13 +281,13 @@ export default {
.up,
.el-icon-caret-top {
color: #F5222D;
color: #f5222d;
font-size: 12px;
opacity: 1 !important;
}
.down,
.el-icon-caret-bottom {
color: #39C15B;
color: #39c15b;
font-size: 12px;
opacity: 1;
}
@ -251,7 +299,7 @@ export default {
}
&-time {
font-size: 12px;
color: #8C8C8C;
color: #8c8c8c;
}
}
.card-panel {
@ -259,19 +307,19 @@ export default {
font-size: 14px;
position: relative;
overflow: hidden;
color: #8C8C8C;
color: #8c8c8c;
background: #fff;
position: relative;
min-height: 182px;
}
.card-panel-box{
.card-panel-box {
display: flex;
align-items: center;
justify-content: space-around;
margin-top: 50px;
flex-wrap: wrap;
}
.card-panel-content{
.card-panel-content {
flex: 1;
flex-basis: 33%;
text-align: center;
@ -280,21 +328,21 @@ export default {
padding: 0 20px;
margin-top: 19px;
.card-panel-text {
line-height: 18px;
line-height: 18px;
margin-bottom: 12px;
font-weight: normal;
align-items: center;
justify-content: space-between;
display: flex;
.card-order{
.card-order {
color: #303133;
font-size: 16px;
}
.card-date{
border: 1px solid #6394F9;
.card-date {
border: 1px solid #6394f9;
border-radius: 3px;
color: #6394F9;
background: #F4F7FF;
color: #6394f9;
background: #f4f7ff;
text-align: center;
line-height: 20px;
width: 38px;
@ -307,60 +355,60 @@ export default {
}
}
.card-panel-compared {
margin: 15px 0;
margin: 15px 0;
}
.card-panel-date{
border-top: 1px solid #EEEEEE;
.card-panel-date {
border-top: 1px solid #eeeeee;
display: flex;
align-items: center;
justify-content: space-between;
padding: 13px 0;
}
.content {
&-is {
opacity: 1%;
}
&-title {
font-size: 14px;
color: #000000;
margin-bottom: 5px;
}
&-time {
font-size: 12px;
color: #8c8c8c;
margin-bottom: 5px;
}
&-number {
font-size: 30px;
}
.content-title {
display: flex;
align-items: center;
justify-content: space-between;
padding: 13px 0;
}
.content {
&-is {
opacity: 1%;
}
&-title {
font-size: 14px;
color: #000000;
margin-bottom: 5px;
}
&-time {
font-size: 12px;
color: #8C8C8C;
margin-bottom: 5px;
}
&-number {
font-size: 30px;
}
.content-title{
display: flex;
align-items: center;
justify-content: space-between;
}
}
.panel-group-count{
.panel-group-count {
margin-top: 18px;
.card-panel-item{
.card-panel-item {
float: left;
}
.card-panel-count{
.card-panel-count {
background-color: #ffffff;
border-radius: 4px;
// width: 90%;
height: 104px;
text-align: center;
padding-top: 20px;
span{
span {
display: block;
}
.iconfont{
.iconfont {
font-size: 27px;
}
.panel-text{
.panel-text {
font-size: 14px;
color: #303133;
margin-top: 15px;

View File

@ -635,7 +635,7 @@ export default {
prize: [], //
lottery_num_term: 1, //12
lottery_num: 1, //
spread_num: 1, //广
spread_num: 1, //
is_all_record: 0, //
is_personal_record: 0, //
is_content: 0, //
@ -750,7 +750,7 @@ export default {
prize: [], //
lottery_num_term: 1, //12
lottery_num: 1, //
spread_num: 1, //广
spread_num: 1, //
is_all_record: 0, //
is_personal_record: 0, //
is_content: 0, //

View File

@ -90,7 +90,7 @@
</template>
</el-table-column>
<el-table-column prop="pay_price" label="实际支付" min-width="100" />
<el-table-column label="佣金金额" min-width="100">
<el-table-column label="奖励金额" min-width="100">
<template slot-scope="scope">
<span>{{Number(scope.row.extension_one)+Number(scope.row.extension_two)}}</span>
</template>

View File

@ -90,7 +90,7 @@
</template>
</el-table-column>
<el-table-column prop="pay_price" label="实际支付" min-width="100" />
<el-table-column label="佣金金额" min-width="100">
<el-table-column label="奖励金额" min-width="100">
<template slot-scope="scope">
<span>{{Number(scope.row.extension_one)+Number(scope.row.extension_two)}}</span>
</template>

View File

@ -261,11 +261,11 @@
</div>
</li>
<li class="item">
<div>推广</div>
<div>邀请</div>
<div class="value">{{ orderDetailList.spread&&orderDetailList.spread.nickname || "无" }}</div>
</li>
<li class="item">
<div>上级推广</div>
<div>邀请</div>
<div class="value">{{ orderDetailList.TopSpread&&orderDetailList.TopSpread.nickname || "无" }}</div>
</li> -->
<li class="item">

View File

@ -33,19 +33,17 @@
class="labeltop"
>
<el-table :data="oneFormBatch" size="mini">
<el-table-column label="图片" min-width="150" align="center">
<el-table-column align="center" label="图片" min-width="80">
<template slot-scope="scope">
<div class="acea-row row-middle row-center-wrapper">
<div
v-if="oneFormBatch[0].image"
class="pictrue pictrueTab"
>
<img v-lazy="oneFormBatch[0].image" />
<div
class="upLoadPicBox"
title="750*750px"
@click="modalPicTap('1', 'pi')"
>
<div v-if="scope.row.image" class="pictrue tabPic">
<img :src="scope.row.image" />
</div>
<div
v-else
class="upLoad pictrueTab acea-row row-center-wrapper"
>
<div v-else class="upLoad tabPic">
<i class="el-icon-camera cameraIconfont" />
</div>
</div>
@ -197,9 +195,13 @@
class="tabNumWidth"
size="mini"
>
<el-table-column align="center" label="图片" min-width="80">
<el-table-column align="center" label="图片" min-width="80">
<template slot-scope="scope">
<div class="upLoadPicBox">
<div
class="upLoadPicBox"
title="750*750px"
@click="modalPicTap('1', 'dan', 'pi')"
>
<div v-if="scope.row.image" class="pictrue tabPic">
<img :src="scope.row.image" />
</div>
@ -331,9 +333,16 @@
</template>
<el-table-column align="center" label="图片" min-width="80">
<template slot-scope="scope">
<div class="upLoadPicBox" title="750*750px">
<div v-if="scope.row.image" class="pictrue tabPic">
<img :src="scope.row.image" />
<div
class="upLoadPicBox"
title="750*750px"
@click="modalPicTap('1', 'duo', scope.$index)"
>
<div
v-if="scope.row.image || scope.row.pic"
class="pictrue tabPic"
>
<img :src="scope.row.image || scope.row.pic" />
</div>
<div v-else class="upLoad tabPic">
<i class="el-icon-camera cameraIconfont" />
@ -773,15 +782,15 @@ export default {
});
}
if (tit === "1" && num === "dan") {
// _this.OneattrValue[0].image = img[0];
_this.OneattrValue[0].image = img[0];
_this.OneattrValue[0].basis_image = img[0];
}
if (tit === "1" && num === "duo") {
// _this.ManyAttrValue[i].image = img[0];
_this.ManyAttrValue[i].image = img[0];
_this.ManyAttrValue[i].basis_image = img[0];
}
if (tit === "1" && num === "pi") {
// _this.oneFormBatch[0].image = img[0];
_this.oneFormBatch[0].image = img[0];
_this.oneFormBatch[0].basis_image = img[0];
}
}, tit);

View File

@ -673,6 +673,17 @@
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
style="margin-left: 100px"
label="惠美乡村产品:"
prop="is_huimei"
label-width="120px"
>
<el-radio-group v-model="formValidate.is_huimei">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
</div>
<el-form-item label="星级推荐:">
@ -969,6 +980,7 @@ export default {
],
formValidate: {
is_hot: 0,
is_huimei:0,
is_customize: 0,
is_best: 0,
is_new: 0,
@ -1336,6 +1348,7 @@ export default {
image: info.image,
audit_type: info.audit_type,
is_customize: info.is_customize || 0,
is_huimei: info.is_huimei || 0,
};
if (info.is_benefit === 1) this.checkboxGroup.push("is_benefit");
if (info.is_hot === 1) this.checkboxGroup.push("is_hot");

View File

@ -461,7 +461,7 @@
<div v-else class="value-item"></div>
</li>
<!-- <li class="item">
<div class="item-title">分销礼包</div>
<div class="item-title">服务礼包</div>
<div class="value">
{{ productData.is_gift_bag ? "是" : "否" }}
</div>

View File

@ -1,11 +1,22 @@
<template>
<div class="divBox">
<el-card class="box-card">
<el-form ref="promoterForm" :model="promoterForm" :rules="rules" label-width="200px" class="demo-promoterForm">
<el-form
ref="promoterForm"
:model="promoterForm"
:rules="rules"
label-width="200px"
class="demo-promoterForm"
>
<el-form-item prop="extension_status">
<span slot="label">
<span>分销启用</span>
<el-tooltip class="item" effect="dark" content="商城分销功能开启关闭" placement="top-start">
<span>服务启用</span>
<el-tooltip
class="item"
effect="dark"
content="商城服务功能开启关闭"
placement="top-start"
>
<i class="el-icon-warning-outline" />
</el-tooltip>
</span>
@ -17,56 +28,89 @@
<el-form-item prop="extension_one_rate">
<span slot="label">
<span>一级返佣比例</span>
<el-tooltip class="item" effect="dark" content="订单交易成功后给上级返佣的比例0 - 100,例:5 = 反订单金额的5%" placement="top-start">
<el-tooltip
class="item"
effect="dark"
content="订单交易成功后给上级返佣的比例0 - 100,例:5 = 反订单金额的5%"
placement="top-start"
>
<i class="el-icon-warning-outline" />
</el-tooltip>
</span>
<el-input-number v-model="promoterForm.extension_one_rate" :precision="2" :step="0.1" :min="0" class="selWidth"></el-input-number>
<el-input-number
v-model="promoterForm.extension_one_rate"
:precision="2"
:step="0.1"
:min="0"
class="selWidth"
></el-input-number>
<span>%</span>
</el-form-item>
<el-form-item prop="extension_two_rate">
<span slot="label">
<span>二级返佣比例</span>
<el-tooltip class="item" effect="dark" content="订单交易成功后给上级返佣的比例0 ~ 100,例:5 = 反订单金额的5%" placement="top-start">
<el-tooltip
class="item"
effect="dark"
content="订单交易成功后给上级返佣的比例0 ~ 100,例:5 = 反订单金额的5%"
placement="top-start"
>
<i class="el-icon-warning-outline" />
</el-tooltip>
</span>
<el-input-number v-model="promoterForm.extension_two_rate" :precision="2" :step="0.1" :min="0" class="selWidth"></el-input-number>
<el-input-number
v-model="promoterForm.extension_two_rate"
:precision="2"
:step="0.1"
:min="0"
class="selWidth"
></el-input-number>
<span>%</span>
</el-form-item>
<el-form-item prop="extension_self" required>
<span slot="label">
<span>分销内购</span>
</span>
<el-radio-group v-model="promoterForm.extension_self">
<el-radio :label="1">开启</el-radio>
<el-radio :label="0" class="radio">关闭</el-radio>
</el-radio-group>
<div class="item-text">
<span class="title">开启</span>开启分销内购分销员自己购买商品享受一级返佣上级享受二级返佣
<span class="title">关闭</span>分销员自己购买商品没有返佣
</div>
<span slot="label">
<span>服务内购</span>
</span>
<el-radio-group v-model="promoterForm.extension_self">
<el-radio :label="1">开启</el-radio>
<el-radio :label="0" class="radio">关闭</el-radio>
</el-radio-group>
<div class="item-text">
<span class="title">开启</span
>开启服务内购服务员自己购买商品享受一级返佣上级享受二级返佣
<span class="title">关闭</span>服务员自己购买商品没有返佣
</div>
</el-form-item>
<el-form-item prop="extension_limit" required>
<span slot="label">
<span>分销限时开关</span>
<span>服务限时开关</span>
</span>
<el-radio-group v-model="promoterForm.extension_limit">
<el-radio :label="1">开启</el-radio>
<el-radio :label="0" class="radio">关闭</el-radio>
</el-radio-group>
<div class="item-text">
<span class="title">开启</span>根据设置的分销绑定时段返佣
<span class="title">关闭</span>默认永久绑定<span class="font-red">此处不建议频繁修改请谨慎操作</span>
<span class="title">开启</span>根据设置的服务绑定时段返佣
<span class="title">关闭</span>默认永久绑定<span class="font-red"
>此处不建议频繁修改请谨慎操作</span
>
</div>
</el-form-item>
<el-form-item>
<span slot="label">
<span>分销绑定时间设置</span>
<span>服务绑定时间设置</span>
</span>
<el-input-number v-model="promoterForm.extension_limit_day" :step="1" :min="0"></el-input-number>
<div class="item-text">
指自绑定关系成功至自动解绑之间的天数自动解绑后返佣按新绑定关系结算<span class="font-red">此处不建议频繁修改请谨慎操作</span>
<el-input-number
v-model="promoterForm.extension_limit_day"
:step="1"
:min="0"
></el-input-number>
<div class="item-text">
指自绑定关系成功至自动解绑之间的天数自动解绑后返佣按新绑定关系结算<span
class="font-red"
>此处不建议频繁修改请谨慎操作</span
>
</div>
</el-form-item>
<el-form-item>
@ -79,7 +123,12 @@
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" :loading="loading" @click="submitForm('promoterForm')">保存</el-button>
<el-button
type="primary"
:loading="loading"
@click="submitForm('promoterForm')"
>保存</el-button
>
</el-form-item>
</el-form>
</el-card>
@ -87,10 +136,9 @@
</template>
<script>
import { configApi, configUpdateApi, productCheckApi } from '@/api/promoter'
import { configApi, configUpdateApi, productCheckApi } from "@/api/promoter";
export default {
name: 'Index',
name: "Index",
data() {
return {
promoterForm: {
@ -102,78 +150,97 @@ export default {
loading: false,
rules: {
extension_status: [
{ required: true, message: '请选择是否启用分销', trigger: 'change' }
{ required: true, message: "请选择是否启用服务", trigger: "change" },
],
extension_one_rate: [
{ required: true, message: '请输入一级返佣比例', trigger: 'blur' }
{ required: true, message: "请输入一级返佣比例", trigger: "blur" },
],
extension_two_rate: [
{ required: true, message: '请输入二级返佣比例', trigger: 'blur' }
{ required: true, message: "请输入二级返佣比例", trigger: "blur" },
],
extension_self: [
{ required: true, message: '请选择是否开启分销内购', trigger: 'blur' }
{
required: true,
message: "请选择是否开启服务内购",
trigger: "blur",
},
],
extension_limit: [
{ required: true, message: '请选择是否开启分销限时', trigger: 'blur' }
]
}
}
{
required: true,
message: "请选择是否开启服务限时",
trigger: "blur",
},
],
},
};
},
mounted() {
this.getDetal()
this.getDetal();
},
methods: {
getDetal() {
configApi().then(res => {
this.promoterForm = res.data
this.promoterForm.extension_status = Number(res.data.extension_status)
this.promoterForm.extension_self = res.data.extension_self ? 1 : 0
this.promoterForm.extension_limit = res.data.extension_limit ? 1 : 0;
this.promoterForm.extension_limit_day = res.data.extension_limit_day ? res.data.extension_limit_day : 30;
}).catch((res) => {
this.$message.error(res.message)
})
configApi()
.then((res) => {
this.promoterForm = res.data;
this.promoterForm.extension_status = Number(
res.data.extension_status
);
this.promoterForm.extension_self = res.data.extension_self ? 1 : 0;
this.promoterForm.extension_limit = res.data.extension_limit ? 1 : 0;
this.promoterForm.extension_limit_day = res.data.extension_limit_day
? res.data.extension_limit_day
: 30;
})
.catch((res) => {
this.$message.error(res.message);
});
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.loading = true
configUpdateApi(this.promoterForm).then(res => {
this.loading = false
this.$modalSure('提交成功,是否自动下架商户低于此佣金比例的商品').then(() => {
productCheckApi().then(({ message }) => {
this.$message.success(message)
}).catch(({ message }) => {
this.$message.error(message)
})
this.loading = true;
configUpdateApi(this.promoterForm)
.then((res) => {
this.loading = false;
this.$modalSure(
"提交成功,是否自动下架商户低于此佣金比例的商品"
).then(() => {
productCheckApi()
.then(({ message }) => {
this.$message.success(message);
})
.catch(({ message }) => {
this.$message.error(message);
});
});
})
}).catch((res) => {
this.$message.error(res.message)
this.loading = false
})
.catch((res) => {
this.$message.error(res.message);
this.loading = false;
});
} else {
return false
return false;
}
})
}
}
}
});
},
},
};
</script>
<style scoped lang="scss">
.selWidth{
width: 300px;
}
.item-text{
display: inline-block;
margin-left: 30px;
color: #606266;
.title{
font-weight: bold;
}
}
.font-red{
color: #ff4949;
.selWidth {
width: 300px;
}
.item-text {
display: inline-block;
margin-left: 30px;
color: #606266;
.title {
font-weight: bold;
}
}
.font-red {
color: #ff4949;
}
</style>

View File

@ -1,16 +1,39 @@
<template>
<div class="divBox">
<el-card class="box-card">
<el-form ref="formValidate" v-loading="fullscreenLoading" class="formValidate mt20" :model="formValidate" label-width="100px" @submit.native.prevent>
<el-form
ref="formValidate"
v-loading="fullscreenLoading"
class="formValidate mt20"
:model="formValidate"
label-width="100px"
@submit.native.prevent
>
<el-col :span="24">
<el-form-item>
<h3 class="title">分销等级规则</h3>
<ueditor-from v-model="formValidate.agree" :content="formValidate.agree" style="width: 100%"/>
<h3 class="title">服务等级规则</h3>
<ueditor-from
v-model="formValidate.agree"
:content="formValidate.agree"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-form-item style="margin-top:30px;">
<el-button type="primary" class="submission" size="small" @click="previewProtol">预览</el-button>
<el-button type="primary" class="submission" size="small" @click="handleSubmit('formValidate')">提交</el-button>
<el-form-item style="margin-top: 30px">
<el-button
type="primary"
class="submission"
size="small"
@click="previewProtol"
>预览</el-button
>
<el-button
type="primary"
class="submission"
size="small"
@click="handleSubmit('formValidate')"
>提交</el-button
>
</el-form-item>
</el-form>
</el-card>
@ -35,79 +58,78 @@
</template>
<script>
import ueditorFrom from "@/components/ueditorFrom";
import ueditorFrom from '@/components/ueditorFrom'
import {
getBrokerageApi,
updateBrokerageApi
} from '@/api/promoter'
import { getBrokerageApi, updateBrokerageApi } from "@/api/promoter";
export default {
name: 'Eextension',
name: "Eextension",
components: { ueditorFrom },
data() {
return {
modals: false,
props: {
emitPath: false
emitPath: false,
},
formValidate: {
agree: '',
agree: "",
},
content: '',
content: "",
fullscreenLoading: false,
}
};
},
mounted() {
this.getInfo();
},
methods: {
getInfo() {
this.fullscreenLoading = true
getBrokerageApi('sys_brokerage').then(res => {
const info = res.data
this.formValidate = {
agree: info.sys_brokerage,
}
this.fullscreenLoading = false
}).catch(res => {
this.$message.error(res.message)
this.fullscreenLoading = false
})
this.fullscreenLoading = true;
getBrokerageApi("sys_brokerage")
.then((res) => {
const info = res.data;
this.formValidate = {
agree: info.sys_brokerage,
};
this.fullscreenLoading = false;
})
.catch((res) => {
this.$message.error(res.message);
this.fullscreenLoading = false;
});
},
//
handleSubmit(name) {
if(this.formValidate.agree === '' || !this.formValidate.agree){
if (this.formValidate.agree === "" || !this.formValidate.agree) {
this.$message.warning("请输入协议信息!");
return
}else{
updateBrokerageApi('sys_brokerage', this.formValidate).then(async res => {
this.fullscreenLoading = false
this.$message.success(res.message)
}).catch(res => {
this.fullscreenLoading = false
this.$message.error(res.message)
})
return;
} else {
updateBrokerageApi("sys_brokerage", this.formValidate)
.then(async (res) => {
this.fullscreenLoading = false;
this.$message.success(res.message);
})
.catch((res) => {
this.fullscreenLoading = false;
this.$message.error(res.message);
});
}
},
previewProtol(){
previewProtol() {
this.modals = true;
}
}
}
},
},
};
</script>
<style scoped lang="scss">
.dialog-scustom,.addDia{
.dialog-scustom,
.addDia {
min-width: 400px;
height: 900px;
.el-dialog{
.el-dialog {
width: 400px;
}
h3{
h3 {
color: #333;
font-size: 16px;
text-align: center;
@ -115,31 +137,31 @@ export default {
margin: 0;
}
}
.title{
.title {
font-weight: bold;
font-size: 18px;
text-align: center;
width: 90%;
}
.agreement{
.agreement {
width: 350px;
margin: 0 auto;
box-shadow: 1px 5px 5px 2px rgba(0,0,0,.2);
box-shadow: 1px 5px 5px 2px rgba(0, 0, 0, 0.2);
padding: 26px;
border-radius: 15px;
.content{
.content {
height: 600px;
overflow-y:scroll;
overflow-y: scroll;
}
p{
p {
text-align: justify;
}
}
.agreement .content ::v-deep p{
.agreement .content ::v-deep p {
font-size: 13px;
line-height: 22px;
}
.agreement ::v-deep img{
.agreement ::v-deep img {
max-width: 100%;
}
/*css主要部分的样式*/
@ -150,13 +172,9 @@ export default {
}
/*定义滚动条的轨道颜色、内阴影及圆角*/
::-webkit-scrollbar-track{
::-webkit-scrollbar-track {
/*-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);*/
background-color: transparent;
border-radius: 3px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +1,73 @@
<template>
<div class="divBox">
<div class="selCard">
<el-form size="small" inline :model="tableFrom" ref="searchForm" label-width="85px">
<el-form
size="small"
inline
:model="tableFrom"
ref="searchForm"
label-width="85px"
>
<el-form-item label="订单状态:" class="width100" prop="status">
<el-radio-group v-model="tableFrom.status" type="button" @change="getList(1)">
<el-radio-button label="">全部 {{ '(' +orderChartType.all?orderChartType.all:0 + ')' }}</el-radio-button>
<el-radio-button
label="1"
>待付款 {{ '(' +orderChartType.unpaid?orderChartType.unpaid:0+ ')' }}</el-radio-button>
<el-radio-button
label="2"
>待发货 {{ '(' +orderChartType.unshipped?orderChartType.unshipped:0+ ')' }}</el-radio-button>
<el-radio-button
label="3"
>待收货 {{ '(' +orderChartType.untake?orderChartType.untake:0+ ')' }}</el-radio-button>
<el-radio-button
label="4"
>待评价 {{ '(' +orderChartType.unevaluate?orderChartType.unevaluate:0+ ')' }}</el-radio-button>
<el-radio-button
label="5"
>交易完成 {{ '(' +orderChartType.complete?orderChartType.complete:0+ ')' }}</el-radio-button>
<el-radio-button
label="6"
>已退款 {{ '(' +orderChartType.refund?orderChartType.refund:0+ ')' }}</el-radio-button>
<el-radio-button
label="7"
>已删除 {{ '(' +orderChartType.del?orderChartType.del:0+ ')' }}</el-radio-button>
<el-radio-group
v-model="tableFrom.status"
type="button"
@change="getList(1)"
>
<el-radio-button label=""
>全部
{{
"(" + orderChartType.all ? orderChartType.all : 0 + ")"
}}</el-radio-button
>
<el-radio-button label="1"
>待付款
{{
"(" + orderChartType.unpaid ? orderChartType.unpaid : 0 + ")"
}}</el-radio-button
>
<el-radio-button label="2"
>待发货
{{
"(" + orderChartType.unshipped
? orderChartType.unshipped
: 0 + ")"
}}</el-radio-button
>
<el-radio-button label="3"
>待收货
{{
"(" + orderChartType.untake ? orderChartType.untake : 0 + ")"
}}</el-radio-button
>
<el-radio-button label="4"
>待评价
{{
"(" + orderChartType.unevaluate
? orderChartType.unevaluate
: 0 + ")"
}}</el-radio-button
>
<el-radio-button label="5"
>交易完成
{{
"(" + orderChartType.complete
? orderChartType.complete
: 0 + ")"
}}</el-radio-button
>
<el-radio-button label="6"
>已退款
{{
"(" + orderChartType.refund ? orderChartType.refund : 0 + ")"
}}</el-radio-button
>
<el-radio-button label="7"
>已删除
{{
"(" + orderChartType.del ? orderChartType.del : 0 + ")"
}}</el-radio-button
>
</el-radio-group>
</el-form-item>
<el-form-item label="时间选择:">
@ -37,7 +79,7 @@
type="daterange"
placement="bottom-end"
placeholder="自定义时间"
style="width: 280px;"
style="width: 280px"
:picker-options="pickerOptions"
@change="onchangeTime"
/>
@ -97,38 +139,38 @@
clearable
/>
</el-form-item>
<el-form-item label="发货方式:" prop="filter_delivery">
<el-select
v-model="tableFrom.filter_delivery"
placeholder="请选择"
class="selWidth"
clearable
@change="getList(1)"
>
<el-option
v-for="item in dliveryWayList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="商品类型:" prop="filter_product">
<el-select
v-model="tableFrom.filter_product"
placeholder="请选择"
class="selWidth"
clearable
@change="getList(1)"
>
<el-option
v-for="item in productTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="发货方式:" prop="filter_delivery">
<el-select
v-model="tableFrom.filter_delivery"
placeholder="请选择"
class="selWidth"
clearable
@change="getList(1)"
>
<el-option
v-for="item in dliveryWayList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="商品类型:" prop="filter_product">
<el-select
v-model="tableFrom.filter_product"
placeholder="请选择"
class="selWidth"
clearable
@change="getList(1)"
>
<el-option
v-for="item in productTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="关键字:" prop="keywords">
<el-input
v-model="tableFrom.keywords"
@ -138,20 +180,20 @@
clearable
/>
</el-form-item>
<el-form-item label="推广人:" prop="spread_name">
<el-form-item label="邀请人:" prop="spread_name">
<el-input
v-model="tableFrom.spread_name"
@keyup.enter.native="getList(1)"
placeholder="请输入推广人信息"
placeholder="请输入邀请人信息"
class="selWidth"
clearable
/>
</el-form-item>
<el-form-item label="上级推广" prop="top_spread_name">
<el-form-item label="上级邀请" prop="top_spread_name">
<el-input
v-model="tableFrom.top_spread_name"
@keyup.enter.native="getList(1)"
placeholder="请输入上级推广人信息"
placeholder="请输入邀请人信息"
class="selWidth"
clearable
/>
@ -166,8 +208,10 @@
/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
<el-button size="small" @click="searchReset()">重置</el-button>
<el-button type="primary" size="small" @click="getList(1)"
>搜索</el-button
>
<el-button size="small" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form>
</div>
@ -197,31 +241,58 @@
<span>{{ props.row.remark | filterEmpty }}</span>
</el-form-item>
<el-form-item label="总单号:">
<span>{{ props.row.groupOrder ? props.row.groupOrder.group_order_sn : '' }}</span>
<span>{{
props.row.groupOrder
? props.row.groupOrder.group_order_sn
: ""
}}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column label="订单编号" min-width="150">
<template slot-scope="scope">
<span style="display: block;" v-text="scope.row.order_sn" />
<span v-show="scope.row.is_del > 0" style="color: #ED4014;display: block;">用户已删除</span>
<span style="display: block" v-text="scope.row.order_sn" />
<span
v-show="scope.row.is_del > 0"
style="color: #ed4014; display: block"
>用户已删除</span
>
</template>
</el-table-column>
<el-table-column label="用户信息" min-width="130">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native="onUserDetails(scope.row.uid)">{{scope.row.user&&scope.row.user.nickname +'/'+ scope.row.uid}}</el-button>
<el-button
type="text"
size="small"
@click.native="onUserDetails(scope.row.uid)"
>{{
scope.row.user && scope.row.user.nickname + "/" + scope.row.uid
}}</el-button
>
</template>
</el-table-column>
<el-table-column label="订单类型" min-width="80">
<template slot-scope="scope">
<span>{{ scope.row.is_virtual == 1 ? "虚拟订单" : scope.row.order_type == 0 ? "普通订单" : "核销订单" }}</span>
<span>{{
scope.row.is_virtual == 1
? "虚拟订单"
: scope.row.order_type == 0
? "普通订单"
: "核销订单"
}}</span>
</template>
</el-table-column>
<el-table-column prop="real_name" label="收货人/订购人" min-width="120" />
<el-table-column
prop="real_name"
label="收货人/订购人"
min-width="120"
/>
<el-table-column label="商户名称" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.merchant ? scope.row.merchant.mer_name :'' }}</span>
<span>{{
scope.row.merchant ? scope.row.merchant.mer_name : ""
}}</span>
</template>
</el-table-column>
<el-table-column label="商品信息" min-width="350">
@ -237,15 +308,22 @@
:preview-src-list="[val.cart_info.product.image]"
/>
</div>
<span
class="tabBox_tit"
>{{ val.cart_info.product.store_name + ' | ' }}{{ val.cart_info.productAttr.sku }}</span>
<span class="tabBox_tit"
>{{ val.cart_info.product.store_name + " | "
}}{{ val.cart_info.productAttr.sku }}</span
>
<span class="tabBox_pice">
{{ '¥'+ val.cart_info.productAttr.price + ' x '+ val.product_num }}
{{
"¥" +
val.cart_info.productAttr.price +
" x " +
val.product_num
}}
<em
v-if="val.refund_num < val.product_num && val.refund_num > 0"
style="color: red;font-style: normal;"
>(-{{ val.product_num - val.refund_num }})</em>
v-if="val.refund_num < val.product_num && val.refund_num > 0"
style="color: red; font-style: normal"
>(-{{ val.product_num - val.refund_num }})</em
>
</span>
</div>
</template>
@ -253,18 +331,41 @@
<el-table-column label="实际支付" min-width="90">
<template slot-scope="scope">
<span>{{ scope.row.pay_price }}</span>
<p v-if="scope.row.finalOrder">尾款{{ scope.row.finalOrder.pay_price }}</p>
<p v-if="scope.row.finalOrder">
尾款{{ scope.row.finalOrder.pay_price }}
</p>
</template>
</el-table-column>
<el-table-column label="订单佣金" min-width="100">
<template slot-scope="scope">
<span>{{ (parseFloat(scope.row.extension_one) + parseFloat(scope.row.extension_two) + parseFloat(scope.row.refund_extension_one) + parseFloat(scope.row.refund_extension_two)).toFixed(2) }}</span>
<em v-if="(scope.row.refund_extension_one > 0) || (scope.row.refund_extension_two > 0)" style="color: red;font-style: normal;">(-{{ (parseFloat(scope.row.refund_extension_one)+parseFloat(scope.row.refund_extension_two)).toFixed(2) }})</em>
<span>{{
(
parseFloat(scope.row.extension_one) +
parseFloat(scope.row.extension_two) +
parseFloat(scope.row.refund_extension_one) +
parseFloat(scope.row.refund_extension_two)
).toFixed(2)
}}</span>
<em
v-if="
scope.row.refund_extension_one > 0 ||
scope.row.refund_extension_two > 0
"
style="color: red; font-style: normal"
>(-{{
(
parseFloat(scope.row.refund_extension_one) +
parseFloat(scope.row.refund_extension_two)
).toFixed(2)
}})</em
>
</template>
</el-table-column>
<el-table-column label="支付类型" min-width="80">
<template slot-scope="scope">
<span v-if="scope.row.paid === 1">{{ scope.row.pay_type | orderPayType }}</span>
<span v-if="scope.row.paid === 1">{{
scope.row.pay_type | orderPayType
}}</span>
<span v-else>--</span>
</template>
</el-table-column>
@ -278,8 +379,15 @@
<span v-if="scope.row.is_del === 0">
<span v-if="scope.row.paid === 0">待付款</span>
<span v-else>
<span v-if="scope.row.order_type === 0 || scope.row.order_type === 2">{{ scope.row.status | orderStatusFilter }}</span>
<span v-else>{{ scope.row.status | takeOrderStatusFilter }}</span>
<span
v-if="
scope.row.order_type === 0 || scope.row.order_type === 2
"
>{{ scope.row.status | orderStatusFilter }}</span
>
<span v-else>{{
scope.row.status | takeOrderStatusFilter
}}</span>
</span>
</span>
<span v-else>已删除</span>
@ -290,19 +398,28 @@
<span>{{ scope.row.create_time }}</span>
</template>
</el-table-column>
<el-table-column label="推广人" min-width="100">
<el-table-column label="邀请人" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.spread && scope.row.spread.nickname || '无' }}</span>
<span>{{
(scope.row.spread && scope.row.spread.nickname) || "无"
}}</span>
</template>
</el-table-column>
<el-table-column label="上级推广人" min-width="100">
<el-table-column label="邀请人" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.TopSpread && scope.row.TopSpread.nickname || '无' }}</span>
<span>{{
(scope.row.TopSpread && scope.row.TopSpread.nickname) || "无"
}}</span>
</template>
</el-table-column>
<el-table-column label="操作" min-width="80" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click="onOrderDetails(scope.row.order_id)">详情</el-button>
<el-button
type="text"
size="small"
@click="onOrderDetails(scope.row.order_id)"
>详情</el-button
>
</template>
</el-table-column>
</el-table>
@ -319,7 +436,14 @@
</div>
</el-card>
<!--用户信息-->
<user-details :drawer="userDrawer" @closeDrawer="closeDrawer" @changeDrawer="changeDrawer" ref="userDetails" :uid="uid" :isUser="false"/>
<user-details
:drawer="userDrawer"
@closeDrawer="closeDrawer"
@changeDrawer="changeDrawer"
ref="userDetails"
:uid="uid"
:isUser="false"
/>
<!--详情-->
<order-detail
ref="orderDetail"
@ -332,14 +456,13 @@
</template>
<script>
import { spreadOrderLst, spreadChartApi, exportOrderApi } from "@/api/promoter";
import { merSelectApi } from "@/api/product";
import userDetails from '../../user/list/userDetails';
import orderDetail from './orderDetails.vue';
import createWorkBook from '@/utils/newToExcel.js';
import userDetails from "../../user/list/userDetails";
import orderDetail from "./orderDetails.vue";
import createWorkBook from "@/utils/newToExcel.js";
import { fromList } from "@/libs/constants.js";
import timeOptions from '@/utils/timeOptions';
import timeOptions from "@/utils/timeOptions";
export default {
components: { orderDetail, userDetails },
data() {
@ -351,16 +474,16 @@ export default {
total: 0,
},
activity: [
{name: "普通订单",type: 0},
{name: "秒杀订单",type: 1},
{name: "预售订单",type: 2},
{name: "助力订单",type: 3},
{name: "拼团订单",type: 4}
{ name: "普通订单", type: 0 },
{ name: "秒杀订单", type: 1 },
{ name: "预售订单", type: 2 },
{ name: "助力订单", type: 3 },
{ name: "拼团订单", type: 4 },
],
listLoading: true,
tableFrom: {
order_sn: this.$route.query.order_sn ? this.$route.query.order_sn : "",
group_order_sn: '',
group_order_sn: "",
keywords: "",
username: "",
store_name: "",
@ -369,23 +492,23 @@ export default {
mer_id: "",
page: 1,
limit: 20,
is_trader: '',
is_trader: "",
pay_type: "",
filter_delivery: '',
filter_product : '',
activity_type: ''
filter_delivery: "",
filter_product: "",
activity_type: "",
},
dliveryWayList: [
{ value: 1, label: '快递订单' },
{ value: 2, label: '配送订单' },
{ value: 4, label: '核销订单' },
{ value: 3, label: '虚拟发货' },
{ value: 6, label: '自动发货' }
{ value: 1, label: "快递订单" },
{ value: 2, label: "配送订单" },
{ value: 4, label: "核销订单" },
{ value: 3, label: "虚拟发货" },
{ value: 6, label: "自动发货" },
], //
productTypeList: [
{ value: 1, label: '实物商品' },
{ value: 2, label: '虚拟商品' },
{ value: 3, label: '卡密商品' }
{ value: 1, label: "实物商品" },
{ value: 2, label: "虚拟商品" },
{ value: 3, label: "卡密商品" },
], //
orderChartType: {},
timeVal: [],
@ -420,7 +543,7 @@ export default {
}
this.headerList();
this.getMerSelect();
this.getList('');
this.getList("");
},
//
activated() {
@ -431,15 +554,15 @@ export default {
}
this.headerList();
this.getMerSelect();
this.getList('');
this.getList("");
},
methods: {
/**重置 */
searchReset(){
this.timeVal = []
this.tableFrom.date = ""
this.$refs.searchForm.resetFields()
this.getList(1)
searchReset() {
this.timeVal = [];
this.tableFrom.date = "";
this.$refs.searchForm.resetFields();
this.getList(1);
},
//
orderFilter(item) {
@ -455,7 +578,11 @@ export default {
addTdClass(val) {
if (val.row.status > 0 && val.row.paid == 1) {
for (let i = 0; i < val.row.orderProduct.length; i++) {
if (val.row.orderProduct[i].refund_num > 0 && val.row.orderProduct[i].refund_num < val.row.orderProduct[i].product_num) {
if (
val.row.orderProduct[i].refund_num > 0 &&
val.row.orderProduct[i].refund_num <
val.row.orderProduct[i].product_num
) {
return "row-bg";
}
}
@ -473,44 +600,51 @@ export default {
this.$message.error(res.message);
});
},
//
//
onUserDetails(uid) {
this.uid = uid
this.userDrawer = true
this.uid = uid;
this.userDrawer = true;
this.$refs.userDetails.getData(uid, false, true);
},
closeDrawer() {
this.drawer = false
this.userDrawer = false
this.drawer = false;
this.userDrawer = false;
},
changeDrawer(v) {
this.drawer = v;
this.userDrawer = v;
},
async exports() {
let excelData = JSON.parse(JSON.stringify(this.tableFrom)), data = []
excelData.page = 1
excelData.limit = 100
let pageCount = 1
let excelData = JSON.parse(JSON.stringify(this.tableFrom)),
data = [];
excelData.page = 1;
excelData.limit = 100;
let pageCount = 1;
let lebData = {};
for (let i = 0; i < pageCount; i++) {
lebData = await this.downData(excelData)
pageCount = Math.ceil(lebData.count/excelData.limit)
lebData = await this.downData(excelData);
pageCount = Math.ceil(lebData.count / excelData.limit);
if (lebData.export.length) {
data = data.concat(lebData.export)
excelData.page++
data = data.concat(lebData.export);
excelData.page++;
}
}
createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename);
return
createWorkBook(
lebData.header,
lebData.title,
data,
lebData.foot,
lebData.filename
);
return;
},
/**订单列表 */
downData(excelData) {
return new Promise((resolve, reject) => {
exportOrderApi(excelData).then((res) => {
return resolve(res.data)
})
})
return resolve(res.data);
});
});
},
//
exportRecord() {
@ -518,20 +652,18 @@ export default {
.then((res) => {
const h = this.$createElement;
this.$msgbox({
title: '提示',
message: h('p', null, [
h('span', null, '文件正在生成中,请稍后点击"'),
h('span', { style: 'color: teal' }, '导出记录'),
h('span', null, '"查看~ '),
title: "提示",
message: h("p", null, [
h("span", null, '文件正在生成中,请稍后点击"'),
h("span", { style: "color: teal" }, "导出记录"),
h("span", null, '"查看~ '),
]),
confirmButtonText: '我知道了',
}).then(action => {
});
confirmButtonText: "我知道了",
}).then((action) => {});
})
.catch((res) => {
this.$message.error(res.message)
})
this.$message.error(res.message);
});
},
//
onOrderDetails(id) {
@ -541,11 +673,11 @@ export default {
},
pageChangeLog(page) {
this.tableFromLog.page = page;
this.getList('');
this.getList("");
},
handleSizeChangeLog(val) {
this.tableFromLog.limit = val;
this.getList('');
this.getList("");
},
//
selectChange(tab) {
@ -570,7 +702,6 @@ export default {
this.tableData.data = res.data.list;
this.tableData.total = res.data.count;
this.listLoading = false;
})
.catch((res) => {
this.$message.error(res.message);
@ -580,11 +711,11 @@ export default {
pageChange(page) {
this.tableFrom.page = page;
this.getList('');
this.getList("");
},
handleSizeChange(val) {
this.tableFrom.limit = val;
this.getList('');
this.getList("");
},
headerList() {
spreadChartApi()
@ -601,7 +732,7 @@ export default {
<style lang="scss" scoped>
.demo-table-expand ::v-deep label {
width: 83px !important;
width: 83px !important;
}
.el-dropdown-link {
cursor: pointer;

View File

@ -121,11 +121,11 @@
<div class="value">{{ orderDetailList.pay_postage }}</div>
</li>
<li v-if="orderDetailList.spread" class="item">
<div>推广</div>
<div>邀请</div>
<div class="value">{{ orderDetailList.spread.nickname }}</div>
</li>
<li v-if="orderDetailList.TopSpread" class="item">
<div>上级推广</div>
<div>邀请</div>
<div class="value">{{ orderDetailList.TopSpread.nickname }}</div>
</li>
<li class="item">
@ -148,11 +148,11 @@
<div v-else class="value">{{ orderDetailList.delivery_type | sendWay }}</div>
</li>
<li v-if="orderDetailList.spread" class="item">
<div>推广</div>
<div>邀请</div>
<div class="value">{{ orderDetailList.spread.nickname || "无" }}</div>
</li>
<li v-if="orderDetailList.TopSpread" class="item">
<div>上级推广</div>
<div>邀请</div>
<div class="value">{{ orderDetailList.TopSpread.nickname || "无" }}</div>
</li>
<li class="item">

View File

@ -1,12 +1,36 @@
<template>
<div class="divBox">
<div class="selCard mb14">
<el-form :model="tableFrom" ref="searchForm" size="small" label-width="85px" inline>
<el-form
:model="tableFrom"
ref="searchForm"
size="small"
label-width="85px"
inline
>
<el-form-item label="时间选择:">
<el-date-picker v-model="timeVal" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 280px;" :picker-options="pickerOptions" @change="onchangeTime" />
<el-date-picker
v-model="timeVal"
value-format="yyyy/MM/dd"
format="yyyy/MM/dd"
size="small"
type="daterange"
placement="bottom-end"
placeholder="自定义时间"
style="width: 280px"
:picker-options="pickerOptions"
@change="onchangeTime"
/>
</el-form-item>
<el-form-item label="等级名称:" prop="brokerage_level">
<el-select v-model="tableFrom.brokerage_level" clearable filterable placeholder="请选择" class="selWidth" @change="getList(1),getStatistics()">
<!-- <el-form-item label="等级名称:" prop="brokerage_level">
<el-select
v-model="tableFrom.brokerage_level"
clearable
filterable
placeholder="请选择"
class="selWidth"
@change="getList(1), getStatistics()"
>
<el-option
v-for="item in levelList"
:key="item.value"
@ -14,17 +38,25 @@
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="关键字:" prop="keyword">
<el-input v-model="tableFrom.keyword" @keyup.enter.native="getList" placeholder="请输入姓名、电话、UID" class="selWidth" clearable />
<el-input
v-model="tableFrom.keyword"
@keyup.enter.native="getList"
placeholder="请输入姓名、电话、UID"
class="selWidth"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
<el-button size="small" @click="searchReset()">重置</el-button>
<el-button type="primary" size="small" @click="getList(1)"
>搜索</el-button
>
<el-button size="small" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form>
</div>
<cards-data v-if="cardLists.length>0" :card-lists="cardLists" />
<cards-data v-if="cardLists.length > 0" :card-lists="cardLists" />
<el-card class="box-card">
<el-table
v-loading="listLoading"
@ -34,15 +66,8 @@
class="table"
highlight-current-row
>
<el-table-column
prop="uid"
label="ID"
width="60"
/>
<el-table-column
label="头像"
min-width="80"
>
<el-table-column prop="uid" label="ID" width="80" />
<el-table-column label="头像" min-width="80">
<template slot-scope="scope">
<div class="demo-image__preview">
<el-image
@ -52,10 +77,7 @@
</div>
</template>
</el-table-column>
<el-table-column
label="用户信息"
min-width="150"
>
<el-table-column label="用户信息" min-width="150">
<template slot-scope="scope">
<div>昵称{{ scope.row.nickname }}</div>
<div>电话{{ scope.row.phone }}</div>
@ -63,39 +85,46 @@
</el-table-column>
<el-table-column
prop="spread_count"
label="推广用户数量"
label="邀请用户数量"
min-width="100"
/>
<el-table-column
label="等级名称"
min-width="90"
>
<template slot-scope="scope">
<span>{{scope.row.brokerage ? scope.row.brokerage.brokerage_name : ''}}</span>
<!-- <el-table-column label="等级名称" min-width="90">
<template slot-scope="scope">
<span>{{
scope.row.brokerage ? scope.row.brokerage.brokerage_name : ""
}}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column
label="推广订单数量"
label="邀请人订单数量"
min-width="120"
prop="spread_pay_count"
/>
<el-table-column
label="推广订单金额"
label="邀请人订单金额"
min-width="120"
prop="spread_pay_price"
/>
<el-table-column
label="佣金金额"
label="奖励金额"
min-width="120"
sortable
:sort-method="(a,b)=>{return a.total_brokerage_price - b.total_brokerage_price}"
:sort-method="
(a, b) => {
return a.total_brokerage_price - b.total_brokerage_price;
}
"
prop="total_brokerage_price"
/>
<el-table-column
label="已提现金额"
min-width="120"
sortable
:sort-method="(a,b)=>{return a.total_extract_price - b.total_extract_price}"
:sort-method="
(a, b) => {
return a.total_extract_price - b.total_extract_price;
}
"
prop="total_extract_price"
/>
<el-table-column
@ -107,26 +136,43 @@
label="未提现金额"
min-width="120"
sortable
:sort-method="(a,b)=>{return a.brokerage_price - b.brokerage_price}"
:sort-method="
(a, b) => {
return a.brokerage_price - b.brokerage_price;
}
"
prop="brokerage_price"
/>
<el-table-column
prop="spread.nickname"
label="上级推广人"
label="邀请人"
min-width="120"
/>
<el-table-column label="操作" min-width="120" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" class="mr10" @click="onSpread(scope.row.uid, 'man')">推广人</el-button>
<el-button
type="text"
size="small"
class="mr10"
@click="onSpread(scope.row.uid, 'man')"
>邀请人</el-button
>
<el-dropdown>
<span class="el-dropdown-link">
更多<i class="el-icon-arrow-down el-icon--right" />
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="onSpreadOrder(scope.row.uid, 'order')">推广订单</el-dropdown-item>
<!--<el-dropdown-item @click.native="onSpreadType(scope.row.uid)">推广方式</el-dropdown-item>-->
<el-dropdown-item @click.native="clearSpread(scope.row)">清除上级推广人</el-dropdown-item>
<el-dropdown-item @click.native="setDistriLevel(scope.row)">编辑分销员等级</el-dropdown-item>
<el-dropdown-item
@click.native="onSpreadOrder(scope.row.uid, 'order')"
>邀请人订单</el-dropdown-item
>
<!--<el-dropdown-item @click.native="onSpreadType(scope.row.uid)">邀请方式</el-dropdown-item>-->
<el-dropdown-item @click.native="clearSpread(scope.row)"
>清除邀请人</el-dropdown-item
>
<el-dropdown-item @click.native="setDistriLevel(scope.row)"
>编辑服务员等级</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</template>
@ -145,9 +191,9 @@
</div>
</el-card>
<!--推广-->
<!--邀请-->
<el-dialog
:title="showDistributor ? '推广订单' : '推广人'"
:title="showDistributor ? '邀请人订单' : '邀请人'"
:visible.sync="dialogVisible"
width="900px"
:before-close="handleClose"
@ -155,7 +201,18 @@
<div class="container">
<el-form size="small" label-width="85px" inline>
<el-form-item label="时间选择:">
<el-date-picker v-model="timeValSpread" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 280px;" :picker-options="pickerOptions" @change="onchangeTimeSpread" />
<el-date-picker
v-model="timeValSpread"
value-format="yyyy/MM/dd"
format="yyyy/MM/dd"
size="small"
type="daterange"
placement="bottom-end"
placeholder="自定义时间"
style="width: 280px"
:picker-options="pickerOptions"
@change="onchangeTimeSpread"
/>
</el-form-item>
<el-form-item label="用户类型:">
<el-select
@ -166,16 +223,27 @@
@change="onChanges"
>
<el-option label="全部" value="" />
<el-option label="一级推广人" value="1" />
<el-option label="二级推广人" value="2" />
<el-option v-if="showDistributor" label="分销员自购" value="-1" />
<el-option label="一级邀请人" value="1" />
<!-- <el-option label="二级邀请人" value="2" /> -->
<el-option v-if="showDistributor" label="服务员自购" value="-1" />
</el-select>
</el-form-item>
<el-form-item label="关键字:">
<el-input v-model="spreadFrom.keyword" @keyup.enter.native="onChanges" :placeholder="showDistributor ? '请输入订单号' : '请输入请输入姓名、电话、UID'" class="selWidth" clearable size="small" />
<el-input
v-model="spreadFrom.keyword"
@keyup.enter.native="onChanges"
:placeholder="
showDistributor ? '请输入订单号' : '请输入请输入姓名、电话、UID'
"
class="selWidth"
clearable
size="small"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="onChanges">查询</el-button>
<el-button type="primary" size="small" @click="onChanges"
>查询</el-button
>
</el-form-item>
</el-form>
</div>
@ -188,15 +256,8 @@
class="table"
highlight-current-row
>
<el-table-column
prop="uid"
label="ID"
width="60"
/>
<el-table-column
label="头像"
min-width="80"
>
<el-table-column prop="uid" label="ID" width="60" />
<el-table-column label="头像" min-width="80">
<template slot-scope="scope">
<div v-if="scope.row.avatar" class="demo-image__preview">
<el-image
@ -205,33 +266,33 @@
/>
</div>
<span v-else>
<img style="width: 36px; height: 36px"
src="../../../assets/images/f.png" alt="">
<img
style="width: 36px; height: 36px"
src="../../../assets/images/f.png"
alt=""
/>
</span>
</template>
</el-table-column>
<el-table-column
label="用户信息"
min-width="90"
>
<el-table-column label="用户信息" min-width="90">
<template slot-scope="scope">
<div>昵称{{ scope.row.nickname }}</div>
<div>电话{{ scope.row.phone }}</div>
</template>
</el-table-column>
<el-table-column
prop="is_promoter"
label="是否推广员"
min-width="100"
>
<!-- <el-table-column prop="is_promoter" label="是否邀请员" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.is_promoter | filterYesOrNo }}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column
sortable
:sort-method="(a,b)=>{return a.spread_count - b.spread_count}"
label="推广人数"
:sort-method="
(a, b) => {
return a.spread_count - b.spread_count;
}
"
label="邀请人数"
min-width="100"
prop="spread_count"
/>
@ -247,20 +308,14 @@
min-width="100"
prop="spread_time"
/>
<el-table-column
sortable
label="解绑时间"
min-width="100"
>
<template slot-scope="scope">
<span>{{ scope.row.spread_limit ? scope.row.spread_limit : '' }}</span>
<el-table-column sortable label="解绑时间" min-width="100">
<template slot-scope="scope">
<span>{{
scope.row.spread_limit ? scope.row.spread_limit : ""
}}</span>
</template>
</el-table-column>
<el-table-column
prop="create_time"
label="关注时间"
min-width="100"
/>
<el-table-column prop="create_time" label="关注时间" min-width="100" />
</el-table>
<el-table
v-if="onName === 'order'"
@ -271,20 +326,16 @@
class="table"
highlight-current-row
>
<el-table-column
prop="order_sn"
label="订单ID"
min-width="100"
/>
<el-table-column
prop="create_time"
label="时间"
min-width="100"
/>
<el-table-column prop="order_sn" label="订单ID" min-width="100" />
<el-table-column prop="create_time" label="时间" min-width="100" />
<el-table-column
sortable
:sort-method="(a,b)=>{return a.brokerage - b.brokerage}"
label="返佣金额"
:sort-method="
(a, b) => {
return a.brokerage - b.brokerage;
}
"
label="奖励金额"
min-width="100"
prop="brokerage"
/>
@ -304,13 +355,20 @@
</template>
<script>
import { promoterListApi, spreadListApi, spreadOrderListApi, spreadClearApi, getDistributionLevel, distributionStatistics,distributionLevelUpdate } from '@/api/promoter'
import { fromList } from '@/libs/constants.js'
import {
promoterListApi,
spreadListApi,
spreadOrderListApi,
spreadClearApi,
getDistributionLevel,
distributionStatistics,
distributionLevelUpdate,
} from "@/api/promoter";
import { fromList } from "@/libs/constants.js";
import cardsData from "@/components/cards/index";
import timeOptions from '@/utils/timeOptions';
import timeOptions from "@/utils/timeOptions";
export default {
name: 'AccountsUser',
name: "AccountsUser",
components: { cardsData },
data() {
return {
@ -321,209 +379,231 @@ export default {
cardLists: [],
tableData: {
data: [],
total: 0
total: 0,
},
listLoading: true,
tableFrom: {
paid: '',
date: '',
keyword: '',
brokerage_level: '',
paid: "",
date: "",
keyword: "",
brokerage_level: "",
page: 1,
limit: 20
limit: 20,
},
fromList: fromList,
dialogVisible: false,
spreadData: {
data: [],
total: 0
total: 0,
},
spreadFrom: {
page: 1,
limit: 10,
date: '',
level: '',
keyword: ''
date: "",
level: "",
keyword: "",
},
timeValSpread: [],
spreadLoading: false,
uid: '',
onName: '',
showDistributor: false
}
uid: "",
onName: "",
showDistributor: false,
};
},
mounted() {
this.getList('')
this.getList("");
this.getLevelList();
this.getStatistics();
},
methods: {
/**重置 */
searchReset(){
this.timeVal = []
this.tableFrom.date = ""
this.$refs.searchForm.resetFields()
this.getList(1)
this.getStatistics()
searchReset() {
this.timeVal = [];
this.tableFrom.date = "";
this.$refs.searchForm.resetFields();
this.getList(1);
this.getStatistics();
},
//
clearSpread(row) {
this.$modalSure('解除【' + row.nickname + '】的上级推广人吗').then(() => {
spreadClearApi(row.uid).then(({ message }) => {
this.$message.success(message)
this.getList('')
}).catch(({ message }) => {
this.$message.error(message)
})
})
this.$modalSure("解除【" + row.nickname + "】的邀请人吗").then(() => {
spreadClearApi(row.uid)
.then(({ message }) => {
this.$message.success(message);
this.getList("");
})
.catch(({ message }) => {
this.$message.error(message);
});
});
},
onSpread(uid, n) {
this.onName = n
this.uid = uid
this.showDistributor = false
this.dialogVisible = true
this.onName = n;
this.uid = uid;
this.showDistributor = false;
this.dialogVisible = true;
this.spreadFrom = {
page: 1,
limit: 10,
date: '',
level: '',
keyword: ''
}
this.getListSpread(uid,'')
date: "",
level: "",
keyword: "",
};
this.getListSpread(uid, "");
},
handleClose() {
this.dialogVisible = false
this.dialogVisible = false;
},
//
getLevelList(){
getDistributionLevel().then(res => {
this.levelList = res.data;
}).catch((res) => {
this.$message.error(res.message)
//
getLevelList() {
getDistributionLevel()
.then((res) => {
this.levelList = res.data;
})
.catch((res) => {
this.$message.error(res.message);
});
},
//
getStatistics(){
distributionStatistics(this.tableFrom).then(res => {
this.cardLists = res.data;
}).catch((res) => {
this.$message.error(res.message)
getStatistics() {
distributionStatistics(this.tableFrom)
.then((res) => {
this.cardLists = res.data;
})
.catch((res) => {
this.$message.error(res.message);
});
},
//
setDistriLevel(row){
this.$modalForm(distributionLevelUpdate(row.uid))
//
setDistriLevel(row) {
this.$modalForm(distributionLevelUpdate(row.uid));
},
//
selectChangeSpread(tab) {
this.timeValSpread = []
this.spreadFrom.date = tab
this.onName === 'man' ? this.getListSpread(this.uid,1) : this.getSpreadOrderList(this.uid,1)
this.timeValSpread = [];
this.spreadFrom.date = tab;
this.onName === "man"
? this.getListSpread(this.uid, 1)
: this.getSpreadOrderList(this.uid, 1);
},
//
onchangeTimeSpread(e) {
this.timeValSpread = e
this.spreadFrom.date = e ? this.timeValSpread.join('-') : ''
this.onName === 'man' ? this.getListSpread(this.uid,'') : this.getSpreadOrderList(this.uid,'')
this.timeValSpread = e;
this.spreadFrom.date = e ? this.timeValSpread.join("-") : "";
this.onName === "man"
? this.getListSpread(this.uid, "")
: this.getSpreadOrderList(this.uid, "");
},
onChanges() {
this.onName === 'man' ? this.getListSpread(this.uid,1) : this.getSpreadOrderList(this.uid,1)
this.onName === "man"
? this.getListSpread(this.uid, 1)
: this.getSpreadOrderList(this.uid, 1);
},
// 广
getListSpread(uid,num) {
this.spreadLoading = true
this.spreadFrom.page = num ? num : this.spreadFrom.page
spreadListApi(uid, this.spreadFrom).then(res => {
this.spreadData.data = res.data.list
this.spreadData.total = res.data.count
this.spreadLoading = false
}).catch((res) => {
this.$message.error(res.message)
this.spreadLoading = false
})
//
getListSpread(uid, num) {
this.spreadLoading = true;
this.spreadFrom.page = num ? num : this.spreadFrom.page;
spreadListApi(uid, this.spreadFrom)
.then((res) => {
this.spreadData.data = res.data.list;
this.spreadData.total = res.data.count;
this.spreadLoading = false;
})
.catch((res) => {
this.$message.error(res.message);
this.spreadLoading = false;
});
},
pageChangeSpread(page) {
this.spreadFrom.page = page
this.onName === 'man' ? this.getListSpread(this.uid,'') : this.getSpreadOrderList(this.uid,'')
this.spreadFrom.page = page;
this.onName === "man"
? this.getListSpread(this.uid, "")
: this.getSpreadOrderList(this.uid, "");
},
handleSizeChangeSpread(val) {
this.spreadFrom.limit = val
this.onName === 'man' ? this.getListSpread(this.uid,'') : this.getSpreadOrderList(this.uid,'')
this.spreadFrom.limit = val;
this.onName === "man"
? this.getListSpread(this.uid, "")
: this.getSpreadOrderList(this.uid, "");
},
// 广
//
onSpreadOrder(uid, n) {
this.uid = uid
this.onName = n
this.showDistributor = true
this.dialogVisible = true
this.uid = uid;
this.onName = n;
this.showDistributor = true;
this.dialogVisible = true;
this.spreadFrom = {
page: 1,
limit: 10,
date: '',
level: '',
keyword: ''
}
this.getSpreadOrderList(uid,1)
date: "",
level: "",
keyword: "",
};
this.getSpreadOrderList(uid, 1);
},
getSpreadOrderList(uid, num) {
this.spreadLoading = true
this.spreadFrom.page = num ? num : this.spreadFrom.page
spreadOrderListApi(uid, this.spreadFrom).then(res => {
this.spreadData.data = res.data.list
this.spreadData.total = res.data.count
this.spreadLoading = false
}).catch((res) => {
this.$message.error(res.message)
this.spreadLoading = false
})
this.spreadLoading = true;
this.spreadFrom.page = num ? num : this.spreadFrom.page;
spreadOrderListApi(uid, this.spreadFrom)
.then((res) => {
this.spreadData.data = res.data.list;
this.spreadData.total = res.data.count;
this.spreadLoading = false;
})
.catch((res) => {
this.$message.error(res.message);
this.spreadLoading = false;
});
},
selectChange(tab) {
this.tableFrom.date = tab
this.timeVal = []
this.tableFrom.date = tab;
this.timeVal = [];
this.tableFrom.page = 1;
this.getList('')
this.getStatistics()
this.getList("");
this.getStatistics();
},
//
onchangeTime(e) {
this.timeVal = e
this.tableFrom.date = e ? this.timeVal.join('-') : ''
this.timeVal = e;
this.tableFrom.date = e ? this.timeVal.join("-") : "";
this.tableFrom.page = 1;
this.getList('')
this.getStatistics()
this.getList("");
this.getStatistics();
},
//
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page
promoterListApi(this.tableFrom).then(res => {
this.tableData.data = res.data.list
this.tableData.total = res.data.count
this.listLoading = false
}).catch((res) => {
this.$message.error(res.message)
this.listLoading = false
})
this.listLoading = true;
this.tableFrom.page = num ? num : this.tableFrom.page;
promoterListApi(this.tableFrom)
.then((res) => {
this.tableData.data = res.data.list;
this.tableData.total = res.data.count;
this.listLoading = false;
})
.catch((res) => {
this.$message.error(res.message);
this.listLoading = false;
});
},
pageChange(page) {
this.tableFrom.page = page
this.getList('')
this.tableFrom.page = page;
this.getList("");
},
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList('')
}
}
}
this.tableFrom.limit = val;
this.getList("");
},
},
};
</script>
<style scoped>
.el-dropdown-link {
cursor: pointer;
color: var(--prev-color-primary);
font-size: 12px;
}
.el-icon-arrow-down {
font-size: 12px;
}
.el-dropdown-link {
cursor: pointer;
color: var(--prev-color-primary);
font-size: 12px;
}
.el-icon-arrow-down {
font-size: 12px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -3,10 +3,17 @@
<div class="selCard">
<el-form size="small" label-width="85px">
<el-form-item label="模板类型:">
<el-select v-model="tableFrom.temp_type" placeholder="请选择" size="small" clearable class="selWidth" @change="getList(1)">
<el-select
v-model="tableFrom.temp_type"
placeholder="请选择"
size="small"
clearable
class="selWidth"
@change="getList(1)"
>
<el-option label="验证码" :value="1" />
<el-option label="通知" :value="2" />
<el-option label="推广" :value="3" />
<el-option label="邀请" :value="3" />
</el-select>
</el-form-item>
</el-form>
@ -18,38 +25,24 @@
size="small"
highlight-current-row
>
<el-table-column
prop="id"
label="ID"
min-width="50"
/>
<el-table-column
prop="title"
label="模板名称"
min-width="120"
/>
<el-table-column
prop="content"
label="模板内容"
min-width="150"
/>
<el-table-column
prop="temp_type"
label="模板类型"
min-width="100"
>
<template slot-scope="{row}">
<span>{{ row.temp_type | typeFilter}}</span>
<el-table-column prop="id" label="ID" min-width="50" />
<el-table-column prop="title" label="模板名称" min-width="120" />
<el-table-column prop="content" label="模板内容" min-width="150" />
<el-table-column prop="temp_type" label="模板类型" min-width="100">
<template slot-scope="{ row }">
<span>{{ row.temp_type | typeFilter }}</span>
</template>
</el-table-column>
<el-table-column
prop="mark"
label="备注"
min-width="150"
/>
<el-table-column prop="mark" label="备注" min-width="150" />
<el-table-column label="模板状态" min-width="100">
<template slot-scope="{row}">
<span>{{ row.status == 1 ? '审核通过' : row.status == 2 ? '审核未通过' : '待审核' }}</span>
<template slot-scope="{ row }">
<span>{{
row.status == 1
? "审核通过"
: row.status == 2
? "审核未通过"
: "待审核"
}}</span>
</template>
</el-table-column>
</el-table>
@ -65,26 +58,24 @@
/>
</div>
</el-card>
</div>
</template>
<script>
import { applyTempLstApi } from '@/api/sms'
import { roterPre } from '@/settings'
import { mapGetters } from 'vuex'
import { applyTempLstApi } from "@/api/sms";
import { roterPre } from "@/settings";
import { mapGetters } from "vuex";
export default {
name: 'SmsTemplate',
name: "SmsTemplate",
filters: {
typeFilter(type) {
const typeMap = {
1: '验证码',
2: '通知',
3: '营销短信'
}
return typeMap[type]
}
1: "验证码",
2: "通知",
3: "营销短信",
};
return typeMap[type];
},
},
data() {
return {
@ -93,70 +84,70 @@ export default {
dialogVisible: false,
tableData: {
data: [],
total: 0
total: 0,
},
tableFrom: {
page: 1,
limit: 20,
temp_type: ''
}
}
temp_type: "",
},
};
},
computed: {
...mapGetters([
'isLogin'
])
...mapGetters(["isLogin"]),
},
mounted() {
console.log(this.isLogin);
this.getList('')
this.getList("");
},
methods: {
//
onIsLogin() {
this.fullscreenLoading = true
this.$store.dispatch('user/isLogin').then(async res => {
const data = res.data
if (!data.status) {
this.$message.warning('请先登录')
this.$router.push(roterPre + '/sms/config?url=' + this.$route.path)
} else {
this.getList('')
}
this.fullscreenLoading = false
}).catch(res => {
this.$message.error(res.message)
this.$router.push(roterPre + '/sms/config?url=' + this.$route.path)
this.fullscreenLoading = false
})
this.fullscreenLoading = true;
this.$store
.dispatch("user/isLogin")
.then(async (res) => {
const data = res.data;
if (!data.status) {
this.$message.warning("请先登录");
this.$router.push(roterPre + "/sms/config?url=" + this.$route.path);
} else {
this.getList("");
}
this.fullscreenLoading = false;
})
.catch((res) => {
this.$message.error(res.message);
this.$router.push(roterPre + "/sms/config?url=" + this.$route.path);
this.fullscreenLoading = false;
});
},
//
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page
applyTempLstApi(this.tableFrom).then(res => {
this.tableData.data = res.data.data
this.tableData.total = res.data.count
this.listLoading = false
}).catch(res => {
this.listLoading = false
this.$message.error(res.message)
this.$router.push(roterPre + '/setting/sms/sms_config/index')
})
this.listLoading = true;
this.tableFrom.page = num ? num : this.tableFrom.page;
applyTempLstApi(this.tableFrom)
.then((res) => {
this.tableData.data = res.data.data;
this.tableData.total = res.data.count;
this.listLoading = false;
})
.catch((res) => {
this.listLoading = false;
this.$message.error(res.message);
this.$router.push(roterPre + "/setting/sms/sms_config/index");
});
},
pageChange(page) {
this.tableFrom.page = page
this.getList('')
this.tableFrom.page = page;
this.getList("");
},
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList('')
this.tableFrom.limit = val;
this.getList("");
},
},
}
};
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

View File

@ -3,17 +3,26 @@
<div class="selCard">
<el-form inline label-width="85px">
<el-form-item label="模板类型:">
<el-select v-model="tableFrom.type" placeholder="请选择" size="small" clearable class="selWidth" @change="userSearchs">
<el-select
v-model="tableFrom.type"
placeholder="请选择"
size="small"
clearable
class="selWidth"
@change="userSearchs"
>
<el-option label="验证码" :value="1" />
<el-option label="通知" :value="2" />
<el-option label="推广" :value="3" />
<el-option label="邀请" :value="3" />
</el-select>
</el-form-item>
</el-form>
</div>
<el-card v-loading="fullscreenLoading" class="mt14">
<div class="mb20">
<el-button size="small" type="primary" @click="apply">申请短信模板</el-button>
<el-button size="small" type="primary" @click="apply"
>申请短信模板</el-button
>
</div>
<el-table
v-loading="listLoading"
@ -21,34 +30,14 @@
size="small"
highlight-current-row
>
<el-table-column
prop="id"
label="ID"
min-width="50"
/>
<el-table-column
prop="templateid"
label="模板ID"
min-width="80"
/>
<el-table-column
prop="title"
label="模板名称"
min-width="120"
/>
<el-table-column
prop="content"
label="模板内容"
min-width="500"
/>
<el-table-column
prop="type"
label="模板类型"
min-width="100"
/>
<el-table-column prop="id" label="ID" min-width="50" />
<el-table-column prop="templateid" label="模板ID" min-width="80" />
<el-table-column prop="title" label="模板名称" min-width="120" />
<el-table-column prop="content" label="模板内容" min-width="500" />
<el-table-column prop="type" label="模板类型" min-width="100" />
<el-table-column label="模板状态">
<template slot-scope="{row}">
<span>{{ row.status ? '可用' : '不可用' }}</span>
<template slot-scope="{ row }">
<span>{{ row.status ? "可用" : "不可用" }}</span>
</template>
</el-table-column>
</el-table>
@ -65,19 +54,36 @@
</div>
</el-card>
<!--短信模板弹框-->
<el-dialog v-if="dialogVisible" title="申请短信模板" :visible.sync="dialogVisible" width="700px">
<el-dialog
v-if="dialogVisible"
title="申请短信模板"
:visible.sync="dialogVisible"
width="700px"
>
<el-form @submit.native.prevent size="small" label-width="100px">
<el-form-item label="模板名称:" class="width100" prop="title">
<el-input v-model="form.title" type="text" :placeholder="placeholder.title" class="selwidths" size="small" />
<el-input
v-model="form.title"
type="text"
:placeholder="placeholder.title"
class="selwidths"
size="small"
/>
</el-form-item>
<el-form-item label="模板内容:" class="width100" prop="content">
<el-input v-model="form.content" type="textarea" :placeholder="placeholder.content" class="selwidths" size="small" />
<el-input
v-model="form.content"
type="textarea"
:placeholder="placeholder.content"
class="selwidths"
size="small"
/>
</el-form-item>
<el-form-item label="模板类型:">
<el-radio-group v-model="form.type" @change="changeRadioText">
<el-radio :label="1">验证码</el-radio>
<el-radio :label="2">通知</el-radio>
<el-radio :label="3">推广</el-radio>
<el-radio :label="3">邀请</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
@ -89,12 +95,11 @@
</template>
<script>
import { smsTempLstApi, tempCreateApi } from '@/api/sms'
import { roterPre } from '@/settings'
import { mapGetters } from 'vuex'
import { smsTempLstApi, tempCreateApi } from "@/api/sms";
import { roterPre } from "@/settings";
import { mapGetters } from "vuex";
export default {
name: 'SmsTemplate',
name: "SmsTemplate",
data() {
return {
@ -103,120 +108,122 @@ export default {
dialogVisible: false,
tableData: {
data: [],
total: 0
total: 0,
},
form: {
title: '',
content: '',
type: 1
title: "",
content: "",
type: 1,
},
placeholder: {},
placeholderObj:[
placeholderObj: [
{
title: '例如:注册验证码',
content: '例如:您的验证码是:{$code},有效期为{$time}分钟。如非本人操作,可不予理会.'
title: "例如:注册验证码",
content:
"例如:您的验证码是:{$code},有效期为{$time}分钟。如非本人操作,可不予理会.",
},
{
title: '例如:订单支付成功通知',
content: '例如:您购买的商品已支付成功,支付金额{$pay_price}元,订单号{$order_id},感谢您的光临!'
title: "例如:订单支付成功通知",
content:
"例如:您购买的商品已支付成功,支付金额{$pay_price}元,订单号{$order_id},感谢您的光临!",
},
{
title: '例如:国庆优惠活动',
content: '10月1日-8日期间 全场商品满1000减200国庆欢乐购'
}
title: "例如:国庆优惠活动",
content: "10月1日-8日期间 全场商品满1000减200国庆欢乐购",
},
],
tableFrom: {
page: 1,
limit: 20,
type: ''
}
}
type: "",
},
};
},
computed: {
...mapGetters([
'isLogin'
])
...mapGetters(["isLogin"]),
},
mounted() {
console.log(this.isLogin);
this.getList('')
this.getList("");
this.changeRadioText();
},
methods: {
changeRadioText(){
this.placeholder=this.placeholderObj[this.form.type-1]
changeRadioText() {
this.placeholder = this.placeholderObj[this.form.type - 1];
},
//
onIsLogin() {
this.fullscreenLoading = true
this.$store.dispatch('user/isLogin').then(async res => {
const data = res.data
if (!data.status) {
this.$message.warning('请先登录')
this.$router.push(roterPre + '/sms/config?url=' + this.$route.path)
} else {
this.getList('')
}
this.fullscreenLoading = false
}).catch(res => {
this.$message.error(res.message)
this.$router.push(roterPre + '/sms/config?url=' + this.$route.path)
this.fullscreenLoading = false
})
this.fullscreenLoading = true;
this.$store
.dispatch("user/isLogin")
.then(async (res) => {
const data = res.data;
if (!data.status) {
this.$message.warning("请先登录");
this.$router.push(roterPre + "/sms/config?url=" + this.$route.path);
} else {
this.getList("");
}
this.fullscreenLoading = false;
})
.catch((res) => {
this.$message.error(res.message);
this.$router.push(roterPre + "/sms/config?url=" + this.$route.path);
this.fullscreenLoading = false;
});
},
//
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page
smsTempLstApi(this.tableFrom).then(res => {
this.tableData.data = res.data.data
this.tableData.total = res.data.count
this.listLoading = false
}).catch(res => {
this.listLoading = false
this.$message.error(res.message)
this.$router.push(roterPre + '/setting/sms/sms_config/index')
})
this.listLoading = true;
this.tableFrom.page = num ? num : this.tableFrom.page;
smsTempLstApi(this.tableFrom)
.then((res) => {
this.tableData.data = res.data.data;
this.tableData.total = res.data.count;
this.listLoading = false;
})
.catch((res) => {
this.listLoading = false;
this.$message.error(res.message);
this.$router.push(roterPre + "/setting/sms/sms_config/index");
});
},
pageChange(page) {
this.tableFrom.page = page
this.getList('')
this.tableFrom.page = page;
this.getList("");
},
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList('')
this.tableFrom.limit = val;
this.getList("");
},
//
userSearchs() {
this.getList(1)
this.getList(1);
},
//
apply(){
this.form={title: '',content: '',type: 1};
apply() {
this.form = { title: "", content: "", type: 1 };
this.dialogVisible = true;
this.changeRadioText();
},
//
add() {
if(!this.form.title || !this.form.content){
this.$message.error('请提前写完信息!');
}else{
tempCreateApi(this.form).then(({ message }) => {
this.$message.success('申请成功!')
this.dialogVisible = false
this.$router.push(roterPre + '/sms/applyList')
})
.catch(({ message }) => {
this.$message.error(message)
if (!this.form.title || !this.form.content) {
this.$message.error("请提前写完信息!");
} else {
tempCreateApi(this.form)
.then(({ message }) => {
this.$message.success("申请成功!");
this.dialogVisible = false;
this.$router.push(roterPre + "/sms/applyList");
})
.catch(({ message }) => {
this.$message.error(message);
});
}
}
},
},
}
};
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
:size="800"
:visible.sync="createDrawer"
direction="rtl"
:before-close="handleClose"
:before-close="handleClose"
>
<div>
<div class="head">
@ -21,7 +21,7 @@
:model="userInfo"
label-width="130px"
@submit.native.prevent
>
>
<el-form-item label="手机号(账号)" prop="account">
<el-input
type="text"
@ -57,15 +57,13 @@
/>
</el-form-item>
<el-form-item label="头像:">
<div
class="upLoadPicBox"
>
<div class="upLoadPicBox">
<div v-if="userInfo.avatar" class="pictrue">
<img :src="userInfo.avatar">
<img :src="userInfo.avatar" />
<i
class="el-icon-error btndel"
@click="userInfo.avatar=''"
/>
class="el-icon-error btndel"
@click="userInfo.avatar = ''"
/>
</div>
<div v-else class="upLoad" @click="modalPicTap('1')">
<i class="el-icon-camera cameraIconfont" />
@ -117,55 +115,64 @@
<el-radio :label="1">正常</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="推广员:" required>
<!-- <el-form-item label="邀请员:" required>
<el-radio-group v-model="userInfo.is_promoter">
<el-radio :label="0">关闭</el-radio>
<el-radio :label="1">开启</el-radio>
</el-radio-group>
</el-form-item> -->
</el-form>
</el-form>
</el-col>
<el-col :span="23">
<div class="demo-drawer__footer">
<el-button @click="handleClose" size="small"> </el-button>
<el-button type="primary" @click="submitForm('userField')" :loading="loading" size="small">{{ loading ? '提交中 ...' : '确 定' }}</el-button>
<el-button
type="primary"
@click="submitForm('userField')"
:loading="loading"
size="small"
>{{ loading ? "提交中 ..." : "确 定" }}</el-button
>
</div>
</el-col>
</el-row>
</div>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
import { addUserApi } from '@/api/user'
import { addUserApi } from "@/api/user";
export default {
name: 'UserCreate',
name: "UserCreate",
props: {
createDrawer: {
type: Boolean,
default: false,
},
},
},
data() {
const validatePhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('请输入手机号'))
return callback(new Error("请输入手机号"));
} else if (!/^1[3456789]\d{9}$/.test(value)) {
callback(new Error('格式不正确!'))
callback(new Error("格式不正确!"));
} else {
callback()
callback();
}
}
};
const validateCard = (rule, value, callback) => {
if (value && !/^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[Xx\d]$/.test(value)) {
callback(new Error('格式不正确!'))
if (
value &&
!/^[1-9]\d{5}(19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[Xx\d]$/.test(
value
)
) {
callback(new Error("格式不正确!"));
} else {
callback()
callback();
}
}
};
let validatePass2 = (rule, value, callback) => {
if (value === "") {
callback(new Error("请再次输入密码"));
@ -181,75 +188,78 @@ export default {
avatar: "",
sex: 0,
status: 1,
is_promoter: 1
is_promoter: 1,
},
ruleValidate: {
account: [{ required: true, validator: validatePhone, trigger: 'blur' }],
phone: [{ validator: validatePhone, trigger: 'blur' }],
card_id: [{validator: validateCard, trigger: 'blur'}],
pwd: [{ required: true, message: '请输入密码', trigger: 'blur' }],
repwd: [{ required: true, validator: validatePass2, trigger: 'blur' }],
account: [
{ required: true, validator: validatePhone, trigger: "blur" },
],
phone: [{ validator: validatePhone, trigger: "blur" }],
card_id: [{ validator: validateCard, trigger: "blur" }],
pwd: [{ required: true, message: "请输入密码", trigger: "blur" }],
repwd: [{ required: true, validator: validatePass2, trigger: "blur" }],
},
}
};
},
mounted() {},
methods: {
handleClose() {
this.resetData()
this.$emit('closeDrawer');
this.resetData();
this.$emit("closeDrawer");
},
resetData(){
this.$refs.userField.resetFields()
this.userInfo.avatar=""
this.userInfo.phone=""
this.userInfo.real_name=""
this.userInfo.card_id=""
this.userInfo.birthday=""
this.userInfo.sex = 0
resetData() {
this.$refs.userField.resetFields();
this.userInfo.avatar = "";
this.userInfo.phone = "";
this.userInfo.real_name = "";
this.userInfo.card_id = "";
this.userInfo.birthday = "";
this.userInfo.sex = 0;
},
//
modalPicTap(tit, num, i) {
const _this = this;
this.$modalUpload(function(img) {
this.$modalUpload(function (img) {
_this.userInfo.avatar = img[0];
}, tit);
},
submitForm(name){
submitForm(name) {
this.loading = true;
this.$refs[name].validate(valid => {
this.$refs[name].validate((valid) => {
if (valid) {
addUserApi(this.userInfo).then(async res => {
this.loading = false;
this.$message.success(res.message);
this.$emit('closeDrawer');
this.$emit('getList');
})
.catch(res => {
this.loading = false;
this.$message.error(res.message);
})
}else{
addUserApi(this.userInfo)
.then(async (res) => {
this.loading = false;
this.$message.success(res.message);
this.$emit("closeDrawer");
this.$emit("getList");
})
.catch((res) => {
this.loading = false;
this.$message.error(res.message);
});
} else {
this.loading = false;
}
});
}
}
}
},
},
};
</script>
<style scoped lang="scss">
.head {
padding: 15px 20px;
border-bottom: 1px solid #DCDFE6;
.title {
font-weight: bold;
font-size: 14px;
line-height: 16px;
color: rgba(0, 0, 0, 0.85);
}
}
.demo-drawer__footer{
text-align: right;
padding: 20px 0;
.head {
padding: 15px 20px;
border-bottom: 1px solid #dcdfe6;
.title {
font-weight: bold;
font-size: 14px;
line-height: 16px;
color: rgba(0, 0, 0, 0.85);
}
}
.demo-drawer__footer {
text-align: right;
padding: 20px 0;
}
</style>

View File

@ -65,7 +65,7 @@
<el-dropdown-item command="balance"
>设置余额</el-dropdown-item
>
<el-dropdown-item command="group">设置分组</el-dropdown-item>
<!-- <el-dropdown-item command="group">设置分组</el-dropdown-item> -->
<el-dropdown-item command="label">设置标签</el-dropdown-item>
<!-- <el-dropdown-item command="reference">修改推荐人</el-dropdown-item> -->
<el-dropdown-item command="password"
@ -148,7 +148,7 @@
<div class="title">用户概况</div>
<ul class="list">
<!-- <li class="item">
<div>推广</div>
<div>邀请</div>
<div class="value">{{psInfo.is_promoter == 1 ? '是' : '否'}}</div>
</li> -->
<li class="item">
@ -179,7 +179,7 @@
</div>
</li>
<!-- <li class="item">
<div>推广</div>
<div>邀请</div>
<div class="value">{{psInfo.spread && psInfo.spread.nickname || '无'}}</div>
</li> -->
<li class="item">
@ -200,7 +200,7 @@
</ul>
</div>
<div class="section" v-if="psInfo.spread">
<div class="title">邀请人信息</div>
<div class="title">邀请人信息</div>
<ul class="list">
<li class="item">
<div>用户ID</div>
@ -402,7 +402,7 @@
</el-col>
</el-row>
<!-- <el-row :gutter="24">
<el-form-item label="推广员:" prop="is_promoter">
<el-form-item label="邀请员:" prop="is_promoter">
<el-radio-group
v-model="psInfo.is_promoter"
>
@ -774,7 +774,7 @@
:key="index"
:prop="item.key"
:label="item.title"
width="item.minWidth"
:min-width="item.minWidth"
>
<template slot-scope="scope">
<span v-if="item.key == 'activation_promoter'">{{
@ -1241,12 +1241,17 @@ export default {
{
title: "用户ID",
key: "uid",
minWidth: 200,
minWidth: 80,
},
{
title: "ID号",
key: "number",
minWidth: 80,
},
{
title: "用户姓名",
key: "real_name",
minWidth: 50,
minWidth: 80,
},
{
title: "用户电话",
@ -1256,11 +1261,16 @@ export default {
{
title: "用户身份证号",
key: "card_id",
minWidth: 100,
minWidth: 160,
},
{
title: "是否绑定",
key: "activation_promoter",
key: "activation_promoter_name",
minWidth: 100,
},
{
title: "绑定时间",
key: "activation_time",
minWidth: 100,
},
];