合并master
commit
7fbcdafa9b
|
@ -7,7 +7,6 @@
|
|||
<script>
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
import storage from '@/plugins/storage';
|
||||
import {getLogo} from '@/api/common.js';
|
||||
export default {
|
||||
name: 'App',
|
||||
mounted () {
|
||||
|
@ -16,16 +15,6 @@ export default {
|
|||
uuid = uuidv4();
|
||||
storage.setItem('uuid', uuid);
|
||||
}
|
||||
if (!this.Cookies.getItem('logo')) {
|
||||
setTimeout(() => {
|
||||
getLogo().then(res => {
|
||||
if (res.success) {
|
||||
let logoObj = JSON.parse(res.result.settingValue)
|
||||
this.Cookies.setItem('logo', logoObj.buyerSideLogo)
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<div class="container">
|
||||
<img
|
||||
:src="logoImg"
|
||||
:src="$store.state.logoImg"
|
||||
v-if="showLogo"
|
||||
class="logo-img"
|
||||
alt=""
|
||||
|
@ -37,7 +37,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {getLogo} from '@/api/common.js'
|
||||
import {hotWords} from '@/api/goods.js'
|
||||
export default {
|
||||
name: 'search',
|
||||
|
@ -62,7 +61,6 @@ export default {
|
|||
data () {
|
||||
return {
|
||||
searchData: '', // 搜索内容
|
||||
logoImg: '', // pc端展示logo
|
||||
promotionTags: [] // 热门搜索列表
|
||||
};
|
||||
},
|
||||
|
@ -82,18 +80,6 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted () {
|
||||
if (!this.Cookies.getItem('logo')) {
|
||||
getLogo().then(res => {
|
||||
if (res.success) {
|
||||
let logoObj = JSON.parse(res.result.settingValue)
|
||||
this.Cookies.setItem('logo', logoObj.buyerSideLogo)
|
||||
this.logoImg = logoObj.buyerSideLogo
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.logoImg = this.Cookies.getItem('logo')
|
||||
}
|
||||
|
||||
this.searchData = this.$route.query.keyword
|
||||
|
||||
if (!this.hover) { // 首页顶部固定搜索栏不调用热词接口
|
||||
|
|
|
@ -1,110 +0,0 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<empty v-if="list.length==0" />
|
||||
<ul class="coupon-list" v-else>
|
||||
<li v-for="(item, index) in list" class="coupon-item" :key="index">
|
||||
<div class="c-left">
|
||||
<div>
|
||||
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span>折</span>
|
||||
<span class="describe">满{{item.consumeThreshold}}元可用</span>
|
||||
</div>
|
||||
<p>使用范围:{{useScope(item.scopeType, item.storeName)}}</p>
|
||||
<p>有效期:{{item.endTime}}</p>
|
||||
</div>
|
||||
<b></b>
|
||||
<a class="c-right" @click="go(item)">立即使用</a>
|
||||
<i class="circle-top"></i>
|
||||
<i class="circle-bottom"></i>
|
||||
</li>
|
||||
</ul>
|
||||
<Page :total="total" @on-change="changePageNum"
|
||||
v-if="list.length && total > params.pageNumber"
|
||||
class="pageration"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size="params.pageSize"
|
||||
show-sizer>
|
||||
</Page>
|
||||
<Spin v-if="loading" fix></Spin>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { memberCouponList } from '@/api/member.js';
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
loading: false, // 列表加载状态
|
||||
params: { // 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
total: 0, // 优惠券总数
|
||||
list: [] // 优惠券列表
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getList () { // 获取优惠券列表
|
||||
this.loading = true
|
||||
memberCouponList(this.params).then(res => {
|
||||
this.loading = false
|
||||
if (res.success) {
|
||||
this.list = res.result.records
|
||||
this.total = res.result.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
go (item) { // 根据使用条件跳转商品列表页面
|
||||
if (item.storeId !== 'platform') {
|
||||
this.$router.push({path: '/merchant', query: {id: item.storeId}})
|
||||
} else {
|
||||
if (item.scopeType === 'PORTION_GOODS_CATEGORY') {
|
||||
this.$router.push({path: '/goodsList', query: {categoryId: item.scopeId}})
|
||||
} else {
|
||||
this.$router.push({path: '/goodsList'})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
changePageNum (val) { // 分页改变页码
|
||||
this.params.pageNumber = val;
|
||||
this.getList()
|
||||
},
|
||||
|
||||
changePageSize (val) { // 分页改变页数
|
||||
this.pageNumber = 1;
|
||||
this.params.pageSize = val;
|
||||
this.getList()
|
||||
},
|
||||
|
||||
useScope (type, storeName) { // 根据字段返回 优惠券适用范围
|
||||
let shop = '平台';
|
||||
let goods = '全部商品'
|
||||
if (storeName !== 'platform') shop = storeName
|
||||
switch (type) {
|
||||
case 'ALL':
|
||||
goods = '全部商品'
|
||||
break;
|
||||
case 'PORTION_GOODS':
|
||||
goods = '部分商品'
|
||||
break;
|
||||
case 'PORTION_GOODS_CATEGORY':
|
||||
goods = '部分分类商品'
|
||||
break;
|
||||
}
|
||||
return `${shop}${goods}可用`
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getList()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '../../assets/styles/coupon.scss';
|
||||
.pageration {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
|
@ -2,6 +2,7 @@
|
|||
<div class="box">
|
||||
<div class="nav">
|
||||
<ul class="location">
|
||||
<li v-if="$route.path.includes('home')" style="margin-left:10px"><router-link to="/">首页</router-link></li>
|
||||
</ul>
|
||||
<ul class="detail">
|
||||
<li class="first" v-show="!userInfo.username">
|
||||
|
|
|
@ -17,15 +17,15 @@ export default {
|
|||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
common: 'http://192.168.0.101:8890',
|
||||
buyer: 'http://192.168.0.101:8888',
|
||||
seller: 'http://192.168.0.101:8889',
|
||||
manager: 'http://192.168.0.101:8887'
|
||||
// common: 'http://192.168.0.101:8890',
|
||||
// buyer: 'http://192.168.0.101:8888',
|
||||
// seller: 'http://192.168.0.101:8889',
|
||||
// manager: 'http://192.168.0.101:8887'
|
||||
|
||||
// common: 'https://common-api.pickmall.cn',
|
||||
// buyer: 'https://buyer-api.pickmall.cn',
|
||||
// seller: 'https://store-api.pickmall.cn',
|
||||
// manager: 'https://admin-api.pickmall.cn'
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn'
|
||||
},
|
||||
api_prod: {
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- LOGO 搜索 -->
|
||||
<div class="width_1200 logo">
|
||||
<div>
|
||||
<router-link to="/"><img :src="logoImg" alt="lili shop" title="lilishop" /></router-link>
|
||||
<router-link to="/"><img :src="$store.state.logoImg" alt="lili shop" title="lilishop" /></router-link>
|
||||
<div>
|
||||
购物车(<span>{{ goodsTotal }}</span>)
|
||||
</div>
|
||||
|
@ -136,26 +136,25 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Promotion from "@/components/goodsDetail/Promotion";
|
||||
import Search from "@/components/Search";
|
||||
import ShowLikeGoods from "@/components/like";
|
||||
import * as APICart from "@/api/cart";
|
||||
import * as APIMember from "@/api/member";
|
||||
import { getLogo } from "@/api/common.js";
|
||||
import Promotion from '@/components/goodsDetail/Promotion';
|
||||
import Search from '@/components/Search';
|
||||
import ShowLikeGoods from '@/components/like';
|
||||
import * as APICart from '@/api/cart';
|
||||
import * as APIMember from '@/api/member';
|
||||
import { getLogo } from '@/api/common.js';
|
||||
export default {
|
||||
name: "Cart",
|
||||
beforeRouteEnter(to, from, next) {
|
||||
name: 'Cart',
|
||||
beforeRouteEnter (to, from, next) {
|
||||
window.scrollTo(0, 0);
|
||||
next();
|
||||
},
|
||||
components: {
|
||||
Search,
|
||||
ShowLikeGoods,
|
||||
Promotion,
|
||||
Promotion
|
||||
},
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
logoImg: "", // logo图
|
||||
couponAvailable: false, // 展示优惠券
|
||||
stepIndex: 0, // 当前处于哪一步,购物车==0,填写订单信息==1,成功提交订单==2
|
||||
goodsTotal: 1, // 商品数量
|
||||
|
@ -165,45 +164,45 @@ export default {
|
|||
cartList: [], // 购物车列表
|
||||
couponList: [], // 优惠券列表
|
||||
priceDetailDTO: {}, // 价格明细
|
||||
skuList: [], // sku列表
|
||||
skuList: [] // sku列表
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
// 跳转商品详情
|
||||
goGoodsDetail(skuId, goodsId) {
|
||||
goGoodsDetail (skuId, goodsId) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: "/goodsDetail",
|
||||
query: { skuId, goodsId },
|
||||
path: '/goodsDetail',
|
||||
query: { skuId, goodsId }
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
window.open(routeUrl.href, '_blank');
|
||||
},
|
||||
// 跳转店铺首页
|
||||
goShopPage(id) {
|
||||
goShopPage (id) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: "/Merchant",
|
||||
query: { id },
|
||||
path: '/Merchant',
|
||||
query: { id }
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
window.open(routeUrl.href, '_blank');
|
||||
},
|
||||
// 收藏商品
|
||||
collectGoods(id) {
|
||||
collectGoods (id) {
|
||||
this.$Modal.confirm({
|
||||
title: "收藏",
|
||||
content: "<p>商品收藏后可在个人中心我的收藏查看</p>",
|
||||
title: '收藏',
|
||||
content: '<p>商品收藏后可在个人中心我的收藏查看</p>',
|
||||
onOk: () => {
|
||||
APIMember.collectGoods("GOODS", id).then((res) => {
|
||||
APIMember.collectGoods('GOODS', id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("收藏商品成功");
|
||||
this.$Message.success('收藏商品成功');
|
||||
this.getCartList();
|
||||
}
|
||||
});
|
||||
},
|
||||
onCancel: () => {},
|
||||
onCancel: () => {}
|
||||
});
|
||||
},
|
||||
// 删除商品
|
||||
delGoods(id) {
|
||||
delGoods (id) {
|
||||
const idArr = [];
|
||||
if (!id) {
|
||||
const list = this.cartList;
|
||||
|
@ -216,50 +215,50 @@ export default {
|
|||
idArr.push(id);
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: "删除",
|
||||
content: "<p>确定要删除该商品吗?</p>",
|
||||
title: '删除',
|
||||
content: '<p>确定要删除该商品吗?</p>',
|
||||
onOk: () => {
|
||||
APICart.delCartGoods({ skuIds: idArr.toString() }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("删除成功");
|
||||
this.$Message.success('删除成功');
|
||||
this.getCartList();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
clearCart() {
|
||||
clearCart () {
|
||||
// 清空购物车
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
content: "<p>确定要清空购物车吗?清空后不可恢复</p>",
|
||||
title: '提示',
|
||||
content: '<p>确定要清空购物车吗?清空后不可恢复</p>',
|
||||
onOk: () => {
|
||||
APICart.clearCart().then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("清空购物车成功");
|
||||
this.$Message.success('清空购物车成功');
|
||||
this.getCartList();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
// 跳转支付页面
|
||||
pay() {
|
||||
pay () {
|
||||
if (this.checkedNum) {
|
||||
this.$router.push({ path: "/pay", query: { way: "CART" } });
|
||||
this.$router.push({ path: '/pay', query: { way: 'CART' } });
|
||||
} else {
|
||||
this.$Message.warning("请至少选择一件商品");
|
||||
this.$Message.warning('请至少选择一件商品');
|
||||
}
|
||||
},
|
||||
// 展示优惠券
|
||||
showCoupon(storeId, index) {
|
||||
showCoupon (storeId, index) {
|
||||
this.couponAvailable = index;
|
||||
},
|
||||
changeNum(val, id) {
|
||||
changeNum (val, id) {
|
||||
// 设置购买数量
|
||||
console.log(val, id);
|
||||
APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => {
|
||||
|
@ -269,13 +268,13 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
async changeChecked(status, type, id) {
|
||||
async changeChecked (status, type, id) {
|
||||
// 设置商品选中状态
|
||||
const check = status ? 1 : 0;
|
||||
if (type === "all") {
|
||||
if (type === 'all') {
|
||||
// 全选
|
||||
await APICart.setCheckedAll({ checked: check });
|
||||
} else if (type === "shop") {
|
||||
} else if (type === 'shop') {
|
||||
// 选中店铺所有商品
|
||||
await APICart.setCheckedSeller({ checked: check, storeId: id });
|
||||
} else {
|
||||
|
@ -286,17 +285,17 @@ export default {
|
|||
this.getCartList();
|
||||
},
|
||||
|
||||
async receiveShopCoupon(item) {
|
||||
async receiveShopCoupon (item) {
|
||||
// 领取优惠券
|
||||
let res = await APIMember.receiveCoupon(item.id);
|
||||
if (res.success) {
|
||||
this.$set(item, "disabled", true);
|
||||
this.$Message.success("领取成功");
|
||||
this.$set(item, 'disabled', true);
|
||||
this.$Message.success('领取成功');
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
},
|
||||
async getCartList() {
|
||||
async getCartList () {
|
||||
// 购物车列表
|
||||
this.loading = true;
|
||||
try {
|
||||
|
@ -326,25 +325,15 @@ export default {
|
|||
} catch (error) {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
mounted () {
|
||||
this.getCartList();
|
||||
APICart.cartCount().then((res) => {
|
||||
// 购物车商品数量
|
||||
if (res.success) this.goodsTotal = res.result;
|
||||
});
|
||||
if (!this.Cookies.getItem("logo")) {
|
||||
getLogo().then((res) => {
|
||||
if (res.success) {
|
||||
let logoObj = JSON.parse(res.result.settingValue);
|
||||
this.Cookies.setItem("logo", logoObj.buyerSideLogo);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.logoImg = this.Cookies.getItem("logo");
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="top-content" @click='$refs.verify.show = false'>
|
||||
<div class="logo-box">
|
||||
<img
|
||||
:src="logoImg"
|
||||
:src="$store.state.logoImg"
|
||||
@click="$router.push('/')"
|
||||
/>
|
||||
<div>欢迎登录</div>
|
||||
|
@ -186,8 +186,7 @@ export default {
|
|||
},
|
||||
codeMsg: '发送验证码', // 验证码文字
|
||||
interval: null, // 定时器
|
||||
time: 60, // 倒计时
|
||||
logoImg: '' // logo图片
|
||||
time: 60 // 倒计时
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -332,7 +331,6 @@ export default {
|
|||
}
|
||||
});
|
||||
}
|
||||
this.logoImg = this.Cookies.getItem('logo')
|
||||
},
|
||||
watch: {
|
||||
type (v) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="logo-box">
|
||||
<img
|
||||
width="150"
|
||||
:src="logoImg"
|
||||
:src="$store.state.logoImg"
|
||||
@click="$router.push('/')"
|
||||
/>
|
||||
<div>注册</div>
|
||||
|
@ -135,8 +135,7 @@ export default {
|
|||
verifyType: 'REGISTER', // 验证状态
|
||||
codeMsg: '发送验证码', // 提示文字
|
||||
interval: '', // 定时器
|
||||
time: 60, // 倒计时
|
||||
logoImg: '' // logo图
|
||||
time: 60 // 倒计时
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -208,8 +207,6 @@ export default {
|
|||
},
|
||||
mounted () {
|
||||
this.$refs.formRegist.resetFields();
|
||||
this.logoImg = this.Cookies.getItem('logo')
|
||||
console.log(window.innerHeight);
|
||||
document.querySelector('.sign-up').style.height = window.innerHeight + 'px'
|
||||
}
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- 顶部logo -->
|
||||
<div class="logo-box">
|
||||
<img
|
||||
:src="logoImg" width='150'
|
||||
:src="$store.state.logoImg" width='150'
|
||||
@click="$router.push('/')"
|
||||
/>
|
||||
<div>修改密码</div>
|
||||
|
@ -118,7 +118,6 @@ export default {
|
|||
components: { Verify },
|
||||
data () {
|
||||
return {
|
||||
logoImg: '', // logo图
|
||||
loading: false, // 加载状态
|
||||
loading1: false, // 第二步加载状态
|
||||
formFirst: { // 手机验证码表单
|
||||
|
@ -243,7 +242,6 @@ export default {
|
|||
},
|
||||
mounted () {
|
||||
this.$refs.formFirst.resetFields();
|
||||
this.logoImg = this.Cookies.getItem('logo')
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<Input v-model="form.bankAccountNumber" type="text" placeholder="请输入银行账号" style="width:260px" />
|
||||
</FormItem>
|
||||
</template>
|
||||
<FormItem label="返回方式">
|
||||
<FormItem label="返回方式" v-if="form.serviceType === 'RETURN_GOODS'">
|
||||
<div>快递至第三方卖家</div>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
|
|
|
@ -1,32 +1,137 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<card _Title="优惠券列表" />
|
||||
<Coupon/>
|
||||
<card _Title="优惠券列表" :_Tabs="statusNameList" @_Change="change" />
|
||||
<empty v-if="list.length==0" />
|
||||
<ul class="coupon-list" v-else>
|
||||
<li v-for="(item, index) in list" class="coupon-item" :key="index">
|
||||
<div class="c-left">
|
||||
<div>
|
||||
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.discount}}</span>折</span>
|
||||
<span class="describe">满{{item.consumeThreshold}}元可用</span>
|
||||
</div>
|
||||
<p>使用范围:{{useScope(item.scopeType, item.storeName)}}</p>
|
||||
<p>有效期:{{item.endTime}}</p>
|
||||
</div>
|
||||
<b></b>
|
||||
<a class="c-right" @click="go(item)">立即使用</a>
|
||||
<i class="circle-top"></i>
|
||||
<i class="circle-bottom"></i>
|
||||
</li>
|
||||
</ul>
|
||||
<Page :total="total" @on-change="changePageNum"
|
||||
v-if="list.length && total > params.pageNumber"
|
||||
class="pageration"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size="params.pageSize"
|
||||
show-sizer>
|
||||
</Page>
|
||||
<Spin v-if="loading" fix></Spin>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Coupon from '@/components/coupon/Coupon.vue'
|
||||
import { memberCouponList } from '@/api/member.js';
|
||||
export default {
|
||||
name: 'Coupons',
|
||||
data () {
|
||||
return {
|
||||
couponsList: [ // 优惠券状态
|
||||
statusNameList: [ // 优惠券状态
|
||||
'未使用',
|
||||
'已使用',
|
||||
'已过期',
|
||||
'即将到期'
|
||||
]
|
||||
'已过期'
|
||||
],
|
||||
statusList: ['NEW', 'USED', 'EXPIRE'],
|
||||
loading: false, // 列表加载状态
|
||||
params: { // 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
memberCouponStatus: 'NEW'
|
||||
},
|
||||
total: 0, // 优惠券总数
|
||||
list: [] // 优惠券列表
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getList () { // 获取优惠券列表
|
||||
this.loading = true
|
||||
memberCouponList(this.params).then(res => {
|
||||
this.loading = false
|
||||
if (res.success) {
|
||||
this.list = res.result.records
|
||||
this.total = res.result.total
|
||||
}
|
||||
})
|
||||
},
|
||||
// 切换优惠券状态
|
||||
change (index) {
|
||||
this.params.memberCouponStatus = this.statusList[index]
|
||||
this.getList()
|
||||
},
|
||||
go (item) { // 根据使用条件跳转商品列表页面
|
||||
if (item.storeId !== 'platform') {
|
||||
this.$router.push({path: '/merchant', query: {id: item.storeId}})
|
||||
} else {
|
||||
if (item.scopeType === 'PORTION_GOODS_CATEGORY') {
|
||||
this.$router.push({path: '/goodsList', query: {categoryId: item.scopeId}})
|
||||
} else {
|
||||
this.$router.push({path: '/goodsList'})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
changePageNum (val) { // 分页改变页码
|
||||
this.params.pageNumber = val;
|
||||
this.getList()
|
||||
},
|
||||
|
||||
changePageSize (val) { // 分页改变页数
|
||||
this.pageNumber = 1;
|
||||
this.params.pageSize = val;
|
||||
this.getList()
|
||||
},
|
||||
|
||||
useScope (type, storeName) { // 根据字段返回 优惠券适用范围
|
||||
let shop = '平台';
|
||||
let goods = '全部商品'
|
||||
if (storeName !== 'platform') shop = storeName
|
||||
switch (type) {
|
||||
case 'ALL':
|
||||
goods = '全部商品'
|
||||
break;
|
||||
case 'PORTION_GOODS':
|
||||
goods = '部分商品'
|
||||
break;
|
||||
case 'PORTION_GOODS_CATEGORY':
|
||||
goods = '部分分类商品'
|
||||
break;
|
||||
}
|
||||
return `${shop}${goods}可用`
|
||||
}
|
||||
},
|
||||
components: {Coupon},
|
||||
mounted () {
|
||||
|
||||
},
|
||||
methods: {}
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@import '../../../assets/styles/coupon.scss';
|
||||
.coupon-item{
|
||||
height: 125px;
|
||||
.c-left{
|
||||
padding: 16px;
|
||||
}
|
||||
.c-right{
|
||||
padding: 20px 16px;
|
||||
width: 43px;
|
||||
font-size: 14px;
|
||||
}
|
||||
i {
|
||||
right: 34px;
|
||||
}
|
||||
}
|
||||
.pageration {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="width_1200 logo">
|
||||
<div>
|
||||
<router-link to="/"
|
||||
><img :src="logoImg" alt="lili shop" title="lilishop"
|
||||
><img :src="$store.state.logoImg" alt="lili shop" title="lilishop"
|
||||
/></router-link>
|
||||
<div>结算页</div>
|
||||
</div>
|
||||
|
@ -190,7 +190,7 @@
|
|||
<span
|
||||
v-if="item.couponType === 'DISCOUNT'"
|
||||
class="fontsize_12 global_color"
|
||||
><span class="price">{{ item.couponDiscount }}</span
|
||||
><span class="price">{{ item.discount }}</span
|
||||
>折</span
|
||||
>
|
||||
<span class="describe"
|
||||
|
@ -347,23 +347,12 @@ export default {
|
|||
moreAddr: false, // 更多地址
|
||||
canUseCouponNum: 0, // 可用优惠券数量
|
||||
couponList: [], // 可用优惠券列表
|
||||
logoImg: '', // 平台logo
|
||||
usedCouponId: [], // 已使用优惠券id
|
||||
selectedCoupon: {} // 已选优惠券对象
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
this.init();
|
||||
if (!this.Cookies.getItem('logo')) {
|
||||
getLogo().then((res) => {
|
||||
if (res.success) {
|
||||
let logoObj = JSON.parse(res.result.settingValue);
|
||||
this.Cookies.setItem('logo', logoObj.buyerSideLogo);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.logoImg = this.Cookies.getItem('logo');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
|
|
|
@ -11,7 +11,8 @@ export default new Vuex.Store({
|
|||
state: {
|
||||
category: [], // 全部分类
|
||||
navList: [],
|
||||
cartNum: storage.getItem('cartNum') || 0
|
||||
cartNum: storage.getItem('cartNum') || 0,
|
||||
logoImg: 'https://lili-system.oss-cn-beijing.aliyuncs.com/logo.png'
|
||||
},
|
||||
getters,
|
||||
actions,
|
||||
|
|
|
@ -417,3 +417,24 @@ export const resetPassword = (params) => {
|
|||
export const createIndex = () => {
|
||||
return getRequest(`/elasticsearch`);
|
||||
};
|
||||
|
||||
// 分页查询自定义分词
|
||||
export const getCustomWordsPage = (params) => {
|
||||
return getRequest(`/manager/custom-words`, params);
|
||||
};
|
||||
|
||||
// 添加自定义分词
|
||||
export const insertCustomWords = (params) => {
|
||||
return postRequest(`/manager/custom-words`, params);
|
||||
};
|
||||
|
||||
// 修改自定义分词
|
||||
export const updateCustomWords = (params) => {
|
||||
return putRequest(`/manager/custom-words`, params);
|
||||
};
|
||||
|
||||
// 删除自定义分词
|
||||
export const delCustom = (id) => {
|
||||
return deleteRequest(`/manager/custom-words/${id}`);
|
||||
};
|
||||
|
||||
|
|
|
@ -179,7 +179,10 @@ export const getFullDiscountList = params => {
|
|||
export const getFullDiscountById = id => {
|
||||
return getRequest(`/promotion/fullDiscount/${id}`);
|
||||
};
|
||||
|
||||
// 开启、关闭满额活动
|
||||
export const updateFullDiscount = (id, promotionStatus) => {
|
||||
return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`)
|
||||
}
|
||||
// 积分商品列表
|
||||
export const getPointsGoodsList = params => {
|
||||
return getRequest(`/promotion/pointsGoods`, params);
|
||||
|
|
|
@ -17,14 +17,14 @@ export default {
|
|||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
// common: "https://common-api.pickmall.cn",
|
||||
// buyer: "https://buyer-api.pickmall.cn",
|
||||
// seller: "https://store-api.pickmall.cn",
|
||||
// manager: "https://admin-api.pickmall.cn"
|
||||
common: 'http://192.168.0.101:8890',
|
||||
buyer: 'http://192.168.0.101:8888',
|
||||
seller: 'http://192.168.0.101:8889',
|
||||
manager: 'http://192.168.0.101:8887'
|
||||
common: "https://common-api.pickmall.cn",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
// common: 'http://192.168.0.101:8890',
|
||||
// buyer: 'http://192.168.0.101:8888',
|
||||
// seller: 'http://192.168.0.101:8889',
|
||||
// manager: 'http://192.168.0.101:8887'
|
||||
},
|
||||
api_prod: {
|
||||
common: "https://common-api.pickmall.cn",
|
||||
|
|
|
@ -48,18 +48,6 @@ export const otherRouter = {
|
|||
name: "category",
|
||||
component: () => import("@/views/goods/goods-manage/category.vue")
|
||||
},
|
||||
{
|
||||
path: "message",
|
||||
title: "消息中心",
|
||||
name: "message_index",
|
||||
component: () => import("@/views/message/message.vue")
|
||||
},
|
||||
{
|
||||
path: "category",
|
||||
title: "类型列表",
|
||||
name: "category",
|
||||
component: () => import("@/views/goods/goods-manage/category.vue")
|
||||
},
|
||||
{
|
||||
path: "parameter",
|
||||
title: "参数绑定",
|
||||
|
|
|
@ -0,0 +1,323 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10, 20, 50]"
|
||||
size="small"
|
||||
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="100" :rules="formValidate">
|
||||
<FormItem label="自定义分词" prop="sn">
|
||||
<Input v-model="form.name" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getCustomWordsPage,
|
||||
delCustom,
|
||||
insertCustomWords,
|
||||
updateCustomWords
|
||||
} from "@/api/index";
|
||||
export default {
|
||||
name: "customWords",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
words: "",
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
name: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入敏感词",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "自定义分词",
|
||||
key: "name",
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
key: "createTime",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: "更新时间",
|
||||
key: "updateTime",
|
||||
width: 200
|
||||
},
|
||||
{
|
||||
title: "操作人",
|
||||
key: "createBy",
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
width: 200,
|
||||
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();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
getCustomWordsPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
|
||||
if (this.modalType == 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
insertCustomWords(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.form.id = this.id;
|
||||
// 编辑
|
||||
updateCustomWords(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
add() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加";
|
||||
this.form = {}
|
||||
this.$refs.form.resetFields();
|
||||
|
||||
this.modalVisible = true;
|
||||
},
|
||||
detail(v) {
|
||||
this.modalType = 1;
|
||||
this.id = v.id;
|
||||
this.modalTitle = "修改";
|
||||
this.modalVisible = true;
|
||||
this.form.name = v.name;
|
||||
},
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要删除 " + v.name + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delCustom(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
delAll() {
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
content: "您确认要删除所选的 " + this.selectCount + " 条数据?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = "";
|
||||
this.selectList.forEach(function (e) {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
delSensitive(ids).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.clearSelectAll();
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -1,46 +1,42 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="商品名称" prop="goodsName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="商品编号" prop="sn">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.sn"
|
||||
placeholder="请输入商品编号"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Form
|
||||
ref="searchForm"
|
||||
@keydown.enter.native="handleSearch"
|
||||
:model="searchForm"
|
||||
inline
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="商品名称" prop="goodsName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="商品编号" prop="sn">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.sn"
|
||||
placeholder="请输入商品编号"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
|
||||
</Form>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
class="mt_10"
|
||||
>
|
||||
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="goodsSlot" slot-scope="scope">
|
||||
<div style="margin-top: 5px;height: 80px; display: flex;">
|
||||
|
@ -85,7 +81,6 @@
|
|||
return {
|
||||
id: "", //要操作的id
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -93,15 +88,9 @@
|
|||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
underForm: { // 下架原因
|
||||
reason: "",
|
||||
},
|
||||
goodsAuditForm: { // 商品编辑表单
|
||||
is_auth: 1,
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
{
|
||||
title: "商品名称",
|
||||
|
@ -252,7 +241,6 @@
|
|||
changePage(v) { // 改变页码
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) { // 改变每页数量
|
||||
this.searchForm.pageSize = v;
|
||||
|
@ -263,21 +251,6 @@
|
|||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) { // 排序
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() { // 取消全部选中
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) { // 选中一项
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
getDataList() { // 获取列表数据
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据
|
||||
|
@ -312,8 +285,6 @@
|
|||
},
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
//查看商品详情
|
||||
showDetail(v) {
|
||||
let id = v.id;
|
||||
|
|
|
@ -1,381 +0,0 @@
|
|||
/*选择商品品类*/
|
||||
.content-goods-publish {
|
||||
padding: 15px;
|
||||
padding-bottom: 50px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
border: 1px solid #ddd;
|
||||
background: none repeat 0 0 #fff;
|
||||
|
||||
/*商品品类*/
|
||||
.goods-category {
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
background: #fafafa;
|
||||
border: 1px solid #e6e6e6;
|
||||
|
||||
ul {
|
||||
padding: 8px 4px 8px 8px;
|
||||
list-style: none;
|
||||
width: 300px;
|
||||
background: none repeat 0 0 #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
display: inline-block;
|
||||
letter-spacing: normal;
|
||||
margin-right: 15px;
|
||||
vertical-align: top;
|
||||
word-spacing: normal;
|
||||
|
||||
li {
|
||||
line-height: 20px;
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** 当前品类被选中的样式 */
|
||||
.activeClass {
|
||||
background-color: #d9edf7;
|
||||
border: 1px solid #bce8f1;
|
||||
color: #3a87ad;
|
||||
}
|
||||
|
||||
/*!*当前选择的商品品类文字*!*/
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
/*平铺*/
|
||||
div.base-info-item>div {
|
||||
margin-left: 5%;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
.form-item-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding-left: 80px;
|
||||
|
||||
|
||||
.layout {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.sku-item-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
|
||||
.sku-item-content-name {
|
||||
display: flex;
|
||||
align-items: 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;
|
||||
}
|
||||
}
|
||||
|
||||
/*商品描述*/
|
||||
.goods-intro {
|
||||
line-height: 40;
|
||||
}
|
||||
|
||||
/** 底部步骤 */
|
||||
.footer {
|
||||
width: 88.7%;
|
||||
padding: 10px;
|
||||
background-color: #ffc;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
left: 10%;
|
||||
text-align: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
/*图片上传组件第一张图设置封面*/
|
||||
.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-view {
|
||||
width: 33%;
|
||||
height: 40px;
|
||||
font-size: 19px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.add-sku-btn {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.sku-item:not(:first-child) {
|
||||
margin-top: 10px;
|
||||
|
||||
}
|
||||
|
||||
.sku-upload-list {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
line-height: 60px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.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, .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;
|
||||
}
|
||||
|
||||
.demo-upload-list{
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
line-height: 60px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
||||
margin-right: 4px;
|
||||
}
|
||||
.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,.6);
|
||||
}
|
||||
.demo-upload-list:hover .demo-upload-list-cover{
|
||||
display: block;
|
||||
}
|
||||
.demo-upload-list-cover i{
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
margin: 0 2px;
|
||||
}
|
|
@ -1,62 +1,35 @@
|
|||
<template>
|
||||
<div>
|
||||
<Form
|
||||
:label-width="120"
|
||||
>
|
||||
<div class="content-goods-publish">
|
||||
<Form :label-width="120">
|
||||
<Card>
|
||||
<div class="base-info-item">
|
||||
<h4>基本信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem label="商品分类">
|
||||
<span v-for="item in goods.categoryName"> {{ item }} > </span>
|
||||
<span v-for="(item,index) in goods.categoryName" :key="index"> {{ item }} <i v-if="index !== (goods.categoryName.length-1)">></i> </span>
|
||||
</FormItem>
|
||||
<FormItem label="商品名称" prop="goodsName">
|
||||
<FormItem label="商品名称">
|
||||
{{ goods.goodsName }}
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="商品卖点" prop="sellingPoint">
|
||||
<FormItem label="商品卖点">
|
||||
{{ goods.sellingPoint }}
|
||||
</FormItem>
|
||||
</div>
|
||||
<h4>商品交易信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="计量单位"
|
||||
prop="goodsUnit"
|
||||
> {{ goods.goodsUnit }}
|
||||
</FormItem>
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="销售模式"
|
||||
prop="salesModel"
|
||||
>
|
||||
<FormItem label="计量单位"> {{ goods.goodsUnit }}</FormItem>
|
||||
<FormItem label="销售模式">
|
||||
{{ goods.salesModel === 'RETAIL' ? '零售型' : '批发型' }}
|
||||
</FormItem>
|
||||
</div>
|
||||
<h4>商品规格及图片</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem label="商品编号" prop="sn">
|
||||
{{ goods.sn }}
|
||||
</FormItem>
|
||||
<FormItem label="商品价格" prop="price">
|
||||
¥{{ goods.price | unitPrice }}
|
||||
</FormItem>
|
||||
<FormItem label="市场价格" prop="cost">
|
||||
|
||||
¥{{ goods.cost | unitPrice }}
|
||||
</FormItem>
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="商品图片"
|
||||
prop="goodsGalleryFiles"
|
||||
>
|
||||
|
||||
<div
|
||||
class="demo-upload-list"
|
||||
v-for="(item, __index) in goods.goodsGalleryList"
|
||||
:key="__index"
|
||||
>
|
||||
<FormItem label="商品编号"> {{ goods.sn }}</FormItem>
|
||||
<FormItem label="商品价格"> ¥{{ goods.price | unitPrice }} </FormItem>
|
||||
<FormItem label="市场价格"> ¥{{ goods.cost | unitPrice }} </FormItem>
|
||||
<FormItem label="商品图片">
|
||||
<div class="demo-upload-list" v-for="(item, __index) in goods.goodsGalleryList" :key="__index">
|
||||
<img :src="item"/>
|
||||
<div class="demo-upload-list-cover">
|
||||
<Icon
|
||||
|
@ -64,7 +37,6 @@
|
|||
@click.native="handleViewGoodsPicture(item)"
|
||||
></Icon>
|
||||
</div>
|
||||
|
||||
<Modal title="View Image" v-model="goodsPictureVisible">
|
||||
<img
|
||||
:src="previewGoodsPicture"
|
||||
|
@ -73,70 +45,50 @@
|
|||
/>
|
||||
</Modal>
|
||||
</div>
|
||||
|
||||
|
||||
</FormItem>
|
||||
|
||||
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="商品规格"
|
||||
>
|
||||
|
||||
<FormItem label="商品规格">
|
||||
<Table :columns="skuColumn" :data="skuData">
|
||||
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="showImage" slot-scope="scope">
|
||||
|
||||
<div style="margin-top: 5px;height: 80px; display: flex;">
|
||||
<div style="">
|
||||
<div>
|
||||
<img :src="scope.row.image" style="height: 60px;margin-top: 1px;width: 60px">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
</FormItem>
|
||||
|
||||
|
||||
</div>
|
||||
<h4>商品详情描述</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem class="form-item-view-el" label="商品描述" prop="intro">
|
||||
<FormItem label="商品描述">
|
||||
<div v-html="goods.intro"></div>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
class="form-item-view-el"
|
||||
label="移动端描述"
|
||||
prop="skuList"
|
||||
>
|
||||
<div v-html="goods.mobileIntro"></div>
|
||||
</FormItem>
|
||||
</div>
|
||||
<h4>商品物流信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem class="form-item-view-el" label="商品重量" prop="weight">
|
||||
<FormItem label="商品重量">
|
||||
<Input v-model="goods.weight">
|
||||
<span slot="append">kg</span>
|
||||
</Input>
|
||||
</FormItem>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {getGoodsDetail} from "@/api/goods";
|
||||
|
||||
export default {
|
||||
|
||||
name: "goodsDetail",
|
||||
data() {
|
||||
return {
|
||||
goods: '', // 商品信息
|
||||
goods: {}, // 商品信息
|
||||
previewGoodsPicture: '', // 预览图片
|
||||
goodsPictureVisible: false, // 预览图片模态框
|
||||
skuColumn: [ // 规格表头
|
||||
|
@ -149,7 +101,7 @@ export default {
|
|||
key: 'sn'
|
||||
},
|
||||
{
|
||||
title: '重量',
|
||||
title: '重量(kg)',
|
||||
key: 'weight'
|
||||
},
|
||||
{
|
||||
|
@ -173,12 +125,12 @@ export default {
|
|||
}
|
||||
,
|
||||
methods: {
|
||||
// 初始化数据,获取商品详情
|
||||
initGoods(id) {
|
||||
getGoodsDetail(id).then(res => {
|
||||
this.goods = res.result;
|
||||
let that = this
|
||||
res.result.skuList.forEach(function (sku, index, array) {
|
||||
console.log(sku)
|
||||
that.skuData.push({
|
||||
'specs': sku.goodsName,
|
||||
'sn': sku.sn,
|
||||
|
@ -191,9 +143,8 @@ export default {
|
|||
console.warn(this.skuData)
|
||||
|
||||
});
|
||||
}
|
||||
,
|
||||
|
||||
},
|
||||
// 预览商品图片
|
||||
handleViewGoodsPicture(url) {
|
||||
this.previewGoodsPicture = url;
|
||||
this.goodsPictureVisible = true;
|
||||
|
@ -207,8 +158,61 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" soped>
|
||||
@import "./goodsDetail.scss";
|
||||
/*平铺*/
|
||||
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;
|
||||
}
|
||||
|
||||
.form-item-view {
|
||||
padding-left: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.demo-upload-list{
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
line-height: 60px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
||||
margin-right: 4px;
|
||||
}
|
||||
.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,.6);
|
||||
}
|
||||
.demo-upload-list:hover .demo-upload-list-cover{
|
||||
display: block;
|
||||
}
|
||||
.demo-upload-list-cover i{
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
margin: 0 2px;
|
||||
}
|
||||
.ivu-table table {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Form-item label="品牌名称" prop="name">
|
||||
<Input type="text" v-model="searchForm.name" placeholder="请输入品牌名称" clearable style="width: 200px" />
|
||||
</Form-item>
|
||||
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Form ref="searchForm" @keydown.enter.native="handleSearch" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Form-item label="品牌名称">
|
||||
<Input type="text" v-model="searchForm.name" placeholder="请输入品牌名称" clearable style="width: 200px" />
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary">搜索</Button>
|
||||
</Form>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||
show-total show-elevator show-sizer></Page>
|
||||
|
@ -30,8 +27,7 @@
|
|||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交
|
||||
</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
|
@ -50,7 +46,7 @@ import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
|||
export default {
|
||||
name: "brand",
|
||||
components: {
|
||||
uploadPicInput,
|
||||
uploadPicInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -74,8 +70,6 @@ export default {
|
|||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
{
|
||||
title: "品牌名称",
|
||||
|
@ -237,51 +231,38 @@ export default {
|
|||
this.getDataList();
|
||||
}
|
||||
},
|
||||
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
// 获取数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getManagerBrandPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
console.warn(12);
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 提交表单
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
|
@ -311,6 +292,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
add() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加";
|
||||
|
@ -318,6 +300,7 @@ export default {
|
|||
delete this.form.id;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 编辑
|
||||
edit(v) {
|
||||
this.modalType = 1;
|
||||
this.modalTitle = "编辑";
|
||||
|
@ -333,6 +316,7 @@ export default {
|
|||
this.form = data;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 启用品牌
|
||||
enable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认启用",
|
||||
|
@ -349,6 +333,7 @@ export default {
|
|||
},
|
||||
});
|
||||
},
|
||||
// 禁用
|
||||
disable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认禁用",
|
||||
|
|
|
@ -1,111 +1,113 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="operation">
|
||||
<Button @click="addParent" icon="md-add">添加一级分类</Button>
|
||||
</div>
|
||||
<Table size="default" :load-data="handleLoadData" row-key="id" :loading="loading" :data="tableData" :columns="columns">
|
||||
<div>
|
||||
<Card>
|
||||
<div class="mb_10">
|
||||
<Button @click="addParent" icon="md-add">添加一级分类</Button>
|
||||
</div>
|
||||
<Table :load-data="handleLoadData" row-key="id" :loading="loading" :data="tableData" :columns="columns">
|
||||
<template slot="action" slot-scope="scope">
|
||||
<Dropdown v-show="scope.row.level == 2" transfer="true" trigger="click">
|
||||
<Button size="small">
|
||||
绑定
|
||||
<Icon type="ios-arrow-down"></Icon>
|
||||
</Button>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem @click.native="brandOperation(scope.row)">编辑绑定品牌</DropdownItem>
|
||||
<DropdownItem @click.native="specOperation(scope.row)">编辑绑定规格</DropdownItem>
|
||||
<DropdownItem @click.native="parameterOperation(scope.row)">编辑绑定参数</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
|
||||
<template slot="action" slot-scope="scope">
|
||||
<Dropdown v-show="scope.row.level == 2" transfer="true" trigger="click">
|
||||
<Button size="small">
|
||||
绑定
|
||||
<Icon type="ios-arrow-down"></Icon>
|
||||
|
||||
<Dropdown transfer="true" trigger="click">
|
||||
<Button size="small">
|
||||
操作
|
||||
<Icon type="ios-arrow-down"></Icon>
|
||||
</Button>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem @click.native="edit(scope.row)">编辑</DropdownItem>
|
||||
<DropdownItem v-if="scope.row.deleteFlag == 1" @click.native="enable(scope.row)">启用</DropdownItem>
|
||||
<DropdownItem v-if="scope.row.deleteFlag == 0" @click.native="disable(scope.row)">禁用</DropdownItem>
|
||||
<DropdownItem @click.native="remove(scope.row)">删除</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
|
||||
<Button v-show="scope.row.level != 2" type="primary" @click="addChildren(scope.row)" size="small" icon="md-add" style="margin-right: 5px">添加子分类
|
||||
</Button>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem @click.native="brandOperation(scope.row)">编辑绑定品牌</DropdownItem>
|
||||
<DropdownItem @click.native="specOperation(scope.row)">编辑绑定规格</DropdownItem>
|
||||
<DropdownItem @click.native="parameterOperation(scope.row)">编辑绑定参数</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</template>
|
||||
|
||||
|
||||
<Dropdown transfer="true" trigger="click">
|
||||
<Button size="small">
|
||||
操作
|
||||
<Icon type="ios-arrow-down"></Icon>
|
||||
</Button>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem @click.native="edit(scope.row)">编辑</DropdownItem>
|
||||
<DropdownItem v-if="scope.row.deleteFlag == 1" @click.native="enable(scope.row)">启用</DropdownItem>
|
||||
<DropdownItem v-if="scope.row.deleteFlag == 0" @click.native="disable(scope.row)">禁用</DropdownItem>
|
||||
<DropdownItem @click.native="remove(scope.row)">删除</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
|
||||
<Button v-show="scope.row.level != 2" type="primary" @click="addChildren(scope.row)" size="small" icon="md-add" style="margin-right: 5px">添加子分类
|
||||
</Button>
|
||||
</template>
|
||||
<template slot="commissionRate" slot-scope="scope">
|
||||
{{ scope.row.commissionRate }}%
|
||||
</template>
|
||||
|
||||
<template slot="commissionRate" slot-scope="scope">
|
||||
{{ scope.row.commissionRate }}%
|
||||
</template>
|
||||
<template slot="deleteFlag" slot-scope="{row}">
|
||||
<Tag :class="{'ml_10': row.deleteFlag}" :color="row.deleteFlag == false ? 'success' : 'error'">{{row.deleteFlag == false ? '正常启用' : '禁用'}}</Tag>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
<template slot="deleteFlag" slot-scope="{row}">
|
||||
<Tag :class="{'ml_10': row.deleteFlag}" :color="row.deleteFlag == false ? 'success' : 'error'">{{row.deleteFlag == false ? '正常启用' : '禁用'}}</Tag>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="form" :model="formAdd" :label-width="100" :rules="formValidate">
|
||||
<div v-if="showParent">
|
||||
<FormItem label="上级分类" prop="parentId">
|
||||
{{ parentTitle }}
|
||||
<Input v-model="formAdd.parentId" clearable style="width: 100%; display: none" />
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="form" :model="formAdd" :label-width="100" :rules="formValidate">
|
||||
<div v-if="showParent">
|
||||
<FormItem label="上级分类" prop="parentId">
|
||||
{{ parentTitle }}
|
||||
<Input v-model="formAdd.parentId" clearable style="width: 100%; display: none" />
|
||||
</FormItem>
|
||||
</div>
|
||||
<FormItem label="层级" prop="level" style="display: none">
|
||||
<Input v-model="formAdd.level" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="分类名称" prop="name">
|
||||
<Input v-model="formAdd.name" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="分类图标" prop="image">
|
||||
<upload-pic-input v-model="formAdd.image" style="width: 100%"></upload-pic-input>
|
||||
</FormItem>
|
||||
<FormItem label="排序值" prop="sortOrder" style="width: 345px">
|
||||
<InputNumber v-model="formAdd.sortOrder"></InputNumber>
|
||||
</FormItem>
|
||||
<FormItem label="佣金比例(%)" prop="commissionRate" style="width: 345px">
|
||||
<InputNumber v-model="formAdd.commissionRate"></InputNumber>
|
||||
</FormItem>
|
||||
<FormItem label="是否启用" prop="deleteFlag">
|
||||
<i-switch size="large" v-model="formAdd.deleteFlag" :true-value="0" :false-value="1">
|
||||
<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="Submit">提交</Button>
|
||||
</div>
|
||||
<FormItem label="层级" prop="level" style="display: none">
|
||||
<Input v-model="formAdd.level" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="分类名称" prop="name">
|
||||
<Input v-model="formAdd.name" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="分类图标" prop="image">
|
||||
<upload-pic-input v-model="formAdd.image" style="width: 100%"></upload-pic-input>
|
||||
</FormItem>
|
||||
<FormItem label="排序值" prop="sortOrder" style="width: 345px">
|
||||
<InputNumber v-model="formAdd.sortOrder"></InputNumber>
|
||||
</FormItem>
|
||||
<FormItem label="佣金比例(%)" prop="commissionRate" style="width: 345px">
|
||||
<InputNumber v-model="formAdd.commissionRate"></InputNumber>
|
||||
</FormItem>
|
||||
<FormItem label="是否启用" prop="deleteFlag">
|
||||
<i-switch size="large" v-model="formAdd.deleteFlag" :true-value="0" :false-value="1">
|
||||
<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="Submit">提交</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</Modal>
|
||||
|
||||
<Modal :title="modalBrandTitle" v-model="modalBrandVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="brandForm" :model="brandForm" :label-width="100">
|
||||
<Select v-model="brandForm.categoryBrands" multiple>
|
||||
<Option v-for="item in brandWay" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
||||
<Modal :title="modalBrandTitle" v-model="modalBrandVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="brandForm" :model="brandForm" :label-width="100">
|
||||
<Select v-model="brandForm.categoryBrands" multiple>
|
||||
<Option v-for="item in brandWay" :value="item.id" :key="item.id">{{ item.name }}</Option>
|
||||
|
||||
</Select>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalBrandVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="saveCategoryBrand">提交</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</Select>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalBrandVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="saveCategoryBrand">提交</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
<Modal :title="modalSpecTitle" v-model="modalSpecVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="specForm" :model="specForm" :label-width="100">
|
||||
<Select v-model="specForm.categorySpecs" multiple>
|
||||
<Option v-for="item in specifications" :value="item.id" :key="item.id" :label="item.specName">
|
||||
</Option>
|
||||
</Select>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalSpecVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="saveCategorySpec">提交</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal :title="modalSpecTitle" v-model="modalSpecVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="specForm" :model="specForm" :label-width="100">
|
||||
<Select v-model="specForm.categorySpecs" multiple>
|
||||
<Option v-for="item in specifications" :value="item.id" :key="item.id" :label="item.specName">
|
||||
</Option>
|
||||
</Select>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalSpecVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="saveCategorySpec">提交</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</Card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -126,22 +128,18 @@ import {
|
|||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
import {regular} from "@/utils";
|
||||
export default {
|
||||
name: "lili-components",
|
||||
name: "goods-category",
|
||||
components: {
|
||||
uploadPicInput,
|
||||
uploadPicInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
categoryList: [], // 分类列表
|
||||
sortCate: "", //筛选的数据
|
||||
loading: false, // 加载状态
|
||||
selectCount: 0, // 选择数量
|
||||
brands: [], //品牌集合
|
||||
specifications: [], //规格集合
|
||||
categoryId: "", // 分类id
|
||||
category_brands: [], //已经选择的品牌
|
||||
categorySpecs: [], //已经选择的规格
|
||||
expandLevel: 1, // 展开层级
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalBrandVisible: false, //品牌关联编辑显示
|
||||
|
@ -149,8 +147,8 @@ export default {
|
|||
modalTitle: "", // 添加或编辑标题
|
||||
showParent: false, // 是否展示上级菜单
|
||||
parentTitle: "", // 父级菜单名称
|
||||
modalBrandTitle: "",
|
||||
modalSpecTitle: "",
|
||||
modalBrandTitle: "", // 品牌弹窗标题
|
||||
modalSpecTitle: "", // 规格弹窗标题
|
||||
formAdd: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
parentId: "",
|
||||
|
@ -165,7 +163,7 @@ export default {
|
|||
categoryBrands: [],
|
||||
},
|
||||
brandWay: "", //请求绑定品牌的信息
|
||||
specForm: {},
|
||||
specForm: {}, // 规格数据
|
||||
// 表单验证规则
|
||||
formValidate: {
|
||||
commissionRate: [
|
||||
|
@ -197,22 +195,13 @@ export default {
|
|||
slot: "action",
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
categoryIndex: 0,
|
||||
tableData: [], // 表格数据
|
||||
categoryIndex: 0, // 分类id
|
||||
checkedCategoryChildren: "", //选中的分类子级
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// changeSortCate(val) {
|
||||
// let way = this.categoryList.find((item, index) => {
|
||||
// if (item.name == val) {
|
||||
// this.categoryIndex = index;
|
||||
// console.log((this.categoryIndex = index));
|
||||
// return item.name == val;
|
||||
// }
|
||||
// });
|
||||
// this.tableData = [way];
|
||||
// },
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getAllList(0);
|
||||
this.getBrandList();
|
||||
|
@ -239,7 +228,6 @@ export default {
|
|||
this.categoryId = v.id;
|
||||
this.modalBrandTitle = "品牌关联";
|
||||
this.brandForm.categoryBrands = res.result.map((item) => item.id);
|
||||
// this.brandWay = {...res.result}
|
||||
this.modalBrandVisible = true;
|
||||
});
|
||||
},
|
||||
|
@ -272,27 +260,22 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
// 编辑绑定参数
|
||||
parameterOperation(v) {
|
||||
this.$router.push({ name: "parameter", query: { id: v.id } });
|
||||
},
|
||||
refresh() {
|
||||
this.loading = true;
|
||||
let that = this;
|
||||
setTimeout(function () {
|
||||
that.loading = false;
|
||||
}, 1000);
|
||||
},
|
||||
// 添加子分类
|
||||
addChildren(v) {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加子分类";
|
||||
this.parentTitle = v.name;
|
||||
this.formAdd.level = eval(v.level + "+1");
|
||||
this.showParent = true;
|
||||
// this.$refs.form.resetFields();
|
||||
delete this.formAdd.id;
|
||||
this.formAdd.parentId = v.id;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 编辑分类
|
||||
edit(v) {
|
||||
this.modalType = 1;
|
||||
this.modalTitle = "编辑";
|
||||
|
@ -307,6 +290,7 @@ export default {
|
|||
this.showParent = false;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 添加一级分类
|
||||
addParent() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加一级分类";
|
||||
|
@ -317,6 +301,7 @@ export default {
|
|||
this.formAdd.parentId = 0;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 提交
|
||||
Submit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
|
@ -348,10 +333,10 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
// 删除分类
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要删除 " + v.name + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
|
@ -407,7 +392,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 获取分类数据
|
||||
getAllList(parent_id) {
|
||||
this.loading = true;
|
||||
getCategoryTree(parent_id).then((res) => {
|
||||
|
@ -427,6 +412,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
// 启用分类
|
||||
enable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认启用",
|
||||
|
@ -448,6 +434,7 @@ export default {
|
|||
},
|
||||
});
|
||||
},
|
||||
// 禁用分类
|
||||
disable(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认禁用",
|
||||
|
@ -476,14 +463,4 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -116,7 +116,6 @@ import {
|
|||
} from "@/api/goods";
|
||||
export default {
|
||||
name: "categoryParams",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
/** 分类ID */
|
||||
|
@ -127,19 +126,17 @@ export default {
|
|||
modalType: 0,
|
||||
/** 添加或编辑标题 */
|
||||
modalTitle: "",
|
||||
modalTitle1: "",
|
||||
/** 参数添加或编辑弹出框 */
|
||||
dialogParamsVisible: false,
|
||||
/** 参数组添加或编辑弹出框 */
|
||||
dialogParamsGroupVisible: false,
|
||||
/** 参数ID **/
|
||||
paramId: "",
|
||||
//参数表单
|
||||
paramForm: {},
|
||||
/** 参数值 **/
|
||||
ops:{
|
||||
options: []
|
||||
},
|
||||
// 参数表单
|
||||
paramGroupForm: {},
|
||||
/** 添加、编辑参数 规格 */
|
||||
formValidate: {
|
||||
|
@ -161,6 +158,7 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
|
@ -207,6 +205,7 @@ export default {
|
|||
this.modalTitle = "修改参数组";
|
||||
this.dialogParamsGroupVisible = true;
|
||||
},
|
||||
// 添加参数
|
||||
handleAddParamsGroup() {
|
||||
this.paramGroupForm = {
|
||||
|
||||
|
@ -279,6 +278,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
// 获取分类列表
|
||||
getDataList() {
|
||||
getCategoryParamsListData(this.categoryId).then((res) => {
|
||||
if (res.success) {
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="规格名称" prop="specName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.specName"
|
||||
placeholder="请输入规格名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Form
|
||||
@keydown.enter.native="handleSearch"
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="规格名称" prop="specName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.specName"
|
||||
placeholder="请输入规格名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
|
@ -58,7 +56,7 @@
|
|||
:mask-closable="false"
|
||||
:width="500"
|
||||
>
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<Form ref="form" :model="form" :label-width="100">
|
||||
<FormItem label="规格名称" prop="specName">
|
||||
<Input v-model="form.specName" maxlength="30" clearable style="width: 100%"/>
|
||||
</FormItem>
|
||||
|
@ -73,11 +71,7 @@
|
|||
popper-class="spec-values-popper"
|
||||
style="width: 100%; text-align: left; margin-right: 10px"
|
||||
>
|
||||
<Option
|
||||
v-for="item in specValue"
|
||||
:value="item"
|
||||
:label="item"
|
||||
>
|
||||
<Option v-for="item in specValue" :value="item" :label="item" :key="item">
|
||||
</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
|
@ -110,7 +104,6 @@ export default {
|
|||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
specTitle: "", // 添加或编辑规格值
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -125,8 +118,6 @@ export default {
|
|||
},
|
||||
/** 编辑规格值 */
|
||||
specValue: [],
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
@ -320,10 +311,10 @@ export default {
|
|||
}
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 删除规格
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要删除 " + v.specName + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
|
@ -338,6 +329,7 @@ export default {
|
|||
},
|
||||
});
|
||||
},
|
||||
// 批量删除
|
||||
delAll() {
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
.left-container {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right-container {
|
||||
float: left;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
img {
|
||||
vertical-align: middle;
|
||||
border-style: none;
|
||||
}
|
||||
.product {
|
||||
width: 140px;
|
||||
height: 160px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.show{
|
||||
label{
|
||||
font-size: 14px;
|
||||
}
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-top: 4px;
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 2px;
|
||||
}
|
||||
.border-b {
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
width: 500px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.div-height{
|
||||
line-height: 25px;
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<div>
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Row>
|
||||
<Form ref="searchForm" :model="searchForm" @keydown.enter.native="handleSearch" inline :label-width="70" class="search-form">
|
||||
<Form-item label="会员名称" prop="memberName">
|
||||
<Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 200px"/>
|
||||
</Form-item>
|
||||
|
@ -350,5 +350,52 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./index.scss";
|
||||
.left-container {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.right-container {
|
||||
float: left;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
img {
|
||||
vertical-align: middle;
|
||||
border-style: none;
|
||||
}
|
||||
.product {
|
||||
width: 140px;
|
||||
height: 160px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.show{
|
||||
label{
|
||||
font-size: 14px;
|
||||
}
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-top: 4px;
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 2px;
|
||||
}
|
||||
.border-b {
|
||||
border-bottom: 1px solid #e9e9e9;
|
||||
width: 500px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.div-height{
|
||||
line-height: 25px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
:readonly="readonly"
|
||||
:maxlength="maxlength"
|
||||
>
|
||||
<Poptip slot="append" transfer trigger="hover" title="图片预览" placement="right" width="350">
|
||||
<Icon type="md-eye" class="see-icon" />
|
||||
<div slot="content">
|
||||
<img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" />
|
||||
<a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a>
|
||||
</div>
|
||||
</Poptip>
|
||||
<Poptip slot="append" transfer trigger="hover" title="图片预览" placement="right">
|
||||
<Icon type="md-eye" class="see-icon" />
|
||||
<div slot="content">
|
||||
<img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" />
|
||||
<a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a>
|
||||
</div>
|
||||
</Poptip>
|
||||
</Input>
|
||||
|
||||
<Upload
|
||||
|
@ -54,7 +54,10 @@ export default {
|
|||
name: "uploadPicInput",
|
||||
props: {
|
||||
value: String,
|
||||
size: String,
|
||||
size: {
|
||||
default: 'default',
|
||||
type: String
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: "图片链接"
|
||||
|
@ -91,11 +94,13 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化
|
||||
init() {
|
||||
this.accessToken = {
|
||||
accessToken: this.getStore("accessToken")
|
||||
};
|
||||
},
|
||||
// 格式校验
|
||||
handleFormatError(file) {
|
||||
this.loading = false;
|
||||
this.$Notice.warning({
|
||||
|
@ -106,6 +111,7 @@ export default {
|
|||
" ’格式不正确, 请选择 .jpg .jpeg .png .gif .bmp格式文件"
|
||||
});
|
||||
},
|
||||
// 大小校验
|
||||
handleMaxSize(file) {
|
||||
this.loading = false;
|
||||
this.$Notice.warning({
|
||||
|
@ -113,10 +119,12 @@ export default {
|
|||
desc: "所选文件‘ " + file.name + " ’大小过大, 不得超过 " + this.maxSize + "M."
|
||||
});
|
||||
},
|
||||
// 上传前
|
||||
beforeUpload() {
|
||||
this.loading = true;
|
||||
return true;
|
||||
},
|
||||
// 上传成功
|
||||
handleSuccess(res, file) {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
|
@ -127,15 +135,18 @@ export default {
|
|||
this.$Message.error(res.message);
|
||||
}
|
||||
},
|
||||
// 上传失败
|
||||
handleError(error, file, fileList) {
|
||||
this.loading = false;
|
||||
this.$Message.error(error.toString());
|
||||
},
|
||||
// 上传成功回显
|
||||
handleChange(v) {
|
||||
this.$emit("input", this.currentValue);
|
||||
this.$emit("on-change", this.currentValue);
|
||||
this.$attrs.rollback && this.$attrs.rollback()
|
||||
},
|
||||
// 初始值
|
||||
setCurrentValue(value) {
|
||||
if (value === this.currentValue) {
|
||||
return;
|
||||
|
@ -158,9 +169,6 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.see-icon {
|
||||
font-size: 16px;
|
||||
margin-left: -32px;
|
||||
margin-top: 3px;
|
||||
padding: 7px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
class="mt_10"
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="applyEndTime">
|
||||
|
@ -64,15 +65,27 @@
|
|||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<div>
|
||||
<Button type="success" size="small" @click="view(row)"
|
||||
>查看</Button
|
||||
>
|
||||
<Button type="info" size="small" @click="view(row)">查看</Button>
|
||||
<Button
|
||||
type="error"
|
||||
v-if="row.promotionStatus === 'START'"
|
||||
style="margin-left:5px"
|
||||
size="small"
|
||||
@click="openOrClose(row)"
|
||||
>关闭</Button>
|
||||
<Button
|
||||
type="success"
|
||||
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
|
||||
style="margin-left:5px"
|
||||
size="small"
|
||||
@click="openOrClose(row)"
|
||||
>开启</Button>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
|
@ -88,14 +101,14 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getFullDiscountList } from "@/api/promotion.js";
|
||||
import { getFullDiscountList, updateFullDiscount } from "@/api/promotion.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false, // 表单加载状态
|
||||
searchForm: { // 请求参数
|
||||
pageNumber: 0,
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
sort: "startTime",
|
||||
order: "desc",
|
||||
|
@ -163,7 +176,7 @@ export default {
|
|||
title: "操作",
|
||||
slot: "action",
|
||||
align: "center",
|
||||
width: 100,
|
||||
width: 140,
|
||||
},
|
||||
],
|
||||
data: [], // 列表数据
|
||||
|
@ -173,9 +186,34 @@ export default {
|
|||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 开启或关闭活动
|
||||
openOrClose (row) {
|
||||
let name = '开启'
|
||||
let status = 'START'
|
||||
if (row.promotionStatus === 'START') {
|
||||
name = '关闭'
|
||||
status = 'CLOSE'
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
// 记得确认修改此处
|
||||
content: `确认${name}此活动吗?需要一定时间才能生效,请耐心等待`,
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
updateFullDiscount(row.id, status).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success(`${name}成功`);
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
changePage(v) {
|
||||
// 改变页数
|
||||
this.searchForm.pageNumber = v - 1;
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
changePageSize(v) {
|
||||
|
@ -185,7 +223,7 @@ export default {
|
|||
},
|
||||
handleSearch() {
|
||||
// 搜索
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
|
@ -210,6 +248,7 @@ export default {
|
|||
// 查看
|
||||
this.$router.push({ name: "full-cut-detail", query: { id: row.id } });
|
||||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
|
|
|
@ -175,3 +175,7 @@ export const getFullDiscountById = (id) => {
|
|||
export const delFullDiscount = (id) => {
|
||||
return deleteRequest(`/promotion/fullDiscount/${id}`)
|
||||
}
|
||||
// 开启、关闭满减活动
|
||||
export const updateFullDiscount = (id, promotionStatus) => {
|
||||
return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`)
|
||||
}
|
||||
|
|
|
@ -18,14 +18,14 @@ export default {
|
|||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
// common: "https://common-api.pickmall.cn",
|
||||
// buyer: "https://buyer-api.pickmall.cn",
|
||||
// seller: "https://store-api.pickmall.cn",
|
||||
// manager: "https://admin-api.pickmall.cn"
|
||||
common: 'http://192.168.0.101:8890',
|
||||
buyer: 'http://192.168.0.101:8888',
|
||||
seller: 'http://192.168.0.101:8889',
|
||||
manager: 'http://192.168.0.101:8887'
|
||||
common: "https://common-api.pickmall.cn",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
// common: 'http://192.168.0.101:8890',
|
||||
// buyer: 'http://192.168.0.101:8888',
|
||||
// seller: 'http://192.168.0.101:8889',
|
||||
// manager: 'http://192.168.0.101:8887'
|
||||
},
|
||||
api_prod: {
|
||||
common: "https://common-api.pickmall.cn",
|
||||
|
|
|
@ -233,6 +233,7 @@ util.openNewPage = function (vm, name, argu, query) {
|
|||
if (query) {
|
||||
tag.query = query;
|
||||
}
|
||||
console.log(tag);
|
||||
vm.$store.commit('increateTag', tag);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ const app = {
|
|||
navList: [], // 顶部菜单
|
||||
currNav: "", // 当前顶部菜单name
|
||||
currNavTitle: "", // 当前顶部菜单标题
|
||||
cachePage: [],
|
||||
cachePage: [], // 缓存的页面
|
||||
lang: '',
|
||||
isFullScreen: false,
|
||||
openedSubmenuArr: [], // 要展开的菜单数组
|
||||
|
@ -93,6 +93,7 @@ const app = {
|
|||
state.cachePage.splice(index, 1);
|
||||
}
|
||||
});
|
||||
localStorage.cachePage = JSON.stringify(state.cachePage);
|
||||
},
|
||||
initCachepage(state) {
|
||||
if (localStorage.cachePage) {
|
||||
|
@ -120,6 +121,7 @@ const app = {
|
|||
clearAllTags(state) {
|
||||
state.storeOpenedList.splice(1);
|
||||
state.cachePage.length = 0;
|
||||
localStorage.cachePage = '';
|
||||
localStorage.storeOpenedList = JSON.stringify(state.storeOpenedList);
|
||||
},
|
||||
clearOtherTags(state, vm) {
|
||||
|
@ -140,6 +142,7 @@ const app = {
|
|||
return item == currentName;
|
||||
});
|
||||
state.cachePage = newCachepage;
|
||||
localStorage.cachePage = JSON.stringify(state.cachePage);
|
||||
localStorage.storeOpenedList = JSON.stringify(state.storeOpenedList);
|
||||
},
|
||||
setOpenedList(state) {
|
||||
|
@ -165,6 +168,7 @@ const app = {
|
|||
setMessageCount(state, count) {
|
||||
state.messageCount = count;
|
||||
},
|
||||
// 新增页签
|
||||
increateTag(state, tagObj) {
|
||||
if (!Util.oneOf(tagObj.name, state.dontCache)) {
|
||||
state.cachePage.push(tagObj.name);
|
||||
|
|
|
@ -11,15 +11,15 @@
|
|||
:readonly="readonly"
|
||||
:maxlength="maxlength"
|
||||
>
|
||||
<Button slot="append" icon="md-eye"></Button>
|
||||
<Poptip slot="append" transfer trigger="hover" title="图片预览" placement="right">
|
||||
<Icon type="md-eye" class="see-icon" />
|
||||
<div slot="content">
|
||||
<img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" />
|
||||
<a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a>
|
||||
</div>
|
||||
</Poptip>
|
||||
</Input>
|
||||
<Poptip transfer trigger="hover" title="图片预览" placement="right" width="350">
|
||||
<Icon type="md-eye" class="see-icon" />
|
||||
<div slot="content">
|
||||
<img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" />
|
||||
<a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a>
|
||||
</div>
|
||||
</Poptip>
|
||||
|
||||
<Upload
|
||||
:action="uploadFileUrl"
|
||||
:headers="accessToken"
|
||||
|
@ -35,7 +35,7 @@
|
|||
ref="up"
|
||||
class="upload"
|
||||
>
|
||||
<Button :loading="loading" :size="size" :disabled="disabled" :icon="icon">上传图片</Button>
|
||||
<Button :loading="loading" :size="size" :disabled="disabled">上传图片</Button>
|
||||
</Upload>
|
||||
</div>
|
||||
|
||||
|
@ -166,9 +166,6 @@ export default {
|
|||
<style lang="scss" scoped>
|
||||
.see-icon {
|
||||
font-size: 16px;
|
||||
margin-left: -32px;
|
||||
margin-top: 3px;
|
||||
padding: 7px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card style="height: 60px">
|
||||
<div style="">
|
||||
<div>
|
||||
<Button
|
||||
v-if="allowOperation.editPrice"
|
||||
@click="modifyPrice"
|
||||
|
@ -30,127 +30,124 @@
|
|||
</div>
|
||||
</Card>
|
||||
|
||||
<Card style="height: 400px" class="mt_10">
|
||||
<div style="width: 30%; float: left; margin-left: 20px">
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">订单号:</div>
|
||||
<div class="div-item-right">{{ orderInfo.order.sn }}</div>
|
||||
</div>
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">订单来源:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.order.clientType | clientTypeWay }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">订单状态:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.orderStatusValue }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">下单时间:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.order.createTime }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width: 30%; float: left; margin-left: 20px">
|
||||
<div class="div-item" v-if="orderInfo.order.needReceipt == false">
|
||||
<div class="div-item-left">发票信息:</div>
|
||||
<div class="div-item-right">暂无发票信息</div>
|
||||
</div>
|
||||
<template v-if="orderInfo.order.needReceipt == true && orderInfo.receipt">
|
||||
<Card class="mt_10">
|
||||
<Row>
|
||||
<Col span="12">
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">发票抬头:</div>
|
||||
<div class="div-item-left">订单号:</div>
|
||||
<div class="div-item-right">{{ orderInfo.order.sn }}</div>
|
||||
</div>
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">订单来源:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.order.clientType | clientTypeWay }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">订单状态:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.orderStatusValue }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">下单时间:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.order.createTime }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-item" v-if="orderInfo.order.needReceipt == false">
|
||||
<div class="div-item-left">发票信息:</div>
|
||||
<div class="div-item-right">暂无发票信息</div>
|
||||
</div>
|
||||
<template v-if="orderInfo.order.needReceipt == true && orderInfo.receipt">
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">发票抬头:</div>
|
||||
<div class="div-item-right">
|
||||
{{
|
||||
orderInfo.receipt.receiptTitle
|
||||
? orderInfo.receipt.receiptTitle
|
||||
: "暂无"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item" v-if="orderInfo.receipt.taxpayerId">
|
||||
<div class="div-item-left">发票税号:</div>
|
||||
<div class="div-item-right">
|
||||
{{
|
||||
orderInfo.receipt.taxpayerId
|
||||
? orderInfo.receipt.taxpayerId
|
||||
: "暂无"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">发票内容:</div>
|
||||
<div class="div-item-right">
|
||||
{{
|
||||
orderInfo.receipt.receiptContent
|
||||
? orderInfo.receipt.receiptContent
|
||||
: "暂无"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">发票金额:</div>
|
||||
<div class="div-item-right">
|
||||
<span v-if="orderInfo.receipt.receiptPrice">¥</span
|
||||
>{{
|
||||
orderInfo.receipt.receiptPrice
|
||||
? orderInfo.receipt.receiptPrice
|
||||
: "暂无" | unitPrice
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">是否开票:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.receipt.receiptStatus == 0 ? "未开" : "已开" }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Col>
|
||||
<Col span="12">
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">收货信息:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.order.consigneeName }}
|
||||
{{ orderInfo.order.consigneeMobile }}
|
||||
{{ orderInfo.order.consigneeAddressPath }}
|
||||
{{ orderInfo.order.consigneeDetail }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">支付方式:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.paymentMethodValue }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">买家留言:</div>
|
||||
<div class="div-item-right">{{ orderInfo.order.remark }}</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item" v-if="orderInfo.order.orderType != 'VIRTUAL'">
|
||||
<div class="div-item-left">配送方式:</div>
|
||||
<div class="div-item-right">
|
||||
{{
|
||||
orderInfo.receipt.receiptTitle
|
||||
? orderInfo.receipt.receiptTitle
|
||||
: "暂无"
|
||||
orderInfo.deliveryMethodValue
|
||||
? orderInfo.deliveryMethodValue
|
||||
: "暂无配送方式"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item" v-if="orderInfo.receipt.taxpayerId">
|
||||
<div class="div-item-left">发票税号:</div>
|
||||
<div class="div-item-right">
|
||||
{{
|
||||
orderInfo.receipt.taxpayerId
|
||||
? orderInfo.receipt.taxpayerId
|
||||
: "暂无"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">发票内容:</div>
|
||||
<div class="div-item-right">
|
||||
{{
|
||||
orderInfo.receipt.receiptContent
|
||||
? orderInfo.receipt.receiptContent
|
||||
: "暂无"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">发票金额:</div>
|
||||
<div class="div-item-right">
|
||||
<span v-if="orderInfo.receipt.receiptPrice">¥</span
|
||||
>{{
|
||||
orderInfo.receipt.receiptPrice
|
||||
? orderInfo.receipt.receiptPrice
|
||||
: "暂无" | unitPrice
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">是否开票:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.receipt.receiptStatus == 0 ? "未开" : "已开" }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<div style="width: 36%; float: left">
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">收货信息:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.order.consigneeName }}
|
||||
{{ orderInfo.order.consigneeMobile }}
|
||||
{{ orderInfo.order.consigneeAddressPath }}
|
||||
{{ orderInfo.order.consigneeDetail }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">支付方式:</div>
|
||||
<div class="div-item-right">
|
||||
{{ orderInfo.paymentMethodValue }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item">
|
||||
<div class="div-item-left">买家留言:</div>
|
||||
<div class="div-item-right">{{ orderInfo.order.remark }}</div>
|
||||
</div>
|
||||
|
||||
<div class="div-item" v-if="orderInfo.order.orderType != 'VIRTUAL'">
|
||||
<div class="div-item-left">配送方式:</div>
|
||||
<div class="div-item-right">
|
||||
{{
|
||||
orderInfo.deliveryMethodValue
|
||||
? orderInfo.deliveryMethodValue
|
||||
: "暂无配送方式"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<Card class="mt_10">
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
|
||||
<script>
|
||||
import * as API_Order from "@/api/order";
|
||||
import { verificationCode } from "@/api/order";
|
||||
import JsonExcel from "vue-json-excel";
|
||||
import Cookies from "js-cookie";
|
||||
export default {
|
||||
|
@ -186,6 +185,12 @@ export default {
|
|||
'收货人': 'consigneeName',
|
||||
'收货人联系电话': 'consigneeMobile',
|
||||
'收货地址': 'consigneeAddress',
|
||||
'商品名称': 'goodsName',
|
||||
'商品价格': 'goodsPrice',
|
||||
'订单金额': 'flowPrice',
|
||||
'商品数量': 'num',
|
||||
'店铺名称': 'storeName',
|
||||
'创建时间': 'createTime'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
@ -275,6 +280,8 @@ export default {
|
|||
res.result[i].index = i+1;
|
||||
res.result[i].consigneeAddress =
|
||||
res.result[i].consigneeAddressPath.replace(/,/g, "") + res.result[i].consigneeDetail
|
||||
res.result[i].goodsPrice = this.$options.filters.unitPrice(res.result[i].goodsPrice,'¥')
|
||||
res.result[i].flowPrice = this.$options.filters.unitPrice(res.result[i].flowPrice,'¥')
|
||||
}
|
||||
return res.result
|
||||
} else {
|
||||
|
|
|
@ -27,12 +27,12 @@
|
|||
</Row>
|
||||
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="info" size="small" style="margin-right: 10px" @click="edit(row)">编辑</Button>
|
||||
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="info" size="small" style="margin-right: 5px" @click="edit(row)">编辑</Button>
|
||||
<Button v-if="row.promotionStatus !== 'CLOSE'" type="error" size="small" @click="remove(row)">下架</Button>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber + 1" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
|
@ -49,7 +49,7 @@ export default {
|
|||
loading: true, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 0, // 当前页数
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "startTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
|
@ -135,7 +135,7 @@ export default {
|
|||
title: "活动时间",
|
||||
|
||||
render: (h, params) => {
|
||||
if (params.row.getType === "ACTIVITY") {
|
||||
if (params.row.rangeDayType !== "FIXEDTIME") {
|
||||
return h("div", "长期有效");
|
||||
} else {
|
||||
return h("div", {
|
||||
|
@ -208,7 +208,7 @@ export default {
|
|||
this.$router.push({ name: "platform-coupon-info", query: { id: v.id } });
|
||||
},
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v - 1;
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
|
@ -217,13 +217,13 @@ export default {
|
|||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.searchForm = {};
|
||||
this.selectDate = "";
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
|
|
|
@ -351,7 +351,6 @@ export default {
|
|||
} else {
|
||||
// 编辑
|
||||
delete params.consumeLimit;
|
||||
delete params.couponDiscount;
|
||||
delete params.updateTime;
|
||||
|
||||
editShopCoupon(params).then((res) => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="full-cut">
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Form
|
||||
ref="searchForm"
|
||||
|
@ -73,25 +73,38 @@
|
|||
v-if="row.promotionStatus == 'NEW'"
|
||||
size="small"
|
||||
@click="edit(row)"
|
||||
>编辑</Button
|
||||
>
|
||||
<Button type="success" v-else size="small" @click="edit(row)"
|
||||
>查看</Button
|
||||
>
|
||||
>编辑</Button>
|
||||
<Button type="info" v-else size="small" @click="edit(row)">查看</Button>
|
||||
<Button
|
||||
type="success"
|
||||
v-if="row.promotionStatus === 'START'"
|
||||
ghost
|
||||
style="margin-left:5px"
|
||||
size="small"
|
||||
@click="openOrClose(row)"
|
||||
>关闭</Button>
|
||||
<Button
|
||||
type="success"
|
||||
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
|
||||
ghost
|
||||
style="margin-left:5px"
|
||||
size="small"
|
||||
@click="openOrClose(row)"
|
||||
>开启</Button>
|
||||
<Button
|
||||
type="error"
|
||||
:disabled="row.promotionStatus == 'START'"
|
||||
ghost
|
||||
style="margin-left:5px"
|
||||
size="small"
|
||||
@click="del(row)"
|
||||
>删除</Button
|
||||
>
|
||||
>删除</Button>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
<Page
|
||||
:current="searchForm.pageNumber + 1"
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
|
@ -107,14 +120,14 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getFullDiscountList, delFullDiscount } from "@/api/promotion.js";
|
||||
import { getFullDiscountList, delFullDiscount, updateFullDiscount } from "@/api/promotion.js";
|
||||
export default {
|
||||
name: 'full-cut',
|
||||
data() {
|
||||
return {
|
||||
loading: false, // 表单加载状态
|
||||
searchForm: { // 列表请求参数
|
||||
pageNumber: 0,
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
sort: "startTime",
|
||||
order: "desc",
|
||||
|
@ -194,7 +207,7 @@ export default {
|
|||
},
|
||||
// 改变页数
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v - 1;
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页码
|
||||
|
@ -204,7 +217,7 @@ export default {
|
|||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
|
@ -212,7 +225,7 @@ export default {
|
|||
handleReset() {
|
||||
this.selectDate = ''
|
||||
this.searchForm = {}
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
|
@ -239,6 +252,31 @@ export default {
|
|||
},
|
||||
});
|
||||
},
|
||||
// 开启或关闭活动
|
||||
openOrClose (row) {
|
||||
let name = '开启'
|
||||
let status = 'START'
|
||||
if (row.promotionStatus === 'START') {
|
||||
name = '关闭'
|
||||
status = 'CLOSE'
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
// 记得确认修改此处
|
||||
content: `确认${name}此活动吗?需要一定时间才能生效,请耐心等待`,
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
updateFullDiscount(row.id, status).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success(`${name}成功`);
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
|
|
|
@ -100,17 +100,17 @@
|
|||
:disabled="form.promotionStatus != 'NEW'"
|
||||
v-model="form.isFreeFreight"
|
||||
>免邮费</Checkbox
|
||||
>
|
||||
>
|
||||
<Checkbox
|
||||
:disabled="form.promotionStatus != 'NEW'"
|
||||
v-model="form.isCoupon"
|
||||
>送优惠券</Checkbox
|
||||
>
|
||||
>
|
||||
<Checkbox
|
||||
:disabled="form.promotionStatus != 'NEW'"
|
||||
v-model="form.isGift"
|
||||
>送赠品</Checkbox
|
||||
>
|
||||
>
|
||||
<Checkbox
|
||||
:disabled="form.promotionStatus != 'NEW'"
|
||||
v-if="JSON.parse(getStore('userInfo')).selfOperated"
|
||||
|
@ -389,6 +389,7 @@ export default {
|
|||
getDetail() {
|
||||
// 获取活动详情
|
||||
getFullDiscountById(this.id).then((res) => {
|
||||
console.log(res);
|
||||
let data = res.result;
|
||||
if (data.number == -1) {
|
||||
data.promotionGoodsList = [];
|
||||
|
@ -400,7 +401,7 @@ export default {
|
|||
data.discountType = "isFullMinus";
|
||||
delete data.isFullMinus;
|
||||
} else {
|
||||
data.discountType = "isFullMinus";
|
||||
data.discountType = "isFullRate";
|
||||
delete data.isFullRate;
|
||||
}
|
||||
data.rangeTime = [];
|
||||
|
|
Loading…
Reference in New Issue