18 Commits

Author SHA1 Message Date
Ryan Ran
5e4d228ac2 修改商家上传回显图片bug 2024-10-31 17:09:00 +08:00
RyanRan
f2491124d1 B2C代码提交 2024-10-20 21:43:59 +08:00
chc
ef7d3d7a1a b2c版本 2024-10-18 15:33:52 +08:00
RyanRan
ea7ce1636e 补充昨天提交 2024-10-08 10:27:07 +08:00
Yer11214
a2de4ccb2e Merge branch 'dev-b2c' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui into dev-b2c 2024-10-07 22:23:06 +08:00
Yer11214
0a1182f1e6 解决oss问题 2024-10-07 22:23:05 +08:00
chc
47a77ff046 补充提交 2024-10-07 17:37:57 +08:00
Yer11214
1923061d78 自提点设置 2024-10-07 17:36:18 +08:00
chc
8ed1d92f80 完善电子面单 2024-10-07 17:29:50 +08:00
Yer11214
7c330ebeb1 电子面单发货地址 2024-10-07 17:23:23 +08:00
Yer11214
6e872f0287 满额活动指定商品功能 2024-10-07 17:11:51 +08:00
Yer11214
7cdb8d5456 补充提交 2024-10-07 16:59:12 +08:00
Yer11214
c106423742 会员评价 2024-10-07 16:55:27 +08:00
Yer11214
108bb6c901 商家端商品发布查询功能 2024-10-07 16:15:13 +08:00
Yer11214
e45a1db2f9 buyer端隐藏店铺展示内容 2024-10-05 22:23:00 +08:00
Yer11214
9e630bb2ba 提交促销以己部分页面商家端功能迁移,接口对接 2024-10-05 14:33:37 +08:00
Yer11214
c03778676c 提b2c部分基础迁移代码 2024-10-02 20:41:30 +08:00
Yer11214
c970309802 删除/隐藏部分页面店铺展示 2024-09-08 23:14:13 +08:00
254 changed files with 9925 additions and 5580 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -33,11 +33,6 @@ Object.keys(filters).forEach((key) => {
Vue.filter(key, filters[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 // 引入自定义全局css
import '@/assets/css/global.less' import '@/assets/css/global.less'

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,29 @@
# LILISHOP-UI # 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 ### Customize configuration
详情点击 [https://cli.vuejs.org/zn/config/](https://cli.vuejs.org/zn/config/). 详情点击 [https://cli.vuejs.org/zn/config/](https://cli.vuejs.org/zn/config/).

View File

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

Binary file not shown.

Binary file not shown.

View File

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

View File

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

View File

@@ -111,7 +111,7 @@ export const changeMobile = (params) => {
}; };
// 获取用户数据 多条件 // 获取用户数据 多条件
export const getUserListData = (params) => { export const getUserListData = (params) => {
return getRequest("/passport/user/getByCondition", params); return getRequest("/passport/user", params);
}; };
// 通过用户名搜索 // 通过用户名搜索
export const searchUserByName = (username, params) => { export const searchUserByName = (username, params) => {
@@ -445,21 +445,6 @@ export const getProgress = () => {
return getRequest(`/other/elasticsearch/progress`); 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) => { export const getCustomWordsPage = (params) => {
return getRequest(`/other/customWords/page`, params); return getRequest(`/other/customWords/page`, params);

View File

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

View File

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

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

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

View File

@@ -66,7 +66,6 @@ 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";
import OssManage from "@/views/sys/oss-manage/ossManage.vue"; import OssManage from "@/views/sys/oss-manage/ossManage.vue";
export default { export default {
name: "upload-image", name: "upload-image",
components: { components: {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -15,7 +15,7 @@
v-model="searchForm.goodsName" v-model="searchForm.goodsName"
placeholder="请输入商品名称" placeholder="请输入商品名称"
clearable clearable
style="width: 240px" style="width: 200px"
/> />
</Form-item> </Form-item>
<Form-item label="商品编号" prop="id"> <Form-item label="商品编号" prop="id">
@@ -24,24 +24,27 @@
v-model="searchForm.id" v-model="searchForm.id"
placeholder="请输入商品编号" placeholder="请输入商品编号"
clearable clearable
style="width: 240px" style="width: 200px"
/> />
</Form-item> </Form-item>
<Form-item label="店铺名称" prop="id">
<Input <Form-item label="状态" prop="status">
type="text" <Select
v-model="searchForm.storeName" v-model="searchForm.marketEnable"
placeholder="请输入店铺名称" placeholder="请选择"
clearable clearable
style="width: 240px" style="width: 200px"
/> >
<Option value="UPPER">上架</Option>
<Option value="DOWN">下架</Option>
</Select>
</Form-item> </Form-item>
<Form-item label="销售模式" prop="status"> <Form-item label="销售模式" prop="status">
<Select <Select
v-model="searchForm.salesModel" v-model="searchForm.salesModel"
placeholder="请选择" placeholder="请选择"
clearable clearable
style="width: 240px" style="width: 200px"
> >
<Option value="RETAIL">零售</Option> <Option value="RETAIL">零售</Option>
<Option value="WHOLESALE">批发</Option> <Option value="WHOLESALE">批发</Option>
@@ -52,7 +55,7 @@
v-model="searchForm.goodsType" v-model="searchForm.goodsType"
placeholder="请选择" placeholder="请选择"
clearable clearable
style="width: 240px" style="width: 200px"
> >
<Option value="PHYSICAL_GOODS">实物商品</Option> <Option value="PHYSICAL_GOODS">实物商品</Option>
<Option value="VIRTUAL_GOODS">虚拟商品</Option> <Option value="VIRTUAL_GOODS">虚拟商品</Option>
@@ -66,69 +69,49 @@
>搜索</Button >搜索</Button
> >
</Form> </Form>
</Card> <div class="mt_10">
<Card> <Button type="primary" @click="handleAdd">新增商品</Button>
<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>
<!-- 批量操作按钮 -->
<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 <Table
:loading="loading" :loading="loading"
border
:columns="columns" :columns="columns"
:data="data" :data="data"
ref="table" ref="table"
class="mt_10" 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 }"> <template slot="goodsSlot" slot-scope="{ row }">
<div style="margin: 5px 0px; padding: 10px 0px;"> <div style="margin: 5px 0px; height: 80px; display: flex">
<div class="div-zoom"> <div style="">
<a @click="linkTo(row.id, row.skuId)">{{ row.goodsName }}</a> <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> </div>
</div> </div>
</template> </template>
@@ -140,7 +123,7 @@
:page-size="searchForm.pageSize" :page-size="searchForm.pageSize"
@on-change="changePage" @on-change="changePage"
@on-page-size-change="changePageSize" @on-page-size-change="changePageSize"
:page-size-opts="[20, 50, 100]" :page-size-opts="[10, 20, 50]"
size="small" size="small"
show-total show-total
show-elevator show-elevator
@@ -166,61 +149,11 @@
> >
</div> </div>
</Modal> </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> </div>
</template> </template>
<script> <script>
import { getGoodsListData,getGoodsNumerData, upGoods, lowGoods, authGoods } from "@/api/goods"; import { getGoodsListData, upGoods, lowGoods } from "@/api/goods";
import vueQr from "vue-qr"; import vueQr from "vue-qr";
export default { export default {
components: { components: {
@@ -235,7 +168,7 @@ export default {
searchForm: { searchForm: {
// 搜索框初始化对象 // 搜索框初始化对象
pageNumber: 1, // 当前页数 pageNumber: 1, // 当前页数
pageSize: 20, // 页面大小 pageSize: 10, // 页面大小
sort: "create_time", // 默认排序字段 sort: "create_time", // 默认排序字段
order: "desc", // 默认排序方式 order: "desc", // 默认排序方式
}, },
@@ -243,61 +176,28 @@ export default {
// 下架原因 // 下架原因
reason: "", reason: "",
}, },
goodsAuditForm: {
// 商品审核表单
auth_flag: 1,
},
auditModalVisible: false, // 审核弹框显示状态
currentAuditGoods: null, // 当前审核的商品
submitLoading: false, // 添加或编辑提交状态 submitLoading: false, // 添加或编辑提交状态
columns: [ columns: [
{
type: 'selection',
width: 60,
align: 'center'
},
{
title: "商品ID",
key: "id",
width: 180,
tooltip: true,
},
{
title: "商品图片",
key: "original",
width: 180,
slot: "imageSlot",
},
{ {
title: "商品名称", title: "商品名称",
key: "goodsName", key: "goodsName",
minWidth: 180, minWidth: 180,
slot: "goodsSlot", slot: "goodsSlot",
}, },
{
title: "商品编号",
key: "id",
minWidth: 150,
tooltip: true,
},
{ {
title: "价格", title: "价格",
key: "price", key: "price",
width: 100, width: 130,
render: (h, params) => { 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}} );
}, },
}, },
{
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: "销售模式", title: "销售模式",
key: "salesModel", key: "salesModel",
@@ -315,7 +215,7 @@ export default {
{ {
title: "商品类型", title: "商品类型",
key: "goodsType", key: "goodsType",
width: 120, width: 130,
render: (h, params) => { render: (h, params) => {
if (params.row.goodsType === "PHYSICAL_GOODS") { if (params.row.goodsType === "PHYSICAL_GOODS") {
return h("Tag", { props: { color: "green" } }, "实物商品"); return h("Tag", { props: { color: "green" } }, "实物商品");
@@ -329,7 +229,7 @@ export default {
{ {
title: "状态", title: "状态",
key: "marketEnable", key: "marketEnable",
width: 120, width: 100,
render: (h, params) => { render: (h, params) => {
if (params.row.marketEnable == "DOWN") { if (params.row.marketEnable == "DOWN") {
return h("Tag", { props: { color: "volcano" } }, "下架"); return h("Tag", { props: { color: "volcano" } }, "下架");
@@ -341,7 +241,7 @@ export default {
{ {
title: "审核状态", title: "审核状态",
key: "authFlag", key: "authFlag",
width: 180, width: 130,
render: (h, params) => { render: (h, params) => {
if (params.row.authFlag == "TOBEAUDITED") { if (params.row.authFlag == "TOBEAUDITED") {
return h("Tag", { props: { color: "volcano" } }, "待审核"); return h("Tag", { props: { color: "volcano" } }, "待审核");
@@ -352,72 +252,25 @@ export default {
} }
}, },
}, },
{
title: "店铺名称",
key: "storeName",
width: 180, // 使用minWidth替代width
tooltip: true,
},
{ {
title: "操作", title: "操作",
key: "action", key: "action",
align: "center", align: "center",
fixed: "right", fixed: "right",
width: 200, width: 150,
render: (h, params) => { render: (h, params) => {
// 如果是待审核状态,显示审核按钮 if (params.row.marketEnable == "DOWN") {
if (params.row.authFlag === "TOBEAUDITED") {
return h("div", [ return h("div", [
h( h(
"a", "Button",
{ {
props: {
type: "info",
size: "small",
},
style: { style: {
color: "#2d8cf0", marginRight: "5px",
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: { on: {
click: () => { click: () => {
@@ -427,19 +280,11 @@ export default {
}, },
"上架" "上架"
), ),
h("span", {
style: {
margin: "0 8px",
color: "#dcdee2"
}
}, "|"),
h( h(
"a", "Button",
{ {
style: { props: {
color: "#2d8cf0", size: "small",
cursor: "pointer",
textDecoration: "none"
}, },
on: { on: {
click: () => { click: () => {
@@ -453,12 +298,14 @@ export default {
} else { } else {
return h("div", [ return h("div", [
h( h(
"a", "Button",
{ {
props: {
type: "error",
size: "small",
},
style: { style: {
color: "#2d8cf0", marginRight: "5px",
cursor: "pointer",
textDecoration: "none"
}, },
on: { on: {
click: () => { click: () => {
@@ -468,19 +315,11 @@ export default {
}, },
"下架" "下架"
), ),
h("span", {
style: {
margin: "0 8px",
color: "#dcdee2"
}
}, "|"),
h( h(
"a", "Button",
{ {
style: { props: {
color: "#2d8cf0", size: "small",
cursor: "pointer",
textDecoration: "none"
}, },
on: { on: {
click: () => { click: () => {
@@ -497,37 +336,16 @@ export default {
], ],
data: [], // 表单数据 data: [], // 表单数据
total: 0, // 表单数据总数 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: { methods: {
// 新增商品
handleAdd(){
this.$router.push('/goods-publish')
},
// 初始化数据 // 初始化数据
init() { init() {
this.getDataList(); this.getDataList();
this.getNumberData();
}, },
// 分页 改变页码 // 分页 改变页码
changePage(v) { changePage(v) {
@@ -542,9 +360,8 @@ export default {
// 搜索 // 搜索
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 20; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
this.getNumberData();
}, },
// 获取数据 // 获取数据
getDataList() { getDataList() {
@@ -557,15 +374,6 @@ export default {
} }
}); });
}, },
getNumberData() {
// 创建一个不包含goodsStatus字段的搜索参数
const { goodsStatus, ...searchParams } = this.searchForm;
getGoodsNumerData(searchParams).then((res) => {
if (res.success) {
this.goodsNumerData = res.result;
}
})
},
// 编辑 // 编辑
edit(v) { edit(v) {
this.id = v.id; this.id = v.id;
@@ -578,36 +386,27 @@ export default {
}, },
// 下架 // 下架
lower() { lower() {
let params = { lowGoods(this.id, this.underForm).then((res) => {
goodsId: this.id,
reason:this.underForm.reason
};
lowGoods(params).then((res) => {
this.$Modal.remove(); this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.modalVisible = false; this.modalVisible = false;
this.getDataList(); this.getDataList();
this.getNumberData(); // 添加这行
} }
}); });
}, },
// 上架 // 商家
upper(v) { upper(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认上架", title: "确认上架",
content: "您确认要上架 " + v.goodsName + " ?", content: "您确认要上架 " + v.goodsName + " ?",
loading: true, loading: true,
onOk: () => { onOk: () => {
let params = { upGoods(v.id).then((res) => {
goodsId: v.id
};
upGoods(params).then((res) => {
this.$Modal.remove(); this.$Modal.remove();
if (res.success) { if (res.success) {
this.$Message.success("上架成功"); this.$Message.success("上架成功");
this.getDataList(); this.getDataList();
this.getNumberData(); // 添加这行
} }
}); });
}, },
@@ -618,255 +417,13 @@ export default {
showDetail(v) { showDetail(v) {
let id = v.id; let id = v.id;
this.$options.filters.customRouterPush({ this.$options.filters.customRouterPush({
name: "goods-detail", name: "goods-publish",
query: { id: id }, 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() { mounted() {
this.init(); this.init();
}, },
}; };
</script> </script>
<style lang="scss" scoped>
// Tab组件样式
.goods-tab {
::v-deep .ivu-tabs-tab {
font-size: 14px;
}
}
</style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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