This commit is contained in:
parent
f42ab11f4c
commit
aecb0e3c93
|
@ -4,8 +4,8 @@ ENV = 'development'
|
||||||
# http://mer.crmeb.net/admin
|
# http://mer.crmeb.net/admin
|
||||||
# base api
|
# base api
|
||||||
# www.shop.xyz
|
# www.shop.xyz
|
||||||
VUE_APP_BASE_API = 'http://www.shop.xyz'
|
# VUE_APP_BASE_API = 'http://www.shop.xyz'
|
||||||
# VUE_APP_BASE_API = 'http://test.tropjoin.com'
|
VUE_APP_BASE_API = 'http://test.tropjoin.com'
|
||||||
# VUE_APP_BASE_API = 'https://api.tropjoin.com'
|
# VUE_APP_BASE_API = 'https://api.tropjoin.com'
|
||||||
|
|
||||||
# socket 连接地址
|
# socket 连接地址
|
||||||
|
|
77
README.es.md
77
README.es.md
|
@ -1,51 +1,56 @@
|
||||||
# CRMEB多商户
|
# CRMEB 多商户
|
||||||
|
|
||||||
## 开发规范
|
## 开发规范
|
||||||
统一使用ES6 语法
|
|
||||||
|
统一使用 ES6 语法
|
||||||
方法注释
|
方法注释
|
||||||
/*
|
/\*
|
||||||
* th => 表头
|
|
||||||
* data => 数据
|
- th => 表头
|
||||||
* fileName => 文件名
|
- data => 数据
|
||||||
* fileType => 文件类型
|
- fileName => 文件名
|
||||||
* sheetName => sheet页名
|
- fileType => 文件类型
|
||||||
*/
|
- sheetName => sheet 页名
|
||||||
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
\*/
|
||||||
行注释 //
|
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
||||||
|
行注释 //
|
||||||
|
|
||||||
### 命名
|
### 命名
|
||||||
|
|
||||||
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
||||||
例如:商品模块
|
例如:商品模块
|
||||||
product 商品
|
product 商品
|
||||||
├─ product 商品管理
|
├─ product 商品管理
|
||||||
├─productList 商品管理目录
|
├─productList 商品管理目录
|
||||||
├- index.vue 首页
|
├- index.vue 首页
|
||||||
|
|
||||||
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
||||||
|
|
||||||
类名函数命名 大驼峰式 例如:addUser
|
类名函数命名 大驼峰式 例如:addUser
|
||||||
变量命名 小驼峰式 例如:user 或者 userInfo _userinfo user-info
|
变量命名 小驼峰式 例如:user 或者 userInfo \_userinfo user-info
|
||||||
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
||||||
|
|
||||||
### 文件管理规范
|
### 文件管理规范
|
||||||
|
|
||||||
pages 页面模块必须件文件夹区分
|
pages 页面模块必须件文件夹区分
|
||||||
api 接口一个模块一个文件
|
api 接口一个模块一个文件
|
||||||
组建 一个组建一个文件夹
|
组建 一个组建一个文件夹
|
||||||
plugins 插件一个插件一个文件夹
|
plugins 插件一个插件一个文件夹
|
||||||
vuex 路由状态管理,一个模块在modules 中建一个文件夹
|
vuex 路由状态管理,一个模块在 modules 中建一个文件夹
|
||||||
router 一个模块一个模块在modules 中建一个文件夹
|
router 一个模块一个模块在 modules 中建一个文件夹
|
||||||
style 样式尽量采用iView自带组建,common.less 系统通用样式不要轻易动
|
style 样式尽量采用 iView 自带组建,common.less 系统通用样式不要轻易动
|
||||||
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀less 格式
|
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀 less 格式
|
||||||
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
|
组建样式 styles 中添加文件夹 composents 对应 components 目录新建样式文件
|
||||||
utils 自定义工具js 独立命名,一般不用新建文件夹
|
utils 自定义工具 js 独立命名,一般不用新建文件夹
|
||||||
|
|
||||||
## 模块命名
|
## 模块命名
|
||||||
~~~
|
|
||||||
|
```
|
||||||
├─ login 登录
|
├─ login 登录
|
||||||
├─ dashboard 首页
|
├─ dashboard 首页
|
||||||
├─ product 商品管理
|
├─ product 商品管理
|
||||||
├─ order 系统订单管理
|
├─ order 系统订单管理
|
||||||
├─ promoter 分销
|
├─ promoter 服务
|
||||||
├─ user 用户管理
|
├─ user 用户管理
|
||||||
├─ accounts 财务管理
|
├─ accounts 财务管理
|
||||||
├─ merchant 商户管理
|
├─ merchant 商户管理
|
||||||
|
@ -60,10 +65,13 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
├─ userFeedback 用户反馈
|
├─ userFeedback 用户反馈
|
||||||
├─ error-page 错误页
|
├─ error-page 错误页
|
||||||
|
|
||||||
~~~
|
```
|
||||||
|
|
||||||
## 目录结构
|
## 目录结构
|
||||||
|
|
||||||
主要目录结构及说明:
|
主要目录结构及说明:
|
||||||
~~~
|
|
||||||
|
```
|
||||||
|
|
||||||
├── public # 静态资源
|
├── public # 静态资源
|
||||||
│ ├── favicon.ico # favicon图标
|
│ ├── favicon.ico # favicon图标
|
||||||
|
@ -72,7 +80,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ ├── api # 所有接口api
|
│ ├── api # 所有接口api
|
||||||
│ │ └──request.js # 请求封装
|
│ │ └──request.js # 请求封装
|
||||||
│ │ └──accounts.js # 有关财务的接口
|
│ │ └──accounts.js # 有关财务的接口
|
||||||
│ │ └──promoter.js # 有关分销的接口
|
│ │ └──promoter.js # 有关服务的接口
|
||||||
│ │ └──app.js # 有关应用(小程序、公众号)的接口
|
│ │ └──app.js # 有关应用(小程序、公众号)的接口
|
||||||
│ │ └──cms.js # 有关内容(文章管理、分类)的接口
|
│ │ └──cms.js # 有关内容(文章管理、分类)的接口
|
||||||
│ │ └──home.js # 有关首页的接口
|
│ │ └──home.js # 有关首页的接口
|
||||||
|
@ -126,9 +134,9 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ │ └──productExamine # 商品审核
|
│ │ └──productExamine # 商品审核
|
||||||
│ │ └──productComment # 商品评论管理
|
│ │ └──productComment # 商品评论管理
|
||||||
│ │ └──order # 订单管理
|
│ │ └──order # 订单管理
|
||||||
│ │ └──promoter # 分销
|
│ │ └──promoter # 服务
|
||||||
│ │ └──user # 分销员列表
|
│ │ └──user # 服务员列表
|
||||||
│ │ └──config # 分销设置
|
│ │ └──config # 服务设置
|
||||||
│ │ └──cms # 内容
|
│ │ └──cms # 内容
|
||||||
│ │ └──addArticle # 添加文章/编辑文章
|
│ │ └──addArticle # 添加文章/编辑文章
|
||||||
│ │ └──article # 文章管理
|
│ │ └──article # 文章管理
|
||||||
|
@ -162,7 +170,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ │ └──picture # 素材管理
|
│ │ └──picture # 素材管理
|
||||||
│ │ └──groupData # 组合设置
|
│ │ └──groupData # 组合设置
|
||||||
│ │ └──list # 组合数据
|
│ │ └──list # 组合数据
|
||||||
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/分销特权/分销海报/充值金额配置
|
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/服务特权/服务海报/充值金额配置
|
||||||
│ │ └──setting # 设置-权限管理
|
│ │ └──setting # 设置-权限管理
|
||||||
│ │ └──systemRole # 身份管理
|
│ │ └──systemRole # 身份管理
|
||||||
│ │ └──systemAdmin # 管理员管理
|
│ │ └──systemAdmin # 管理员管理
|
||||||
|
@ -200,7 +208,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ │ └──merchant.js # 有关商户
|
│ │ └──merchant.js # 有关商户
|
||||||
│ │ └──order.js # 有关订单
|
│ │ └──order.js # 有关订单
|
||||||
│ │ └──product.js # 有关商品
|
│ │ └──product.js # 有关商品
|
||||||
│ │ └──promoter.js # 有关分销
|
│ │ └──promoter.js # 有关服务
|
||||||
│ │ └──routine.js # 有关小程序
|
│ │ └──routine.js # 有关小程序
|
||||||
│ │ └──safe.js # 有关维护
|
│ │ └──safe.js # 有关维护
|
||||||
│ │ └──setting.js # 有关权限
|
│ │ └──setting.js # 有关权限
|
||||||
|
@ -225,9 +233,11 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
├── postcss.config.js # postcss 配置
|
├── postcss.config.js # postcss 配置
|
||||||
└── package.json # package.json
|
└── package.json # package.json
|
||||||
|
|
||||||
~~~
|
```
|
||||||
|
|
||||||
## 开发打包项目
|
## 开发打包项目
|
||||||
~~~
|
|
||||||
|
````
|
||||||
# 进入项目目录
|
# 进入项目目录
|
||||||
$ cd admin-iView
|
$ cd admin-iView
|
||||||
|
|
||||||
|
@ -261,3 +271,4 @@ npm run lint
|
||||||
# code format check and auto fix
|
# code format check and auto fix
|
||||||
npm run lint -- --fix
|
npm run lint -- --fix
|
||||||
```
|
```
|
||||||
|
````
|
||||||
|
|
77
README.ja.md
77
README.ja.md
|
@ -1,51 +1,56 @@
|
||||||
# CRMEB多商户
|
# CRMEB 多商户
|
||||||
|
|
||||||
## 开发规范
|
## 开发规范
|
||||||
统一使用ES6 语法
|
|
||||||
|
统一使用 ES6 语法
|
||||||
方法注释
|
方法注释
|
||||||
/*
|
/\*
|
||||||
* th => 表头
|
|
||||||
* data => 数据
|
- th => 表头
|
||||||
* fileName => 文件名
|
- data => 数据
|
||||||
* fileType => 文件类型
|
- fileName => 文件名
|
||||||
* sheetName => sheet页名
|
- fileType => 文件类型
|
||||||
*/
|
- sheetName => sheet 页名
|
||||||
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
\*/
|
||||||
行注释 //
|
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
||||||
|
行注释 //
|
||||||
|
|
||||||
### 命名
|
### 命名
|
||||||
|
|
||||||
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
||||||
例如:商品模块
|
例如:商品模块
|
||||||
product 商品
|
product 商品
|
||||||
├─ product 商品管理
|
├─ product 商品管理
|
||||||
├─productList 商品管理目录
|
├─productList 商品管理目录
|
||||||
├- index.vue 首页
|
├- index.vue 首页
|
||||||
|
|
||||||
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
||||||
|
|
||||||
类名函数命名 大驼峰式 例如:addUser
|
类名函数命名 大驼峰式 例如:addUser
|
||||||
变量命名 小驼峰式 例如:user 或者 userInfo _userinfo user-info
|
变量命名 小驼峰式 例如:user 或者 userInfo \_userinfo user-info
|
||||||
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
||||||
|
|
||||||
### 文件管理规范
|
### 文件管理规范
|
||||||
|
|
||||||
pages 页面模块必须件文件夹区分
|
pages 页面模块必须件文件夹区分
|
||||||
api 接口一个模块一个文件
|
api 接口一个模块一个文件
|
||||||
组建 一个组建一个文件夹
|
组建 一个组建一个文件夹
|
||||||
plugins 插件一个插件一个文件夹
|
plugins 插件一个插件一个文件夹
|
||||||
vuex 路由状态管理,一个模块在modules 中建一个文件夹
|
vuex 路由状态管理,一个模块在 modules 中建一个文件夹
|
||||||
router 一个模块一个模块在modules 中建一个文件夹
|
router 一个模块一个模块在 modules 中建一个文件夹
|
||||||
style 样式尽量采用iView自带组建,common.less 系统通用样式不要轻易动
|
style 样式尽量采用 iView 自带组建,common.less 系统通用样式不要轻易动
|
||||||
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀less 格式
|
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀 less 格式
|
||||||
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
|
组建样式 styles 中添加文件夹 composents 对应 components 目录新建样式文件
|
||||||
utils 自定义工具js 独立命名,一般不用新建文件夹
|
utils 自定义工具 js 独立命名,一般不用新建文件夹
|
||||||
|
|
||||||
## 模块命名
|
## 模块命名
|
||||||
~~~
|
|
||||||
|
```
|
||||||
├─ login 登录
|
├─ login 登录
|
||||||
├─ dashboard 首页
|
├─ dashboard 首页
|
||||||
├─ product 商品管理
|
├─ product 商品管理
|
||||||
├─ order 系统订单管理
|
├─ order 系统订单管理
|
||||||
├─ promoter 分销
|
├─ promoter 服务
|
||||||
├─ user 用户管理
|
├─ user 用户管理
|
||||||
├─ accounts 财务管理
|
├─ accounts 财务管理
|
||||||
├─ merchant 商户管理
|
├─ merchant 商户管理
|
||||||
|
@ -60,10 +65,13 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
├─ userFeedback 用户反馈
|
├─ userFeedback 用户反馈
|
||||||
├─ error-page 错误页
|
├─ error-page 错误页
|
||||||
|
|
||||||
~~~
|
```
|
||||||
|
|
||||||
## 目录结构
|
## 目录结构
|
||||||
|
|
||||||
主要目录结构及说明:
|
主要目录结构及说明:
|
||||||
~~~
|
|
||||||
|
```
|
||||||
|
|
||||||
├── public # 静态资源
|
├── public # 静态资源
|
||||||
│ ├── favicon.ico # favicon图标
|
│ ├── favicon.ico # favicon图标
|
||||||
|
@ -72,7 +80,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ ├── api # 所有接口api
|
│ ├── api # 所有接口api
|
||||||
│ │ └──request.js # 请求封装
|
│ │ └──request.js # 请求封装
|
||||||
│ │ └──accounts.js # 有关财务的接口
|
│ │ └──accounts.js # 有关财务的接口
|
||||||
│ │ └──promoter.js # 有关分销的接口
|
│ │ └──promoter.js # 有关服务的接口
|
||||||
│ │ └──app.js # 有关应用(小程序、公众号)的接口
|
│ │ └──app.js # 有关应用(小程序、公众号)的接口
|
||||||
│ │ └──cms.js # 有关内容(文章管理、分类)的接口
|
│ │ └──cms.js # 有关内容(文章管理、分类)的接口
|
||||||
│ │ └──home.js # 有关首页的接口
|
│ │ └──home.js # 有关首页的接口
|
||||||
|
@ -126,9 +134,9 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ │ └──productExamine # 商品审核
|
│ │ └──productExamine # 商品审核
|
||||||
│ │ └──productComment # 商品评论管理
|
│ │ └──productComment # 商品评论管理
|
||||||
│ │ └──order # 订单管理
|
│ │ └──order # 订单管理
|
||||||
│ │ └──promoter # 分销
|
│ │ └──promoter # 服务
|
||||||
│ │ └──user # 分销员列表
|
│ │ └──user # 服务员列表
|
||||||
│ │ └──config # 分销设置
|
│ │ └──config # 服务设置
|
||||||
│ │ └──cms # 内容
|
│ │ └──cms # 内容
|
||||||
│ │ └──addArticle # 添加文章/编辑文章
|
│ │ └──addArticle # 添加文章/编辑文章
|
||||||
│ │ └──article # 文章管理
|
│ │ └──article # 文章管理
|
||||||
|
@ -162,7 +170,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ │ └──picture # 素材管理
|
│ │ └──picture # 素材管理
|
||||||
│ │ └──groupData # 组合设置
|
│ │ └──groupData # 组合设置
|
||||||
│ │ └──list # 组合数据
|
│ │ └──list # 组合数据
|
||||||
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/分销特权/分销海报/充值金额配置
|
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/服务特权/服务海报/充值金额配置
|
||||||
│ │ └──setting # 设置-权限管理
|
│ │ └──setting # 设置-权限管理
|
||||||
│ │ └──systemRole # 身份管理
|
│ │ └──systemRole # 身份管理
|
||||||
│ │ └──systemAdmin # 管理员管理
|
│ │ └──systemAdmin # 管理员管理
|
||||||
|
@ -200,7 +208,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ │ └──merchant.js # 有关商户
|
│ │ └──merchant.js # 有关商户
|
||||||
│ │ └──order.js # 有关订单
|
│ │ └──order.js # 有关订单
|
||||||
│ │ └──product.js # 有关商品
|
│ │ └──product.js # 有关商品
|
||||||
│ │ └──promoter.js # 有关分销
|
│ │ └──promoter.js # 有关服务
|
||||||
│ │ └──routine.js # 有关小程序
|
│ │ └──routine.js # 有关小程序
|
||||||
│ │ └──safe.js # 有关维护
|
│ │ └──safe.js # 有关维护
|
||||||
│ │ └──setting.js # 有关权限
|
│ │ └──setting.js # 有关权限
|
||||||
|
@ -225,9 +233,11 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
├── postcss.config.js # postcss 配置
|
├── postcss.config.js # postcss 配置
|
||||||
└── package.json # package.json
|
└── package.json # package.json
|
||||||
|
|
||||||
~~~
|
```
|
||||||
|
|
||||||
## 开发打包项目
|
## 开发打包项目
|
||||||
~~~
|
|
||||||
|
````
|
||||||
# 进入项目目录
|
# 进入项目目录
|
||||||
$ cd admin-iView
|
$ cd admin-iView
|
||||||
|
|
||||||
|
@ -261,3 +271,4 @@ npm run lint
|
||||||
# code format check and auto fix
|
# code format check and auto fix
|
||||||
npm run lint -- --fix
|
npm run lint -- --fix
|
||||||
```
|
```
|
||||||
|
````
|
||||||
|
|
57
README.md
57
README.md
|
@ -1,4 +1,4 @@
|
||||||
# CRMEB多商户
|
# CRMEB 多商户
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
||||||
|
@ -7,52 +7,56 @@ cp -r dist/. ../shop-many/public/
|
||||||
```
|
```
|
||||||
|
|
||||||
## 开发规范
|
## 开发规范
|
||||||
统一使用ES6 语法
|
|
||||||
|
统一使用 ES6 语法
|
||||||
方法注释
|
方法注释
|
||||||
/*
|
/\*
|
||||||
* th => 表头
|
|
||||||
* data => 数据
|
- th => 表头
|
||||||
* fileName => 文件名
|
- data => 数据
|
||||||
* fileType => 文件类型
|
- fileName => 文件名
|
||||||
* sheetName => sheet页名
|
- fileType => 文件类型
|
||||||
*/
|
- sheetName => sheet 页名
|
||||||
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
\*/
|
||||||
行注释 //
|
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
||||||
|
行注释 //
|
||||||
|
|
||||||
### 命名
|
### 命名
|
||||||
|
|
||||||
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
||||||
例如:商品模块
|
例如:商品模块
|
||||||
product 商品
|
product 商品
|
||||||
├─ product 商品管理
|
├─ product 商品管理
|
||||||
├─productList 商品管理目录
|
├─productList 商品管理目录
|
||||||
├- index.vue 首页
|
├- index.vue 首页
|
||||||
|
|
||||||
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
||||||
|
|
||||||
类名函数命名 大驼峰式 例如:addUser
|
类名函数命名 大驼峰式 例如:addUser
|
||||||
变量命名 小驼峰式 例如:user 或者 userInfo _userinfo user-info
|
变量命名 小驼峰式 例如:user 或者 userInfo \_userinfo user-info
|
||||||
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
||||||
|
|
||||||
### 文件管理规范
|
### 文件管理规范
|
||||||
|
|
||||||
pages 页面模块必须件文件夹区分
|
pages 页面模块必须件文件夹区分
|
||||||
api 接口一个模块一个文件
|
api 接口一个模块一个文件
|
||||||
组建 一个组建一个文件夹
|
组建 一个组建一个文件夹
|
||||||
plugins 插件一个插件一个文件夹
|
plugins 插件一个插件一个文件夹
|
||||||
vuex 路由状态管理,一个模块在modules 中建一个文件夹
|
vuex 路由状态管理,一个模块在 modules 中建一个文件夹
|
||||||
router 一个模块一个模块在modules 中建一个文件夹
|
router 一个模块一个模块在 modules 中建一个文件夹
|
||||||
style 样式尽量采用iView自带组建,common.less 系统通用样式不要轻易动
|
style 样式尽量采用 iView 自带组建,common.less 系统通用样式不要轻易动
|
||||||
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀less 格式
|
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀 less 格式
|
||||||
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
|
组建样式 styles 中添加文件夹 composents 对应 components 目录新建样式文件
|
||||||
utils 自定义工具js 独立命名,一般不用新建文件夹
|
utils 自定义工具 js 独立命名,一般不用新建文件夹
|
||||||
|
|
||||||
## 模块命名
|
## 模块命名
|
||||||
~~~
|
|
||||||
|
```
|
||||||
├─ login 登录
|
├─ login 登录
|
||||||
├─ dashboard 首页
|
├─ dashboard 首页
|
||||||
├─ product 商品管理
|
├─ product 商品管理
|
||||||
├─ order 系统订单管理
|
├─ order 系统订单管理
|
||||||
├─ promoter 分销
|
├─ promoter 服务
|
||||||
├─ user 用户管理
|
├─ user 用户管理
|
||||||
├─ accounts 财务管理
|
├─ accounts 财务管理
|
||||||
├─ merchant 商户管理
|
├─ merchant 商户管理
|
||||||
|
@ -67,9 +71,11 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
├─ userFeedback 用户反馈
|
├─ userFeedback 用户反馈
|
||||||
├─ error-page 错误页
|
├─ error-page 错误页
|
||||||
|
|
||||||
~~~
|
```
|
||||||
|
|
||||||
## 开发打包项目
|
## 开发打包项目
|
||||||
~~~
|
|
||||||
|
````
|
||||||
# 进入项目目录
|
# 进入项目目录
|
||||||
$ cd admin-iView
|
$ cd admin-iView
|
||||||
|
|
||||||
|
@ -103,3 +109,4 @@ npm run lint
|
||||||
# code format check and auto fix
|
# code format check and auto fix
|
||||||
npm run lint -- --fix
|
npm run lint -- --fix
|
||||||
```
|
```
|
||||||
|
````
|
||||||
|
|
|
@ -1,51 +1,56 @@
|
||||||
# CRMEB多商户
|
# CRMEB 多商户
|
||||||
|
|
||||||
## 开发规范
|
## 开发规范
|
||||||
统一使用ES6 语法
|
|
||||||
|
统一使用 ES6 语法
|
||||||
方法注释
|
方法注释
|
||||||
/*
|
/\*
|
||||||
* th => 表头
|
|
||||||
* data => 数据
|
- th => 表头
|
||||||
* fileName => 文件名
|
- data => 数据
|
||||||
* fileType => 文件类型
|
- fileName => 文件名
|
||||||
* sheetName => sheet页名
|
- fileType => 文件类型
|
||||||
*/
|
- sheetName => sheet 页名
|
||||||
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
\*/
|
||||||
行注释 //
|
export default function toExcel ({ th, data, fileName, fileType, sheetName })
|
||||||
|
行注释 //
|
||||||
|
|
||||||
### 命名
|
### 命名
|
||||||
|
|
||||||
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
页面目录 文件夹命名格式骆驼式命名法,例如:用户列表 userList
|
||||||
例如:商品模块
|
例如:商品模块
|
||||||
product 商品
|
product 商品
|
||||||
├─ product 商品管理
|
├─ product 商品管理
|
||||||
├─productList 商品管理目录
|
├─productList 商品管理目录
|
||||||
├- index.vue 首页
|
├- index.vue 首页
|
||||||
|
|
||||||
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
页面命名、组建、文件夹 命名格式小驼峰命名法,例如:用户列表 userList
|
||||||
|
|
||||||
类名函数命名 大驼峰式 例如:addUser
|
类名函数命名 大驼峰式 例如:addUser
|
||||||
变量命名 小驼峰式 例如:user 或者 userInfo _userinfo user-info
|
变量命名 小驼峰式 例如:user 或者 userInfo \_userinfo user-info
|
||||||
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
常量 采用全大些下划线命名 例如:VUE_APP_API_URl
|
||||||
|
|
||||||
### 文件管理规范
|
### 文件管理规范
|
||||||
|
|
||||||
pages 页面模块必须件文件夹区分
|
pages 页面模块必须件文件夹区分
|
||||||
api 接口一个模块一个文件
|
api 接口一个模块一个文件
|
||||||
组建 一个组建一个文件夹
|
组建 一个组建一个文件夹
|
||||||
plugins 插件一个插件一个文件夹
|
plugins 插件一个插件一个文件夹
|
||||||
vuex 路由状态管理,一个模块在modules 中建一个文件夹
|
vuex 路由状态管理,一个模块在 modules 中建一个文件夹
|
||||||
router 一个模块一个模块在modules 中建一个文件夹
|
router 一个模块一个模块在 modules 中建一个文件夹
|
||||||
style 样式尽量采用iView自带组建,common.less 系统通用样式不要轻易动
|
style 样式尽量采用 iView 自带组建,common.less 系统通用样式不要轻易动
|
||||||
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀less 格式
|
自定义通用样式 style.less,每次添加必须加注释,页面独立样式在在页面内写,后缀 less 格式
|
||||||
组建样式 styles 中添加文件夹 composents 对应components 目录新建样式文件
|
组建样式 styles 中添加文件夹 composents 对应 components 目录新建样式文件
|
||||||
utils 自定义工具js 独立命名,一般不用新建文件夹
|
utils 自定义工具 js 独立命名,一般不用新建文件夹
|
||||||
|
|
||||||
## 模块命名
|
## 模块命名
|
||||||
~~~
|
|
||||||
|
```
|
||||||
├─ login 登录
|
├─ login 登录
|
||||||
├─ dashboard 首页
|
├─ dashboard 首页
|
||||||
├─ product 商品管理
|
├─ product 商品管理
|
||||||
├─ order 系统订单管理
|
├─ order 系统订单管理
|
||||||
├─ promoter 分销
|
├─ promoter 服务
|
||||||
├─ user 用户管理
|
├─ user 用户管理
|
||||||
├─ accounts 财务管理
|
├─ accounts 财务管理
|
||||||
├─ merchant 商户管理
|
├─ merchant 商户管理
|
||||||
|
@ -60,10 +65,13 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
├─ userFeedback 用户反馈
|
├─ userFeedback 用户反馈
|
||||||
├─ error-page 错误页
|
├─ error-page 错误页
|
||||||
|
|
||||||
~~~
|
```
|
||||||
|
|
||||||
## 目录结构
|
## 目录结构
|
||||||
|
|
||||||
主要目录结构及说明:
|
主要目录结构及说明:
|
||||||
~~~
|
|
||||||
|
```
|
||||||
|
|
||||||
├── public # 静态资源
|
├── public # 静态资源
|
||||||
│ ├── favicon.ico # favicon图标
|
│ ├── favicon.ico # favicon图标
|
||||||
|
@ -72,7 +80,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ ├── api # 所有接口api
|
│ ├── api # 所有接口api
|
||||||
│ │ └──request.js # 请求封装
|
│ │ └──request.js # 请求封装
|
||||||
│ │ └──accounts.js # 有关财务的接口
|
│ │ └──accounts.js # 有关财务的接口
|
||||||
│ │ └──promoter.js # 有关分销的接口
|
│ │ └──promoter.js # 有关服务的接口
|
||||||
│ │ └──app.js # 有关应用(小程序、公众号)的接口
|
│ │ └──app.js # 有关应用(小程序、公众号)的接口
|
||||||
│ │ └──cms.js # 有关内容(文章管理、分类)的接口
|
│ │ └──cms.js # 有关内容(文章管理、分类)的接口
|
||||||
│ │ └──home.js # 有关首页的接口
|
│ │ └──home.js # 有关首页的接口
|
||||||
|
@ -126,9 +134,9 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ │ └──productExamine # 商品审核
|
│ │ └──productExamine # 商品审核
|
||||||
│ │ └──productComment # 商品评论管理
|
│ │ └──productComment # 商品评论管理
|
||||||
│ │ └──order # 订单管理
|
│ │ └──order # 订单管理
|
||||||
│ │ └──promoter # 分销
|
│ │ └──promoter # 服务
|
||||||
│ │ └──user # 分销员列表
|
│ │ └──user # 服务员列表
|
||||||
│ │ └──config # 分销设置
|
│ │ └──config # 服务设置
|
||||||
│ │ └──cms # 内容
|
│ │ └──cms # 内容
|
||||||
│ │ └──addArticle # 添加文章/编辑文章
|
│ │ └──addArticle # 添加文章/编辑文章
|
||||||
│ │ └──article # 文章管理
|
│ │ └──article # 文章管理
|
||||||
|
@ -162,7 +170,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ │ └──picture # 素材管理
|
│ │ └──picture # 素材管理
|
||||||
│ │ └──groupData # 组合设置
|
│ │ └──groupData # 组合设置
|
||||||
│ │ └──list # 组合数据
|
│ │ └──list # 组合数据
|
||||||
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/分销特权/分销海报/充值金额配置
|
│ │ └──data # 组合数据列表/登录页幻灯片/首页幻灯片/首页导航按钮/首页推荐区/个人中心幻灯片/个人中心菜单/热门搜索/服务特权/服务海报/充值金额配置
|
||||||
│ │ └──setting # 设置-权限管理
|
│ │ └──setting # 设置-权限管理
|
||||||
│ │ └──systemRole # 身份管理
|
│ │ └──systemRole # 身份管理
|
||||||
│ │ └──systemAdmin # 管理员管理
|
│ │ └──systemAdmin # 管理员管理
|
||||||
|
@ -200,7 +208,7 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
│ │ └──merchant.js # 有关商户
|
│ │ └──merchant.js # 有关商户
|
||||||
│ │ └──order.js # 有关订单
|
│ │ └──order.js # 有关订单
|
||||||
│ │ └──product.js # 有关商品
|
│ │ └──product.js # 有关商品
|
||||||
│ │ └──promoter.js # 有关分销
|
│ │ └──promoter.js # 有关服务
|
||||||
│ │ └──routine.js # 有关小程序
|
│ │ └──routine.js # 有关小程序
|
||||||
│ │ └──safe.js # 有关维护
|
│ │ └──safe.js # 有关维护
|
||||||
│ │ └──setting.js # 有关权限
|
│ │ └──setting.js # 有关权限
|
||||||
|
@ -225,9 +233,11 @@ utils 自定义工具js 独立命名,一般不用新建文件夹
|
||||||
├── postcss.config.js # postcss 配置
|
├── postcss.config.js # postcss 配置
|
||||||
└── package.json # package.json
|
└── package.json # package.json
|
||||||
|
|
||||||
~~~
|
```
|
||||||
|
|
||||||
## 开发打包项目
|
## 开发打包项目
|
||||||
~~~
|
|
||||||
|
````
|
||||||
# 进入项目目录
|
# 进入项目目录
|
||||||
$ cd admin-iView
|
$ cd admin-iView
|
||||||
|
|
||||||
|
@ -261,3 +271,4 @@ npm run lint
|
||||||
# code format check and auto fix
|
# code format check and auto fix
|
||||||
npm run lint -- --fix
|
npm run lint -- --fix
|
||||||
```
|
```
|
||||||
|
````
|
||||||
|
|
|
@ -2,49 +2,49 @@
|
||||||
import request from './request'
|
import request from './request'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 分销设置 -- 详情
|
* @description 服务设置 -- 详情
|
||||||
*/
|
*/
|
||||||
export function configApi() {
|
export function configApi() {
|
||||||
return request.get('config/others/lst')
|
return request.get('config/others/lst')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 分销设置 -- 表单提交
|
* @description 服务设置 -- 表单提交
|
||||||
*/
|
*/
|
||||||
export function configUpdateApi(data) {
|
export function configUpdateApi(data) {
|
||||||
return request.post('config/others/update', data)
|
return request.post('config/others/update', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 分销设置 -- 表单提交
|
* @description 服务设置 -- 表单提交
|
||||||
*/
|
*/
|
||||||
export function productCheckApi() {
|
export function productCheckApi() {
|
||||||
return request.post('store/product/check')
|
return request.post('store/product/check')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 分销员 -- 列表
|
* @description 服务员 -- 列表
|
||||||
*/
|
*/
|
||||||
export function promoterListApi(data) {
|
export function promoterListApi(data) {
|
||||||
return request.get('user/promoter/lst', data)
|
return request.get('user/promoter/lst', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 推广人 -- 列表
|
* @description 邀请人 -- 列表
|
||||||
*/
|
*/
|
||||||
export function spreadListApi(uid, data) {
|
export function spreadListApi(uid, data) {
|
||||||
return request.get(`user/spread/lst/${uid}`, data)
|
return request.get(`user/spread/lst/${uid}`, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 推广人订单 -- 列表
|
* @description 邀请人订单 -- 列表
|
||||||
*/
|
*/
|
||||||
export function spreadOrderListApi(uid, data) {
|
export function spreadOrderListApi(uid, data) {
|
||||||
return request.get(`user/spread/order/${uid}`, data)
|
return request.get(`user/spread/order/${uid}`, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 推广人 -- 清除上级推广人
|
* @description 邀请人 -- 清除邀请人
|
||||||
*/
|
*/
|
||||||
export function spreadClearApi(uid) {
|
export function spreadClearApi(uid) {
|
||||||
return request.post(`user/spread/clear/${uid}`)
|
return request.post(`user/spread/clear/${uid}`)
|
||||||
|
@ -122,67 +122,67 @@ export function updateEextensionApi(type, data) {
|
||||||
return request.post(`agreement/${type}`, data)
|
return request.post(`agreement/${type}`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销等级 -- 获取分销等级规则
|
* @description 服务等级 -- 获取服务等级规则
|
||||||
*/
|
*/
|
||||||
export function getBrokerageApi(key) {
|
export function getBrokerageApi(key) {
|
||||||
return request.get(`agreement/${key}`)
|
return request.get(`agreement/${key}`)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销等级 -- 编辑分销等级规则
|
* @description 服务等级 -- 编辑服务等级规则
|
||||||
*/
|
*/
|
||||||
export function updateBrokerageApi(type, data) {
|
export function updateBrokerageApi(type, data) {
|
||||||
return request.post(`agreement/${type}`, data)
|
return request.post(`agreement/${type}`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销等级 -- 添加
|
* @description 服务等级 -- 添加
|
||||||
*/
|
*/
|
||||||
export function membershipDataAddApi(data) {
|
export function membershipDataAddApi(data) {
|
||||||
return request.post(`user/brokerage/create`, data)
|
return request.post(`user/brokerage/create`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销等级 -- 列表
|
* @description 服务等级 -- 列表
|
||||||
*/
|
*/
|
||||||
export function distributionLevelLst(data) {
|
export function distributionLevelLst(data) {
|
||||||
return request.get(`user/brokerage/lst`, data)
|
return request.get(`user/brokerage/lst`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销等级 -- 列表
|
* @description 服务等级 -- 列表
|
||||||
*/
|
*/
|
||||||
export function distributionDetail(id) {
|
export function distributionDetail(id) {
|
||||||
return request.get(`user/brokerage/detail/${id}`)
|
return request.get(`user/brokerage/detail/${id}`)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销等级 -- 编辑
|
* @description 服务等级 -- 编辑
|
||||||
*/
|
*/
|
||||||
export function distributionUpdate(id, data) {
|
export function distributionUpdate(id, data) {
|
||||||
return request.post(`user/brokerage/update/${id}`, data)
|
return request.post(`user/brokerage/update/${id}`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销等级 -- 删除
|
* @description 服务等级 -- 删除
|
||||||
*/
|
*/
|
||||||
export function distributionDelete(id) {
|
export function distributionDelete(id) {
|
||||||
return request.delete(`user/brokerage/delete/${id}`)
|
return request.delete(`user/brokerage/delete/${id}`)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销员列表 -- 获取分销等级
|
* @description 服务员列表 -- 获取服务等级
|
||||||
*/
|
*/
|
||||||
export function getDistributionLevel() {
|
export function getDistributionLevel() {
|
||||||
return request.get(`user/brokerage/options`)
|
return request.get(`user/brokerage/options`)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销员列表 -- 获取分销数据
|
* @description 服务员列表 -- 获取服务数据
|
||||||
*/
|
*/
|
||||||
export function distributionStatistics(data) {
|
export function distributionStatistics(data) {
|
||||||
return request.get(`user/promoter/count`, data)
|
return request.get(`user/promoter/count`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销员列表 -- 编辑分销员等级
|
* @description 服务员列表 -- 编辑服务员等级
|
||||||
*/
|
*/
|
||||||
export function distributionLevelUpdate(id) {
|
export function distributionLevelUpdate(id) {
|
||||||
return request.get(`user/spread/${id}/form`)
|
return request.get(`user/spread/${id}/form`)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 分销订单 -- 列表
|
* @description 服务订单 -- 列表
|
||||||
*/
|
*/
|
||||||
export function spreadOrderLst(data) {
|
export function spreadOrderLst(data) {
|
||||||
return request.get('spread/order/lst', data)
|
return request.get('spread/order/lst', data)
|
||||||
|
|
|
@ -148,7 +148,7 @@ export function batchChangeGroupApi(data) {
|
||||||
return request.get(`user/batch_change_group/form`, data)
|
return request.get(`user/batch_change_group/form`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 用户列表 -- 设置分销员
|
* @description 用户列表 -- 设置服务员
|
||||||
*/
|
*/
|
||||||
export function changePrommoterApi(data) {
|
export function changePrommoterApi(data) {
|
||||||
return request.get(`user/batch_spread_form`, data)
|
return request.get(`user/batch_spread_form`, data)
|
||||||
|
|
|
@ -92,8 +92,8 @@ export default {
|
||||||
// 图片列表
|
// 图片列表
|
||||||
swiperConfig: {
|
swiperConfig: {
|
||||||
title:
|
title:
|
||||||
"最多可添加10张图片,建议宽度750*345px;鼠标拖拽左侧圆点可调整图片 顺序",
|
"最多可添加20张图片,建议宽度750*345px;鼠标拖拽左侧圆点可调整图片 顺序",
|
||||||
maxList: 10,
|
maxList: 20,
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
img: "",
|
img: "",
|
||||||
|
|
|
@ -119,8 +119,8 @@ export default {
|
||||||
},
|
},
|
||||||
// 图片列表
|
// 图片列表
|
||||||
swiperConfig: {
|
swiperConfig: {
|
||||||
title: '最多可添加10张图片,建议宽度750*345px;鼠标拖拽左侧圆点可调整图片顺序',
|
title: '最多可添加20张图片,建议宽度750*345px;鼠标拖拽左侧圆点可调整图片顺序',
|
||||||
maxList: 10,
|
maxList: 20,
|
||||||
isSmall: true,
|
isSmall: true,
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,7 @@ const promoterRouter =
|
||||||
path: 'config',
|
path: 'config',
|
||||||
name: 'PromoterConfig',
|
name: 'PromoterConfig',
|
||||||
meta: {
|
meta: {
|
||||||
title: '分销配置',
|
title: '服务配置',
|
||||||
noCache: true
|
noCache: true
|
||||||
},
|
},
|
||||||
component: () => import('@/views/promoter/config/index')
|
component: () => import('@/views/promoter/config/index')
|
||||||
|
@ -43,7 +43,7 @@ const promoterRouter =
|
||||||
path: 'user',
|
path: 'user',
|
||||||
name: 'AccountsUser',
|
name: 'AccountsUser',
|
||||||
meta: {
|
meta: {
|
||||||
title: '分销员列表',
|
title: '服务员列表',
|
||||||
noCache: true
|
noCache: true
|
||||||
},
|
},
|
||||||
component: () => import('@/views/promoter/user/index')
|
component: () => import('@/views/promoter/user/index')
|
||||||
|
@ -52,7 +52,7 @@ const promoterRouter =
|
||||||
path: 'orderList',
|
path: 'orderList',
|
||||||
name: 'OrderList',
|
name: 'OrderList',
|
||||||
meta: {
|
meta: {
|
||||||
title: '分销订单',
|
title: '服务订单',
|
||||||
noCache: true
|
noCache: true
|
||||||
},
|
},
|
||||||
component: () => import('@/views/promoter/order/index')
|
component: () => import('@/views/promoter/order/index')
|
||||||
|
@ -79,7 +79,7 @@ const promoterRouter =
|
||||||
path: 'gift',
|
path: 'gift',
|
||||||
name: 'AccountsGift',
|
name: 'AccountsGift',
|
||||||
meta: {
|
meta: {
|
||||||
title: '分销礼包',
|
title: '服务礼包',
|
||||||
noCache: true
|
noCache: true
|
||||||
},
|
},
|
||||||
component: () => import('@/views/promoter/gift/index')
|
component: () => import('@/views/promoter/gift/index')
|
||||||
|
@ -88,7 +88,7 @@ const promoterRouter =
|
||||||
path: 'membership_level',
|
path: 'membership_level',
|
||||||
name: 'PromoterLevel',
|
name: 'PromoterLevel',
|
||||||
meta: {
|
meta: {
|
||||||
title: '分销等级',
|
title: '服务等级',
|
||||||
noCache: true
|
noCache: true
|
||||||
},
|
},
|
||||||
component: () => import('@/views/promoter/membershipLevel/index')
|
component: () => import('@/views/promoter/membershipLevel/index')
|
||||||
|
@ -97,7 +97,7 @@ const promoterRouter =
|
||||||
path: 'distribution',
|
path: 'distribution',
|
||||||
name: 'distributionRules',
|
name: 'distributionRules',
|
||||||
meta: {
|
meta: {
|
||||||
title: '分销等级规则',
|
title: '服务等级规则',
|
||||||
noCache: true
|
noCache: true
|
||||||
},
|
},
|
||||||
component: () => import('@/views/promoter/distributionRules/index')
|
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
|
@ -4,8 +4,7 @@
|
||||||
"font_family": "iconfont",
|
"font_family": "iconfont",
|
||||||
"css_prefix_text": "icon",
|
"css_prefix_text": "icon",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [{
|
||||||
{
|
|
||||||
"icon_id": "38535244",
|
"icon_id": "38535244",
|
||||||
"name": "待发货-积分",
|
"name": "待发货-积分",
|
||||||
"font_class": "daifahuo-jifen",
|
"font_class": "daifahuo-jifen",
|
||||||
|
@ -490,7 +489,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "37924885",
|
"icon_id": "37924885",
|
||||||
"name": "待核销-分销礼包",
|
"name": "待核销-服务礼包",
|
||||||
"font_class": "daihexiao-fenxiaolibao",
|
"font_class": "daihexiao-fenxiaolibao",
|
||||||
"unicode": "e72e",
|
"unicode": "e72e",
|
||||||
"unicode_decimal": 59182
|
"unicode_decimal": 59182
|
||||||
|
@ -553,7 +552,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "37107580",
|
"icon_id": "37107580",
|
||||||
"name": "分销管理",
|
"name": "服务管理",
|
||||||
"font_class": "fenxiaoguanli",
|
"font_class": "fenxiaoguanli",
|
||||||
"unicode": "e721",
|
"unicode": "e721",
|
||||||
"unicode_decimal": 59169
|
"unicode_decimal": 59169
|
||||||
|
@ -784,7 +783,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "34383556",
|
"icon_id": "34383556",
|
||||||
"name": "推广人数",
|
"name": "邀请人数",
|
||||||
"font_class": "tuiguangrenshu",
|
"font_class": "tuiguangrenshu",
|
||||||
"unicode": "e6c1",
|
"unicode": "e6c1",
|
||||||
"unicode_decimal": 59073
|
"unicode_decimal": 59073
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
"font_family": "iconfont",
|
"font_family": "iconfont",
|
||||||
"css_prefix_text": "icon",
|
"css_prefix_text": "icon",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [{
|
||||||
{
|
|
||||||
"icon_id": "38535244",
|
"icon_id": "38535244",
|
||||||
"name": "待发货-积分",
|
"name": "待发货-积分",
|
||||||
"font_class": "daifahuo-jifen",
|
"font_class": "daifahuo-jifen",
|
||||||
|
@ -490,7 +489,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "37924885",
|
"icon_id": "37924885",
|
||||||
"name": "待核销-分销礼包",
|
"name": "待核销-服务礼包",
|
||||||
"font_class": "daihexiao-fenxiaolibao",
|
"font_class": "daihexiao-fenxiaolibao",
|
||||||
"unicode": "e72e",
|
"unicode": "e72e",
|
||||||
"unicode_decimal": 59182
|
"unicode_decimal": 59182
|
||||||
|
@ -553,7 +552,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "37107580",
|
"icon_id": "37107580",
|
||||||
"name": "分销管理",
|
"name": "服务管理",
|
||||||
"font_class": "fenxiaoguanli",
|
"font_class": "fenxiaoguanli",
|
||||||
"unicode": "e721",
|
"unicode": "e721",
|
||||||
"unicode_decimal": 59169
|
"unicode_decimal": 59169
|
||||||
|
@ -784,7 +783,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "34383556",
|
"icon_id": "34383556",
|
||||||
"name": "推广人数",
|
"name": "邀请人数",
|
||||||
"font_class": "tuiguangrenshu",
|
"font_class": "tuiguangrenshu",
|
||||||
"unicode": "e6c1",
|
"unicode": "e6c1",
|
||||||
"unicode_decimal": 59073
|
"unicode_decimal": 59073
|
||||||
|
|
|
@ -374,13 +374,13 @@
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">分销订单</div>
|
<div class="name">服务订单</div>
|
||||||
<div class="code-name">&#xe7e9;</div>
|
<div class="code-name">&#xe7e9;</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">推广人排行</div>
|
<div class="name">邀请人排行</div>
|
||||||
<div class="code-name">&#xe7ea;</div>
|
<div class="code-name">&#xe7ea;</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -566,7 +566,7 @@
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">推广人排行</div>
|
<div class="name">邀请人排行</div>
|
||||||
<div class="code-name">&#xe7cf;</div>
|
<div class="code-name">&#xe7cf;</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -1226,7 +1226,7 @@
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">分销等级</div>
|
<div class="name">服务等级</div>
|
||||||
<div class="code-name">&#xe742;</div>
|
<div class="code-name">&#xe742;</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -1784,7 +1784,7 @@
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">我的推广</div>
|
<div class="name">我的邀请</div>
|
||||||
<div class="code-name">&#xe6d8;</div>
|
<div class="code-name">&#xe6d8;</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -2558,7 +2558,7 @@
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">推广</div>
|
<div class="name">邀请</div>
|
||||||
<div class="code-name">&#xe63b;</div>
|
<div class="code-name">&#xe63b;</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -4165,7 +4165,7 @@
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-fenxiaodingdan"></span>
|
<span class="icon iconfont icon-fenxiaodingdan"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
分销订单
|
服务订单
|
||||||
</div>
|
</div>
|
||||||
<div class="code-name">.icon-fenxiaodingdan
|
<div class="code-name">.icon-fenxiaodingdan
|
||||||
</div>
|
</div>
|
||||||
|
@ -4174,7 +4174,7 @@
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-tuiguangrenpaihang1"></span>
|
<span class="icon iconfont icon-tuiguangrenpaihang1"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
推广人排行
|
邀请人排行
|
||||||
</div>
|
</div>
|
||||||
<div class="code-name">.icon-tuiguangrenpaihang1
|
<div class="code-name">.icon-tuiguangrenpaihang1
|
||||||
</div>
|
</div>
|
||||||
|
@ -4453,7 +4453,7 @@
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-tuiguangrenpaihang"></span>
|
<span class="icon iconfont icon-tuiguangrenpaihang"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
推广人排行
|
邀请人排行
|
||||||
</div>
|
</div>
|
||||||
<div class="code-name">.icon-tuiguangrenpaihang
|
<div class="code-name">.icon-tuiguangrenpaihang
|
||||||
</div>
|
</div>
|
||||||
|
@ -5443,7 +5443,7 @@
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-fenxiaodengji"></span>
|
<span class="icon iconfont icon-fenxiaodengji"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
分销等级
|
服务等级
|
||||||
</div>
|
</div>
|
||||||
<div class="code-name">.icon-fenxiaodengji
|
<div class="code-name">.icon-fenxiaodengji
|
||||||
</div>
|
</div>
|
||||||
|
@ -6280,7 +6280,7 @@
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-wodetuiguang"></span>
|
<span class="icon iconfont icon-wodetuiguang"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
我的推广
|
我的邀请
|
||||||
</div>
|
</div>
|
||||||
<div class="code-name">.icon-wodetuiguang
|
<div class="code-name">.icon-wodetuiguang
|
||||||
</div>
|
</div>
|
||||||
|
@ -7441,7 +7441,7 @@
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-tuiguang"></span>
|
<span class="icon iconfont icon-tuiguang"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
推广
|
邀请
|
||||||
</div>
|
</div>
|
||||||
<div class="code-name">.icon-tuiguang
|
<div class="code-name">.icon-tuiguang
|
||||||
</div>
|
</div>
|
||||||
|
@ -9523,7 +9523,7 @@
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
<use xlink:href="#icon-fenxiaodingdan"></use>
|
<use xlink:href="#icon-fenxiaodingdan"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div class="name">分销订单</div>
|
<div class="name">服务订单</div>
|
||||||
<div class="code-name">#icon-fenxiaodingdan</div>
|
<div class="code-name">#icon-fenxiaodingdan</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -9531,7 +9531,7 @@
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
<use xlink:href="#icon-tuiguangrenpaihang1"></use>
|
<use xlink:href="#icon-tuiguangrenpaihang1"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div class="name">推广人排行</div>
|
<div class="name">邀请人排行</div>
|
||||||
<div class="code-name">#icon-tuiguangrenpaihang1</div>
|
<div class="code-name">#icon-tuiguangrenpaihang1</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -9779,7 +9779,7 @@
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
<use xlink:href="#icon-tuiguangrenpaihang"></use>
|
<use xlink:href="#icon-tuiguangrenpaihang"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div class="name">推广人排行</div>
|
<div class="name">邀请人排行</div>
|
||||||
<div class="code-name">#icon-tuiguangrenpaihang</div>
|
<div class="code-name">#icon-tuiguangrenpaihang</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -10659,7 +10659,7 @@
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
<use xlink:href="#icon-fenxiaodengji"></use>
|
<use xlink:href="#icon-fenxiaodengji"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div class="name">分销等级</div>
|
<div class="name">服务等级</div>
|
||||||
<div class="code-name">#icon-fenxiaodengji</div>
|
<div class="code-name">#icon-fenxiaodengji</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -11403,7 +11403,7 @@
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
<use xlink:href="#icon-wodetuiguang"></use>
|
<use xlink:href="#icon-wodetuiguang"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div class="name">我的推广</div>
|
<div class="name">我的邀请</div>
|
||||||
<div class="code-name">#icon-wodetuiguang</div>
|
<div class="code-name">#icon-wodetuiguang</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -12435,7 +12435,7 @@
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
<use xlink:href="#icon-tuiguang"></use>
|
<use xlink:href="#icon-tuiguang"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div class="name">推广</div>
|
<div class="name">邀请</div>
|
||||||
<div class="code-name">#icon-tuiguang</div>
|
<div class="code-name">#icon-tuiguang</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
|
@ -370,14 +370,14 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "28548808",
|
"icon_id": "28548808",
|
||||||
"name": "分销订单",
|
"name": "服务订单",
|
||||||
"font_class": "fenxiaodingdan",
|
"font_class": "fenxiaodingdan",
|
||||||
"unicode": "e7e9",
|
"unicode": "e7e9",
|
||||||
"unicode_decimal": 59369
|
"unicode_decimal": 59369
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "28548809",
|
"icon_id": "28548809",
|
||||||
"name": "推广人排行",
|
"name": "邀请人排行",
|
||||||
"font_class": "tuiguangrenpaihang1",
|
"font_class": "tuiguangrenpaihang1",
|
||||||
"unicode": "e7ea",
|
"unicode": "e7ea",
|
||||||
"unicode_decimal": 59370
|
"unicode_decimal": 59370
|
||||||
|
@ -594,7 +594,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "28009481",
|
"icon_id": "28009481",
|
||||||
"name": "推广人排行",
|
"name": "邀请人排行",
|
||||||
"font_class": "tuiguangrenpaihang",
|
"font_class": "tuiguangrenpaihang",
|
||||||
"unicode": "e7cf",
|
"unicode": "e7cf",
|
||||||
"unicode_decimal": 59343
|
"unicode_decimal": 59343
|
||||||
|
@ -1364,7 +1364,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "21903923",
|
"icon_id": "21903923",
|
||||||
"name": "分销等级",
|
"name": "服务等级",
|
||||||
"font_class": "fenxiaodengji",
|
"font_class": "fenxiaodengji",
|
||||||
"unicode": "e742",
|
"unicode": "e742",
|
||||||
"unicode_decimal": 59202
|
"unicode_decimal": 59202
|
||||||
|
@ -2015,7 +2015,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "17580220",
|
"icon_id": "17580220",
|
||||||
"name": "我的推广",
|
"name": "我的邀请",
|
||||||
"font_class": "wodetuiguang",
|
"font_class": "wodetuiguang",
|
||||||
"unicode": "e6d8",
|
"unicode": "e6d8",
|
||||||
"unicode_decimal": 59096
|
"unicode_decimal": 59096
|
||||||
|
@ -2918,7 +2918,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "539040",
|
"icon_id": "539040",
|
||||||
"name": "推广",
|
"name": "邀请",
|
||||||
"font_class": "tuiguang",
|
"font_class": "tuiguang",
|
||||||
"unicode": "e63b",
|
"unicode": "e63b",
|
||||||
"unicode_decimal": 58939
|
"unicode_decimal": 58939
|
||||||
|
|
|
@ -1,33 +1,55 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="box-card statistics">
|
<div class="box-card statistics">
|
||||||
<el-row :gutter="14" v-if="statisticsData" class="panel-group">
|
<el-row :gutter="14" v-if="statisticsData" class="panel-group">
|
||||||
<el-col :span="8" class="content">
|
<el-col :span="8" class="content">
|
||||||
<div class="card-panel">
|
<div class="card-panel">
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">
|
||||||
<span class="card-order">新增用户</span>
|
<span class="card-order">新增用户</span>
|
||||||
<span class="card-date">今日</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>
|
</div>
|
||||||
</el-col>
|
<count-to
|
||||||
<!-- <el-col :span="8" class="content">
|
: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">
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">
|
||||||
|
@ -53,53 +75,78 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="8" class="content" style="border:none">
|
<el-col :span="8" class="content" style="border: none">
|
||||||
<div class="card-panel">
|
<div class="card-panel">
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">
|
||||||
<span class="card-order">店铺数</span>
|
<span class="card-order">店铺数</span>
|
||||||
<span class="card-date">今日</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>
|
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
<count-to
|
||||||
<el-col :span="8" class="content">
|
:start-val="0"
|
||||||
<div class="card-panel">
|
:end-val="statisticsData.today.storeNum"
|
||||||
<div class="card-panel-description">
|
:duration="3000"
|
||||||
<div class="card-panel-text">
|
class="card-panel-num"
|
||||||
<span class="card-order">{{ statisticsData.prize.title }}</span>
|
/>
|
||||||
<!-- <span class="card-date">今日</span> -->
|
<div class="card-panel-compared">
|
||||||
</div>
|
周环比:
|
||||||
<div class="card-panel-box">
|
<i
|
||||||
<div class="card-panel-content" v-for="item in statisticsData.prize.list">
|
:class="
|
||||||
<count-to
|
Number(statisticsData.lastWeekRate.storeNum) >= 0
|
||||||
:start-val="0"
|
? 'up'
|
||||||
:end-val="item.c"
|
: 'down'
|
||||||
:duration="3000"
|
"
|
||||||
class="card-panel-num"
|
>
|
||||||
/>
|
{{
|
||||||
<span>{{ item.u }}</span>
|
statisticsData.lastWeekRate.storeNum
|
||||||
</div>
|
? (
|
||||||
</div>
|
(statisticsData.lastWeekRate.storeNum * 100 * 1000) /
|
||||||
</div>
|
1000
|
||||||
|
).toFixed(2)
|
||||||
|
: 0.0
|
||||||
|
}}%</i
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
:class="
|
||||||
|
Number(statisticsData.lastWeekRate.storeNum) >= 0
|
||||||
|
? 'el-icon-caret-top'
|
||||||
|
: 'el-icon-caret-bottom'
|
||||||
|
"
|
||||||
|
/>
|
||||||
</div>
|
</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>
|
||||||
<!-- <el-row :gutter="14" class="panel-group-count">
|
<!-- <el-row :gutter="14" class="panel-group-count">
|
||||||
<el-col :span="3" class="card-panel-item">
|
<el-col :span="3" class="card-panel-item">
|
||||||
|
@ -130,7 +177,7 @@
|
||||||
<router-link :to=" { path:`${roterPre}` + '/promoter/user' } ">
|
<router-link :to=" { path:`${roterPre}` + '/promoter/user' } ">
|
||||||
<div class="card-panel-count">
|
<div class="card-panel-count">
|
||||||
<span class="iconfont icon-fenxiaoguanli" style="color: #B27FEB;"></span>
|
<span class="iconfont icon-fenxiaoguanli" style="color: #B27FEB;"></span>
|
||||||
<span class="panel-text">分销管理</span>
|
<span class="panel-text">服务管理</span>
|
||||||
</div>
|
</div>
|
||||||
</router-link>
|
</router-link>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -167,62 +214,63 @@
|
||||||
</router-link>
|
</router-link>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row> -->
|
</el-row> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import CountTo from "vue-count-to";
|
import CountTo from "vue-count-to";
|
||||||
import { roterPre } from '@/settings'
|
import { roterPre } from "@/settings";
|
||||||
import { statisticsApi } from '@/api/home'
|
import { statisticsApi } from "@/api/home";
|
||||||
export default {
|
export default {
|
||||||
name: 'BaseInfo',
|
name: "BaseInfo",
|
||||||
components: {
|
components: {
|
||||||
CountTo
|
CountTo,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
statisticsData: {
|
statisticsData: {
|
||||||
prize:{
|
prize: {
|
||||||
list:[],
|
list: [],
|
||||||
title:''
|
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() {
|
getList() {
|
||||||
this.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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -233,13 +281,13 @@ export default {
|
||||||
|
|
||||||
.up,
|
.up,
|
||||||
.el-icon-caret-top {
|
.el-icon-caret-top {
|
||||||
color: #F5222D;
|
color: #f5222d;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
}
|
}
|
||||||
.down,
|
.down,
|
||||||
.el-icon-caret-bottom {
|
.el-icon-caret-bottom {
|
||||||
color: #39C15B;
|
color: #39c15b;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
@ -251,7 +299,7 @@ export default {
|
||||||
}
|
}
|
||||||
&-time {
|
&-time {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #8C8C8C;
|
color: #8c8c8c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.card-panel {
|
.card-panel {
|
||||||
|
@ -259,19 +307,19 @@ export default {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #8C8C8C;
|
color: #8c8c8c;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 182px;
|
min-height: 182px;
|
||||||
}
|
}
|
||||||
.card-panel-box{
|
.card-panel-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
.card-panel-content{
|
.card-panel-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
flex-basis: 33%;
|
flex-basis: 33%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -286,15 +334,15 @@ export default {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
display: flex;
|
display: flex;
|
||||||
.card-order{
|
.card-order {
|
||||||
color: #303133;
|
color: #303133;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
.card-date{
|
.card-date {
|
||||||
border: 1px solid #6394F9;
|
border: 1px solid #6394f9;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
color: #6394F9;
|
color: #6394f9;
|
||||||
background: #F4F7FF;
|
background: #f4f7ff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
width: 38px;
|
width: 38px;
|
||||||
|
@ -307,60 +355,60 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.card-panel-compared {
|
.card-panel-compared {
|
||||||
margin: 15px 0;
|
margin: 15px 0;
|
||||||
}
|
}
|
||||||
.card-panel-date{
|
.card-panel-date {
|
||||||
border-top: 1px solid #EEEEEE;
|
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;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
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;
|
margin-top: 18px;
|
||||||
.card-panel-item{
|
.card-panel-item {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.card-panel-count{
|
.card-panel-count {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
// width: 90%;
|
// width: 90%;
|
||||||
height: 104px;
|
height: 104px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
span{
|
span {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.iconfont{
|
.iconfont {
|
||||||
font-size: 27px;
|
font-size: 27px;
|
||||||
}
|
}
|
||||||
.panel-text{
|
.panel-text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
|
|
|
@ -635,7 +635,7 @@ export default {
|
||||||
prize: [], //奖品数组
|
prize: [], //奖品数组
|
||||||
lottery_num_term: 1, //抽奖次数限制:1:每天2:每人
|
lottery_num_term: 1, //抽奖次数限制:1:每天2:每人
|
||||||
lottery_num: 1, //抽奖次数
|
lottery_num: 1, //抽奖次数
|
||||||
spread_num: 1, //关注推广获取抽奖次数
|
spread_num: 1, //关注邀请获取抽奖次数
|
||||||
is_all_record: 0, //中奖纪录展示
|
is_all_record: 0, //中奖纪录展示
|
||||||
is_personal_record: 0, //个人中奖纪录展示
|
is_personal_record: 0, //个人中奖纪录展示
|
||||||
is_content: 0, //活动规格是否展示
|
is_content: 0, //活动规格是否展示
|
||||||
|
@ -750,7 +750,7 @@ export default {
|
||||||
prize: [], //奖品数组
|
prize: [], //奖品数组
|
||||||
lottery_num_term: 1, //抽奖次数限制:1:每天2:每人
|
lottery_num_term: 1, //抽奖次数限制:1:每天2:每人
|
||||||
lottery_num: 1, //抽奖次数
|
lottery_num: 1, //抽奖次数
|
||||||
spread_num: 1, //关注推广获取抽奖次数
|
spread_num: 1, //关注邀请获取抽奖次数
|
||||||
is_all_record: 0, //中奖纪录展示
|
is_all_record: 0, //中奖纪录展示
|
||||||
is_personal_record: 0, //个人中奖纪录展示
|
is_personal_record: 0, //个人中奖纪录展示
|
||||||
is_content: 0, //活动规格是否展示
|
is_content: 0, //活动规格是否展示
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="pay_price" label="实际支付" min-width="100" />
|
<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">
|
<template slot-scope="scope">
|
||||||
<span>{{Number(scope.row.extension_one)+Number(scope.row.extension_two)}}</span>
|
<span>{{Number(scope.row.extension_one)+Number(scope.row.extension_two)}}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="pay_price" label="实际支付" min-width="100" />
|
<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">
|
<template slot-scope="scope">
|
||||||
<span>{{Number(scope.row.extension_one)+Number(scope.row.extension_two)}}</span>
|
<span>{{Number(scope.row.extension_one)+Number(scope.row.extension_two)}}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -261,11 +261,11 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="item">
|
<li class="item">
|
||||||
<div>推广人:</div>
|
<div>邀请人:</div>
|
||||||
<div class="value">{{ orderDetailList.spread&&orderDetailList.spread.nickname || "无" }}</div>
|
<div class="value">{{ orderDetailList.spread&&orderDetailList.spread.nickname || "无" }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="item">
|
<li class="item">
|
||||||
<div>上级推广人:</div>
|
<div>邀请人:</div>
|
||||||
<div class="value">{{ orderDetailList.TopSpread&&orderDetailList.TopSpread.nickname || "无" }}</div>
|
<div class="value">{{ orderDetailList.TopSpread&&orderDetailList.TopSpread.nickname || "无" }}</div>
|
||||||
</li> -->
|
</li> -->
|
||||||
<li class="item">
|
<li class="item">
|
||||||
|
|
|
@ -33,19 +33,17 @@
|
||||||
class="labeltop"
|
class="labeltop"
|
||||||
>
|
>
|
||||||
<el-table :data="oneFormBatch" size="mini">
|
<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">
|
<template slot-scope="scope">
|
||||||
<div class="acea-row row-middle row-center-wrapper">
|
<div
|
||||||
<div
|
class="upLoadPicBox"
|
||||||
v-if="oneFormBatch[0].image"
|
title="750*750px"
|
||||||
class="pictrue pictrueTab"
|
@click="modalPicTap('1', 'pi')"
|
||||||
>
|
>
|
||||||
<img v-lazy="oneFormBatch[0].image" />
|
<div v-if="scope.row.image" class="pictrue tabPic">
|
||||||
|
<img :src="scope.row.image" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div v-else class="upLoad tabPic">
|
||||||
v-else
|
|
||||||
class="upLoad pictrueTab acea-row row-center-wrapper"
|
|
||||||
>
|
|
||||||
<i class="el-icon-camera cameraIconfont" />
|
<i class="el-icon-camera cameraIconfont" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -197,9 +195,13 @@
|
||||||
class="tabNumWidth"
|
class="tabNumWidth"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
>
|
||||||
<el-table-column align="center" label="图片" min-width="80">
|
<el-table-column align="center" label="图片" min-width="80">
|
||||||
<template slot-scope="scope">
|
<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">
|
<div v-if="scope.row.image" class="pictrue tabPic">
|
||||||
<img :src="scope.row.image" />
|
<img :src="scope.row.image" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -331,9 +333,16 @@
|
||||||
</template>
|
</template>
|
||||||
<el-table-column align="center" label="图片" min-width="80">
|
<el-table-column align="center" label="图片" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="upLoadPicBox" title="750*750px">
|
<div
|
||||||
<div v-if="scope.row.image" class="pictrue tabPic">
|
class="upLoadPicBox"
|
||||||
<img :src="scope.row.image" />
|
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>
|
||||||
<div v-else class="upLoad tabPic">
|
<div v-else class="upLoad tabPic">
|
||||||
<i class="el-icon-camera cameraIconfont" />
|
<i class="el-icon-camera cameraIconfont" />
|
||||||
|
@ -773,15 +782,15 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (tit === "1" && num === "dan") {
|
if (tit === "1" && num === "dan") {
|
||||||
// _this.OneattrValue[0].image = img[0];
|
_this.OneattrValue[0].image = img[0];
|
||||||
_this.OneattrValue[0].basis_image = img[0];
|
_this.OneattrValue[0].basis_image = img[0];
|
||||||
}
|
}
|
||||||
if (tit === "1" && num === "duo") {
|
if (tit === "1" && num === "duo") {
|
||||||
// _this.ManyAttrValue[i].image = img[0];
|
_this.ManyAttrValue[i].image = img[0];
|
||||||
_this.ManyAttrValue[i].basis_image = img[0];
|
_this.ManyAttrValue[i].basis_image = img[0];
|
||||||
}
|
}
|
||||||
if (tit === "1" && num === "pi") {
|
if (tit === "1" && num === "pi") {
|
||||||
// _this.oneFormBatch[0].image = img[0];
|
_this.oneFormBatch[0].image = img[0];
|
||||||
_this.oneFormBatch[0].basis_image = img[0];
|
_this.oneFormBatch[0].basis_image = img[0];
|
||||||
}
|
}
|
||||||
}, tit);
|
}, tit);
|
||||||
|
|
|
@ -673,6 +673,17 @@
|
||||||
<el-radio :label="1">是</el-radio>
|
<el-radio :label="1">是</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</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>
|
</div>
|
||||||
|
|
||||||
<el-form-item label="星级推荐:">
|
<el-form-item label="星级推荐:">
|
||||||
|
@ -969,6 +980,7 @@ export default {
|
||||||
],
|
],
|
||||||
formValidate: {
|
formValidate: {
|
||||||
is_hot: 0,
|
is_hot: 0,
|
||||||
|
is_huimei:0,
|
||||||
is_customize: 0,
|
is_customize: 0,
|
||||||
is_best: 0,
|
is_best: 0,
|
||||||
is_new: 0,
|
is_new: 0,
|
||||||
|
@ -1336,6 +1348,7 @@ export default {
|
||||||
image: info.image,
|
image: info.image,
|
||||||
audit_type: info.audit_type,
|
audit_type: info.audit_type,
|
||||||
is_customize: info.is_customize || 0,
|
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_benefit === 1) this.checkboxGroup.push("is_benefit");
|
||||||
if (info.is_hot === 1) this.checkboxGroup.push("is_hot");
|
if (info.is_hot === 1) this.checkboxGroup.push("is_hot");
|
||||||
|
|
|
@ -461,7 +461,7 @@
|
||||||
<div v-else class="value-item">无</div>
|
<div v-else class="value-item">无</div>
|
||||||
</li>
|
</li>
|
||||||
<!-- <li class="item">
|
<!-- <li class="item">
|
||||||
<div class="item-title">分销礼包:</div>
|
<div class="item-title">服务礼包:</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
{{ productData.is_gift_bag ? "是" : "否" }}
|
{{ productData.is_gift_bag ? "是" : "否" }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,11 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="divBox">
|
<div class="divBox">
|
||||||
<el-card class="box-card">
|
<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">
|
<el-form-item prop="extension_status">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<span>分销启用:</span>
|
<span>服务启用:</span>
|
||||||
<el-tooltip class="item" effect="dark" content="商城分销功能开启关闭" placement="top-start">
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
content="商城服务功能开启关闭"
|
||||||
|
placement="top-start"
|
||||||
|
>
|
||||||
<i class="el-icon-warning-outline" />
|
<i class="el-icon-warning-outline" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</span>
|
||||||
|
@ -17,56 +28,89 @@
|
||||||
<el-form-item prop="extension_one_rate">
|
<el-form-item prop="extension_one_rate">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<span>一级返佣比例:</span>
|
<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" />
|
<i class="el-icon-warning-outline" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</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>
|
<span>%</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="extension_two_rate">
|
<el-form-item prop="extension_two_rate">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<span>二级返佣比例:</span>
|
<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" />
|
<i class="el-icon-warning-outline" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</span>
|
</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>
|
<span>%</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="extension_self" required>
|
<el-form-item prop="extension_self" required>
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<span>分销内购:</span>
|
<span>服务内购:</span>
|
||||||
</span>
|
</span>
|
||||||
<el-radio-group v-model="promoterForm.extension_self">
|
<el-radio-group v-model="promoterForm.extension_self">
|
||||||
<el-radio :label="1">开启</el-radio>
|
<el-radio :label="1">开启</el-radio>
|
||||||
<el-radio :label="0" class="radio">关闭</el-radio>
|
<el-radio :label="0" class="radio">关闭</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<div class="item-text">
|
<div class="item-text">
|
||||||
<span class="title">开启:</span>开启分销内购,分销员自己购买商品,享受一级返佣,上级享受二级返佣;
|
<span class="title">开启:</span
|
||||||
<span class="title">关闭:</span>分销员自己购买商品没有返佣
|
>开启服务内购,服务员自己购买商品,享受一级返佣,上级享受二级返佣;
|
||||||
</div>
|
<span class="title">关闭:</span>服务员自己购买商品没有返佣
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="extension_limit" required>
|
<el-form-item prop="extension_limit" required>
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<span>分销限时开关:</span>
|
<span>服务限时开关:</span>
|
||||||
</span>
|
</span>
|
||||||
<el-radio-group v-model="promoterForm.extension_limit">
|
<el-radio-group v-model="promoterForm.extension_limit">
|
||||||
<el-radio :label="1">开启</el-radio>
|
<el-radio :label="1">开启</el-radio>
|
||||||
<el-radio :label="0" class="radio">关闭</el-radio>
|
<el-radio :label="0" class="radio">关闭</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<div class="item-text">
|
<div class="item-text">
|
||||||
<span class="title">开启:</span>根据设置的分销绑定时段返佣;
|
<span class="title">开启:</span>根据设置的服务绑定时段返佣;
|
||||||
<span class="title">关闭:</span>默认永久绑定<span class="font-red">(此处不建议频繁修改,请谨慎操作)</span>
|
<span class="title">关闭:</span>默认永久绑定<span class="font-red"
|
||||||
|
>(此处不建议频繁修改,请谨慎操作)</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<span>分销绑定时间设置:</span>
|
<span>服务绑定时间设置:</span>
|
||||||
</span>
|
</span>
|
||||||
<el-input-number v-model="promoterForm.extension_limit_day" :step="1" :min="0"></el-input-number> 天
|
<el-input-number
|
||||||
<div class="item-text">
|
v-model="promoterForm.extension_limit_day"
|
||||||
指自绑定关系成功至自动解绑之间的天数,自动解绑后返佣按新绑定关系结算。<span class="font-red">(此处不建议频繁修改,请谨慎操作)</span>
|
:step="1"
|
||||||
|
:min="0"
|
||||||
|
></el-input-number>
|
||||||
|
天
|
||||||
|
<div class="item-text">
|
||||||
|
指自绑定关系成功至自动解绑之间的天数,自动解绑后返佣按新绑定关系结算。<span
|
||||||
|
class="font-red"
|
||||||
|
>(此处不建议频繁修改,请谨慎操作)</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -79,7 +123,12 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -87,10 +136,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { configApi, configUpdateApi, productCheckApi } from "@/api/promoter";
|
||||||
import { configApi, configUpdateApi, productCheckApi } from '@/api/promoter'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: "Index",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
promoterForm: {
|
promoterForm: {
|
||||||
|
@ -102,78 +150,97 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
rules: {
|
rules: {
|
||||||
extension_status: [
|
extension_status: [
|
||||||
{ required: true, message: '请选择是否启用分销', trigger: 'change' }
|
{ required: true, message: "请选择是否启用服务", trigger: "change" },
|
||||||
],
|
],
|
||||||
extension_one_rate: [
|
extension_one_rate: [
|
||||||
{ required: true, message: '请输入一级返佣比例', trigger: 'blur' }
|
{ required: true, message: "请输入一级返佣比例", trigger: "blur" },
|
||||||
],
|
],
|
||||||
extension_two_rate: [
|
extension_two_rate: [
|
||||||
{ required: true, message: '请输入二级返佣比例', trigger: 'blur' }
|
{ required: true, message: "请输入二级返佣比例", trigger: "blur" },
|
||||||
],
|
],
|
||||||
extension_self: [
|
extension_self: [
|
||||||
{ required: true, message: '请选择是否开启分销内购', trigger: 'blur' }
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择是否开启服务内购",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
extension_limit: [
|
extension_limit: [
|
||||||
{ required: true, message: '请选择是否开启分销限时', trigger: 'blur' }
|
{
|
||||||
]
|
required: true,
|
||||||
}
|
message: "请选择是否开启服务限时",
|
||||||
}
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDetal()
|
this.getDetal();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDetal() {
|
getDetal() {
|
||||||
configApi().then(res => {
|
configApi()
|
||||||
this.promoterForm = res.data
|
.then((res) => {
|
||||||
this.promoterForm.extension_status = Number(res.data.extension_status)
|
this.promoterForm = res.data;
|
||||||
this.promoterForm.extension_self = res.data.extension_self ? 1 : 0
|
this.promoterForm.extension_status = Number(
|
||||||
this.promoterForm.extension_limit = res.data.extension_limit ? 1 : 0;
|
res.data.extension_status
|
||||||
this.promoterForm.extension_limit_day = res.data.extension_limit_day ? res.data.extension_limit_day : 30;
|
);
|
||||||
|
this.promoterForm.extension_self = res.data.extension_self ? 1 : 0;
|
||||||
}).catch((res) => {
|
this.promoterForm.extension_limit = res.data.extension_limit ? 1 : 0;
|
||||||
this.$message.error(res.message)
|
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) {
|
submitForm(formName) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
configUpdateApi(this.promoterForm).then(res => {
|
configUpdateApi(this.promoterForm)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
this.$modalSure('提交成功,是否自动下架商户低于此佣金比例的商品').then(() => {
|
this.loading = false;
|
||||||
productCheckApi().then(({ message }) => {
|
this.$modalSure(
|
||||||
this.$message.success(message)
|
"提交成功,是否自动下架商户低于此佣金比例的商品"
|
||||||
}).catch(({ message }) => {
|
).then(() => {
|
||||||
this.$message.error(message)
|
productCheckApi()
|
||||||
})
|
.then(({ message }) => {
|
||||||
|
this.$message.success(message);
|
||||||
|
})
|
||||||
|
.catch(({ message }) => {
|
||||||
|
this.$message.error(message);
|
||||||
|
});
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}).catch((res) => {
|
.catch((res) => {
|
||||||
this.$message.error(res.message)
|
this.$message.error(res.message);
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.selWidth{
|
.selWidth {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
.item-text{
|
.item-text {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-left: 30px;
|
margin-left: 30px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
.title{
|
.title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
|
||||||
}
|
|
||||||
.font-red{
|
|
||||||
color: #ff4949;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.font-red {
|
||||||
|
color: #ff4949;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,16 +1,39 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="divBox">
|
<div class="divBox">
|
||||||
<el-card class="box-card">
|
<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-col :span="24">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<h3 class="title">分销等级规则</h3>
|
<h3 class="title">服务等级规则</h3>
|
||||||
<ueditor-from v-model="formValidate.agree" :content="formValidate.agree" style="width: 100%"/>
|
<ueditor-from
|
||||||
|
v-model="formValidate.agree"
|
||||||
|
:content="formValidate.agree"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-form-item style="margin-top:30px;">
|
<el-form-item style="margin-top: 30px">
|
||||||
<el-button type="primary" class="submission" size="small" @click="previewProtol">预览</el-button>
|
<el-button
|
||||||
<el-button type="primary" class="submission" size="small" @click="handleSubmit('formValidate')">提交</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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -35,79 +58,78 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 {
|
export default {
|
||||||
name: 'Eextension',
|
name: "Eextension",
|
||||||
components: { ueditorFrom },
|
components: { ueditorFrom },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
modals: false,
|
modals: false,
|
||||||
props: {
|
props: {
|
||||||
emitPath: false
|
emitPath: false,
|
||||||
},
|
},
|
||||||
formValidate: {
|
formValidate: {
|
||||||
agree: '',
|
agree: "",
|
||||||
},
|
},
|
||||||
content: '',
|
content: "",
|
||||||
fullscreenLoading: false,
|
fullscreenLoading: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getInfo();
|
this.getInfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInfo() {
|
getInfo() {
|
||||||
this.fullscreenLoading = true
|
this.fullscreenLoading = true;
|
||||||
getBrokerageApi('sys_brokerage').then(res => {
|
getBrokerageApi("sys_brokerage")
|
||||||
const info = res.data
|
.then((res) => {
|
||||||
this.formValidate = {
|
const info = res.data;
|
||||||
agree: info.sys_brokerage,
|
this.formValidate = {
|
||||||
}
|
agree: info.sys_brokerage,
|
||||||
this.fullscreenLoading = false
|
};
|
||||||
}).catch(res => {
|
this.fullscreenLoading = false;
|
||||||
this.$message.error(res.message)
|
})
|
||||||
this.fullscreenLoading = false
|
.catch((res) => {
|
||||||
})
|
this.$message.error(res.message);
|
||||||
|
this.fullscreenLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
handleSubmit(name) {
|
handleSubmit(name) {
|
||||||
if(this.formValidate.agree === '' || !this.formValidate.agree){
|
if (this.formValidate.agree === "" || !this.formValidate.agree) {
|
||||||
this.$message.warning("请输入协议信息!");
|
this.$message.warning("请输入协议信息!");
|
||||||
return
|
return;
|
||||||
}else{
|
} else {
|
||||||
updateBrokerageApi('sys_brokerage', this.formValidate).then(async res => {
|
updateBrokerageApi("sys_brokerage", this.formValidate)
|
||||||
this.fullscreenLoading = false
|
.then(async (res) => {
|
||||||
this.$message.success(res.message)
|
this.fullscreenLoading = false;
|
||||||
}).catch(res => {
|
this.$message.success(res.message);
|
||||||
this.fullscreenLoading = false
|
})
|
||||||
this.$message.error(res.message)
|
.catch((res) => {
|
||||||
})
|
this.fullscreenLoading = false;
|
||||||
|
this.$message.error(res.message);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
previewProtol(){
|
previewProtol() {
|
||||||
this.modals = true;
|
this.modals = true;
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.dialog-scustom,.addDia{
|
.dialog-scustom,
|
||||||
|
.addDia {
|
||||||
min-width: 400px;
|
min-width: 400px;
|
||||||
height: 900px;
|
height: 900px;
|
||||||
.el-dialog{
|
.el-dialog {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
h3{
|
h3 {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -115,31 +137,31 @@ export default {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.title{
|
.title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
.agreement{
|
.agreement {
|
||||||
width: 350px;
|
width: 350px;
|
||||||
margin: 0 auto;
|
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;
|
padding: 26px;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
.content{
|
.content {
|
||||||
height: 600px;
|
height: 600px;
|
||||||
overflow-y:scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
p{
|
p {
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.agreement .content ::v-deep p{
|
.agreement .content ::v-deep p {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
.agreement ::v-deep img{
|
.agreement ::v-deep img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
/*css主要部分的样式*/
|
/*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);*/
|
/*-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);*/
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,31 +1,73 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="divBox">
|
<div class="divBox">
|
||||||
<div class="selCard">
|
<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-form-item label="订单状态:" class="width100" prop="status">
|
||||||
<el-radio-group v-model="tableFrom.status" type="button" @change="getList(1)">
|
<el-radio-group
|
||||||
<el-radio-button label="">全部 {{ '(' +orderChartType.all?orderChartType.all:0 + ')' }}</el-radio-button>
|
v-model="tableFrom.status"
|
||||||
<el-radio-button
|
type="button"
|
||||||
label="1"
|
@change="getList(1)"
|
||||||
>待付款 {{ '(' +orderChartType.unpaid?orderChartType.unpaid:0+ ')' }}</el-radio-button>
|
>
|
||||||
<el-radio-button
|
<el-radio-button label=""
|
||||||
label="2"
|
>全部
|
||||||
>待发货 {{ '(' +orderChartType.unshipped?orderChartType.unshipped:0+ ')' }}</el-radio-button>
|
{{
|
||||||
<el-radio-button
|
"(" + orderChartType.all ? orderChartType.all : 0 + ")"
|
||||||
label="3"
|
}}</el-radio-button
|
||||||
>待收货 {{ '(' +orderChartType.untake?orderChartType.untake:0+ ')' }}</el-radio-button>
|
>
|
||||||
<el-radio-button
|
<el-radio-button label="1"
|
||||||
label="4"
|
>待付款
|
||||||
>待评价 {{ '(' +orderChartType.unevaluate?orderChartType.unevaluate:0+ ')' }}</el-radio-button>
|
{{
|
||||||
<el-radio-button
|
"(" + orderChartType.unpaid ? orderChartType.unpaid : 0 + ")"
|
||||||
label="5"
|
}}</el-radio-button
|
||||||
>交易完成 {{ '(' +orderChartType.complete?orderChartType.complete:0+ ')' }}</el-radio-button>
|
>
|
||||||
<el-radio-button
|
<el-radio-button label="2"
|
||||||
label="6"
|
>待发货
|
||||||
>已退款 {{ '(' +orderChartType.refund?orderChartType.refund:0+ ')' }}</el-radio-button>
|
{{
|
||||||
<el-radio-button
|
"(" + orderChartType.unshipped
|
||||||
label="7"
|
? orderChartType.unshipped
|
||||||
>已删除 {{ '(' +orderChartType.del?orderChartType.del:0+ ')' }}</el-radio-button>
|
: 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-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="时间选择:">
|
<el-form-item label="时间选择:">
|
||||||
|
@ -37,7 +79,7 @@
|
||||||
type="daterange"
|
type="daterange"
|
||||||
placement="bottom-end"
|
placement="bottom-end"
|
||||||
placeholder="自定义时间"
|
placeholder="自定义时间"
|
||||||
style="width: 280px;"
|
style="width: 280px"
|
||||||
:picker-options="pickerOptions"
|
:picker-options="pickerOptions"
|
||||||
@change="onchangeTime"
|
@change="onchangeTime"
|
||||||
/>
|
/>
|
||||||
|
@ -97,38 +139,38 @@
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发货方式:" prop="filter_delivery">
|
<el-form-item label="发货方式:" prop="filter_delivery">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableFrom.filter_delivery"
|
v-model="tableFrom.filter_delivery"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
class="selWidth"
|
class="selWidth"
|
||||||
clearable
|
clearable
|
||||||
@change="getList(1)"
|
@change="getList(1)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dliveryWayList"
|
v-for="item in dliveryWayList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品类型:" prop="filter_product">
|
<el-form-item label="商品类型:" prop="filter_product">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableFrom.filter_product"
|
v-model="tableFrom.filter_product"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
class="selWidth"
|
class="selWidth"
|
||||||
clearable
|
clearable
|
||||||
@change="getList(1)"
|
@change="getList(1)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in productTypeList"
|
v-for="item in productTypeList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关键字:" prop="keywords">
|
<el-form-item label="关键字:" prop="keywords">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableFrom.keywords"
|
v-model="tableFrom.keywords"
|
||||||
|
@ -138,20 +180,20 @@
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="推广人:" prop="spread_name">
|
<el-form-item label="邀请人:" prop="spread_name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableFrom.spread_name"
|
v-model="tableFrom.spread_name"
|
||||||
@keyup.enter.native="getList(1)"
|
@keyup.enter.native="getList(1)"
|
||||||
placeholder="请输入推广人信息"
|
placeholder="请输入邀请人信息"
|
||||||
class="selWidth"
|
class="selWidth"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上级推广:" prop="top_spread_name">
|
<el-form-item label="上级邀请:" prop="top_spread_name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableFrom.top_spread_name"
|
v-model="tableFrom.top_spread_name"
|
||||||
@keyup.enter.native="getList(1)"
|
@keyup.enter.native="getList(1)"
|
||||||
placeholder="请输入上级推广人信息"
|
placeholder="请输入邀请人信息"
|
||||||
class="selWidth"
|
class="selWidth"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
@ -166,7 +208,9 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
|
<el-button type="primary" size="small" @click="getList(1)"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
<el-button size="small" @click="searchReset()">重置</el-button>
|
<el-button size="small" @click="searchReset()">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -197,31 +241,58 @@
|
||||||
<span>{{ props.row.remark | filterEmpty }}</span>
|
<span>{{ props.row.remark | filterEmpty }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="总单号:">
|
<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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="订单编号" min-width="150">
|
<el-table-column label="订单编号" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="display: block;" v-text="scope.row.order_sn" />
|
<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
|
||||||
|
v-show="scope.row.is_del > 0"
|
||||||
|
style="color: #ed4014; display: block"
|
||||||
|
>用户已删除</span
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="用户信息" min-width="130">
|
<el-table-column label="用户信息" min-width="130">
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="订单类型" min-width="80">
|
<el-table-column label="订单类型" min-width="80">
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column label="商户名称" min-width="100">
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品信息" min-width="350">
|
<el-table-column label="商品信息" min-width="350">
|
||||||
|
@ -237,15 +308,22 @@
|
||||||
:preview-src-list="[val.cart_info.product.image]"
|
:preview-src-list="[val.cart_info.product.image]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span class="tabBox_tit"
|
||||||
class="tabBox_tit"
|
>{{ val.cart_info.product.store_name + " | "
|
||||||
>{{ val.cart_info.product.store_name + ' | ' }}{{ val.cart_info.productAttr.sku }}</span>
|
}}{{ val.cart_info.productAttr.sku }}</span
|
||||||
|
>
|
||||||
<span class="tabBox_pice">
|
<span class="tabBox_pice">
|
||||||
{{ '¥'+ val.cart_info.productAttr.price + ' x '+ val.product_num }}
|
{{
|
||||||
|
"¥" +
|
||||||
|
val.cart_info.productAttr.price +
|
||||||
|
" x " +
|
||||||
|
val.product_num
|
||||||
|
}}
|
||||||
<em
|
<em
|
||||||
v-if="val.refund_num < val.product_num && val.refund_num > 0"
|
v-if="val.refund_num < val.product_num && val.refund_num > 0"
|
||||||
style="color: red;font-style: normal;"
|
style="color: red; font-style: normal"
|
||||||
>(-{{ val.product_num - val.refund_num }})</em>
|
>(-{{ val.product_num - val.refund_num }})</em
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -253,18 +331,41 @@
|
||||||
<el-table-column label="实际支付" min-width="90">
|
<el-table-column label="实际支付" min-width="90">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.pay_price }}</span>
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="订单佣金" min-width="100">
|
<el-table-column label="订单佣金" min-width="100">
|
||||||
<template slot-scope="scope">
|
<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>
|
<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>
|
(
|
||||||
|
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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="支付类型" min-width="80">
|
<el-table-column label="支付类型" min-width="80">
|
||||||
<template slot-scope="scope">
|
<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>
|
<span v-else>--</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -278,8 +379,15 @@
|
||||||
<span v-if="scope.row.is_del === 0">
|
<span v-if="scope.row.is_del === 0">
|
||||||
<span v-if="scope.row.paid === 0">待付款</span>
|
<span v-if="scope.row.paid === 0">待付款</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<span v-if="scope.row.order_type === 0 || scope.row.order_type === 2">{{ scope.row.status | orderStatusFilter }}</span>
|
<span
|
||||||
<span v-else>{{ scope.row.status | takeOrderStatusFilter }}</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>
|
</span>
|
||||||
<span v-else>已删除</span>
|
<span v-else>已删除</span>
|
||||||
|
@ -290,19 +398,28 @@
|
||||||
<span>{{ scope.row.create_time }}</span>
|
<span>{{ scope.row.create_time }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="推广人" min-width="100">
|
<el-table-column label="邀请人" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.spread && scope.row.spread.nickname || '无' }}</span>
|
<span>{{
|
||||||
|
(scope.row.spread && scope.row.spread.nickname) || "无"
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上级推广人" min-width="100">
|
<el-table-column label="邀请人" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.TopSpread && scope.row.TopSpread.nickname || '无' }}</span>
|
<span>{{
|
||||||
|
(scope.row.TopSpread && scope.row.TopSpread.nickname) || "无"
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" min-width="80" fixed="right">
|
<el-table-column label="操作" min-width="80" fixed="right">
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -319,7 +436,14 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</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
|
<order-detail
|
||||||
ref="orderDetail"
|
ref="orderDetail"
|
||||||
|
@ -332,14 +456,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { spreadOrderLst, spreadChartApi, exportOrderApi } from "@/api/promoter";
|
import { spreadOrderLst, spreadChartApi, exportOrderApi } from "@/api/promoter";
|
||||||
import { merSelectApi } from "@/api/product";
|
import { merSelectApi } from "@/api/product";
|
||||||
import userDetails from '../../user/list/userDetails';
|
import userDetails from "../../user/list/userDetails";
|
||||||
import orderDetail from './orderDetails.vue';
|
import orderDetail from "./orderDetails.vue";
|
||||||
import createWorkBook from '@/utils/newToExcel.js';
|
import createWorkBook from "@/utils/newToExcel.js";
|
||||||
import { fromList } from "@/libs/constants.js";
|
import { fromList } from "@/libs/constants.js";
|
||||||
import timeOptions from '@/utils/timeOptions';
|
import timeOptions from "@/utils/timeOptions";
|
||||||
export default {
|
export default {
|
||||||
components: { orderDetail, userDetails },
|
components: { orderDetail, userDetails },
|
||||||
data() {
|
data() {
|
||||||
|
@ -351,16 +474,16 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
},
|
},
|
||||||
activity: [
|
activity: [
|
||||||
{name: "普通订单",type: 0},
|
{ name: "普通订单", type: 0 },
|
||||||
{name: "秒杀订单",type: 1},
|
{ name: "秒杀订单", type: 1 },
|
||||||
{name: "预售订单",type: 2},
|
{ name: "预售订单", type: 2 },
|
||||||
{name: "助力订单",type: 3},
|
{ name: "助力订单", type: 3 },
|
||||||
{name: "拼团订单",type: 4}
|
{ name: "拼团订单", type: 4 },
|
||||||
],
|
],
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
tableFrom: {
|
tableFrom: {
|
||||||
order_sn: this.$route.query.order_sn ? this.$route.query.order_sn : "",
|
order_sn: this.$route.query.order_sn ? this.$route.query.order_sn : "",
|
||||||
group_order_sn: '',
|
group_order_sn: "",
|
||||||
keywords: "",
|
keywords: "",
|
||||||
username: "",
|
username: "",
|
||||||
store_name: "",
|
store_name: "",
|
||||||
|
@ -369,23 +492,23 @@ export default {
|
||||||
mer_id: "",
|
mer_id: "",
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
is_trader: '',
|
is_trader: "",
|
||||||
pay_type: "",
|
pay_type: "",
|
||||||
filter_delivery: '',
|
filter_delivery: "",
|
||||||
filter_product : '',
|
filter_product: "",
|
||||||
activity_type: ''
|
activity_type: "",
|
||||||
},
|
},
|
||||||
dliveryWayList: [
|
dliveryWayList: [
|
||||||
{ value: 1, label: '快递订单' },
|
{ value: 1, label: "快递订单" },
|
||||||
{ value: 2, label: '配送订单' },
|
{ value: 2, label: "配送订单" },
|
||||||
{ value: 4, label: '核销订单' },
|
{ value: 4, label: "核销订单" },
|
||||||
{ value: 3, label: '虚拟发货' },
|
{ value: 3, label: "虚拟发货" },
|
||||||
{ value: 6, label: '自动发货' }
|
{ value: 6, label: "自动发货" },
|
||||||
], //发货方式
|
], //发货方式
|
||||||
productTypeList: [
|
productTypeList: [
|
||||||
{ value: 1, label: '实物商品' },
|
{ value: 1, label: "实物商品" },
|
||||||
{ value: 2, label: '虚拟商品' },
|
{ value: 2, label: "虚拟商品" },
|
||||||
{ value: 3, label: '卡密商品' }
|
{ value: 3, label: "卡密商品" },
|
||||||
], //商品类型
|
], //商品类型
|
||||||
orderChartType: {},
|
orderChartType: {},
|
||||||
timeVal: [],
|
timeVal: [],
|
||||||
|
@ -420,7 +543,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.headerList();
|
this.headerList();
|
||||||
this.getMerSelect();
|
this.getMerSelect();
|
||||||
this.getList('');
|
this.getList("");
|
||||||
},
|
},
|
||||||
// 被缓存接收参数
|
// 被缓存接收参数
|
||||||
activated() {
|
activated() {
|
||||||
|
@ -431,15 +554,15 @@ export default {
|
||||||
}
|
}
|
||||||
this.headerList();
|
this.headerList();
|
||||||
this.getMerSelect();
|
this.getMerSelect();
|
||||||
this.getList('');
|
this.getList("");
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**重置 */
|
/**重置 */
|
||||||
searchReset(){
|
searchReset() {
|
||||||
this.timeVal = []
|
this.timeVal = [];
|
||||||
this.tableFrom.date = ""
|
this.tableFrom.date = "";
|
||||||
this.$refs.searchForm.resetFields()
|
this.$refs.searchForm.resetFields();
|
||||||
this.getList(1)
|
this.getList(1);
|
||||||
},
|
},
|
||||||
// 订单筛选
|
// 订单筛选
|
||||||
orderFilter(item) {
|
orderFilter(item) {
|
||||||
|
@ -455,7 +578,11 @@ export default {
|
||||||
addTdClass(val) {
|
addTdClass(val) {
|
||||||
if (val.row.status > 0 && val.row.paid == 1) {
|
if (val.row.status > 0 && val.row.paid == 1) {
|
||||||
for (let i = 0; i < val.row.orderProduct.length; i++) {
|
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";
|
return "row-bg";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -473,44 +600,51 @@ export default {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 用户信息
|
// 用户信息
|
||||||
onUserDetails(uid) {
|
onUserDetails(uid) {
|
||||||
this.uid = uid
|
this.uid = uid;
|
||||||
this.userDrawer = true
|
this.userDrawer = true;
|
||||||
this.$refs.userDetails.getData(uid, false, true);
|
this.$refs.userDetails.getData(uid, false, true);
|
||||||
},
|
},
|
||||||
closeDrawer() {
|
closeDrawer() {
|
||||||
this.drawer = false
|
this.drawer = false;
|
||||||
this.userDrawer = false
|
this.userDrawer = false;
|
||||||
},
|
},
|
||||||
changeDrawer(v) {
|
changeDrawer(v) {
|
||||||
this.drawer = v;
|
this.drawer = v;
|
||||||
this.userDrawer = v;
|
this.userDrawer = v;
|
||||||
},
|
},
|
||||||
async exports() {
|
async exports() {
|
||||||
let excelData = JSON.parse(JSON.stringify(this.tableFrom)), data = []
|
let excelData = JSON.parse(JSON.stringify(this.tableFrom)),
|
||||||
excelData.page = 1
|
data = [];
|
||||||
excelData.limit = 100
|
excelData.page = 1;
|
||||||
let pageCount = 1
|
excelData.limit = 100;
|
||||||
|
let pageCount = 1;
|
||||||
let lebData = {};
|
let lebData = {};
|
||||||
for (let i = 0; i < pageCount; i++) {
|
for (let i = 0; i < pageCount; i++) {
|
||||||
lebData = await this.downData(excelData)
|
lebData = await this.downData(excelData);
|
||||||
pageCount = Math.ceil(lebData.count/excelData.limit)
|
pageCount = Math.ceil(lebData.count / excelData.limit);
|
||||||
if (lebData.export.length) {
|
if (lebData.export.length) {
|
||||||
data = data.concat(lebData.export)
|
data = data.concat(lebData.export);
|
||||||
excelData.page++
|
excelData.page++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename);
|
createWorkBook(
|
||||||
return
|
lebData.header,
|
||||||
|
lebData.title,
|
||||||
|
data,
|
||||||
|
lebData.foot,
|
||||||
|
lebData.filename
|
||||||
|
);
|
||||||
|
return;
|
||||||
},
|
},
|
||||||
/**订单列表 */
|
/**订单列表 */
|
||||||
downData(excelData) {
|
downData(excelData) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
exportOrderApi(excelData).then((res) => {
|
exportOrderApi(excelData).then((res) => {
|
||||||
return resolve(res.data)
|
return resolve(res.data);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 导出
|
// 导出
|
||||||
exportRecord() {
|
exportRecord() {
|
||||||
|
@ -518,20 +652,18 @@ export default {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
this.$msgbox({
|
this.$msgbox({
|
||||||
title: '提示',
|
title: "提示",
|
||||||
message: h('p', null, [
|
message: h("p", null, [
|
||||||
h('span', null, '文件正在生成中,请稍后点击"'),
|
h("span", null, '文件正在生成中,请稍后点击"'),
|
||||||
h('span', { style: 'color: teal' }, '导出记录'),
|
h("span", { style: "color: teal" }, "导出记录"),
|
||||||
h('span', null, '"查看~ '),
|
h("span", null, '"查看~ '),
|
||||||
]),
|
]),
|
||||||
confirmButtonText: '我知道了',
|
confirmButtonText: "我知道了",
|
||||||
}).then(action => {
|
}).then((action) => {});
|
||||||
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
this.$message.error(res.message)
|
this.$message.error(res.message);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 详情
|
// 详情
|
||||||
onOrderDetails(id) {
|
onOrderDetails(id) {
|
||||||
|
@ -541,11 +673,11 @@ export default {
|
||||||
},
|
},
|
||||||
pageChangeLog(page) {
|
pageChangeLog(page) {
|
||||||
this.tableFromLog.page = page;
|
this.tableFromLog.page = page;
|
||||||
this.getList('');
|
this.getList("");
|
||||||
},
|
},
|
||||||
handleSizeChangeLog(val) {
|
handleSizeChangeLog(val) {
|
||||||
this.tableFromLog.limit = val;
|
this.tableFromLog.limit = val;
|
||||||
this.getList('');
|
this.getList("");
|
||||||
},
|
},
|
||||||
// 选择时间
|
// 选择时间
|
||||||
selectChange(tab) {
|
selectChange(tab) {
|
||||||
|
@ -570,7 +702,6 @@ export default {
|
||||||
this.tableData.data = res.data.list;
|
this.tableData.data = res.data.list;
|
||||||
this.tableData.total = res.data.count;
|
this.tableData.total = res.data.count;
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
|
@ -580,11 +711,11 @@ export default {
|
||||||
|
|
||||||
pageChange(page) {
|
pageChange(page) {
|
||||||
this.tableFrom.page = page;
|
this.tableFrom.page = page;
|
||||||
this.getList('');
|
this.getList("");
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.tableFrom.limit = val;
|
this.tableFrom.limit = val;
|
||||||
this.getList('');
|
this.getList("");
|
||||||
},
|
},
|
||||||
headerList() {
|
headerList() {
|
||||||
spreadChartApi()
|
spreadChartApi()
|
||||||
|
|
|
@ -121,11 +121,11 @@
|
||||||
<div class="value">{{ orderDetailList.pay_postage }}</div>
|
<div class="value">{{ orderDetailList.pay_postage }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="orderDetailList.spread" class="item">
|
<li v-if="orderDetailList.spread" class="item">
|
||||||
<div>推广人:</div>
|
<div>邀请人:</div>
|
||||||
<div class="value">{{ orderDetailList.spread.nickname }}</div>
|
<div class="value">{{ orderDetailList.spread.nickname }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="orderDetailList.TopSpread" class="item">
|
<li v-if="orderDetailList.TopSpread" class="item">
|
||||||
<div>上级推广人:</div>
|
<div>邀请人:</div>
|
||||||
<div class="value">{{ orderDetailList.TopSpread.nickname }}</div>
|
<div class="value">{{ orderDetailList.TopSpread.nickname }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="item">
|
<li class="item">
|
||||||
|
@ -148,11 +148,11 @@
|
||||||
<div v-else class="value">{{ orderDetailList.delivery_type | sendWay }}</div>
|
<div v-else class="value">{{ orderDetailList.delivery_type | sendWay }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="orderDetailList.spread" class="item">
|
<li v-if="orderDetailList.spread" class="item">
|
||||||
<div>推广人:</div>
|
<div>邀请人:</div>
|
||||||
<div class="value">{{ orderDetailList.spread.nickname || "无" }}</div>
|
<div class="value">{{ orderDetailList.spread.nickname || "无" }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="orderDetailList.TopSpread" class="item">
|
<li v-if="orderDetailList.TopSpread" class="item">
|
||||||
<div>上级推广人:</div>
|
<div>邀请人:</div>
|
||||||
<div class="value">{{ orderDetailList.TopSpread.nickname || "无" }}</div>
|
<div class="value">{{ orderDetailList.TopSpread.nickname || "无" }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="item">
|
<li class="item">
|
||||||
|
|
|
@ -1,12 +1,36 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="divBox">
|
<div class="divBox">
|
||||||
<div class="selCard mb14">
|
<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-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>
|
||||||
<el-form-item label="等级名称:" prop="brokerage_level">
|
<!-- <el-form-item label="等级名称:" prop="brokerage_level">
|
||||||
<el-select v-model="tableFrom.brokerage_level" clearable filterable placeholder="请选择" class="selWidth" @change="getList(1),getStatistics()">
|
<el-select
|
||||||
|
v-model="tableFrom.brokerage_level"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择"
|
||||||
|
class="selWidth"
|
||||||
|
@change="getList(1), getStatistics()"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in levelList"
|
v-for="item in levelList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -14,17 +38,25 @@
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="关键字:" prop="keyword">
|
<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-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
|
<el-button type="primary" size="small" @click="getList(1)"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
<el-button size="small" @click="searchReset()">重置</el-button>
|
<el-button size="small" @click="searchReset()">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</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-card class="box-card">
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
@ -34,15 +66,8 @@
|
||||||
class="table"
|
class="table"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column prop="uid" label="ID" width="80" />
|
||||||
prop="uid"
|
<el-table-column label="头像" min-width="80">
|
||||||
label="ID"
|
|
||||||
width="60"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="头像"
|
|
||||||
min-width="80"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="demo-image__preview">
|
<div class="demo-image__preview">
|
||||||
<el-image
|
<el-image
|
||||||
|
@ -52,10 +77,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="用户信息" min-width="150">
|
||||||
label="用户信息"
|
|
||||||
min-width="150"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>昵称:{{ scope.row.nickname }}</div>
|
<div>昵称:{{ scope.row.nickname }}</div>
|
||||||
<div>电话:{{ scope.row.phone }}</div>
|
<div>电话:{{ scope.row.phone }}</div>
|
||||||
|
@ -63,39 +85,46 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="spread_count"
|
prop="spread_count"
|
||||||
label="推广用户数量"
|
label="邀请用户数量"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<!-- <el-table-column label="等级名称" min-width="90">
|
||||||
label="等级名称"
|
<template slot-scope="scope">
|
||||||
min-width="90"
|
<span>{{
|
||||||
>
|
scope.row.brokerage ? scope.row.brokerage.brokerage_name : ""
|
||||||
<template slot-scope="scope">
|
}}</span>
|
||||||
<span>{{scope.row.brokerage ? scope.row.brokerage.brokerage_name : ''}}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="推广订单数量"
|
label="邀请人订单数量"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
prop="spread_pay_count"
|
prop="spread_pay_count"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="推广订单金额"
|
label="邀请人订单金额"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
prop="spread_pay_price"
|
prop="spread_pay_price"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="佣金金额"
|
label="奖励金额"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
sortable
|
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"
|
prop="total_brokerage_price"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="已提现金额"
|
label="已提现金额"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
sortable
|
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"
|
prop="total_extract_price"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -107,26 +136,43 @@
|
||||||
label="未提现金额"
|
label="未提现金额"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
sortable
|
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"
|
prop="brokerage_price"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="spread.nickname"
|
prop="spread.nickname"
|
||||||
label="上级推广人"
|
label="邀请人"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" min-width="120" fixed="right">
|
<el-table-column label="操作" min-width="120" fixed="right">
|
||||||
<template slot-scope="scope">
|
<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>
|
<el-dropdown>
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
更多<i class="el-icon-arrow-down el-icon--right" />
|
更多<i class="el-icon-arrow-down el-icon--right" />
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item @click.native="onSpreadOrder(scope.row.uid, 'order')">推广订单</el-dropdown-item>
|
<el-dropdown-item
|
||||||
<!--<el-dropdown-item @click.native="onSpreadType(scope.row.uid)">推广方式</el-dropdown-item>-->
|
@click.native="onSpreadOrder(scope.row.uid, 'order')"
|
||||||
<el-dropdown-item @click.native="clearSpread(scope.row)">清除上级推广人</el-dropdown-item>
|
>邀请人订单</el-dropdown-item
|
||||||
<el-dropdown-item @click.native="setDistriLevel(scope.row)">编辑分销员等级</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-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
|
@ -145,9 +191,9 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!--推广人-->
|
<!--邀请人-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="showDistributor ? '推广订单' : '推广人'"
|
:title="showDistributor ? '邀请人订单' : '邀请人'"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
width="900px"
|
width="900px"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
|
@ -155,7 +201,18 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<el-form size="small" label-width="85px" inline>
|
<el-form size="small" label-width="85px" inline>
|
||||||
<el-form-item label="时间选择:">
|
<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>
|
||||||
<el-form-item label="用户类型:">
|
<el-form-item label="用户类型:">
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -166,16 +223,27 @@
|
||||||
@change="onChanges"
|
@change="onChanges"
|
||||||
>
|
>
|
||||||
<el-option label="全部" value="" />
|
<el-option label="全部" value="" />
|
||||||
<el-option label="一级推广人" value="1" />
|
<el-option label="一级邀请人" value="1" />
|
||||||
<el-option label="二级推广人" value="2" />
|
<!-- <el-option label="二级邀请人" value="2" /> -->
|
||||||
<el-option v-if="showDistributor" label="分销员自购" value="-1" />
|
<el-option v-if="showDistributor" label="服务员自购" value="-1" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关键字:">
|
<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-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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -188,15 +256,8 @@
|
||||||
class="table"
|
class="table"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column prop="uid" label="ID" width="60" />
|
||||||
prop="uid"
|
<el-table-column label="头像" min-width="80">
|
||||||
label="ID"
|
|
||||||
width="60"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="头像"
|
|
||||||
min-width="80"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="scope.row.avatar" class="demo-image__preview">
|
<div v-if="scope.row.avatar" class="demo-image__preview">
|
||||||
<el-image
|
<el-image
|
||||||
|
@ -205,33 +266,33 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<img style="width: 36px; height: 36px"
|
<img
|
||||||
src="../../../assets/images/f.png" alt="">
|
style="width: 36px; height: 36px"
|
||||||
|
src="../../../assets/images/f.png"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="用户信息" min-width="90">
|
||||||
label="用户信息"
|
|
||||||
min-width="90"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>昵称:{{ scope.row.nickname }}</div>
|
<div>昵称:{{ scope.row.nickname }}</div>
|
||||||
<div>电话:{{ scope.row.phone }}</div>
|
<div>电话:{{ scope.row.phone }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- <el-table-column prop="is_promoter" label="是否邀请员" min-width="100">
|
||||||
prop="is_promoter"
|
|
||||||
label="是否推广员"
|
|
||||||
min-width="100"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.is_promoter | filterYesOrNo }}</span>
|
<span>{{ scope.row.is_promoter | filterYesOrNo }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
sortable
|
sortable
|
||||||
:sort-method="(a,b)=>{return a.spread_count - b.spread_count}"
|
:sort-method="
|
||||||
label="推广人数"
|
(a, b) => {
|
||||||
|
return a.spread_count - b.spread_count;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
label="邀请人数"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
prop="spread_count"
|
prop="spread_count"
|
||||||
/>
|
/>
|
||||||
|
@ -247,20 +308,14 @@
|
||||||
min-width="100"
|
min-width="100"
|
||||||
prop="spread_time"
|
prop="spread_time"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column sortable label="解绑时间" min-width="100">
|
||||||
sortable
|
<template slot-scope="scope">
|
||||||
label="解绑时间"
|
<span>{{
|
||||||
min-width="100"
|
scope.row.spread_limit ? scope.row.spread_limit : ""
|
||||||
>
|
}}</span>
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ scope.row.spread_limit ? scope.row.spread_limit : '' }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="create_time" label="关注时间" min-width="100" />
|
||||||
prop="create_time"
|
|
||||||
label="关注时间"
|
|
||||||
min-width="100"
|
|
||||||
/>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table
|
<el-table
|
||||||
v-if="onName === 'order'"
|
v-if="onName === 'order'"
|
||||||
|
@ -271,20 +326,16 @@
|
||||||
class="table"
|
class="table"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column prop="order_sn" label="订单ID" min-width="100" />
|
||||||
prop="order_sn"
|
<el-table-column prop="create_time" label="时间" min-width="100" />
|
||||||
label="订单ID"
|
|
||||||
min-width="100"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="create_time"
|
|
||||||
label="时间"
|
|
||||||
min-width="100"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
sortable
|
sortable
|
||||||
:sort-method="(a,b)=>{return a.brokerage - b.brokerage}"
|
:sort-method="
|
||||||
label="返佣金额"
|
(a, b) => {
|
||||||
|
return a.brokerage - b.brokerage;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
label="奖励金额"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
prop="brokerage"
|
prop="brokerage"
|
||||||
/>
|
/>
|
||||||
|
@ -304,13 +355,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
import { promoterListApi, spreadListApi, spreadOrderListApi, spreadClearApi, getDistributionLevel, distributionStatistics,distributionLevelUpdate } from '@/api/promoter'
|
promoterListApi,
|
||||||
import { fromList } from '@/libs/constants.js'
|
spreadListApi,
|
||||||
|
spreadOrderListApi,
|
||||||
|
spreadClearApi,
|
||||||
|
getDistributionLevel,
|
||||||
|
distributionStatistics,
|
||||||
|
distributionLevelUpdate,
|
||||||
|
} from "@/api/promoter";
|
||||||
|
import { fromList } from "@/libs/constants.js";
|
||||||
import cardsData from "@/components/cards/index";
|
import cardsData from "@/components/cards/index";
|
||||||
import timeOptions from '@/utils/timeOptions';
|
import timeOptions from "@/utils/timeOptions";
|
||||||
export default {
|
export default {
|
||||||
name: 'AccountsUser',
|
name: "AccountsUser",
|
||||||
components: { cardsData },
|
components: { cardsData },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -321,209 +379,231 @@ export default {
|
||||||
cardLists: [],
|
cardLists: [],
|
||||||
tableData: {
|
tableData: {
|
||||||
data: [],
|
data: [],
|
||||||
total: 0
|
total: 0,
|
||||||
},
|
},
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
tableFrom: {
|
tableFrom: {
|
||||||
paid: '',
|
paid: "",
|
||||||
date: '',
|
date: "",
|
||||||
keyword: '',
|
keyword: "",
|
||||||
brokerage_level: '',
|
brokerage_level: "",
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20
|
limit: 20,
|
||||||
},
|
},
|
||||||
fromList: fromList,
|
fromList: fromList,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
spreadData: {
|
spreadData: {
|
||||||
data: [],
|
data: [],
|
||||||
total: 0
|
total: 0,
|
||||||
},
|
},
|
||||||
spreadFrom: {
|
spreadFrom: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
date: '',
|
date: "",
|
||||||
level: '',
|
level: "",
|
||||||
keyword: ''
|
keyword: "",
|
||||||
},
|
},
|
||||||
timeValSpread: [],
|
timeValSpread: [],
|
||||||
spreadLoading: false,
|
spreadLoading: false,
|
||||||
uid: '',
|
uid: "",
|
||||||
onName: '',
|
onName: "",
|
||||||
showDistributor: false
|
showDistributor: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList('')
|
this.getList("");
|
||||||
this.getLevelList();
|
this.getLevelList();
|
||||||
this.getStatistics();
|
this.getStatistics();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**重置 */
|
/**重置 */
|
||||||
searchReset(){
|
searchReset() {
|
||||||
this.timeVal = []
|
this.timeVal = [];
|
||||||
this.tableFrom.date = ""
|
this.tableFrom.date = "";
|
||||||
this.$refs.searchForm.resetFields()
|
this.$refs.searchForm.resetFields();
|
||||||
this.getList(1)
|
this.getList(1);
|
||||||
this.getStatistics()
|
this.getStatistics();
|
||||||
},
|
},
|
||||||
// 清除
|
// 清除
|
||||||
clearSpread(row) {
|
clearSpread(row) {
|
||||||
this.$modalSure('解除【' + row.nickname + '】的上级推广人吗').then(() => {
|
this.$modalSure("解除【" + row.nickname + "】的邀请人吗").then(() => {
|
||||||
spreadClearApi(row.uid).then(({ message }) => {
|
spreadClearApi(row.uid)
|
||||||
this.$message.success(message)
|
.then(({ message }) => {
|
||||||
this.getList('')
|
this.$message.success(message);
|
||||||
}).catch(({ message }) => {
|
this.getList("");
|
||||||
this.$message.error(message)
|
})
|
||||||
})
|
.catch(({ message }) => {
|
||||||
})
|
this.$message.error(message);
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onSpread(uid, n) {
|
onSpread(uid, n) {
|
||||||
this.onName = n
|
this.onName = n;
|
||||||
this.uid = uid
|
this.uid = uid;
|
||||||
this.showDistributor = false
|
this.showDistributor = false;
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
this.spreadFrom = {
|
this.spreadFrom = {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
date: '',
|
date: "",
|
||||||
level: '',
|
level: "",
|
||||||
keyword: ''
|
keyword: "",
|
||||||
}
|
};
|
||||||
this.getListSpread(uid,'')
|
this.getListSpread(uid, "");
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
},
|
},
|
||||||
// 获取分销等级
|
// 获取服务等级
|
||||||
getLevelList(){
|
getLevelList() {
|
||||||
getDistributionLevel().then(res => {
|
getDistributionLevel()
|
||||||
this.levelList = res.data;
|
.then((res) => {
|
||||||
}).catch((res) => {
|
this.levelList = res.data;
|
||||||
this.$message.error(res.message)
|
|
||||||
})
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 获取统计数据
|
// 获取统计数据
|
||||||
getStatistics(){
|
getStatistics() {
|
||||||
distributionStatistics(this.tableFrom).then(res => {
|
distributionStatistics(this.tableFrom)
|
||||||
this.cardLists = res.data;
|
.then((res) => {
|
||||||
}).catch((res) => {
|
this.cardLists = res.data;
|
||||||
this.$message.error(res.message)
|
|
||||||
})
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 编辑分销员等级
|
// 编辑服务员等级
|
||||||
setDistriLevel(row){
|
setDistriLevel(row) {
|
||||||
this.$modalForm(distributionLevelUpdate(row.uid))
|
this.$modalForm(distributionLevelUpdate(row.uid));
|
||||||
},
|
},
|
||||||
// 选择时间
|
// 选择时间
|
||||||
selectChangeSpread(tab) {
|
selectChangeSpread(tab) {
|
||||||
this.timeValSpread = []
|
this.timeValSpread = [];
|
||||||
this.spreadFrom.date = tab
|
this.spreadFrom.date = tab;
|
||||||
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);
|
||||||
},
|
},
|
||||||
// 具体日期
|
// 具体日期
|
||||||
onchangeTimeSpread(e) {
|
onchangeTimeSpread(e) {
|
||||||
this.timeValSpread = e
|
this.timeValSpread = e;
|
||||||
this.spreadFrom.date = e ? this.timeValSpread.join('-') : ''
|
this.spreadFrom.date = e ? this.timeValSpread.join("-") : "";
|
||||||
this.onName === 'man' ? this.getListSpread(this.uid,'') : this.getSpreadOrderList(this.uid,'')
|
this.onName === "man"
|
||||||
|
? this.getListSpread(this.uid, "")
|
||||||
|
: this.getSpreadOrderList(this.uid, "");
|
||||||
},
|
},
|
||||||
onChanges() {
|
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) {
|
getListSpread(uid, num) {
|
||||||
this.spreadLoading = true
|
this.spreadLoading = true;
|
||||||
this.spreadFrom.page = num ? num : this.spreadFrom.page
|
this.spreadFrom.page = num ? num : this.spreadFrom.page;
|
||||||
spreadListApi(uid, this.spreadFrom).then(res => {
|
spreadListApi(uid, this.spreadFrom)
|
||||||
this.spreadData.data = res.data.list
|
.then((res) => {
|
||||||
this.spreadData.total = res.data.count
|
this.spreadData.data = res.data.list;
|
||||||
this.spreadLoading = false
|
this.spreadData.total = res.data.count;
|
||||||
}).catch((res) => {
|
this.spreadLoading = false;
|
||||||
this.$message.error(res.message)
|
})
|
||||||
this.spreadLoading = false
|
.catch((res) => {
|
||||||
})
|
this.$message.error(res.message);
|
||||||
|
this.spreadLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
pageChangeSpread(page) {
|
pageChangeSpread(page) {
|
||||||
this.spreadFrom.page = page
|
this.spreadFrom.page = page;
|
||||||
this.onName === 'man' ? this.getListSpread(this.uid,'') : this.getSpreadOrderList(this.uid,'')
|
this.onName === "man"
|
||||||
|
? this.getListSpread(this.uid, "")
|
||||||
|
: this.getSpreadOrderList(this.uid, "");
|
||||||
},
|
},
|
||||||
handleSizeChangeSpread(val) {
|
handleSizeChangeSpread(val) {
|
||||||
this.spreadFrom.limit = val
|
this.spreadFrom.limit = val;
|
||||||
this.onName === 'man' ? this.getListSpread(this.uid,'') : this.getSpreadOrderList(this.uid,'')
|
this.onName === "man"
|
||||||
|
? this.getListSpread(this.uid, "")
|
||||||
|
: this.getSpreadOrderList(this.uid, "");
|
||||||
},
|
},
|
||||||
// 推广订单
|
// 邀请订单
|
||||||
onSpreadOrder(uid, n) {
|
onSpreadOrder(uid, n) {
|
||||||
this.uid = uid
|
this.uid = uid;
|
||||||
this.onName = n
|
this.onName = n;
|
||||||
this.showDistributor = true
|
this.showDistributor = true;
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
this.spreadFrom = {
|
this.spreadFrom = {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
date: '',
|
date: "",
|
||||||
level: '',
|
level: "",
|
||||||
keyword: ''
|
keyword: "",
|
||||||
}
|
};
|
||||||
this.getSpreadOrderList(uid,1)
|
this.getSpreadOrderList(uid, 1);
|
||||||
},
|
},
|
||||||
getSpreadOrderList(uid, num) {
|
getSpreadOrderList(uid, num) {
|
||||||
this.spreadLoading = true
|
this.spreadLoading = true;
|
||||||
this.spreadFrom.page = num ? num : this.spreadFrom.page
|
this.spreadFrom.page = num ? num : this.spreadFrom.page;
|
||||||
spreadOrderListApi(uid, this.spreadFrom).then(res => {
|
spreadOrderListApi(uid, this.spreadFrom)
|
||||||
this.spreadData.data = res.data.list
|
.then((res) => {
|
||||||
this.spreadData.total = res.data.count
|
this.spreadData.data = res.data.list;
|
||||||
this.spreadLoading = false
|
this.spreadData.total = res.data.count;
|
||||||
}).catch((res) => {
|
this.spreadLoading = false;
|
||||||
this.$message.error(res.message)
|
})
|
||||||
this.spreadLoading = false
|
.catch((res) => {
|
||||||
})
|
this.$message.error(res.message);
|
||||||
|
this.spreadLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
selectChange(tab) {
|
selectChange(tab) {
|
||||||
this.tableFrom.date = tab
|
this.tableFrom.date = tab;
|
||||||
this.timeVal = []
|
this.timeVal = [];
|
||||||
this.tableFrom.page = 1;
|
this.tableFrom.page = 1;
|
||||||
this.getList('')
|
this.getList("");
|
||||||
this.getStatistics()
|
this.getStatistics();
|
||||||
},
|
},
|
||||||
// 具体日期
|
// 具体日期
|
||||||
onchangeTime(e) {
|
onchangeTime(e) {
|
||||||
this.timeVal = e
|
this.timeVal = e;
|
||||||
this.tableFrom.date = e ? this.timeVal.join('-') : ''
|
this.tableFrom.date = e ? this.timeVal.join("-") : "";
|
||||||
this.tableFrom.page = 1;
|
this.tableFrom.page = 1;
|
||||||
this.getList('')
|
this.getList("");
|
||||||
this.getStatistics()
|
this.getStatistics();
|
||||||
},
|
},
|
||||||
// 列表
|
// 列表
|
||||||
getList(num) {
|
getList(num) {
|
||||||
this.listLoading = true
|
this.listLoading = true;
|
||||||
this.tableFrom.page = num ? num : this.tableFrom.page
|
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||||
promoterListApi(this.tableFrom).then(res => {
|
promoterListApi(this.tableFrom)
|
||||||
this.tableData.data = res.data.list
|
.then((res) => {
|
||||||
this.tableData.total = res.data.count
|
this.tableData.data = res.data.list;
|
||||||
this.listLoading = false
|
this.tableData.total = res.data.count;
|
||||||
}).catch((res) => {
|
this.listLoading = false;
|
||||||
this.$message.error(res.message)
|
})
|
||||||
this.listLoading = false
|
.catch((res) => {
|
||||||
})
|
this.$message.error(res.message);
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
pageChange(page) {
|
pageChange(page) {
|
||||||
this.tableFrom.page = page
|
this.tableFrom.page = page;
|
||||||
this.getList('')
|
this.getList("");
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.tableFrom.limit = val
|
this.tableFrom.limit = val;
|
||||||
this.getList('')
|
this.getList("");
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-dropdown-link {
|
.el-dropdown-link {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--prev-color-primary);
|
color: var(--prev-color-primary);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
.el-icon-arrow-down {
|
.el-icon-arrow-down {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,10 +3,17 @@
|
||||||
<div class="selCard">
|
<div class="selCard">
|
||||||
<el-form size="small" label-width="85px">
|
<el-form size="small" label-width="85px">
|
||||||
<el-form-item label="模板类型:">
|
<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="1" />
|
||||||
<el-option label="通知" :value="2" />
|
<el-option label="通知" :value="2" />
|
||||||
<el-option label="推广" :value="3" />
|
<el-option label="邀请" :value="3" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -18,38 +25,24 @@
|
||||||
size="small"
|
size="small"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column prop="id" label="ID" min-width="50" />
|
||||||
prop="id"
|
<el-table-column prop="title" label="模板名称" min-width="120" />
|
||||||
label="ID"
|
<el-table-column prop="content" label="模板内容" min-width="150" />
|
||||||
min-width="50"
|
<el-table-column prop="temp_type" label="模板类型" min-width="100">
|
||||||
/>
|
<template slot-scope="{ row }">
|
||||||
<el-table-column
|
<span>{{ row.temp_type | typeFilter }}</span>
|
||||||
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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column prop="mark" label="备注" min-width="150" />
|
||||||
prop="mark"
|
|
||||||
label="备注"
|
|
||||||
min-width="150"
|
|
||||||
/>
|
|
||||||
<el-table-column label="模板状态" min-width="100">
|
<el-table-column label="模板状态" min-width="100">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{ row }">
|
||||||
<span>{{ row.status == 1 ? '审核通过' : row.status == 2 ? '审核未通过' : '待审核' }}</span>
|
<span>{{
|
||||||
|
row.status == 1
|
||||||
|
? "审核通过"
|
||||||
|
: row.status == 2
|
||||||
|
? "审核未通过"
|
||||||
|
: "待审核"
|
||||||
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -65,26 +58,24 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { applyTempLstApi } from "@/api/sms";
|
||||||
import { applyTempLstApi } from '@/api/sms'
|
import { roterPre } from "@/settings";
|
||||||
import { roterPre } from '@/settings'
|
import { mapGetters } from "vuex";
|
||||||
import { mapGetters } from 'vuex'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SmsTemplate',
|
name: "SmsTemplate",
|
||||||
filters: {
|
filters: {
|
||||||
typeFilter(type) {
|
typeFilter(type) {
|
||||||
const typeMap = {
|
const typeMap = {
|
||||||
1: '验证码',
|
1: "验证码",
|
||||||
2: '通知',
|
2: "通知",
|
||||||
3: '营销短信'
|
3: "营销短信",
|
||||||
}
|
};
|
||||||
return typeMap[type]
|
return typeMap[type];
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -93,70 +84,70 @@ export default {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableData: {
|
tableData: {
|
||||||
data: [],
|
data: [],
|
||||||
total: 0
|
total: 0,
|
||||||
},
|
},
|
||||||
tableFrom: {
|
tableFrom: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
temp_type: ''
|
temp_type: "",
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters(["isLogin"]),
|
||||||
'isLogin'
|
|
||||||
])
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.isLogin);
|
console.log(this.isLogin);
|
||||||
this.getList('')
|
this.getList("");
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查看是否登录
|
// 查看是否登录
|
||||||
onIsLogin() {
|
onIsLogin() {
|
||||||
this.fullscreenLoading = true
|
this.fullscreenLoading = true;
|
||||||
this.$store.dispatch('user/isLogin').then(async res => {
|
this.$store
|
||||||
const data = res.data
|
.dispatch("user/isLogin")
|
||||||
if (!data.status) {
|
.then(async (res) => {
|
||||||
this.$message.warning('请先登录')
|
const data = res.data;
|
||||||
this.$router.push(roterPre + '/sms/config?url=' + this.$route.path)
|
if (!data.status) {
|
||||||
} else {
|
this.$message.warning("请先登录");
|
||||||
this.getList('')
|
this.$router.push(roterPre + "/sms/config?url=" + this.$route.path);
|
||||||
}
|
} else {
|
||||||
this.fullscreenLoading = false
|
this.getList("");
|
||||||
}).catch(res => {
|
}
|
||||||
this.$message.error(res.message)
|
this.fullscreenLoading = false;
|
||||||
this.$router.push(roterPre + '/sms/config?url=' + this.$route.path)
|
})
|
||||||
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) {
|
getList(num) {
|
||||||
this.listLoading = true
|
this.listLoading = true;
|
||||||
this.tableFrom.page = num ? num : this.tableFrom.page
|
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||||
applyTempLstApi(this.tableFrom).then(res => {
|
applyTempLstApi(this.tableFrom)
|
||||||
this.tableData.data = res.data.data
|
.then((res) => {
|
||||||
this.tableData.total = res.data.count
|
this.tableData.data = res.data.data;
|
||||||
this.listLoading = false
|
this.tableData.total = res.data.count;
|
||||||
}).catch(res => {
|
this.listLoading = false;
|
||||||
this.listLoading = false
|
})
|
||||||
this.$message.error(res.message)
|
.catch((res) => {
|
||||||
this.$router.push(roterPre + '/setting/sms/sms_config/index')
|
this.listLoading = false;
|
||||||
})
|
this.$message.error(res.message);
|
||||||
|
this.$router.push(roterPre + "/setting/sms/sms_config/index");
|
||||||
|
});
|
||||||
},
|
},
|
||||||
pageChange(page) {
|
pageChange(page) {
|
||||||
this.tableFrom.page = page
|
this.tableFrom.page = page;
|
||||||
this.getList('')
|
this.getList("");
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.tableFrom.limit = val
|
this.tableFrom.limit = val;
|
||||||
this.getList('')
|
this.getList("");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss"></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -3,17 +3,26 @@
|
||||||
<div class="selCard">
|
<div class="selCard">
|
||||||
<el-form inline label-width="85px">
|
<el-form inline label-width="85px">
|
||||||
<el-form-item label="模板类型:">
|
<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="1" />
|
||||||
<el-option label="通知" :value="2" />
|
<el-option label="通知" :value="2" />
|
||||||
<el-option label="推广" :value="3" />
|
<el-option label="邀请" :value="3" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-card v-loading="fullscreenLoading" class="mt14">
|
<el-card v-loading="fullscreenLoading" class="mt14">
|
||||||
<div class="mb20">
|
<div class="mb20">
|
||||||
<el-button size="small" type="primary" @click="apply">申请短信模板</el-button>
|
<el-button size="small" type="primary" @click="apply"
|
||||||
|
>申请短信模板</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
@ -21,34 +30,14 @@
|
||||||
size="small"
|
size="small"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column prop="id" label="ID" min-width="50" />
|
||||||
prop="id"
|
<el-table-column prop="templateid" label="模板ID" min-width="80" />
|
||||||
label="ID"
|
<el-table-column prop="title" label="模板名称" min-width="120" />
|
||||||
min-width="50"
|
<el-table-column prop="content" label="模板内容" min-width="500" />
|
||||||
/>
|
<el-table-column prop="type" label="模板类型" min-width="100" />
|
||||||
<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="模板状态">
|
<el-table-column label="模板状态">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{ row }">
|
||||||
<span>{{ row.status ? '可用' : '不可用' }}</span>
|
<span>{{ row.status ? "可用" : "不可用" }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -65,19 +54,36 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</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 @submit.native.prevent size="small" label-width="100px">
|
||||||
<el-form-item label="模板名称:" class="width100" prop="title">
|
<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>
|
||||||
<el-form-item label="模板内容:" class="width100" prop="content">
|
<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>
|
||||||
<el-form-item label="模板类型:">
|
<el-form-item label="模板类型:">
|
||||||
<el-radio-group v-model="form.type" @change="changeRadioText">
|
<el-radio-group v-model="form.type" @change="changeRadioText">
|
||||||
<el-radio :label="1">验证码</el-radio>
|
<el-radio :label="1">验证码</el-radio>
|
||||||
<el-radio :label="2">通知</el-radio>
|
<el-radio :label="2">通知</el-radio>
|
||||||
<el-radio :label="3">推广</el-radio>
|
<el-radio :label="3">邀请</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -89,12 +95,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { smsTempLstApi, tempCreateApi } from "@/api/sms";
|
||||||
import { smsTempLstApi, tempCreateApi } from '@/api/sms'
|
import { roterPre } from "@/settings";
|
||||||
import { roterPre } from '@/settings'
|
import { mapGetters } from "vuex";
|
||||||
import { mapGetters } from 'vuex'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SmsTemplate',
|
name: "SmsTemplate",
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -103,120 +108,122 @@ export default {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableData: {
|
tableData: {
|
||||||
data: [],
|
data: [],
|
||||||
total: 0
|
total: 0,
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
title: '',
|
title: "",
|
||||||
content: '',
|
content: "",
|
||||||
type: 1
|
type: 1,
|
||||||
},
|
},
|
||||||
placeholder: {},
|
placeholder: {},
|
||||||
placeholderObj:[
|
placeholderObj: [
|
||||||
{
|
{
|
||||||
title: '例如:注册验证码',
|
title: "例如:注册验证码",
|
||||||
content: '例如:您的验证码是:{$code},有效期为{$time}分钟。如非本人操作,可不予理会.'
|
content:
|
||||||
|
"例如:您的验证码是:{$code},有效期为{$time}分钟。如非本人操作,可不予理会.",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '例如:订单支付成功通知',
|
title: "例如:订单支付成功通知",
|
||||||
content: '例如:您购买的商品已支付成功,支付金额{$pay_price}元,订单号{$order_id},感谢您的光临!'
|
content:
|
||||||
|
"例如:您购买的商品已支付成功,支付金额{$pay_price}元,订单号{$order_id},感谢您的光临!",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '例如:国庆优惠活动',
|
title: "例如:国庆优惠活动",
|
||||||
content: '10月1日-8日期间 全场商品满1000减200,国庆欢乐购'
|
content: "10月1日-8日期间 全场商品满1000减200,国庆欢乐购",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
tableFrom: {
|
tableFrom: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
type: ''
|
type: "",
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters(["isLogin"]),
|
||||||
'isLogin'
|
|
||||||
])
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.isLogin);
|
console.log(this.isLogin);
|
||||||
this.getList('')
|
this.getList("");
|
||||||
this.changeRadioText();
|
this.changeRadioText();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
changeRadioText() {
|
||||||
changeRadioText(){
|
this.placeholder = this.placeholderObj[this.form.type - 1];
|
||||||
this.placeholder=this.placeholderObj[this.form.type-1]
|
|
||||||
},
|
},
|
||||||
// 查看是否登录
|
// 查看是否登录
|
||||||
onIsLogin() {
|
onIsLogin() {
|
||||||
this.fullscreenLoading = true
|
this.fullscreenLoading = true;
|
||||||
this.$store.dispatch('user/isLogin').then(async res => {
|
this.$store
|
||||||
const data = res.data
|
.dispatch("user/isLogin")
|
||||||
if (!data.status) {
|
.then(async (res) => {
|
||||||
this.$message.warning('请先登录')
|
const data = res.data;
|
||||||
this.$router.push(roterPre + '/sms/config?url=' + this.$route.path)
|
if (!data.status) {
|
||||||
} else {
|
this.$message.warning("请先登录");
|
||||||
this.getList('')
|
this.$router.push(roterPre + "/sms/config?url=" + this.$route.path);
|
||||||
}
|
} else {
|
||||||
this.fullscreenLoading = false
|
this.getList("");
|
||||||
}).catch(res => {
|
}
|
||||||
this.$message.error(res.message)
|
this.fullscreenLoading = false;
|
||||||
this.$router.push(roterPre + '/sms/config?url=' + this.$route.path)
|
})
|
||||||
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) {
|
getList(num) {
|
||||||
this.listLoading = true
|
this.listLoading = true;
|
||||||
this.tableFrom.page = num ? num : this.tableFrom.page
|
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||||
smsTempLstApi(this.tableFrom).then(res => {
|
smsTempLstApi(this.tableFrom)
|
||||||
this.tableData.data = res.data.data
|
.then((res) => {
|
||||||
this.tableData.total = res.data.count
|
this.tableData.data = res.data.data;
|
||||||
this.listLoading = false
|
this.tableData.total = res.data.count;
|
||||||
}).catch(res => {
|
this.listLoading = false;
|
||||||
this.listLoading = false
|
})
|
||||||
this.$message.error(res.message)
|
.catch((res) => {
|
||||||
this.$router.push(roterPre + '/setting/sms/sms_config/index')
|
this.listLoading = false;
|
||||||
})
|
this.$message.error(res.message);
|
||||||
|
this.$router.push(roterPre + "/setting/sms/sms_config/index");
|
||||||
|
});
|
||||||
},
|
},
|
||||||
pageChange(page) {
|
pageChange(page) {
|
||||||
this.tableFrom.page = page
|
this.tableFrom.page = page;
|
||||||
this.getList('')
|
this.getList("");
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.tableFrom.limit = val
|
this.tableFrom.limit = val;
|
||||||
this.getList('')
|
this.getList("");
|
||||||
},
|
},
|
||||||
// 表格搜索
|
// 表格搜索
|
||||||
userSearchs() {
|
userSearchs() {
|
||||||
this.getList(1)
|
this.getList(1);
|
||||||
},
|
},
|
||||||
// 申请
|
// 申请
|
||||||
apply(){
|
apply() {
|
||||||
this.form={title: '',content: '',type: 1};
|
this.form = { title: "", content: "", type: 1 };
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.changeRadioText();
|
this.changeRadioText();
|
||||||
},
|
},
|
||||||
// 添加
|
// 添加
|
||||||
add() {
|
add() {
|
||||||
if(!this.form.title || !this.form.content){
|
if (!this.form.title || !this.form.content) {
|
||||||
this.$message.error('请提前写完信息!');
|
this.$message.error("请提前写完信息!");
|
||||||
}else{
|
} else {
|
||||||
tempCreateApi(this.form).then(({ message }) => {
|
tempCreateApi(this.form)
|
||||||
this.$message.success('申请成功!')
|
.then(({ message }) => {
|
||||||
this.dialogVisible = false
|
this.$message.success("申请成功!");
|
||||||
this.$router.push(roterPre + '/sms/applyList')
|
this.dialogVisible = false;
|
||||||
})
|
this.$router.push(roterPre + "/sms/applyList");
|
||||||
.catch(({ message }) => {
|
|
||||||
this.$message.error(message)
|
|
||||||
})
|
})
|
||||||
|
.catch(({ message }) => {
|
||||||
|
this.$message.error(message);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss"></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -21,7 +21,7 @@
|
||||||
:model="userInfo"
|
:model="userInfo"
|
||||||
label-width="130px"
|
label-width="130px"
|
||||||
@submit.native.prevent
|
@submit.native.prevent
|
||||||
>
|
>
|
||||||
<el-form-item label="手机号(账号):" prop="account">
|
<el-form-item label="手机号(账号):" prop="account">
|
||||||
<el-input
|
<el-input
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -57,15 +57,13 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="头像:">
|
<el-form-item label="头像:">
|
||||||
<div
|
<div class="upLoadPicBox">
|
||||||
class="upLoadPicBox"
|
|
||||||
>
|
|
||||||
<div v-if="userInfo.avatar" class="pictrue">
|
<div v-if="userInfo.avatar" class="pictrue">
|
||||||
<img :src="userInfo.avatar">
|
<img :src="userInfo.avatar" />
|
||||||
<i
|
<i
|
||||||
class="el-icon-error btndel"
|
class="el-icon-error btndel"
|
||||||
@click="userInfo.avatar=''"
|
@click="userInfo.avatar = ''"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="upLoad" @click="modalPicTap('1')">
|
<div v-else class="upLoad" @click="modalPicTap('1')">
|
||||||
<i class="el-icon-camera cameraIconfont" />
|
<i class="el-icon-camera cameraIconfont" />
|
||||||
|
@ -117,7 +115,7 @@
|
||||||
<el-radio :label="1">正常</el-radio>
|
<el-radio :label="1">正常</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="推广员:" required>
|
<!-- <el-form-item label="邀请员:" required>
|
||||||
<el-radio-group v-model="userInfo.is_promoter">
|
<el-radio-group v-model="userInfo.is_promoter">
|
||||||
<el-radio :label="0">关闭</el-radio>
|
<el-radio :label="0">关闭</el-radio>
|
||||||
<el-radio :label="1">开启</el-radio>
|
<el-radio :label="1">开启</el-radio>
|
||||||
|
@ -128,21 +126,25 @@
|
||||||
<el-col :span="23">
|
<el-col :span="23">
|
||||||
<div class="demo-drawer__footer">
|
<div class="demo-drawer__footer">
|
||||||
<el-button @click="handleClose" size="small">取 消</el-button>
|
<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>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { addUserApi } from "@/api/user";
|
||||||
|
|
||||||
import { addUserApi } from '@/api/user'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserCreate',
|
name: "UserCreate",
|
||||||
props: {
|
props: {
|
||||||
createDrawer: {
|
createDrawer: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
@ -152,20 +154,25 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
const validatePhone = (rule, value, callback) => {
|
const validatePhone = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return callback(new Error('请输入手机号'))
|
return callback(new Error("请输入手机号"));
|
||||||
} else if (!/^1[3456789]\d{9}$/.test(value)) {
|
} else if (!/^1[3456789]\d{9}$/.test(value)) {
|
||||||
callback(new Error('格式不正确!'))
|
callback(new Error("格式不正确!"));
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
const validateCard = (rule, value, 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)) {
|
if (
|
||||||
callback(new Error('格式不正确!'))
|
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 {
|
} else {
|
||||||
callback()
|
callback();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
let validatePass2 = (rule, value, callback) => {
|
let validatePass2 = (rule, value, callback) => {
|
||||||
if (value === "") {
|
if (value === "") {
|
||||||
callback(new Error("请再次输入密码"));
|
callback(new Error("请再次输入密码"));
|
||||||
|
@ -181,75 +188,78 @@ export default {
|
||||||
avatar: "",
|
avatar: "",
|
||||||
sex: 0,
|
sex: 0,
|
||||||
status: 1,
|
status: 1,
|
||||||
is_promoter: 1
|
is_promoter: 1,
|
||||||
},
|
},
|
||||||
ruleValidate: {
|
ruleValidate: {
|
||||||
account: [{ required: true, validator: validatePhone, trigger: 'blur' }],
|
account: [
|
||||||
phone: [{ validator: validatePhone, trigger: 'blur' }],
|
{ required: true, validator: validatePhone, trigger: "blur" },
|
||||||
card_id: [{validator: validateCard, trigger: 'blur'}],
|
],
|
||||||
pwd: [{ required: true, message: '请输入密码', trigger: 'blur' }],
|
phone: [{ validator: validatePhone, trigger: "blur" }],
|
||||||
repwd: [{ required: true, validator: validatePass2, trigger: 'blur' }],
|
card_id: [{ validator: validateCard, trigger: "blur" }],
|
||||||
|
pwd: [{ required: true, message: "请输入密码", trigger: "blur" }],
|
||||||
|
repwd: [{ required: true, validator: validatePass2, trigger: "blur" }],
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.resetData()
|
this.resetData();
|
||||||
this.$emit('closeDrawer');
|
this.$emit("closeDrawer");
|
||||||
},
|
},
|
||||||
resetData(){
|
resetData() {
|
||||||
this.$refs.userField.resetFields()
|
this.$refs.userField.resetFields();
|
||||||
this.userInfo.avatar=""
|
this.userInfo.avatar = "";
|
||||||
this.userInfo.phone=""
|
this.userInfo.phone = "";
|
||||||
this.userInfo.real_name=""
|
this.userInfo.real_name = "";
|
||||||
this.userInfo.card_id=""
|
this.userInfo.card_id = "";
|
||||||
this.userInfo.birthday=""
|
this.userInfo.birthday = "";
|
||||||
this.userInfo.sex = 0
|
this.userInfo.sex = 0;
|
||||||
},
|
},
|
||||||
// 点击商品图
|
// 点击商品图
|
||||||
modalPicTap(tit, num, i) {
|
modalPicTap(tit, num, i) {
|
||||||
const _this = this;
|
const _this = this;
|
||||||
this.$modalUpload(function(img) {
|
this.$modalUpload(function (img) {
|
||||||
_this.userInfo.avatar = img[0];
|
_this.userInfo.avatar = img[0];
|
||||||
}, tit);
|
}, tit);
|
||||||
},
|
},
|
||||||
submitForm(name){
|
submitForm(name) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$refs[name].validate(valid => {
|
this.$refs[name].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
addUserApi(this.userInfo).then(async res => {
|
addUserApi(this.userInfo)
|
||||||
this.loading = false;
|
.then(async (res) => {
|
||||||
this.$message.success(res.message);
|
this.loading = false;
|
||||||
this.$emit('closeDrawer');
|
this.$message.success(res.message);
|
||||||
this.$emit('getList');
|
this.$emit("closeDrawer");
|
||||||
})
|
this.$emit("getList");
|
||||||
.catch(res => {
|
})
|
||||||
this.loading = false;
|
.catch((res) => {
|
||||||
this.$message.error(res.message);
|
this.loading = false;
|
||||||
})
|
this.$message.error(res.message);
|
||||||
}else{
|
});
|
||||||
|
} else {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.head {
|
.head {
|
||||||
padding: 15px 20px;
|
padding: 15px 20px;
|
||||||
border-bottom: 1px solid #DCDFE6;
|
border-bottom: 1px solid #dcdfe6;
|
||||||
.title {
|
.title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
color: rgba(0, 0, 0, 0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
}
|
|
||||||
}
|
|
||||||
.demo-drawer__footer{
|
|
||||||
text-align: right;
|
|
||||||
padding: 20px 0;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.demo-drawer__footer {
|
||||||
|
text-align: right;
|
||||||
|
padding: 20px 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
<el-dropdown-item command="balance"
|
<el-dropdown-item command="balance"
|
||||||
>设置余额</el-dropdown-item
|
>设置余额</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="label">设置标签</el-dropdown-item>
|
||||||
<!-- <el-dropdown-item command="reference">修改推荐人</el-dropdown-item> -->
|
<!-- <el-dropdown-item command="reference">修改推荐人</el-dropdown-item> -->
|
||||||
<el-dropdown-item command="password"
|
<el-dropdown-item command="password"
|
||||||
|
@ -148,7 +148,7 @@
|
||||||
<div class="title">用户概况</div>
|
<div class="title">用户概况</div>
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
<!-- <li class="item">
|
<!-- <li class="item">
|
||||||
<div>推广员:</div>
|
<div>邀请员:</div>
|
||||||
<div class="value">{{psInfo.is_promoter == 1 ? '是' : '否'}}</div>
|
<div class="value">{{psInfo.is_promoter == 1 ? '是' : '否'}}</div>
|
||||||
</li> -->
|
</li> -->
|
||||||
<li class="item">
|
<li class="item">
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<!-- <li class="item">
|
<!-- <li class="item">
|
||||||
<div>推广人:</div>
|
<div>邀请人:</div>
|
||||||
<div class="value">{{psInfo.spread && psInfo.spread.nickname || '无'}}</div>
|
<div class="value">{{psInfo.spread && psInfo.spread.nickname || '无'}}</div>
|
||||||
</li> -->
|
</li> -->
|
||||||
<li class="item">
|
<li class="item">
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" v-if="psInfo.spread">
|
<div class="section" v-if="psInfo.spread">
|
||||||
<div class="title">被邀请人信息</div>
|
<div class="title">邀请人信息</div>
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
<li class="item">
|
<li class="item">
|
||||||
<div>用户ID:</div>
|
<div>用户ID:</div>
|
||||||
|
@ -402,7 +402,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- <el-row :gutter="24">
|
<!-- <el-row :gutter="24">
|
||||||
<el-form-item label="推广员:" prop="is_promoter">
|
<el-form-item label="邀请员:" prop="is_promoter">
|
||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="psInfo.is_promoter"
|
v-model="psInfo.is_promoter"
|
||||||
>
|
>
|
||||||
|
@ -774,7 +774,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
:prop="item.key"
|
:prop="item.key"
|
||||||
:label="item.title"
|
:label="item.title"
|
||||||
width="item.minWidth"
|
:min-width="item.minWidth"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="item.key == 'activation_promoter'">{{
|
<span v-if="item.key == 'activation_promoter'">{{
|
||||||
|
@ -1241,12 +1241,17 @@ export default {
|
||||||
{
|
{
|
||||||
title: "用户ID",
|
title: "用户ID",
|
||||||
key: "uid",
|
key: "uid",
|
||||||
minWidth: 200,
|
minWidth: 80,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "ID号",
|
||||||
|
key: "number",
|
||||||
|
minWidth: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "用户姓名",
|
title: "用户姓名",
|
||||||
key: "real_name",
|
key: "real_name",
|
||||||
minWidth: 50,
|
minWidth: 80,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "用户电话",
|
title: "用户电话",
|
||||||
|
@ -1256,11 +1261,16 @@ export default {
|
||||||
{
|
{
|
||||||
title: "用户身份证号",
|
title: "用户身份证号",
|
||||||
key: "card_id",
|
key: "card_id",
|
||||||
minWidth: 100,
|
minWidth: 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "是否绑定",
|
title: "是否绑定",
|
||||||
key: "activation_promoter",
|
key: "activation_promoter_name",
|
||||||
|
minWidth: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "绑定时间",
|
||||||
|
key: "activation_time",
|
||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue