mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 01:15:53 +08:00
Compare commits
69 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a0f5ff120 | ||
|
|
c5fecda212 | ||
|
|
e5d98d022e | ||
|
|
799184fd21 | ||
|
|
756cb28daa | ||
|
|
5f6eb6a26d | ||
|
|
4efbec5741 | ||
|
|
86dbc0d86e | ||
|
|
c32d011851 | ||
|
|
311ca35afc | ||
|
|
1a3fae6501 | ||
|
|
3432530de7 | ||
|
|
af85493863 | ||
|
|
ae85f0d612 | ||
|
|
16c4a78e29 | ||
|
|
8fb87aa64d | ||
|
|
c5d675b6d2 | ||
|
|
f4d06b2d7b | ||
|
|
bb610a7cd8 | ||
|
|
bb864e72b3 | ||
|
|
c6c4797d87 | ||
|
|
25fed42395 | ||
|
|
66c4676493 | ||
|
|
f8747b5d5d | ||
|
|
0eb58d4b8a | ||
|
|
7b30ea343f | ||
|
|
7db8484a7c | ||
|
|
78b058009b | ||
|
|
05abad3905 | ||
|
|
ad178b1806 | ||
|
|
075c20ae41 | ||
|
|
56420bd4d0 | ||
|
|
a18fc729c0 | ||
|
|
099941a54e | ||
|
|
3867d51d92 | ||
|
|
f1be18b7e3 | ||
|
|
ef46380f9e | ||
|
|
d711273cf0 | ||
|
|
5e7cf2d679 | ||
|
|
11319ba21f | ||
|
|
b4a706820e | ||
|
|
376a3223dc | ||
|
|
a85ec69549 | ||
|
|
ebf4d6d3eb | ||
|
|
2ccd8265b9 | ||
|
|
fb1671d062 | ||
|
|
95e37df2ec | ||
|
|
cfde72f1ab | ||
|
|
efc778acbc | ||
|
|
37384ebadd | ||
|
|
9a7aee7e97 | ||
|
|
1a56534d28 | ||
|
|
79e7e5f087 | ||
|
|
aea03cf975 | ||
|
|
8ef6f944dc | ||
|
|
e18d243961 | ||
|
|
765b633cea | ||
|
|
9c402a3878 | ||
|
|
86426b087a | ||
|
|
c5aaa2f3e2 | ||
|
|
cc59bb6094 | ||
|
|
5662da1210 | ||
|
|
863725d3ba | ||
|
|
b1acfbdd4b | ||
|
|
001f9c3f30 | ||
|
|
8d4df4b66e | ||
|
|
604447508a | ||
|
|
6f30949620 | ||
|
|
10e8e82fe4 |
73
README.md
73
README.md
@@ -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群**:
|
||||

|
||||
|
||||
##### 体验 公众号/小程序/APP 体验,扫描二维码
|
||||
|
||||
@@ -19,6 +15,41 @@
|
||||
[](https://gitee.com/beijing_hongye_huicheng/lilishop/stargazers)
|
||||

|
||||
|
||||
## 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
1
buyer/.npmrc
Normal file
@@ -0,0 +1 @@
|
||||
engine-strict=false
|
||||
1
buyer/.yarnrc
Normal file
1
buyer/.yarnrc
Normal file
@@ -0,0 +1 @@
|
||||
--ignore-engines true
|
||||
@@ -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/).
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@ export const orderStatusList = [
|
||||
name: '待发货',
|
||||
status: 'UNDELIVERED'
|
||||
},
|
||||
{
|
||||
name: '部分发货',
|
||||
status: 'PARTS_DELIVERED'
|
||||
},
|
||||
{
|
||||
name: '已发货',
|
||||
status: 'DELIVERED'
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -604,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;
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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
1
manager/.npmrc
Normal file
@@ -0,0 +1 @@
|
||||
engine-strict=false
|
||||
1
manager/.yarnrc
Normal file
1
manager/.yarnrc
Normal file
@@ -0,0 +1 @@
|
||||
--ignore-engines true
|
||||
@@ -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/).
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,20 +101,23 @@ export const getGoodsCategory = (parent_id) => {
|
||||
}
|
||||
|
||||
// 上架商品
|
||||
export const upGoods = (id, params) => {
|
||||
return putRequest(`/goods/goods/${id}/up`, params)
|
||||
}
|
||||
// 下架商品
|
||||
export const lowGoods = (id, params) => {
|
||||
return putRequest(`/goods/goods/${id}/under`, params)
|
||||
}
|
||||
export const upGoods = (params) => {
|
||||
return putRequest(`/goods/goods/up`, 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'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//查询分类绑定参数信息
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -160,3 +160,13 @@ export const refundLog = (params) => {
|
||||
export const storeAddress = (sn) => {
|
||||
return getRequest(`/order/afterSale/getStoreAfterSaleAddress/${sn}`)
|
||||
}
|
||||
|
||||
// 获取订单数量统计
|
||||
export const getOrderNum = (params) => {
|
||||
return getRequest(`/order/order/orderNum`, params)
|
||||
}
|
||||
|
||||
// 获取售后数量统计
|
||||
export const getAfterSaleNumVO = (params) => {
|
||||
return getRequest(`/order/afterSale/afterSaleNumVO`, params)
|
||||
}
|
||||
|
||||
@@ -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"})
|
||||
}
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
params: {
|
||||
// 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
storeName: "",
|
||||
},
|
||||
dateList: [
|
||||
|
||||
@@ -57,13 +57,14 @@
|
||||
</Modal>
|
||||
|
||||
<Modal width="1000" v-model="showOssManager" @on-ok="confirmUrls">
|
||||
<OssManage ref="ossManage" :isComponent="true" :initialize="showOssManager" @selected="handleCallback" />
|
||||
<OssManage ref="ossManage" :isComponent="true" :initialize="showOssManager" @selected="(list)=>{ selectedImage = list}" @callback="handleCallback" />
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import vuedraggable from "vuedraggable";
|
||||
import { uploadFile } from "@/libs/axios";
|
||||
import {uploadFile} from "@/libs/axios";
|
||||
// import OssManage from "@/views/sys/oss-manage/ossManage";
|
||||
import OssManage from "@/views/sys/oss-manage/ossManage.vue";
|
||||
|
||||
export default {
|
||||
@@ -88,11 +89,8 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
confirmUrl(){
|
||||
|
||||
},
|
||||
handleClickUploadImage(){
|
||||
this.show = true
|
||||
this.show = true;
|
||||
},
|
||||
// 回调给父级
|
||||
callback() {
|
||||
@@ -122,21 +120,22 @@ export default {
|
||||
handleSuccessGoodsPicture(res, file) {
|
||||
if (file.response) {
|
||||
file.url = file.response.result;
|
||||
this.images.push(file);
|
||||
this.images.push(file);
|
||||
}
|
||||
},
|
||||
confirmUrls(){
|
||||
this.selectedImage.length ? this.selectedImage.forEach(element => {
|
||||
this.images.push({ url: element.url })
|
||||
}):''
|
||||
// this.selectedImage.length ? this.selectedImage.forEach(element => {
|
||||
// this.images.push({ url: element.url })
|
||||
// }):''
|
||||
this.showOssManager = false
|
||||
},
|
||||
handleCallback(val){
|
||||
this.selectedImage = val
|
||||
this.$Message.success("导入成功")
|
||||
this.images.push({url:val.url})
|
||||
},
|
||||
// 从资源库中导入图片
|
||||
importOSS(){
|
||||
this.showOssManager = true
|
||||
this.showOssManager = true;
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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: () => {
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
// 获取列表数据
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4,10 +4,12 @@
|
||||
<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="delAll" type="primary">批量下架</Button>
|
||||
</Row>
|
||||
@@ -30,7 +32,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>
|
||||
@@ -51,7 +53,7 @@ export default {
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
@@ -135,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);
|
||||
@@ -178,7 +176,7 @@ export default {
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
// 清除选中状态
|
||||
@@ -254,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>
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
v-model="searchForm.orderSn"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="分销商" prop="distributionName">
|
||||
@@ -17,21 +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: 150px">
|
||||
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">
|
||||
@@ -56,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>
|
||||
@@ -85,7 +87,7 @@
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: { // 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort:"create_time",
|
||||
order:"desc"
|
||||
},
|
||||
@@ -162,7 +164,7 @@
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取列表数据
|
||||
@@ -190,7 +192,7 @@
|
||||
getShopList(val) { // 获取店铺列表 搜索用
|
||||
const params = {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
storeName: ''
|
||||
}
|
||||
if (val) {
|
||||
@@ -208,7 +210,7 @@
|
||||
},
|
||||
filterStatus (status) { // 过滤订单状态
|
||||
const arr = [
|
||||
{status: 'WAIT_BILL', title: '待结算'},
|
||||
{status: 'NO_COMPLETED', title: '未完成'},
|
||||
{status: 'COMPLETE', title: '完成'},
|
||||
{status: 'REFUND', title: '退款'},
|
||||
]
|
||||
@@ -217,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() {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
v-model="searchForm.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="商品编号" prop="id">
|
||||
@@ -24,7 +24,7 @@
|
||||
v-model="searchForm.id"
|
||||
placeholder="请输入商品编号"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="店铺名称" prop="id">
|
||||
@@ -33,26 +33,15 @@
|
||||
v-model="searchForm.storeName"
|
||||
placeholder="请输入店铺名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="状态" prop="status">
|
||||
<Select
|
||||
v-model="searchForm.marketEnable"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option value="UPPER">上架</Option>
|
||||
<Option value="DOWN">下架</Option>
|
||||
</Select>
|
||||
</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>
|
||||
@@ -63,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>
|
||||
@@ -77,46 +66,69 @@
|
||||
>搜索</Button
|
||||
>
|
||||
</Form>
|
||||
</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>
|
||||
@@ -128,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
|
||||
@@ -154,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: {
|
||||
@@ -173,7 +235,7 @@ export default {
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
@@ -181,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",
|
||||
@@ -220,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" } }, "实物商品");
|
||||
@@ -234,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" } }, "下架");
|
||||
@@ -246,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" } }, "待审核");
|
||||
@@ -260,7 +355,7 @@ export default {
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "storeName",
|
||||
minWidth: 100,
|
||||
width: 180, // 使用minWidth替代width
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
@@ -268,19 +363,61 @@ export default {
|
||||
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: () => {
|
||||
@@ -290,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: () => {
|
||||
@@ -308,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: () => {
|
||||
@@ -325,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: () => {
|
||||
@@ -346,12 +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: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
this.getNumberData();
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
@@ -366,8 +542,9 @@ export default {
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
this.getNumberData();
|
||||
},
|
||||
// 获取数据
|
||||
getDataList() {
|
||||
@@ -380,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;
|
||||
@@ -392,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(); // 添加这行
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -427,9 +622,251 @@ export default {
|
||||
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>
|
||||
|
||||
@@ -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", // 默认排序方式
|
||||
},
|
||||
@@ -169,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: {
|
||||
@@ -187,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: {
|
||||
@@ -205,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: () => {
|
||||
@@ -245,7 +256,7 @@ export default {
|
||||
handleSearch() {
|
||||
// 搜索
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
getDataList() {
|
||||
@@ -274,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("审核成功");
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -15,54 +15,31 @@
|
||||
>
|
||||
<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>
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
<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">
|
||||
@@ -543,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>
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
<Row>
|
||||
<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">
|
||||
@@ -21,7 +23,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-page-size-change="changePageSize" :page-size-opts="[20, 50, 100]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
@@ -110,7 +112,7 @@ export default {
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
@@ -187,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: () => {
|
||||
@@ -209,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",
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
]
|
||||
),
|
||||
]);
|
||||
},
|
||||
@@ -263,7 +278,7 @@ export default {
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
//列表直接选择页面是否展示
|
||||
@@ -370,4 +385,14 @@ label {
|
||||
margin: 5px 0;
|
||||
span{margin-right: 20px;}
|
||||
}
|
||||
.ops a {
|
||||
color: #2d8cf0;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ops span {
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
color: #dcdee2;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -10,7 +10,7 @@ h4 {
|
||||
margin: 20px 0;
|
||||
font-size: 18px;
|
||||
}
|
||||
/deep/ .ivu-icon {
|
||||
::v-deep .ivu-icon {
|
||||
margin-left: 40px;
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,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,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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
// 时间段赋值
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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: [
|
||||
{
|
||||
@@ -588,13 +584,12 @@
|
||||
}
|
||||
}, [
|
||||
h(
|
||||
"Button",
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none",
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
@@ -615,7 +610,7 @@
|
||||
//TA的订单form
|
||||
orderSearchForm: {
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
payStatus: "",
|
||||
orderSn: "",
|
||||
orderType: "",
|
||||
@@ -669,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: [],//历史积分数据
|
||||
@@ -728,7 +671,7 @@
|
||||
//TA的收货地址form
|
||||
addressSearchForm: {
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
},
|
||||
//消费记录
|
||||
walletColumns: [
|
||||
@@ -782,7 +725,7 @@
|
||||
//TA的余额消费记录
|
||||
walletSearchForm: {
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
@@ -791,7 +734,7 @@
|
||||
//TA的发票记录
|
||||
receiptRecordSearchForm: {
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
@@ -910,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;
|
||||
@@ -924,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;
|
||||
@@ -954,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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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: () => {
|
||||
|
||||
@@ -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();
|
||||
},
|
||||
//查新积分列表
|
||||
|
||||
@@ -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
|
||||
@@ -46,7 +46,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
|
||||
@@ -72,7 +72,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
|
||||
@@ -99,7 +99,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
|
||||
@@ -155,7 +155,7 @@
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
serviceType: "RETURN_MONEY"
|
||||
@@ -181,43 +181,48 @@
|
||||
key: "action",
|
||||
align: "center",
|
||||
width: 200,
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
}
|
||||
}
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
style: {
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none",
|
||||
marginRight: "5px"
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
h(
|
||||
"span",
|
||||
{ style: { margin: "0 8px", color: "#dcdee2" } },
|
||||
"|"
|
||||
),
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
style: {
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none"
|
||||
},
|
||||
"删除"
|
||||
)
|
||||
]);
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
"删除"
|
||||
)
|
||||
]);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
@@ -241,7 +246,7 @@
|
||||
//切换tab
|
||||
handleClickType(v) {
|
||||
this.searchForm.pageNumber = 1 // 当前页数
|
||||
this.searchForm.pageSize = 10 // 页面大小
|
||||
this.searchForm.pageSize = 20 // 页面大小
|
||||
//退款
|
||||
if (v == "RETURN_MONEY") {
|
||||
this.searchForm.serviceType = "RETURN_MONEY"
|
||||
|
||||
@@ -9,13 +9,23 @@
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="关键字" prop="keywords" style="display: block; width: 100%;">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.keywords"
|
||||
placeholder="请输入商品名称、订单编号搜索"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<br>
|
||||
<Form-item label="订单编号" prop="orderSn">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.orderSn"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="售后单号" prop="sn">
|
||||
@@ -24,7 +34,7 @@
|
||||
v-model="searchForm.sn"
|
||||
placeholder="请输入售后单号"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="申请时间">
|
||||
@@ -35,7 +45,7 @@
|
||||
clearable
|
||||
@on-change="selectDateRange"
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Form-item label="商家名称" prop="storeName">
|
||||
@@ -44,7 +54,7 @@
|
||||
v-model="searchForm.storeName"
|
||||
placeholder="请输入商家名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="会员名称" prop="memberName">
|
||||
@@ -53,7 +63,7 @@
|
||||
v-model="searchForm.memberName"
|
||||
placeholder="请输入会员名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="售后类型">
|
||||
@@ -61,7 +71,7 @@
|
||||
v-model="searchForm.serviceType"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="RETURN_MONEY">退款</Option>
|
||||
<Option value="RETURN_GOODS">退货</Option>
|
||||
@@ -76,16 +86,17 @@
|
||||
>
|
||||
</Form>
|
||||
</Row>
|
||||
|
||||
</Card>
|
||||
<Card>
|
||||
<div class="order-tab">
|
||||
<div v-for="(item,index) in serviceStatus" :key="index" :class="{'current': currentStatus === item.value}" @click="serviceStatusClick(item)">
|
||||
{{item.title}}
|
||||
</div>
|
||||
<Tabs v-model="currentStatus" @on-click="serviceStatusClick">
|
||||
<TabPane v-for="item in serviceStatusWithCount" :key="item.value" :label="item.title" :name="item.value">
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
@@ -95,31 +106,16 @@
|
||||
<template slot="goodsSlot" slot-scope="{ row }">
|
||||
<div style="margin-top: 5px; height: 80px; display: flex">
|
||||
<div style="">
|
||||
<img :src="row.goodsImage" style="height: 60px; margin-top: 3px" />
|
||||
<img :src="row.goodsImage" style="width: 60px; height: 60px; margin-top: 3px; object-fit: cover; border-radius: 4px;" />
|
||||
</div>
|
||||
|
||||
<div style="margin-left: 13px">
|
||||
<div class="div-zoom">
|
||||
<a @click="linkTo(row.goodsId, row.skuId)">{{ row.goodsName }}</a>
|
||||
</div>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr
|
||||
:text="wapLinkTo(row.goodsId, 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="color: #999; font-size: 12px; margin-top: 5px;">
|
||||
商品ID: {{ row.goodsId }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -131,7 +127,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
|
||||
@@ -156,7 +152,7 @@ export default {
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
@@ -166,6 +162,7 @@ export default {
|
||||
serviceStatus: "",
|
||||
storeName: "",
|
||||
sn: "",
|
||||
keywords: "", // 新增关键字搜索字段
|
||||
},
|
||||
selectDate: null, // 选择时间段
|
||||
form: {
|
||||
@@ -189,6 +186,13 @@ export default {
|
||||
minWidth: 120,
|
||||
tooltip: true,
|
||||
},
|
||||
// 移除这个独立的商品ID列
|
||||
// {
|
||||
// title: "商品ID",
|
||||
// key: "goodsId",
|
||||
// minWidth: 120,
|
||||
// tooltip: true,
|
||||
// },
|
||||
{
|
||||
title: "商品",
|
||||
key: "goodsName",
|
||||
@@ -196,15 +200,21 @@ export default {
|
||||
tooltip: true,
|
||||
slot: "goodsSlot",
|
||||
},
|
||||
{
|
||||
title: "会员ID",
|
||||
key: "memberId",
|
||||
minWidth: 120,
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
title: "会员名称",
|
||||
key: "memberName",
|
||||
width: 140,
|
||||
},
|
||||
{
|
||||
title: "商家名称",
|
||||
title: "店铺名称",
|
||||
key: "storeName",
|
||||
minWidth: 100,
|
||||
width: 100,
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
@@ -233,7 +243,7 @@ export default {
|
||||
{
|
||||
title: "售后状态",
|
||||
key: "serviceStatus",
|
||||
width: 150,
|
||||
width: 180,
|
||||
render: (h, params) => {
|
||||
if (params.row.serviceStatus == "APPLY") {
|
||||
return h("div", [h("tag", { props: { color: "blue" } }, "申请中")]);
|
||||
@@ -272,14 +282,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: () => {
|
||||
@@ -306,13 +314,15 @@ export default {
|
||||
{title: '卖家终止售后', value: 'SELLER_TERMINATION'},
|
||||
{title: '买家取消售后', value: 'BUYER_CANCEL'}
|
||||
],
|
||||
currentStatus: ''
|
||||
currentStatus: '',
|
||||
afterSaleNumData: {} // 售后数量统计数据
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
this.getAfterSaleNumData();
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
@@ -328,8 +338,9 @@ export default {
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
this.getAfterSaleNumData();
|
||||
},
|
||||
// 开始结束时间分别赋值
|
||||
selectDateRange(v) {
|
||||
@@ -348,9 +359,19 @@ export default {
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
// 获取售后状态数量
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
// 获取售后数量统计
|
||||
getAfterSaleNumData() {
|
||||
const { serviceStatus, ...searchParams } = this.searchForm;
|
||||
API_Order.getAfterSaleNumVO(searchParams).then((res) => {
|
||||
if (res.success) {
|
||||
this.afterSaleNumData = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 跳转售后详情
|
||||
detail(v) {
|
||||
let sn = v.sn;
|
||||
@@ -361,37 +382,44 @@ export default {
|
||||
},
|
||||
// 售后筛选
|
||||
serviceStatusClick(item) {
|
||||
this.currentStatus = item.value;
|
||||
this.searchForm.serviceStatus = item.value;
|
||||
this.currentStatus = item;
|
||||
// 如果是全部(空字符串),则删除serviceStatus字段
|
||||
if (item === 0) {
|
||||
delete this.searchForm.serviceStatus;
|
||||
} else {
|
||||
this.searchForm.serviceStatus = item;
|
||||
}
|
||||
this.getDataList();
|
||||
this.getAfterSaleNumData();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.order-tab {
|
||||
|
||||
width: 950px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: #f0f0f0;
|
||||
padding: 0 10px;
|
||||
margin: 10px 20px 10px 0;
|
||||
div {
|
||||
text-align: center;
|
||||
padding: 4px 12px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
computed: {
|
||||
// 带数量的售后状态
|
||||
serviceStatusWithCount() {
|
||||
return [
|
||||
{title: '全部', value: ''},
|
||||
{title: `申请售后${this.afterSaleNumData.applyNum ? '(' + this.afterSaleNumData.applyNum + ')' : ''}`, value: 'APPLY'},
|
||||
{title: `通过售后${this.afterSaleNumData.passNum ? '(' + this.afterSaleNumData.passNum + ')' : ''}`, value: 'PASS'},
|
||||
{title: `拒绝售后${this.afterSaleNumData.refuseNum ? '(' + this.afterSaleNumData.refuseNum + ')' : ''}`, value: 'REFUSE'},
|
||||
{title: `待收货${this.afterSaleNumData.buyerReturnNum ? '(' + this.afterSaleNumData.buyerReturnNum + ')' : ''}`, value: 'BUYER_RETURN'},
|
||||
{title: `确认收货${this.afterSaleNumData.sellerConfirmNum ? '(' + this.afterSaleNumData.sellerConfirmNum + ')' : ''}`, value: 'SELLER_CONFIRM'},
|
||||
{title: `完成售后${this.afterSaleNumData.completeNum ? '(' + this.afterSaleNumData.completeNum + ')' : ''}`, value: 'COMPLETE'},
|
||||
{title: `卖家终止售后${this.afterSaleNumData.sellerTerminationNum ? '(' + this.afterSaleNumData.sellerTerminationNum + ')' : ''}`, value: 'SELLER_TERMINATION'},
|
||||
{title: `买家取消售后${this.afterSaleNumData.buyerCancelNum ? '(' + this.afterSaleNumData.buyerCancelNum + ')' : ''}`, value: 'BUYER_CANCEL'},
|
||||
{title: `等待平台退款${this.afterSaleNumData.waitRefundNum ? '(' + this.afterSaleNumData.waitRefundNum + ')' : ''}`, value: 'WAIT_REFUND'}
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
.current {
|
||||
background-color: #ffffff;
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// Tab组件样式
|
||||
.order-tab {
|
||||
::v-deep .ivu-tabs-tab {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>退货状态</dt>
|
||||
<dt>售后状态</dt>
|
||||
<dd>{{ afterSaleInfo.serviceName }}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
@@ -39,7 +39,7 @@
|
||||
<dl v-if="afterSaleInfo.actualRefundPrice">
|
||||
<dt>实际退款金额</dt>
|
||||
<dd>
|
||||
<priceColorScheme :value="afterSaleInfo.applyRefundPrice" :color="$mainColor"></priceColorScheme>
|
||||
<priceColorScheme :value="afterSaleInfo.actualRefundPrice" :color="$mainColor"></priceColorScheme>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl v-if="afterSaleInfo.refundPoint">
|
||||
@@ -376,11 +376,11 @@ export default {
|
||||
status: "APPLY",
|
||||
},
|
||||
{
|
||||
name: "通过",
|
||||
name: "通过售后",
|
||||
status: "PASS",
|
||||
},
|
||||
{
|
||||
name: "拒绝",
|
||||
name: "拒绝售后",
|
||||
status: "REFUSE",
|
||||
},
|
||||
{
|
||||
@@ -404,7 +404,7 @@ export default {
|
||||
status: "COMPLETE",
|
||||
},
|
||||
{
|
||||
name: "等待平台退款",
|
||||
name: "待平台退款",
|
||||
status: "WAIT_REFUND",
|
||||
},
|
||||
],
|
||||
@@ -511,7 +511,7 @@ export default {
|
||||
const ob = this.afterSaleStatusList.filter((e) => {
|
||||
return e.status === status;
|
||||
});
|
||||
return ob[0].name;
|
||||
return ob.length > 0 ? ob[0].name : status;
|
||||
},
|
||||
// 根据订单状态判断是否显示物流信息
|
||||
showDelivery(status) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
v-model="searchForm.orderSn"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="会员名称" prop="memberName">
|
||||
@@ -18,11 +18,11 @@
|
||||
v-model="searchForm.memberName"
|
||||
placeholder="请输入会员名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="状态" prop="status">
|
||||
<Select v-model="searchForm.status" placeholder="请选择" clearable style="width: 200px">
|
||||
<Select v-model="searchForm.status" placeholder="请选择" clearable style="width: 240px">
|
||||
<Option value="NEW">新投诉</Option>
|
||||
<Option value="CANCEL">已撤销</Option>
|
||||
<Option value="WAIT_APPEAL">待申诉</Option>
|
||||
@@ -34,6 +34,8 @@
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
</Card>
|
||||
<Card>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
@@ -59,7 +61,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
|
||||
@@ -84,7 +86,7 @@
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
@@ -142,24 +144,22 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 150,
|
||||
render: (h, params) => {
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 150,
|
||||
render: (h, params) => {
|
||||
if(params.row.complainStatus === "COMPLETE"){
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
@@ -173,14 +173,12 @@
|
||||
}else{
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
@@ -225,7 +223,7 @@
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取列表数据
|
||||
|
||||
@@ -2,35 +2,34 @@
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="100" class="search-form">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Form-item label="订单号" prop="sn">
|
||||
<Input type="text" v-model="searchForm.sn" placeholder="订单/交易号" clearable style="width: 200px" />
|
||||
<Input type="text" v-model="searchForm.sn" placeholder="订单/交易号" clearable style="width: 240px" />
|
||||
</Form-item>
|
||||
<Form-item label="付款状态" prop="orderStatus">
|
||||
<Select v-model="searchForm.payStatus" placeholder="请选择" clearable style="width: 200px">
|
||||
<Select v-model="searchForm.payStatus" placeholder="请选择" clearable style="width: 240px">
|
||||
<Option value="UNPAID">未付款</Option>
|
||||
<Option value="PAID">已付款</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="支付方式" prop="orderStatus">
|
||||
<Select v-model="searchForm.paymentMethod" placeholder="请选择" clearable style="width: 200px">
|
||||
<Select v-model="searchForm.paymentMethod" placeholder="请选择" clearable style="width: 240px">
|
||||
<Option value="">全部</Option>
|
||||
<Option value="WECHAT">微信</Option>
|
||||
<Option value="ALIPAY">支付宝</Option>
|
||||
<Option value="WALLET">余额</Option>
|
||||
<Option value="BANK_TRANSFER">银行转账</Option>
|
||||
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="订单创建时间">
|
||||
<DatePicker v-model="times" type="datetimerange" format="yyyy-MM-dd HH:mm" clearable @on-change="changeDate" placeholder="选择支付时间" style="width: 200px"></DatePicker>
|
||||
</Form-item>
|
||||
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
</Card>
|
||||
<Card>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10"></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>
|
||||
@@ -48,7 +47,7 @@ export default {
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
sn: "",
|
||||
@@ -185,7 +184,7 @@ export default {
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
changeDate(val) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
v-model="searchForm.orderSn"
|
||||
placeholder="订单/交易号"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="退款状态">
|
||||
@@ -23,7 +23,7 @@
|
||||
v-model="searchForm.isRefund"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="false">未退款</Option>
|
||||
<Option value="true">已退款</Option>
|
||||
@@ -37,7 +37,7 @@
|
||||
clearable
|
||||
@on-change="selectDateRange"
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Button
|
||||
@@ -49,6 +49,8 @@
|
||||
>
|
||||
</Form>
|
||||
</Row>
|
||||
</Card>
|
||||
<Card>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
@@ -91,7 +93,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
|
||||
@@ -113,7 +115,7 @@ export default {
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
@@ -194,7 +196,7 @@ export default {
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
// 起止时间从新赋值
|
||||
|
||||
@@ -4,41 +4,33 @@
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Form-item label="订单号" prop="orderSn">
|
||||
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 200px" />
|
||||
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 240px" />
|
||||
</Form-item>
|
||||
<Form-item label="会员名称" prop="buyerName">
|
||||
<Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 200px" />
|
||||
<Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 240px" />
|
||||
</Form-item>
|
||||
<!-- <Form-item label="订单状态" prop="orderStatus">-->
|
||||
<!-- <Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 200px">-->
|
||||
<!-- <Option value="NEW">新订单</Option>-->
|
||||
<!-- <Option value="CONFIRM">已确认</Option>-->
|
||||
<!-- <Option value="TAKE">待核验</Option>-->
|
||||
<!-- <Option value="COMPLETE">已完成</Option>-->
|
||||
<!-- <Option value="WAIT_PINTUAN">待成团</Option>-->
|
||||
<!-- <Option value="CANCELLED">已关闭</Option>-->
|
||||
<!-- </Select>-->
|
||||
<!-- </Form-item>-->
|
||||
<Form-item label="下单时间">
|
||||
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable
|
||||
@on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
|
||||
@on-change="selectDateRange" placeholder="选择起始时间" style="width: 240px"></DatePicker>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
|
||||
</Form>
|
||||
</Row>
|
||||
|
||||
</Card>
|
||||
<Card>
|
||||
<div class="order-tab">
|
||||
<div v-for="(item,index) in orderStatus" :key="index" :class="{'current': currentStatus === item.value}" @click="orderStatusClick(item)">
|
||||
{{item.title}}
|
||||
</div>
|
||||
<Tabs v-model="currentStatus" @on-click="orderStatusClick">
|
||||
<TabPane v-for="(item,index) in orderStatus" :key="index" :label="item.title" :name="item.value">
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10" sortable="custom"
|
||||
@on-sort-change="changeSort"></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>
|
||||
@@ -56,7 +48,7 @@ export default {
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "", // 默认排序字段
|
||||
order: "", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
@@ -215,7 +207,7 @@ export default {
|
||||
// 搜索
|
||||
handleSearch () {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
// 列表排序
|
||||
@@ -275,8 +267,8 @@ export default {
|
||||
},
|
||||
// 订单筛选
|
||||
orderStatusClick(item) {
|
||||
this.currentStatus = item.value;
|
||||
this.searchForm.orderStatus = item.value;
|
||||
this.currentStatus = item; // 使用参数 item
|
||||
this.searchForm.orderStatus = item; // 使用参数 item
|
||||
this.getDataList();
|
||||
},
|
||||
},
|
||||
@@ -288,23 +280,11 @@ export default {
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// Tab组件样式
|
||||
.order-tab {
|
||||
margin: 10px 20px 10px 0;
|
||||
width: 950px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: #f0f0f0;
|
||||
padding: 0 10px;
|
||||
div {
|
||||
text-align: center;
|
||||
padding: 4px 12px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.current {
|
||||
background-color: #ffffff;
|
||||
margin-top: 20px;
|
||||
::v-deep .ivu-tabs-tab {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -9,13 +9,22 @@
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="关键字" prop="keywords" style="display: block; width: 100%;">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.keywords"
|
||||
placeholder="请输入商品名称/收货人/收货人手机号/店铺名称"
|
||||
clearable
|
||||
style="width: 500px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="订单号" prop="orderSn">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.orderSn"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
style="width: 160px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="会员名称" prop="buyerName">
|
||||
@@ -24,16 +33,33 @@
|
||||
v-model="searchForm.buyerName"
|
||||
placeholder="请输入会员名称"
|
||||
clearable
|
||||
style="width: 160px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="商品名称" prop="goodsName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="收货人" prop="shipName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.shipName"
|
||||
placeholder="请输入收货人姓名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
|
||||
<Form-item label="订单类型" prop="orderType">
|
||||
<Select
|
||||
v-model="searchForm.orderPromotionType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 160px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="NORMAL">普通订单</Option>
|
||||
<Option value="PINTUAN">拼团订单</Option>
|
||||
@@ -42,6 +68,19 @@
|
||||
<Option value="KANJIA">砍价订单</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="支付方式" prop="paymentMethod">
|
||||
<Select
|
||||
v-model="searchForm.paymentMethod"
|
||||
placeholder="请选择支付方式"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="WECHAT">微信支付</Option>
|
||||
<Option value="ALIPAY">支付宝</Option>
|
||||
<Option value="WALLET">余额支付</Option>
|
||||
<Option value="BANK_TRANSFER">线下转账</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="下单时间">
|
||||
<DatePicker
|
||||
v-model="selectDate"
|
||||
@@ -50,26 +89,9 @@
|
||||
clearable
|
||||
@on-change="selectDateRange"
|
||||
placeholder="选择起始时间"
|
||||
style="width: 160px"
|
||||
style="width: 240px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<!-- <Form-item label="订单状态" prop="orderStatus">-->
|
||||
<!-- <Select-->
|
||||
<!-- v-model="searchForm.orderStatus"-->
|
||||
<!-- placeholder="请选择"-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 160px"-->
|
||||
<!-- >-->
|
||||
<!-- <Option value="UNPAID">未付款</Option>-->
|
||||
<!-- <Option value="PAID">已付款</Option>-->
|
||||
<!-- <Option value="UNDELIVERED">待发货</Option>-->
|
||||
<!-- <Option value="DELIVERED">已发货</Option>-->
|
||||
<!-- <Option value="COMPLETED">已完成</Option>-->
|
||||
<!-- <Option value="TAKE">待核验</Option>-->
|
||||
<!-- <Option value="CANCELLED">已关闭</Option>-->
|
||||
<!-- <Option value="STAY_PICKED_UP">待自提</Option>-->
|
||||
<!-- </Select>-->
|
||||
<!-- </Form-item>-->
|
||||
<Button
|
||||
@click="handleSearch"
|
||||
type="primary"
|
||||
@@ -78,19 +100,19 @@
|
||||
>搜索</Button
|
||||
>
|
||||
</Form>
|
||||
</Card>
|
||||
<Card>
|
||||
<div class="order-tab">
|
||||
<Tabs v-model="currentStatus" @on-click="orderStatusClick">
|
||||
<TabPane v-for="(item,index) in orderStatusWithCount" :key="index" :label="item.title" :name="item.value">
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
<div>
|
||||
<Button @click="exportOrder" type="info" class="export">导出订单</Button>
|
||||
</div>
|
||||
|
||||
<div class="order-tab">
|
||||
<div v-for="(item,index) in orderStatus" :key="index" :class="{'current': currentStatus === item.value}" @click="orderStatusClick(item)">
|
||||
{{item.title}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
@@ -104,7 +126,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
|
||||
@@ -163,15 +185,19 @@ export default {
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
endDate: "", // 终止时间
|
||||
orderType: "",
|
||||
orderSn: "",
|
||||
keywords: "", // 新增关键字搜索字段
|
||||
buyerName: "",
|
||||
goodsName: "", // 新增商品名称筛选字段
|
||||
shipName: "", // 新增收货人筛选字段
|
||||
orderStatus: "",
|
||||
paymentMethod: "", // 新增支付方式筛选字段
|
||||
},
|
||||
selectDate: null,
|
||||
columns: [
|
||||
@@ -181,7 +207,6 @@ export default {
|
||||
minWidth: 240,
|
||||
tooltip: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "订单来源",
|
||||
key: "clientType",
|
||||
@@ -234,6 +259,19 @@ export default {
|
||||
minWidth: 130,
|
||||
tooltip: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "会员ID",
|
||||
key: "memberId",
|
||||
minWidth: 120,
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "storeName",
|
||||
minWidth: 150,
|
||||
tooltip: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "订单金额",
|
||||
@@ -245,7 +283,24 @@ export default {
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
title: "支付方式",
|
||||
key: "paymentMethod",
|
||||
width: 120,
|
||||
render: (h, params) => {
|
||||
if (params.row.paymentMethod == "WECHAT") {
|
||||
return h("div", {}, "微信支付");
|
||||
} else if (params.row.paymentMethod == "ALIPAY") {
|
||||
return h("div", {}, "支付宝");
|
||||
} else if (params.row.paymentMethod == "WALLET") {
|
||||
return h("div", {}, "余额支付");
|
||||
} else if (params.row.paymentMethod == "BANK_TRANSFER") {
|
||||
return h("div", {}, "线下转账");
|
||||
} else {
|
||||
return h("div", {}, params.row.paymentMethod || "-");
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "订单状态",
|
||||
key: "orderStatus",
|
||||
@@ -267,6 +322,10 @@ export default {
|
||||
return h("div", [
|
||||
h("tag", { props: { color: "geekblue" } }, "待自提"),
|
||||
]);
|
||||
} else if (params.row.orderStatus == "PARTS_DELIVERED") {
|
||||
return h("div", [
|
||||
h("tag", { props: { color: "cyan" } }, "部分发货"),
|
||||
]);
|
||||
} else if (params.row.orderStatus == "DELIVERED") {
|
||||
return h("div", [
|
||||
h("tag", { props: { color: "cyan" } }, "已发货"),
|
||||
@@ -298,42 +357,70 @@ export default {
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"Button",
|
||||
{
|
||||
props: { type: "info", size: "small" },
|
||||
style: { marginRight: "5px" },
|
||||
on: {
|
||||
click: () => {
|
||||
this.detail(params.row);
|
||||
"div",
|
||||
{ class: "ops" },
|
||||
[
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
style: {
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.detail(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"查看"
|
||||
"查看"
|
||||
),
|
||||
]
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
orderNumData: {}, // 新增:订单数量统计数据
|
||||
orderStatus: [
|
||||
{title: '全部', value: ''},
|
||||
{title: '未付款', value: 'UNPAID'},
|
||||
{title: '已付款', value: 'PAID'},
|
||||
{title: '待发货', value: 'UNDELIVERED'},
|
||||
{title: '部分发货', value: 'PARTS_DELIVERED'},
|
||||
{title: '已发货', value: 'DELIVERED'},
|
||||
{title: '待核验', value: 'TAKE'},
|
||||
{title: '待自提', value: 'STAY_PICKED_UP'},
|
||||
{title: '已完成', value: 'COMPLETED'},
|
||||
{title: '已关闭', value: 'CANCELLED'},
|
||||
|
||||
],
|
||||
currentStatus: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 新增:带数量的订单状态选项
|
||||
orderStatusWithCount() {
|
||||
return [
|
||||
{title: '全部', value: ''},
|
||||
{title: `未付款${this.orderNumData.waitPayNum ? '(' + this.orderNumData.waitPayNum + ')' : ''}`, value: 'UNPAID'},
|
||||
{title: `已付款${this.orderNumData.waitDeliveryNum ? '(' + this.orderNumData.waitDeliveryNum + ')' : ''}`, value: 'PAID'},
|
||||
{title: `待发货${this.orderNumData.waitShipNum ? '(' + this.orderNumData.waitShipNum + ')' : ''}`, value: 'UNDELIVERED'},
|
||||
{title: `部分发货${this.orderNumData.partsDeliveredNumNum ? '(' + this.orderNumData.partsDeliveredNumNum + ')' : ''}`, value: 'PARTS_DELIVERED'},
|
||||
{title: `待收货${this.orderNumData.deliveredNum ? '(' + this.orderNumData.deliveredNum + ')' : ''}`, value: 'DELIVERED'},
|
||||
{title: `待核验${this.orderNumData.waitCheckNum ? '(' + this.orderNumData.waitCheckNum + ')' : ''}`, value: 'TAKE'},
|
||||
{title: `待自提${this.orderNumData.waitSelfPickNum ? '(' + this.orderNumData.waitSelfPickNum + ')' : ''}`, value: 'STAY_PICKED_UP'},
|
||||
{title: `已完成${this.orderNumData.finishNum ? '(' + this.orderNumData.finishNum + ')' : ''}`, value: 'COMPLETED'},
|
||||
{title: `已关闭${this.orderNumData.closeNum ? '(' + this.orderNumData.closeNum + ')' : ''}`, value: 'CANCELLED'},
|
||||
];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
this.getOrderNumData(); // 新增:获取订单数量统计
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
@@ -349,8 +436,9 @@ export default {
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
this.getOrderNumData(); // 新增:搜索时也更新数量统计
|
||||
},
|
||||
// 起止时间从新赋值
|
||||
selectDateRange(v) {
|
||||
@@ -414,11 +502,29 @@ export default {
|
||||
|
||||
},
|
||||
// 订单筛选
|
||||
orderStatusClick(item) {
|
||||
this.currentStatus = item.value;
|
||||
this.searchForm.orderStatus = item.value;
|
||||
orderStatusClick(name) {
|
||||
if (name === 0) {
|
||||
// 点击"全部"时,设置为空字符串,在getDataList中会被过滤掉
|
||||
this.searchForm.orderStatus = '';
|
||||
} else {
|
||||
// 其他状态正常赋值
|
||||
this.searchForm.orderStatus = name;
|
||||
}
|
||||
this.currentStatus = name;
|
||||
|
||||
this.getDataList();
|
||||
},
|
||||
getOrderNumData() {
|
||||
// 创建一个不包含orderStatus字段的搜索参数
|
||||
const { orderStatus, ...searchParams } = this.searchForm;
|
||||
API_Order.getOrderNum(searchParams).then((res) => {
|
||||
if (res.success) {
|
||||
this.orderNumData = res.result;
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.error('获取订单数量统计失败:', err);
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
@@ -432,23 +538,21 @@ export default {
|
||||
.export-excel-wrapper {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
// Tab组件样式
|
||||
.order-tab {
|
||||
width: 950px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: #f0f0f0;
|
||||
padding: 0 10px;
|
||||
margin-bottom: 10px;
|
||||
div {
|
||||
text-align: center;
|
||||
padding: 4px 12px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.current {
|
||||
background-color: #ffffff;
|
||||
::v-deep .ivu-tabs-tab {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.ops a {
|
||||
color: #2d8cf0;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ops span {
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
color: #dcdee2;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
:total="total"
|
||||
show-sizer
|
||||
size="small"
|
||||
:page-size-opts="[10, 20, 50]"
|
||||
:page-size-opts="[20, 50, 100]"
|
||||
show-elevator
|
||||
style="float: right; overflow: hidden"
|
||||
@on-change="changePageNum"
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
},
|
||||
searchForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
pageType: "INDEX",
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
<td>
|
||||
<Input
|
||||
v-model="item.url"
|
||||
disabled
|
||||
:disabled="!item.title || item.title !== '外部链接'"
|
||||
/>
|
||||
</td>
|
||||
<!-- <td><Input v-model="item.sort"/></td> -->
|
||||
@@ -201,15 +201,16 @@ export default {
|
||||
bgColor: "#de000d",
|
||||
size: "1200*80",
|
||||
},
|
||||
currentIndex: 0,
|
||||
navList: {
|
||||
// 分类nav数据
|
||||
type: "navBar",
|
||||
list: [
|
||||
{ name: "秒杀", url: "" },
|
||||
{ name: "闪购", url: "" },
|
||||
{ name: "优惠券", url: "" },
|
||||
{ name: "拍卖", url: "" },
|
||||
{ name: "服装城", url: "" },
|
||||
{ name: "秒杀", url: "", title: "" },
|
||||
{ name: "闪购", url: "", title: "" },
|
||||
{ name: "优惠券", url: "", title: "" },
|
||||
{ name: "拍卖", url: "", title: "" },
|
||||
{ name: "服装城", url: "", title: "" },
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -228,21 +229,19 @@ export default {
|
||||
// 调起选择链接弹窗
|
||||
if (item) this.selectedNav = item;
|
||||
this.$refs.liliDialog.open("link");
|
||||
console.log(item);
|
||||
this.currentIndex = index;
|
||||
},
|
||||
// 已选链接
|
||||
selectedLink(val) {
|
||||
|
||||
|
||||
if (this.showModalNav) {
|
||||
this.selectedNav.url = this.$options.filters.formatLinkType(val);
|
||||
this.selectedNav.type =
|
||||
val.___type === "other" && val.url === "" ? "link" : "other";
|
||||
this.selectedNav.type = val.___type === "other" && val.url === "" ? "link" : "other";
|
||||
} else {
|
||||
this.topAdvert.url = this.$options.filters.formatLinkType(val);
|
||||
this.topAdvert.type =
|
||||
val.___type === "other" && val.url === "" ? "link" : "other";
|
||||
this.topAdvert.type = val.___type === "other" && val.url === "" ? "link" : "other";
|
||||
}
|
||||
this.navList.list[this.currentIndex].title = val.title;
|
||||
},
|
||||
handleDelNav(index) {
|
||||
// 删除导航
|
||||
@@ -250,7 +249,9 @@ export default {
|
||||
},
|
||||
handleAddNav() {
|
||||
// 添加导航
|
||||
this.navList.list.push({ name: "", url: "" });
|
||||
this.navList.list.push({ name: "", url: "", title: "" });this.$nextTick(() => {
|
||||
this.selectedNav.title = val.title;
|
||||
});
|
||||
},
|
||||
// 拖动结束回调
|
||||
handleMoveEnd({ newIndex, oldIndex }) {
|
||||
@@ -370,7 +371,7 @@ export default {
|
||||
.search {
|
||||
width: 460px;
|
||||
margin: 0 auto;
|
||||
/deep/ .ivu-input.ivu-input-large {
|
||||
::v-deep .ivu-input.ivu-input-large {
|
||||
border: 2px solid $theme_color;
|
||||
font-size: 12px;
|
||||
height: 34px;
|
||||
@@ -378,7 +379,7 @@ export default {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
/deep/ .ivu-input-group-append {
|
||||
::v-deep .ivu-input-group-append {
|
||||
border: 1px solid $theme_color;
|
||||
border-left: none;
|
||||
height: 30px;
|
||||
|
||||
@@ -104,6 +104,7 @@ export default {
|
||||
pageData: JSON.stringify(modelForm),
|
||||
// 如果是专题页面永远关闭
|
||||
pageShow: this.$route.query.pageType === 'SPECIAL' ? 'CLOSE' : pageShow,
|
||||
pageClientType: 'PC',
|
||||
};
|
||||
API_floor.updateHome(this.$route.query.id, data).then((res) => {
|
||||
this.submitLoading = false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/deep/ .ivu-modal-mask,
|
||||
::v-deep .ivu-modal-mask,
|
||||
.ivu-modal-wrap {
|
||||
z-index: 800;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
line-height: 2;
|
||||
/deep/ img {
|
||||
::v-deep img {
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
:current="params.pageNumber"
|
||||
:page-size="params.pageSize"
|
||||
show-sizer
|
||||
:page-size-opts="[10, 20, 50]"
|
||||
:page-size-opts="[20, 50, 100]"
|
||||
@on-page-size-change="changePageSize"
|
||||
/>
|
||||
</Card>
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
params: {
|
||||
// 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
pageType: "INDEX",
|
||||
|
||||
@@ -19,29 +19,21 @@
|
||||
primary-key="id"
|
||||
>
|
||||
<template slot="action" slot-scope="scope">
|
||||
<Button
|
||||
type="info"
|
||||
<a
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none;margin-right:5px"
|
||||
@click="edit(scope.row)"
|
||||
size="small"
|
||||
style="margin-right: 5px"
|
||||
>编辑
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
type="error"
|
||||
>编辑</a>
|
||||
<span style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none;margin-right:5px"
|
||||
@click="remove(scope.row)"
|
||||
size="small"
|
||||
style="margin-right: 5px"
|
||||
>删除
|
||||
</Button>
|
||||
<Button
|
||||
>删除</a>
|
||||
<span v-show="scope.row.level != 1" style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a
|
||||
v-show="scope.row.level != 1"
|
||||
type="success"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="addChildren(scope.row)"
|
||||
size="small"
|
||||
style="margin-right: 5px"
|
||||
>添加子分类
|
||||
</Button>
|
||||
>添加子分类</a>
|
||||
</template>
|
||||
</tree-table>
|
||||
</Card>
|
||||
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .ivu-input {
|
||||
::v-deep .ivu-input {
|
||||
width: 70px !important;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
}
|
||||
|
||||
.label-btns {
|
||||
/deep/ .ivu-btn {
|
||||
::v-deep .ivu-btn {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,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
|
||||
@@ -165,14 +165,14 @@ export default {
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
treeDataDefault: [],
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
categoryId: "",
|
||||
},
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
categoryId: "",
|
||||
},
|
||||
searchTreeValue: "", // 切换
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
@@ -221,16 +221,12 @@ export default {
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
size: "small",
|
||||
type:
|
||||
this.selectedIndex == params.index
|
||||
? "primary"
|
||||
: "default",
|
||||
},
|
||||
style: {
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none",
|
||||
marginRight: "5px",
|
||||
display: this.selected ? "" : "none",
|
||||
},
|
||||
@@ -244,13 +240,17 @@ export default {
|
||||
this.selectedIndex == params.index ? "已选" : "选择"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
"span",
|
||||
{ style: { margin: "0 8px", color: "#dcdee2" } },
|
||||
"|"
|
||||
),
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
size: "small",
|
||||
type: "info",
|
||||
},
|
||||
style: {
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none",
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
@@ -262,11 +262,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: () => {
|
||||
@@ -357,7 +363,7 @@ export default {
|
||||
// 搜索列表
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取全部文章分类
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/deep/ .ivu-input{
|
||||
::v-deep .ivu-input{
|
||||
width: 200px !important;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/deep/ .ivu-form-item-content {
|
||||
::v-deep .ivu-form-item-content {
|
||||
margin-left: 0 !important;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
width:500px;
|
||||
justify-content:space-between;
|
||||
}
|
||||
/deep/ .ivu-input {
|
||||
::v-deep .ivu-input {
|
||||
width: 100px !important;
|
||||
}
|
||||
.ivu-input-wrapper {
|
||||
|
||||
@@ -16,7 +16,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
|
||||
@@ -79,7 +79,7 @@
|
||||
form: {}, // 表单数据
|
||||
searchForm: { // 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
},
|
||||
@@ -133,17 +133,10 @@
|
||||
align: "center",
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
return h("div", { class: "ops" }, [
|
||||
h(
|
||||
"Button",
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
size: "small",
|
||||
type: "info"
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.detail(params.row);
|
||||
@@ -208,3 +201,15 @@
|
||||
},
|
||||
};
|
||||
</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>
|
||||
|
||||
@@ -188,7 +188,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .upload-list {
|
||||
::v-deep .upload-list {
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -109,16 +109,14 @@ export default {
|
||||
align: "center",
|
||||
width: 230,
|
||||
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: () => {
|
||||
@@ -283,4 +281,14 @@ export default {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
}
|
||||
.ops a {
|
||||
color: #2d8cf0;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ops span {
|
||||
display: inline-block;
|
||||
margin: 0 8px;
|
||||
color: #dcdee2;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -211,12 +211,12 @@ export default {
|
||||
align: "center",
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"Button",
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
size: "small",
|
||||
type: "error",
|
||||
ghost: true,
|
||||
style: {
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none"
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
|
||||
@@ -13,20 +13,19 @@
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button type="info" size="small" style="margin-right: 10px" @click="info(row)">
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
v-if="
|
||||
(!checked && row.promotionStatus === 'START') ||
|
||||
row.promotionStatus === 'NEW'
|
||||
"
|
||||
type="error"
|
||||
size="small"
|
||||
style="margin-right: 10px"
|
||||
<a
|
||||
:style="{ color: '#2d8cf0', cursor: 'pointer', textDecoration: 'none' }"
|
||||
@click="info(row)"
|
||||
>查看</a>
|
||||
<span
|
||||
v-if="(!checked && row.promotionStatus === 'START') || row.promotionStatus === 'NEW'"
|
||||
style="margin: 0 8px; color: #dcdee2"
|
||||
>|</span>
|
||||
<a
|
||||
v-if="(!checked && row.promotionStatus === 'START') || row.promotionStatus === 'NEW'"
|
||||
:style="{ color: '#2d8cf0', cursor: 'pointer', textDecoration: 'none' }"
|
||||
@click="remove(row)"
|
||||
>关闭
|
||||
</Button>
|
||||
>关闭</a>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
@@ -36,7 +35,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
|
||||
@@ -60,13 +59,13 @@ export default {
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
promotionName: "",
|
||||
@@ -202,7 +201,7 @@ export default {
|
||||
//搜索活动
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
//数据获取
|
||||
|
||||
@@ -36,15 +36,17 @@
|
||||
prop="couponDiscount"
|
||||
v-if="form.couponType == 'DISCOUNT'"
|
||||
>
|
||||
<Input
|
||||
<InputNumber
|
||||
:disabled="disabled"
|
||||
type="number"
|
||||
v-model="form.couponDiscount"
|
||||
placeholder="折扣"
|
||||
clearable
|
||||
style="width: 260px"
|
||||
/>
|
||||
<span class="describe">请输入0-10之间数字,可以输入一位小数</span>
|
||||
:max="9.9"
|
||||
:min="0.1"
|
||||
:step="0.1"
|
||||
precision="1"
|
||||
v-model="form.couponDiscount"
|
||||
style="width: 260px">
|
||||
</InputNumber>
|
||||
<span class="describe">请输入0-10的数字,可有一位小数</span>
|
||||
</FormItem>
|
||||
<FormItem label="面额" prop="price" v-if="form.couponType == 'PRICE'">
|
||||
<Input
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
|
||||
<div class="search">
|
||||
<Button style="margin-bottom: 10px" @click="back()">返回</Button>
|
||||
<Card>
|
||||
<Button style="margin-bottom: 10px" @click="back()">返回</Button>
|
||||
|
||||
<Form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
@@ -15,7 +17,7 @@
|
||||
v-model="searchForm.couponName"
|
||||
placeholder="请输入优惠券名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="会员名称" prop="memberName">
|
||||
@@ -24,7 +26,7 @@
|
||||
v-model="searchForm.memberName"
|
||||
placeholder="请输入会员名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="获取方式" prop="getType">
|
||||
@@ -32,7 +34,7 @@
|
||||
v-model="searchForm.getType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="FREE">免费获取</Option>
|
||||
<Option value="ACTIVITY">活动获取</Option>
|
||||
@@ -43,7 +45,7 @@
|
||||
v-model="searchForm.memberCouponStatus"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="NEW">已领取</Option>
|
||||
<Option value="USED">已使用</Option>
|
||||
@@ -57,7 +59,7 @@
|
||||
type="daterange"
|
||||
clearable
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Button
|
||||
@@ -68,6 +70,8 @@
|
||||
>搜索</Button
|
||||
>
|
||||
</Form>
|
||||
</Card>
|
||||
<Card>
|
||||
<Table
|
||||
v-if="refreshTable"
|
||||
:loading="loading"
|
||||
@@ -86,7 +90,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
|
||||
@@ -108,15 +112,15 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
getType: "", // 默认排序方式
|
||||
couponId: this.$route.query.couponId, // 优惠券id
|
||||
},
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
getType: "", // 默认排序方式
|
||||
couponId: this.$route.query.couponId, // 优惠券id
|
||||
},
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
@@ -280,7 +284,7 @@ export default {
|
||||
handleSearch() {
|
||||
// 搜索
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
v-model="searchForm.couponName"
|
||||
placeholder="请输入优惠券名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="获取方式" prop="getType">
|
||||
@@ -22,7 +22,7 @@
|
||||
v-model="searchForm.getType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="FREE">免费获取</Option>
|
||||
<Option value="ACTIVITY">活动获取</Option>
|
||||
@@ -33,7 +33,7 @@
|
||||
v-model="searchForm.promotionStatus"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="NEW">未开始</Option>
|
||||
<Option value="START">已开始/上架</Option>
|
||||
@@ -47,7 +47,7 @@
|
||||
type="daterange"
|
||||
clearable
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Button
|
||||
@@ -58,6 +58,8 @@
|
||||
>搜索</Button
|
||||
>
|
||||
</Form>
|
||||
</Card>
|
||||
<Card>
|
||||
<Row class="operation padding-row" v-if="getType !== 'ACTIVITY'">
|
||||
<Button @click="add" type="primary">添加优惠券</Button>
|
||||
<Button @click="delAll">批量关闭</Button>
|
||||
@@ -73,49 +75,30 @@
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
v-if="
|
||||
row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'
|
||||
"
|
||||
type="info"
|
||||
size="small"
|
||||
<a
|
||||
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
|
||||
:style="{ color: '#2d8cf0', cursor: 'pointer', textDecoration: 'none' }"
|
||||
@click="see(row)"
|
||||
>编辑
|
||||
</Button>
|
||||
<Button
|
||||
>编辑</a>
|
||||
<a
|
||||
v-else
|
||||
type="default"
|
||||
size="small"
|
||||
:style="{ color: '#2d8cf0', cursor: 'pointer', textDecoration: 'none' }"
|
||||
@click="see(row, 'onlyView')"
|
||||
>查看
|
||||
</Button>
|
||||
<Button
|
||||
class="ml_5"
|
||||
v-if="
|
||||
row.promotionStatus === 'START' || row.promotionStatus === 'NEW'
|
||||
"
|
||||
type="error"
|
||||
size="small"
|
||||
>查看</a>
|
||||
<span
|
||||
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
|
||||
style="margin: 0 8px; color: #dcdee2"
|
||||
>|</span>
|
||||
<a
|
||||
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
|
||||
:style="{ color: '#2d8cf0', cursor: 'pointer', textDecoration: 'none' }"
|
||||
@click="close(row)"
|
||||
>关闭
|
||||
</Button>
|
||||
<!--<Button-->
|
||||
<!--class="ml_5"-->
|
||||
<!--v-if="-->
|
||||
<!--row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'-->
|
||||
<!--"-->
|
||||
<!--type="error"-->
|
||||
<!--size="small"-->
|
||||
<!--@click="remove(row)"-->
|
||||
<!-->删除-->
|
||||
<!--</Button>-->
|
||||
<Button
|
||||
style="margin: 5px"
|
||||
type="info"
|
||||
size="small"
|
||||
>关闭</a>
|
||||
<span style="margin: 0 8px; color: #dcdee2">|</span>
|
||||
<a
|
||||
:style="{ color: '#2d8cf0', cursor: 'pointer', textDecoration: 'none' }"
|
||||
@click="receivePage(row.id)"
|
||||
>领取记录
|
||||
</Button>
|
||||
>领取记录</a>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
@@ -125,7 +108,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
|
||||
@@ -151,14 +134,14 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
getType: "", // 默认排序方式
|
||||
},
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
getType: "", // 默认排序方式
|
||||
},
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
@@ -386,7 +369,7 @@ export default {
|
||||
handleSearch() {
|
||||
// 搜索
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
|
||||
@@ -81,14 +81,14 @@
|
||||
label="优惠折扣"
|
||||
prop="fullRate"
|
||||
>
|
||||
<Input
|
||||
type="text"
|
||||
v-model="form.fullRate"
|
||||
<InputNumber
|
||||
placeholder="优惠折扣"
|
||||
disabled
|
||||
clearable
|
||||
style="width: 260px"
|
||||
/>
|
||||
:max="9.9"
|
||||
:min="0.1"
|
||||
:step="0.1"
|
||||
precision="1"
|
||||
v-model="form.fullRate"
|
||||
style="width: 260px"/>
|
||||
<span class="describe">优惠折扣为0-10之间数字,可有一位小数</span>
|
||||
</FormItem>
|
||||
<FormItem label="额外赠送">
|
||||
@@ -285,8 +285,8 @@ export default {
|
||||
getCouponList(query) {
|
||||
// 优惠券列表
|
||||
let params = {
|
||||
pageSize: 10,
|
||||
pageNumber: 0,
|
||||
pageSize: 20,
|
||||
pageNumber: 1,
|
||||
getType: "ACTIVITY",
|
||||
storeId: "",
|
||||
couponName: query,
|
||||
@@ -303,7 +303,7 @@ export default {
|
||||
getGiftList(query) {
|
||||
// 赠品列表
|
||||
let params = {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pageNumber: 1,
|
||||
id: query === this.form.giftId ? this.form.giftId : null,
|
||||
goodsName: query === this.form.giftId ? null : query,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
v-model="searchForm.promotionName"
|
||||
placeholder="请输入活动名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="活动状态" prop="promotionStatus">
|
||||
@@ -23,7 +23,7 @@
|
||||
v-model="searchForm.promotionStatus"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="NEW">未开始</Option>
|
||||
<Option value="START">已开始/上架</Option>
|
||||
@@ -37,7 +37,7 @@
|
||||
type="daterange"
|
||||
clearable
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
</DatePicker>
|
||||
</Form-item>
|
||||
@@ -50,6 +50,8 @@
|
||||
>
|
||||
</Form>
|
||||
</Row>
|
||||
</Card>
|
||||
<Card>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
@@ -70,15 +72,19 @@
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<div>
|
||||
<Button type="info" size="small" @click="view(row)">查看</Button>
|
||||
<Button
|
||||
type="error"
|
||||
<a
|
||||
:style="{ color: '#2d8cf0', cursor: 'pointer', textDecoration: 'none' }"
|
||||
@click="view(row)"
|
||||
>查看</a>
|
||||
<span
|
||||
v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'START'"
|
||||
style="margin-left: 5px"
|
||||
size="small"
|
||||
style="margin: 0 8px; color: #dcdee2"
|
||||
>|</span>
|
||||
<a
|
||||
v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'START'"
|
||||
:style="{ color: '#2d8cf0', cursor: 'pointer', textDecoration: 'none' }"
|
||||
@click="openOrClose(row)"
|
||||
>关闭</Button
|
||||
>
|
||||
>关闭</a>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
@@ -89,7 +95,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
|
||||
@@ -109,13 +115,13 @@ export default {
|
||||
selectDate: [],
|
||||
total: 0,
|
||||
loading: false, // 表单加载状态
|
||||
searchForm: {
|
||||
// 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
},
|
||||
searchForm: {
|
||||
// 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 20,
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
},
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
@@ -203,7 +209,7 @@ export default {
|
||||
handleSearch() {
|
||||
// 搜索
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取列表数据
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
v-model="searchForm.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="活动状态" prop="promotionStatus">
|
||||
@@ -23,7 +23,7 @@
|
||||
v-model="searchForm.promotionStatus"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="NEW">未开始</Option>
|
||||
<Option value="START">已开始/上架</Option>
|
||||
@@ -37,7 +37,7 @@
|
||||
type="daterange"
|
||||
clearable
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
</DatePicker>
|
||||
</Form-item>
|
||||
@@ -50,6 +50,8 @@
|
||||
>
|
||||
</Form>
|
||||
</Row>
|
||||
</Card>
|
||||
<Card>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加砍价</Button>
|
||||
</Row>
|
||||
@@ -96,28 +98,18 @@
|
||||
<div>{{ row.stock }}</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
<a
|
||||
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
|
||||
type="info"
|
||||
size="small"
|
||||
style="margin-right: 10px"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none;margin-right:10px"
|
||||
@click="edit(row)"
|
||||
>编辑
|
||||
</Button>
|
||||
<Button
|
||||
</a>
|
||||
<a
|
||||
v-else
|
||||
size="small"
|
||||
style="margin-right: 10px"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none;margin-right:10px"
|
||||
@click="edit(row, 'onlyView')"
|
||||
>查看
|
||||
</Button>
|
||||
<!--<Button-->
|
||||
<!--type="error"-->
|
||||
<!--size="small"-->
|
||||
<!--style="margin-right: 10px"-->
|
||||
<!--@click="delAll(row)"-->
|
||||
<!-->删除-->
|
||||
<!--</Button>-->
|
||||
</a>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
@@ -127,7 +119,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
|
||||
@@ -156,14 +148,14 @@ export default {
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
goodsName: "",
|
||||
},
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
goodsName: "",
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
},
|
||||
@@ -281,7 +273,7 @@ export default {
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
|
||||
@@ -236,7 +236,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.action {
|
||||
display: flex;
|
||||
/deep/ .ivu-btn {
|
||||
::v-deep .ivu-btn {
|
||||
margin: 0 5px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePageNumber"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10, 20, 50]"
|
||||
:page-size-opts="[20, 50, 100]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
total: 0,
|
||||
// 查询的form
|
||||
searchForm: {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pageNumber: 1,
|
||||
status: "NEW",
|
||||
},
|
||||
|
||||
@@ -48,7 +48,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
|
||||
@@ -70,11 +70,11 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
},
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 20, // 页面大小
|
||||
},
|
||||
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
v-model="searchForm.promotionName"
|
||||
placeholder="请输入活动名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="活动状态" prop="promotionStatus">
|
||||
@@ -22,7 +22,7 @@
|
||||
v-model="searchForm.promotionStatus"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<Option value="NEW">未开始</Option>
|
||||
<Option value="START">已开始/上架</Option>
|
||||
@@ -36,11 +36,13 @@
|
||||
type="daterange"
|
||||
clearable
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Card>
|
||||
<Card>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
@@ -50,16 +52,19 @@
|
||||
class="mt_10"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button type="info" size="small" @click="view(row)" style="margin-right: 5px"
|
||||
>查看</Button
|
||||
>
|
||||
<Button
|
||||
type="error"
|
||||
size="small"
|
||||
<a
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none;margin-right:5px"
|
||||
@click="view(row)"
|
||||
>查看</a>
|
||||
<span
|
||||
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
|
||||
style="margin:0 8px;color:#dcdee2"
|
||||
>|</span>
|
||||
<a
|
||||
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="close(row)"
|
||||
>关闭
|
||||
</Button>
|
||||
>关闭</a>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
@@ -69,7 +74,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
|
||||
@@ -90,13 +95,13 @@ export default {
|
||||
return {
|
||||
selectDate: [], //选中的数据
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime",
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime",
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
@@ -161,11 +166,11 @@ export default {
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取拼团列表
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
@@ -18,10 +18,31 @@
|
||||
primary-key="id"
|
||||
>
|
||||
<template slot="action" slot-scope="scope">
|
||||
<Button @click.native="edit(scope.row)" style="margin-right:10px;" size="small">编辑</Button>
|
||||
<Button @click.native="remove(scope.row)" type="primary" size="small">删除</Button>
|
||||
<a
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none;margin-right:10px"
|
||||
@click.native="edit(scope.row)"
|
||||
>编辑</a>
|
||||
<span style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click.native="remove(scope.row)"
|
||||
>删除</a>
|
||||
</template>
|
||||
</tree-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"
|
||||
@@ -74,6 +95,12 @@ export default {
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
showParent: false, // 是否展示上级菜单
|
||||
parentTitle: "", // 父级菜单名称
|
||||
searchForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 20,
|
||||
sort: "sortOrder",
|
||||
order: "asc"
|
||||
},
|
||||
formAdd: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
parentId: 0,
|
||||
@@ -92,6 +119,11 @@ export default {
|
||||
key: "name",
|
||||
minWidth: "120px",
|
||||
},
|
||||
{
|
||||
title: "排序值",
|
||||
key: "sortOrder",
|
||||
minWidth: "120px",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
@@ -103,6 +135,7 @@ export default {
|
||||
},
|
||||
],
|
||||
tableData: [], // 表格数据
|
||||
total: 0
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -185,13 +218,34 @@ export default {
|
||||
// 获取所有分类
|
||||
getAllList() {
|
||||
this.loading = true;
|
||||
getPointsGoodsCategoryList().then((res) => {
|
||||
getPointsGoodsCategoryList(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.tableData = res.result.records;
|
||||
const records = res.result.records || [];
|
||||
const sortFn = (a, b) => (a.sortOrder || 0) - (b.sortOrder || 0);
|
||||
const sortRecursively = (list = []) => {
|
||||
list.sort(sortFn);
|
||||
list.forEach((item) => {
|
||||
if (Array.isArray(item.children) && item.children.length) {
|
||||
sortRecursively(item.children);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
};
|
||||
this.tableData = sortRecursively(records);
|
||||
this.total = res.result.total || 0;
|
||||
}
|
||||
});
|
||||
},
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getAllList();
|
||||
},
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getAllList();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<Card>
|
||||
<Form ref="form" :model="form" :rules="formRule">
|
||||
<div class="base-info-item">
|
||||
<h4>添加积分商品</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem astyle="width: 100%">
|
||||
<div style="display: flex; margin-bottom: 10px">
|
||||
@@ -13,7 +12,8 @@
|
||||
ghost
|
||||
style="margin-left: 10px"
|
||||
@click="delSelectGoods"
|
||||
>批量删除</Button
|
||||
>批量删除
|
||||
</Button
|
||||
>
|
||||
</div>
|
||||
<Table
|
||||
@@ -50,7 +50,8 @@
|
||||
v-for="item in categoryList"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
>{{ item.name }}</Option
|
||||
>{{ item.name }}
|
||||
</Option
|
||||
>
|
||||
</Select>
|
||||
</template>
|
||||
@@ -71,33 +72,16 @@
|
||||
</Table>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="兑换时间" prop="time">
|
||||
<DatePicker
|
||||
type="datetime"
|
||||
v-model="form.startTime"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择"
|
||||
:options="options"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
</DatePicker>
|
||||
-
|
||||
<DatePicker
|
||||
type="datetime"
|
||||
v-model="form.endTime"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
:options="options"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<FormItem label="活动时间" prop="rangeTime">
|
||||
<DatePicker type="datetimerange" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择" :options="options" style="width: 260px">
|
||||
</DatePicker>
|
||||
</FormItem>
|
||||
<div>
|
||||
<Button type="text" @click="closeCurrentPage">返回</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交</Button
|
||||
>提交
|
||||
</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -109,31 +93,19 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addPointsGoods, getPointsGoodsCategoryList } from "@/api/promotion";
|
||||
import { regular } from "@/utils";
|
||||
import {addPointsGoods, getPointsGoodsCategoryList} from "@/api/promotion";
|
||||
import {regular} from "@/utils";
|
||||
import skuSelect from "@/components/lili-dialog";
|
||||
|
||||
export default {
|
||||
name: "addPoinsGoods",
|
||||
components: {
|
||||
skuSelect,
|
||||
},
|
||||
data() {
|
||||
const isLtEndDate = (rule, value, callback) => {
|
||||
if (new Date(value).getTime() > new Date(this.form.endTime).getTime()) {
|
||||
callback(new Error());
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const isGtStartDate = (rule, value, callback) => {
|
||||
if (new Date(value).getTime() < new Date(this.form.startTime).getTime()) {
|
||||
callback(new Error());
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
form: {
|
||||
rangeTime: ["",""],
|
||||
promotionGoodsList: [], // 活动商品列表
|
||||
},
|
||||
showTable: true,
|
||||
@@ -142,50 +114,7 @@ export default {
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectedGoods: [], // 已选商品列表,便于删除
|
||||
formRule: {
|
||||
startTime: [
|
||||
{
|
||||
required: true,
|
||||
type: "date",
|
||||
message: "请选择开始时间",
|
||||
},
|
||||
{
|
||||
trigger: "change",
|
||||
message: "开始时间要小于结束时间",
|
||||
validator: isLtEndDate,
|
||||
},
|
||||
],
|
||||
endTime: [
|
||||
{
|
||||
required: true,
|
||||
type: "date",
|
||||
message: "请选择结束时间",
|
||||
},
|
||||
{
|
||||
trigger: "change",
|
||||
message: "结束时间要大于开始时间",
|
||||
validator: isGtStartDate,
|
||||
},
|
||||
],
|
||||
discount: [
|
||||
{ required: true, message: "请输入折扣" },
|
||||
{
|
||||
pattern: regular.discount,
|
||||
message: "请输入0-10的数字,可有一位小数",
|
||||
},
|
||||
],
|
||||
sellerCommission: [
|
||||
{ required: true, message: "请输入店铺承担比例" },
|
||||
{ pattern: regular.rate, message: "请输入0-100的正整数" },
|
||||
],
|
||||
publishNum: [
|
||||
{ required: true, message: "请输入发放数量" },
|
||||
{ pattern: regular.Integer, message: "请输入正整数" },
|
||||
],
|
||||
couponLimitNum: [
|
||||
{ required: true, message: "请输入领取限制" },
|
||||
{ pattern: regular.Integer, message: "请输入正整数" },
|
||||
],
|
||||
description: [{ required: true, message: "请输入范围描述" }],
|
||||
rangeTime: [{required: true, message: "请选择活动时间"}],
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
@@ -219,7 +148,7 @@ export default {
|
||||
key: "price",
|
||||
minWidth: 40,
|
||||
render: (h, params) => {
|
||||
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
|
||||
return h("priceColorScheme", {props: {value: params.row.price, color: this.$mainColor}});
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -293,14 +222,16 @@ export default {
|
||||
},
|
||||
/** 保存积分商品 */
|
||||
handleSubmit() {
|
||||
this.form.startTime=this.form.rangeTime[0]
|
||||
this.form.endTime=this.form.rangeTime[1]
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
let params = this.promotionGoodsList;
|
||||
const start = this.$options.filters.unixToDate(this.form.startTime / 1000);
|
||||
const end = this.$options.filters.unixToDate(this.form.endTime / 1000);
|
||||
|
||||
if (!params || params.length == 0) {
|
||||
this.$Modal.warning({ title: "提示", content: "请选择指定商品" });
|
||||
if (!params || params.length === 0) {
|
||||
this.$Modal.warning({title: "提示", content: "请选择指定商品"});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -373,7 +304,7 @@ export default {
|
||||
let list = [];
|
||||
item.forEach((e) => {
|
||||
const obj = {
|
||||
settlementPrice: e.settlementPrice || 0,
|
||||
settlementPrice: e.settlementPrice || e.price,
|
||||
pointsGoodsCategoryId: e.pointsGoodsCategoryId || 0,
|
||||
pointsGoodsCategoryName: e.pointsGoodsCategoryName || "",
|
||||
activeStock: e.activeStock || 1,
|
||||
@@ -407,11 +338,13 @@ h4 {
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.describe {
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
min-height: 800px;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ div.base-info-item {
|
||||
}
|
||||
|
||||
/*teatarea*/
|
||||
/deep/ .el-textarea {
|
||||
::v-deep .el-textarea {
|
||||
width: 150%;
|
||||
}
|
||||
|
||||
@@ -315,11 +315,11 @@ div.base-info-item {
|
||||
|
||||
/*图片上传组件第一张图设置封面*/
|
||||
.goods-images {
|
||||
/deep/ li.el-upload-list__item:first-child {
|
||||
::v-deep li.el-upload-list__item:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/deep/ li.el-upload-list__item:first-child:after {
|
||||
::v-deep li.el-upload-list__item:first-child:after {
|
||||
content: "封";
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
v-model="searchForm.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="积分区间">
|
||||
@@ -24,7 +24,7 @@
|
||||
v-model="searchForm.pointsS"
|
||||
placeholder="请输入开始区间"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
-
|
||||
<Input
|
||||
@@ -32,11 +32,11 @@
|
||||
v-model="searchForm.pointsE"
|
||||
placeholder="请输入结束区间"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="状态">
|
||||
<Select v-model="searchForm.promotionStatus" style="width: 200px">
|
||||
<Select v-model="searchForm.promotionStatus" style="width: 240px">
|
||||
<Option v-for="item in statusList" :value="item.value" :key="item.value">{{
|
||||
item.label
|
||||
}}</Option>
|
||||
@@ -48,7 +48,7 @@
|
||||
v-model="searchForm.skuId"
|
||||
placeholder="请输入SKU编码"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Button
|
||||
@@ -60,6 +60,8 @@
|
||||
>
|
||||
</Form>
|
||||
</Row>
|
||||
</Card>
|
||||
<Card>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="addPointsGoods" type="primary">添加积分商品</Button>
|
||||
</Row>
|
||||
@@ -108,30 +110,20 @@
|
||||
<div>{{ row.endTime }}</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
<a
|
||||
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
|
||||
type="info"
|
||||
size="small"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none;margin-right:5px"
|
||||
@click="edit(row.id)"
|
||||
style="margin-right: 5px"
|
||||
>编辑</Button
|
||||
>
|
||||
<Button
|
||||
>编辑</a>
|
||||
<span
|
||||
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
|
||||
type="warning"
|
||||
size="small"
|
||||
style="margin:0 8px;color:#dcdee2"
|
||||
>|</span>
|
||||
<a
|
||||
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none;margin-right:5px"
|
||||
@click="statusChanged(row.id, 'CLOSE')"
|
||||
style="margin-right: 5px"
|
||||
>关闭</Button
|
||||
>
|
||||
<!--<Button-->
|
||||
<!--v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'"-->
|
||||
<!--type="error"-->
|
||||
<!--size="small"-->
|
||||
<!--@click="close(row.id)"-->
|
||||
<!--style="margin-right: 5px"-->
|
||||
<!-->删除</Button-->
|
||||
<!-->-->
|
||||
>关闭</a>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
@@ -141,7 +133,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,13 +161,13 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime",
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime",
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
statusList: [
|
||||
// 活动状态
|
||||
{ label: "未开始", value: "NEW" },
|
||||
@@ -273,17 +265,17 @@ export default {
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
if (this.searchForm.pointsS) {
|
||||
this.searchForm.points =
|
||||
this.searchForm.pointsS +
|
||||
"_" +
|
||||
(this.searchForm.pointsE ? this.searchForm.pointsE : "");
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 20;
|
||||
if (this.searchForm.pointsS) {
|
||||
this.searchForm.points =
|
||||
this.searchForm.pointsS +
|
||||
"_" +
|
||||
(this.searchForm.pointsE ? this.searchForm.pointsE : "");
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user