69 Commits

Author SHA1 Message Date
pikachu1995@126.com
8a0f5ff120 fix(goods): 移除下载结算单接口URL中的多余斜杠 2025-12-09 16:44:18 +08:00
chc
c5fecda212 先注释掉未实际使用功能,后续优化密码修改内容 2025-12-01 18:55:46 +08:00
pikachu1995@126.com
e5d98d022e feat(manager): 调整分页组件默认页面大小为20
- 将所有页面的默认页面大小从10调整为20
- 更新分页选项数组,将最小值从10改为20
- 统一所有分页相关组件的pageSize默认值为20
- 修改pageSizeOpts选项为[20, 50, 100]
- 确保所有涉及分页的业务逻辑使用新的默认值
2025-11-24 13:09:11 +08:00
pikachu1995@126.com
799184fd21 style(components): 将按钮组件替换为链接样式
- 统一将页面中的 Button 组件替换为 a 标签,保持样式一致
- 添加统一的链接样式类 ops-link 和分隔符样式类 ops-sep
- 更新操作列中按钮的样式,使用颜色、光标和文本装饰属性替代原有 props 配置
- 在多个文件中调整了操作项之间的分隔符显示逻辑
- 优化表格操作列渲染函数,去除冗余的 Button 属性配置
- 保持功能不变的前提下提升界面视觉一致性
2025-11-24 11:33:54 +08:00
pikachu1995@126.com
756cb28daa fix(api): 修正更新隐私协议的API路径格式
feat(ui): 在顶部导航栏添加客服按钮及样式
添加客服按钮功能,包括获取IM链接和用户信息验证

refactor(order): 重构分销订单状态显示逻辑
统一订单状态显示为"未完成"、"完成"和"退款",并调整对应颜色
2025-11-23 16:30:41 +08:00
lifenlong
5f6eb6a26d feat(积分商品分类): 添加分页功能并支持按排序值排序
在积分商品分类页面添加分页组件,支持分页查询和排序
新增排序值字段展示,并对分类列表按排序值进行递归排序
2025-11-20 15:32:46 +08:00
pikachu1995@126.com
4efbec5741 refactor(分页): 统一调整分页大小选项为[20, 50, 100]并更新默认pageSize
style(售后订单): 优化商品图片样式,添加圆角和固定宽高
docs(售后订单): 更新售后状态显示文本,使其更清晰易懂
2025-10-27 18:34:01 +08:00
Ryan Ran
86dbc0d86e docs(README): 更新安装指导,新增yarn安装和启动步骤,移除npm相关内容以简化用户体验 2025-10-22 15:01:21 +08:00
pikachu1995@126.com
c32d011851 docs(readme): 更新交流方式和联系方式- 移除了旧的QQ群交流信息
- 新增微信交流群二维码
- 添加在线客服链接
- 精简了联系方式展示方式
- 统一了交流渠道描述格式
2025-10-20 14:52:33 +08:00
pikachu1995@126.com
311ca35afc feat(商品设置): 添加ES商品索引管理功能
新增三个API接口用于管理ES商品索引:
1. 删除ES中下架的商品
2. 删除不存在的索引
3. 生成所有商品的缓存
同时在商品设置页面添加对应操作按钮
2025-10-20 13:43:34 +08:00
Ryan Ran
1a3fae6501 fix(README & package.json): 更新 README 文档以反映 Node.js 版本兼容性,移除 NODE_OPTIONS 环境变量的依赖,确保项目在 Node.js 16 及以上版本下正常运行,优化用户安装指导。 2025-10-10 15:23:27 +08:00
Ryan Ran
3432530de7 fix(README.md): 更新文档以兼容更高的 Node.js 版本(20、18、16),并提供安装指导,确保用户能够顺利拉取最新代码和处理依赖问题。 2025-09-30 14:03:43 +08:00
Ryan Ran
af85493863 fix(buyer端升级node版本): 添加 .npmrc 和 .yarnrc 文件以支持引擎配置,更新 package.json 中的 NODE_OPTIONS 环境变量,替换多个组件中的 /deep/ 选择器为 ::v-deep,优化依赖管理,确保兼容性,兼容node16版本 2025-09-30 13:33:22 +08:00
Ryan Ran
ae85f0d612 fix(manager端升级node版本): 更新多个组件的样式,替换 /deep/ 选择器为 ::v-deep,替换 node-sass 为 sass,优化依赖管理和兼容性,兼容node16版本 2025-09-30 11:38:38 +08:00
Ryan Ran
16c4a78e29 fix(兼容性): 更新 seller 项目的 package.json 和 README.md,添加 NODE_OPTIONS 环境变量以支持 Node.js 版本 20 和 18 的运行,详细说明各版本的兼容性和安装要求,优化文档以提升用户体验。 2025-09-30 11:04:12 +08:00
Ryan Ran
8fb87aa64d feat(seller端升级node版本): 添加 .npmrc 和 .yarnrc 文件以支持引擎配置,更新 package.json 中的引擎要求并替换 node-sass 为 sass,优化依赖管理和兼容性,兼容node16版本 2025-09-29 18:26:52 +08:00
Ryan Ran
c5d675b6d2 fix(商品规格): 优化规格值处理逻辑,确保在规格值为空时移除对应行并更新表格数据,增强用户体验 2025-09-23 19:17:24 +08:00
Ryan Ran
f4d06b2d7b fix(商品审核): 更新审核功能,添加请求头以支持表单数据提交,提升接口兼容性 2025-09-23 14:14:43 +08:00
Ryan Ran
bb610a7cd8 fix(商品审核): 优化审核功能,使用FormData处理请求数据,提升代码可读性和维护性 2025-09-23 14:01:53 +08:00
misworga831
bb864e72b3 fix(商品规格): 优化规格值编辑逻辑,避免空值提交并清理错误提示 2025-09-15 21:45:47 +09:00
misworga831
c6c4797d87 fix(商品规格): 修复规格值过滤逻辑,确保移除空值并更新表格数据 2025-09-15 21:03:33 +09:00
misworga831
25fed42395 fix(商品规格): 添加内联错误提示,优化规格值验证逻辑 2025-09-15 16:04:48 +09:00
misworga831
66c4676493 fix(商品规格): 更新规格值提示信息,增加用户操作指导 2025-09-12 22:35:03 +09:00
misworga831
f8747b5d5d fix(商品操作): 优化模板和方法中的代码格式,提升可读性 2025-09-12 22:19:38 +09:00
misworga831
0eb58d4b8a fix(商品规格): 修复规格值编辑逻辑,避免对未定义索引的访问 2025-09-11 19:52:35 +09:00
pikachu1995@126.com
7b30ea343f feat(商品管理): 添加商品复制功能并优化批量操作
- 在商品操作页面添加复制商品功能,通过copyId参数区分复制操作
- 复制商品时自动清除原商品ID确保提交为新商品
- 优化批量操作按钮功能,包括上架、下架、删除和设置物流模板
- 移除未使用的批量规格更新功能
- 调整商品列表操作按钮布局,将复制功能加入操作列
2025-09-09 17:04:58 +08:00
pikachu1995@126.com
7db8484a7c feat(售后订单): 添加售后数量统计功能并显示在标签页
- 在manager和seller端添加获取售后数量统计的API接口
- 修改售后订单页面,显示各状态对应的数量统计
- 新增计算属性serviceStatusWithCount动态生成带数量的标签页
- 在初始化、搜索和状态切换时调用统计接口更新数据
2025-08-29 11:36:45 +08:00
pikachu1995@126.com
78b058009b feat(订单/商品): 添加数量统计功能并优化列表展示
- 在订单和商品管理页面添加数量统计功能
- 优化订单和商品列表的筛选和展示样式
- 统一API接口参数传递方式
- 移除重复代码和无用代码
2025-08-29 09:40:36 +08:00
pikachu1995@126.com
05abad3905 feat(会员管理): 新增会员ID搜索和头像显示功能
refactor(订单管理): 移除表格边框并优化分页选项

feat(售后订单): 添加关键字搜索字段并移除二维码功能

feat(商品管理): 新增批量操作和审核功能,优化商品列表展示

style: 移除多余的margin-top样式
2025-08-27 16:15:11 +08:00
pikachu1995@126.com
ad178b1806 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2025-08-27 10:12:05 +08:00
pikachu1995@126.com
075c20ae41 feat(订单列表): 新增搜索字段和支付方式筛选功能
- 添加关键字、商品名称、收货人和支付方式搜索字段
- 增加支付方式显示列和筛选功能
- 调整默认分页大小为20并增加100条选项
- 优化订单状态筛选逻辑
2025-08-27 10:11:40 +08:00
Ryan Ran
56420bd4d0 feat: 添加pageClientType属性以支持页面类型设置
在`renovation.vue`文件中,新增`pageClientType`属性并设置为'PC',以便于在页面数据中区分客户端类型,提升页面功能的灵活性。
2025-08-26 10:40:19 +08:00
pikachu1995@126.com
a18fc729c0 style(oss-manage): 调整表单元素宽度并优化布局结构
将日期选择器和输入框的宽度从200px统一调整为240px,提升表单元素的一致性
拆分操作区域到单独的Card组件中,改善页面布局结构
2025-08-21 16:41:46 +08:00
pikachu1995@126.com
099941a54e style: 统一输入框和选择器宽度为240px并优化卡片布局
- 将多处输入框和选择器的宽度从200px调整为240px
- 优化卡片布局结构,添加分割卡片提升可读性
- 移除部分冗余的刷新按钮和样式代码
- 调整日期选择器等表单元素的宽度为240px
2025-08-21 16:41:27 +08:00
Ryan Ran
3867d51d92 fix: 移除管理端会员列表,回收站username字段,优化成员列表组件的属性结构 2025-08-13 18:18:41 +08:00
Ryan Ran
f1be18b7e3 添加vue-virtual-scroller依赖并在消息视图中实现虚拟滚动功能,以优化对话列表的渲染性能。同时,为managerseller项目添加minimatch依赖项的解析版本以解决潜在的版本冲突。 2025-07-15 16:16:42 +08:00
Ryan Ran
ef46380f9e 添加minimatch依赖项的解析版本以解决潜在的版本冲突 2025-07-04 17:16:47 +08:00
chc
d711273cf0 商品发布参数项校验无法some问题 2025-03-12 10:28:59 +08:00
chc
5e7cf2d679 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2025-03-11 19:09:39 +08:00
chc
11319ba21f 分类参数必填校验 2025-03-11 19:09:05 +08:00
Chopper711
b4a706820e ### feat: 优化优惠折扣输入组件 (master)
- 将`Input`组件替换为`InputNumber`组件,以确保输入的优惠折扣
  在0.1到9.9之间,并支持一位小数。
- 在`full-discount-add.vue`和`full-discount-detail.vue`文件中,
  更新了`FormItem`组件的`优惠折扣`输入逻辑。
- 在`coupon-publish.vue`文件中,更新了描述文本以强调输入
  范围和格式。
- 在`coupon.vue`文件中,修复了优惠券类型判断逻辑,增加了
  "DISCOUNT"类型和未知类型的处理。
2025-02-21 17:34:58 +08:00
Chopper711
376a3223dc fix: 优化积分商品添加页面和对账单详情页面的功能 (master)
- 移除积分商品添加页面的冗余标题
- 将兑换时间选择器替换为活动时间范围选择器
- 简化验证规则,使用rangeTime替代单独的开始和结束时间
- 调整批量删除按钮和其他按钮的样式格式
- 在对账单详情页面添加删除消息提示框功能
2025-02-21 16:09:14 +08:00
Chopper711
a85ec69549 fix: 消息提示框以及消息点击查看后需要标记已读按钮优化 2025-02-20 15:48:19 +08:00
Chopper711
ebf4d6d3eb Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui 2025-02-20 14:57:21 +08:00
Chopper711
2ccd8265b9 fix: 消息提示框以及消息点击查看后需要标记已读按钮优化 2025-02-20 14:52:53 +08:00
chc
fb1671d062 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2025-02-17 13:41:42 +08:00
chc
95e37df2ec 电子面单物流选中错误问题 2025-02-17 13:41:05 +08:00
pikachu1995@126.com
cfde72f1ab Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2025-02-11 15:43:20 +08:00
pikachu1995@126.com
efc778acbc 微信支付配置,添加配置使用公钥还是证书 2025-02-11 15:43:09 +08:00
misworga831
37384ebadd fix: 优化商品编辑 2025-01-21 13:53:07 +08:00
misworga831
9a7aee7e97 fix: 优化商品编辑 2025-01-20 18:43:21 +08:00
chc
1a56534d28 提现设置增加校验 2025-01-20 18:12:41 +08:00
chc
79e7e5f087 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2025-01-17 17:42:58 +08:00
chc
aea03cf975 支付设置选中状态错误问题 2025-01-17 17:42:49 +08:00
pikachu1995@126.com
8ef6f944dc 微信支付配置,添加微信支付公钥 2025-01-08 16:14:14 +08:00
pikachu1995@126.com
e18d243961 优化微信支付配置,不读取密钥文件,改成读配置文件 2024-12-27 11:01:53 +08:00
chc
765b633cea Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2024-12-25 10:35:50 +08:00
chc
9c402a3878 1.查看物流信息
2.直播图片选择器修改
3.管理端隐藏会员详情
2024-12-25 10:35:40 +08:00
Chopper711
86426b087a feat: 使用InputNumber组件替换折扣输入框 (master)
在coupon-publish.vue中,将折扣输入框从Input组件更改为
InputNumber组件,以便更好地控制折扣值的输入范围。
2024-12-23 11:51:05 +08:00
chc
c5aaa2f3e2 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2024-12-02 18:05:51 +08:00
chc
cc59bb6094 售后实际退款金额显示错误问题 2024-12-02 18:05:43 +08:00
Ryan Ran
5662da1210 fix: 修改商家端分销商品列表点击链接商品不展示问题 2024-11-25 10:43:49 +08:00
Ryan Ran
863725d3ba 优化管理端活动楼层装修 2024-11-11 15:23:32 +08:00
Yer11214
b1acfbdd4b !40 修复了行政地区切换验证状态没更新的问题
Merge pull request !40 from 孟锴/feature/mengkai-master-branch
2024-10-14 07:34:03 +00:00
mengkai
001f9c3f30 修复了行政地区切换验证状态没更新的问题 2024-10-14 11:26:26 +08:00
Yer11214
8d4df4b66e Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2024-10-07 22:26:15 +08:00
Yer11214
604447508a fix: oss选择图片不展示报错bug 2024-10-07 22:26:13 +08:00
misworga831
6f30949620 fix: 移动端楼层装修促销活动移除优惠券.pc端楼层装修快捷导航外部链接无法填写问题 2024-09-23 21:18:27 +08:00
chc
10e8e82fe4 增加部分发货状态 2024-09-18 15:25:04 +08:00
254 changed files with 5595 additions and 9940 deletions

View File

@@ -1,16 +1,12 @@
## Lilishop B2B2C商城系统
#### 欢迎交流需求,交流业务,交流技术(基础问题自行解决,其他问题先看文档后提问)
#### 不用削尖脑袋往老群里加,老群活跃度较低,很多潜水党,新群相对而言活跃一些 :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606: :tw-1f606:
#### PS **演示站点所有环境均部署master分支。如果有演示站点问题可以反馈如果演示站点没问题本地运行有问题需自行处理**
##### 交流 qq 1群 961316482已满
##### 交流 qq 2群 875294241(已满)
##### 交流 qq 3群 263785057已满
##### 交流 qq 4群 674617534 (已满)
##### 交流 qq 5群 594675235
- **[在线客服](https://work.weixin.qq.com/kfid/kfc4d8dc24a73c15f44)**
- **微信交流1群(已满)**
- **微信交流2群**:
![微信群](https://lilishop-wechat.oss-cn-beijing.aliyuncs.com/wechat.jpg)
##### 体验 公众号/小程序/APP 体验,扫描二维码
@@ -19,6 +15,41 @@
[![star](https://gitee.com/beijing_hongye_huicheng/lilishop/badge/star.svg?theme=dark)](https://gitee.com/beijing_hongye_huicheng/lilishop/stargazers)
  ![github](https://img.shields.io/github/stars/hongyehuicheng/lilishop.svg?style=social&logo=#181717)
## 2025-10-10日更新
兼容更高的node版本16
这里我用的是node版本 v16.20.2
npm版本 8.19.4
使用yarn install 然后执行 yarn dev
yarn 安装/启动
```
// 如果没有 yarn 安装yarn
npm install yarn -g
// 切换源
yarn config set registry https://registry.npmmirror.com
// 以buyer项目为例
cd buyer
yarn install
yarn dev
```
没有二开过的项目直接拉最新代码即可,二开项目可以跟着提交记录一起同步修改 install出现问题检查的话删除 "package-lock.json" 重新install
Q&A 为什么不升级更高的node版本 :因为高node版本 OpenSSL 改动 导致旧版本 Webpack 插件会失效 试了好几次如果兼容的话 需要升级Webpack5以及其他的插件 升级内容较多 为了更稳定的还是尽量少动为主
****
## 如何在本地环境运行lilishop-ui部署视频
https://www.bilibili.com/video/BV1B28EeJEnP/
@@ -29,8 +60,11 @@ https://www.bilibili.com/video/BV1WD87eoE9F/
## 开发项目
#### 安装Node.js
保证`node`版本`14`,推荐 14.17.0
2025-10-10日拉的代码之后不限制于node版本为14这里只是以14版本为例子
可以使用 `yarn` 或者 `npm` 进行安装
#### yarn 安装/启动
@@ -49,17 +83,6 @@ yarn install
yarn dev
```
#### npm 安装/启动
```
npm config set registry https://registry.npmmirror.com
// 以buyer项目为例
cd buyer
npm run install
npm run dev
```
#### FAQ
@@ -223,19 +246,9 @@ PS手机验证码为 111111
4.限制商用如果需要商业使用请联系我们。QQ3409056806.或者加入qq群联系群主。
### 交流群
##### 交流 qq 1群 961316482已满
##### 交流 qq 2群 875294241已满
##### 交流 qq 3群 263785057已满
##### 交流 qq 4群 674617534已满
##### 交流 qq 5群 594675235
### 附录
有人有自己的学习视频、学习记录文档、希望宣传关联开源项目等均可以私聊仓库所有者。
类似:
清晨敲代码同学的分析: https://blog.csdn.net/vaevaevae233/category_12103567.html
清晨敲代码同学的分析: https://blog.csdn.net/vaevaevae233/category_12103567.html

1
buyer/.npmrc Normal file
View File

@@ -0,0 +1 @@
engine-strict=false

1
buyer/.yarnrc Normal file
View File

@@ -0,0 +1 @@
--ignore-engines true

View File

@@ -1,19 +0,0 @@
# new
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@@ -3,9 +3,12 @@
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
"build": "vue-cli-service build",
"dev": "vue-cli-service serve"
},
"engines": {
"node": ">=14"
},
"dependencies": {
"@amap/amap-jsapi-loader": "0.0.7",
@@ -15,11 +18,10 @@
"less": "^2.7.0",
"less-loader": "^5.0.0",
"mv-count-down": "^0.1.15",
"node-sass": "^4.14.1",
"postcss-loader": "^7.0.1",
"sass": "^1.63.6",
"postcss-loader": "^4.3.0",
"psl": "^1.8.0",
"qs": "^6.9.4",
"sass-loader": "^7.3.1",
"uuid": "^8.3.2",
"view-design": "^4.3.2",
"vue": "^2.6.11",
@@ -32,7 +34,7 @@
"devDependencies": {
"@vue/cli-service": "~4.5.0",
"compression-webpack-plugin": "^5.0.0",
"sass-loader": "^7.3.1",
"sass-loader": "^10.4.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"vue-template-compiler": "^2.6.11"
},
@@ -40,5 +42,10 @@
"> 1%",
"last 2 versions",
"not dead"
]
],
"resolutions": {
"minimatch": "^3.1.2",
"node-sass": "npm:sass@^1.63.6",
"@achrinza/node-ipc": "9.2.2"
}
}

View File

@@ -10,12 +10,10 @@ import { getBaseSite } from "@/api/common.js";
export default {
name: "App",
mounted() {
this.init();
},
methods:{
init(){
if(!storage.getItem("siteName")||!storage.getItem("logoImg")||!storage.getItem("sitelogo_expiration_time")) {
this.getSite();
}else{
@@ -35,7 +33,6 @@ export default {
}
},
getSite(){
//获取基本站点信息
getBaseSite().then((res) => {

View File

@@ -10,19 +10,6 @@ export function getVerifyImg (verificationEnums) {
needToken: false
});
}
export function getImSetting(params) {
return request({
url: `/buyer/other/setting/get/IM_SETTING`,
method: Method.GET,
needToken: true,
params,
});
}
/**
* 验证码校验
*/

View File

@@ -527,44 +527,3 @@ export function getGoodsDistribution (distributionId) {
needToken: true
});
}
/**
* 获取会员发票抬头列表
*/
export function getMemberReceiptList (params) {
return request({
url: `/buyer/wallet/receipt`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 保存会员发票抬头
*/
export function setMemberReceiptList (params) {
return request({
url: `/buyer/wallet/receipt`,
method: Method.POST,
needToken: true,
data:params
});
}
/**
* 保存会员发票抬头
*/
export function delMemberReceipt(id) {
return request({
url: `/buyer/wallet/receipt/${id}`,
method: Method.DELETE,
needToken: true,
params:{id},
headers: {
"Content-Type": "application/x-www-form-urlencoded",
}
});
}

View File

@@ -173,7 +173,7 @@ export default {
border-radius: 18.9px;
/deep/ .ivu-input.ivu-input-large {
::v-deep .ivu-input.ivu-input-large {
border: 1.4px solid $theme_color;
box-sizing: border-box;
border-radius: 19.6px;
@@ -188,7 +188,7 @@ export default {
}
}
/deep/ .ivu-input-group-append {
::v-deep .ivu-input-group-append {
border-radius: 19.6px !important;
cursor: pointer;
box-sizing: border-box;

View File

@@ -113,12 +113,12 @@ export default {
}
}
/deep/ .ivu-card, .ivu-card-head, ._Card {
::v-deep .ivu-card, .ivu-card-head, ._Card {
margin-bottom: 20px;
@include white_background_color();
}
/deep/ .ivu-card-head {
::v-deep .ivu-card-head {
position: relative;
padding: 0 14px;
height: 50px;
@@ -140,7 +140,7 @@ export default {
cursor: pointer;
}
/deep/ .ivu-card-body {
::v-deep .ivu-card-body {
padding: 0 !important;
display: none;
}

View File

@@ -147,11 +147,11 @@ export default {
justify-content: center;
flex-direction: column;
}
/deep/.popup .ivu-drawer-body{
::v-deep.popup .ivu-drawer-body{
padding: 0!important;
background-color: #eee;
}
/deep/.popup .ivu-drawer-wrap{
::v-deep.popup .ivu-drawer-wrap{
z-index: 3001;
}
</style>

View File

@@ -326,7 +326,7 @@ export default {
.item-intro-img {
width: 100%;
min-height: 300px;
/deep/ img{
::v-deep img{
margin:0 auto;
}
}
@@ -472,7 +472,7 @@ export default {
.ivu-tabs-ink-bar {
background-color: $theme_color !important;
}
/deep/.ivu-tabs-bar{
::v-deep.ivu-tabs-bar{
border: none;
}
.item-tabs > .ivu-tabs > .ivu-tabs-bar .ivu-tabs-tab{

View File

@@ -81,7 +81,10 @@
</DropdownMenu>
</Dropdown>
</li>
<li>
<span class="nav-item" @click="shopEntry">店铺入驻</span>
</li>
</ul>
</div>
</div>
@@ -159,6 +162,18 @@ export default {
});
}
},
shopEntry() {
// 店铺入驻
if (storage.getItem('accessToken')) {
let routeUrl = this.$router.resolve({
path: '/shopEntry',
query: {id: 1}
});
window.open(routeUrl.href, '_blank');
} else {
this.$router.push('login');
}
},
getCartList() {
// 获取购物车列表
if (this.userInfo.username) {

View File

@@ -95,7 +95,11 @@ export default {
label: "宝贝收藏",
path: "/home/Favorites"
},
{
icon: "shop",
label: "收藏店铺",
path: "/home/Favorites?type=STORE"
},
{
icon: "carts",
label: "购物车",

View File

@@ -84,10 +84,10 @@ export default {
border-top: 1.4px solid #e2e2e2;
}
&:hover {
/deep/ .goods-name {
::v-deep .goods-name {
color: $theme_color;
}
/deep/ .goods-desc {
::v-deep .goods-desc {
color: $theme_color;
}
}

View File

@@ -6,11 +6,11 @@
</p>
<!-- 普通发票 -->
<div class="nav-content">
<Form :model="invoiceForm" ref="form" label-position="left" :label-width="110">
<Form :model="invoiceForm" ref="form" label-position="left" :rules="ruleInline" :label-width="110">
<FormItem label="发票类型">
<RadioGroup v-model="invoice" type="button" button-style="solid">
<Radio @on-change="changeInvoice" :label="1">电子普通发票</Radio>
<Radio :label="2" >增值税专用发票</Radio>
<Radio :label="2" :disabled="true">增值税专用发票</Radio>
</RadioGroup>
</FormItem>
<FormItem label="发票抬头">
@@ -24,46 +24,10 @@
</FormItem>
<FormItem label="单位名称" v-if="type === 2" prop="receiptTitle">
<i-input v-model="invoiceForm.receiptTitle"></i-input>
<Poptip ref="poptip" placement="right" width="300">
<div class="global_color">选择其他发票抬头</div>
<div slot="content">
<Spin fix v-if="delReceiptLoad"></Spin>
<div class="receipt-content">
<div class="flex receipt-item" v-for="item in receiptList" :key="item.id" >
<div @click="chooseReceipt(item)">
<div class="receipt-title">{{ item.receiptTitle }}</div>
<div>{{ item.taxpayerId }}</div>
</div>
<div class="global_color" @click="delReceipt(item.id)">
删除
</div>
</div>
</div>
<div style="text-align: right;">
<Page :total="total" @on-change="changePage"
:current="searchParams.pageNumber" :page-size="searchParams.pageSize" size="small" />
</div>
</div>
</Poptip>
</FormItem>
<FormItem label="纳税人识别号" v-if="type === 2" prop="taxpayerId">
<i-input v-model="invoiceForm.taxpayerId"></i-input>
</FormItem>
<div v-if="type === 2" class="more" @click="showMore = !showMore">更多选填项</div>
<div v-if="showMore">
<FormItem label="单位地址" v-if="type === 2" prop="address">
<i-input v-model="invoiceForm.address"></i-input>
</FormItem>
<FormItem label="单位电话" v-if="type === 2" prop="mobile">
<i-input v-model="invoiceForm.mobile"></i-input>
</FormItem>
<FormItem label="开户银行" v-if="type === 2" prop="bank">
<i-input v-model="invoiceForm.bank"></i-input>
</FormItem>
<FormItem label="银行账号" v-if="type === 2" prop="bankNumber">
<i-input v-model="invoiceForm.bankNumber"></i-input>
</FormItem>
</div>
<FormItem label="发票内容">
<RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
<Radio label="商品明细">商品明细</Radio>
@@ -72,10 +36,8 @@
</FormItem>
</Form>
<div style="text-align: center">
<Button type="primary" class="mr_10" :loading="loading" @click="submit">保存发票信息</Button>
<Button type="default" @click="invoiceAvailable = false">取消</Button>
<Button type="primary" :loading="loading" @click="submit">保存发票信息</Button>
<Button type="default" @click="invoiceAvailable = false">取消</Button>
</div>
</div>
</Modal>
@@ -83,15 +45,11 @@
</template>
<script>
import { receiptSelect } from '@/api/cart.js';
import { getMemberReceiptList ,setMemberReceiptList,delMemberReceipt } from '@/api/member.js';
import { TINumber } from '@/plugins/RegExp.js';
export default {
name: 'invoiceModal',
data () {
return {
receiptList:[],
showMore:false,
delReceiptLoad:false,
invoice: 1, // 发票类型
invoiceAvailable: false, // 模态框显隐
loading: false, // 提交状态
@@ -101,36 +59,17 @@ export default {
taxpayerId: '', // 纳税人识别号
receiptContent: '商品明细' // 发票内容
},
isDefault:false,
type: 1, // 1 个人 2 单位
searchParams:{
pageNumber:1,
pageSize:5
},
total:0,
ruleInline: {
taxpayerId: [
{ required: true, message: '请填写纳税人识别号' },
{ pattern: TINumber, message: '请填写正确的纳税人识别号' }
]
}
};
},
props: ['invoiceData'],
watch: {
type(val){
if(val === 2 && !this.invoiceForm.receiptTitle){
// 查找默认的发票抬头
const defaultValue = this.receiptList.find(item => item.isDefault === 1)
if(!defaultValue){
this.invoiceForm.receiptTitle = this.receiptList[0].receiptTitle
this.invoiceForm.taxpayerId = this.receiptList[0].taxpayerId
}else{
this.invoiceForm.receiptTitle = defaultValue.receiptTitle
this.invoiceForm.taxpayerId = defaultValue.taxpayerId
}
}
},
invoiceAvailable(val){
if(val){
this.getReceiptList()
}
},
// 回显的发票信息
invoiceData: {
handler (val) {
@@ -146,40 +85,7 @@ export default {
immeadite: true
}
},
mounted () {
this.getReceiptList()
},
methods: {
changePage(v){
this.searchParams.pageNumber = v;
this.getReceiptList();
},
getReceiptList () { // 获取抬头列表
getMemberReceiptList(this.searchParams).then(res => {
if (res.success) {
const list = res.result.records;
this.receiptList = list;
this.total = res.result.total
}
})
},
async delReceipt(id){
try {
this.delReceiptLoad = true
const res = await delMemberReceipt(id)
this.delReceiptLoad = false
if(res.success){
if(this.searchParams.pageNumber !==1 && this.total - 1 < this.searchParams.pageNumber * this.searchParams.pageSize){
this.searchParams.pageNumber = this.searchParams.pageNumber - 1
}
this.$Message.success('删除成功')
this.getReceiptList()
}
} catch (error) {
this.delReceiptLoad = false
}
},
/**
* 选择发票抬头
*/
@@ -188,16 +94,12 @@ export default {
this.type = val;
});
},
chooseReceipt(val){
this.$refs.poptip.visible = false
this.invoiceForm.receiptTitle = val.receiptTitle
this.invoiceForm.taxpayerId = val.taxpayerId
},
/**
* 保存判断
*/
save () {
let flag = true;
let flage = true;
// 保存分为两种类型,个人以及企业
const { receiptTitle } = JSON.parse(
@@ -206,35 +108,31 @@ export default {
// 判断是否填写发票抬头
if (!receiptTitle) {
this.$Message.error('请填写发票抬头!');
flag = false;
flage = false;
return false;
}
if (this.type === 2) {
this.$refs.form.validate((valid) => {
if (!valid) {
flag = false;
flage = false;
}
});
} else {
delete this.invoiceForm.taxpayerId;
}
return flag;
return flage;
},
// 保存发票信息
async submit () {
if (this.save()) {
this.loading = true;
let submit = {
way: this.$route.query.way,
...this.invoiceForm
};
// 存储到发票列表中
await setMemberReceiptList({...submit,isDefault:this.isDefault ? 1 : 0})
this.loading = true;
let receipt = await receiptSelect(submit);
if (receipt.success) {
this.$emit('change', true);
}
@@ -258,33 +156,9 @@ export default {
color: $theme_color;
}
}
.global_color{
cursor: pointer;
}
.receipt-item{
justify-content: space-between;
align-items: center;
padding:8px 16px;
cursor: pointer;
line-height: 1.5;
border-bottom: 1px solid #ededed;
}
.receipt-content{
height: 280px;
}
.nav-content {
width: 500px;
margin: 10px auto;
}
.more{
text-align: center;
color: $theme_color;
margin-bottom: 20px;
cursor: pointer;
}
/deep/ .ivu-input{
width: 280px !important;
}
</style>

View File

@@ -3,7 +3,7 @@
</template>
<script>
import { getIMDetail ,getImSetting} from "@/api/common";
import { getIMDetail } from "@/api/common";
import Storage from "@/plugins/storage";
import { getMemberMsg } from "@/api/login";
export default {
@@ -40,15 +40,9 @@ export default {
},
// 获取im信息
async getIMDetailMethods() {
// 获取pc im
// let res = await getImSetting();
// if (res.success) {
// this.IMLink = res.result.qrCode
// }
let res = await getImSetting();
let res = await getIMDetail();
if (res.success) {
window.open(res.result.url);
// this.IMLink = res.result.qrCode;
this.IMLink = res.result;
}
},
},

View File

@@ -57,6 +57,15 @@
:key="index"
>
<div class="shop-name">
<div>
<Checkbox
v-model="shop.checked"
@on-change="changeChecked(shop.checked, 'shop', shop.storeId)"
></Checkbox>
<span class="go-shop-page" @click="goShopPage(shop.storeId)">{{
shop.storeName
}}</span>
</div>
<span
class="shop-coupon"
v-if="shop.couponList.length"
@@ -537,6 +546,90 @@ export default {
padding-top: 100px;
}
&-items {
.shop-name {
height: 50px;
display: flex;
align-items: center;
padding: 0 20px;
position: relative;
@include title_color($light_title_color);
> * {
width: 50%;
}
.go-shop-page:hover {
color: $theme_color;
cursor: pointer;
}
.customer-service {
margin-left: 5px;
color: #fcc217;
cursor: pointer;
&:hover {
color: $theme_color;
}
}
/** 优惠券 */
.shop-coupon {
width: 80px;
height: 24px;
position: relative;
background: url(../assets/images/cart-coupon-icons02.png) 0 0 no-repeat;
> div {
position: absolute;
top: 35px;
left: 0;
width: 300px;
height: 300px;
background-color: #fff;
border: 1px solid $theme_color;
// border-radius: 3px;
z-index: 1;
padding: 10px 20px;
&::before {
content: "";
display: block;
background: url(../assets/images/cart-coupon-icons02.png) 0 -58px no-repeat;
width: 80px;
height: 12px;
position: absolute;
top: -12px;
left: 0;
}
.coupon-item {
margin-bottom: 10px;
span:nth-child(1) {
border: 1px solid #e33937;
display: inline-block;
padding: 3px 10px;
color: $theme_color;
border-radius: 3px;
}
span:nth-child(2) {
font-size: 12px;
margin-left: 5px;
color: #999;
}
.coupon-btn {
height: 26px;
float: right;
font-size: 12px;
}
&::after {
display: block;
content: "";
clear: right;
}
}
}
}
.promotion-notice {
text-align: right;
font-size: 12px;
}
.shop-coupon-show {
background-position-y: -34px;
}
}
.goods-item {
position: relative;
@extend .cart-goods-title;

View File

@@ -12,8 +12,15 @@
</Breadcrumb>
<div class="store-collect" v-if="!takeDownSale">
<span class="mr_10" v-if="goodsMsg.data">
<router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{
goodsMsg.data.storeName
}}</router-link>
</span>
<span class="ml_10" @click="getIMDetailMethods()">联系客服</span>
<span @click="collect">
<Icon type="ios-heart" :color="storeCollected ? '#ed3f14' : '#666'" />
{{ storeCollected? "已收藏店铺": "收藏店铺" }}
</span>
<span class="ml_10" @click="IMService(goodsMsg.data.storeId,goodsMsg.data.goodsId,goodsMsg.data.id)">联系客服</span>
</div>
</div>
</div>
@@ -29,12 +36,6 @@
<Button size="small" @click="target('goodsList')">返回商品列表</Button>
</div>
</empty>
<Modal title="扫码联系客服" hide-footer v-model="showQrCode">
<div class="img">
<img :src="IMLink" alt="">
</div>
</Modal>
<Spin size="large" fix v-if="isLoading"></Spin>
<BaseFooter></BaseFooter>
</div>
@@ -67,19 +68,16 @@ export default {
mixins: [imTalk],
data () {
return {
showQrCode:false,
goodsMsg: {}, // 商品信息
isLoading: false, // 加载状态
categoryBar: [], // 分类
storeCollected: false, // 商品收藏
storeMsg: {}, // 店铺信息
takeDownSale:false, // 是否下架
IMLink:"",
// qrCode:""
};
},
methods: {
// 跳转首页或商品页面
target(url){
this.$router.push({path: url})
@@ -232,11 +230,4 @@ export default {
margin:10px 0
}
.img{
text-align: center;
>img{
width: 200px;
height: 200px;
}
}
</style>

View File

@@ -74,6 +74,12 @@
已有<span>{{ item.commentNum || 0 }}</span
>人评价
</div>
<div class="goods-show-seller">
<span class="text-bottom" style="color: #e4393c">{{
item.storeName
}}</span>
</div>
<div class="goods-show-right">
<Tag
class="goods-show-tag"

View File

@@ -17,6 +17,10 @@ export const orderStatusList = [
name: '待发货',
status: 'UNDELIVERED'
},
{
name: '部分发货',
status: 'PARTS_DELIVERED'
},
{
name: '已发货',
status: 'DELIVERED'

View File

@@ -20,7 +20,7 @@
</template>
<script>
import { getPwdStatus } from '@/api/account';
// import { getPwdStatus } from '@/api/account';
export default {
name: 'AccountSafe',
data () {
@@ -40,21 +40,21 @@ export default {
this.$router.push({name: 'ModifyPwd', query: { status: 1 }})
},
// 获取密码状态
getPwdStatus () {
getPwdStatus().then(res => {
if (res) {
this.pwdStatus = '修改密码'
} else {
this.pwdStatus = '设置密码'
}
});
}
// getPwdStatus () {
// getPwdStatus().then(res => {
// if (res) {
// this.pwdStatus = '修改密码'
// } else {
// this.pwdStatus = '设置密码'
// }
// });
// }
}
}
</script>
<style scoped lang="scss">
/deep/ .ivu-col-span-2, .ivu-col-span-4 {
::v-deep .ivu-col-span-2, .ivu-col-span-4 {
text-align: center;
color: $theme_color;
}
@@ -71,7 +71,7 @@ export default {
border-bottom: 1px solid $border_color;
padding: 16px 0;
/deep/ .ivu-col {
::v-deep .ivu-col {
padding: 8px 0;
}

View File

@@ -41,7 +41,7 @@
</tr>
</table>
<!-- <Alert class="l_title" show-icon type="warning">商家申诉信息</Alert>
<Alert class="l_title" show-icon type="warning">商家申诉信息</Alert>
<table cellspacing="0" cellpadding='0' border="1">
<tr>
<td>申诉时间</td>
@@ -68,7 +68,7 @@
</div>
</td>
</tr>
</table> -->
</table>
<Alert class="l_title" show-icon type="warning">平台仲裁</Alert>
<table cellspacing="0" cellpadding='0' border="1">

View File

@@ -584,7 +584,7 @@ export default {
margin-left: 25px;
margin-top: 5px
}
/deep/ .ivu-alert-message {
::v-deep .ivu-alert-message {
p {
margin: 4px 0;
}

View File

@@ -16,6 +16,7 @@
{{ item.goodsName }}
</div>
<div v-else class="goodsTitle hover-pointer" @click="buynow(item.skuId, item.goodsId,item.id)" >
{{ item.storeName }}
<Tag color="error" class="operated" v-if="item.selfOperated">商家自营</Tag>
</div>
<div class="goodsPrice">

View File

@@ -42,8 +42,10 @@
</div>
</div>
</div>
<div class="btns">
<div>
<span @click="shopPage(order.shopId)">{{ order.storeName }}</span>
</div>
<div>
<!-- 订单基础操作 -->
<Button @click="goDetail(order.sn)" type="info" size="small">售后详情</Button>
<Button @click="openModal(order)"
@@ -182,7 +184,14 @@ export default {
});
window.open(routeUrl.href, '_blank');
},
// 跳转店铺首页
shopPage(id) {
let routeUrl = this.$router.resolve({
path: '/Merchant',
query: {id: id}
});
window.open(routeUrl.href, '_blank');
},
getList() { // 获取售后列表
this.spinShow = true;
let params = JSON.parse(JSON.stringify(this.params))
@@ -354,10 +363,4 @@ export default {
.modal-goods {
padding: 5px;
}
.btns{
>*{
margin: 4px 0;
}
}
</style>

View File

@@ -13,7 +13,15 @@
<p class="global_color fontsize_18">{{ afterSale.orderStatusValue }}</p>
<p>售后单号:{{ afterSale.sn }} &nbsp;&nbsp;&nbsp;订单号:{{afterSale.orderSn}}</p>
<div style="color:#999;" class="operation-time">创建时间:{{afterSale.createTime}}</div>
<div class="service-after">
<div>
本次售后服务由<span>{{afterSale.storeName}}</span>为您提供
</div>
<div>
<img :src="afterSale.goodsImage" alt="" width="60" height="60">
<span>{{afterSale.goodsName}}</span>
</div>
</div>
</div>
<div class="order-card">
<h3>售后进程</h3>

View File

@@ -59,8 +59,10 @@
</div>
</div>
</div>
<div class="btns">
<div>
<span @click="shopPage(order.storeId)">{{ order.storeName }}</span>
</div>
<div>
<!-- 订单基础操作 -->
<Button @click="orderDetail(order.sn)" type="info" size="small">订单详情</Button>
<Button @click="handleCancelOrder(order.sn)" type="error" v-if="order.allowOperationVO.cancel" size="small">取消订单</Button>
@@ -193,7 +195,14 @@ export default {
}
this.getList()
},
// 跳转店铺首页
shopPage (id) {
let routeUrl = this.$router.resolve({
path: '/Merchant',
query: { id: id }
});
window.open(routeUrl.href, '_blank');
},
orderDetail (sn) {
// 跳转订单详情
this.$router.push({ name: 'OrderDetail', query: {sn} });
@@ -382,9 +391,4 @@ export default {
}
}
}
.btns{
>*{
margin: 4px 0;
}
}
</style>

View File

@@ -106,7 +106,9 @@
</div>
<!-- 订单商品 -->
<div class="goods">
<div class="shop-name">
<span @click="shopPage(order.order.storeId)">{{order.order.storeName}}</span>
</div>
<table>
<thead>
<tr>
@@ -486,6 +488,24 @@ export default {
top: 20px;
}
}
/** 店铺名称 */
.shop-name {
margin: 15px 0;
span {
color: #438cde;
cursor: pointer;
&:hover {
color: $theme_color;
}
}
.ivu-icon {
color: #ff8f23;
cursor: pointer;
&:hover {
color: $theme_color;
}
}
}
/** 商品列表 */
table {
border: 1px solid #ddd;
@@ -584,22 +604,21 @@ table {
.layui-layer-wrap > .div-express-log {
max-height: 300px;
}
/deep/ .layui-layer-wrap > .div-express-log::-webkit-scrollbar{
::v-deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar{
width: 1px;
height: 5px;
}
/deep/ .layui-layer-wrap > .div-express-log::-webkit-scrollbar-thumb{
::v-deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar-thumb{
border-radius: 1em;
background-color: rgba(50,50,50,.3);
}
/deep/ .layui-layer-wrap > .div-express-log::-webkit-scrollbar-track{
::v-deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar-track{
border-radius: 1em;
background-color: rgba(50,50,50,.1);
}
.div-express-log {
max-height: 300px;
border: solid 1px #e7e7e7;
background: #fafafa;
overflow-y: auto;

View File

@@ -115,7 +115,13 @@
</div>
<div class="goods-msg" v-for="(shop, shopIndex) in goodsList" :key="shopIndex">
<div v-if="shop.checked">
<div class="shop-name">
<span>
<span class="hover-color" @click="goShopPage(shop.storeId)">{{
shop.storeName
}}</span>&nbsp;&nbsp;
</span>
</div>
<div class="goods-list">
<div class="goods-item" v-for="(goods, goodsIndex) in shop.checkedSkuList" :key="goodsIndex">
<span class="hover-color" @click="
@@ -884,6 +890,53 @@ export default {
}
}
/** 购买商品列表 start */
.shop-name {
display: flex;
justify-content: space-between;
>span:nth-child(1) {
font-weight: bold;
.ivu-icon {
color: #ff8f23;
&:hover {
color: $theme_color;
}
}
}
>span:nth-child(2) {
color: #999;
position: relative;
display: flex;
width: 200px;
}
.delivery-list {
position: absolute;
right: 0;
top: 20px;
background-color: #f3fafe;
box-shadow: 0px 0px 5px #b9b2b2;
display: flex;
flex-wrap: wrap;
width: 200px;
min-height: 100px;
padding: 10px;
li {
width: 90px;
height: 30px;
text-align: center;
&:hover {
cursor: pointer;
}
}
}
}
.goods-list {
width: 1150px;

View File

@@ -32,7 +32,9 @@
已有<span>{{ item.commentNum || 0 }}</span
>人评价
</div>
<div class="goods-show-seller">
<span>{{ item.storeName }}</span>
</div>
</div>
</div>
<div class="page-size">

View File

@@ -66,7 +66,9 @@
: 100
" />
</div>
<div class="goods-show-seller">
<span>{{ item.storeName }}</span>
</div>
</div>
</div>
<BaseFooter />

View File

@@ -9,7 +9,6 @@ Vue.use(Vuex);
export default new Vuex.Store({
state: {
imQrCode: '',
navList: [], // 首页快捷导航
cartNum: storage.getItem('cartNum') || 0,
logoImg: storage.getItem('logoImg') || require('@/assets/images/logo2.png'),

View File

@@ -70,7 +70,7 @@ module.exports = {
loaderOptions: {
sass: {
data: `@import "@/assets/styles/global.scss";` //全局加载scss
additionalData: `@import "@/assets/styles/global.scss";` //全局加载scss
},
// 向 CSS 相关的 loader 传递选项
less: {

View File

@@ -24,6 +24,7 @@
"vue-cropper": "^0.5.5",
"vue-prism-editor": "^0.5.1",
"vue-router": "^3.4.9",
"vue-virtual-scroller": "^1.1.2",
"vuex": "^3.5.1"
},
"devDependencies": {

View File

@@ -33,6 +33,11 @@ Object.keys(filters).forEach((key) => {
Vue.filter(key, filters[key]);
});
import VueVirtualScroller from 'vue-virtual-scroller'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
Vue.component('RecycleScroller', VueVirtualScroller.RecycleScroller)
// 引入自定义全局css
import '@/assets/css/global.less'

View File

@@ -65,9 +65,14 @@
> -->
</p>
<!-- 对话列表 -->
<template v-if="loadStatus === 1">
<div v-for="(item, index) in userTalkItem" :key="item.id" class="talk-item pointer"
:class="{ active: activeIndex == index }" @click="clickTab(item.userId, item, index)">
<RecycleScroller
:item-size="64"
:items="userTalkItem"
:prerender="10"
v-slot="{ item, index }"
>
<div v-bind:key="item.id" class="talk-item pointer" :class="{ active: activeIndex == index }" @click="clickTab(item.userId, item, index)">
<div class="avatar-box">
<face :text="item.face" v-if="item.face"></face>
<face-null :text="item.name" v-else></face-null>
@@ -79,9 +84,7 @@
<div class="title">
<div class="card-name">
<p class="nickname">
{{
item.remark_name ? item.remark_name : item.name
}}
{{ item.remark_name ? item.remark_name : item.name }}
</p>
<div v-show="item.unread" class="larkc-tag">
{{ item.unread }}条未读
@@ -89,11 +92,9 @@
<div v-show="item.is_top" class="larkc-tag top">
TOP
</div>
<div v-show="item.is_robot" class="larkc-tag top">
BOT
</div>
<div v-show="item.talk_type == 2" class="larkc-tag group">
群组
</div>
@@ -111,9 +112,7 @@
<span v-if="item.lastMessageType === 'ORDER'">[订单链接]</span>
</div>
<div class="content">
<template v-if="
index_name != item.index_name && item.draft_text
">
<template v-if="index_name != item.index_name && item.draft_text">
<span class="draft-color">[草稿]</span>
<span>{{ item.draft_text }}</span>
</template>
@@ -124,13 +123,12 @@
</span>
<span v-else>[群消息]</span>
</template>
<span>{{ item.msg_text }}</span>
</template>
</div>
</div>
</div>
</template>
</RecycleScroller>
</el-main>
</el-scrollbar>
</el-container>
@@ -151,6 +149,8 @@
</div>
</template>
<script>
import { RecycleScroller } from 'vue-virtual-scroller'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
import { mapGetters, mapState } from "vuex";
import MainLayout from "@/views/layout/MainLayout";
import WelcomeModule from "@/components/layout/WelcomeModule";
@@ -179,6 +179,7 @@ export default {
UserSearch,
OtherLink,
WelcomeModule,
RecycleScroller
},
data () {
return {

1
manager/.npmrc Normal file
View File

@@ -0,0 +1 @@
engine-strict=false

1
manager/.yarnrc Normal file
View File

@@ -0,0 +1 @@
--ignore-engines true

View File

@@ -1,29 +1,5 @@
# LILISHOP-UI
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Run your tests
```
npm run test
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
详情点击 [https://cli.vuejs.org/zn/config/](https://cli.vuejs.org/zn/config/).

View File

@@ -9,6 +9,9 @@
"build": "vue-cli-service build",
"dev": "vue-cli-service serve"
},
"engines": {
"node": ">=14"
},
"dependencies": {
"@amap/amap-jsapi-loader": "0.0.7",
"@antv/g2": "^4.1.12",
@@ -16,8 +19,9 @@
"core-js": "^3.6.5",
"dplayer": "^1.26.0",
"js-cookie": "^2.2.1",
"node-sass": "^4.14.1",
"sass-loader": "^8.0.2",
"price-color": "1.0.2",
"sass": "^1.63.6",
"sass-loader": "^10.4.1",
"sockjs-client": "^1.4.0",
"swiper": "^6.3.5",
"uuid": "^8.3.2",
@@ -31,8 +35,7 @@
"vue-router": "^3.1.3",
"vuedraggable": "^2.23.2",
"vuex": "^3.4.0",
"xss": "^1.0.7",
"price-color": "1.0.2"
"xss": "^1.0.7"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.4.4",
@@ -48,5 +51,10 @@
"uglifyjs-webpack-plugin": "^2.2.0",
"vue-cli-plugin-style-resources-loader": "^0.1.4",
"vue-template-compiler": "^2.6.10"
},
"resolutions": {
"minimatch": "^3.1.2",
"node-sass": "npm:sass@^1.63.6",
"@achrinza/node-ipc": "9.2.2"
}
}

View File

@@ -57,15 +57,5 @@ export const auditDistributionCash = (id,params) => {
return postRequest(`/distribution/cash/audit/${id}`, params)
}
// 取消分销商品
export const distributionGoodsCancel = (id) => {
return deleteRequest(`/distribution/goods/cancel/${id}`)
}
// 选择分销商品
export const distributionGoodsCheck = (id,param) => {
return putRequest(`/distribution/goods/checked/${id}`,param)
}

View File

@@ -1,5 +1,5 @@
// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, deleteRequest } from '@/libs/axios';
import { getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios';
// 获取商品品牌分页列表
export const getManagerBrandPage = (params) => {
@@ -7,8 +7,8 @@ export const getManagerBrandPage = (params) => {
}
// 批量删除
export const delBrand = (ids) => {
return deleteRequest(`/goods/brand/delByIds/${ids}`)
export const delBrand = (ids) =>{
return deleteRequest(`/goods/brand/delByIds/${ids}`)
}
@@ -48,12 +48,12 @@ export const getSpecificationList = (params) => {
//获取分类列表数据
export const getAllCategoryList = (parent_id) => {
return getRequest(`/goods/category/${parent_id}/all-children`)
return getRequest(`/goods/category/${parent_id}/all-children`)
}
//获取分类列表数据
export const getCategoryTree = () => {
return getRequest(`/goods/category/allChildren`)
return getRequest(`/goods/category/allChildren`)
}
// 添加商品分类
@@ -83,7 +83,7 @@ export const insertSpec = (params) => {
return postRequest('/goods/spec', params)
}
// 添加或修改规格设置
export const updateSpec = (id, params) => {
export const updateSpec = (id,params) => {
return putRequest(`/goods/spec/${id}`, params)
}
//根据分类id获取关联规格
@@ -101,20 +101,23 @@ export const getGoodsCategory = (parent_id) => {
}
// 上架商品
export const upGoods = (id, params) => {
return putRequest(`/goods/goods/${id}/up`, params)
export const upGoods = (params) => {
return putRequest(`/goods/goods/up`, params)
}
// 下架商品
export const lowGoods = (id, params) => {
return putRequest(`/goods/goods/${id}/under`, params)
export const lowGoods = (params) => {
return putRequest(`/goods/goods/under`, params)
}
// 获取商品sku分页列表
export const getGoodsSkuData = (params) => {
return getRequest('/goods/goods/sku/list', params)
}
// 获取商品数量
export const getGoodsNumerData = (params) => {
return getRequest('/goods/goods/goodsNumber', params)
}
// 获取商品分页列表
export const getGoodsListData = (params) => {
return getRequest('/goods/goods/list', params)
@@ -124,8 +127,12 @@ export const getAuthGoodsListData = (params) => {
return getRequest('/goods/goods/auth/list', params)
}
// 审核商品
export const authGoods = (id, params) => {
return putRequest(`/goods/goods/${id}/auth`, params)
export const authGoods = (params) => {
return putRequest(`/goods/goods/auth`, params,{
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
//查询分类绑定参数信息
@@ -170,38 +177,38 @@ export const getGoodsSpecInfo = (category_id, params) => {
//获取sku列表
export const getSkuPage = (params) => {
return getRequest(`/goodsSku/getByPage`, params)
return getRequest(`/goodsSku/getByPage`, params)
}
//查看商品详情
export const getGoodsDetail = (id) => {
return getRequest(`/goods/goods/get/${id}`)
return getRequest(`/goods/goods/get/${id}`)
}
// 获取订单统计图表
export const getOrderChart = (params) => {
return getRequest(`/statistics/order`, params)
return getRequest(`/statistics/order`, params)
}
// 订单统计概览
export const getOrderOverView = (params) => {
return getRequest(`/statistics/order/overview`, params)
return getRequest(`/statistics/order/overview`, params)
}
// 统计相关订单统计
export const statisticsOrderList = (params) => {
return getRequest(`/statistics/order/order`, params)
return getRequest(`/statistics/order/order`, params)
}
// 统计相关退单统计
export const statisticsOrderRefundList = (params) => {
return getRequest(`/statistics/order/refund`, params)
return getRequest(`/statistics/order/refund`, params)
}
@@ -225,60 +232,3 @@ export const refundStatistics = (params) => {
export const refundPriceStatistics = (params) => {
return getRequest(`/statistics/refund/order/getPrice`, params)
}
// 获取草稿商品分页列表
export const getDraftGoodsListData = params => {
return getRequest("/goods/draftGoods/page", params);
};
// 获取草稿商品详情
export const getDraftGoodsDetail = id => {
return getRequest(`/goods/draftGoods/${id}`);
};
// 保存草稿商品
export function saveDraftGoods(params) {
return postRequest("/goods/draftGoods/save", params, {
"Content-Type": "application/json"
});
}
// 删除草稿商品
export const deleteDraftGoods = id => {
return deleteRequest(`/goods/draftGoods/${id}`);
};
export function createGoods(params) {
return postRequest("/goods/goods/create", params, {
"Content-Type": "application/json"
});
}
export function editGoods(goodsId, params) {
return putRequest(`/goods/goods/update/${goodsId}`, params, {
"Content-Type": "application/json"
});
}
//根据分类id获取关联品牌
export const getCategoryBrandListDataSeller = (category_id, params) => {
return getRequest(`/goods/category/${category_id}/brands`, params);
};
//查询分类绑定参数信息
export const getCategoryParamsListDataSeller = (id, params) => {
return getRequest(`/goods/categoryParameters/${id}`, params);
};
// 获取商品详情
export const getGoods = id => {
return getRequest(`/goods/goods/get/${id}`);
};
//保存获取关联规格
export const getGoodsSpecInfoSeller = (category_id) => {
return getRequest(`/goods/spec/${category_id}`);
};
// 获取商品单位列表
export const getGoodsUnitList = params => {
return getRequest(`/goods/goodsUnit`,params);
};

View File

@@ -111,7 +111,7 @@ export const changeMobile = (params) => {
};
// 获取用户数据 多条件
export const getUserListData = (params) => {
return getRequest("/passport/user", params);
return getRequest("/passport/user/getByCondition", params);
};
// 通过用户名搜索
export const searchUserByName = (username, params) => {
@@ -445,6 +445,21 @@ export const getProgress = () => {
return getRequest(`/other/elasticsearch/progress`);
};
// 删除ES中下架的商品
export const deleteGoodsDown = () => {
return getRequest(`/other/elasticsearch/deleteGoodsDown`);
};
// 删除不存在的索引
export const delSkuIndex = () => {
return getRequest(`/other/elasticsearch/delSkuIndex`);
};
// 生成所有商品的缓存
export const generateGoodsCache = () => {
return getRequest(`/other/elasticsearch/cache`);
};
// 分页查询自定义分词
export const getCustomWordsPage = (params) => {
return getRequest(`/other/customWords/page`, params);

View File

@@ -42,11 +42,6 @@ export const afterSaleOrderDetail = (sn) => {
export const afterSaleSellerReview = (sn, params) => {
return putRequest(`/order/afterSale/review/${sn}`, params)
}
//查询包裹列表
export const getPackage = (orderSn) => {
return getRequest(`/order/order/getPackage/${orderSn}`);
}
// 商家确认收货
export const afterSaleSellerConfirm = (sn, params) => {
@@ -131,7 +126,10 @@ export const getAfterSaleOrderDetail = (sn) => {
export const getAfterSaleTraces = (sn) => {
return getRequest(`/order/afterSale/getDeliveryTraces/${sn}`)
}
// 获取商家选中的物流公司
export const getLogisticsChecked = () => {
return getRequest(`/other/logistics/getChecked`)
}
//查询物流
export const getTraces = (sn, params) => {
@@ -163,18 +161,12 @@ export const storeAddress = (sn) => {
return getRequest(`/order/afterSale/getStoreAfterSaleAddress/${sn}`)
}
// 订单核验
export const orderTake = (sn, verificationCode) => {
return putRequest(`/order/order/take/${sn}/${verificationCode}`);
};
//分包裹发货
export const partDelivery = (orderSn,params) => {
return postRequest(`/order/order/${orderSn}/partDelivery`,params,{
"Content-type": "application/json"
})
// 获取订单数量统计
export const getOrderNum = (params) => {
return getRequest(`/order/order/orderNum`, params)
}
// 获取售后数量统计
export const getAfterSaleNumVO = (params) => {
return getRequest(`/order/afterSale/afterSaleNumVO`, params)
}
// 修改订单备注
export const modifyOrderRemark = (sn, params) => {
return putRequest(`/order/order/${sn}/sellerRemark`, params);
};

View File

@@ -114,5 +114,5 @@ export const getPrivacy = (type) => {
}
//修改隐私协议数据
export const updatePrivacy = (id,type,params) => {
return putRequest(`/other/article/updateArticle/${type}?id=${id}`, params, {"Content-Type": "application/json"})
return putRequest(`/other/article/updateArticle/${type}/${id}`, params, {"Content-Type": "application/json"})
}

View File

@@ -280,33 +280,4 @@ export const deletePointsGoodsCategoryById = id => {
// 获取优惠券领取记录
export const getCouponReceiveList = (params) => {
return getRequest("/promotion/coupon/received", params);
};
// 新增满减活动
export const newFullDiscount = (params) => {
return postRequest(`/promotion/fullDiscount`, params, { 'Content-type': 'application/json' })
}
// 编辑满减活动
export const editFullDiscount = (params) => {
return putRequest(`/promotion/fullDiscount`, params, { 'Content-type': 'application/json' })
}
// 新建 拼团
export const savePintuan = (params) => {
return postRequest('/promotion/pintuan', params, { 'Content-type': 'application/json' })
}
// 编辑 拼团
export const editPintuan = (params) => {
return putRequest('/promotion/pintuan', params, { 'Content-type': 'application/json' })
}
// 添加限时抢购 商品
export const setSeckillGoods = (params) => {
return postRequest(`/promotion/seckill/apply/${params.seckillId}`, params.applyVos, { 'Content-type': 'application/json' })
}
// 添加限时抢购 商品
export const removeSeckillGoods = (seckillId, ids) => {
return deleteRequest(`/promotion/seckill/apply/${seckillId}/${ids}`)
}
};

View File

@@ -1,5 +1,5 @@
// 统一请求路径前缀在libs/axios.js中修改
import {getRequest, postRequest, putRequest,deleteRequest} from '@/libs/axios';
import {getRequest, postRequest, putRequest} from '@/libs/axios';
//查询店铺列表
export const getBillPage = (params) => {
@@ -87,40 +87,3 @@ export const downloadBill = (id) => {
return getRequest(`/order/bill/downLoad/${id}`, {}, 'blob')
}
//查询运费模板
export const getShipTemplate = () => {
return getRequest(`/setting/freightTemplate`)
}
export const replyMemberComment = (id, params) => {
return putRequest(`/member/evaluation/reply/${id}`, params)
}
//删除运费模板
export const deleteShipTemplate = (id) => {
return deleteRequest(`/setting/freightTemplate/${id}`)
}
//新增运费模板
export const addShipTemplate = (params, headers) => {
return postRequest(`/setting/freightTemplate`, params, headers)
}
//编辑运费模板
export const editShipTemplate = (id, params, headers) => {
return putRequest(`/setting/freightTemplate/${id}`, params, headers)
}
// 获取商家自提点
export const getShopAddress = (id, params) => {
return getRequest(`/store/member/storeAddress/`, params)
}
export const editShopAddress = (id, params) => {
return putRequest(`/store/member/storeAddress/${id}`, params)
}
export const addShopAddress = (params) => {
return postRequest(`/store/member/storeAddress/`, params)
}
export const deleteShopAddress = (id) => {
return deleteRequest(`/store/member/storeAddress/${id}`)
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -10,7 +10,14 @@
{{ item.year + '年' + item.month + '月' }}</Option>
</Select>
</div>
<div class="shop-list" v-if="!closeShop">
<Select clearable @on-change="changeshop(selectedWay)" v-model="storeId" placeholder="店铺查询"
style="width:200px;margin-left:10px;">
<Scroll :on-reach-bottom="handleReachBottom">
<Option v-for="(item, index) in shopsData" :value="item.id" :key="index">{{ item.storeName }}</Option>
</Scroll>
</Select>
</div>
</div>
</div>
</template>
@@ -33,7 +40,7 @@ export default {
params: {
// 请求参数
pageNumber: 1,
pageSize: 10,
pageSize: 20,
storeName: "",
},
dateList: [

View File

@@ -66,6 +66,7 @@ import vuedraggable from "vuedraggable";
import {uploadFile} from "@/libs/axios";
// import OssManage from "@/views/sys/oss-manage/ossManage";
import OssManage from "@/views/sys/oss-manage/ossManage.vue";
export default {
name: "upload-image",
components: {

View File

@@ -57,11 +57,11 @@ export default {
};
</script>
<style scoped lang="scss">
/deep/ .ivu-modal {
::v-deep .ivu-modal {
overflow: hidden;
height: 650px !important;
}
/deep/ .ivu-modal-body {
::v-deep .ivu-modal-body {
width: 100%;
height: 500px;
overflow: hidden;

View File

@@ -86,11 +86,11 @@ export default {
};
</script>
<style scoped lang="scss">
/deep/ .ivu-modal {
::v-deep .ivu-modal {
overflow: hidden;
height: 650px !important;
}
/deep/ .ivu-modal-body {
::v-deep .ivu-modal-body {
width: 100%;
height: 500px;
overflow: hidden;

View File

@@ -65,11 +65,13 @@ export default {
}
return cur;
}, []);
this.wap.forEach((items,indexs) => {
if(items.title == '活动'){
this.wap.splice(indexs,1)
}
})
if (this.$route.path !== '/floorList/main') {
this.wap.forEach((items, indexs) => {
if (items.title == '活动') {
this.wap.splice(indexs, 1)
}
})
}
}else{
this.wap.push( {
title: "活动",
@@ -120,11 +122,11 @@ export default {
width: 100%;
}
/deep/ .ivu-modal {
::v-deep .ivu-modal {
overflow: hidden;
height: 650px !important;
}
/deep/ .ivu-modal-body {
::v-deep .ivu-modal-body {
width: 100%;
height: 500px;
overflow: hidden;

View File

@@ -42,12 +42,12 @@
}
}
/deep/ .ivu-scroll-container {
::v-deep .ivu-scroll-container {
width: 100% !important;
height: 400px !important;
}
/deep/ .ivu-scroll-content {
::v-deep .ivu-scroll-content {
/* */
display: flex;
flex-wrap: wrap;
@@ -81,7 +81,7 @@
align-items: center;
margin: 10px;
/deep/ img {
::v-deep img {
width: 60px;
height: 60px;
text-align: center;

View File

@@ -70,16 +70,9 @@ export default {
params: {
// 请求参数
pageNumber: 1,
pageSize: 10,
pageSize: 20,
},
pintuanColumns: [
// 表头
{
title: "活动标题",
key: "title",
tooltip: true,
width: 250,
},
{
title: "商品名称",
key: "goodsName",
@@ -108,12 +101,12 @@ export default {
render: (h, params) => {
return h("div", [
h(
"Button",
"a",
{
props: {
// type: this.index == params.index ? "primary" : "",
type: 'default',
size: "small",
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
@@ -201,12 +194,12 @@ export default {
render: (h, params) => {
return h("div", [
h(
"Button",
"a",
{
props: {
// type: this.index == params.index ? "primary" : "",
type: 'default',
size: "small",
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
@@ -253,12 +246,12 @@ export default {
render: (h, params) => {
return h("div", [
h(
"Button",
"a",
{
props: {
// type: this.index == params.index ? "primary" : "",
type: 'default',
size: "small",
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
@@ -339,15 +332,15 @@ export default {
this.sortGoods("SECKILL");
},
};
case "COUPON":
return {
title: "优惠券",
methodsed: () => {
this.showPromotionList = [];
this.activeColumns = this.pintuanColumns;
this.sortGoods("COUPON");
},
};
// case "COUPON":
// return {
// title: "优惠券",
// methodsed: () => {
// this.showPromotionList = [];
// this.activeColumns = this.pintuanColumns;
// this.sortGoods("COUPON");
// },
// };
case "POINTS_GOODS":
return {
title: "积分商品",
@@ -383,7 +376,10 @@ export default {
getPromotion(res) {
if (res.result) {
this.promotionList = res.result;
// 去除优惠券
delete this.promotionList.COUPON;
Object.keys(res.result)[0] && this.typeOption(Object.keys(res.result)[0]).methodsed();
this.promotions = Object.keys(res.result)[0];
}
// if (Object.keys(res.result).length) {
@@ -424,7 +420,7 @@ img {
overflow: auto;
width: 100%;
}
/deep/ .ivu-table-wrapper {
::v-deep .ivu-table-wrapper {
width: 100%;
}
.list {

View File

@@ -157,7 +157,7 @@ export default {
text-align: center;
transition: 0.35s;
cursor: pointer;
/deep/ p {
::v-deep p {
margin: 10px 0;
}
border: 1px solid #ededed;

View File

@@ -33,7 +33,7 @@ export default {
};
</script>
<style lang="scss" scoped>
/deep/ .ivu-card-body {
::v-deep .ivu-card-body {
height: 414px;
overflow: auto;
}
@@ -69,11 +69,11 @@ export default {
height: 416px;
overflow: hidden;
}
/deep/ .ivu-table {
::v-deep .ivu-table {
height: 300px !important;
overflow: auto;
}
/deep/ .ivu-card-body {
::v-deep .ivu-card-body {
padding: 0;
height: auto;
}

View File

@@ -45,7 +45,7 @@ export default {
order: "desc",
pageClientType: "H5",
pageNumber: 1,
pageSize: 10,
pageSize: 20,
pageType: "SPECIAL",
},
total: 0, // 表单数据总数
@@ -137,7 +137,7 @@ img {
overflow: auto;
width: 100%;
}
/deep/ .ivu-table-wrapper {
::v-deep .ivu-table-wrapper {
width: 100%;
}
.list {

View File

@@ -1,222 +0,0 @@
<template>
<Modal :mask-closable="false" :value="switched" v-model="switched" title="选择地址" @on-ok="submit" @on-cancel="cancel">
<div class="flex">
<Spin size="large" fix v-if="spinShow"></Spin>
<Tree ref="tree" class="tree" :data="data" expand-node show-checkbox multiple></Tree>
</div>
</Modal>
</template>
<script>
import { getAllCity } from "@/api/index";
export default {
data() {
return {
switched: false, // 控制模态框显隐
spinShow: false, // 加载loading
data: [], // 地区数据
selectedWay: [], // 选择的地区
callBackData: "", // 打开组件的回显数据
};
},
mounted() {
this.init();
},
methods: {
clear() { // 引用该组件的父组件会调用
this.data = [];
this.selectedWay = [];
this.init();
},
/**
* 关闭
*/
cancel() {
this.switched = false;
// 关闭的时候所有数据设置成disabled为true
this.data.forEach((item) => {
this.$set(item, "disabled", false);
item.children.forEach((child) => {
this.$set(child, "disabled", false);
});
});
},
/**
* 打开地图选择器
* @param {val} 回调的数据
* @param {index} 当前操作的运费模板的索引
*/
open(val, index) {
if (val) {
//已选中的地址
let checkedData = this.$store.state.shipTemplate;
let checkData = [];
let disabledData = checkedData.filter((item, i) => {
if (i != index) {
return i != index;
} else {
checkData.push(item);
}
});
// 选中
checkData.forEach((check) => {
// 循环出已经选中的地址id
check.areaId.split(",").forEach((ids) => {
this.data.forEach((item) => {
// 如果当前省份下市区全部选中则选中该省份
if (check.selectedAll) {
check.area.split(",").forEach((area) => {
if (area == item.name) {
this.$set(item, "checked", true);
}
});
}
// 将市区继续循环
item.children.forEach((child, childIndex) => {
// 判断当前市区是否是已选中状态
if (item.checked) {
this.$set(child, "checked", true);
}
if (child.id == ids) {
this.$set(child, "checked", true);
}
});
});
});
});
// 禁用
disabledData.forEach((dis) => {
// 循环出已经选中的地址id
dis.areaId.split(",").forEach((ids) => {
// 循环出省份
this.data.forEach((item) => {
// 如果当前省份下市区全部选中则禁用该省份
if (dis.selectedAll) {
dis.area.split(",").forEach((area) => {
if (area == item.name) {
this.$set(item, "disabled", true);
}
});
}
// 将市区继续循环
item.children.forEach((child, childIndex) => {
// 判断当前市区是否是已禁用状态
if (item.disabled) {
this.$set(child, "disabled", true);
} else {
if (child.id == ids) {
this.$set(child, "disabled", true);
}
}
});
});
});
});
}
this.switched ? (this.switched = true) : (this.switched = true);
},
/**
* 提交并筛选出省市
*/
submit() {
// 筛选出省市
let list = this.$refs.tree.getCheckedAndIndeterminateNodes();
let sort = [];
list.forEach((item, i) => {
item.selectedList = [];
item.selectedAll = false;
// 筛选出当前的省份
if (item.level == "province" && !item.disabled) {
sort.push({
...item,
});
}
// 筛选出当前选中的市
sort.forEach((sortItem, sortIndex) => {
if (
item.level != "province" &&
sortItem.id == item.parentId &&
!item.disabled
) {
sortItem.selectedList.push({
...item,
});
}
});
});
// 判断如果当前省是否全选
this.data.forEach((whether) => {
sort.forEach((item) => {
// 如果当前省匹配
if (
item.id == whether.id &&
item.selectedList.length == whether.children.length
) {
// 给一个全选子级的标识符
item.selectedList.forEach((child) => {
this.$set(child, "selectedAll", true);
});
this.$set(item, "selectedAll", true);
}
});
});
this.$emit("selected", sort);
this.cancel();
},
// 初始化地区数据
init() {
getAllCity().then((res) => {
if (res.result) {
res.result.forEach((item) => {
item.children.forEach((child) => {
child.title = child.name;
});
let data = {
title: item.name,
...item,
};
this.data.push(data);
this.selectedWay.push({ name: data.title, id: data.id });
});
this.$store.state.regions = this.data;
}
});
},
},
};
</script>
<style scoped lang="scss">
.flex {
display: flex;
position: relative;
}
.tree {
flex: 2;
}
.form {
flex: 8;
}
.button-list {
margin-left: 80px;
> * {
margin: 0 4px;
}
}
/deep/ .ivu-modal-body {
height: 400px !important;
overflow: auto;
}
</style>

View File

@@ -31,20 +31,6 @@ export const otherRouter = {
meta: { title: "个人中心" },
component: () => import("@/views/personal-center/personal-center.vue")
},
{
path: "pickup",
title: "自提点设置",
name: "pickup",
meta: { title: "自提点设置" },
component: () => import("@/views/sys/setting-manage/pickup.vue")
},
{
path: "goods-publish",
title: "商品发布",
name: "goods-publish",
meta: { title: "商品发布" },
component: () => import("@/views/goods/goodsOperation.vue")
},
{
path: "change-password",
title: "修改密码",
@@ -69,12 +55,6 @@ export const otherRouter = {
name: "shop",
component: () => import("@/views/seller/shop/shopList.vue")
},
{
path: "shipTemplate",
title: "自提点设置",
name: "shipTemplate",
component: () => import("@/views/logistics/shipTemplate.vue")
},
{
path: "shop-detail",
title: "店铺详细",
@@ -255,12 +235,6 @@ export const otherRouter = {
name: "pintuan-goods",
component: () => import("@/views/promotions/pintuan/pintuan-goods.vue")
},
{
path: "promotions/pintuan/pintuan-create",
title: "添加拼团活动",
name: "pintuan-create",
component: () => import("@/views/promotions/pintuan/pintuan-create.vue")
},
{
path: "promotions/full-discount-detail",
title: "满减满折详情",

View File

@@ -19,10 +19,9 @@
width: 100% !important;
display: flex;
align-items: center;
background-color: #f0f0f0;
// background-color: #f0f0f0;
border-radius: 0.4em;
padding: 10px;
margin: 0;
flex-wrap: wrap;
> .ivu-form-item {
margin: 8px 10px !important;
@@ -42,3 +41,8 @@
-webkit-line-clamp: 4;
overflow: hidden;
}
// 为Card组件之间增加间距
.ivu-card + .ivu-card {
margin-top: 10px;
}

View File

@@ -93,12 +93,3 @@ export const REQUIRED = {
required: true,
message:'请填写参数'
}
export const WHITE_SPACE = {
whitespace: true,
message: "不可为纯空格",
}
export const VARCHAR60 = {
pattern: /^.{1,60}$/,
message: '长度应该限制在1-60个字符'
}

View File

@@ -20,7 +20,7 @@
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -69,7 +69,7 @@ export default {
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
words: "",
@@ -124,14 +124,12 @@ export default {
render: (h, params) => {
return h("div", [
h(
"Button",
"a",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
@@ -142,14 +140,17 @@ export default {
"修改"
),
h(
"Button",
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
),
h(
"a",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {

View File

@@ -15,13 +15,13 @@
v-model="searchForm.memberName"
placeholder="请输入会员名称"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Form-item label="状态">
<Select
v-model="searchForm.distributionStatus"
style="width: 200px"
style="width: 240px"
>
<Option
v-for="item in distributionStatusList"
@@ -42,6 +42,8 @@
>
</Form>
</Row>
</Card>
<Card>
<Table
:loading="loading"
border
@@ -57,7 +59,7 @@
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -138,7 +140,7 @@ export default {
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
},
columns: [
{
@@ -344,7 +346,7 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
// 获取列表数据

View File

@@ -15,7 +15,7 @@
v-model="searchForm.memberName"
placeholder="请输入会员名称"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Button
@@ -26,6 +26,8 @@
>
</Form>
</Row>
</Card>
<Card>
<Table
class="mt_10"
:loading="loading"
@@ -41,7 +43,7 @@
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -63,7 +65,7 @@ export default {
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
startDate: "", // 起始时间
@@ -113,17 +115,10 @@ export default {
fixed: "right",
width: 200,
render: (h, params) => {
return h("div", [
return h("div", { class: "ops" }, [
h(
"Button",
"a",
{
props: {
type: "success",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.audit(params.row, "PASS");
@@ -132,13 +127,10 @@ export default {
},
"通过"
),
h("span", {}, "|"),
h(
"Button",
"a",
{
props: {
type: "error",
size: "small",
},
on: {
click: () => {
this.audit(params.row, "REFUSE");
@@ -174,7 +166,7 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
// 获取列表数据
@@ -222,3 +214,15 @@ export default {
},
};
</script>
<style lang="scss" scoped>
.ops a {
color: #2d8cf0;
cursor: pointer;
text-decoration: none;
}
.ops span {
display: inline-block;
margin: 0 8px;
color: #dcdee2;
}
</style>

View File

@@ -5,15 +5,15 @@
<Form-item label="会员名称" class="flex" prop="memberName">
<Input
type="text" placeholder="请输入会员名称" v-model="searchForm.memberName" clearable
style="width: 200px"></Input>
style="width: 240px"></Input>
</Form-item>
<Form-item label="编号" class="flex">
<Input
type="text" placeholder="请输入编号" v-model="searchForm.sn" clearable
style="width: 200px"></Input>
style="width: 240px"></Input>
</Form-item>
<Form-item label="状态"
style="width: 200px">
style="width: 240px">
<Select v-model="searchForm.distributionCashStatus" clearable style="width: 150px">
<Option v-for="item in cashStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
@@ -22,9 +22,11 @@
<Button @click="handleSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Card>
<Card>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10"></Table>
<Row type="flex" justify="end" class="page padding-row">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[20,50,100]" size="small" show-total show-elevator show-sizer></Page>
</Row>
</Card>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable='false' :width="500">
@@ -70,7 +72,7 @@ export default {
result: 'FAIL_AUDITING', // 是否通过
searchForm: { // 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
},
@@ -158,50 +160,34 @@ export default {
fixed: "right",
width: 130,
render: (h, params) => {
if(params.row.distributionCashStatus != 'APPLY'){
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.view(params.row);
}
if (params.row.distributionCashStatus != 'APPLY') {
return h("div", { class: "ops" }, [
h(
"a",
{
on: {
click: () => {
this.view(params.row);
}
},
"查看"
),
]);
}else {
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.edit(params.row);
}
}
},
"查看"
),
]);
} else {
return h("div", { class: "ops" }, [
h(
"a",
{
on: {
click: () => {
this.edit(params.row);
}
},
"审核"
),
]);
}
},
"审核"
),
]);
}
}
}
@@ -228,7 +214,7 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
// 获取列表数据
@@ -310,3 +296,15 @@ export default {
}
};
</script>
<style lang="scss" scoped>
.ops a {
color: #2d8cf0;
cursor: pointer;
text-decoration: none;
}
.ops span {
display: inline-block;
margin: 0 8px;
color: #dcdee2;
}
</style>

View File

@@ -4,13 +4,13 @@
<Form @keydown.enter.native.prevent="handleSearch" ref="searchForm" :model="searchForm" inline :label-width="70"
class="search-form">
<Form-item label="商品名称" prop="goodsName">
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 240px" />
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
</Card>
<Card>
<Row class="operation" style="margin:10px 0;">
<Button @click="add" type="primary">添加</Button>
<Button @click="delAll" type="primary">批量下架</Button>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
@@ -32,38 +32,15 @@
</Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
@on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator
@on-page-size-change="changePageSize" :page-size-opts="[20,50,100]" size="small" show-total show-elevator
show-sizer></Page>
</Row>
</Card>
<liliDialog
ref="liliDialog"
@selectedGoodsData="selectedGoodsData"
></liliDialog>
<Modal
:title="modalTitle"
v-model="modalVisible"
:mask-closable="false"
:width="500"
>
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="分销佣金" prop="commission">
<Input v-model="form.commission" clearable style="width: 100%"/>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
>提交
</Button
>
</div>
</Modal>
</div>
</template>
<script>
import { delDistributionGoods, getDistributionGoods,distributionGoodsCheck } from "@/api/distribution";
import { delDistributionGoods, getDistributionGoods } from "@/api/distribution";
import vueQr from "vue-qr";
export default {
components: {
@@ -72,16 +49,11 @@ export default {
name: "distributionGoods",
data() {
return {
modalVisible: false, // 添加或编辑显示
modalTitle: "", // 添加或编辑标题
form:{
commission : 1 // 分销金额
},
loading: true, // 表单加载状态
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
},
@@ -165,14 +137,10 @@ export default {
fixed: "right",
minWidth: 100,
render: (h, params) => {
return h("div", [
return h("div", { class: "ops" }, [
h(
"Button",
"a",
{
props: {
type: "error",
size: "small",
},
on: {
click: () => {
this.remove(params.row);
@@ -185,48 +153,11 @@ export default {
},
},
],
submitLoading: false, // 添加或编辑提交状态
data: [], // 表单数据
total: 0, // 表单数据总数
skuId:0,
formValidate: {
commission: [
{ required: true, message: '请输入大于1小于9999的合法分销金额'},
{
pattern: /^[1-9]\d{0,3}(\.\d{1,2})?$/,
message: "请输入大于1小于9999的合法分销金额",
trigger: "change"
}],
},
};
},
methods: {
// 选择商品回调
selectedGoodsData(v){
this.modalVisible = true
this.form.commission = 1
this.modalTitle = "保存分销商品"
this.skuId = v[0].id
},
// 添加商品
handleSubmit(){
this.$refs['form'].validate((valid) => {
if (valid) {
distributionGoodsCheck(this.skuId,this.form).then(res => {
if(res.message === 'success') {
this.$Message.success("添加成功");
}
this.modalVisible = false
this.getDataList()
});
}
})
},
add(){
this.$refs.liliDialog.flag = true;
this.$refs.liliDialog.goodsFlag = true;
this.$refs.liliDialog.singleGoods();
},
// 初始化数据
init() {
this.getDataList();
@@ -245,7 +176,7 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
// 清除选中状态
@@ -321,5 +252,17 @@ export default {
},
};
</script>
<style lang="scss" scoped>
.ops a {
color: #2d8cf0;
cursor: pointer;
text-decoration: none;
}
.ops span {
display: inline-block;
margin: 0 8px;
color: #dcdee2;
}
</style>

View File

@@ -8,7 +8,7 @@
v-model="searchForm.orderSn"
placeholder="请输入订单编号"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Form-item label="分销商" prop="distributionName">
@@ -17,15 +17,23 @@
v-model="searchForm.distributionName"
placeholder="请输入分销商名称"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Form-item label="店铺名称">
<Select v-model="searchForm.storeId" placeholder="请选择" @on-query-change="searchChange" filterable
clearable style="width: 240px">
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.storeName }}</Option>
</Select>
</Form-item>
<Form-item label="订单时间">
<DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间"
style="width: 210px"></DatePicker>
style="width: 240px"></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
</Card>
<Card>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10">
<template slot-scope="{row}" slot="goodsMsg">
<div class="goods-msg">
@@ -50,7 +58,7 @@
</Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[20,50,100]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
</Card>
@@ -62,6 +70,7 @@
getDistributionOrder
} from "@/api/distribution";
import {orderStatusList} from './dataJson'
import {getShopListData} from '@/api/shops'
import vueQr from 'vue-qr'
export default {
@@ -73,11 +82,12 @@
return {
timeRange: [], // 范围时间
orderStatusList, // 订单状态列表
shopList: [], // 店铺列表
distributionId: this.$route.query.id, // 分销id
loading: true, // 表单加载状态
searchForm: { // 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort:"create_time",
order:"desc"
},
@@ -101,7 +111,12 @@
tooltip: true,
minWidth:80,
},
{
title: "店铺名称",
key: "storeName",
minWidth:80,
tooltip: true
},
{
title: "状态",
slot: "distributionOrderStatus",
@@ -134,6 +149,7 @@
// 初始化数据
init() {
this.getDataList();
this.getShopList()
},
//分页 改变页码
changePage(v) {
@@ -148,7 +164,7 @@
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
// 获取列表数据
@@ -173,10 +189,28 @@
this.total = this.data.length;
this.loading = false;
},
getShopList(val) { // 获取店铺列表 搜索用
const params = {
pageNumber: 1,
pageSize: 20,
storeName: ''
}
if (val) {
params.storeName = val;
} else {
params.storeName = ''
}
getShopListData(params).then(res => {
this.shopList = res.result.records
})
},
searchChange(val) { // 店铺搜索,键盘点击回调
this.getShopList(val)
},
filterStatus (status) { // 过滤订单状态
const arr = [
{status: 'WAIT_BILL', title: '待结算'},
{status: 'NO_COMPLETED', title: '未完成'},
{status: 'COMPLETE', title: '完成'},
{status: 'REFUND', title: '退款'},
]
@@ -185,21 +219,20 @@
return arr[i].title;
}
}
return '未完成'; // 默认返回未完成
},
filterStatusColor (status) { // 状态tag标签颜色
const arr = [
{status: 'WAIT_BILL', color: 'blue'},
{status: 'WAIT_CASH', color: 'orange'},
{status: 'COMPLETE_CASH', color: 'green'},
{status: 'CANCEL', color: 'red'},
{status: 'NO_COMPLETED', color: 'red'},
{status: 'REFUND', color: 'magenta'},
{status: 'NO_COMPLETED', color: 'orange'},
{status: 'COMPLETE', color: 'green'},
{status: 'REFUND', color: 'red'},
]
for (let i=0;i<arr.length;i++) {
if (arr[i].status === status) {
return arr[i].color;
}
}
return 'orange'; // 默认返回橙色
}
},
mounted() {

View File

@@ -3,7 +3,6 @@
<Card>
<Row class="operation">
<Button @click="add" type="primary">添加</Button>
<Button @click="refresh">刷新</Button>
<Button @click="delAll">批量删除</Button>
</Row>
<Table
@@ -22,7 +21,7 @@
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -71,7 +70,7 @@ export default {
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
name: "",
@@ -122,18 +121,17 @@ export default {
title: "操作",
key: "action",
align: "center",
fixed: "right",
width: 200,
render: (h, params) => {
return h("div", [
h(
"Button",
"a",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
@@ -144,14 +142,17 @@ export default {
"修改"
),
h(
"Button",
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
),
h(
"a",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
@@ -188,7 +189,7 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
// 清除选中
@@ -285,15 +286,7 @@ export default {
},
});
},
// 刷新
refresh() {
this.loading = true;
setTimeout(() => {
this.getDataList();
this.loading = false;
this.$Message.success("刷新成功");
}, 500);
},
// 全部删除
delAll() {
if (this.selectCount <= 0) {

View File

@@ -1,528 +0,0 @@
/*选择商品品类*/
.content-goods-publish {
padding: 15px;
margin: 0 auto;
text-align: center;
border-radius: 0.8em;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
background: none repeat 0 0 #fff;
/*商品品类*/
.goods-category {
min-height: 500px;
border-radius: 0.8em;
text-align: left;
padding: 10px;
background: #ededed;
ul {
padding: 12px 8px;
list-style: none;
width: 300px;
background: none repeat 0 0 #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
border-radius: 0.4em;
display: inline-block;
letter-spacing: normal;
margin-right: 15px;
vertical-align: top;
word-spacing: normal;
li {
line-height: 20px;
padding: 10px 5px;
cursor: pointer;
color: #333;
font-size: 12px;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}
}
/** 当前品类被选中的样式 */
.activeClass {
border-radius: 0.4em;
background-color: rgba($color: $theme_color, $alpha: 0.2);
border: 1px solid rgba($color: $theme_color, $alpha: 0.8);
color: #fff;
}
/*!*当前选择的商品品类文字*!*/
.current-goods-category {
text-align: left;
padding: 10px;
width: 100%;
border: 1px solid #fbeed5;
color: #c09853;
background-color: #fcf8e3;
margin: 10px auto;
padding: 8px 35px 8px 14px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
font-size: 12px;
font-weight: bold;
}
}
/*编辑基本信息*/
.el-form {
padding-bottom: 80px;
.el-form-item {
width: 100%;
text-align: left;
}
}
.sku-val {
justify-content: flex-start;
flex-wrap: wrap;
>.ivu-form {
flex-wrap: wrap !important;
}
/deep/ .sku-item-content-val {
margin-right: 20px;
}
}
div.base-info-item {
h4 {
margin-bottom: 10px;
padding: 0 10px;
border: 1px solid #ddd;
background-color: #f8f8f8;
font-weight: bold;
color: #333;
font-size: 14px;
line-height: 40px;
text-align: left;
}
>div {
padding-left: 5%;
}
.form-item-view {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
// padding-left: 80px;
.form-item-view-wholesale {
display: flex;
.form-item-view-wholesale-preview {
padding-left: 5%;
}
}
.layout {
margin-bottom: 20px;
width: 100%;
justify-content: center;
.sku-item-content {
margin: 20px 0;
display: flex;
width: 100% !important;
flex: 1;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
width: 100%;
>.ivu-card-body {
width: 100%;
}
.ivu-card-body {
width: 100%;
justify-content: center;
align-items: flex-start;
}
.sku-item-content-name {
display: flex;
align-items: flex-start;
justify-content: flex-start;
width: 100%;
}
}
}
.shop-category-text {
font-size: 12px;
}
}
.form-item-view-bottom {
margin-bottom: 50px;
}
.item-goods-properts-row {
display: flex;
flex-direction: row;
word-break: break-all;
white-space: normal;
width: 300px;
height: 100px;
}
.item-goods-properts {
display: flex;
flex-direction: row;
margin-bottom: 10px;
}
.form-item {
display: flex;
align-items: center;
}
/** 审核信息-拒绝原因 */
.auth-info {
color: red;
}
.el-form-item {
width: 30%;
min-width: 300px;
}
.goods-name-width {
width: 50%;
min-width: 300px;
}
.el-form-item__content {
margin-left: 120px;
text-align: left;
}
p.goods-group-manager {
padding-left: 7.5%;
text-align: left;
color: #999;
font-size: 13px;
}
/*teatarea*/
/deep/ .el-textarea {
width: 150%;
}
.seo-text {
width: 150%;
}
}
/*折叠面板*/
.el-collapse-item {
/deep/ .el-collapse-item__header {
text-align: left;
background-color: #f8f8f8;
padding: 0 10px;
font-weight: bold;
color: #333;
font-size: 14px;
}
.el-form-item {
margin-left: 5%;
width: 25%;
}
/deep/ .el-form-item__content {
margin-left: 120px;
text-align: left;
}
p.goods-group-manager {
padding-left: 12%;
text-align: left;
color: #999;
}
/deep/ .el-collapse-item__content {
padding: 10px 0;
text-align: left;
}
}
.success {
>h1 {
font-size: 28px;
}
>* {
margin: 10px;
}
}
.operation {
>* {
margin: 10px 0;
}
}
/*商品描述*/
.goods-intro {
line-height: 40;
}
/** 底部步骤 */
.footer {
width: 100%;
margin-top: 20px;
padding: 10px;
background-color: #ffc;
position: sticky;
bottom: 0px;
text-align: center;
z-index: 999;
>.ivu-btn {
margin: 0 10px;
}
}
/*图片上传组件第一张图设置封面*/
.goods-images {
/deep/ li.el-upload-list__item:first-child {
position: relative;
}
/deep/ li.el-upload-list__item:first-child:after {
content: "";
color: #fff;
font-weight: bold;
font-size: 12px;
position: absolute;
left: -15px;
top: -6px;
width: 40px;
height: 24px;
padding-top: 6px;
background: #13ce66;
text-align: center;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
}
}
.el-form-item__label {
word-break: break-all;
}
.step-list {
height: 60px;
padding: 10px 30px;
background-color: #fff;
margin-bottom: 20px;
border-radius: 0.8em;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.add-sku-btn {
margin-top: 10px;
}
.sku-item:not(:first-child) {
margin-top: 10px;
}
.sku-upload-list {
text-align: center;
border: 1px solid transparent;
border-radius: 4px;
overflow: hidden;
background: #fff;
position: relative;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
margin-right: 8px;
}
.preview-picture {
width: 100%;
margin: 0 auto;
display: block;
// text-align: center;
border: 1px solid transparent;
// justify-self: center;
// align-self: center;
}
.preview-picture img {
width: 100%;
height: 100%;
}
.sku-upload-list img {
width: 100%;
height: 100%;
}
.sku-upload-list-cover {
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
}
.sku-upload-list:hover .sku-upload-list-cover {
display: block;
}
.sku-upload-list-cover i {
color: #fff;
font-size: 20px;
cursor: pointer;
margin: 0 2px;
}
.required {
/deep/ .ivu-form-item-label::before {
content: "*";
display: inline-block;
margin-right: 4px;
line-height: 1;
font-family: SimSun;
font-size: 14px;
color: #ed4014;
}
}
.demo-upload-list {
width: 150px;
height: 150px;
text-align: center;
border: 1px solid transparent;
border-radius: 4px;
display: inline-block;
background: #fff;
position: relative;
margin-right: 4px;
vertical-align: bottom;
}
.demo-upload-list img {
width: 100%;
height: 100%;
}
.demo-upload-list-cover {
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
justify-content: space-between;
align-items: center;
flex-direction: column;
}
.demo-upload-list:hover .demo-upload-list-cover {
display: flex;
}
.demo-upload-list-cover div {
margin-top: 50px;
width: 100%;
>i {
width: 50%;
margin-top: 8px;
color: #fff;
font-size: 20px;
cursor: pointer;
}
}
.active-goods-type {
background: #e8e8e8;
}
.goods-type-list {
max-height: 500px;
overflow-y: auto;
}
.template-item {
justify-content: flex-start !important;
}
.tree-bar {
height: auto !important;
max-height: auto !important;
min-height: 240px !important;
}
.goods-type-item {
padding: 20px 0;
width: 100%;
cursor: pointer;
transition: 0.35s;
display: flex;
justify-content: center;
align-items: center;
/deep/ img {
margin-right: 20px;
width: 100px;
margin-left: 10px;
}
/deep/ p {
color: #999;
font-size: 14px;
margin-top: 10px;
}
}
.goods-type-item:hover {
background: #ededed;
}
.goods-list-box {
height: 450px;
overflow: auto;
}
h2 {
cursor: pointer;
font-size: 21px;
color: #333;
}
.form-item-view-wholesale-form-col {
height: 400px;
}
.form-item-view-wholesale-row-del {
display: "flex";
justify-content: "space-between";
align-items: "center";
}
.promise-intro-btn{
margin: 10px 0;
text-align: left;
}

View File

@@ -15,7 +15,7 @@
v-model="searchForm.goodsName"
placeholder="请输入商品名称"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Form-item label="商品编号" prop="id">
@@ -24,27 +24,24 @@
v-model="searchForm.id"
placeholder="请输入商品编号"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Form-item label="状态" prop="status">
<Select
v-model="searchForm.marketEnable"
placeholder="请选择"
<Form-item label="店铺名称" prop="id">
<Input
type="text"
v-model="searchForm.storeName"
placeholder="请输入店铺名称"
clearable
style="width: 200px"
>
<Option value="UPPER">上架</Option>
<Option value="DOWN">下架</Option>
</Select>
style="width: 240px"
/>
</Form-item>
<Form-item label="销售模式" prop="status">
<Select
v-model="searchForm.salesModel"
placeholder="请选择"
clearable
style="width: 200px"
style="width: 240px"
>
<Option value="RETAIL">零售</Option>
<Option value="WHOLESALE">批发</Option>
@@ -55,7 +52,7 @@
v-model="searchForm.goodsType"
placeholder="请选择"
clearable
style="width: 200px"
style="width: 240px"
>
<Option value="PHYSICAL_GOODS">实物商品</Option>
<Option value="VIRTUAL_GOODS">虚拟商品</Option>
@@ -69,49 +66,69 @@
>搜索</Button
>
</Form>
<div class="mt_10">
<Button type="primary" @click="handleAdd">新增商品</Button>
</Card>
<Card>
<div class="goods-tab">
<Tabs v-model="currentStatus" @on-click="goodsStatusClick">
<TabPane v-for="(item,index) in goodsStatusWithCount" :key="index" :label="item.title" :name="item.value">
</TabPane>
</Tabs>
</div>
<!-- 批量操作按钮 -->
<div class="batch-operations" style="margin: 10px 0;">
<Button
type="success"
:disabled="selectedRows.length === 0"
@click="batchUpper"
style="margin-right: 10px;"
>
批量上架
</Button>
<Button
type="warning"
:disabled="selectedRows.length === 0"
@click="batchLower"
style="margin-right: 10px;"
>
批量下架
</Button>
<Button
v-if="currentStatus === 'TOBEAUDITED'"
type="primary"
:disabled="selectedRows.length === 0"
@click="batchAudit"
>
批量审核
</Button>
</div>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
class="mt_10"
@on-select="onSelect"
@on-select-all="onSelectAll"
@on-selection-change="onSelectionChange"
>
<!-- 商品图片格式化 -->
<template slot="imageSlot" slot-scope="{ row }">
<div style="margin-top: 5px;">
<img
:src="row.original"
style="height: 50px; width: 50px; object-fit: cover;"
/>
</div>
</template>
<!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="{ row }">
<div style="margin: 5px 0px; height: 80px; display: flex">
<div style="">
<img
:src="row.original"
style="height: 60px; margin-top: 1px; width: 60px"
/>
</div>
<div style="margin-left: 13px">
<div class="div-zoom">
<a @click="linkTo(row.id, row.skuId)">{{ row.goodsName }}</a>
</div>
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
<div slot="content">
<vue-qr
:text="wapLinkTo(row.id, row.skuId)"
:margin="0"
colorDark="#000"
colorLight="#fff"
:size="150"
></vue-qr>
</div>
<img
src="../../../assets/qrcode.svg"
class="hover-pointer"
width="20"
height="20"
alt=""
/>
</Poptip>
<div style="margin: 5px 0px; padding: 10px 0px;">
<div class="div-zoom">
<a @click="linkTo(row.id, row.skuId)">{{ row.goodsName }}</a>
</div>
</div>
</template>
@@ -123,7 +140,7 @@
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -149,11 +166,61 @@
>
</div>
</Modal>
<Modal
title="商品审核"
v-model="auditModalVisible"
:mask-closable="false"
:width="500"
>
<Form ref="auditForm" :model="goodsAuditForm" :label-width="100">
<FormItem label="审核结果" prop="auth_flag">
<RadioGroup v-model="goodsAuditForm.auth_flag">
<Radio :label="1">审核通过</Radio>
<Radio :label="2">审核拒绝</Radio>
</RadioGroup>
</FormItem>
<!-- <FormItem label="审核备注" prop="reason" v-if="goodsAuditForm.auth_flag === 2">
<Input v-model="goodsAuditForm.reason" type="textarea" :rows="3" placeholder="请输入拒绝原因" />
</FormItem> -->
</Form>
<div slot="footer">
<Button type="text" @click="auditModalVisible = false">取消</Button>
<Button type="primary" @click="confirmAudit">提交审核</Button>
</div>
</Modal>
<!-- 批量审核弹框 -->
<Modal
title="批量商品审核"
v-model="batchAuditModalVisible"
:mask-closable="false"
:width="500"
>
<Form ref="batchAuditForm" :model="batchAuditForm" :label-width="100">
<FormItem label="审核结果" prop="auth_flag">
<RadioGroup v-model="batchAuditForm.auth_flag">
<Radio :label="1">审核通过</Radio>
<Radio :label="2">审核拒绝</Radio>
</RadioGroup>
</FormItem>
<FormItem label="审核备注" prop="reason" v-if="batchAuditForm.auth_flag === 2">
<Input v-model="batchAuditForm.reason" type="textarea" :rows="3" placeholder="请输入拒绝原因" />
</FormItem>
<FormItem label="选中商品">
<div style="max-height: 200px; overflow-y: auto;">
<Tag v-for="item in selectedRows" :key="item.id" style="margin: 2px;">{{item.goodsName}}</Tag>
</div>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="batchAuditModalVisible = false">取消</Button>
<Button type="primary" @click="submitBatchAudit">提交审核</Button>
</div>
</Modal>
</div>
</template>
<script>
import { getGoodsListData, upGoods, lowGoods } from "@/api/goods";
import { getGoodsListData,getGoodsNumerData, upGoods, lowGoods, authGoods } from "@/api/goods";
import vueQr from "vue-qr";
export default {
components: {
@@ -168,7 +235,7 @@ export default {
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "create_time", // 默认排序字段
order: "desc", // 默认排序方式
},
@@ -176,28 +243,61 @@ export default {
// 下架原因
reason: "",
},
goodsAuditForm: {
// 商品审核表单
auth_flag: 1,
},
auditModalVisible: false, // 审核弹框显示状态
currentAuditGoods: null, // 当前审核的商品
submitLoading: false, // 添加或编辑提交状态
columns: [
{
type: 'selection',
width: 60,
align: 'center'
},
{
title: "商品ID",
key: "id",
width: 180,
tooltip: true,
},
{
title: "商品图片",
key: "original",
width: 180,
slot: "imageSlot",
},
{
title: "商品名称",
key: "goodsName",
minWidth: 180,
slot: "goodsSlot",
},
{
title: "商品编号",
key: "id",
minWidth: 150,
tooltip: true,
},
{
title: "价格",
key: "price",
width: 130,
width: 100,
render: (h, params) => {
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
},
},
{
title: "销量",
key: "buyCount",
width: 100,
render: (h, params) => {
return h("span", params.row.buyCount || 0);
},
},
{
title: "库存",
key: "quantity",
width: 100,
render: (h, params) => {
return h("span", params.row.quantity || 0);
},
},
{
title: "销售模式",
key: "salesModel",
@@ -215,7 +315,7 @@ export default {
{
title: "商品类型",
key: "goodsType",
width: 130,
width: 120,
render: (h, params) => {
if (params.row.goodsType === "PHYSICAL_GOODS") {
return h("Tag", { props: { color: "green" } }, "实物商品");
@@ -229,7 +329,7 @@ export default {
{
title: "状态",
key: "marketEnable",
width: 100,
width: 120,
render: (h, params) => {
if (params.row.marketEnable == "DOWN") {
return h("Tag", { props: { color: "volcano" } }, "下架");
@@ -241,7 +341,7 @@ export default {
{
title: "审核状态",
key: "authFlag",
width: 130,
width: 180,
render: (h, params) => {
if (params.row.authFlag == "TOBEAUDITED") {
return h("Tag", { props: { color: "volcano" } }, "待审核");
@@ -252,25 +352,72 @@ export default {
}
},
},
{
title: "店铺名称",
key: "storeName",
width: 180, // 使用minWidth替代width
tooltip: true,
},
{
title: "操作",
key: "action",
align: "center",
fixed: "right",
width: 150,
width: 200,
render: (h, params) => {
if (params.row.marketEnable == "DOWN") {
// 如果是待审核状态,显示审核按钮
if (params.row.authFlag === "TOBEAUDITED") {
return h("div", [
h(
"Button",
"a",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none"
},
on: {
click: () => {
this.openAuditModal(params.row);
},
},
},
"审核"
),
h("span", {
style: {
margin: "0 8px",
color: "#dcdee2"
}
}, "|"),
h(
"a",
{
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none"
},
on: {
click: () => {
this.showDetail(params.row);
},
},
},
"查看"
),
]);
}
// 原有的上架/下架逻辑
else if (params.row.marketEnable == "DOWN") {
return h("div", [
h(
"a",
{
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none"
},
on: {
click: () => {
@@ -280,11 +427,19 @@ export default {
},
"上架"
),
h("span", {
style: {
margin: "0 8px",
color: "#dcdee2"
}
}, "|"),
h(
"Button",
"a",
{
props: {
size: "small",
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none"
},
on: {
click: () => {
@@ -298,14 +453,12 @@ export default {
} else {
return h("div", [
h(
"Button",
"a",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none"
},
on: {
click: () => {
@@ -315,11 +468,19 @@ export default {
},
"下架"
),
h("span", {
style: {
margin: "0 8px",
color: "#dcdee2"
}
}, "|"),
h(
"Button",
"a",
{
props: {
size: "small",
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none"
},
on: {
click: () => {
@@ -336,16 +497,37 @@ export default {
],
data: [], // 表单数据
total: 0, // 表单数据总数
currentStatus: '',
goodsNumerData: {},
goodsAuditForm: {
// 商品编辑表单
auth_flag: 1,
},
selectedRows: [], // 选中的行数据
selectAll: false, // 全选状态
batchAuditModalVisible: false, // 批量审核弹框显示状态
batchAuditForm: {
auth_flag: 1,
reason: ''
},
};
},
computed: {
goodsStatusWithCount() {
return [
{title: '全部', value: ''},
{title: `出售中${this.goodsNumerData.upperGoodsNum ? '(' + this.goodsNumerData.upperGoodsNum + ')' : ''}`, value: 'UPPER'},
{title: `仓库中${this.goodsNumerData.downGoodsNum ? '(' + this.goodsNumerData.downGoodsNum + ')' : ''}`, value: 'DOWN'},
{title: `待审核${this.goodsNumerData.auditGoodsNum ? '(' + this.goodsNumerData.auditGoodsNum + ')' : ''}`, value: 'TOBEAUDITED'},
{title: `审核未通过${this.goodsNumerData.refuseGoodsNum ? '(' + this.goodsNumerData.refuseGoodsNum + ')' : ''}`, value: 'REFUSE'}
];
}
},
methods: {
// 新增商品
handleAdd(){
this.$router.push('/goods-publish')
},
// 初始化数据
init() {
this.getDataList();
this.getNumberData();
},
// 分页 改变页码
changePage(v) {
@@ -360,8 +542,9 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
this.getNumberData();
},
// 获取数据
getDataList() {
@@ -374,6 +557,15 @@ export default {
}
});
},
getNumberData() {
// 创建一个不包含goodsStatus字段的搜索参数
const { goodsStatus, ...searchParams } = this.searchForm;
getGoodsNumerData(searchParams).then((res) => {
if (res.success) {
this.goodsNumerData = res.result;
}
})
},
// 编辑
edit(v) {
this.id = v.id;
@@ -386,27 +578,36 @@ export default {
},
// 下架
lower() {
lowGoods(this.id, this.underForm).then((res) => {
let params = {
goodsId: this.id,
reason:this.underForm.reason
};
lowGoods(params).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.modalVisible = false;
this.getDataList();
this.getNumberData(); // 添加这行
}
});
},
// 商家
// 上架
upper(v) {
this.$Modal.confirm({
title: "确认上架",
content: "您确认要上架 " + v.goodsName + " ?",
loading: true,
onOk: () => {
upGoods(v.id).then((res) => {
let params = {
goodsId: v.id
};
upGoods(params).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("上架成功");
this.getDataList();
this.getNumberData(); // 添加这行
}
});
},
@@ -417,13 +618,255 @@ export default {
showDetail(v) {
let id = v.id;
this.$options.filters.customRouterPush({
name: "goods-publish",
name: "goods-detail",
query: { id: id },
})
},
// 商品状态筛选
goodsStatusClick(item) {
// 根据选择的状态设置搜索条件
if (item === 0) {
// 全部:清除状态筛选
delete this.searchForm.goodsStatus;
} else {
// 其他状态正常赋值
this.searchForm.goodsStatus = item;
}
this.currentStatus = item;
// tab切换时清除选中内容
this.selectedRows = [];
if (this.$refs.table) {
this.$refs.table.selectAll(false);
}
this.getDataList();
},
examine(v, authFlag) {
// 审核商品
let examine = "通过";
this.goodsAuditForm.authFlag = "PASS";
if (authFlag != 1) {
examine = "拒绝";
this.goodsAuditForm.authFlag = "REFUSE";
}
this.$Modal.confirm({
title: "确认审核",
content: "您确认要审核" + examine + " " + v.goodsName + " ?",
loading: true,
onOk: () => {
this.goodsAuditForm.goodsIds=v.id;
let formData = new FormData();
formData.append('goodsIds', v.id);
formData.append('authFlag', this.goodsAuditForm.authFlag);
authGoods(formData).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("审核成功");
this.getDataList();
this.getNumberData();
}
});
},
});
},
// 打开审核弹框
openAuditModal(goods) {
this.currentAuditGoods = goods;
this.goodsAuditForm.auth_flag = 1;
this.goodsAuditForm.reason = '';
this.auditModalVisible = true;
},
// 确认审核(二次确认)
confirmAudit() {
const auditText = this.goodsAuditForm.auth_flag === 1 ? '通过' : '拒绝';
this.$Modal.confirm({
title: '确认审核',
content: `您确认要审核${auditText} "${this.currentAuditGoods.goodsName}" 吗?`,
loading: true,
onOk: () => {
this.submitAudit();
},
});
},
// 提交审核
submitAudit() {
let formData = new FormData();
formData.append('goodsIds', this.currentAuditGoods.id);
formData.append('authFlag', this.goodsAuditForm.auth_flag === 1 ? 'PASS' : 'REFUSE');
authGoods(formData).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success('审核成功');
this.auditModalVisible = false;
this.getDataList();
this.getNumberData();
}
});
},
// 选择框事件处理
onSelect(selection, row) {
// 单行选择时触发
},
onSelectAll(selection) {
// 全选时触发
},
onSelectionChange(selection) {
this.selectedRows = selection;
},
// 批量上架
batchUpper() {
if (this.selectedRows.length === 0) {
this.$Message.warning('请先选择要上架的商品');
return;
}
const goodsNames = this.selectedRows.map(item => item.goodsName).join('、');
this.$Modal.confirm({
title: '确认批量上架',
content: `您确认要上架以下商品吗?\n${goodsNames}`,
loading: true,
onOk: () => {
// 提取所有选中商品的ID
const goodsIds = this.selectedRows.map(item => item.id);
const params = {
goodsId: goodsIds // 传递ID数组
};
upGoods(params).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success('批量上架成功');
this.selectedRows = [];
this.selectAll = false;
this.getDataList();
this.getNumberData();
}
}).catch(() => {
this.$Modal.remove();
});
}
});
},
// 批量下架
batchLower() {
if (this.selectedRows.length === 0) {
this.$Message.warning('请先选择要下架的商品');
return;
}
const goodsNames = this.selectedRows.map(item => item.goodsName).join('、');
this.$Modal.confirm({
title: '确认批量下架',
content: `您确认要下架以下商品吗?\n${goodsNames}`,
loading: true,
onOk: () => {
// 提取所有选中商品的ID
const goodsIds = this.selectedRows.map(item => item.id);
const params = {
goodsId: goodsIds, // 传递ID数组
reason: '批量下架操作' // 可以设置默认下架原因
};
lowGoods(params).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success('批量下架成功');
this.selectedRows = [];
this.selectAll = false;
this.getDataList();
this.getNumberData();
}
}).catch(() => {
this.$Modal.remove();
});
}
});
},
// 批量审核
batchAudit() {
if (this.selectedRows.length === 0) {
this.$Message.warning('请先选择要审核的商品');
return;
}
// 重置批量审核表单
this.batchAuditForm = {
auth_flag: 1,
reason: ''
};
this.batchAuditModalVisible = true;
},
// 提交批量审核
submitBatchAudit() {
if (this.selectedRows.length === 0) {
this.$Message.warning('请先选择要审核的商品');
return;
}
// 如果是拒绝审核,必须填写原因
if (this.batchAuditForm.auth_flag === 2 && !this.batchAuditForm.reason.trim()) {
this.$Message.warning('审核拒绝时必须填写拒绝原因');
return;
}
const actionText = this.batchAuditForm.auth_flag === 1 ? '通过' : '拒绝';
const goodsNames = this.selectedRows.map(item => item.goodsName).join('、');
this.$Modal.confirm({
title: `确认批量审核${actionText}`,
content: `您确认要${actionText}以下商品的审核吗?\n${goodsNames}`,
loading: true,
onOk: () => {
// 提取所有选中商品的ID
const goodsIds = this.selectedRows.map(item => item.id);
let formData = new FormData();
formData.append('goodsId', goodsIds);
formData.append('authFlag', this.batchAuditForm.auth_flag === 1 ? 'PASS' : 'REFUSE');
formData.append('reason', this.batchAuditForm.reason || '');
// 修正直接调用authGoods不传递'batch'参数
authGoods(formData).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success(`批量审核${actionText}成功`);
this.selectedRows = [];
this.selectAll = false;
this.batchAuditModalVisible = false;
this.getDataList();
this.getNumberData();
}
}).catch(() => {
this.$Modal.remove();
});
}
});
}
},
mounted() {
this.init();
},
};
</script>
<style lang="scss" scoped>
// Tab组件样式
.goods-tab {
::v-deep .ivu-tabs-tab {
font-size: 14px;
}
}
</style>

View File

@@ -15,7 +15,7 @@
v-model="searchForm.goodsName"
placeholder="请输入商品名称"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Form-item label="商品编号" prop="id">
@@ -24,13 +24,15 @@
v-model="searchForm.id"
placeholder="请输入商品编号"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search"
>搜索</Button
>
</Form>
</Card>
<Card>
<Table
:loading="loading"
border
@@ -64,7 +66,7 @@
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -88,7 +90,7 @@ export default {
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "create_time", // 默认排序字段
order: "desc", // 默认排序方式
},
@@ -154,7 +156,12 @@ export default {
},
},
{
title: "店铺名称",
key: "storeName",
minWidth: 100,
tooltip: true,
},
{
title: "操作",
key: "action",
@@ -164,13 +171,12 @@ export default {
render: (h, params) => {
return h("div", [
h(
"Button",
"a",
{
props: {
type: "success",
size: "small",
},
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
marginRight: "5px",
},
on: {
@@ -182,13 +188,17 @@ export default {
"通过"
),
h(
"Button",
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
),
h(
"a",
{
props: {
type: "error",
size: "small",
},
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
marginRight: "5px",
},
on: {
@@ -200,11 +210,17 @@ export default {
"拒绝"
),
h(
"Button",
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
),
h(
"a",
{
props: {
type: 'default',
size: "small",
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none"
},
on: {
click: () => {
@@ -240,7 +256,7 @@ export default {
handleSearch() {
// 搜索
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
getDataList() {
@@ -269,7 +285,11 @@ export default {
content: "您确认要审核" + examine + " " + v.goodsName + " ?",
loading: true,
onOk: () => {
authGoods(v.id, this.goodsAuditForm).then((res) => {
let formData = new FormData();
formData.append('goodsIds', v.id);
formData.append('authFlag', this.goodsAuditForm.authFlag);
authGoods(formData).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("审核成功");

View File

@@ -4,18 +4,19 @@
<Form ref="searchForm" @submit.native.prevent @keydown.enter.native="handleSearch" :model="searchForm" inline :label-width="70"
class="search-form">
<Form-item label="品牌名称">
<Input type="text" v-model="searchForm.name" placeholder="请输入品牌名称" clearable style="width: 200px"/>
<Input type="text" v-model="searchForm.name" placeholder="请输入品牌名称" clearable style="width: 240px"/>
</Form-item>
<Button @click="handleSearch" type="primary">搜索</Button>
</Form>
</Card>
<Card>
<Row class="operation padding-row">
<Button @click="add" type="primary">添加</Button>
<Button @click="refresh">刷新</Button>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
@on-page-size-change="changePageSize" :page-size-opts="[20, 50, 100]" size="small"
show-total show-elevator show-sizer></Page>
</Row>
</Card>
@@ -62,7 +63,7 @@ export default {
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "create_time", // 默认排序字段
order: "desc", // 默认排序方式
},
@@ -152,13 +153,12 @@ export default {
let enableOrDisable = "";
if (params.row.deleteFlag == 0) {
enableOrDisable = h(
"Button",
"a",
{
props: {
size: "small",
type: "error",
},
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
marginRight: "5px",
},
on: {
@@ -171,13 +171,12 @@ export default {
);
} else {
enableOrDisable = h(
"Button",
"a",
{
props: {
type: "success",
size: "small",
},
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
marginRight: "5px",
},
on: {
@@ -191,13 +190,12 @@ export default {
}
return h("div", [
h(
"Button",
"a",
{
props: {
type: "info",
size: "small",
},
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
marginRight: "5px",
},
on: {
@@ -208,17 +206,24 @@ export default {
},
"编辑"
),
enableOrDisable,
h(
"Button",
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
),
enableOrDisable,
h(
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
),
h(
"a",
{
props: {
type: 'default',
size: "small",
},
style: {
marginRight: "5px",
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
@@ -263,7 +268,7 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
// 获取数据
@@ -315,15 +320,7 @@ export default {
delete this.form.id;
this.modalVisible = true;
},
// 刷新
refresh() {
this.loading = true;
setTimeout(() => {
this.getDataList();
this.loading = false;
this.$Message.success("刷新成功");
}, 500);
},
// 编辑
edit(v) {
this.modalType = 1;

View File

@@ -15,54 +15,37 @@
>
<template slot="action" slot-scope="scope">
<Dropdown v-show="scope.row.level == 2" trigger="click">
<Button size="small">
<a class="ops-link">
绑定
<Icon type="ios-arrow-down"></Icon>
</Button>
</a>
<DropdownMenu slot="list">
<DropdownItem @click.native="brandOperation(scope.row)"
>编辑绑定品牌</DropdownItem
>
<DropdownItem @click.native="specOperation(scope.row)"
>编辑绑定规格</DropdownItem
>
<DropdownItem @click.native="parameterOperation(scope.row)"
>编辑绑定参数</DropdownItem
>
<DropdownItem @click.native="brandOperation(scope.row)">编辑绑定品牌</DropdownItem>
<DropdownItem @click.native="specOperation(scope.row)">编辑绑定规格</DropdownItem>
<DropdownItem @click.native="parameterOperation(scope.row)">编辑绑定参数</DropdownItem>
</DropdownMenu>
</Dropdown>
&nbsp;
<span class="ops-sep">|</span>
<Dropdown trigger="click">
<Button size="small">
<a class="ops-link">
操作
<Icon type="ios-arrow-down"></Icon>
</Button>
</a>
<DropdownMenu slot="list">
<DropdownItem @click.native="edit(scope.row)">编辑</DropdownItem>
<DropdownItem
v-if="scope.row.deleteFlag == 1"
@click.native="enable(scope.row)"
>启用</DropdownItem
>
<DropdownItem
v-if="scope.row.deleteFlag == 0"
@click.native="disable(scope.row)"
>禁用</DropdownItem
>
<DropdownItem v-if="scope.row.deleteFlag == 1" @click.native="enable(scope.row)">启用</DropdownItem>
<DropdownItem v-if="scope.row.deleteFlag == 0" @click.native="disable(scope.row)">禁用</DropdownItem>
<DropdownItem @click.native="remove(scope.row)">删除</DropdownItem>
</DropdownMenu>
</Dropdown>
&nbsp;
<Button
v-show="scope.row.level != 2"
type="primary"
@click="addChildren(scope.row)"
size="small"
icon="md-add"
style="margin-right: 5px"
>添加子分类
</Button>
<span v-if="scope.row.level != 2" class="ops-sep">|</span>
<a v-show="scope.row.level != 2" class="ops-link" @click="addChildren(scope.row)">添加子分类</a>
</template>
<template slot="commissionRate" slot-scope="scope">
<priceColorScheme v-if="scope.row.commissionRate > 0" unit="" :color="$mainColor" :value="scope.row.commissionRate">%</priceColorScheme>
<priceColorScheme v-else :value="scope.row.commissionRate" unit="" >%</priceColorScheme>
<!-- {{ scope.row.commissionRate }}% -->
</template>
<template slot="deleteFlag" slot-scope="{ row }">
@@ -107,7 +90,9 @@
<FormItem label="排序值" prop="sortOrder" style="width: 345px">
<InputNumber v-model="formAdd.sortOrder"></InputNumber>
</FormItem>
<FormItem label="佣金比例(%)" prop="commissionRate" style="width: 345px">
<InputNumber :max="100" :min="0" v-model="formAdd.commissionRate"></InputNumber>
</FormItem>
<FormItem label="是否启用" prop="deleteFlag">
<i-switch
size="large"
@@ -232,6 +217,7 @@ export default {
specForm: {}, // 规格数据
// 表单验证规则
formValidate: {
commissionRate: [regular.REQUIRED, regular.INTEGER],
name: [regular.REQUIRED, regular.VARCHAR20],
sortOrder: [regular.REQUIRED, regular.INTEGER],
},
@@ -245,7 +231,12 @@ export default {
title: "状态",
slot: "deleteFlag",
},
{
title: "佣金",
key: "commissionRate",
slot: "commissionRate",
},
{
title: "操作",
key: "action",
@@ -326,7 +317,7 @@ export default {
this.modalTitle = "添加子分类";
this.parentTitle = v.name;
this.formAdd.level = eval(v.level + "+1");
this.formAdd.commissionRate = 0;
this.formAdd.commissionRate = v.commissionRate;
this.showParent = true;
delete this.formAdd.id;
this.formAdd.parentId = v.id;
@@ -341,7 +332,7 @@ export default {
this.formAdd.level = v.level;
this.formAdd.parentId = v.parentId;
this.formAdd.sortOrder = v.sortOrder;
this.formAdd.commissionRate = 0;
this.formAdd.commissionRate = v.commissionRate;
this.formAdd.deleteFlag = v.deleteFlag;
this.formAdd.image = v.image;
this.showParent = false;
@@ -529,11 +520,21 @@ export default {
};
</script>
<style lang="scss" scoped>
/deep/ .ivu-table-wrapper {
::v-deep .ivu-table-wrapper {
overflow: auto;
}
.table {
min-height: 100vh;
height: auto;
}
.ops-link {
color: #2d8cf0;
cursor: pointer;
text-decoration: none;
}
.ops-sep {
display: inline-block;
margin: 0 8px;
color: #dcdee2;
}
</style>

View File

@@ -4,10 +4,12 @@
<Form @submit.native.prevent @keydown.enter.native="handleSearch" ref="searchForm" :model="searchForm" inline :label-width="70"
class="search-form">
<Form-item label="规格名称" prop="specName">
<Input type="text" v-model="searchForm.specName" placeholder="请输入规格名称" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.specName" placeholder="请输入规格名称" clearable style="width: 240px" />
</Form-item>
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
</Form>
</Card>
<Card>
<Row class="operation padding-row">
<Button @click="add" type="primary">添加</Button>
<Button @click="delAll">批量删除</Button>
@@ -17,7 +19,7 @@
</Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator
@on-page-size-change="changePageSize" :page-size-opts="[20, 50, 100]" size="small" show-total show-elevator
show-sizer></Page>
</Row>
</Card>
@@ -59,7 +61,7 @@ export default {
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "asc", // 默认排序方式
},
@@ -108,13 +110,12 @@ export default {
render: (h, params) => {
return h("div", [
h(
"Button",
"a",
{
props: {
type: "info",
size: "small",
},
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
marginRight: "5px",
},
on: {
@@ -126,11 +127,17 @@ export default {
"编辑"
),
h(
"Button",
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
),
h(
"a",
{
props: {
type: "error",
size: "small",
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
@@ -170,14 +177,14 @@ export default {
//搜索参数
handleSearch () {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
//重置搜索参数
handleReset () {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
// 重新加载数据
this.getDataList();
},

View File

@@ -2,33 +2,29 @@
<div>
<Card>
<Row>
<Form ref="searchForm" :model="searchForm" @keydown.enter.native="handleSearch" @submit.native.prevent inline
:label-width="70" class="search-form">
<Form ref="searchForm" :model="searchForm" @keydown.enter.native="handleSearch" @submit.native.prevent inline :label-width="70" class="search-form">
<Form-item label="会员名称" prop="memberName">
<Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 240px"/>
</Form-item>
<Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button>
</Form>
</Row>
</Card>
<Card>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10">
<!-- 页面展示 -->
<template slot="shopDisableSlot" slot-scope="scope">
<i-switch size="large" true-value="OPEN" false-value="CLOSE" v-model="scope.row.status"
@on-change="changeSwitch(scope.row)">
@on-change="changeSwitch(scope.row)">
<span slot="open">展示</span>
<span slot="close">隐藏</span>
</i-switch>
</template>
<!-- 回复状态 -->
<template slot="replyStatus" slot-scope="scope">
<Tag v-if="scope.row.replyStatus" color="green">已回复</Tag>
<Tag v-if="!scope.row.replyStatus" color="red">未回复</Tag>
</template>
</Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator
show-sizer></Page>
@on-page-size-change="changePageSize" :page-size-opts="[20, 50, 100]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
</Card>
<!-- 评价详情 -->
@@ -42,7 +38,7 @@
<div class="show">
<label>页面展示</label>
<i-switch size="large" true-value="OPEN" false-value="CLOSE" v-model="infoData.status"
@on-change="changeSwitchView" style="margin-top: 3px">
@on-change="changeSwitchView" style="margin-top: 3px">
<span slot="open">展示</span>
<span slot="close">隐藏</span>
</i-switch>
@@ -51,6 +47,7 @@
<div class="right-container">
<div class="border-b">{{ infoData.goodsName }}</div>
<div class="border-b">
<div class="div-height"> 店铺名称{{ infoData.storeName }}</div>
<div class="div-height"> 订单号{{ infoData.orderNo }}</div>
</div>
@@ -59,86 +56,55 @@
<ListItem>
<ListItemMeta :avatar="infoData.memberProfile" :title="infoData.memberName"
:description="infoData.content" />
:description="infoData.content"/>
</ListItem>
<div class="score-content">
<span>物流评分{{ infoData.deliveryScore }}</span>
<span>服务评分{{ infoData.serviceScore }}</span>
<span>描述评分{{ infoData.descriptionScore }}</span>
<span>物流评分{{infoData.deliveryScore}}</span>
<span>服务评分{{infoData.serviceScore}}</span>
<span>描述评分{{infoData.descriptionScore}}</span>
</div>
<div class="" v-if="infoData.haveImage">
评价图
<div style="margin-left: 40px">
<template v-if="infoData.images && infoData.images.length">
<img style="width: 100px;height: 110px;margin-left: 2px"
v-for="(img, index) in infoData.images.split(',')" :src="img" alt="" :key="index" />
v-for="(img,index) in infoData.images.split(',')" :src="img"
alt="" :key="index"/>
</template>
</div>
</div>
</List>
</div>
<div class="mt_10">
<Form ref="form" :model="replyForm" :label-width="100">
<FormItem prop="reply" label="平台回复">
<Input :disabled="infoData.replyStatus" show-word-limit v-model="replyForm.reply" type="textarea" />
</FormItem>
<FormItem prop="reply" label="回复图片">
<vuedraggable :animation="200" :list="replyForm.replyImage">
<div v-for="(item, __index) in replyForm.replyImage" :key="__index" class="demo-upload-list">
<template>
<img :src="item" />
<div class="demo-upload-list-cover">
<div>
<Icon size="30" type="md-search" @click.native="handleViewGoodsPicture(item)"></Icon>
<Icon size="30" v-if="!infoData.replyStatus" type="md-trash" @click.native="handleRemoveGoodsPicture(item)"></Icon>
</div>
</div>
</template>
</div>
</vuedraggable>
<Button v-if="!infoData.replyStatus" @click="openPicModel">上传图片</Button>
</FormItem>
</Form>
<div class="border-b" v-if="infoData.reply">
<div>
<div>
<div style="float: left"> 商家回复</div>
<div style="margin-left: 60px">{{ infoData.reply }}</div>
</div>
<div v-if="infoData.haveReplyImage">
<div style="margin-left: 60px">
<template v-if="infoData.replyImage && infoData.replyImage.length">
<img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')" :key="index"
:src="img" alt=""/>
</template>
</div>
</div>
</div>
</div>
</div>
</div>
<div slot="footer">
<Button @click="infoFlag = false">取消</Button>
<Button type="error" :loading="modalLoading" @click="reply">提交</Button>
</div>
</Modal>
<Modal v-model="picModelFlag" width="1200px" @on-ok="confirmUrls">
<ossManage ref="ossManage" :isComponent="true" :initialize="picModelFlag" @callback="callbackSelected"
@selected="(list) => { selectedImage = list }" />
</Modal>
<Modal v-model="goodsPictureVisible" title="View Image">
<img v-if="goodsPictureVisible" :src="previewGoodsPicture" style="width: 100%" />
</Modal>
</div>
</template>
<script>
import * as API_Member from "@/api/member";
import vuedraggable from "vuedraggable";
import ossManage from "@/views/sys/oss-manage/ossManage";
import { replyMemberComment } from '@/api/shops'
export default {
name: "goods-review", // 会员评价
components: {
vuedraggable,
ossManage
},
data() {
return {
modalLoading:false,
picModelFlag: false,
previewGoodsPicture: "",
replyForm: {
reply: '',
replyImage: []
},
infoData: {}, // 商品信息
infoFlag: false, // 评价展示
infoTitle: "", // modal名称
@@ -146,14 +112,12 @@ export default {
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
startDate: "", // 起始时间
endDate: "", // 终止时间
},
goodsPictureVisible: false,
selectedImage: [],
columns: [
// 表头
{
@@ -177,11 +141,11 @@ export default {
width: 90,
render: (h, params) => {
if (params.row.grade == "GOOD") {
return h("Tag", { props: { color: "green", }, }, "好评");
return h("Tag", {props: {color: "green",},}, "好评");
} else if (params.row.grade == "MODERATE") {
return h("Tag", { props: { color: "orange", }, }, "中评");
return h("Tag", {props: {color: "orange",},}, "中评");
} else {
return h("Tag", { props: { color: "red", }, }, "差评");
return h("Tag", {props: {color: "red",},}, "差评");
}
}
},
@@ -189,21 +153,21 @@ export default {
title: "物流评分",
key: "deliveryScore",
render: (h, params) => {
return h('div', params.row.deliveryScore || 5 + '星')
return h('div',params.row.deliveryScore || 5 + '星')
},
},
{
title: "服务评分",
key: "deliveryScore",
render: (h, params) => {
return h('div', params.row.serviceScore || 5 + '星')
return h('div',params.row.serviceScore || 5 + '星')
},
},
{
title: "描述评分",
key: "deliveryScore",
render: (h, params) => {
return h('div', params.row.descriptionScore || 5 + '星')
return h('div',params.row.descriptionScore || 5 + '星')
},
},
{
@@ -212,14 +176,6 @@ export default {
align: "left",
width: 170
},
{
title: "回复状态",
key: "replyStatus",
align: "left",
width: 100,
slot: "replyStatus",
},
{
title: "页面展示",
key: "shopDisable",
@@ -233,18 +189,15 @@ export default {
width: 150,
align: "center",
fixed: "right",
render: (h, params) => {
return h("div", [
return h("div", { class: "ops" }, [
h(
"Button",
"a",
{
props: {
size: "small",
type: "info",
},
style: {
marginRight: "5px",
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
@@ -255,22 +208,38 @@ export default {
"查看"
),
h(
"Button",
"span",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
margin: "0 8px",
color: "#dcdee2",
},
},
"|"
),
h(
"Poptip",
{
props: { confirm: true, title: "确认删除" },
on: {
click: () => {
"on-ok": () => {
this.remove(params.row);
},
},
},
"删除"
[
h(
"a",
{
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
},
"删除"
),
]
),
]);
},
@@ -281,57 +250,10 @@ export default {
};
},
methods: {
// 回复
async reply(){
try {
if(!this.replyForm.reply){
this.$Message.warning('请输入回复内容')
return
}
this.modalLoading = true
const params = JSON.parse(JSON.stringify(this.replyForm))
params.replyImage = params.replyImage.join(",")
params.id = this.infoData.id
const res = await replyMemberComment(this.infoData.id,params)
if(res.success){
this.modalLoading = false
this.$Message.success('回复成功')
this.infoFlag = false
this.init()
}
} catch (error) {
this.modalLoading = false
}
},
// 查看商品大图
handleViewGoodsPicture(url) {
this.previewGoodsPicture = url;
this.goodsPictureVisible = true;
},
// 移除商品图片
handleRemoveGoodsPicture(file) {
this.replyForm.replyImage =
this.replyForm.replyImage.filter((i) => i !== file);
},
// 图片选择后回调
callbackSelected(val) {
this.picModelFlag = false;
this.replyForm.replyImage.push(val.url);
},
openPicModel() {
this.$refs.ossManage.selectImage = true;
this.picModelFlag = true
},
confirmUrls() {
},
// 切换查看switch
changeSwitchView(val) {
let status = val;
API_Member.updateMemberReview(this.infoData.id, { status }).then(
API_Member.updateMemberReview(this.infoData.id, {status}).then(
(res) => {
this.$Message.success("修改成功!");
this.init();
@@ -346,6 +268,7 @@ export default {
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
// 分页 改变页数
changePageSize(v) {
@@ -355,13 +278,13 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
//列表直接选择页面是否展示
changeSwitch(v) {
let status = v.status;
API_Member.updateMemberReview(v.id, { status: status }).then((res) => {
API_Member.updateMemberReview(v.id, {status: status}).then((res) => {
this.init();
});
},
@@ -385,8 +308,6 @@ export default {
API_Member.getMemberInfoReview(v.id).then((res) => {
if (res.result) {
this.infoData = res.result;
this.replyForm.reply = res.result.reply;
this.replyForm.replyImage = res.result.replyImage ? res.result.replyImage.split(",") : [];
}
});
},
@@ -425,24 +346,20 @@ export default {
width: 100%;
height: 100%;
}
img {
vertical-align: middle;
border-style: none;
}
.product {
width: 140px;
height: 160px;
border: 1px solid #d9d9d9;
border-radius: 3px;
}
.show {
label {
.show{
label{
font-size: 14px;
}
margin-top: 15px;
}
@@ -454,7 +371,6 @@ label {
float: left;
margin-right: 2px;
}
.border-b {
border-bottom: 1px solid #e9e9e9;
width: 500px;
@@ -462,68 +378,21 @@ label {
position: relative;
margin-top: 12px;
}
.div-height {
.div-height{
line-height: 25px;
}
.score-content {
margin: 5px 0;
span {
margin-right: 20px;
}
span{margin-right: 20px;}
}
.demo-upload-list {
width: 150px;
height: 150px;
text-align: center;
border: 1px solid transparent;
border-radius: 4px;
.ops a {
color: #2d8cf0;
cursor: pointer;
text-decoration: none;
}
.ops span {
display: inline-block;
background: #fff;
position: relative;
margin-right: 4px;
vertical-align: bottom;
margin: 0 8px;
color: #dcdee2;
}
.demo-upload-list:hover .demo-upload-list-cover {
display: flex;
}
.demo-upload-list img {
width: 100%;
height: 100%;
}
.demo-upload-list-cover {
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
justify-content: space-between;
align-items: center;
flex-direction: column;
}
.demo-upload-list:hover .demo-upload-list-cover {
display: flex;
}
.demo-upload-list-cover div {
margin-top: 50px;
width: 100%;
>i {
width: 50%;
margin-top: 8px;
color: #fff;
font-size: 20px;
cursor: pointer;
}
}
</style>

View File

@@ -1,60 +0,0 @@
<template>
<div class="goods-operation">
<div class="step-list">
<steps :current="activestep" style="height:60px;margin-top: 10px">
<step title="选择商品品类"/>
<step title="填写商品详情"/>
<step title="商品发布成功"/>
</steps>
</div>
<!-- 第一步 选择分类 -->
<first-step ref='first' v-show="activestep === 0" @change="getFirstData"></first-step>
<!-- 第二步 商品详细信息 -->
<second-step ref='second' :firstData="firstData" v-if="activestep === 1"></second-step>
<!-- 第三步 发布完成 -->
<third-step ref='third' v-if="activestep === 2"></third-step>
</div>
</template>
<script>
import firstStep from './goodsOperationFirst'
import secondStep from './goodsOperationSec'
import thirdStep from './goodsOperationThird'
export default {
name: "addGoods",
components: {
firstStep,
secondStep,
thirdStep
},
data() {
return {
/** 当前激活步骤*/
activestep: 0,
firstData: {}, // 第一步传递的数据
};
},
methods: {
// 选择商品分类回调
getFirstData (item) {
this.firstData = item;
this.activestep = 1;
}
},
mounted() {
// 编辑商品、模板
if (this.$route.query.id || this.$route.query.draftId) {
this.activestep = 1;
} else {
this.activestep = 0
this.$refs.first.selectGoodsType = true;
}
}
};
</script>
<style lang="scss" scoped>
@import "./addGoods.scss";
</style>

View File

@@ -1,260 +0,0 @@
<template>
<div>
<!-- 选择商品类型 -->
<Modal v-model="selectGoodsType" width="550" :closable="false">
<div class="goods-type-list" v-if="!showGoodsTemplates">
<div
class="goods-type-item"
:class="{ 'active-goods-type': item.check }"
@click="handleClickGoodsType(item)"
v-for="(item, index) in goodsTypeWay"
:key="index"
>
<img :src="item.img" />
<div>
<h2>{{ item.title }}</h2>
<p>{{ item.desc }}</p>
</div>
</div>
</div>
<div v-else class="goods-type-list">
<h2 @click="showGoodsTemplates = !showGoodsTemplates">返回</h2>
<div class="goods-list-box">
<Scroll :on-reach-bottom="handleReachBottom">
<div
class="goods-type-item template-item"
@click="handleClickGoodsTemplate(item)"
v-for="(item, tempIndex) in goodsTemplates"
:key="tempIndex"
>
<img :src="item.thumbnail" />
<div>
<h2>{{ item.goodsName }}</h2>
<p>{{ item.sellingPoint || "" }}</p>
</div>
</div>
</Scroll>
</div>
</div>
</Modal>
<!-- 商品分类 -->
<div class="content-goods-publish">
<div class="goods-category">
<ul v-if="categoryListLevel1.length > 0">
<li
v-for="(item, index) in categoryListLevel1"
:class="{ activeClass: category[0].name === item.name }"
@click="handleSelectCategory(item, index, 1)"
:key="index"
>
<span>{{ item.name }}</span>
<span>&gt;</span>
</li>
</ul>
<ul v-if="categoryListLevel2.length > 0">
<li
v-for="(item, index) in categoryListLevel2"
:class="{ activeClass: category[1].name === item.name }"
@click="handleSelectCategory(item, index, 2)"
:key="index"
>
<span>{{ item.name }}</span>
<span>&gt;</span>
</li>
</ul>
<ul v-if="categoryListLevel3.length > 0">
<li
v-for="(item, index) in categoryListLevel3"
:class="{ activeClass: category[2].name === item.name }"
@click="handleSelectCategory(item, index, 3)"
:key="index"
>
<span>{{ item.name }}</span>
</li>
</ul>
</div>
<p class="current-goods-category">
您当前选择的商品类别是
<span>{{ category[0].name }}</span>
<span v-show="category[1].name">> {{ category[1].name }}</span>
<span v-show="category[2].name">> {{ category[2].name }}</span>
</p>
<template v-if="selectedTemplate.goodsName">
<Divider>已选商品模版:{{ selectedTemplate.goodsName }}</Divider>
</template>
</div>
<!-- 底部按钮 -->
<div class="footer">
<ButtonGroup>
<Button type="primary" @click="selectGoodsType = true">商品类型</Button>
<Button type="primary" @click="next">下一步</Button>
</ButtonGroup>
</div>
</div>
</template>
<script>
import * as API_GOODS from "@/api/goods";
export default {
data() {
return {
selectedTemplate: {}, // 已选模板
selectGoodsType: false, // 展示选择商品分类modal
goodsTemplates: [], // 商品模板列表
showGoodsTemplates: false, //是否显示选择商品模板
goodsTypeWay: [
{
title: "实物商品",
img: require("@/assets/goodsType1.png"),
desc: "零售批发,物流配送",
type: "PHYSICAL_GOODS",
check: false,
},
{
title: "虚拟商品",
img: require("@/assets/goodsType2.png"),
desc: "虚拟核验,无需物流",
type: "VIRTUAL_GOODS",
check: false,
},
{
title: "商品模板导入",
img: require("@/assets/goodsTypeTpl.png"),
desc: "商品模板,一键导入",
check: false,
},
],
// 商品分类选择数组
category: [
{ name: "", id: "" },
{ name: "", id: "" },
{ name: "", id: "" },
],
// 商品类型
goodsType: "",
/** 1级分类列表*/
categoryListLevel1: [],
/** 2级分类列表*/
categoryListLevel2: [],
/** 3级分类列表*/
categoryListLevel3: [],
searchParams: {
saveType: "TEMPLATE",
sort: "create_time",
order: "desc",
pageSize: 10,
pageNumber: 1,
},
templateTotal: 0,
};
},
methods: {
// 商品模版触底加载
handleReachBottom() {
setTimeout(() => {
if (
this.searchParams.pageNumber * this.searchParams.pageSize <=
this.templateTotal
) {
this.searchParams.pageNumber++;
this.GET_GoodsTemplate();
}
}, 1000);
},
// 点击商品类型
handleClickGoodsType(val) {
this.goodsTypeWay.map((item) => {
return (item.check = false);
});
val.check = !val.check;
if (!val.type) {
this.GET_GoodsTemplate();
this.showGoodsTemplates = true;
} else {
this.goodsType = val.type;
this.selectedTemplate = {};
}
},
// 点击商品模板
handleClickGoodsTemplate(val) {
this.selectedTemplate = val;
this.selectGoodsType = false;
this.$emit("change", { tempId: val.id });
},
// 获取商品模板
GET_GoodsTemplate() {
API_GOODS.getDraftGoodsListData(this.searchParams).then((res) => {
if (res.success) {
this.goodsTemplates.push(...res.result.records);
this.templateTotal = res.result.total;
}
});
},
/** 选择商城商品分类 */
handleSelectCategory(row, index, level) {
if (level === 1) {
this.category.forEach((cate) => {
(cate.name = ""), (cate.id = "");
});
this.category[0].name = row.name;
this.category[0].id = row.id;
this.categoryListLevel2 = this.categoryListLevel1[index].children;
this.categoryListLevel3 = [];
} else if (level === 2) {
this.category[1].name = row.name;
this.category[1].id = row.id;
this.category[2].name = "";
this.category[2].id = "";
this.categoryListLevel3 = this.categoryListLevel2[index].children;
} else {
this.category[2].name = row.name;
this.category[2].id = row.id;
}
},
/** 查询下一级 商城商品分类*/
GET_NextLevelCategory(row) {
const _id = row && row.id !== 0 ? row.id : 0;
API_GOODS.getCategoryTree().then((res) => {
if (res.success && res.result) {
this.categoryListLevel1 = res.result;
}
});
},
// 下一步
next() {
window.scrollTo(0, 0);
if (!this.goodsType && !this.selectedTemplate.goodsName) {
this.$Message.error("请选择商品类型");
return;
}
if (!this.category[0].name) {
this.$Message.error("请选择商品分类");
return;
} else if (!this.category[2].name) {
this.$Message.error("必须选择到三级分类");
return;
} else if (this.category[2].name) {
let params = {
category: this.category,
goodsType: this.goodsType,
};
if (this.selectedTemplate.id) {
params.tempId = this.selectedTemplate.id;
this.$emit("change", params);
} else {
this.$emit("change", params);
}
}
},
},
mounted() {
this.GET_NextLevelCategory();
},
};
</script>
<style lang="scss" scoped>
@import "./addGoods.scss";
/deep/ .ivu-scroll-container {
height: 450px !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1,38 +0,0 @@
<template>
<div class="content-goods-publish">
<div class="success" style="text-align: left">
<h1>恭喜您商品发布成功!</h1>
<div class="goToGoodsList" @click="gotoGoodsList">
<a>去店铺查看商品列表>></a>
</div>
<div class="operation">
<h3>您还可以</h3>
<div>
1继续
<a @click="gotoBack">发布商品</a>
</div>
<div>
2管理
<a @click="gotoGoodsList">商品列表</a>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
methods: {
// 跳转商品列表
gotoGoodsList() {
this.$router.push({name: "managerGoods"});
},
// 刷新页面
gotoBack() {
this.$router.go();
},
}
}
</script>
<style lang="scss" scoped>
@import "./addGoods.scss";
</style>

View File

@@ -10,7 +10,7 @@ h4 {
margin: 20px 0;
font-size: 18px;
}
/deep/ .ivu-icon {
::v-deep .ivu-icon {
margin-left: 40px;
margin-right: 40px;
}

View File

@@ -31,7 +31,15 @@
<div>订单数量</div>
</div>
</div>
<div class="count-item" @click="navigateTo('shopList')">
<div>
<Icon class="icon" size="31" type="ios-stats" />
</div>
<div>
<div class="counts">{{ homeData.storeNum || 0 }}</div>
<div>店铺数量</div>
</div>
</div>
</div>
</div>
@@ -175,7 +183,15 @@
></Table>
</div>
<!-- top10店铺 -->
<div class="card transform">
<h4>热卖店铺TOP10</h4>
<Table
stripe
:columns="tophotShopsColumns"
:data="topHotShopsData"
></Table>
</div>
</div>
</template>
@@ -190,7 +206,40 @@ export default {
data() {
return {
// 测试数据
test: {
a: "test",
languages: [],
},
// 测试数据结束
tophotShopsColumns: [
// 表格表头
{
type: "index",
width: 100,
title: "排名",
align: "center",
},
{
title: "店铺名称",
key: "storeName",
},
{
title: "价格",
key: "price",
render: (h, params) => {
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
},
},
{
title: "销量",
key: "num",
width: 100,
sortable: true,
},
],
tophotGoodsColumns: [
{
@@ -219,6 +268,7 @@ export default {
},
],
topHotGoodsData: [], //热卖商品集合
topHotShopsData: [], //热卖店铺集合
awaitTodoData: "", //今日待办集合
homeData: "", // 首页数据
pvChart: "", // 流量统计
@@ -250,7 +300,11 @@ export default {
res.success ? (this.topHotGoodsData = res.result) : "";
},
// top10热卖店铺
async topHotShops() {
let res = await hotShops(this.params);
res.success ? (this.topHotShopsData = res.result) : "";
},
// 今日待办
async awaitTodo() {
let res = await getNoticePage();
@@ -475,6 +529,7 @@ export default {
// 初始化信息
init() {
this.toHotGoods();
this.topHotShops();
this.awaitTodo();
this.getHomeData();
this.getPvChart();

View File

@@ -1,382 +0,0 @@
<template>
<div class="search">
<Card>
<Row class="operation padding-row">
<Button @click="add" type="primary">添加</Button>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
<!-- 页面展示 -->
<template slot="disableSlot" slot-scope="{row}">
<i-switch size="large" :true-value="true" :false-value="false" :value="row.switch"
@on-change="changeSwitch(row)">
<span slot="open">开启</span>
<span slot="close">禁用</span>
</i-switch>
</template>
</Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator
show-sizer></Page>
</Row>
</Card>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
<Form ref="form" :model="form" :label-width="120" :rules="formValidate">
<FormItem label="物流公司名称" prop="name">
<Input v-model="form.name" clearable style="width: 100%" />
</FormItem>
<FormItem label="物流公司代码" prop="code">
<Input v-model="form.code" clearable style="width: 100%" />
</FormItem>
<FormItem label="支持电子面单">
<i-switch v-model="form.standBy" size="large">
<span slot="open"></span>
<span slot="close"></span>
</i-switch>
</FormItem>
<Card v-if="form.standBy === true" class="modalStyle">
<h3 style="color: #ff3c2a; margin-bottom: 10px">请输入详细信息</h3>
<Form ref="formValidate" :label-width="150" label-position="right" :model="faceSheetForm"
:rules="ruleValidate">
<FormItem label="customerName" prop="customerName">
<Input v-model="faceSheetForm.customerName" type="text" class="faceSheetInput"></Input>
</FormItem>
<FormItem label="customerPwd" prop="customerPwd">
<Input v-model="faceSheetForm.customerPwd" type="text" class="faceSheetInput"></Input>
</FormItem>
<FormItem label="monthCode" prop="monthCode">
<Input v-model="faceSheetForm.monthCode" type="text" class="faceSheetInput"></Input>
</FormItem>
<FormItem label="sendSite" prop="sendSite">
<Input v-model="faceSheetForm.sendSite" type="text" class="faceSheetInput"></Input>
</FormItem>
<FormItem label="sendStaff" prop="sendStaff">
<Input v-model="faceSheetForm.sendStaff" type="text" class="faceSheetInput"></Input>
</FormItem>
<FormItem label="支付方式" prop="payType">
<Select v-model="faceSheetForm.payType" class="faceSheetInput">
<Option value="1">现付</Option>
<Option value="2">到付</Option>
<Option value="3">月结</Option>
<Option value="4">第三方支付(仅SF支持)</Option>
</Select>
</FormItem>
<FormItem label="快递类型" prop="expType">
<Input v-model="faceSheetForm.expType" type="text" class="faceSheetInput" />
</FormItem>
<div style="width:100%;text-align:center;">
<a style="padding-right: 20px" @click="frontDownload('use')">使用说明</a>
<a @click="frontDownload('type')">快递类型</a>
</div>
</Form>
</Card>
<!-- <FormItem label="禁用状态" prop="disabled">
<i-switch true-value="OPEN" false-value="CLOSE" v-model="form.disabled" size="large">
<span slot="open">开启</span>
<span slot="close">禁用</span>
</i-switch>
</FormItem> -->
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交
</Button>
</div>
</Modal>
</div>
</template>
<script>
import {
getLogisticsPage,
updateLogistics,
addLogistics,
delLogistics,
} from "@/api/logistics";
export default {
name: "logistics",
data() {
return {
faceSheetForm: {
faceSheetFlag: true,
customerName: "",
payType: '1',
expType: '1',
customerPwd: "",
monthCode: "",
sendSite: "",
sendStaff: "",
},
ruleValidate: {
// customerName: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
// payType: [{ required: true, message: "请填写必填项" ,trigger: "change" }],
// expType: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
// customerPwd: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
// monthCode: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
// sendSite: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
// sendStaff: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
},
openText: false,
loading: true, // 表单加载状态
modalVisible: false, // 添加或编辑显示
modalTitle: "", // 添加或编辑标题
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
name: "",
},
form: {
// 添加或编辑表单对象初始化数据
name: "",
disabled: "OPEN"
},
// 表单验证规则
formValidate: {
name: [
{
required: true,
message: "请输入物流公司名称",
trigger: "blur",
},
],
code: [
{
required: true,
message: "请输入物流公司代码",
trigger: "blur",
},
],
},
submitLoading: false, // 添加或编辑提交状态
columns: [
{
title: "物流公司名称",
key: "name",
minWidth: 120,
sortable: false,
},
{
title: "物流公司编码",
key: "code",
minWidth: 120,
sortable: false,
},
{
title: "创建时间",
key: "createTime",
width: 180,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 150,
render: (h, params) => {
return h("div", [
h(
"Button",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.detail(params.row);
},
},
},
"修改"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.remove(params.row);
},
},
},
"删除"
),
]);
},
},
],
data: [], // 表单数据
total: 0, // 表单数据总数
};
},
methods: {
frontDownload(val) {
var a = document.createElement("a"); //创建一个<a></a>标签
//根据点击按钮来下载不同文件
if (val === 'use') {
a.href = "static/instructions.xlsx"; // 给a标签的href属性值加上地址注意这里是绝对路径不用加 点.
a.download = "使用说明.xlsx"; //设置下载文件文件名,这里加上.xlsx指定文件类型pdf文件就指定.fpd即可
} else if (val === 'type') {
a.href = "static/logisticsType.xlsx"; // 给a标签的href属性值加上地址注意这里是绝对路径不用加 点.
a.download = "快递类型.xlsx"; //设置下载文件文件名,这里加上.xlsx指定文件类型pdf文件就指定.fpd即可
}
a.style.display = "none"; // 障眼法藏起来a标签
document.body.appendChild(a); // 将a标签追加到文档对象中
a.click(); // 模拟点击了a标签会触发a标签的href的读取浏览器就会自动下载了
a.remove(); // 一次性的用完就删除a标签
},
// 初始化
init() {
this.getDataList();
},
// 分页 改变页码
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
},
// 分页 改变页数
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
// 获取列表
getDataList() {
this.loading = true;
getLogisticsPage(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
const data = res.result.records;
data.forEach(e => {
e.switch = e.disabled === 'OPEN' ? true : false;
e.standBy = e.standBy == 'null' || !e.standBy ? false : true;
});
this.data = data;
console.log(data)
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
// switch 切换状态
changeSwitch(v) {
this.form.name = v.name;
this.form.code = v.code;
this.form.standBy = v.standBy;
this.form.disabled = v.disabled === 'CLOSE' ? 'OPEN' : 'CLOSE';
updateLogistics(v.id, this.form).then((res) => {
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
// 确认提交
handleSubmit() {
console.log('1', 1)
this.$refs.form.validate((valid) => {
console.log(valid)
if (valid) {
// this.submitLoading = true;
console.log(params, 'params', { ...this.form, ...this.faceSheetForm })
const params = { ...this.form, ...this.faceSheetForm }
console.log(params, 'params')
if (this.modalTitle == "添加") {
// 添加 避免编辑后传入id等数据 记得删除
delete params.id;
params.disabled = 'OPEN'
addLogistics(params).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
params.disabled = 'OPEN'
// 编辑
updateLogistics(this.id, params).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
// 添加信息
add() {
this.modalTitle = "添加";
this.form = {};
this.$refs.form.resetFields();
this.faceSheetForm = {};
this.modalVisible = true;
},
// 编辑
detail(v) {
this.id = v.id;
this.modalTitle = "修改";
this.modalVisible = true;
this.form.name = v.name;
this.form.code = v.code;
this.$set(this.form, 'standBy', v.standBy);
console.log(v)
// this.form.disabled = v.disabled
this.form.disabled = 'OPEN'
},
// 删除物流公司
remove(v) {
this.$Modal.confirm({
title: "确认删除",
// 记得确认修改此处
content: "您确认要删除 " + v.name + " ?",
loading: true,
onOk: () => {
// 删除
delLogistics(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script>

View File

@@ -1,21 +1,321 @@
<template>
<div>
<company />
<div class="search">
<Card>
<Row class="operation padding-row">
<Button @click="add" type="primary">添加</Button>
</Row>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
>
<!-- 页面展示 -->
<template slot="disableSlot" slot-scope="{row}">
<i-switch size="large" :true-value="true" :false-value="false" :value="row.switch" @on-change="changeSwitch(row)">
<span slot="open">开启</span>
<span slot="close">禁用</span>
</i-switch>
</template>
</Table>
<Row type="flex" justify="end" class="mt_10">
<Page
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</Card>
<Modal
:title="modalTitle"
v-model="modalVisible"
:mask-closable="false"
:width="500"
>
<Form ref="form" :model="form" :label-width="120" :rules="formValidate">
<FormItem label="物流公司名称" prop="name">
<Input v-model="form.name" clearable style="width: 100%"/>
</FormItem>
<FormItem label="物流公司代码" prop="code">
<Input v-model="form.code" clearable style="width: 100%"/>
</FormItem>
<FormItem label="支持电子面单">
<i-switch v-model="form.standBy" size="large">
<span slot="open"></span>
<span slot="close"></span>
</i-switch>
</FormItem>
<FormItem label="禁用状态" prop="disabled">
<i-switch true-value="OPEN" false-value="CLOSE" v-model="form.disabled" size="large">
<span slot="open">开启</span>
<span slot="close">禁用</span>
</i-switch>
</FormItem>
</Form>
<div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
>提交
</Button
>
</div>
</Modal>
</div>
</template>
<script>
import company from './company.vue'
export default {
components: {
company,
},
data() {
return {
import {
getLogisticsPage,
updateLogistics,
addLogistics,
delLogistics,
} from "@/api/logistics";
}
}
}
export default {
name: "logistics",
data() {
return {
loading: true, // 表单加载状态
modalVisible: false, // 添加或编辑显示
modalTitle: "", // 添加或编辑标题
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
name: "",
},
form: {
// 添加或编辑表单对象初始化数据
name: "",
disabled:"CLOSE"
},
// 表单验证规则
formValidate: {
name: [
{
required: true,
message: "请输入物流公司名称",
trigger: "blur",
},
],
},
submitLoading: false, // 添加或编辑提交状态
columns: [
{
title: "物流公司名称",
key: "name",
minWidth: 120,
sortable: false,
},
{
title: "物流公司编码",
key: "code",
minWidth: 120,
sortable: false,
},
{
title: "状态",
key: "disabled",
width: 150,
slot: "disableSlot",
},
{
title: "创建时间",
key: "createTime",
width: 180,
sortable: false,
},
{
title: "操作",
key: "action",
align: "center",
width: 150,
render: (h, params) => {
return h("div", [
h(
"Button",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.detail(params.row);
},
},
},
"修改"
),
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.remove(params.row);
},
},
},
"删除"
),
]);
},
},
],
data: [], // 表单数据
total: 0, // 表单数据总数
};
},
methods: {
// 初始化
init() {
this.getDataList();
},
// 分页 改变页码
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
},
// 分页 改变页数
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
// 获取列表
getDataList() {
this.loading = true;
getLogisticsPage(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
const data = res.result.records;
data.forEach(e => {
e.switch = e.disabled === 'OPEN' ? true : false;
e.standBy = e.standBy == 'null' || !e.standBy ? false : true;
});
this.data = data;
console.log(data)
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
// switch 切换状态
changeSwitch (v) {
this.form.name = v.name;
this.form.code = v.code;
this.form.standBy = v.standBy;
this.form.disabled = v.disabled === 'CLOSE' ? 'OPEN' : 'CLOSE';
updateLogistics(v.id, this.form).then((res) => {
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
// 确认提交
handleSubmit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.submitLoading = true;
if (this.modalTitle == "添加") {
// 添加 避免编辑后传入id等数据 记得删除
delete this.form.id;
addLogistics(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
} else {
// 编辑
updateLogistics(this.id, this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
this.modalVisible = false;
}
});
}
}
});
},
// 添加信息
add() {
this.modalTitle = "添加";
this.form = {};
this.$refs.form.resetFields();
this.modalVisible = true;
},
// 编辑
detail(v) {
this.id = v.id;
this.modalTitle = "修改";
this.modalVisible = true;
this.form.name = v.name;
this.form.code = v.code;
console.log(v)
this.form.standBy = v.standBy;
this.form.disabled = v.disabled
},
// 删除物流公司
remove(v) {
this.$Modal.confirm({
title: "确认删除",
// 记得确认修改此处
content: "您确认要删除 " + v.name + " ?",
loading: true,
onOk: () => {
// 删除
delLogistics(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
},
mounted() {
this.init();
},
};
</script>
<style lang="scss" scoped></style>

View File

@@ -1,633 +0,0 @@
<template>
<div class="search">
<Card>
<Row>
<Button @click="refresh">刷新</Button>
<Button @click="add" type="primary">添加</Button>
</Row>
<Tabs @on-click="handleClickType" v-model="currentTab" style="margin-top: 10px">
<TabPane label="运费模板" name="INFO">
<table class="ncsc-default-table order m-b-30" :key="index" v-for="(item,index) in shipInfo">
<tbody>
<tr>
<td class="sep-row" colspan="20"></td>
</tr>
<tr>
<th colspan="20">
<span class="temp-name">{{item.name}}</span>
<Tag v-if="item.pricingMethod==='FREE'" class="baoyou" color="warning">包邮</Tag>
<span class="fr m-r-5">
<time style="margin-right: 20px" title="最后编辑时间">
<i class="icon-time"></i>{{item.updateTime}}
</time>
<Button @click="edit(item)" type="info">修改</Button>
<Button @click="remove(item.id)" type="error">删除</Button>
</span>
</th>
</tr>
<tr v-if="item.pricingMethod!=='FREE'">
<td class="w10 bdl"></td>
<td class="cell-area tl w150">运送到</td>
<td class="w150">首件()</td>
<td class="w150">运费</td>
<td class="w150">续件()</td>
<td class="w150 bdr">运费</td>
</tr>
<template v-if="item.pricingMethod!=='FREE'">
<tr v-for="(children,index) in item.freightTemplateChildList" :key="index">
<td class="bdl"></td>
<td class="cell-area tl w150" style="width: 60%;white-space:normal;">{{children.area}}</td>
<td>
{{children.firstCompany}}
</td>
<td>
<span class="yuan"></span><span class="integer">{{children.firstPrice | unitPrice}}</span>
</td>
<td>
{{children.continuedCompany}}
</td>
<td class="bdr">
<span class="yuan"></span><span class="integer">{{children.continuedPrice | unitPrice}}</span>
</td>
</tr>
</template>
</tbody>
</table>
</TabPane>
<TabPane v-if="csTab" :label="title" :name="operation">
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
<FormItem label="模板名称" prop="name">
<Input v-model="form.name" maxlength="10" clearable style="width: 20%" />
</FormItem>
<FormItem label="计价方式" prop="pricingMethod">
<RadioGroup type="button" button-style="solid" v-model="form.pricingMethod">
<Radio label="WEIGHT">按重量</Radio>
<Radio label="NUM">按件数</Radio>
<Radio label="FREE">包邮</Radio>
</RadioGroup>
</FormItem>
<FormItem label="详细设置" v-if="form.pricingMethod !== 'FREE'">
<Alert type="warning" >点击右侧修改按钮编辑数据</Alert>
<div class="ncsu-trans-type" data-delivery="TRANSTYPE">
<div class="entity">
<div class="tbl-except">
<table cellspacing="0" class="ncsc-default-table">
<thead>
<tr style="border-bottom: 1px solid #ddd;">
<th class="w10"></th>
<th class="tl">运送到</th>
<th class="w10"></th>
<th class="w50">首件()</th>
<th class="w110">首费</th>
<th class="w50">续件()</th>
<th class="w110">续费</th>
<th class="w150">操作</th>
</tr>
</thead>
<tbody>
<tr class="bd-line" data-group="n1" v-for="(item,index) in form.freightTemplateChildList"
:key="index">
<td></td>
<td class="tl cell-area">
<span class="area-group">
<p style="display:inline-block">{{item.area}}</p>
</span>
</td>
<td></td>
<td>
<InputNumber class="text w40" type="text" v-model="item.firstCompany" :max="999" :min="0" :step="0.1" clearable/>
</td>
<td>
<InputNumber class="text w60" type="text" v-model="item.firstPrice" :max="999999" :min="0" clearable :formatter="value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\¥\s?|(,*)/g, '')">
</InputNumber>
</td>
<td>
<InputNumber class="text w40" type="text" v-model="item.continuedCompany" :max="999" :min="0" :step="0.1"
/>
</td>
<td>
<InputNumber class="text w60" type="text" v-model="item.continuedPrice" :max="999999" :min="0" clearable :formatter="value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\¥\s?|(,*)/g, '')">
</InputNumber>
</td>
<td class="nscs-table-handle">
<Button @click="editRegion(item,index)" type="info" size="small"
style="margin-bottom: 5px">修改
</Button>
<Button @click="removeTemplateChildren(index)" type="error"
size="small" style="margin-bottom: 5px">删除
</Button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tbl-attach p-5">
<div class="div-error" v-if="saveError">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
<Icon type="ios-information-circle-outline" />
指定地区城市为空或指定错误
<!-- <Icon type="ios-information-circle-outline" />
首费应输入正确的金额
<Icon type="ios-information-circle-outline" />
续费应输入正确的金额 -->
<Icon type="ios-information-circle-outline" />
()()费应输入大于0的整数
</div>
</div>
</div>
</div>
</FormItem>
<Form-item>
<Button @click="addShipTemplateChildren(index)" v-if="form.pricingMethod !== 'FREE'"
icon="ios-create-outline">为指定城市设置运费模板
</Button>
<Button @click="handleSubmit" type="primary" style="margin-right:5px">保存
</Button>
</Form-item>
</Form>
</TabPane>
</Tabs>
</Card>
<multiple-region ref="region" @selected="handleSelect">
</multiple-region>
</div>
</template>
<script>
import * as API_Shop from "@/api/shops";
import multipleRegion from "@/components/map/multiple-region";
export default {
name: "shipTemplate",
components: {
multipleRegion,
},
data() {
return {
gotop: false,
index:'0',
selectedIndex: 0, //选中的地址模板下标
item: "", //运费模板子模板
shipInfo: {}, // 运费模板数据
title: "添加运费模板", // 模态框标题
operation: "add", // 操作状态
currentTab: "", // 当前模板tab
// submitLoading:false,
saveError: false, // 是否显示错误提示
csTab: false, // 添加运费模板显示
form: {
// 添加或编辑表单对象初始化数据
name: "",
pricingMethod: "WEIGHT",
},
formValidate: {
name: [
{
required: true,
message: "请输入模板名称",
trigger: "blur",
},
],
pricingMethod: [
// 计费方式
{
required: true,
message: "请选择计费方式",
trigger: "blur",
},
],
},
};
},
computed: {
regions() {
return this.$store.state.regions;
},
},
methods: {
// 初始化数据
init() {
this.getData();
},
//切换tabPane
handleClickType(v) {
if (v == "INFO") {
this.getData();
this.csTab = false;
}
},
//添加运费模板
add() {
this.$refs.region.clear();
this.title = "添加运费模板";
this.csTab = true;
this.operation = "ADD";
this.currentTab = "ADD";
this.saveError = false;
this.form = {
pricingMethod: "WEIGHT",
name: "",
freightTemplateChildList: [
{
area: "",
areaId: "",
firstCompany: 0,
firstPrice: 0,
continuedCompany: 0,
continuedPrice: 0,
selectedAll: false,
},
],
};
},
handleScroll(){
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
scrolltop > 30 ? (this.gotop = true) : (this.gotop = false);
},
//修改运费模板
edit(item) {
this.title = "修改运费模板";
this.csTab = true;
this.operation = "EDIT";
this.currentTab = "EDIT";
this.saveError = false;
//给form赋值
this.form = item;
let top = document.documentElement.scrollTop || document.body.scrollTop;
// 实现滚动效果
const timeTop = setInterval(() => {
document.body.scrollTop = document.documentElement.scrollTop = top -= 50;
if (top <= 0) {
clearInterval(timeTop);
}
}, 0);
},
//选择地区
editRegion(item, index) {
this.selectedIndex = index;
this.item = item;
this.regions.forEach((addr) => {
this.form.freightTemplateChildList.forEach((child) => {
child.area.split(",").forEach((area) => {
if (addr.name == area) {
addr.selectedAll = true;
this.$set(child, "selectedAll", true);
}
});
});
});
this.$store.state.shipTemplate = this.form.freightTemplateChildList;
this.$refs.region.open(item, index);
},
//刷细数据
refresh() {
this.csTab = false;
this.operation = "INFO";
this.currentTab = "INFO";
this.getData();
this.$Message.success("刷新成功");
},
//运费模板数据
getData() {
API_Shop.getShipTemplate().then((res) => {
this.shipInfo = res.result;
});
},
/**
* 选择地址回调
*/
handleSelect(v) {
let area = "";
let areaId = "";
if (v != "") {
v.forEach((child) => {
if (child.selectedList != "") {
// 只显示省份
if (child.selectedAll) {
area += child.name + ",";
this.form.freightTemplateChildList[
this.selectedIndex
].selectedAll = true;
}
child.selectedList.forEach((son) => {
if (child.selectedAll) {
areaId += son.id + ",";
return;
} else {
// 显示城市
area += son.name + ",";
areaId += son.id + ",";
}
});
}
});
}
this.item.area = area;
this.item.areaId = areaId;
},
//添加或者修改运费模板
handleSubmit() {
const headers = {
"Content-Type": "application/json;charset=utf-8",
};
this.$refs.form.validate((valid) => {
// const regNumber = /^\+?[1-9][0-9]*$/;
// const regMoney =
// /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
if (valid) {
if (this.form.pricingMethod != "FREE") {
//校验运费模板详细信息
for (
let i = 0;
i < this.form.freightTemplateChildList.length;
i++
) {
if (
this.form.freightTemplateChildList[i].area == "" ||
this.form.freightTemplateChildList[i].firstCompany == "" ||
// this.form.freightTemplateChildList[i].firstPrice == "" ||
this.form.freightTemplateChildList[i].continuedCompany == ""
// this.form.freightTemplateChildList[i].continuedPrice == ""
) {
this.saveError = true;
return;
}
// if (
// regNumber.test(
// this.form.freightTemplateChildList[i].firstCompany
// ) == false ||
// regNumber.test(
// this.form.freightTemplateChildList[i].continuedCompany
// ) == false ||
// regMoney.test(
// this.form.freightTemplateChildList[i].firstPrice
// ) == false ||
// regMoney.test(
// this.form.freightTemplateChildList[i].continuedPrice
// ) == false
// ) {
// this.saveError = true;
// return;
// }
}
}
if (this.operation == "ADD") {
API_Shop.addShipTemplate(this.form, headers).then((res) => {
if (res.success) {
this.$Message.success("新增成功");
this.operation = "INFO";
this.currentTab = "INFO";
this.csTab = false;
this.getData();
}
});
} else {
API_Shop.editShipTemplate(this.form.id, this.form, headers).then(
(res) => {
if (res.success) {
this.$Message.success("新增成功");
this.operation = "INFO";
this.currentTab = "INFO";
this.csTab = false;
this.getData();
}
}
);
}
}
});
},
//添加子模板
addShipTemplateChildren() {
const params = {
area: "",
areaId: "",
firstCompany: 0,
firstPrice: 0,
continuedCompany: 0,
continuedPrice: 0,
selectedAll: false,
};
this.form.freightTemplateChildList.push(params);
},
//删除一个子模板
removeTemplateChildren(index) {
if (Object.keys(this.form.freightTemplateChildList).length == 1) {
this.$Message.error("必须保留一个子模板");
return;
}
this.form.freightTemplateChildList.splice(index, 1);
},
//删除运费模板
remove(id) {
this.$Modal.confirm({
title: "确认删除",
// 记得确认修改此处
content: "您确认要删除此运费模板 ?",
loading: true,
onOk: () => {
API_Shop.deleteShipTemplate(id).then((res) => {
if (res.success) {
this.$Message.success("删除成功");
}
this.$Modal.remove();
this.getData();
});
},
});
},
},
mounted() {
this.init();
window.addEventListener("scroll", this.handleScroll, true);
},
};
</script>
<style lang="scss" scoped>
.ncsc-default-table thead th {
line-height: 20px;
color: #555;
background-color: #fafafa;
text-align: center;
height: 20px;
padding: 9px 0;
border-bottom: solid 1px #ddd;
}
.ncsc-default-table {
line-height: 20px;
width: 100%;
border-collapse: collapse;
tbody th {
background-color: #fafafa;
border: solid #e6e6e6;
border-width: 1px 0;
padding: 4px 0;
}
tbody td {
color: #999;
background-color: #fff;
text-align: center;
padding: 6px 0;
}
}
.order tbody tr td {
border-bottom: 1px solid #e6e6e6;
vertical-align: top;
}
.order tbody tr td.bdr {
border-right: 1px solid #e6e6e6;
}
.order tbody tr th {
border: solid 1px #ddd;
}
.order tbody tr td.sep-row {
height: 14px;
border: 0;
}
.w10 {
width: 10px !important;
}
.tl {
text-align: left !important;
}
.order tbody tr td.bdl {
border-left: 1px solid #e6e6e6;
}
.order tbody tr th .temp-name {
float: left;
font-size: 14px;
color: #555;
// line-height: 44px;
margin: 7px 0 0 10px;
}
.m-r-5 {
margin-right: 5px !important;
}
.fr {
float: right !important;
}
.m-b-30 {
margin-bottom: 10px !important;
}
Button {
margin: 3px 5px 0px 5px;
}
thead {
display: table-header-group;
vertical-align: middle;
border-color: inherit;
}
tr {
display: table-row;
vertical-align: inherit;
border-color: inherit;
}
caption,
th {
text-align: left;
}
.tl {
text-align: left !important;
}
colgroup {
display: table-column-group;
}
button,
input,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
.bd-line td {
border-bottom: solid 1px #eee;
}
.w40 {
width: 60px !important;
}
.w60 {
width: 100px !important;
margin: 0 auto;
}
Input[type="text"],
Input[type="password"],
Input.text,
Input.password {
display: inline-block;
min-height: 20px;
padding: 10px;
border: solid 1px #e6e9ee;
outline: 0 none;
}
ncsc-default-table {
line-height: 20px;
width: 100%;
border-collapse: collapse;
clear: both;
}
.ncsu-trans-type {
background-color: #fff;
border: solid #ddd 1px;
}
i,
cite,
em {
font-style: normal;
}
.cell-area {
width: 50%;
}
.div-error {
margin-left: 7px;
margin-bottom: -8px;
font-size: 15px;
color: #f00;
}
.baoyou {
margin: 6px 10px 0;
}
</style>

View File

@@ -1,7 +1,5 @@
<template>
<div class="message-con">
<Button type="default" class="mr_10" @click="navigateTo('pickup')">自提点设置</Button>
<Button type="default" class="mr_10" @click="navigateTo('shipTemplate')">运费模版设置</Button>
<Dropdown trigger="click">
<a href="javascript:void(0)">
@@ -68,16 +66,16 @@ export default {
};
</script>
<style scoped lang="scss">
/deep/ .ivu-select-dropdown {
::v-deep .ivu-select-dropdown {
text-align: left;
}
.message-con {
margin-right: 10px;
}
/deep/ .ivu-dropdown-item{
::v-deep .ivu-dropdown-item{
padding: 7px 20px !important;
}
/deep/ .ivu-badge-count{
::v-deep .ivu-badge-count{
right: -10px !important;
}
</style>

View File

@@ -49,7 +49,7 @@ export default {
this.selectNav(val.meta.firstRouterName)
}
}
}
}
},
methods: {
changeMenu(name) { //二级路由点击
@@ -90,7 +90,7 @@ export default {
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
color: $theme_color;
}
/deep/.ivu-menu-vertical .ivu-menu-item-group-title {
::v-deep.ivu-menu-vertical .ivu-menu-item-group-title {
height: 40px;
line-height: 40px;
padding-left: 20px;

View File

@@ -14,7 +14,7 @@
v-model="searchForm.memberName"
placeholder="请输入会员名称"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Form-item label="充值单号" prop="rechargeSn">
@@ -23,7 +23,7 @@
v-model="searchForm.rechargeSn"
placeholder="请输入充值单号"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Form-item label="支付时间">
@@ -34,11 +34,13 @@
clearable
@on-change="selectDateRange"
placeholder="选择起始时间"
style="width: 200px"
style="width: 240px"
></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
</Card>
<Card>
<Table
:loading="loading"
border
@@ -54,7 +56,7 @@
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -77,7 +79,7 @@
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
startDate: "", // 起始时间
@@ -173,11 +175,11 @@
this.getDataList();
},
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 20;
this.getDataList();
},
// 时间段赋值
selectDateRange(v) {
if (v) {

View File

@@ -5,17 +5,19 @@
<Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="会员名称" prop="memberName">
<Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 240px" />
</Form-item>
<Form-item label="支付时间">
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 240px"></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form>
</Row>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
</Card>
<Card>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[20, 50, 100]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
</Card>
@@ -29,16 +31,16 @@ export default {
data() {
return {
loading: true, // 表单加载状态
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
startDate: "", // 起始时间
endDate: "", // 终止时间
memberName: "",
},
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
startDate: "", // 起始时间
endDate: "", // 终止时间
memberName: "",
},
selectDate: null, // 选择时间段
columns: [
// 表头
@@ -113,7 +115,7 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
// 时间段赋值

View File

@@ -4,10 +4,10 @@
<Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="会员名称" prop="memberName">
<Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 240px" />
</Form-item>
<Form-item label="审核状态" prop="applyStatus">
<Select v-model="searchForm.applyStatus" clearable style="width: 200px">
<Select v-model="searchForm.applyStatus" clearable style="width: 240px">
<Option value="APPLY">申请中</Option>
<Option value="VIA_AUDITING">审核通过</Option>
<Option value="FAIL_AUDITING">审核拒绝</Option>
@@ -16,7 +16,7 @@
</Select>
</Form-item>
<Form-item label="申请时间">
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 240px"></DatePicker>
</Form-item>
<Form-item style="margin-left: -35px" class="br">
<Button @click="handleSearch" type="primary" icon="ios-search">搜索
@@ -24,9 +24,11 @@
</Form-item>
</Form>
</Row>
</Card>
<Card>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[20, 50, 100]" size="small"
show-total show-elevator show-sizer></Page>
</Row>
</Card>
@@ -115,7 +117,7 @@ export default {
searchForm: {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
startDate: "", // 起始时间
@@ -192,49 +194,49 @@ export default {
fixed: "right",
render: (h, params) => {
if (params.row.applyStatus == "APPLY") {
return h(
"Button",
{
props: {
type: "primary",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.showList = {};
this.roleModalVisible = true;
this.showList = params.row;
this.audit =""
return h("div", { class: "ops" }, [
h(
"a",
{
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
this.showList = {};
this.roleModalVisible = true;
this.showList = params.row;
this.audit = "";
},
},
},
},
"审核"
);
"审核"
),
]);
} else {
return h(
"Button",
{
props: {
type: "default",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.showList = {};
this.queryModalVisible = true;
this.showList = params.row;
this.modalTitle = "查看";
return h("div", { class: "ops" }, [
h(
"a",
{
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
this.showList = {};
this.queryModalVisible = true;
this.showList = params.row;
this.modalTitle = "查看";
},
},
},
},
"查看"
);
"查看"
),
]);
}
},
},
@@ -291,13 +293,13 @@ export default {
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.selectDate = null;
this.searchForm.startDate = "";
this.searchForm.endDate = "";
@@ -345,4 +347,16 @@ export default {
},
};
</script>
<style lang="scss" scoped>
.ops a {
color: #2d8cf0;
cursor: pointer;
text-decoration: none;
}
.ops span {
display: inline-block;
margin: 0 8px;
color: #dcdee2;
}
</style>

View File

@@ -3,28 +3,34 @@
<Card>
<Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="会员ID" prop="id">
<Input type="text" v-model="searchForm.id" placeholder="请输入会员ID" clearable style="width: 240px" />
</Form-item>
<Form-item label="会员名称" prop="username">
<Input type="text" v-model="searchForm.username" placeholder="请输入会员名称" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.username" placeholder="请输入会员名称" clearable style="width: 240px" />
</Form-item>
<Form-item label="会员昵称" prop="nickName">
<Input type="text" v-model="searchForm.nickName" placeholder="请输入会员昵称" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.nickName" placeholder="请输入会员昵称" clearable style="width: 240px" />
</Form-item>
<Form-item label="联系方式" prop="mobile">
<Input type="text" v-model="searchForm.mobile" placeholder="请输入会员联系方式" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.mobile" placeholder="请输入会员联系方式" clearable style="width: 240px" />
</Form-item>
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button>
</Form>
</Row>
</Card>
<Card>
<Row class="operation padding-row" v-if="!selectedMember">
<Button @click="addMember" type="primary">添加会员</Button>
</Row>
<Table :loading="loading" border :columns="columns" class="mt_10" :data="data" ref="table"></Table>
<Table :loading="loading" :columns="columns" class="mt_10" :data="data" ref="table"></Table>
<Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator
@on-page-size-change="changePageSize" :page-size-opts="[20, 50, 100]" size="small" show-total show-elevator
show-sizer></Page>
</Row>
</Card>
@@ -129,8 +135,9 @@ export default {
searchForm: {
// 请求参数
pageNumber: 1,
pageSize: 10,
pageSize: 20, // 页面大小
order: "desc",
id: "",
username: "",
mobile: "",
disabled: "OPEN",
@@ -151,19 +158,47 @@ export default {
},
ruleValidate: {}, //修改验证
columns: [
{
title: "会员ID",
key: "id",
minWidth: 120, // 减少宽度
tooltip: true,
},
{
title: "头像",
key: "face",
minWidth: 80,
align: "center",
render: (h, params) => {
return h("img", {
attrs: {
src: params.row.face || require('@/assets/default.png'),
alt: "头像"
},
style: {
width: "30px",
height: "30px",
borderRadius: "50%",
objectFit: "cover"
}
});
}
},
{
title: "会员名称",
key: "username",
tooltip: true,
minWidth: 150, // 减少宽度
},
{
title: "会员昵称",
key: "nickName",
tooltip: true,
minWidth: 150, // 减少宽度
},
{
title: "联系方式",
width: 130,
minWidth: 130,
key: "mobile",
render: (h, params) => {
if (params.row.mobile == null) {
@@ -176,13 +211,18 @@ export default {
{
title: "注册时间",
key: "createTime",
width: 180,
minWidth: 160, // 减少宽度
},
{
title: "最后登录时间",
key: "lastLoginDate",
minWidth: 160, // 减少宽度
},
{
title: "积分数量",
align: "left",
width: 100,
minWidth: 120, // 增加宽度
render: (h, params) => {
return h(
"div",
@@ -195,7 +235,7 @@ export default {
title: "操作",
key: "action",
align: "center",
width: 200,
minWidth: 160,
fixed: "right",
render: (h, params) => {
return h(
@@ -208,15 +248,13 @@ export default {
},
[
h(
"Button",
"a",
{
props: {
size: "small",
type: params.row.___selected ? "primary" : "default",
},
style: {
marginRight: "5px",
display: this.selectedMember ? "block" : "none",
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
display: this.selectedMember ? "inline-block" : "none",
},
on: {
click: () => {
@@ -226,17 +264,25 @@ export default {
},
params.row.___selected ? "已选择" : "选择"
),
h(
"Button",
"span",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
display: this.selectedMember ? "none" : "block",
margin: "0 8px",
color: "#dcdee2",
display: this.selectedMember ? "inline-block" : "none",
},
},
"|"
),
h(
"a",
{
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
display: this.selectedMember ? "none" : "inline-block",
},
on: {
click: () => {
@@ -247,16 +293,24 @@ export default {
"查看"
),
h(
"Button",
"span",
{
props: {
type: "info",
size: "small",
ghost: true,
},
style: {
marginRight: "5px",
display: this.selectedMember ? "none" : "block",
margin: "0 8px",
color: "#dcdee2",
display: this.selectedMember ? "none" : "inline-block",
},
},
"|"
),
h(
"a",
{
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
display: this.selectedMember ? "none" : "inline-block",
},
on: {
click: () => {
@@ -267,15 +321,24 @@ export default {
"编辑"
),
h(
"Button",
"span",
{
props: {
size: "small",
type: "error",
},
style: {
marginRight: "5px",
display: this.selectedMember ? "none" : "block",
margin: "0 8px",
color: "#dcdee2",
display: this.selectedMember ? "none" : "inline-block",
},
},
"|"
),
h(
"a",
{
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
display: this.selectedMember ? "none" : "inline-block",
},
on: {
click: () => {
@@ -373,7 +436,7 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getData();
},
//查看详情修改
@@ -482,7 +545,7 @@ export default {
regionId,
region,
nickName,
username,
sex,
birthday,
face,
@@ -506,10 +569,10 @@ export default {
};
</script>
<style lang="scss" scoped>
/deep/ .ivu-table-wrapper {
::v-deep .ivu-table-wrapper {
width: 100%;
}
/deep/ .ivu-card {
::v-deep .ivu-card {
width: 100%;
}
.face {
@@ -517,4 +580,5 @@ export default {
height: 60px;
border-radius: 50%;
}
</style>

View File

@@ -93,14 +93,14 @@
:current="pointSearchForm.pageNumber"
:total="pointTotal"
:page-size="pointSearchForm.pageSize"
@on-change="pointChangePage"
@on-page-size-change="pointChangePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
@on-change="pointChangePage"
@on-page-size-change="pointChangePageSize"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</div>
</TabPane>
@@ -180,21 +180,18 @@
:current="orderSearchForm.pageNumber"
:total="orderTotal"
:page-size="orderSearchForm.pageSize"
@on-change="orderChangePage"
@on-page-size-change="orderChangePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
@on-change="orderChangePage"
@on-page-size-change="orderChangePageSize"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</div>
</TabPane>
<TabPane label="TA收货地址" name="address">
<Row class="operation padding-row">
<Button @click="addMemberAddress" type="primary">新增</Button>
</Row>
<Table
:loading="loading"
border
@@ -213,7 +210,7 @@
:page-size="addressSearchForm.pageSize"
@on-change="addressChangePage"
@on-page-size-change="addressChangePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -262,7 +259,7 @@
:page-size="walletSearchForm.pageSize"
@on-change="walletChangePage"
@on-page-size-change="walletChangePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -307,7 +304,7 @@
:page-size="receiptRecordSearchForm.pageSize"
@on-change="walletChangePage"
@on-page-size-change="walletChangePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -398,7 +395,6 @@
],
consigneeAddressPath: [{required: true, message: "收货人地址不能为空"}],
detail: [{required: true, message: "收货人详细地址不能为空"}],
alias: [{required: true, message: "收货人地址别名不能为空"}],
},//会员地址操作表单校验
//历史积分表格
pointsColumns: [
@@ -442,7 +438,7 @@
//历史积分数据查询form
pointSearchForm: {
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
},
orderColumns: [
{
@@ -563,7 +559,12 @@
}
}
},
{
title: "购买店铺",
key: "storeName",
width: 120,
tooltip: true
},
{
title: "下单时间",
key: "createTime",
@@ -583,13 +584,12 @@
}
}, [
h(
"Button",
"a",
{
props: {
type: "info",
size: "small",
},
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
marginRight: "5px",
},
on: {
@@ -610,7 +610,7 @@
//TA的订单form
orderSearchForm: {
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
payStatus: "",
orderSn: "",
orderType: "",
@@ -664,58 +664,6 @@
}
},
{
title: "操作",
key: "action",
align: "center",
width: 120,
fixed: "right",
render: (h, params) => {
return h("div", {
style: {
display: "flex",
justifyContent: "center"
}
}, [
h(
"Button",
{
props: {
type: "error",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.memberAddressRemove(params.row);
},
},
},
"删除"
),
h(
"Button",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.editAddress(params.row);
},
},
},
"编辑"
),
]);
},
},
],
addressData: [],//历史积分数据
@@ -723,7 +671,7 @@
//TA的收货地址form
addressSearchForm: {
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
},
//消费记录
walletColumns: [
@@ -777,7 +725,7 @@
//TA的余额消费记录
walletSearchForm: {
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
},
@@ -786,7 +734,7 @@
//TA的发票记录
receiptRecordSearchForm: {
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
},
@@ -905,6 +853,8 @@
//查询TA的发票记录
getReceiptRecordData(){
this.loading = true;
this.receiptRecordSearchForm.pageNumber = 1;
this.receiptRecordSearchForm.pageSize = 20;
this.receiptRecordSearchForm.memberId = this.id
API_Order.getReceiptPage(this.receiptRecordSearchForm).then((res) => {
this.loading = false;
@@ -919,6 +869,8 @@
//查询TA的订单
getOrderData() {
this.loading = true;
this.orderSearchForm.pageNumber = 1;
this.orderSearchForm.pageSize = 20;
this.orderSearchForm.memberId = this.id
API_Order.getOrderList(this.orderSearchForm).then((res) => {
this.loading = false;
@@ -949,25 +901,6 @@
});
this.loading = false;
},
//新增TA的收货地址
addMemberAddress() {
this.addressModalTitle = "新增会员地址";
this.addressModalVisible = true
this.addressForm = {
id: "",
isDefault: 0,
}
},
//修改TA的收货地址
editAddress(v) {
this.addressModalTitle = "修改会员地址";
this.addressForm = JSON.parse(JSON.stringify(v));
this.addressForm.isDefault = v.isDefault?1:0;
// this.$set(this, "addressForm", v);
delete this.addressForm.updateTime;
this.addressModalVisible = true
},
//新增或者修改表单提交
addressSubmit() {
this.addressForm.memberId = this.id

View File

@@ -16,7 +16,7 @@
v-model="searchForm.username"
placeholder="请输入会员名称"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
@@ -26,7 +26,7 @@
v-model="searchForm.mobile"
placeholder="请输入会员联系方式"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Button
@@ -38,6 +38,8 @@
>
</Form>
</Row>
</Card>
<Card>
<Table
:loading="loading"
border
@@ -55,7 +57,7 @@
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -169,7 +171,7 @@ export default {
searchForm: {
// 请求参数
pageNumber: 1,
pageSize: 10,
pageSize: 20,
order: "desc",
username: "",
mobile: "",
@@ -228,92 +230,56 @@ export default {
width: 200,
fixed: "right",
render: (h, params) => {
const linkStyle = {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
};
const sep = h(
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
);
const children = [];
if (this.selectedMember) {
children.push(
h(
"a",
{ style: linkStyle, on: { click: () => this.callback(params.row) } },
"选择"
)
);
children.push(sep);
}
children.push(
h(
"a",
{ style: linkStyle, on: { click: () => this.detail(params.row) } },
"查看"
)
);
if (!this.selectedMember) {
children.push(sep);
children.push(
h(
"a",
{ style: linkStyle, on: { click: () => this.enable(params.row) } },
"启用"
)
);
children.push(sep);
children.push(
h(
"a",
{ style: linkStyle, on: { click: () => this.editPerm(params.row) } },
"编辑"
)
);
}
return h(
"div",
{
style: {
display: "flex",
justifyContent: "center",
},
},
[
h(
"Button",
{
props: {
size: "small",
},
style: {
marginRight: "5px",
display: this.selectedMember ? "block" : "none",
},
on: {
click: () => {
this.callback(params.row);
},
},
},
"选择"
),
h(
"Button",
{
props: {
type: "info",
size: "small",
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.detail(params.row);
},
},
},
"查看"
),
h(
"Button",
{
props: {
size: "small",
type: "success",
},
style: {
marginRight: "5px",
display: this.selectedMember ? "none" : "block",
},
on: {
click: () => {
this.enable(params.row);
},
},
},
"启用"
),
h(
"Button",
{
props: {
type: "info",
size: "small",
ghost: true,
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.editPerm(params.row);
},
},
},
"编辑"
),
]
{ class: "ops", style: { display: "flex", justifyContent: "center" } },
children
);
},
},
@@ -345,7 +311,7 @@ export default {
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getData();
},
//查看详情修改
@@ -435,7 +401,7 @@ export default {
regionId:regionId,
region: region,
nickName,
username,
sex,
birthday,
face: face || "",
@@ -463,4 +429,14 @@ export default {
height: 60px;
border-radius: 50%;
}
.ops a {
color: #2d8cf0;
cursor: pointer;
text-decoration: none;
}
.ops span {
display: inline-block;
margin: 0 8px;
color: #dcdee2;
}
</style>

View File

@@ -55,7 +55,7 @@
:page-size="weChatSearchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10,20,50]"
:page-size-opts="[20, 50, 100]"
size="small"
></Page>
</Row>
@@ -82,7 +82,7 @@
:page-size="weChatMPSearchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10,20,50]"
:page-size-opts="[20, 50, 100]"
size="small"
></Page>
</Row>
@@ -126,12 +126,12 @@ export default {
weChatSearchForm: {
// 搜索框对应data对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
},
weChatMPSearchForm: {
// 搜索框对应data对象
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
pageSize: 20, // 页面大小
},
weChatColumns: [
{
@@ -178,14 +178,12 @@ export default {
render: (h, params) => {
return h("div", [
h(
"Button",
"a",
{
props: {
type: "primary",
size: "small"
},
style: {
marginRight: "5px"
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none"
},
on: {
click: () => {
@@ -196,14 +194,17 @@ export default {
"编辑"
),
h(
"Button",
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
),
h(
"a",
{
props: {
type: "error",
size: "small"
},
style: {
marginRight: "5px"
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none"
},
on: {
click: () => {

View File

@@ -1,12 +1,12 @@
<template>
<div class="search">
<Card style="padding:0 10px 10px 0">
<Card >
<Form
@keydown.enter.native="handleSearch"
ref="searchForm"
:model="searchForm"
inline
style="margin-top:10px"
:label-width="70"
@submit.native.prevent
class="search-form"
@@ -17,11 +17,13 @@
v-model="searchForm.memberName"
placeholder="请输入会员名称"
clearable
style="width: 200px"
style="width: 240px"
/>
</Form-item>
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search">搜索</Button >
</Form>
</Card>
<Card>
<Table
:loading="loading"
border
@@ -38,7 +40,7 @@
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
:page-size-opts="[20, 50, 100]"
size="small"
show-total
show-elevator
@@ -66,7 +68,7 @@
loading: true, // 表单加载状态
searchForm: { // 请求参数
pageNumber: 1,
pageSize: 10,
pageSize: 20,
},
columns: [
{
@@ -139,7 +141,7 @@
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchForm.pageSize = 20;
this.getData();
},
//查新积分列表

Some files were not shown because too many files have changed in this diff Show More