mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-06-23 10:30:26 +08:00
feat: 新增全局布局样式并提升组件响应式表现
- 在 global-layout.scss 中引入全局布局样式,统一页面宽度与对齐方式 - 更新多个组件与页面以优化响应式,包括宽度、间距及 flex 布局等调整 - 在 API 请求中增加 loading 状态管理,改善用户体验 - 优化领券中心与商品详情页,提升功能与 UI 一致性
This commit is contained in:
@@ -205,6 +205,7 @@ export function couponList (params) {
|
||||
url: `/buyer/promotion/coupon`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
loading: false,
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
@@ -72,7 +72,8 @@ export function applyStatus () {
|
||||
return request({
|
||||
url: `/buyer/store/store/apply`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
method: Method.GET,
|
||||
loading: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
22
buyer/src/assets/styles/global-layout.scss
Normal file
22
buyer/src/assets/styles/global-layout.scss
Normal file
@@ -0,0 +1,22 @@
|
||||
// 全局布局工具类(非 scoped,避免子组件继承 class 时宽度失效)
|
||||
.width_1200_auto {
|
||||
width: 1200px;
|
||||
max-width: 1200px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// 首页主体:分类导航 + 楼层装修共用同一 1200px 容器,保证列对齐
|
||||
.index-main {
|
||||
width: 1200px;
|
||||
max-width: 1200px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
// 与 CateNav 商品分类栏、Carousel 左占位一致的列宽
|
||||
$index-side-col-width: 263.2px;
|
||||
$index-col-gap: 10px;
|
||||
@@ -30,6 +30,7 @@ $dark_content_color: #d5d5d5;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
/***** 封装一些方法可用于 黑暗主题 ,明亮主题 *****/
|
||||
@@ -305,9 +306,11 @@ li {
|
||||
}
|
||||
|
||||
.width_1200_auto {
|
||||
width: 1184px;
|
||||
width: 1200px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
@@ -325,18 +328,24 @@ li {
|
||||
.goods-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 1200px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
column-gap: 10px;
|
||||
}
|
||||
.goods-show-info {
|
||||
width: 235px;
|
||||
width: calc(20% - 8px);
|
||||
padding: 6px;
|
||||
margin: 10px 0px;
|
||||
margin-left: 5px;
|
||||
margin: 10px 0;
|
||||
position: relative;
|
||||
border: 1px solid #fff;
|
||||
cursor: pointer;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.goods-show-img img {
|
||||
width: 100%;
|
||||
aspect-ratio: 1;
|
||||
object-fit: cover;
|
||||
}
|
||||
.goods-show-info:hover {
|
||||
border: 1px solid #ccc;
|
||||
@@ -368,7 +377,12 @@ li {
|
||||
color: $theme_color;
|
||||
}
|
||||
.goods-page {
|
||||
margin:10px auto ;
|
||||
text-align: right;
|
||||
width: 1200px;
|
||||
margin: 10px 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
:deep(.el-pagination) {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,18 +9,24 @@
|
||||
.goods-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 1200px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
column-gap: 10px;
|
||||
}
|
||||
.goods-show-info {
|
||||
width: 235px;
|
||||
width: calc(20% - 8px);
|
||||
padding: 6px;
|
||||
margin: 10px 0px;
|
||||
margin-left: 5px;
|
||||
margin: 10px 0;
|
||||
position: relative;
|
||||
border: 1px solid #fff;
|
||||
cursor: pointer;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.goods-show-img img {
|
||||
width: 100%;
|
||||
aspect-ratio: 1;
|
||||
object-fit: cover;
|
||||
}
|
||||
.goods-show-info:hover {
|
||||
border: 1px solid #ccc;
|
||||
@@ -37,6 +43,7 @@
|
||||
text-overflow: ellipsis;
|
||||
display:-webkit-box;
|
||||
-webkit-line-clamp:2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient:vertical;
|
||||
color:#808080;
|
||||
}
|
||||
@@ -62,7 +69,12 @@
|
||||
color: $theme_color;
|
||||
}
|
||||
.goods-page {
|
||||
margin:10px auto ;
|
||||
text-align: right;
|
||||
width: 1200px;
|
||||
margin: 10px 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
:deep(.el-pagination) {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
@@ -136,5 +136,10 @@ export default {
|
||||
|
||||
:deep(._Card .el-card__body) {
|
||||
padding: 0 !important;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
:deep(._Card .el-card__body:empty) {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -57,7 +57,7 @@ export default {
|
||||
if (!this.userInfo) {
|
||||
this.$Modal.confirm({
|
||||
title: '请登录',
|
||||
content: '<p>请登录后执行此操作</p>',
|
||||
content: '请登录后执行此操作',
|
||||
okText: '立即登录',
|
||||
cancelText: '继续浏览',
|
||||
onOk: () => {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
:src="currentImg"
|
||||
:preview-src-list="previewList"
|
||||
fit="contain"
|
||||
style="width: 100%; height: 400px"
|
||||
style="width: 100%; height: 350px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -220,16 +220,18 @@
|
||||
<div class="item-select-title">
|
||||
<p>数量</p>
|
||||
</div>
|
||||
<div class="item-select-row">
|
||||
<el-input-number
|
||||
:min="1"
|
||||
:max="skuDetail.quantity"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
v-model="count"
|
||||
:precision="0.1"
|
||||
@blur="changeCount"
|
||||
></el-input-number>
|
||||
<span class="inventory"> 库存{{ skuDetail.quantity }}</span>
|
||||
<div class="item-select-column">
|
||||
<div class="item-select-row">
|
||||
<el-input-number
|
||||
:min="1"
|
||||
:max="skuDetail.quantity"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
v-model="count"
|
||||
:precision="0.1"
|
||||
@blur="changeCount"
|
||||
></el-input-number>
|
||||
<span class="inventory"> 库存{{ skuDetail.quantity }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -241,45 +243,52 @@
|
||||
<div class="item-select-title">
|
||||
<p>重量</p>
|
||||
</div>
|
||||
<div class="item-select-row">
|
||||
<span class="inventory"> {{ skuDetail.weight }}kg</span>
|
||||
<div class="item-select-column">
|
||||
<span class="inventory">{{ skuDetail.weight }}kg</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="add-buy-car"
|
||||
class="item-select add-buy-car-row"
|
||||
v-if="$route.query.way === 'POINT' && skuDetail.authFlag === 'PASS'"
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
:loading="loading"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="pointPay"
|
||||
>积分购买</el-button
|
||||
>
|
||||
<div class="item-select-column">
|
||||
<div class="add-buy-car">
|
||||
<el-button
|
||||
type="danger"
|
||||
:loading="loading"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="pointPay"
|
||||
>积分购买</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="add-buy-car"
|
||||
class="item-select add-buy-car-row"
|
||||
v-if="$route.query.way !== 'POINT' && skuDetail.authFlag === 'PASS'"
|
||||
>
|
||||
|
||||
<el-button
|
||||
type="danger"
|
||||
v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'"
|
||||
:loading="loading"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="addShoppingCartBtn"
|
||||
>加入购物车</el-button
|
||||
>
|
||||
<el-button
|
||||
type="warning"
|
||||
:loading="loading1"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="buyNow"
|
||||
>立即购买</el-button
|
||||
>
|
||||
<el-tooltip content="观看视频" v-if="skuDetail.goodsVideo">
|
||||
<img class="view-video" @click="showGoodsVideo = true" :src="require('@/assets/iconfont/play.svg')" alt="">
|
||||
</el-tooltip>
|
||||
<div class="item-select-column">
|
||||
<div class="add-buy-car">
|
||||
<el-button
|
||||
type="danger"
|
||||
v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'"
|
||||
:loading="loading"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="addShoppingCartBtn"
|
||||
>加入购物车</el-button
|
||||
>
|
||||
<el-button
|
||||
type="warning"
|
||||
:loading="loading1"
|
||||
:disabled="skuDetail.quantity === 0"
|
||||
@click="buyNow"
|
||||
>立即购买</el-button
|
||||
>
|
||||
<el-tooltip content="观看视频" v-if="skuDetail.goodsVideo">
|
||||
<img class="view-video" @click="showGoodsVideo = true" :src="require('@/assets/iconfont/play.svg')" alt="">
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -644,9 +653,7 @@ export default {
|
||||
height: 350px;
|
||||
box-shadow: 0px 0px 8px $border_color;
|
||||
cursor: pointer;
|
||||
|
||||
|
||||
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
#dplayer{
|
||||
width: 100%;
|
||||
@@ -657,7 +664,7 @@ export default {
|
||||
}
|
||||
|
||||
.item-detail-img-row {
|
||||
margin-top: 15px;
|
||||
margin-top: 0;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@@ -835,6 +842,7 @@ export default {
|
||||
.item-select {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
@@ -843,15 +851,25 @@ export default {
|
||||
font-size: 14px;
|
||||
margin-right: 15px;
|
||||
width: 60px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.item-select-column {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.item-select-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
@@ -890,12 +908,33 @@ export default {
|
||||
border-top: 1px dotted $border_color;
|
||||
}
|
||||
|
||||
.add-buy-car-row {
|
||||
margin-top: 25px;
|
||||
|
||||
&.item-select {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.item-select-column {
|
||||
flex: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.add-buy-car {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0;
|
||||
padding-left: 0;
|
||||
margin-left: 0;
|
||||
|
||||
> * {
|
||||
margin: 0 4px;
|
||||
margin: 0 8px 0 0;
|
||||
}
|
||||
|
||||
> *:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -164,9 +164,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
changeHeight (name) { // 设置商品详情高度
|
||||
let heightCss = window.getComputedStyle(this.$refs[name]).height;
|
||||
heightCss = parseInt(heightCss.substr(0, heightCss.length - 2)) + 89;
|
||||
this.$refs.itemIntroDetail.style.height = heightCss + 'px';
|
||||
const el = this.$refs[name];
|
||||
const container = this.$refs.itemIntroDetail;
|
||||
if (!el || !container) return;
|
||||
let heightCss = window.getComputedStyle(el).height;
|
||||
heightCss = parseInt(heightCss, 10) + 89;
|
||||
if (Number.isNaN(heightCss)) return;
|
||||
container.style.height = heightCss + 'px';
|
||||
},
|
||||
changePageNum (val) { // 修改评论页码
|
||||
this.commentParams.pageNumber = val;
|
||||
@@ -245,13 +249,18 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
this.$nextTick(() => { // 手动设置详情高度,解决无法撑开问题
|
||||
setTimeout(this.changeHeight('itemIntroGoods'), 2000);
|
||||
setTimeout(() => {
|
||||
this.changeHeight('itemIntroGoods');
|
||||
}, 2000);
|
||||
});
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
this.getList();
|
||||
if (this.skuDetail.grade === null || this.skuDetail.grade === undefined) {
|
||||
this.skuDetail.grade = 100
|
||||
}
|
||||
},
|
||||
beforeUnmount () {
|
||||
window.removeEventListener('scroll', this.handleScroll);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
<li @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li>
|
||||
<li @click="goUserCenter('/home/MsgList')"><span class="nav-item">我的消息</span></li>
|
||||
<li v-if="$route.name !== 'Cart'" style="position:relative;">
|
||||
<el-dropdown placement="bottom-start" trigger="hover">
|
||||
<el-dropdown placement="bottom-start" trigger="hover" @visible-change="handleCartDropdownVisible">
|
||||
<router-link to="/cart" target="_blank">
|
||||
<span class="nav-item" @mouseenter="getCartList">
|
||||
<span class="nav-item">
|
||||
<el-icon :size="18"><ShoppingCart /></el-icon>
|
||||
购物车({{ cartNum < 100 ? cartNum : '99' }})
|
||||
</span>
|
||||
@@ -107,7 +107,10 @@ export default {
|
||||
return {
|
||||
config: require('@/config'),
|
||||
userInfo: {}, // 用户信息
|
||||
shoppingCart: [] // 购物车
|
||||
shoppingCart: [], // 购物车
|
||||
cartLoading: false,
|
||||
cartLoadedAt: 0,
|
||||
cartCacheTime: 5000
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -146,7 +149,7 @@ export default {
|
||||
} else {
|
||||
this.$Modal.confirm({
|
||||
title: '请登录',
|
||||
content: '<p>请登录后执行此操作</p>',
|
||||
content: '请登录后执行此操作',
|
||||
okText: '立即登录',
|
||||
cancelText: '继续浏览',
|
||||
onOk: () => {
|
||||
@@ -173,15 +176,31 @@ export default {
|
||||
this.$router.push('login');
|
||||
}
|
||||
},
|
||||
handleCartDropdownVisible(visible) {
|
||||
if (visible) {
|
||||
this.getCartList();
|
||||
}
|
||||
},
|
||||
getCartList() {
|
||||
// 获取购物车列表
|
||||
if (this.userInfo.username) {
|
||||
cartGoodsAll().then((res) => {
|
||||
this.shoppingCart = res.result.skuList;
|
||||
if (!this.userInfo.username || this.cartLoading) {
|
||||
return;
|
||||
}
|
||||
const now = Date.now();
|
||||
if (this.cartLoadedAt && now - this.cartLoadedAt < this.cartCacheTime) {
|
||||
return;
|
||||
}
|
||||
this.cartLoadedAt = now;
|
||||
this.cartLoading = true;
|
||||
cartGoodsAll().then((res) => {
|
||||
if (res.success) {
|
||||
this.shoppingCart = (res.result && res.result.skuList) || [];
|
||||
this.$store.commit('SET_CARTNUM', this.shoppingCart.length);
|
||||
this.Cookies.setItem('cartNum', this.shoppingCart.length);
|
||||
});
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
this.cartLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -192,28 +211,36 @@ export default {
|
||||
.box {
|
||||
width: 100%;
|
||||
font-size: 12px !important;
|
||||
height: 36px;
|
||||
height: 36px;
|
||||
background: #333;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.nav ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav li {
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
line-height: 36px;
|
||||
float: none;
|
||||
line-height: 1;
|
||||
margin-right: 15px;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav a,
|
||||
@@ -221,9 +248,11 @@ export default {
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
@@ -305,6 +334,8 @@ export default {
|
||||
|
||||
div {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
> span {
|
||||
margin-left: 5px;
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<template>
|
||||
<div class="model-form">
|
||||
<div class="model-content">
|
||||
<template v-for="(element, index) in data.list" :key="element.key || index">
|
||||
<model-form-item
|
||||
v-if="element && element.key"
|
||||
:element="element"
|
||||
:index="index"
|
||||
:data="data"
|
||||
></model-form-item>
|
||||
</template>
|
||||
<model-form-item
|
||||
v-for="(element, index) in renderList"
|
||||
:key="element.key"
|
||||
:element="element"
|
||||
:index="index"
|
||||
:data="data"
|
||||
></model-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -19,12 +18,32 @@ export default {
|
||||
components: {
|
||||
ModelFormItem
|
||||
},
|
||||
props: ['data']
|
||||
props: ['data'],
|
||||
computed: {
|
||||
renderList() {
|
||||
const list = this.data?.list || [];
|
||||
return list.filter(
|
||||
(el) => el && el.key && !this.isBuiltinModule(el.type)
|
||||
);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isBuiltinModule(type) {
|
||||
// 顶部广告、快捷导航由 Index 页单独渲染
|
||||
return type === 'topAdvert' || type === 'navBar';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.model-form {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
.model-content {
|
||||
width: 100%;
|
||||
min-height: 1200px;
|
||||
box-sizing: border-box;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
<div class="model-item" v-if="element && element.key">
|
||||
<!-- 轮播图模块,包括个人信息,快捷导航模块 -->
|
||||
<template v-if="element.type == 'carousel'">
|
||||
<model-carousel
|
||||
:data="element"
|
||||
class="mb_20 width_1200_auto"
|
||||
></model-carousel>
|
||||
<div class="carousel-wrap mb_20">
|
||||
<model-carousel :key="element.key" :data="element"></model-carousel>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="element.type == 'carousel1'">
|
||||
<model-carousel1 :data="element" class="mb_20"></model-carousel1>
|
||||
@@ -20,7 +19,7 @@
|
||||
<template v-if="element.type == 'hotAdvert'">
|
||||
<div class="mb_20 width_1200_auto">
|
||||
<img
|
||||
style="display: block"
|
||||
style="display: block; width: 100%; max-width: 1200px; height: auto"
|
||||
class="hover-pointer"
|
||||
:src="element.options.list[0].img"
|
||||
@click="linkTo(element.options.list[0].url)"
|
||||
@@ -46,33 +45,39 @@
|
||||
</template>
|
||||
<!-- 折扣广告 -->
|
||||
<template v-if="element.type == 'discountAdvert'">
|
||||
<div
|
||||
class="discountAdvert"
|
||||
:style="{
|
||||
backgroundImage:
|
||||
'url(' + require('@/assets/images/decorate.png') + ')',
|
||||
}"
|
||||
>
|
||||
<img
|
||||
@click="linkTo(item.url)"
|
||||
class="hover-pointer"
|
||||
v-for="(item, index) in element.options.classification"
|
||||
:key="index"
|
||||
:src="item.img"
|
||||
width="190"
|
||||
height="210"
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
@click="linkTo(item.url)"
|
||||
class="hover-pointer"
|
||||
v-for="(item, index) in element.options.brandList"
|
||||
:key="'discount' + index"
|
||||
:src="item.img"
|
||||
width="240"
|
||||
height="105"
|
||||
alt=""
|
||||
/>
|
||||
<div class="discountAdvert-wrap width_1200_auto mb_20">
|
||||
<div
|
||||
class="discountAdvert"
|
||||
:style="{
|
||||
backgroundImage:
|
||||
'url(' + require('@/assets/images/decorate.png') + ')',
|
||||
}"
|
||||
>
|
||||
<div>
|
||||
<img
|
||||
@click="linkTo(item.url)"
|
||||
class="hover-pointer"
|
||||
v-for="(item, index) in element.options.classification"
|
||||
:key="index"
|
||||
:src="item.img"
|
||||
width="190"
|
||||
height="210"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<img
|
||||
@click="linkTo(item.url)"
|
||||
class="hover-pointer"
|
||||
v-for="(item, index) in element.options.brandList"
|
||||
:key="'discount' + index"
|
||||
:src="item.img"
|
||||
width="240"
|
||||
height="105"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -183,11 +188,19 @@ export default {
|
||||
.model-item {
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.carousel-wrap {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: visible;
|
||||
}
|
||||
.bannerAd{
|
||||
width: 1183px;
|
||||
width: 100%;
|
||||
height: 166.6px;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/** 热门广告 */
|
||||
.advert-list {
|
||||
@@ -196,6 +209,7 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 3px 10px;
|
||||
box-sizing: border-box;
|
||||
> li {
|
||||
img {
|
||||
cursor: pointer;
|
||||
@@ -210,25 +224,40 @@ export default {
|
||||
}
|
||||
|
||||
/** 折扣广告 */
|
||||
.discountAdvert {
|
||||
width: 1300px;
|
||||
height: 566px;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 20px;
|
||||
background-repeat: no-repeat;
|
||||
.discountAdvert-wrap {
|
||||
position: relative;
|
||||
left: -47px;
|
||||
padding-left: 295px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
img {
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
transition: all 150ms ease-in-out;
|
||||
&:hover {
|
||||
box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.4);
|
||||
transform: translateY(-2px);
|
||||
overflow: hidden;
|
||||
}
|
||||
.discountAdvert {
|
||||
width: 100%;
|
||||
max-width: 1200px;
|
||||
height: 520px;
|
||||
margin: 0 auto;
|
||||
box-sizing: border-box;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 1200px 520px;
|
||||
background-position: center top;
|
||||
position: relative;
|
||||
padding: 10px 0 0 330px;
|
||||
overflow: hidden;
|
||||
> div {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
align-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
img {
|
||||
display: block;
|
||||
flex-shrink: 0;
|
||||
margin-top: 10px;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
transition: all 150ms ease-in-out;
|
||||
&:hover {
|
||||
box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.4);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
<template>
|
||||
<div class="model-carousel">
|
||||
<div class="nav-body clearfix">
|
||||
<!-- 侧边导航占位 -->
|
||||
<div class="nav-side"></div>
|
||||
<div class="nav-body">
|
||||
<!-- 侧边导航占位(与 CateNav 分类栏同宽,勿与 CateNav .nav-side 混用类名) -->
|
||||
<div class="carousel-side-spacer"></div>
|
||||
<div class="nav-content">
|
||||
<!-- 轮播图 -->
|
||||
<!-- autoplay autoplay-speed="10000"-->
|
||||
<el-carousel height="334px" :interval="5000">
|
||||
<el-carousel-item v-for="(item, index) in data.options.list" :key="index">
|
||||
<!-- 轮播图:无数据时不挂载 el-carousel,避免 Element Plus 卸载子项时报错 -->
|
||||
<el-carousel
|
||||
v-if="carouselList.length"
|
||||
:key="carouselRenderKey"
|
||||
height="334px"
|
||||
:interval="5000"
|
||||
>
|
||||
<el-carousel-item
|
||||
v-for="(item, index) in carouselList"
|
||||
:key="carouselItemKey(item, index)"
|
||||
>
|
||||
<div class="swiper-img">
|
||||
<img
|
||||
:src="item.img"
|
||||
@@ -17,6 +24,7 @@
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<div v-else class="swiper-img carousel-placeholder"></div>
|
||||
</div>
|
||||
<div class="nav-right">
|
||||
<div class="person-msg">
|
||||
@@ -84,6 +92,16 @@ import storage from "@/plugins/storage";
|
||||
export default {
|
||||
name: "modelCarousel",
|
||||
props: ["data"],
|
||||
computed: {
|
||||
carouselList() {
|
||||
return this.data?.options?.list || [];
|
||||
},
|
||||
carouselRenderKey() {
|
||||
const moduleKey = this.data?.key || "carousel";
|
||||
const imgs = this.carouselList.map((item) => item?.img || "").join("|");
|
||||
return `${moduleKey}-${this.carouselList.length}-${imgs}`;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config: require("@/config"),
|
||||
@@ -154,6 +172,9 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
carouselItemKey(item, index) {
|
||||
return item?.img || item?.url || `slide-${index}`;
|
||||
},
|
||||
// 快捷跳转中心
|
||||
entryControl(val) {
|
||||
console.log("val",val)
|
||||
@@ -182,10 +203,15 @@ export default {
|
||||
|
||||
.swiper-img {
|
||||
overflow: hidden;
|
||||
width: 637px;
|
||||
width: 100%;
|
||||
height: 329.9px;
|
||||
}
|
||||
|
||||
.carousel-placeholder {
|
||||
border-radius: 10px;
|
||||
background: #ececec;
|
||||
}
|
||||
|
||||
.icon-list {
|
||||
width: 216px
|
||||
}
|
||||
@@ -266,20 +292,18 @@ export default {
|
||||
|
||||
.model-carousel {
|
||||
width: 1200px;
|
||||
max-width: 100%;
|
||||
height: 340px;
|
||||
overflow: hidden;
|
||||
margin: 0 auto;
|
||||
overflow: visible;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.hover-pointer {
|
||||
//display: block;
|
||||
//width: 100%;
|
||||
//height: 100%;
|
||||
width: 637px;
|
||||
width: 100%;
|
||||
height: 329.9px;
|
||||
object-fit: cover;
|
||||
border-radius: 10px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.welcome {
|
||||
@@ -334,44 +358,63 @@ export default {
|
||||
|
||||
}
|
||||
|
||||
/* 导航主体 */
|
||||
/* 导航主体:固定列宽与 CateNav 完全一致(263.2 + 10 + 637 + 10 + 263.2 = 1183.4px) */
|
||||
.nav-body {
|
||||
width: 1200px;
|
||||
max-width: 100%;
|
||||
height: 340px;
|
||||
margin: 0px auto;
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
grid-template-columns: 263.2px 637px 263.2px;
|
||||
column-gap: 10px;
|
||||
align-items: start;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.nav-side {
|
||||
height: 334px;
|
||||
.carousel-side-spacer {
|
||||
grid-column: 1;
|
||||
width: 263.2px;
|
||||
height: 334px;
|
||||
flex-shrink: 0;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
float: left;
|
||||
padding: 0px;
|
||||
color: #fff;
|
||||
// background-color: #6e6568;
|
||||
|
||||
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
/*导航内容*/
|
||||
.nav-content {
|
||||
grid-column: 2;
|
||||
width: 637px;
|
||||
margin-left: 10.8px;
|
||||
|
||||
min-width: 637px;
|
||||
max-width: 637px;
|
||||
margin-top: 10px;
|
||||
height: 333.9px;
|
||||
|
||||
float: left;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
:deep(.el-carousel) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:deep(.el-carousel__container) {
|
||||
height: 334px;
|
||||
}
|
||||
|
||||
:deep(.el-carousel__item) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-right {
|
||||
float: left;
|
||||
margin-top: 10px;
|
||||
grid-column: 3;
|
||||
width: 263.2px;
|
||||
margin-left: 10px;
|
||||
min-width: 263.2px;
|
||||
max-width: 263.2px;
|
||||
margin-top: 10px;
|
||||
|
||||
border-radius: 10px;
|
||||
background: #FFFFFF;
|
||||
|
||||
@@ -88,82 +88,171 @@ export default {
|
||||
.new-goods {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: stretch;
|
||||
> div {
|
||||
width: 393px;
|
||||
height: 440px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left > .content {
|
||||
> div:nth-child(1) {
|
||||
height: 240px;
|
||||
flex-direction: column;
|
||||
border: 1px solid #eee;
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
justify-content: space-between;
|
||||
img {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
}
|
||||
.describe {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
> div:nth-child(2) {
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
> div:nth-child(3),
|
||||
> div:nth-child(4) {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
|
||||
.middle > .content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-template-rows: repeat(3, 1fr);
|
||||
flex-direction: unset;
|
||||
overflow: hidden;
|
||||
> div {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
padding: 6px 4px 4px 6px;
|
||||
border-style: solid;
|
||||
border-color: #eee;
|
||||
border-width: 0;
|
||||
border-bottom-width: 1px;
|
||||
border-right-width: 1px;
|
||||
img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin-top: 2px;
|
||||
flex-shrink: 0;
|
||||
object-fit: cover;
|
||||
}
|
||||
> div {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
p {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.describe {
|
||||
margin-top: 4px;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
> div:nth-child(1) {
|
||||
grid-row: span 2;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 8px 6px;
|
||||
img {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
> div {
|
||||
flex: unset;
|
||||
width: 100%;
|
||||
p {
|
||||
white-space: normal;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.describe {
|
||||
margin-top: 6px;
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
> div:nth-child(1),
|
||||
> div:nth-child(2),
|
||||
> div:nth-child(3) {
|
||||
> div:nth-child(3),
|
||||
> div:nth-child(5) {
|
||||
border-right-width: 0;
|
||||
}
|
||||
> div:nth-child(4),
|
||||
> div:nth-child(5) {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.middle > .content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-template-rows: repeat(3, 1fr);
|
||||
flex-direction: unset;
|
||||
> div {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-style: solid;
|
||||
border-color: #eee;
|
||||
border-width: 0;
|
||||
border-bottom-width: 1px;
|
||||
border-right-width: 1px;
|
||||
}
|
||||
> div:nth-child(6),
|
||||
> div:nth-child(3) {
|
||||
> div:nth-child(2n) {
|
||||
border-right-width: 0;
|
||||
}
|
||||
> div:nth-child(n + 5) {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.right > .content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-rows: repeat(2, 1fr);
|
||||
flex-direction: unset;
|
||||
flex-wrap: unset;
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
> div {
|
||||
position: relative;
|
||||
width: 120px;
|
||||
padding: 5px 10px 0 10px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
box-sizing: border-box;
|
||||
padding: 4px 4px 2px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
flex-shrink: 0;
|
||||
display: block;
|
||||
object-fit: cover;
|
||||
}
|
||||
border-bottom: 1px solid #eee;
|
||||
border-right: 1px solid #eee;
|
||||
:nth-child(2) {
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 32px;
|
||||
line-height: 16px;
|
||||
margin-top: 4px;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-align: center;
|
||||
}
|
||||
:nth-child(3) {
|
||||
color: $theme_color;
|
||||
margin-top: 5px;
|
||||
margin-top: 2px;
|
||||
line-height: 1.2;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.jiaobiao {
|
||||
position: absolute;
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
top: 10px;
|
||||
right: 16px;
|
||||
top: 6px;
|
||||
right: 6px;
|
||||
background: url(../../../assets/images/festival_icon.png);
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
@@ -181,10 +270,11 @@ export default {
|
||||
background-position: -60px -30px;
|
||||
}
|
||||
}
|
||||
> div:nth-child(4),
|
||||
> div:nth-child(5),
|
||||
> div:nth-child(6) {
|
||||
border: none;
|
||||
> div:nth-child(3n) {
|
||||
border-right: none;
|
||||
}
|
||||
> div:nth-child(n + 4) {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,6 +299,8 @@ export default {
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
height: 370px;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
.con-item {
|
||||
width: 185px;
|
||||
@@ -222,6 +314,42 @@ export default {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
.middle > .content .con-item {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
padding: 6px 4px 4px 6px;
|
||||
img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin-top: 2px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
> div {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
p {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.describe {
|
||||
margin-top: 4px;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.left > .content .con-item {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.describe {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
:key="index"
|
||||
@click="linkTo(item.url)" class="hover-pointer"
|
||||
>
|
||||
<div class="right-item" :style="{'border': index===2 || index===3 ?'none': ''}">
|
||||
<div class="right-item">
|
||||
<div>
|
||||
<span :style="{ background: msgRight.bgColor }">{{item.name}}</span>
|
||||
<span>{{ item.describe }}</span>
|
||||
@@ -135,65 +135,85 @@ export default {
|
||||
|
||||
.recommend-right {
|
||||
width: 595px;
|
||||
height: 360px;
|
||||
|
||||
.head-recommend {
|
||||
background: #a25684;
|
||||
}
|
||||
.content-right {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-template-rows: repeat(2, 1fr);
|
||||
height: 360px;
|
||||
padding-top: 10px;
|
||||
box-sizing: border-box;
|
||||
|
||||
> div {
|
||||
width: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
height: 180px;
|
||||
padding-top: 10px;
|
||||
padding: 0;
|
||||
border-right: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-child(2n) {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
&:nth-child(n + 3) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.right-item {
|
||||
border-bottom: 1px solid #eee;
|
||||
border-bottom: none;
|
||||
display: flex;
|
||||
margin-top: 30px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
height: 150px;
|
||||
padding: 0 10px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 10px 15px;
|
||||
font-size: 12px;
|
||||
>div:nth-child(1) {
|
||||
box-sizing: border-box;
|
||||
|
||||
margin-top: 30px;
|
||||
span:nth-child(1){
|
||||
color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 0 5px;
|
||||
background-color: #a25684;
|
||||
display: block;
|
||||
> div:nth-child(1) {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-top: 0;
|
||||
text-align: left;
|
||||
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0 10px 10px 0;
|
||||
span:nth-child(1) {
|
||||
color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 0 5px;
|
||||
background-color: #a25684;
|
||||
display: block;
|
||||
max-width: 120px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 100;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
img{
|
||||
max-height: 100px;
|
||||
max-width: 100px;
|
||||
margin: 0;
|
||||
|
||||
img {
|
||||
max-height: 100px;
|
||||
max-width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
> div:nth-child(n + 1) {
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="cate-nav width_1200_auto" :class="{'fixed-show':useClass == 'fixed-show'}">
|
||||
<div class="cate-nav" :class="{'fixed-show':useClass == 'fixed-show'}">
|
||||
<div class="nav-con" :class="{'background-white':useClass == 'background-white'}">
|
||||
<div
|
||||
class="all-categories hover-pointer"
|
||||
@@ -149,9 +149,8 @@ export default {
|
||||
// 导航列表
|
||||
if (storage.getItem("navList")) {
|
||||
return JSON.parse(storage.getItem("navList"));
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
return { list: [] };
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -261,21 +260,27 @@ export default {
|
||||
}
|
||||
.cate-nav {
|
||||
position: relative;
|
||||
margin: 14px auto 0 auto;
|
||||
z-index: 3;
|
||||
width: 100%;
|
||||
margin: 14px 0 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/** 商品分类 */
|
||||
.nav-con {
|
||||
height: 46px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
.all-categories {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 46px;
|
||||
border-top-left-radius: 10px;
|
||||
border-top-right-radius: 10px;
|
||||
padding-left: 37.4px;
|
||||
background: #FFFFFF;
|
||||
width: 263.2px;
|
||||
padding-top: 15.4px;
|
||||
line-height: 20px;
|
||||
border-bottom: none;
|
||||
font-size: 16.8px;
|
||||
font-weight: normal;
|
||||
@@ -283,15 +288,16 @@ export default {
|
||||
letter-spacing: 0px;
|
||||
}
|
||||
.nav-item {
|
||||
width: 914px;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 46px;
|
||||
border-radius: 10px;
|
||||
background: #FFFFFF;
|
||||
margin-left: 10px;
|
||||
margin: 0 0 0 10px;
|
||||
padding: 0;
|
||||
line-height: 46px;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
// background-color: #eee;
|
||||
display: flex;
|
||||
li {
|
||||
float: left;
|
||||
@@ -306,12 +312,12 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
// 分类列表
|
||||
// 分类列表(浮层叠在轮播左列之上)
|
||||
.cate-list {
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
|
||||
z-index: 1000;
|
||||
left: 0;
|
||||
top: 46px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.nav-side {
|
||||
|
||||
@@ -96,6 +96,9 @@ export default {
|
||||
this.init()
|
||||
});
|
||||
},
|
||||
close () {
|
||||
this.show = false;
|
||||
},
|
||||
init () { // 初始化数据
|
||||
this.flag = false;
|
||||
this.downX = 0;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { createApp } from "vue";
|
||||
import "core-js/stable";
|
||||
import "./assets/styles/global-layout.scss";
|
||||
import "./assets/styles/theme.less";
|
||||
import App from "./App.vue";
|
||||
import { router } from "./router/index";
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
</router-link>
|
||||
<p>领券中心</p>
|
||||
<el-input
|
||||
v-model="keyword"
|
||||
style="width: 400px"
|
||||
@keyup.enter="search"
|
||||
placeholder="搜索优惠券"
|
||||
@@ -17,8 +18,8 @@
|
||||
|
||||
<div class="fontsize_18 recommend">推荐好券</div>
|
||||
|
||||
<empty v-if="list.length === 0" />
|
||||
<ul class="coupon-list" v-else>
|
||||
<empty v-if="!loading && list.length === 0" />
|
||||
<ul class="coupon-list" v-else-if="list.length > 0">
|
||||
<li v-for="(item, index) in list" class="coupon-item" :key="index">
|
||||
<div class="c-left">
|
||||
<div>
|
||||
@@ -29,7 +30,7 @@
|
||||
<span
|
||||
v-if="item.couponType === 'DISCOUNT'"
|
||||
class="fontsize_12 global_color"
|
||||
><span class="price">{{ item.couponDiscount }}</span>折</span>
|
||||
><span class="price">{{ item.couponDiscount || item.discount }}</span>折</span>
|
||||
<span class="describe"
|
||||
>满{{ item.consumeThreshold }}元可用</span>
|
||||
</div>
|
||||
@@ -60,6 +61,8 @@ export default {
|
||||
return {
|
||||
list: [], // 优惠券列表
|
||||
total: 0, // 优惠券总数
|
||||
loading: false,
|
||||
keyword: "",
|
||||
params: {
|
||||
// 请求参数
|
||||
getType: "FREE",
|
||||
@@ -70,25 +73,31 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 搜索优惠券
|
||||
search(item) {
|
||||
this.params.couponName = item;
|
||||
search() {
|
||||
this.params.couponName = this.keyword.trim();
|
||||
this.params.pageNumber = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 获取优惠券列表
|
||||
getList() {
|
||||
this.$Spin.show();
|
||||
if (this.loading) return;
|
||||
this.loading = true;
|
||||
couponList(this.params)
|
||||
.then((res) => {
|
||||
this.$Spin.hide();
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.list = res.result.records;
|
||||
this.total = res.result.total;
|
||||
if (res && res.success && res.result) {
|
||||
this.list = res.result.records || [];
|
||||
this.total = res.result.total || 0;
|
||||
} else {
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.$Spin.hide();
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 分页 改变页码
|
||||
@@ -104,12 +113,12 @@ export default {
|
||||
},
|
||||
// 领取优惠券
|
||||
receive(item) {
|
||||
receiveCoupon(item.id).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(item);
|
||||
receiveCoupon(item.id)
|
||||
.then((res) => {
|
||||
if (!res || !res.success) return;
|
||||
this.$Modal.confirm({
|
||||
title: "领取优惠券",
|
||||
content: "<p>优惠券领取成功,可到我的优惠券页面查看</p>",
|
||||
content: "优惠券领取成功,可到我的优惠券页面查看",
|
||||
okText: "我的优惠券",
|
||||
cancelText: "立即使用",
|
||||
closable: true,
|
||||
@@ -123,8 +132,8 @@ export default {
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 优惠券可用范围
|
||||
useScope(type, storeName) {
|
||||
@@ -178,8 +187,54 @@ export default {
|
||||
text-align: center;
|
||||
}
|
||||
.coupon-item {
|
||||
overflow: hidden;
|
||||
$claim-width: 55px;
|
||||
|
||||
.c-left {
|
||||
width: calc(100% - #{$claim-width});
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
b {
|
||||
background: url("../assets/images/small-circle.png") top left repeat-y;
|
||||
right: $claim-width;
|
||||
width: 0;
|
||||
background: none;
|
||||
border-right: 1px dashed #e0e0e0;
|
||||
}
|
||||
|
||||
.c-right {
|
||||
width: $claim-width;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: mixed;
|
||||
letter-spacing: 4px;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
user-select: none;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
i.circle-top,
|
||||
i.circle-bottom {
|
||||
right: calc(#{$claim-width} - 9px);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
i.circle-top {
|
||||
top: -9px;
|
||||
}
|
||||
|
||||
i.circle-bottom {
|
||||
bottom: -9px;
|
||||
}
|
||||
}
|
||||
.pageration {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="forget-password" @click='$refs.verify.show = false'>
|
||||
<div class="forget-password" @click="hideVerify">
|
||||
<div style="height:50px;"></div>
|
||||
<!-- 顶部logo -->
|
||||
<div class="logo-box">
|
||||
@@ -151,6 +151,9 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
hideVerify() {
|
||||
this.$refs.verify?.close?.();
|
||||
},
|
||||
// 提交短信验证码,修改密码
|
||||
next () {
|
||||
this.$refs.formFirst.validate((valid) => {
|
||||
@@ -230,12 +233,12 @@ export default {
|
||||
},
|
||||
verifyChange (con) { // 验证通过
|
||||
if (!con.status) return;
|
||||
this.$refs.verify.show = false;
|
||||
this.hideVerify();
|
||||
this.verifyStatus = true;
|
||||
},
|
||||
verifyBtnClick () {
|
||||
if (!this.verifyStatus) {
|
||||
this.$refs.verify.init();
|
||||
this.$refs.verify?.init();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -202,19 +202,26 @@ export default {
|
||||
.shop-item-path {
|
||||
height: 38px;
|
||||
@include background_color($light_background_color);
|
||||
line-height: 38px;
|
||||
color: #2c2c2c;
|
||||
}
|
||||
|
||||
.shop-nav-container {
|
||||
width: 1200px;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
:deep(.el-breadcrumb) {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.store-collect {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #999;
|
||||
|
||||
span {
|
||||
|
||||
@@ -19,16 +19,18 @@
|
||||
:key="index"
|
||||
@click="orderBy(item.en, index)"
|
||||
>
|
||||
<span :class="{ 'goods-list-tool-active': index === sortIndex }"
|
||||
>{{ item.title }}<el-icon><ArrowDown /></el-icon></span>
|
||||
<span :class="{ 'goods-list-tool-active': index === sortIndex }">
|
||||
{{ item.title }}
|
||||
<el-icon><ArrowDown /></el-icon>
|
||||
</span>
|
||||
</li>
|
||||
<li @click="orderBy('price', 5, 'up')" class="price-sort">
|
||||
<span :class="{ 'goods-list-tool-active': 5 === sortIndex }">
|
||||
价格
|
||||
<div>
|
||||
<span class="price-arrows">
|
||||
<el-icon :class="{ 'price-color': sortPriceIndex == 'desc' }"><ArrowUp /></el-icon>
|
||||
<el-icon :class="{ 'price-color': sortPriceIndex == 'asc' }"><ArrowDown /></el-icon>
|
||||
</div>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -44,7 +46,7 @@
|
||||
@click="goGoodsDetail(item.id, item.goodsId)"
|
||||
>
|
||||
<div class="goods-show-img">
|
||||
<img width="220" height="220" :src="item.thumbnail" />
|
||||
<img :src="item.thumbnail" />
|
||||
</div>
|
||||
<div class="goods-show-price">
|
||||
<span>
|
||||
@@ -72,22 +74,21 @@
|
||||
|
||||
<div class="goods-show-right">
|
||||
<el-tag
|
||||
class="goods-show-tag"
|
||||
class="goods-show-tag goods-show-tag-self"
|
||||
color="red"
|
||||
effect="dark"
|
||||
v-if="item.selfOperated"
|
||||
>
|
||||
自营
|
||||
</el-tag>
|
||||
<el-tag
|
||||
class="goods-show-tag"
|
||||
color="blue"
|
||||
class="goods-show-tag goods-show-tag-physical"
|
||||
v-if="item.goodsType === 'VIRTUAL_GOODS'"
|
||||
>
|
||||
虚拟
|
||||
</el-tag>
|
||||
<el-tag
|
||||
class="goods-show-tag"
|
||||
color="blue"
|
||||
class="goods-show-tag goods-show-tag-physical"
|
||||
v-else-if="item.goodsType === 'PHYSICAL_GOODS'"
|
||||
>
|
||||
实物
|
||||
@@ -103,7 +104,8 @@
|
||||
@size-change="changePageSize"
|
||||
:total="total"
|
||||
:page-size="params.pageSize"
|
||||
layout="total, sizes, prev, pager, next"></el-pagination>
|
||||
layout="total, prev, pager, next, sizes"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<el-skeleton size="large" fix v-if="loading"></el-skeleton>
|
||||
@@ -244,6 +246,8 @@ export default {
|
||||
},
|
||||
components: {
|
||||
GoodsClassNav,
|
||||
ArrowDown,
|
||||
ArrowUp,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -274,6 +278,24 @@ export default {
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
.goods-show-tag-self {
|
||||
color: #fff;
|
||||
|
||||
:deep(.el-tag__content) {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-show-tag-physical {
|
||||
background-color: #e6f4ff;
|
||||
border-color: #b3d8ff;
|
||||
color: #409eff;
|
||||
|
||||
:deep(.el-tag__content) {
|
||||
color: #409eff;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-show-seller {
|
||||
// padding:3px 0;
|
||||
vertical-align: middle;
|
||||
@@ -295,6 +317,8 @@ export default {
|
||||
.goods-show-right {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
@@ -314,38 +338,40 @@ export default {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
.goods-list-tool ul {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
padding-left: 15px;
|
||||
font-size: 12px;
|
||||
margin-top: 10px;
|
||||
&::after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: left;
|
||||
}
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
|
||||
.price-sort {
|
||||
span {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 50px;
|
||||
height: 22px;
|
||||
position: relative;
|
||||
line-height: 15px;
|
||||
top: -2px;
|
||||
left: 0;
|
||||
}
|
||||
span > div {
|
||||
display: inline-block;
|
||||
.price-arrows {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
flex-shrink: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
line-height: 0;
|
||||
|
||||
.el-icon {
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
&:nth-child(1) {
|
||||
top: 1px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
top: 7px;
|
||||
font-size: 8px;
|
||||
line-height: 1;
|
||||
height: 6px;
|
||||
|
||||
:deep(svg) {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.price-color {
|
||||
color: #b3b3b3;
|
||||
}
|
||||
@@ -354,28 +380,37 @@ export default {
|
||||
}
|
||||
.goods-list-tool li {
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
}
|
||||
.goods-list-tool span {
|
||||
.goods-list-tool li > span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
padding: 3px 5px;
|
||||
border: 1px solid #ccc;
|
||||
margin-left: -1px;
|
||||
background-color: #fff;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.goods-list-tool span:hover {
|
||||
.goods-list-tool li > span:hover {
|
||||
border-color: $theme_color;
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
z-index: 1;
|
||||
}
|
||||
.goods-list-tool .el-icon {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
.goods-list-tool li > span .el-icon {
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
}
|
||||
.goods-list-tool-active {
|
||||
color: #fff;
|
||||
border-left: 1px solid #ccc;
|
||||
background-color: $theme_color !important;
|
||||
|
||||
.price-color {
|
||||
color: rgba(255, 255, 255, 0.65) !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------商品栏结束------------------- */
|
||||
|
||||
@@ -29,10 +29,11 @@
|
||||
<BaseHeader></BaseHeader>
|
||||
<!-- 搜索框、logo -->
|
||||
<Search></Search>
|
||||
<!-- 商品分类 -->
|
||||
<cateNav :showAlways="true" v-if="showNav" :large="carouselLarge" :opacity="carouselOpacity"></cateNav>
|
||||
<!-- 楼层装修部分 -->
|
||||
<model-form ref="modelForm" :data="modelForm"></model-form>
|
||||
<div class="index-main">
|
||||
<!-- 商品分类 + 楼层装修(同一宽度容器,保证与分类栏左缘对齐) -->
|
||||
<cateNav :showAlways="true" v-if="showNav" :large="carouselLarge" :opacity="carouselOpacity"></cateNav>
|
||||
<model-form ref="modelForm" :data="modelForm"></model-form>
|
||||
</div>
|
||||
<!-- 底部栏 -->
|
||||
<BaseFooter></BaseFooter>
|
||||
<!-- 侧边栏 -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="login" @keyup.enter="handleSubmit('formInline')">
|
||||
<!-- 顶部logo -->
|
||||
<div class="top-content" @click='$refs.verify.show = false'>
|
||||
<div class="top-content" @click="hideVerify">
|
||||
<div class="logo-box">
|
||||
<img :src="$store.state.logoImg" @click="$router.push('/')" />
|
||||
<div>欢迎登录</div>
|
||||
@@ -12,13 +12,13 @@
|
||||
<!-- 轮播 -->
|
||||
<el-carousel :interval="5000" arrow="never" class="login-carousel" height="550px">
|
||||
<el-carousel-item>
|
||||
<div class="demo-carousel" @click='$refs.verify.show = false'>
|
||||
<div class="demo-carousel" @click="hideVerify">
|
||||
<img src="https://lili-system.oss-cn-beijing.aliyuncs.com/background.jpg" />
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<!-- 登录模块 -->
|
||||
<div class="form-box" @click='$refs.verify.show = false'>
|
||||
<div class="form-box" @click="hideVerify">
|
||||
<div class="account-number">
|
||||
<div class="tab-switch">
|
||||
<span>{{ type ? '账号登录' : '验证码登录' }}</span>
|
||||
@@ -70,7 +70,7 @@
|
||||
<div v-show="!scannerCodeLoginFLag">
|
||||
<!-- 账号密码登录 -->
|
||||
<el-form ref="formInline" :model="formData" :rules="ruleInline" v-show="type === true"
|
||||
@click.self='$refs.verify.show = false'>
|
||||
@click.self="hideVerify">
|
||||
<el-form-item prop="username">
|
||||
<el-input type="text" v-model="formData.username" clearable placeholder="用户名">
|
||||
<template #prepend><el-icon><User /></el-icon></template>
|
||||
@@ -87,7 +87,7 @@
|
||||
</el-form>
|
||||
<!-- 验证码登录 -->
|
||||
<el-form ref="formSms" :model="formSms" :rules="ruleInline" v-show="type === false"
|
||||
@click.self='$refs.verify.show = false'>
|
||||
@click.self="hideVerify">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input type="text" v-model="formSms.mobile" clearable placeholder="手机号">
|
||||
<template #prepend><el-icon><Lock /></el-icon></template>
|
||||
@@ -126,8 +126,8 @@
|
||||
</svg>
|
||||
</div>
|
||||
<div class="register">
|
||||
<span style="color:red" @click="$router.push('signUp')">还没有账号?点击立即注册</span>
|
||||
<span @click="$router.push('forgetPassword')">忘记密码</span>
|
||||
<span style="color:red" @click.stop="$router.push('signUp')">还没有账号?点击立即注册</span>
|
||||
<span @click.stop="$router.push('forgetPassword')">忘记密码</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -224,17 +224,20 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hideVerify() {
|
||||
this.$refs.verify?.close?.();
|
||||
},
|
||||
|
||||
// 登录
|
||||
handleSubmit(name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.type) {
|
||||
this.$refs.verify.init();
|
||||
this.$refs.verify?.init();
|
||||
} else {
|
||||
let data = JSON.parse(JSON.stringify(this.formSms));
|
||||
apiLogin.smsLogin(data).then((res) => {
|
||||
this.$refs.verify.show = false;
|
||||
this.hideVerify();
|
||||
if (res.success) {
|
||||
this.$Message.success("登录成功");
|
||||
storage.setItem("accessToken", res.result.accessToken);
|
||||
@@ -306,7 +309,7 @@ export default {
|
||||
// 账号密码登录
|
||||
let data = JSON.parse(JSON.stringify(this.formData));
|
||||
data.password = md5(data.password);
|
||||
this.$refs.verify.show = false;
|
||||
this.hideVerify();
|
||||
this.$Spin.show();
|
||||
apiLogin
|
||||
.login(data)
|
||||
@@ -323,13 +326,13 @@ export default {
|
||||
});
|
||||
} else {
|
||||
this.verifyStatus = true;
|
||||
this.$refs.verify.show = false;
|
||||
this.hideVerify();
|
||||
}
|
||||
},
|
||||
// 开启滑块验证
|
||||
verifyBtnClick() {
|
||||
if (!this.verifyStatus) {
|
||||
this.$refs.verify.init();
|
||||
this.$refs.verify?.init();
|
||||
}
|
||||
},
|
||||
handleWebLogin(type) {
|
||||
@@ -448,7 +451,7 @@ export default {
|
||||
this.$refs.formSms.resetFields();
|
||||
}
|
||||
this.verifyStatus = false;
|
||||
this.$refs.verify.show = false;
|
||||
this.hideVerify();
|
||||
clearInterval(this.interval);
|
||||
this.codeMsg = "发送验证码";
|
||||
this.time = 60;
|
||||
@@ -614,11 +617,12 @@ export default {
|
||||
|
||||
.register {
|
||||
display: flex;
|
||||
|
||||
margin-top: -10px;
|
||||
font-size: 12px;
|
||||
|
||||
span {
|
||||
margin-left: 10px;
|
||||
font-size: 12px;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
>
|
||||
|
||||
<div class="goods-show-img">
|
||||
<img :src="item.small" height="220" width="220" alt=""/>
|
||||
<img :src="item.small" alt=""/>
|
||||
</div>
|
||||
<div class="goods-show-price">
|
||||
<span>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="sign-up" @click='$refs.verify.show = false'>
|
||||
<div class="sign-up" @click="hideVerify">
|
||||
<div style="height:50px;"></div>
|
||||
<div class="logo-box">
|
||||
<img
|
||||
@@ -75,7 +75,7 @@
|
||||
:verifyType="verifyType"
|
||||
@change="verifyChange"
|
||||
></Verify>
|
||||
<div class="login-btn">已有账号?<a @click="$router.push('login')">立即登录</a></div>
|
||||
<div class="login-btn">已有账号?<a @click.stop="$router.push('login')">立即登录</a></div>
|
||||
</div>
|
||||
<div class="foot">
|
||||
<div type="flex" justify="space-around" class="help">
|
||||
@@ -139,22 +139,26 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
hideVerify() {
|
||||
this.$refs.verify?.close?.();
|
||||
},
|
||||
// 注册
|
||||
handleRegist () {
|
||||
this.$refs.formRegist.validate((valid) => {
|
||||
if (valid) {
|
||||
let data = JSON.parse(JSON.stringify(this.formRegist));
|
||||
data.password = md5(data.password);
|
||||
apiLogin.regist(data).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('注册成功!');
|
||||
this.$router.push('login');
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
}
|
||||
});
|
||||
} else {}
|
||||
});
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
const data = JSON.parse(JSON.stringify(this.formRegist));
|
||||
data.password = md5(data.password);
|
||||
apiLogin.regist(data).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('注册成功!');
|
||||
this.$router.push('login');
|
||||
} else {
|
||||
this.$Message.warning(res.message || '注册失败');
|
||||
}
|
||||
}).catch(() => {});
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 发送短信验证码
|
||||
sendCode () {
|
||||
@@ -187,21 +191,21 @@ export default {
|
||||
}
|
||||
}, 1000);
|
||||
} else {
|
||||
this.$Message.warning(res.message);
|
||||
this.$Message.warning(res.message || '验证码发送失败');
|
||||
}
|
||||
});
|
||||
}).catch(() => {});
|
||||
}
|
||||
},
|
||||
// 图片验证码成功回调
|
||||
verifyChange (con) {
|
||||
if (!con.status) return;
|
||||
this.$refs.verify.show = false;
|
||||
this.hideVerify();
|
||||
this.verifyStatus = true;
|
||||
},
|
||||
// 打开图片验证码
|
||||
verifyBtnClick () {
|
||||
if (!this.verifyStatus) {
|
||||
this.$refs.verify.init();
|
||||
this.$refs.verify?.init();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -143,8 +143,35 @@ export default {
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
.order-row,
|
||||
.order-item-view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
> [span] {
|
||||
box-sizing: border-box;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
> [span='12'] {
|
||||
flex: 0 0 50%;
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
> [span='4'] {
|
||||
flex: 0 0 16.666667%;
|
||||
max-width: 16.666667%;
|
||||
}
|
||||
|
||||
> [span='6'] {
|
||||
flex: 0 0 25%;
|
||||
max-width: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
.order-item-view {
|
||||
padding: 10px 20px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.order-item {
|
||||
text-align: center;
|
||||
|
||||
@@ -470,29 +470,36 @@ export default {
|
||||
},
|
||||
distribution() {
|
||||
// 获取分销商信息
|
||||
distribution().then((res) => {
|
||||
if (res.result) {
|
||||
this.result = res.result;
|
||||
let type = res.result.distributionStatus;
|
||||
if (type === "PASS") {
|
||||
this.status = 2;
|
||||
this.getGoodsData();
|
||||
} else if ( type === "REFUSE") {
|
||||
distribution()
|
||||
.then((res) => {
|
||||
if (res?.result) {
|
||||
this.result = res.result;
|
||||
const type = res.result.distributionStatus;
|
||||
if (type === "PASS") {
|
||||
this.status = 2;
|
||||
this.getGoodsData();
|
||||
} else if (type === "REFUSE") {
|
||||
this.status = 0;
|
||||
} else if (type === "RETREAT") {
|
||||
this.status = 4;
|
||||
} else if (type === "APPEAL") {
|
||||
this.status = 5;
|
||||
} else {
|
||||
this.status = 1;
|
||||
}
|
||||
} else if (res?.code === 22000) {
|
||||
// 分销功能未开启
|
||||
this.status = 3;
|
||||
} else {
|
||||
// 没有资格申请,显示申请表单
|
||||
this.status = 0;
|
||||
} else if (type === "RETREAT") {
|
||||
this.status = 4;
|
||||
}else if (type === "APPEAL") {
|
||||
this.status = 5;
|
||||
}else {
|
||||
this.status = 1;
|
||||
}
|
||||
} else if (!res.data.success && res.data.code === 22000) {
|
||||
this.status = 3;
|
||||
} else {
|
||||
// 没有资格申请 先去实名认证
|
||||
this.status = 0;
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
if (err?.code === 22000) {
|
||||
this.status = 3;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -10,12 +10,10 @@
|
||||
<!-- 物流评分、服务评分 -->
|
||||
<div class="delivery-rate">
|
||||
<div class="fontsize_16">物流服务评价:</div>
|
||||
<div class="color999">
|
||||
<span>物流评价:<el-rate disabled :value="Number(orderGoods.deliveryScore)" /></span>
|
||||
<span>服务评价:<el-rate disabled :value="Number(orderGoods.serviceScore)" /></span>
|
||||
<span
|
||||
>服务评价:<el-rate disabled :value="Number(orderGoods.descriptionScore)"
|
||||
/></span>
|
||||
<div class="color999 delivery-rate-items">
|
||||
<span>物流评价:<el-rate disabled :model-value="Number(orderGoods.deliveryScore) || 0" /></span>
|
||||
<span>服务评价:<el-rate disabled :model-value="Number(orderGoods.serviceScore) || 0" /></span>
|
||||
<span>描述评价:<el-rate disabled :model-value="Number(orderGoods.descriptionScore) || 0" /></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 添加订单评价 左侧商品详情 右侧评价框 -->
|
||||
@@ -133,13 +131,29 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
height: 50px;
|
||||
min-height: 50px;
|
||||
border-bottom: 1px solid #eee;
|
||||
> div:nth-child(1) {
|
||||
width: 120px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.delivery-rate-items {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.delivery-rate-items :deep(.el-rate) {
|
||||
--el-rate-fill-color: #ffb400;
|
||||
--el-rate-disabled-fill-color: #ffb400;
|
||||
}
|
||||
|
||||
:deep(.el-rate__icon.is-active) {
|
||||
color: #ffb400;
|
||||
}
|
||||
.goods-eval li {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
@@ -45,17 +45,27 @@
|
||||
<div>
|
||||
<span @click="shopPage(order.shopId)">{{ order.storeName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div class="order-actions">
|
||||
<!-- 订单基础操作 -->
|
||||
<el-button @click="goDetail(order.sn)" type="info" size="small">售后详情</el-button>
|
||||
<el-button @click="openModal(order)"
|
||||
v-if="order.serviceStatus == 'PASS' &&
|
||||
order.serviceType != 'RETURN_MONEY'"
|
||||
type="warning" size="small">提交物流
|
||||
</el-button>
|
||||
<el-button @click="cancel(order.sn)" type="danger" v-if="order.afterSaleAllowOperationVO.cancel" size="small">
|
||||
取消售后
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="goDetail(order.sn)"
|
||||
type="warning"
|
||||
size="small"
|
||||
class="after-sale-action-btn"
|
||||
>售后详情</el-button>
|
||||
<el-button
|
||||
@click="openModal(order)"
|
||||
v-if="order.serviceStatus == 'PASS' && order.serviceType != 'RETURN_MONEY'"
|
||||
size="small"
|
||||
class="after-sale-action-btn submit-logistics-btn"
|
||||
>提交物流</el-button>
|
||||
<el-button
|
||||
@click="cancel(order.sn)"
|
||||
type="danger"
|
||||
v-if="order.afterSaleAllowOperationVO.cancel"
|
||||
size="small"
|
||||
class="after-sale-action-btn"
|
||||
>取消售后</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -96,8 +106,14 @@
|
||||
<el-input v-model="form.logisticsNo" placeholder="请填写物流单号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="发货时间" prop="mDeliverTime">
|
||||
<el-date-picker type="date" style="width:100%" v-model="form.mDeliverTime" @change="changeTime"
|
||||
format="yyyy-MM-dd" placeholder="选择发货时间"></el-date-picker>
|
||||
<el-date-picker
|
||||
type="date"
|
||||
style="width:100%"
|
||||
v-model="form.mDeliverTime"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择发货时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -225,32 +241,32 @@ export default {
|
||||
},
|
||||
// 提交物流信息
|
||||
submitDelivery() {
|
||||
this.submitLoading = true
|
||||
afterSaleDelivery(this.form).then(res => {
|
||||
if (res.success) {
|
||||
this.logisticsShow = false;
|
||||
this.$Message.success('提交成功')
|
||||
this.getList()
|
||||
}
|
||||
this.submitLoading = false
|
||||
}).catch(() => {
|
||||
this.submitLoading = false
|
||||
})
|
||||
this.$refs.form?.validate((valid) => {
|
||||
if (!valid) return;
|
||||
this.submitLoading = true;
|
||||
afterSaleDelivery(this.form).then(res => {
|
||||
if (res.success) {
|
||||
this.logisticsShow = false;
|
||||
this.$Message.success('提交成功');
|
||||
this.getList();
|
||||
}
|
||||
this.submitLoading = false;
|
||||
}).catch(() => {
|
||||
this.submitLoading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
// 提交物流modal
|
||||
openModal(row) {
|
||||
console.log(row);
|
||||
this.singleOrder = row;
|
||||
this.form.afterSaleSn = row.sn
|
||||
this.logisticsShow = true;
|
||||
this.$refs.form.resetFields()
|
||||
if (!this.companyList.length) {
|
||||
this.getCompany()
|
||||
this.getCompany();
|
||||
}
|
||||
},
|
||||
// 格式化时间
|
||||
changeTime(time) {
|
||||
this.form.mDeliverTime = time;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form?.resetFields();
|
||||
this.form.afterSaleSn = row.sn;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -331,11 +347,31 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
> div:nth-child(3) {
|
||||
width: 100px;
|
||||
.order-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
min-width: 100px;
|
||||
|
||||
.el-button {
|
||||
margin-bottom: 10px;
|
||||
.after-sale-action-btn {
|
||||
display: block;
|
||||
margin: 0;
|
||||
min-width: 88px;
|
||||
}
|
||||
|
||||
:deep(.submit-logistics-btn) {
|
||||
background-color: #ff9900 !important;
|
||||
border-color: #ff9900 !important;
|
||||
color: #fff !important;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: #e68a00 !important;
|
||||
border-color: #e68a00 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,14 @@
|
||||
<el-input v-model="form.logisticsNo" placeholder="请填写物流单号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="发货时间" prop="mDeliverTime">
|
||||
<el-date-picker type="date" style="width:100%" v-model="form.mDeliverTime" @change="changeTime" format="yyyy-MM-dd" placeholder="选择发货时间"></el-date-picker>
|
||||
<el-date-picker
|
||||
type="date"
|
||||
style="width:100%"
|
||||
v-model="form.mDeliverTime"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择发货时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -206,16 +213,14 @@ export default {
|
||||
},
|
||||
// 提交物流modal
|
||||
openModal () {
|
||||
this.form.afterSaleSn = this.afterSale.sn
|
||||
this.logisticsShow = true;
|
||||
this.$refs.form.resetFields()
|
||||
if (!this.companyList.length) {
|
||||
this.getCompany()
|
||||
this.getCompany();
|
||||
}
|
||||
},
|
||||
// 格式化时间
|
||||
changeTime (time) {
|
||||
this.form.mDeliverTime = time;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form?.resetFields();
|
||||
this.form.afterSaleSn = this.afterSale.sn;
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
<card _Title="我的订单" :_Size="16" :_Tabs="changeWay" @_Change="change" v-if="!homePage"></card>
|
||||
<card _Title="我的订单" :_Size="16" :_Tabs="changeWay" @_Change="change" _More="全部订单" _Src="/home/MyOrder" v-else></card>
|
||||
<!-- 搜索 筛选 -->
|
||||
<div class="mb_24 box" v-if="!homePage">
|
||||
<div class="global_float_right" >
|
||||
<div class="order-search-bar" v-if="!homePage">
|
||||
<div class="global_float_right">
|
||||
<el-input
|
||||
class="width_300"
|
||||
|
||||
|
||||
v-model="params.keywords"
|
||||
@keyup.enter="getList"
|
||||
placeholder="请输入订单号搜索"
|
||||
@@ -62,12 +60,12 @@
|
||||
<div>
|
||||
<span @click="shopPage(order.storeId)">{{ order.storeName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div class="order-actions">
|
||||
<!-- 订单基础操作 -->
|
||||
<el-button @click="orderDetail(order.sn)" type="info" size="small">订单详情</el-button>
|
||||
<el-button @click="orderDetail(order.sn)" type="warning" size="small">订单详情</el-button>
|
||||
<el-button @click="handleCancelOrder(order.sn)" type="danger" v-if="order.allowOperationVO.cancel" size="small">取消订单</el-button>
|
||||
<el-button @click="goPay(order.sn)" size="small" type="success" v-if="order.allowOperationVO.pay">去支付</el-button>
|
||||
<el-button @click="received(order.sn)" size="small" type="warning" v-if="order.allowOperationVO.rog">确认收货</el-button>
|
||||
<el-button @click="received(order.sn)" size="small" class="confirm-receipt-btn" v-if="order.allowOperationVO.rog">确认收货</el-button>
|
||||
<!-- 售后 -->
|
||||
<el-button v-if="order.groupAfterSaleStatus && (order.groupAfterSaleStatus.includes('NOT_APPLIED')|| order.groupAfterSaleStatus.includes('PART_AFTER_SALE'))"
|
||||
@click="applyAfterSale(order.orderItems)" size="small">申请售后</el-button>
|
||||
@@ -92,12 +90,18 @@
|
||||
</div>
|
||||
<template #footer><div></div></template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="cancelAvail" title="请选择取消订单原因" @ok="sureCancel" @cancel="cancelAvail = false">
|
||||
<el-radio-group v-model="cancelParams.reason" vertical type="button" button-style="solid">
|
||||
<el-dialog v-model="cancelAvail" title="请选择取消订单原因">
|
||||
<el-radio-group v-model="cancelParams.reason">
|
||||
<el-radio :label="item.reason" v-for="item in cancelReason" :key="item.id">
|
||||
{{item.reason}}
|
||||
{{ item.reason }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<template #footer>
|
||||
<div style="text-align: right">
|
||||
<el-button @click="cancelAvail = false">取消</el-button>
|
||||
<el-button type="primary" @click="sureCancel">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -302,7 +306,9 @@ export default {
|
||||
.wrapper {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.box {
|
||||
.order-search-bar {
|
||||
margin-top: 16px;
|
||||
margin-bottom: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.page-size {
|
||||
@@ -373,10 +379,30 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
> div:nth-child(3) {
|
||||
width: 100px;
|
||||
.order-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
min-width: 100px;
|
||||
|
||||
.el-button {
|
||||
margin-bottom: 10px;
|
||||
margin: 0;
|
||||
min-width: 88px;
|
||||
}
|
||||
|
||||
:deep(.confirm-receipt-btn) {
|
||||
background-color: #ff9900 !important;
|
||||
border-color: #ff9900 !important;
|
||||
color: #fff !important;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: #e68a00 !important;
|
||||
border-color: #e68a00 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,16 +173,16 @@
|
||||
<td>{{refundPriceList(goods.isRefund)}}</td>
|
||||
<td>{{ $filters.unitPrice(goods.refundPrice, "¥") }}</td>
|
||||
<td>{{ $filters.unitPrice((goods.goodsPrice * goods.num), "¥") }}</td>
|
||||
<td>
|
||||
<td class="order-item-actions">
|
||||
<el-button
|
||||
v-if="
|
||||
goods.afterSaleStatus.includes('NOT_APPLIED') ||
|
||||
goods.afterSaleStatus.includes('PART_AFTER_SALE')
|
||||
"
|
||||
@click="applyAfterSale(goods.sn)"
|
||||
type="info"
|
||||
type="warning"
|
||||
size="small"
|
||||
class="mb_5"
|
||||
class="order-item-action-btn mb_5"
|
||||
>申请售后</el-button
|
||||
>
|
||||
<el-button
|
||||
@@ -190,14 +190,14 @@
|
||||
@click="comment(order.order.sn, goodsIndex)"
|
||||
size="small"
|
||||
type="success"
|
||||
class="fontsize_12 mb_5"
|
||||
class="order-item-action-btn fontsize_12 mb_5"
|
||||
>评价</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="goods.complainStatus == 'NO_APPLY'"
|
||||
@click="complain(order.order.sn, goodsIndex)"
|
||||
type="warning"
|
||||
class="fontsize_12"
|
||||
class="order-item-action-btn fontsize_12 mb_5"
|
||||
size="small"
|
||||
>投诉</el-button
|
||||
>
|
||||
@@ -239,19 +239,20 @@
|
||||
<el-dialog
|
||||
v-model="cancelAvail"
|
||||
title="请选择取消订单原因"
|
||||
@ok="sureCancel"
|
||||
@cancel="cancelAvail = false"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="cancelParams.reason"
|
||||
vertical
|
||||
type="button"
|
||||
button-style="solid"
|
||||
>
|
||||
<el-radio :label="item.reason" v-for="item in cancelReason" :key="item.id">
|
||||
{{ item.reason }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
<template #footer>
|
||||
<div style="text-align: right">
|
||||
<el-button @click="cancelAvail = false">取消</el-button>
|
||||
<el-button type="primary" @click="sureCancel">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!--查询物流-->
|
||||
@@ -594,6 +595,10 @@ table {
|
||||
height: 40px;
|
||||
background: #eee;
|
||||
}
|
||||
th {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
}
|
||||
td {
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
@@ -613,6 +618,16 @@ table {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order-item-actions {
|
||||
vertical-align: middle;
|
||||
|
||||
.order-item-action-btn {
|
||||
display: block;
|
||||
margin: 0 auto 5px;
|
||||
min-width: 88px;
|
||||
}
|
||||
}
|
||||
/** 订单价格 */
|
||||
.order-price {
|
||||
text-align: right;
|
||||
|
||||
@@ -133,21 +133,73 @@ export default {
|
||||
<style scoped lang="scss">
|
||||
@import "../../../assets/styles/coupon.scss";
|
||||
.coupon-item {
|
||||
height: 125px;
|
||||
overflow: hidden;
|
||||
height: 145px;
|
||||
margin-left: 0;
|
||||
$claim-width: 55px;
|
||||
|
||||
.c-left {
|
||||
padding: 16px;
|
||||
width: calc(100% - #{$claim-width});
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
|
||||
p {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
b {
|
||||
right: $claim-width;
|
||||
width: 0;
|
||||
background: none;
|
||||
border-right: 1px dashed #e0e0e0;
|
||||
}
|
||||
|
||||
.c-right {
|
||||
padding: 20px 16px;
|
||||
width: 43px;
|
||||
font-size: 14px;
|
||||
width: $claim-width;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: mixed;
|
||||
letter-spacing: 4px;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
user-select: none;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
.canot-use {
|
||||
color: #999;
|
||||
background-color: #eee;
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
i {
|
||||
right: 34px;
|
||||
|
||||
i.circle-top,
|
||||
i.circle-bottom {
|
||||
right: calc(#{$claim-width} - 9px);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
i.circle-top {
|
||||
top: -9px;
|
||||
}
|
||||
|
||||
i.circle-bottom {
|
||||
bottom: -9px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,8 +30,13 @@
|
||||
:key="index">
|
||||
<div>
|
||||
<span>{{ item.name }}</span>
|
||||
<el-tag class="ml_10" v-if="item.isDefault" color="red">默认</el-tag>
|
||||
<el-tag class="ml_10" v-if="item.alias" color="warning">{{ item.alias }}
|
||||
<el-tag class="ml_10 address-default-tag" v-if="item.isDefault" color="red" effect="dark">默认</el-tag>
|
||||
<el-tag
|
||||
class="ml_10 address-alias-tag"
|
||||
v-if="item.alias"
|
||||
color="rgb(255, 153, 0)"
|
||||
effect="dark"
|
||||
>{{ item.alias }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<div>{{ item.mobile }}</div>
|
||||
@@ -182,8 +187,16 @@
|
||||
</div>
|
||||
<img class="used" v-if="usedCouponId.includes(item.id)" src="../../assets/images/geted.png" alt="" />
|
||||
<b></b>
|
||||
<a class="c-right" @click="useCoupon(item.id, true)">立即使用</a>
|
||||
<a class="c-right" v-if="usedCouponId.includes(item.id)" @click="useCoupon(item.id, false)">放弃优惠</a>
|
||||
<a
|
||||
class="c-right"
|
||||
v-if="!usedCouponId.includes(item.id)"
|
||||
@click="useCoupon(item.id, true)"
|
||||
>立即使用</a>
|
||||
<a
|
||||
class="c-right c-right-cancel"
|
||||
v-else
|
||||
@click="useCoupon(item.id, false)"
|
||||
>放弃优惠</a>
|
||||
<i class="circle-top"></i>
|
||||
<i class="circle-bottom"></i>
|
||||
</li>
|
||||
@@ -1020,6 +1033,18 @@ export default {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
:deep(.address-default-tag) {
|
||||
--el-tag-text-color: #fff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
:deep(.address-alias-tag) {
|
||||
--el-tag-bg-color: rgb(255, 153, 0);
|
||||
--el-tag-border-color: rgb(255, 153, 0);
|
||||
--el-tag-text-color: #fff;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
>div {
|
||||
border: 1px dotted #949494;
|
||||
width: 265px;
|
||||
@@ -1340,32 +1365,92 @@ export default {
|
||||
}
|
||||
|
||||
.coupon-item {
|
||||
width: 260px;
|
||||
width: 280px;
|
||||
height: 125px;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
overflow: hidden;
|
||||
$claim-width: 55px;
|
||||
|
||||
.c-right {
|
||||
width: 30px;
|
||||
padding: 10px 7px;
|
||||
.c-left {
|
||||
width: calc(100% - #{$claim-width});
|
||||
padding: 14px 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
> div,
|
||||
> p {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
> div .price {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
b {
|
||||
background: url("../../assets/images/small-circle.png") top left repeat-y;
|
||||
right: 28px;
|
||||
right: $claim-width;
|
||||
width: 0;
|
||||
background: none;
|
||||
border-right: 1px dashed #e0e0e0;
|
||||
}
|
||||
|
||||
.c-right {
|
||||
width: $claim-width;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: mixed;
|
||||
letter-spacing: 3px;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
user-select: none;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
.c-right-cancel {
|
||||
letter-spacing: 2px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.circle-top,
|
||||
.circle-bottom {
|
||||
right: 22px;
|
||||
right: calc(#{$claim-width} - 9px);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.circle-top {
|
||||
top: -9px;
|
||||
}
|
||||
|
||||
.circle-bottom {
|
||||
bottom: -9px;
|
||||
}
|
||||
|
||||
.used {
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
right: 40px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
top: 50%;
|
||||
right: calc(#{$claim-width} + 8px);
|
||||
transform: translateY(-50%);
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
z-index: 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="pay-btn">
|
||||
<el-button type="primary" @click="$router.push('/')">继续逛逛</el-button>
|
||||
<el-button type="info" v-if="$route.query.orderType ==='RECHARGE'" @click="$router.push('/home/MoneyManagement')">查看余额</el-button>
|
||||
<el-button type="info" v-else @click="$router.push('/home/myOrder')">查看订单</el-button>
|
||||
<el-button class="view-order-btn" v-else @click="$router.push('/home/myOrder')">查看订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -35,4 +35,15 @@ export default {
|
||||
margin:0 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.view-order-btn {
|
||||
--el-button-bg-color: rgb(250, 100, 25);
|
||||
--el-button-border-color: rgb(250, 100, 25);
|
||||
--el-button-hover-bg-color: rgb(250, 100, 25);
|
||||
--el-button-hover-border-color: rgb(250, 100, 25);
|
||||
--el-button-active-bg-color: rgb(250, 100, 25);
|
||||
--el-button-active-border-color: rgb(250, 100, 25);
|
||||
--el-button-text-color: #fff;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -100,7 +100,7 @@ export default {
|
||||
if (way === 'WALLET') {
|
||||
this.$Modal.confirm({
|
||||
title: '支付确认',
|
||||
content: '<p>确认使用余额支付吗?</p>',
|
||||
content: '确认使用余额支付吗?',
|
||||
onOk: () => {
|
||||
pay(params).then(res => {
|
||||
if (res.success) {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
@click="goGoodsDetail(item.id)"
|
||||
>
|
||||
<div class="goods-show-img">
|
||||
<img width="220" height="220" :src="item.goodsSku.thumbnail" />
|
||||
<img :src="item.goodsSku.thumbnail" />
|
||||
</div>
|
||||
<div class="goods-show-price">
|
||||
<span>
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
<template>
|
||||
<div class="company-msg">
|
||||
<el-form ref="firstForm" :model="form" :rules="rules" label-width="140px">
|
||||
<el-form
|
||||
ref="firstForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="140px"
|
||||
@submit.prevent
|
||||
@keydown.enter.prevent
|
||||
@focusout="saveDraft"
|
||||
>
|
||||
<h4>基础信息</h4>
|
||||
<el-form-item prop="companyName" label="公司名称">
|
||||
<el-input
|
||||
@@ -182,6 +190,8 @@ import * as RegExp from '@/plugins/RegExp.js';
|
||||
import multipleMap from "@/components/map/multiple-map";
|
||||
import storage from '@/plugins/storage';
|
||||
import { commonUrl } from '@/plugins/request.js';
|
||||
const FIRST_APPLY_DRAFT_KEY = 'shopEntryFirstDraft';
|
||||
|
||||
export default {
|
||||
components: { multipleMap, View, Delete },
|
||||
props: {
|
||||
@@ -199,6 +209,20 @@ export default {
|
||||
|
||||
previewPicture: '', // 预览图片url
|
||||
form: { // 表单数据
|
||||
companyName: '',
|
||||
companyAddressIdPath: '',
|
||||
companyAddressPath: '',
|
||||
companyAddress: '',
|
||||
employeeNum: '',
|
||||
companyPhone: '',
|
||||
registeredCapital: '',
|
||||
linkName: '',
|
||||
linkPhone: '',
|
||||
companyEmail: '',
|
||||
licenseNum: '',
|
||||
scope: '',
|
||||
legalName: '',
|
||||
legalId: '',
|
||||
legalPhoto: [],
|
||||
licencePhoto: []
|
||||
},
|
||||
@@ -241,7 +265,8 @@ export default {
|
||||
]
|
||||
},
|
||||
uploadLoading1: false, // 上传loading
|
||||
uploadLoading: false // 上传loading
|
||||
uploadLoading: false, // 上传loading
|
||||
contentInitialized: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -269,7 +294,10 @@ export default {
|
||||
applyFirst(params)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) this.$emit('change', 1);
|
||||
if (res.success) {
|
||||
sessionStorage.removeItem(FIRST_APPLY_DRAFT_KEY);
|
||||
this.$emit('change', 1);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
@@ -337,18 +365,57 @@ export default {
|
||||
// 删除图片
|
||||
handleRemove (index, listName) {
|
||||
this.form[listName].splice(index, 1);
|
||||
},
|
||||
initFormFromContent(content) {
|
||||
if (!content || !Object.keys(content).length) return;
|
||||
this.form = JSON.parse(JSON.stringify(content));
|
||||
this.form.legalPhoto = content.legalPhoto
|
||||
? String(content.legalPhoto).split(',').filter(Boolean)
|
||||
: [];
|
||||
this.form.licencePhoto = content.licencePhoto
|
||||
? String(content.licencePhoto).split(',').filter(Boolean)
|
||||
: [];
|
||||
this.contentInitialized = true;
|
||||
},
|
||||
restoreDraft() {
|
||||
const draft = sessionStorage.getItem(FIRST_APPLY_DRAFT_KEY);
|
||||
if (!draft) return;
|
||||
try {
|
||||
const parsed = JSON.parse(draft);
|
||||
this.form = {
|
||||
legalPhoto: [],
|
||||
licencePhoto: [],
|
||||
...parsed,
|
||||
};
|
||||
this.form.legalPhoto = Array.isArray(parsed.legalPhoto) ? parsed.legalPhoto : [];
|
||||
this.form.licencePhoto = Array.isArray(parsed.licencePhoto) ? parsed.licencePhoto : [];
|
||||
} catch (e) {
|
||||
sessionStorage.removeItem(FIRST_APPLY_DRAFT_KEY);
|
||||
}
|
||||
},
|
||||
saveDraft() {
|
||||
sessionStorage.setItem(FIRST_APPLY_DRAFT_KEY, JSON.stringify(this.form));
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
content: {
|
||||
immediate: true,
|
||||
handler(val) {
|
||||
if (this.contentInitialized || !val || !Object.keys(val).length) return;
|
||||
this.initFormFromContent(val);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.accessToken.accessToken = storage.getItem('accessToken');
|
||||
if (Object.keys(this.content).length) { // 处理回显数据
|
||||
this.form = JSON.parse(JSON.stringify(this.content));
|
||||
if (this.form.licencePhoto) {
|
||||
this.form.legalPhoto = this.content.legalPhoto.split(',');
|
||||
this.form.licencePhoto = this.content.licencePhoto.split(',');
|
||||
|
||||
}
|
||||
if (Object.keys(this.content).length) {
|
||||
this.initFormFromContent(this.content);
|
||||
} else {
|
||||
this.restoreDraft();
|
||||
}
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.saveDraft();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -90,11 +90,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (this.content != {}) {
|
||||
if (this.content && Object.keys(this.content).length) {
|
||||
this.form = JSON.parse(JSON.stringify(this.content));
|
||||
this.$forceUpdate();
|
||||
}
|
||||
this.$refs.secondForm.resetFields()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -3,17 +3,32 @@
|
||||
<div style="height: 20px"></div>
|
||||
<div class="content">
|
||||
<h1>店铺入驻</h1>
|
||||
<el-steps :current="currentIndex" class="margin">
|
||||
<el-steps :active="currentIndex" class="margin" finish-status="success">
|
||||
<el-step title="企业资质信息"></el-step>
|
||||
<el-step title="财务资质信息"></el-step>
|
||||
<el-step title="其他信息"></el-step>
|
||||
<el-step title="提交审核"></el-step>
|
||||
</el-steps>
|
||||
<first-apply v-if="currentIndex == 0 && dataReview" :content="firstData" @change="nextPage"></first-apply>
|
||||
<div v-if="initLoading" class="step-loading" v-loading="true"></div>
|
||||
<template v-else>
|
||||
<first-apply
|
||||
v-if="currentIndex === 0 && agreementAccepted"
|
||||
:content="firstData"
|
||||
@change="nextPage"
|
||||
></first-apply>
|
||||
|
||||
<second-apply v-if="currentIndex == 1 && dataReview" :content="secondData" @change="nextPage"></second-apply>
|
||||
<second-apply
|
||||
v-if="currentIndex === 1 && agreementAccepted"
|
||||
:content="secondData"
|
||||
@change="nextPage"
|
||||
></second-apply>
|
||||
|
||||
<third-apply v-if="currentIndex == 2 && dataReview" :content="thirdData" @change="nextPage"></third-apply>
|
||||
<third-apply
|
||||
v-if="currentIndex === 2 && agreementAccepted"
|
||||
:content="thirdData"
|
||||
@change="nextPage"
|
||||
></third-apply>
|
||||
</template>
|
||||
|
||||
<div class="success-page" v-if="currentIndex == 3">
|
||||
<span v-if="storeDisable == '' || storeDisable == 'APPLYING'">入驻申请提交成功,等待平台审核</span>
|
||||
@@ -28,15 +43,15 @@
|
||||
</div>
|
||||
|
||||
<el-dialog title="店铺入驻协议" v-model="showAgreement" width="1200" :closable="false" :close-on-click-modal="false">
|
||||
<Scroll :on-reach-bottom="handleReachBottom">
|
||||
<div class="agreement-scroll">
|
||||
<div class="agreeent-con" v-html="agreementCon"></div>
|
||||
</Scroll>
|
||||
</div>
|
||||
|
||||
<template #footer><div style="text-align: center">
|
||||
<p>
|
||||
<el-checkbox v-model="checked">我已同意以上协议</el-checkbox>
|
||||
</p>
|
||||
<el-button type="primary" :disabled="!checked" class="margin" @click="showAgreement = false">同意协议填写资质信息</el-button>
|
||||
<el-button type="primary" :disabled="!checked" class="margin" @click="confirmAgreement">同意协议填写资质信息</el-button>
|
||||
</div></template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -63,101 +78,114 @@ export default {
|
||||
secondData: {}, // 第二步数据
|
||||
thirdData: {}, // 第三步数据
|
||||
storeDisable: "", // APPLY OPEN 开店中 CLOSED 关闭 REFUSED 拒绝 APPLYING 申请中,审核
|
||||
dataReview: true, // 根据接口返回判断是否可展示数据
|
||||
initLoading: true,
|
||||
agreementAccepted: false, // 是否已同意入驻协议
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
confirmAgreement() {
|
||||
this.agreementAccepted = true;
|
||||
this.showAgreement = false;
|
||||
sessionStorage.setItem("shopEntryAgreementAccepted", "1");
|
||||
},
|
||||
assignApplyData(data) {
|
||||
const first = [
|
||||
"companyAddressPath",
|
||||
"companyAddress",
|
||||
"companyAddressIdPath",
|
||||
"companyEmail",
|
||||
"companyName",
|
||||
"employeeNum",
|
||||
"companyPhone",
|
||||
"legalId",
|
||||
"legalName",
|
||||
"licencePhoto",
|
||||
"legalPhoto",
|
||||
"licenseNum",
|
||||
"linkName",
|
||||
"linkPhone",
|
||||
"registeredCapital",
|
||||
"scope",
|
||||
];
|
||||
const second = [
|
||||
"settlementBankAccountName",
|
||||
"settlementBankAccountNum",
|
||||
"settlementBankBranchName",
|
||||
"settlementBankJointName",
|
||||
];
|
||||
const third = [
|
||||
"goodsManagementCategory",
|
||||
"storeCenter",
|
||||
"storeDesc",
|
||||
"storeLogo",
|
||||
"storeName",
|
||||
"storeAddressIdPath",
|
||||
"storeAddressPath",
|
||||
"storeAddressDetail",
|
||||
];
|
||||
|
||||
this.storeDisable = data.storeDisable || "";
|
||||
Object.assign(this.firstData, Object.fromEntries(first.map((key) => [key, data[key]])));
|
||||
Object.assign(this.secondData, Object.fromEntries(second.map((key) => [key, data[key]])));
|
||||
Object.assign(this.thirdData, Object.fromEntries(third.map((key) => [key, data[key]])));
|
||||
},
|
||||
getArticle() {
|
||||
// 入驻协议
|
||||
agreement().then((res) => {
|
||||
this.agreementCon = res.result.content;
|
||||
});
|
||||
},
|
||||
handleReachBottom(){
|
||||
|
||||
},
|
||||
getData(status) {
|
||||
// 获取已填写店铺信息
|
||||
applyStatus().then((res) => {
|
||||
if (res.success) {
|
||||
if (!res.result) {
|
||||
if (!res.success) {
|
||||
return;
|
||||
}
|
||||
if (!res.result) {
|
||||
if (status === "init" && !this.agreementAccepted) {
|
||||
this.showAgreement = true;
|
||||
} else {
|
||||
this.dataReview = false;
|
||||
let data = res.result;
|
||||
let first = [
|
||||
"companyAddressPath",
|
||||
"companyAddress",
|
||||
"companyAddressIdPath",
|
||||
"companyEmail",
|
||||
"companyName",
|
||||
"employeeNum",
|
||||
"companyPhone",
|
||||
"legalId",
|
||||
"legalName",
|
||||
"licencePhoto",
|
||||
"legalPhoto",
|
||||
"licenseNum",
|
||||
"linkName",
|
||||
"linkPhone",
|
||||
"registeredCapital",
|
||||
"scope",
|
||||
];
|
||||
let second = [
|
||||
"settlementBankAccountName",
|
||||
"settlementBankAccountNum",
|
||||
"settlementBankBranchName",
|
||||
"settlementBankJointName",
|
||||
];
|
||||
let third = [
|
||||
"goodsManagementCategory",
|
||||
"storeCenter",
|
||||
"storeDesc",
|
||||
"storeLogo",
|
||||
"storeName",
|
||||
"storeAddressIdPath",
|
||||
"storeAddressPath",
|
||||
"storeAddressDetail",
|
||||
];
|
||||
|
||||
this.storeDisable = data.storeDisable;
|
||||
|
||||
first.forEach((e) => {
|
||||
this.firstData[e] = data[e];
|
||||
});
|
||||
second.forEach((e) => {
|
||||
this.secondData[e] = data[e];
|
||||
});
|
||||
third.forEach((e) => {
|
||||
this.thirdData[e] = data[e];
|
||||
});
|
||||
if (status === "init") {
|
||||
if (this.storeDisable === "APPLY") {
|
||||
this.currentIndex = 0;
|
||||
} else {
|
||||
this.currentIndex = 3;
|
||||
}
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.dataReview = true;
|
||||
this.$forceUpdate();
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
this.assignApplyData(res.result);
|
||||
if (status === "init") {
|
||||
this.agreementAccepted = true;
|
||||
sessionStorage.setItem("shopEntryAgreementAccepted", "1");
|
||||
if (this.storeDisable === "APPLY") {
|
||||
this.currentIndex = 0;
|
||||
} else {
|
||||
this.currentIndex = 3;
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
if (status === "init") {
|
||||
this.initLoading = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
refreshApplyData() {
|
||||
applyStatus().then((res) => {
|
||||
if (res.success && res.result) {
|
||||
this.assignApplyData(res.result);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 下一步
|
||||
nextPage(step) {
|
||||
this.currentIndex = step;
|
||||
this.getData("next");
|
||||
if (step > 0 && step < 3) {
|
||||
this.refreshApplyData();
|
||||
} else if (step === 3) {
|
||||
this.refreshApplyData();
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.agreementAccepted = sessionStorage.getItem("shopEntryAgreementAccepted") === "1";
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.getData("init");
|
||||
this.getArticle();
|
||||
|
||||
|
||||
this.getData("init");
|
||||
this.getArticle();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -187,6 +215,13 @@ export default {
|
||||
|
||||
}
|
||||
}
|
||||
.agreement-scroll {
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.step-loading {
|
||||
min-height: 320px;
|
||||
}
|
||||
.success-page {
|
||||
height: 500px;
|
||||
width: 100%;
|
||||
|
||||
@@ -148,7 +148,7 @@ export default {
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) this.$emit('change', 3);
|
||||
this.$parent.getData()
|
||||
this.$parent.getData('next');
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
@@ -228,19 +228,17 @@ export default {
|
||||
mounted () {
|
||||
this.accessToken.accessToken = storage.getItem('accessToken');
|
||||
this.getCategoryList();
|
||||
if (this.content != {}) {
|
||||
if (this.content && Object.keys(this.content).length) {
|
||||
this.form = JSON.parse(JSON.stringify(this.content));
|
||||
if (this.form.storeLogo) {
|
||||
this.form.storeLogo = this.content.storeLogo.split(',');
|
||||
this.form.goodsManagementCategory = this.content.goodsManagementCategory.split(
|
||||
','
|
||||
);
|
||||
this.form.storeLogo = String(this.content.storeLogo).split(',').filter(Boolean);
|
||||
this.form.goodsManagementCategory = String(this.content.goodsManagementCategory || '')
|
||||
.split(',')
|
||||
.filter(Boolean);
|
||||
} else {
|
||||
this.form.storeLogo = [];
|
||||
}
|
||||
this.$forceUpdate();
|
||||
}
|
||||
this.$refs.thirdForm.resetFields()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
import Cookies from "js-cookie";
|
||||
const psl = require("psl");
|
||||
|
||||
const isClient = typeof window !== "undefined";
|
||||
|
||||
function withCookieDomain(options = {}) {
|
||||
if (!isClient) {
|
||||
return options;
|
||||
}
|
||||
const pPsl = psl.parse(document.domain);
|
||||
let domain = pPsl.domain;
|
||||
if (/\d+\.\d+\.\d+\.\d+/.test(pPsl.input)) domain = pPsl.input;
|
||||
return { domain, ...options };
|
||||
}
|
||||
|
||||
export default {
|
||||
setItem: (key, value, options = {}) => {
|
||||
if (process.client) {
|
||||
console.log(process.client);
|
||||
const pPsl = psl.parse(document.domain);
|
||||
let domain = pPsl.domain;
|
||||
if (/\d+\.\d+\.\d+\.\d+/.test(pPsl.input)) domain = pPsl.input;
|
||||
options = { domain, ...options };
|
||||
}
|
||||
Cookies.set(key, value, options);
|
||||
Cookies.set(key, value, withCookieDomain(options));
|
||||
},
|
||||
getItem: key => {
|
||||
return Cookies.get(key);
|
||||
},
|
||||
removeItem: (key, options = {}) => {
|
||||
if (process.client) {
|
||||
const pPsl = psl.parse(document.domain);
|
||||
let domain = pPsl.domain;
|
||||
if (/\d+\.\d+\.\d+\.\d+/.test(pPsl.input)) domain = pPsl.input;
|
||||
options = { domain, ...options };
|
||||
}
|
||||
Cookies.remove(key, options);
|
||||
Cookies.remove(key, withCookieDomain(options));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,4 +1,30 @@
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { ElLoading, ElMessage, ElMessageBox } from "element-plus";
|
||||
|
||||
let loadingInstance = null;
|
||||
|
||||
export const Spin = {
|
||||
show(options = {}) {
|
||||
Spin.hide();
|
||||
const config =
|
||||
typeof options === "string"
|
||||
? { text: options }
|
||||
: options && typeof options === "object"
|
||||
? options
|
||||
: {};
|
||||
loadingInstance = ElLoading.service({
|
||||
lock: true,
|
||||
text: config.text || "加载中...",
|
||||
background: config.background || "rgba(255, 255, 255, 0.7)",
|
||||
...config,
|
||||
});
|
||||
},
|
||||
hide() {
|
||||
if (loadingInstance) {
|
||||
loadingInstance.close();
|
||||
loadingInstance = null;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const Message = {
|
||||
success(content) {
|
||||
@@ -53,6 +79,17 @@ export const Modal = {
|
||||
}
|
||||
});
|
||||
},
|
||||
warning(options = {}) {
|
||||
const content = options.content || options.title || "";
|
||||
return ElMessageBox.alert(content, options.title || "提示", {
|
||||
confirmButtonText: options.okText || "确定",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
if (typeof options.onOk === "function") {
|
||||
return options.onOk();
|
||||
}
|
||||
});
|
||||
},
|
||||
remove() {
|
||||
ElMessageBox.close();
|
||||
},
|
||||
@@ -68,4 +105,5 @@ export function setupLegacyMessage(app) {
|
||||
app.config.globalProperties.$Message = Message;
|
||||
app.config.globalProperties.$Modal = Modal;
|
||||
app.config.globalProperties.$Notice = Notice;
|
||||
app.config.globalProperties.$Spin = Spin;
|
||||
}
|
||||
|
||||
@@ -4,28 +4,31 @@
|
||||
<el-dialog v-model="show" width="850px" title="上传图片" append-to-body :z-index="3500">
|
||||
<div class="import-oss" @click="importOSS">从资源库中导入</div>
|
||||
<div style="display: flex; flex-wrap: wrap">
|
||||
<vuedraggable :animation="200" :list="images">
|
||||
<div
|
||||
v-for="(item, __index) in images"
|
||||
:key="__index"
|
||||
class="upload-list"
|
||||
>
|
||||
<img alt="image" :src="item.url" />
|
||||
<div class="upload-list-cover">
|
||||
<div>
|
||||
<el-icon class="action-icon" :size="30" @click="handleView(item.url)">
|
||||
<ZoomIn />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="action-icon"
|
||||
:size="30"
|
||||
@click="handleRemoveGoodsPicture(__index)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
<vuedraggable
|
||||
v-model="images"
|
||||
:animation="200"
|
||||
:item-key="draggableItemKey"
|
||||
style="display: flex; flex-wrap: wrap"
|
||||
>
|
||||
<template #item="{ element, index }">
|
||||
<div class="upload-list">
|
||||
<img alt="image" :src="element.url" />
|
||||
<div class="upload-list-cover">
|
||||
<div>
|
||||
<el-icon class="action-icon" :size="30" @click="handleView(element.url)">
|
||||
<ZoomIn />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="action-icon"
|
||||
:size="30"
|
||||
@click="handleRemoveGoodsPicture(index)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</vuedraggable>
|
||||
<div class="upload-box">
|
||||
<el-upload
|
||||
@@ -58,17 +61,16 @@
|
||||
append-to-body
|
||||
:z-index="3600"
|
||||
destroy-on-close
|
||||
@closed="confirmUrls"
|
||||
@closed="resetOssSelection"
|
||||
>
|
||||
<OssManage
|
||||
ref="ossManage"
|
||||
:is-component="true"
|
||||
:initialize="showOssManager"
|
||||
@selected="(list) => { selectedImage = list }"
|
||||
@callback="handleCallback"
|
||||
@selected="handleOssSelected"
|
||||
/>
|
||||
<template #footer>
|
||||
<el-button @click="showOssManager = false">取消</el-button>
|
||||
<el-button @click="cancelOssImport">取消</el-button>
|
||||
<el-button type="primary" @click="confirmUrls">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -114,6 +116,9 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
draggableItemKey(item) {
|
||||
return item?.url || item;
|
||||
},
|
||||
handleClickUploadImage() {
|
||||
this.show = true;
|
||||
},
|
||||
@@ -153,13 +158,39 @@ export default {
|
||||
this.$Message.error(err?.message || String(err));
|
||||
},
|
||||
confirmUrls() {
|
||||
this.applySelectedImages();
|
||||
this.showOssManager = false;
|
||||
},
|
||||
handleCallback(val) {
|
||||
this.$Message.success("导入成功");
|
||||
this.images.push({ url: val.url });
|
||||
cancelOssImport() {
|
||||
this.selectedImage = [];
|
||||
this.showOssManager = false;
|
||||
},
|
||||
resetOssSelection() {
|
||||
this.selectedImage = [];
|
||||
},
|
||||
handleOssSelected(list) {
|
||||
this.selectedImage = Array.isArray(list) ? list : [];
|
||||
},
|
||||
parseOssSelectionUrl(item) {
|
||||
if (!item) {
|
||||
return "";
|
||||
}
|
||||
if (typeof item === "string") {
|
||||
const index = item.indexOf(",");
|
||||
return index >= 0 ? item.slice(index + 1) : item;
|
||||
}
|
||||
return item.url || "";
|
||||
},
|
||||
applySelectedImages() {
|
||||
(this.selectedImage || []).forEach((item) => {
|
||||
const url = this.parseOssSelectionUrl(item);
|
||||
if (url) {
|
||||
this.images.push({ url });
|
||||
}
|
||||
});
|
||||
},
|
||||
importOSS() {
|
||||
this.selectedImage = [];
|
||||
this.showOssManager = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
|
||||
@@ -159,8 +159,12 @@ export default {
|
||||
},
|
||||
// 选择图片
|
||||
handleSelectImg() {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 选择图片回调
|
||||
callbackSelected(item) {
|
||||
|
||||
@@ -112,10 +112,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleCLickImg(val, index) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModalFlag = true;
|
||||
this.selectedFormBtnName = val;
|
||||
this.picIndex = index;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
callbackSelected(val) {
|
||||
this.picModalFlag = false;
|
||||
|
||||
@@ -40,24 +40,48 @@ export const Notice = {
|
||||
export const Modal = {
|
||||
confirm(options = {}) {
|
||||
const content = options.content || options.title || "确认操作?";
|
||||
return ElMessageBox.confirm(content, options.title || "提示", {
|
||||
const title = options.title || "提示";
|
||||
return ElMessageBox.confirm(content, title, {
|
||||
confirmButtonText: options.okText || "确定",
|
||||
cancelButtonText: options.cancelText || "取消",
|
||||
type: options.type || "warning",
|
||||
})
|
||||
.then(() => {
|
||||
if (typeof options.onOk === "function") {
|
||||
return options.onOk();
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action !== "confirm") {
|
||||
done();
|
||||
if (typeof options.onCancel === "function") {
|
||||
options.onCancel();
|
||||
}
|
||||
return;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
if (typeof options.onCancel === "function") {
|
||||
options.onCancel();
|
||||
if (typeof options.onOk !== "function") {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
});
|
||||
const result = options.onOk();
|
||||
if (result && typeof result.then === "function") {
|
||||
instance.confirmButtonLoading = true;
|
||||
result
|
||||
.then(() => done())
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
instance.confirmButtonLoading = false;
|
||||
});
|
||||
return;
|
||||
}
|
||||
done();
|
||||
},
|
||||
}).catch(() => {
|
||||
if (typeof options.onCancel === "function") {
|
||||
options.onCancel();
|
||||
}
|
||||
});
|
||||
},
|
||||
remove() {
|
||||
ElMessageBox.close();
|
||||
try {
|
||||
ElMessageBox.close();
|
||||
} catch (_) {
|
||||
// MessageBox 已关闭时忽略,避免操作已销毁 DOM 触发 parentNode 报错
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
<div class="goods-tab">
|
||||
<el-tabs v-model="currentStatus" @tab-click="onStatusTabClick">
|
||||
<el-tab-pane
|
||||
v-for="(item, index) in goodsStatusWithCount"
|
||||
:key="index"
|
||||
v-for="item in goodsStatusWithCount"
|
||||
:key="item.value"
|
||||
:label="item.title"
|
||||
:name="item.value"
|
||||
/>
|
||||
@@ -126,6 +126,7 @@
|
||||
|
||||
<el-table
|
||||
ref="table"
|
||||
:key="currentStatus"
|
||||
v-loading="loading"
|
||||
:data="data"
|
||||
class="mt_10"
|
||||
@@ -223,7 +224,13 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="auditModalVisible" title="商品审核" width="500px" :close-on-click-modal="false">
|
||||
<el-dialog
|
||||
v-model="auditModalVisible"
|
||||
title="商品审核"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-form ref="auditForm" :model="goodsAuditForm" label-width="100px">
|
||||
<el-form-item label="审核结果" prop="auth_flag">
|
||||
<el-radio-group v-model="goodsAuditForm.auth_flag">
|
||||
@@ -234,7 +241,7 @@
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="auditModalVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmAudit">提交审核</el-button>
|
||||
<el-button type="primary" :loading="auditSubmitLoading" @click="submitAudit">提交审核</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
@@ -243,6 +250,7 @@
|
||||
title="批量商品审核"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-form ref="batchAuditForm" :model="batchAuditForm" label-width="100px">
|
||||
<el-form-item label="审核结果" prop="auth_flag">
|
||||
@@ -251,7 +259,7 @@
|
||||
<el-radio :value="2">审核拒绝</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="batchAuditForm.auth_flag === 2" label="审核备注" prop="reason">
|
||||
<el-form-item v-show="batchAuditForm.auth_flag === 2" label="审核备注" prop="reason">
|
||||
<el-input v-model="batchAuditForm.reason" type="textarea" :rows="3" placeholder="请输入拒绝原因" />
|
||||
</el-form-item>
|
||||
<el-form-item label="选中商品">
|
||||
@@ -262,7 +270,7 @@
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="batchAuditModalVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitBatchAudit">提交审核</el-button>
|
||||
<el-button type="primary" :loading="batchAuditSubmitLoading" @click="submitBatchAudit">提交审核</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
@@ -321,6 +329,7 @@ export default {
|
||||
auth_flag: 1,
|
||||
},
|
||||
auditModalVisible: false, // 审核弹框显示状态
|
||||
auditSubmitLoading: false,
|
||||
currentAuditGoods: null, // 当前审核的商品
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
data: [], // 表单数据
|
||||
@@ -330,6 +339,7 @@ export default {
|
||||
selectedRows: [], // 选中的行数据
|
||||
selectAll: false, // 全选状态
|
||||
batchAuditModalVisible: false, // 批量审核弹框显示状态
|
||||
batchAuditSubmitLoading: false,
|
||||
batchAuditForm: {
|
||||
auth_flag: 1,
|
||||
reason: ''
|
||||
@@ -361,7 +371,8 @@ export default {
|
||||
this.$refs.table?.clearSelection?.();
|
||||
},
|
||||
onStatusTabClick(tab) {
|
||||
this.goodsStatusClick(tab.paneName);
|
||||
const status = tab.paneName ?? tab.props?.name;
|
||||
this.goodsStatusClick(status);
|
||||
},
|
||||
salesModelText(v) {
|
||||
if (v === "RETAIL") return "零售";
|
||||
@@ -532,35 +543,28 @@ export default {
|
||||
this.currentAuditGoods = goods;
|
||||
this.goodsAuditForm.auth_flag = 1;
|
||||
this.goodsAuditForm.reason = '';
|
||||
this.auditSubmitLoading = false;
|
||||
this.auditModalVisible = true;
|
||||
},
|
||||
|
||||
// 确认审核(二次确认)
|
||||
confirmAudit() {
|
||||
const auditText = this.goodsAuditForm.auth_flag === 1 ? '通过' : '拒绝';
|
||||
this.$Modal.confirm({
|
||||
title: '确认审核',
|
||||
content: `您确认要审核${auditText} "${this.currentAuditGoods.goodsName}" 吗?`,
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
this.submitAudit();
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 提交审核
|
||||
submitAudit() {
|
||||
let formData = new FormData();
|
||||
if (!this.currentAuditGoods) {
|
||||
return;
|
||||
}
|
||||
this.auditSubmitLoading = true;
|
||||
const formData = new FormData();
|
||||
formData.append('goodsIds', this.currentAuditGoods.id);
|
||||
formData.append('authFlag', this.goodsAuditForm.auth_flag === 1 ? 'PASS' : 'REFUSE');
|
||||
authGoods(formData).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success('审核成功');
|
||||
this.auditModalVisible = false;
|
||||
this.getDataList();
|
||||
this.getNumberData();
|
||||
}
|
||||
}).finally(() => {
|
||||
this.auditSubmitLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -668,36 +672,27 @@ export default {
|
||||
}
|
||||
|
||||
const actionText = this.batchAuditForm.auth_flag === 1 ? '通过' : '拒绝';
|
||||
const goodsNames = this.selectedRows.map(item => item.goodsName).join('、');
|
||||
const goodsIds = this.selectedRows.map(item => item.id);
|
||||
const formData = new FormData();
|
||||
formData.append('goodsIds', goodsIds.join(','));
|
||||
formData.append('authFlag', this.batchAuditForm.auth_flag === 1 ? 'PASS' : 'REFUSE');
|
||||
if (this.batchAuditForm.reason) {
|
||||
formData.append('reason', this.batchAuditForm.reason);
|
||||
}
|
||||
|
||||
this.$Modal.confirm({
|
||||
title: `确认批量审核${actionText}`,
|
||||
content: `您确认要${actionText}以下商品的审核吗?\n${goodsNames}`,
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 提取所有选中商品的ID
|
||||
const goodsIds = this.selectedRows.map(item => item.id);
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append('goodsId', goodsIds);
|
||||
formData.append('authFlag', this.batchAuditForm.auth_flag === 1 ? 'PASS' : 'REFUSE');
|
||||
formData.append('reason', this.batchAuditForm.reason || '');
|
||||
|
||||
// 修正:直接调用authGoods,不传递'batch'参数
|
||||
authGoods(formData).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success(`批量审核${actionText}成功`);
|
||||
this.selectedRows = [];
|
||||
this.selectAll = false;
|
||||
this.batchAuditModalVisible = false;
|
||||
this.getDataList();
|
||||
this.getNumberData();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$Modal.remove();
|
||||
});
|
||||
this.batchAuditSubmitLoading = true;
|
||||
authGoods(formData).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success(`批量审核${actionText}成功`);
|
||||
this.selectedRows = [];
|
||||
this.selectAll = false;
|
||||
this.batchAuditModalVisible = false;
|
||||
this.clearTableSelection();
|
||||
this.getDataList();
|
||||
this.getNumberData();
|
||||
}
|
||||
}).finally(() => {
|
||||
this.batchAuditSubmitLoading = false;
|
||||
});
|
||||
},
|
||||
loadGoodsGroupList() {
|
||||
|
||||
@@ -166,13 +166,11 @@ export default {
|
||||
this.$Modal.confirm({
|
||||
title: "确认审核",
|
||||
content: `您确认要审核${examine} ${v.goodsName} ?`,
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
const formData = new FormData();
|
||||
formData.append("goodsIds", v.id);
|
||||
formData.append("authFlag", this.goodsAuditForm.authFlag);
|
||||
authGoods(formData).then((res) => {
|
||||
this.$Modal.remove();
|
||||
return authGoods(formData).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("审核成功");
|
||||
this.getDataList();
|
||||
|
||||
@@ -107,11 +107,11 @@
|
||||
</div>
|
||||
<h4>商品详情描述</h4>
|
||||
<div class="form-item-view">
|
||||
<el-form-item label="商品描述">
|
||||
<div v-html="goods.intro"></div>
|
||||
<el-form-item class="goods-desc-item" label="商品描述">
|
||||
<div class="goods-desc-content" v-html="goods.intro"></div>
|
||||
</el-form-item>
|
||||
<el-form-item label="移动端描述">
|
||||
<div v-html="goods.mobileIntro"></div>
|
||||
<el-form-item class="goods-desc-item" label="移动端描述">
|
||||
<div class="goods-desc-content" v-html="goods.mobileIntro"></div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
@@ -179,6 +179,30 @@ div.base-info-item {
|
||||
.form-item-view {
|
||||
padding-left: 80px;
|
||||
}
|
||||
|
||||
.goods-desc-item {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.goods-desc-item .el-form-item__label {
|
||||
line-height: 24px;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.goods-desc-item .el-form-item__content {
|
||||
align-items: flex-start;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.goods-desc-content {
|
||||
line-height: 24px;
|
||||
text-align: left;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.goods-desc-content > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.demo-upload-list {
|
||||
|
||||
@@ -203,8 +203,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
openLogoPicker() {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
callbackSelected(val) {
|
||||
this.picModelFlag = false;
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
:close-on-click-modal="false"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-form ref="form" :model="formAdd" label-width="100px" :rules="formValidate">
|
||||
<el-form ref="form" :model="formAdd" label-width="110px" :rules="formValidate">
|
||||
<el-form-item v-if="showParent" label="上级分类" prop="parentId">
|
||||
{{ parentTitle }}
|
||||
<el-input v-model="formAdd.parentId" style="display: none" />
|
||||
@@ -79,7 +79,8 @@
|
||||
<el-form-item label="排序值" prop="sortOrder">
|
||||
<el-input-number v-model="formAdd.sortOrder" style="width: 200px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="佣金比例(%)" prop="commissionRate">
|
||||
<el-form-item prop="commissionRate" class="commission-rate-item">
|
||||
<template #label>佣金比例(%)</template>
|
||||
<el-input-number v-model="formAdd.commissionRate" :min="0" :max="100" style="width: 200px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="deleteFlag">
|
||||
@@ -451,4 +452,7 @@ export default {
|
||||
.mb_10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.commission-rate-item :deep(.el-form-item__label) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-model="infoFlag" :title="infoTitle" width="800px">
|
||||
<el-dialog v-model="infoFlag" :title="infoTitle" width="800px" @closed="onInfoDialogClosed">
|
||||
<div class="info-list" style="overflow: hidden">
|
||||
<div class="left-container">
|
||||
<div class="product">
|
||||
@@ -99,6 +99,7 @@
|
||||
<div class="show">
|
||||
<label>页面展示:</label>
|
||||
<el-switch
|
||||
v-if="detailStatusReady"
|
||||
v-model="infoData.status"
|
||||
active-value="OPEN"
|
||||
inactive-value="CLOSE"
|
||||
@@ -179,6 +180,8 @@ export default {
|
||||
infoData: {},
|
||||
infoFlag: false,
|
||||
infoTitle: "",
|
||||
currentReviewId: "",
|
||||
detailStatusReady: false,
|
||||
loading: true,
|
||||
searchForm: {
|
||||
pageNumber: 1,
|
||||
@@ -204,11 +207,15 @@ export default {
|
||||
if (grade === "MODERATE") return "中评";
|
||||
return "差评";
|
||||
},
|
||||
changeSwitchView(val) {
|
||||
const status = val;
|
||||
API_Member.updateMemberReview(this.infoData.id, { status }).then(() => {
|
||||
this.$Message.success("修改成功!");
|
||||
this.init();
|
||||
changeSwitchView(status) {
|
||||
if (!this.detailStatusReady || !this.currentReviewId) {
|
||||
return;
|
||||
}
|
||||
API_Member.updateMemberReview(this.currentReviewId, { status }).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("修改成功!");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
init() {
|
||||
@@ -227,10 +234,14 @@ export default {
|
||||
this.searchForm.pageSize = 20;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSwitch(v) {
|
||||
const status = v.status;
|
||||
API_Member.updateMemberReview(v.id, { status }).then(() => {
|
||||
this.init();
|
||||
changeSwitch(row) {
|
||||
if (!row || !row.id) {
|
||||
return;
|
||||
}
|
||||
API_Member.updateMemberReview(row.id, { status: row.status }).then((res) => {
|
||||
if (res.success) {
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
updateTop(v) {
|
||||
@@ -264,14 +275,25 @@ export default {
|
||||
this.loading = false;
|
||||
},
|
||||
info(v) {
|
||||
this.currentReviewId = v.id;
|
||||
this.detailStatusReady = false;
|
||||
this.infoData = {};
|
||||
this.infoFlag = true;
|
||||
this.infoTitle = `用户${v.memberName}的评价详情`;
|
||||
API_Member.getMemberInfoReview(v.id).then((res) => {
|
||||
if (res.result) {
|
||||
this.infoData = res.result;
|
||||
this.$nextTick(() => {
|
||||
this.detailStatusReady = true;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onInfoDialogClosed() {
|
||||
this.detailStatusReady = false;
|
||||
this.currentReviewId = "";
|
||||
this.infoData = {};
|
||||
},
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
|
||||
@@ -102,12 +102,25 @@ export default {
|
||||
height: auto;
|
||||
min-height: 56px;
|
||||
white-space: normal;
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
:deep(.el-menu-item:not(.is-active):hover),
|
||||
:deep(.el-menu-item:not(.is-active):focus) {
|
||||
background-color: #43444d !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
:deep(.el-menu-item.is-active) {
|
||||
background-color: #fff !important;
|
||||
color: $theme_color !important;
|
||||
}
|
||||
|
||||
:deep(.el-menu-item.is-active:hover),
|
||||
:deep(.el-menu-item.is-active:focus) {
|
||||
background-color: #fff !important;
|
||||
color: $theme_color !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sub-menu {
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
z-index: 19;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.single-page-con {
|
||||
|
||||
@@ -187,12 +187,7 @@
|
||||
type="primary"
|
||||
link
|
||||
class="upload"
|
||||
@click="
|
||||
() => {
|
||||
picModelFlag = true;
|
||||
$refs.ossManage.selectImage = true;
|
||||
}
|
||||
"
|
||||
@click="openPicSelector"
|
||||
>修改</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名" prop="name">
|
||||
@@ -538,6 +533,14 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
openPicSelector() {
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
callbackSelected(val) {
|
||||
this.picModelFlag = false;
|
||||
this.form.face = val.url;
|
||||
|
||||
@@ -94,12 +94,7 @@
|
||||
type="primary"
|
||||
link
|
||||
class="upload"
|
||||
@click="
|
||||
() => {
|
||||
picModelFlag = true;
|
||||
$refs.ossManage.selectImage = true;
|
||||
}
|
||||
"
|
||||
@click="openPicSelector"
|
||||
>修改</el-button>
|
||||
<input type="file" style="display: none" id="file" />
|
||||
</el-form-item>
|
||||
@@ -223,6 +218,14 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
openPicSelector() {
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
callbackSelected(val) {
|
||||
this.picModelFlag = false;
|
||||
this.formValidate.face = val.url;
|
||||
|
||||
@@ -49,11 +49,13 @@
|
||||
<draggable
|
||||
class="model-form-list"
|
||||
v-model="data.list"
|
||||
v-bind="{ group: 'model', ghostClass: 'ghost' }"
|
||||
:item-key="getModelItemKey"
|
||||
group="model"
|
||||
ghost-class="ghost"
|
||||
@end="handleMoveEnd"
|
||||
@add="handleModelAdd"
|
||||
>
|
||||
<template v-for="(element, index) in data.list" :key="element.key || index">
|
||||
<template #item="{ element, index }">
|
||||
<model-form-item
|
||||
v-if="element && element.key"
|
||||
:element="element"
|
||||
@@ -190,6 +192,9 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getModelItemKey(element) {
|
||||
return element.model || element.key || element.type;
|
||||
},
|
||||
handleSelectLink(item, index) {
|
||||
if (item) this.selectedNav = item;
|
||||
this.$refs.liliDialog.open("link");
|
||||
@@ -225,8 +230,12 @@ export default {
|
||||
}
|
||||
},
|
||||
handleSelectImg() {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
callbackSelected(item) {
|
||||
this.picModelFlag = false;
|
||||
@@ -234,16 +243,18 @@ export default {
|
||||
},
|
||||
handleModelAdd(evt) {
|
||||
const newIndex = evt.newIndex;
|
||||
|
||||
this.data.list[newIndex] = JSON.parse(JSON.stringify(this.data.list[newIndex]));
|
||||
const key = Date.parse(new Date()) + "_" + Math.ceil(Math.random() * 99999);
|
||||
const current = this.data.list[newIndex];
|
||||
if (!current || current.key) {
|
||||
return;
|
||||
}
|
||||
const key = Date.now() + "_" + Math.ceil(Math.random() * 99999);
|
||||
this.data.list[newIndex] = {
|
||||
...this.data.list[newIndex],
|
||||
...JSON.parse(JSON.stringify(current)),
|
||||
options: {
|
||||
...this.data.list[newIndex].options,
|
||||
...current.options,
|
||||
},
|
||||
key,
|
||||
model: this.data.list[newIndex].type + "_" + key,
|
||||
model: current.type + "_" + key,
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
@@ -62,41 +62,43 @@
|
||||
</template>
|
||||
<!-- 折扣广告 -->
|
||||
<template v-if="element.type == 'discountAdvert'">
|
||||
<div
|
||||
class="discountAdvert"
|
||||
:style="{
|
||||
'background-image':
|
||||
'url(' + require('@/assets/nav/decorate.png') + ')',
|
||||
}"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
v-for="(item, index) in element.options.classification"
|
||||
:key="index"
|
||||
class="setup-content"
|
||||
>
|
||||
<img :src="item.img" width="190" height="210" alt="" />
|
||||
<div class="setup-box">
|
||||
<div>
|
||||
<el-button size="small" @click.stop="handleSelectModel(item)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<div class="discountAdvert-wrap">
|
||||
<div
|
||||
class="discountAdvert"
|
||||
:style="{
|
||||
'background-image':
|
||||
'url(' + require('@/assets/nav/decorate.png') + ')',
|
||||
}"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
v-for="(item, index) in element.options.classification"
|
||||
:key="index"
|
||||
class="setup-content"
|
||||
>
|
||||
<img :src="item.img" width="190" height="210" alt="" />
|
||||
<div class="setup-box">
|
||||
<div>
|
||||
<el-button size="small" @click.stop="handleSelectModel(item)"
|
||||
>编辑</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div
|
||||
v-for="(item, index) in element.options.brandList"
|
||||
:key="index"
|
||||
class="setup-content"
|
||||
>
|
||||
<img :src="item.img" width="240" height="105" alt="" />
|
||||
<div class="setup-box">
|
||||
<div>
|
||||
<el-button size="small" @click.stop="handleSelectModel(item)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
v-for="(item, index) in element.options.brandList"
|
||||
:key="index"
|
||||
class="setup-content"
|
||||
>
|
||||
<img :src="item.img" width="240" height="105" alt="" />
|
||||
<div class="setup-box">
|
||||
<div>
|
||||
<el-button size="small" @click.stop="handleSelectModel(item)"
|
||||
>编辑</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -329,8 +331,12 @@ export default {
|
||||
|
||||
handleSelectImg() {
|
||||
// 选择图片
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 回显图片
|
||||
callbackSelected(val) {
|
||||
@@ -402,15 +408,23 @@ export default {
|
||||
}
|
||||
}
|
||||
/** 折扣广告 */
|
||||
.discountAdvert-wrap {
|
||||
width: 1200px;
|
||||
position: relative;
|
||||
}
|
||||
.discountAdvert {
|
||||
width: 1300px;
|
||||
height: 566px;
|
||||
margin-left: -100px;
|
||||
box-sizing: border-box;
|
||||
background-repeat: no-repeat;
|
||||
margin-left: -97px;
|
||||
background-size: 1300px 566px;
|
||||
position: relative;
|
||||
> div {
|
||||
padding-left: 295px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
&:nth-child(1) img {
|
||||
margin: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
@@ -184,8 +184,12 @@ export default {
|
||||
// 选择图片
|
||||
handleSelectImg(item) {
|
||||
this.selected = item;
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -145,8 +145,12 @@ export default {
|
||||
// 打开选择图片modal
|
||||
handleSelectImg(item) {
|
||||
this.selected = item;
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -277,8 +277,12 @@ export default {
|
||||
// 打开选择图片modal
|
||||
handleSelectImg(item) {
|
||||
this.selected = item;
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -127,8 +127,12 @@ export default {
|
||||
},
|
||||
handleSelectImg() {
|
||||
// 选择图片
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 选择图片回调
|
||||
callbackSelected(val) {
|
||||
|
||||
@@ -208,8 +208,12 @@ export default {
|
||||
this.defaultCallbackImageType = type;
|
||||
this.goodsIndex = index;
|
||||
// 选择图片
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleSelectGoods(val, index) {
|
||||
|
||||
@@ -194,8 +194,12 @@ export default {
|
||||
this.defaultCallbackImageType = type;
|
||||
this.goodsIndex = index;
|
||||
// 选择图片
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleSelectGoods(val, index) {
|
||||
|
||||
@@ -284,8 +284,12 @@ export default {
|
||||
},
|
||||
handleSelectImg() {
|
||||
// 选择图片
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 选择图片回显
|
||||
callbackSelected(val) {
|
||||
@@ -300,82 +304,171 @@ export default {
|
||||
.new-goods {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: stretch;
|
||||
> div {
|
||||
width: 393px;
|
||||
height: 440px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left > .content {
|
||||
> div:nth-child(1) {
|
||||
height: 240px;
|
||||
flex-direction: column;
|
||||
border: 1px solid #eee;
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
justify-content: space-between;
|
||||
img {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
}
|
||||
.describe {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
> div:nth-child(2) {
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
> div:nth-child(3),
|
||||
> div:nth-child(4) {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
|
||||
.middle > .content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-template-rows: repeat(3, 1fr);
|
||||
flex-direction: unset;
|
||||
overflow: hidden;
|
||||
> div {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
padding: 6px 4px 4px 6px;
|
||||
border-style: solid;
|
||||
border-color: #eee;
|
||||
border-width: 0;
|
||||
border-bottom-width: 1px;
|
||||
border-right-width: 1px;
|
||||
img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin-top: 2px;
|
||||
flex-shrink: 0;
|
||||
object-fit: cover;
|
||||
}
|
||||
> div {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
p {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.describe {
|
||||
margin-top: 4px;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
> div:nth-child(1) {
|
||||
grid-row: span 2;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 8px 6px;
|
||||
img {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
> div {
|
||||
flex: unset;
|
||||
width: 100%;
|
||||
p {
|
||||
white-space: normal;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.describe {
|
||||
margin-top: 6px;
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
> div:nth-child(1),
|
||||
> div:nth-child(2),
|
||||
> div:nth-child(3) {
|
||||
> div:nth-child(3),
|
||||
> div:nth-child(5) {
|
||||
border-right-width: 0;
|
||||
}
|
||||
> div:nth-child(4),
|
||||
> div:nth-child(5) {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.middle > .content {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-template-rows: repeat(3, 1fr);
|
||||
flex-direction: unset;
|
||||
> div {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-style: solid;
|
||||
border-color: #eee;
|
||||
border-width: 0;
|
||||
border-bottom-width: 1px;
|
||||
border-right-width: 1px;
|
||||
}
|
||||
> div:nth-child(6),
|
||||
> div:nth-child(3) {
|
||||
> div:nth-child(2n) {
|
||||
border-right-width: 0;
|
||||
}
|
||||
> div:nth-child(n + 5) {
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.right > .content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-rows: repeat(2, 1fr);
|
||||
flex-direction: unset;
|
||||
flex-wrap: unset;
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
> div {
|
||||
position: relative;
|
||||
width: 120px;
|
||||
padding: 5px 10px 0 10px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
box-sizing: border-box;
|
||||
padding: 4px 4px 2px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
flex-shrink: 0;
|
||||
display: block;
|
||||
object-fit: cover;
|
||||
}
|
||||
border-bottom: 1px solid #eee;
|
||||
border-right: 1px solid #eee;
|
||||
:nth-child(2) {
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 32px;
|
||||
line-height: 16px;
|
||||
margin-top: 4px;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
text-align: center;
|
||||
}
|
||||
:nth-child(3) {
|
||||
color: $theme_color;
|
||||
margin-top: 5px;
|
||||
margin-top: 2px;
|
||||
line-height: 1.2;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.jiaobiao {
|
||||
position: absolute;
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
top: 10px;
|
||||
right: 16px;
|
||||
top: 6px;
|
||||
right: 6px;
|
||||
background: url("../../../assets/festival_icon.png");
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
@@ -393,10 +486,11 @@ export default {
|
||||
background-position: -60px -30px;
|
||||
}
|
||||
}
|
||||
> div:nth-child(4),
|
||||
> div:nth-child(5),
|
||||
> div:nth-child(6) {
|
||||
border: none;
|
||||
> div:nth-child(3n) {
|
||||
border-right: none;
|
||||
}
|
||||
> div:nth-child(n + 4) {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,6 +515,8 @@ export default {
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
height: 370px;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
.con-item {
|
||||
width: 185px;
|
||||
@@ -434,6 +530,42 @@ export default {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
.middle > .content .con-item {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
padding: 6px 4px 4px 6px;
|
||||
img {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin-top: 2px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
> div {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
p {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.describe {
|
||||
margin-top: 4px;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.left > .content .con-item {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.describe {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -115,9 +115,13 @@ export default {
|
||||
},
|
||||
handleSelectImg(index){
|
||||
// 选择图片
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.current = index;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,10 +77,7 @@
|
||||
:key="index"
|
||||
class="setup-content"
|
||||
>
|
||||
<div
|
||||
class="right-item"
|
||||
:style="{ border: index === 2 || index === 3 ? 'none' : '' }"
|
||||
>
|
||||
<div class="right-item">
|
||||
<div>
|
||||
<span :style="{ background: msgRight.bgColor }">{{
|
||||
item.name
|
||||
@@ -272,8 +269,12 @@ export default {
|
||||
},
|
||||
handleSelectImg() {
|
||||
// 选择图片
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 选择图片回调
|
||||
callbackSelected(val) {
|
||||
@@ -345,55 +346,78 @@ export default {
|
||||
|
||||
.recommend-right {
|
||||
width: 595px;
|
||||
height: 360px;
|
||||
|
||||
.head-recommend {
|
||||
background: #a25684;
|
||||
}
|
||||
.content-right {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-template-rows: repeat(2, 1fr);
|
||||
height: 360px;
|
||||
padding-top: 10px;
|
||||
box-sizing: border-box;
|
||||
|
||||
> div {
|
||||
width: 50%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
height: 180px;
|
||||
padding-top: 10px;
|
||||
padding: 0;
|
||||
border-right: 1px solid #eee;
|
||||
border-bottom: 1px solid #eee;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:nth-child(2n) {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
&:nth-child(n + 3) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.right-item {
|
||||
border-bottom: 1px solid #eee;
|
||||
border-bottom: none;
|
||||
display: flex;
|
||||
margin-top: 30px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
height: 150px;
|
||||
padding: 0 10px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 10px 15px;
|
||||
font-size: 12px;
|
||||
box-sizing: border-box;
|
||||
|
||||
> div:nth-child(1) {
|
||||
width: 130px;
|
||||
margin-top: 30px;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-top: 0;
|
||||
text-align: left;
|
||||
|
||||
span:nth-child(1) {
|
||||
color: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 0 5px;
|
||||
background-color: #a25684;
|
||||
display: block;
|
||||
width: 120px;
|
||||
max-width: 120px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0 10px 10px 0;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 100;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
margin: 0;
|
||||
|
||||
img {
|
||||
max-height: 100px;
|
||||
max-width: 100px;
|
||||
@@ -401,9 +425,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
> div:nth-child(n + 1) {
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<swiper ref="mySwiper" :options="swiperOptions">
|
||||
<swiper-slide
|
||||
<div class="seckill-list">
|
||||
<div
|
||||
class="seckill-item"
|
||||
v-for="(item, index) in options.list[0].goodsList"
|
||||
:key="index"
|
||||
>
|
||||
@@ -29,22 +30,13 @@
|
||||
<span>{{ $filters.unitPrice(item.originalPrice, "¥") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Swiper, SwiperSlide, directive } from "vue-awesome-swiper";
|
||||
import "swiper/swiper-bundle.css";
|
||||
export default {
|
||||
components: {
|
||||
Swiper,
|
||||
SwiperSlide,
|
||||
},
|
||||
directives: {
|
||||
swiper: directive,
|
||||
},
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -62,12 +54,6 @@ export default {
|
||||
minutes: "00", // 分钟
|
||||
seconds: "00", // 秒
|
||||
interval: undefined, // 定时器
|
||||
swiperOptions: {
|
||||
// 轮播图参数
|
||||
slidesPerView: 5,
|
||||
autoplay: true,
|
||||
loop: true,
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -139,7 +125,6 @@ export default {
|
||||
new Date().getTime()) /
|
||||
1000
|
||||
);
|
||||
const that = this;
|
||||
this.interval = setInterval(() => {
|
||||
this.diffSeconds--;
|
||||
}, 1000);
|
||||
@@ -220,7 +205,14 @@ export default {
|
||||
.section {
|
||||
width: 1000px;
|
||||
// background: #efefef;
|
||||
.swiper-slide {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
.seckill-list {
|
||||
display: flex;
|
||||
min-width: 100%;
|
||||
}
|
||||
.seckill-item {
|
||||
flex: 0 0 200px;
|
||||
height: 260px;
|
||||
.content {
|
||||
width: 200px;
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<swiper ref="mySwiper" :options="swiperOptions">
|
||||
<swiper-slide
|
||||
<div class="seckill-list">
|
||||
<div
|
||||
class="seckill-item"
|
||||
v-for="(item, index) in options.list[0].goodsList"
|
||||
:key="index"
|
||||
>
|
||||
@@ -29,22 +30,13 @@
|
||||
<span>{{ $filters.unitPrice(item.originalPrice, "¥") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Swiper, SwiperSlide, directive } from "vue-awesome-swiper";
|
||||
import "swiper/swiper-bundle.css";
|
||||
export default {
|
||||
components: {
|
||||
Swiper,
|
||||
SwiperSlide,
|
||||
},
|
||||
directives: {
|
||||
swiper: directive,
|
||||
},
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -62,12 +54,6 @@ export default {
|
||||
minutes: "00", // 分钟
|
||||
seconds: "00", // 秒
|
||||
interval: undefined, // 定时器
|
||||
swiperOptions: {
|
||||
// 轮播图参数
|
||||
slidesPerView: 5,
|
||||
autoplay: true,
|
||||
loop: true,
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -139,7 +125,6 @@ export default {
|
||||
new Date().getTime()) /
|
||||
1000
|
||||
);
|
||||
const that = this;
|
||||
this.interval = setInterval(() => {
|
||||
this.diffSeconds--;
|
||||
}, 1000);
|
||||
@@ -220,7 +205,14 @@ export default {
|
||||
.section {
|
||||
width: 1000px;
|
||||
// background: #efefef;
|
||||
.swiper-slide {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
.seckill-list {
|
||||
display: flex;
|
||||
min-width: 100%;
|
||||
}
|
||||
.seckill-item {
|
||||
flex: 0 0 200px;
|
||||
height: 260px;
|
||||
.content {
|
||||
width: 200px;
|
||||
|
||||
@@ -2,11 +2,22 @@
|
||||
<div class="renovation">
|
||||
<div class="model-list">
|
||||
<div class="classification-title">基础模块</div>
|
||||
<draggable tag="ul" :list="modelData" v-bind="{group:{ name:'model', pull:'clone',put:false},sort:false, ghostClass: 'ghost'}" >
|
||||
<li v-for="(model, index) in modelData" :key="index" class="model-item">
|
||||
<el-icon><Picture /></el-icon>
|
||||
<span>{{model.name}}</span>
|
||||
</li>
|
||||
<draggable
|
||||
tag="ul"
|
||||
:list="modelData"
|
||||
:item-key="getModelKey"
|
||||
:clone="cloneModel"
|
||||
:group="{ name: 'model', pull: 'clone', put: false }"
|
||||
:sort="false"
|
||||
ghost-class="ghost"
|
||||
handle=".model-item"
|
||||
>
|
||||
<template #item="{ element: model }">
|
||||
<li class="model-item">
|
||||
<el-icon><Picture /></el-icon>
|
||||
<span>{{ model.name }}</span>
|
||||
</li>
|
||||
</template>
|
||||
</draggable>
|
||||
</div>
|
||||
<div class="show-content">
|
||||
@@ -73,6 +84,18 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getModelKey(model) {
|
||||
return model.type || model.name;
|
||||
},
|
||||
cloneModel(model) {
|
||||
const key = Date.now() + "_" + Math.ceil(Math.random() * 99999);
|
||||
const cloned = JSON.parse(JSON.stringify(model));
|
||||
return {
|
||||
...cloned,
|
||||
key,
|
||||
model: cloned.type + "_" + key,
|
||||
};
|
||||
},
|
||||
clearCache(){
|
||||
this.setStore('managerPCPageCache', '')
|
||||
this.$Message.success('清除成功')
|
||||
@@ -158,6 +181,15 @@ export default {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
:deep(ul) {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.model-item {
|
||||
width: 110px;
|
||||
@@ -165,7 +197,10 @@ export default {
|
||||
background: #eee;
|
||||
margin-top: 10px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
color: #999;
|
||||
transition:0.15s;
|
||||
border-radius: 4px;
|
||||
|
||||
@@ -156,8 +156,12 @@ export default {
|
||||
},
|
||||
// 点击选择照片
|
||||
handleClickFile() {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
}, // 图片选择器回显
|
||||
callbackSelected(val) {
|
||||
this.picModelFlag = false;
|
||||
|
||||
@@ -160,8 +160,12 @@ export default {
|
||||
},
|
||||
// 点击选择图片
|
||||
handleClickFile(item, index) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 点击链接
|
||||
clickLink(item) {
|
||||
|
||||
@@ -767,9 +767,13 @@ export default {
|
||||
},
|
||||
// 点击选择图片
|
||||
handleClickFile(item, index) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.selectedGoods = item;
|
||||
this.picModelFlag = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
removeNotice(index) {
|
||||
this.$nextTick(() => {
|
||||
|
||||
@@ -6,21 +6,21 @@
|
||||
<draggable
|
||||
class="model-view-menu-item"
|
||||
:list="modelData"
|
||||
:item-key="getModelKey"
|
||||
:clone="cloneModel"
|
||||
:move="handleMove"
|
||||
v-bind="{
|
||||
group: { name: 'model', pull: 'clone', put: false, animation: 150 },
|
||||
sort: false,
|
||||
ghostClass: 'ghost',
|
||||
}"
|
||||
:group="{ name: 'model', pull: 'clone', put: false, animation: 150 }"
|
||||
:sort="false"
|
||||
ghost-class="ghost"
|
||||
>
|
||||
<template v-for="(model, index) in modelData" :key="index">
|
||||
<li
|
||||
v-if="!model.drawer && !model.drawerPromotions"
|
||||
class="model-item"
|
||||
>
|
||||
<img src alt />
|
||||
<span>{{ model.name }}</span>
|
||||
</li>
|
||||
<template #item="{ element: model }">
|
||||
<li
|
||||
v-if="!model.drawer && !model.drawerPromotions"
|
||||
class="model-item"
|
||||
>
|
||||
<img src alt />
|
||||
<span>{{ model.name }}</span>
|
||||
</li>
|
||||
</template>
|
||||
</draggable>
|
||||
</div>
|
||||
@@ -31,33 +31,32 @@
|
||||
<draggable
|
||||
class="draggable"
|
||||
group="model"
|
||||
ghostClass="ghost"
|
||||
ghost-class="ghost"
|
||||
@add="handleContentlAdd"
|
||||
@end="handleContentlEnd"
|
||||
v-model="contentData.list"
|
||||
:item-key="getContentItemKey"
|
||||
>
|
||||
<div
|
||||
class="list"
|
||||
v-for="(element, index) in contentData.list"
|
||||
:key="element.key"
|
||||
>
|
||||
<component
|
||||
class="component"
|
||||
:class="{ active: selected == index }"
|
||||
@click="handleComponent(element, index)"
|
||||
:is="templates[element.type]"
|
||||
:res="element.options"
|
||||
></component>
|
||||
<el-icon
|
||||
v-if="selected == index"
|
||||
@click="closeComponent(index)"
|
||||
class="close"
|
||||
:size="25"
|
||||
color="#e1251b"
|
||||
>
|
||||
<CircleClose />
|
||||
</el-icon>
|
||||
</div>
|
||||
<template #item="{ element, index }">
|
||||
<div class="list">
|
||||
<component
|
||||
class="component"
|
||||
:class="{ active: selected == index }"
|
||||
@click="handleComponent(element, index)"
|
||||
:is="templates[element.type]"
|
||||
:res="element.options"
|
||||
></component>
|
||||
<el-icon
|
||||
v-if="selected == index"
|
||||
@click="closeComponent(index)"
|
||||
class="close"
|
||||
:size="25"
|
||||
color="#e1251b"
|
||||
>
|
||||
<CircleClose />
|
||||
</el-icon>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
</div>
|
||||
</div>
|
||||
@@ -114,6 +113,21 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
getModelKey(model) {
|
||||
return model.type || model.name;
|
||||
},
|
||||
getContentItemKey(element) {
|
||||
return element.key || element.model || element.type;
|
||||
},
|
||||
cloneModel(model) {
|
||||
const key = Date.now() + "_" + Math.ceil(Math.random() * 99999);
|
||||
const cloned = JSON.parse(JSON.stringify(model));
|
||||
return {
|
||||
...cloned,
|
||||
key,
|
||||
model: cloned.type + "_" + key,
|
||||
};
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
// 先读缓存,如果缓存有值则读缓存。
|
||||
@@ -254,12 +268,14 @@ export default {
|
||||
package(val, newIndex) {
|
||||
this.contentData.list[newIndex] = "";
|
||||
val = JSON.parse(JSON.stringify(val));
|
||||
const key = val.key || Date.now() + "_" + Math.ceil(Math.random() * 99999);
|
||||
this.contentData.list[newIndex] = {
|
||||
...val,
|
||||
options: {
|
||||
...val.options,
|
||||
},
|
||||
model: val.type,
|
||||
key,
|
||||
model: val.model || val.type + "_" + key,
|
||||
};
|
||||
},
|
||||
// 拖动
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
style="width: 260px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间">
|
||||
<el-form-item label="活动时间" class="activity-time-form-item">
|
||||
<el-date-picker
|
||||
type="datetimerange"
|
||||
:disabled-date="options.disabledDate"
|
||||
@@ -22,7 +22,6 @@
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placeholder="请选择活动时间"
|
||||
style="width: 260px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -133,14 +132,25 @@
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-model="showCouponSelect" width="80%" title="选择优惠券" destroy-on-close>
|
||||
<el-dialog
|
||||
v-model="showCouponSelect"
|
||||
width="80%"
|
||||
title="选择优惠券"
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<couponTemplate
|
||||
:checked="true"
|
||||
:selectedList="selectCouponList"
|
||||
v-if="showCouponSelect"
|
||||
ref="couponPicker"
|
||||
manualConfirm
|
||||
:selectedList="tempCouponList"
|
||||
getType="ACTIVITY"
|
||||
promotionStatus="START"
|
||||
@selected="selectedCoupon"
|
||||
/>
|
||||
<template #footer>
|
||||
<el-button @click="cancelCouponSelect">取消</el-button>
|
||||
<el-button type="primary" @click="confirmCouponSelect">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="checkUserList" width="1200px" title="选择会员" destroy-on-close>
|
||||
@@ -173,6 +183,7 @@ export default {
|
||||
},
|
||||
},
|
||||
showCouponSelect: false,
|
||||
tempCouponList: [],
|
||||
rangeTime: "",
|
||||
checkUserList: false,
|
||||
selectedMember: [],
|
||||
@@ -241,9 +252,18 @@ export default {
|
||||
};
|
||||
});
|
||||
},
|
||||
selectedCoupon(val) {
|
||||
this.selectCouponList = val;
|
||||
cancelCouponSelect() {
|
||||
this.showCouponSelect = false;
|
||||
},
|
||||
confirmCouponSelect() {
|
||||
const list = this.$refs.couponPicker?.getSelection?.() || [];
|
||||
if (!list.length) {
|
||||
this.$Message.warning("请至少选择一张优惠券");
|
||||
return;
|
||||
}
|
||||
this.selectCouponList = list;
|
||||
this.reSelectCoupon();
|
||||
this.showCouponSelect = false;
|
||||
},
|
||||
delCoupon(index) {
|
||||
this.selectCouponList.splice(index, 1);
|
||||
@@ -251,8 +271,11 @@ export default {
|
||||
},
|
||||
reSelectCoupon() {
|
||||
this.form.couponActivityItems = this.selectCouponList.map((item) => {
|
||||
const existing = this.form.couponActivityItems.find(
|
||||
(entry) => entry.couponId === item.id
|
||||
);
|
||||
return {
|
||||
num: 1,
|
||||
num: existing ? existing.num : 1,
|
||||
couponId: item.id,
|
||||
};
|
||||
});
|
||||
@@ -264,6 +287,7 @@ export default {
|
||||
});
|
||||
},
|
||||
showSelector() {
|
||||
this.tempCouponList = [...this.selectCouponList];
|
||||
this.showCouponSelect = true;
|
||||
},
|
||||
handleSubmit() {
|
||||
@@ -320,7 +344,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scpoed>
|
||||
<style lang="scss" scoped>
|
||||
h4 {
|
||||
margin-bottom: 10px;
|
||||
padding: 0 10px;
|
||||
@@ -333,6 +357,14 @@ h4 {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.activity-time-form-item {
|
||||
:deep(.el-date-editor) {
|
||||
width: 380px !important;
|
||||
max-width: 380px;
|
||||
flex-grow: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.describe {
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
|
||||
@@ -606,5 +606,6 @@ h4 {
|
||||
.tips {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -204,6 +204,10 @@ export default {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
manualConfirm: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -222,6 +226,7 @@ export default {
|
||||
selectDate: [],
|
||||
showActionColumn: true,
|
||||
showStatusColumn: true,
|
||||
isSyncingSelection: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -232,6 +237,8 @@ export default {
|
||||
},
|
||||
selectedList: {
|
||||
handler(val) {
|
||||
if (this.isSyncingSelection) return;
|
||||
if (this.isSameSelection(val, this.selectList)) return;
|
||||
this.$nextTick(() => {
|
||||
this.syncTableSelection(val);
|
||||
});
|
||||
@@ -311,20 +318,39 @@ export default {
|
||||
};
|
||||
return map[type] || "";
|
||||
},
|
||||
isSameSelection(next, current) {
|
||||
const a = next || [];
|
||||
const b = current || [];
|
||||
if (a.length !== b.length) return false;
|
||||
const nextIds = a.map((item) => item.id).sort().join(",");
|
||||
const currentIds = b.map((item) => item.id).sort().join(",");
|
||||
return nextIds === currentIds;
|
||||
},
|
||||
syncTableSelection(selected) {
|
||||
const table = this.$refs.table;
|
||||
if (!table) return;
|
||||
const nextList = selected ? [...selected] : [];
|
||||
this.isSyncingSelection = true;
|
||||
table.clearSelection();
|
||||
if (!selected || !selected.length) return;
|
||||
this.data.forEach((row) => {
|
||||
if (selected.some((item) => item.id === row.id)) {
|
||||
table.toggleRowSelection(row, true);
|
||||
}
|
||||
if (nextList.length) {
|
||||
this.data.forEach((row) => {
|
||||
if (nextList.some((item) => item.id === row.id)) {
|
||||
table.toggleRowSelection(row, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
this.selectList = nextList;
|
||||
this.selectCount = nextList.length;
|
||||
this.$nextTick(() => {
|
||||
this.isSyncingSelection = false;
|
||||
});
|
||||
},
|
||||
check() {
|
||||
this.$emit("selected", this.selectList);
|
||||
},
|
||||
getSelection() {
|
||||
return [...this.selectList];
|
||||
},
|
||||
receivePage(id) {
|
||||
if (id) {
|
||||
this.$router.push({ name: "coupon-receive", query: { couponId: id } });
|
||||
@@ -356,9 +382,10 @@ export default {
|
||||
this.$refs.table?.clearSelection();
|
||||
},
|
||||
changeSelect(e) {
|
||||
if (this.isSyncingSelection) return;
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
if (this.getType === "ACTIVITY") this.check();
|
||||
if (this.getType === "ACTIVITY" && !this.manualConfirm) this.check();
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
@@ -611,10 +611,14 @@ export default {
|
||||
},
|
||||
// 选择图片modal
|
||||
handleCLickImg(val, index) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.selectedFormBtnName = val;
|
||||
this.picIndex = index;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 图片回显
|
||||
callbackSelected(val) {
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
</template>
|
||||
<script>
|
||||
import { setSetting, createIndex, getProgress, deleteGoodsDown, generateGoodsCache, delSkuIndex } from "@/api/index";
|
||||
import { handleSubmit } from "./validate";
|
||||
export default {
|
||||
props: ["res", "type"],
|
||||
data() {
|
||||
@@ -93,10 +92,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
submit(name) {
|
||||
const that = this;
|
||||
if (handleSubmit(that, name)) {
|
||||
this.setupSetting();
|
||||
}
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
this.setupSetting();
|
||||
} else {
|
||||
this.$Message.error("请正确填写内容!");
|
||||
}
|
||||
});
|
||||
},
|
||||
createIndex() {
|
||||
createIndex().then((res) => {
|
||||
|
||||
@@ -147,6 +147,16 @@ export const getGoodsSkuData = params => {
|
||||
export const getGoodsListData = params => {
|
||||
return getRequest("/goods/goods/list", params);
|
||||
};
|
||||
// 商品分组分页
|
||||
export const getGoodsGroupByPage = params => {
|
||||
return getRequest("/goods/goodsGroup/getByPage", params);
|
||||
};
|
||||
// 设定商品分组(批量)
|
||||
export const addGoodsGroupItems = (groupId, goodsIds) => {
|
||||
return postRequest(`/goods/goodsGroup/${groupId}/goods`, {
|
||||
goodsIds: Array.isArray(goodsIds) ? goodsIds.join(",") : goodsIds,
|
||||
});
|
||||
};
|
||||
// 获取商品数量
|
||||
export const getGoodsNumerData = (params) => {
|
||||
return getRequest('/goods/goods/goodsNumber', params)
|
||||
@@ -176,6 +186,9 @@ export const getGoodsCategoryAll = () => {
|
||||
return getRequest(`/goods/category/all`);
|
||||
};
|
||||
|
||||
// 兼容旧页面的分类树命名
|
||||
export const getCategoryTree = getGoodsCategoryAll;
|
||||
|
||||
// 获取当前店铺分类
|
||||
export const getShopGoodsLabelListSeller = () => {
|
||||
return getRequest(`/goods/label`);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// 统一请求路径前缀在libs/axios.js中修改
|
||||
import { getRequest, postRequest, putRequest ,postRequestWithNoForm } from "@/libs/axios";
|
||||
import { getRequest, postRequest, putRequest, deleteRequest, postRequestWithNoForm } from "@/libs/axios";
|
||||
|
||||
import { baseUrl } from "@/libs/axios.js";
|
||||
|
||||
@@ -42,6 +42,11 @@ export const getOrderDetail = sn => {
|
||||
return getRequest(`/order/order/${sn}`);
|
||||
};
|
||||
|
||||
// 订单付款
|
||||
export const orderPay = sn => {
|
||||
return postRequest(`/order/order/${sn}/pay`);
|
||||
};
|
||||
|
||||
// 调整订单金额
|
||||
export const modifyOrderPrice = (sn, params) => {
|
||||
return putRequest(`/order/order/update/${sn}/price`, params);
|
||||
@@ -65,18 +70,31 @@ export const editOrderConsignee = (sn, params) => {
|
||||
export const getComplainPage = params => {
|
||||
return getRequest(`/order/complain`, params);
|
||||
};
|
||||
export const getOrderComplain = getComplainPage;
|
||||
|
||||
//获取投诉详情
|
||||
export const getComplainDetail = id => {
|
||||
return getRequest(`/order/complain/${id}`);
|
||||
};
|
||||
export const getOrderComplainDetail = getComplainDetail;
|
||||
|
||||
//添加交易投诉对话
|
||||
export const addOrderComplaint = params => {
|
||||
return postRequest(`/order/complain/communication/`, params);
|
||||
return postRequest(`/order/complain/communication`, params);
|
||||
};
|
||||
export const addOrderCommunication = addOrderComplaint;
|
||||
|
||||
// 更新投诉状态
|
||||
export const storeComplain = params => {
|
||||
return putRequest(`/order/complain/status`, params);
|
||||
};
|
||||
|
||||
//添加交易投诉对话
|
||||
// 仲裁完成投诉
|
||||
export const orderComplete = (id, params) => {
|
||||
return putRequest(`/order/complain/complete/${id}`, params);
|
||||
};
|
||||
|
||||
//商家申诉
|
||||
export const appeal = params => {
|
||||
return putRequest(`/order/complain/appeal`, params);
|
||||
};
|
||||
@@ -110,11 +128,43 @@ export const orderTake = (sn, verificationCode) => {
|
||||
export const afterSaleOrderPage = params => {
|
||||
return getRequest(`/order/afterSale/page`, params);
|
||||
};
|
||||
export const getAfterSaleOrderPage = afterSaleOrderPage;
|
||||
|
||||
// 售后服务单详情
|
||||
export const afterSaleOrderDetail = sn => {
|
||||
return getRequest(`/order/afterSale/${sn}`);
|
||||
};
|
||||
export const getAfterSaleOrderDetail = afterSaleOrderDetail;
|
||||
|
||||
// 获取售后原因分页列表
|
||||
export const getAfterSaleReasonPage = params => {
|
||||
return getRequest(`/order/afterSaleReason/getByPage`, params);
|
||||
};
|
||||
|
||||
// 删除售后原因
|
||||
export const delAfterSaleReason = id => {
|
||||
return deleteRequest(`/order/afterSaleReason/delByIds/${id}`);
|
||||
};
|
||||
|
||||
// 添加售后原因
|
||||
export const addAfterSaleReason = params => {
|
||||
return postRequest(`/order/afterSaleReason`, params);
|
||||
};
|
||||
|
||||
// 修改售后原因
|
||||
export const editAfterSaleReason = (id, params) => {
|
||||
return putRequest(`/order/afterSaleReason/update/${id}`, params);
|
||||
};
|
||||
|
||||
// 售后单商家收货信息
|
||||
export const storeAddress = sn => {
|
||||
return getRequest(`/order/afterSale/getStoreAfterSaleAddress/${sn}`);
|
||||
};
|
||||
|
||||
// 售后退款
|
||||
export const refundPrice = (afterSaleSn, params) => {
|
||||
return putRequest(`/order/afterSale/refund/${afterSaleSn}`, params);
|
||||
};
|
||||
|
||||
// 商家审核
|
||||
export const afterSaleSellerReview = (sn, params) => {
|
||||
|
||||
@@ -145,6 +145,17 @@ export const removeSeckillGoods = (seckillId, ids) => {
|
||||
export const seckillDetail = (seckillId) => {
|
||||
return getRequest(`/promotion/seckill/${seckillId}`)
|
||||
}
|
||||
|
||||
// 删除秒杀活动
|
||||
export const delSeckill = (id) => {
|
||||
return deleteRequest(`/promotion/seckill/${id}`)
|
||||
}
|
||||
|
||||
// 关闭秒杀活动
|
||||
export const updateSeckillStatus = (id, params) => {
|
||||
return putRequest(`/promotion/seckill/status/${id}`, params)
|
||||
}
|
||||
|
||||
// 删除秒杀商品
|
||||
export const delSeckillGoods = params => {
|
||||
return deleteRequest(`/promotion/seckill/apply/${params.seckillId}/${params.id}`);
|
||||
@@ -197,3 +208,11 @@ export const getNthItemDiscountDetail = (id) => getRequest(`/promotion/nthItemDi
|
||||
export const saveNthItemDiscount = (params) => postRequest('/promotion/nthItemDiscount', params, { 'Content-type': 'application/json' })
|
||||
export const editNthItemDiscount = (params) => putRequest('/promotion/nthItemDiscount', params, { 'Content-type': 'application/json' })
|
||||
export const updateNthItemDiscountStatus = (id, params) => putRequest(`/promotion/nthItemDiscount/status/${id}`, params)
|
||||
|
||||
// 兼容平台优惠券命名(商家端实际调用店铺优惠券接口)
|
||||
export const getPlatformCouponList = getShopCouponList
|
||||
export const savePlatformCoupon = saveShopCoupon
|
||||
export const editPlatformCoupon = editShopCoupon
|
||||
export const getPlatformCoupon = getShopCoupon
|
||||
export const deletePlatformCoupon = deleteShopCoupon
|
||||
export const updatePlatformCouponStatus = updateCouponStatus
|
||||
|
||||
@@ -133,6 +133,150 @@ util.oneOf = function (ele, targetArr) {
|
||||
return targetArr.indexOf(ele) >= 0;
|
||||
};
|
||||
|
||||
util.getRouterObjByName = function (routers, name) {
|
||||
if (!name || !routers || !routers.length) {
|
||||
return null;
|
||||
}
|
||||
let routerObj = null;
|
||||
for (let item of routers) {
|
||||
if (item.name == name) {
|
||||
return item;
|
||||
}
|
||||
routerObj = util.getRouterObjByName(item.children, name);
|
||||
if (routerObj) {
|
||||
return routerObj;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
util.handleTitle = function (vm, item) {
|
||||
if (!item) {
|
||||
return "";
|
||||
}
|
||||
if (typeof item.title == "object") {
|
||||
return item.title;
|
||||
}
|
||||
return item.title;
|
||||
};
|
||||
|
||||
util.setCurrentPath = function (vm, name) {
|
||||
let title = "";
|
||||
let isOtherRouter = false;
|
||||
vm.$store.state.app.routers.forEach((item) => {
|
||||
if (item.children.length == 1) {
|
||||
if (item.children[0].name == name) {
|
||||
title = util.handleTitle(vm, item);
|
||||
if (item.name == "otherRouter") {
|
||||
isOtherRouter = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
item.children.forEach((child) => {
|
||||
if (child.name == name) {
|
||||
title = util.handleTitle(vm, child);
|
||||
if (item.name == "otherRouter") {
|
||||
isOtherRouter = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
let currentPathArr = [];
|
||||
if (name == "home_index") {
|
||||
currentPathArr = [
|
||||
{
|
||||
title: util.handleTitle(
|
||||
vm,
|
||||
util.getRouterObjByName(vm.$store.state.app.routers, "home_index")
|
||||
),
|
||||
path: "",
|
||||
name: "home_index",
|
||||
},
|
||||
];
|
||||
} else if ((name.indexOf("_index") >= 0 || isOtherRouter) && name !== "home_index") {
|
||||
currentPathArr = [
|
||||
{
|
||||
title: util.handleTitle(
|
||||
vm,
|
||||
util.getRouterObjByName(vm.$store.state.app.routers, "home_index")
|
||||
),
|
||||
path: "/home",
|
||||
name: "home_index",
|
||||
},
|
||||
{
|
||||
title: title,
|
||||
path: "",
|
||||
name: name,
|
||||
},
|
||||
];
|
||||
} else {
|
||||
let currentPathObj = vm.$store.state.app.routers.filter((item) => {
|
||||
if (item.children.length <= 1) {
|
||||
return item.children[0].name == name;
|
||||
}
|
||||
let i = 0;
|
||||
let childArr = item.children;
|
||||
let len = childArr.length;
|
||||
while (i < len) {
|
||||
if (childArr[i].name == name) {
|
||||
return true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return false;
|
||||
})[0];
|
||||
if (!currentPathObj) {
|
||||
currentPathArr = [];
|
||||
} else if (currentPathObj.children.length <= 1 && currentPathObj.name == "home") {
|
||||
currentPathArr = [
|
||||
{
|
||||
title: "首页",
|
||||
path: "",
|
||||
name: "home_index",
|
||||
},
|
||||
];
|
||||
} else if (currentPathObj.children.length <= 1 && currentPathObj.name !== "home") {
|
||||
currentPathArr = [
|
||||
{
|
||||
title: "首页",
|
||||
path: "/home",
|
||||
name: "home_index",
|
||||
},
|
||||
{
|
||||
title: currentPathObj.title,
|
||||
path: "",
|
||||
name: name,
|
||||
},
|
||||
];
|
||||
} else {
|
||||
let childObj = currentPathObj.children.filter((child) => {
|
||||
return child.name == name;
|
||||
})[0];
|
||||
currentPathArr = [
|
||||
{
|
||||
title: "首页",
|
||||
path: "/home",
|
||||
name: "home_index",
|
||||
},
|
||||
{
|
||||
title: currentPathObj.title,
|
||||
path: "",
|
||||
name: currentPathObj.name,
|
||||
},
|
||||
{
|
||||
title: childObj.title,
|
||||
path: currentPathObj.path + "/" + childObj.path,
|
||||
name: name,
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
vm.$store.commit("setCurrentPath", currentPathArr);
|
||||
|
||||
return currentPathArr;
|
||||
};
|
||||
|
||||
util.openNewPage = function (vm, name, argu, query) {
|
||||
if (!vm.$store) {
|
||||
return;
|
||||
@@ -229,11 +373,6 @@ util.initRouter = function (vm) {
|
||||
util.initMenuData(vm, menuData);
|
||||
window.localStorage.setItem("menuData", JSON.stringify(menuData));
|
||||
vm.$store.commit("setAdded", true);
|
||||
if (vm.$store.state.app.refMenu) {
|
||||
vm.$nextTick(() => {
|
||||
vm.$store.state.app.refMenu.updateActiveName();
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
let data = window.localStorage.getItem("menuData");
|
||||
@@ -244,11 +383,6 @@ util.initRouter = function (vm) {
|
||||
let menuData = JSON.parse(data);
|
||||
util.registerDynamicRoutes(menuData);
|
||||
util.initMenuData(vm, menuData);
|
||||
if (vm.$store.state.app.refMenu) {
|
||||
vm.$nextTick(() => {
|
||||
vm.$store.state.app.refMenu.updateActiveName();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -85,3 +85,26 @@ export function memberPromotionsStatusRender(h, status) {
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 优惠券「活动时间 / 有效期」文案(活动获取券:effectiveDays 为领取后有效天数)
|
||||
*/
|
||||
export function formatPromotionCouponValidityHtml(row) {
|
||||
if (!row) return "-";
|
||||
if (row.getType === "ACTIVITY") {
|
||||
const days = row.effectiveDays;
|
||||
if (days !== undefined && days !== null && days !== "") {
|
||||
const n = Number(days);
|
||||
if (!Number.isNaN(n) && n > 0) {
|
||||
return `领取后${n}天有效`;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (row.startTime && row.endTime) {
|
||||
return `${row.startTime}<br/>${row.endTime}`;
|
||||
}
|
||||
if (row.getType === "ACTIVITY" && row.rangeDayType === "DYNAMICTIME") {
|
||||
return "长期有效";
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
|
||||
@@ -25,24 +25,6 @@
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺名称">
|
||||
<el-select
|
||||
v-model="searchForm.storeId"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
remote
|
||||
:remote-method="searchChange"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in shopList"
|
||||
:key="item.id"
|
||||
:label="item.storeName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单时间">
|
||||
<el-date-picker
|
||||
v-model="timeRange"
|
||||
@@ -108,7 +90,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="distributionName" label="分销商" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column prop="storeName" label="店铺名称" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="状态" min-width="90">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row" :type="filterStatusTagType(row.distributionOrderStatus)">
|
||||
@@ -144,7 +125,6 @@
|
||||
<script>
|
||||
import { getDistributionOrder } from "@/api/distribution";
|
||||
import { orderStatusList } from "./dataJson";
|
||||
import { getShopListData } from "@/api/shops";
|
||||
import vueQr from "vue-qr";
|
||||
|
||||
export default {
|
||||
@@ -154,7 +134,6 @@ export default {
|
||||
return {
|
||||
timeRange: [],
|
||||
orderStatusList,
|
||||
shopList: [],
|
||||
distributionId: this.$route.query.id,
|
||||
loading: true,
|
||||
searchForm: {
|
||||
@@ -176,7 +155,6 @@ export default {
|
||||
methods: {
|
||||
init() {
|
||||
this.getDataList();
|
||||
this.getShopList();
|
||||
},
|
||||
changePage() {
|
||||
this.getDataList();
|
||||
@@ -202,26 +180,20 @@ export default {
|
||||
this.searchForm.startTime = null;
|
||||
this.searchForm.endTime = null;
|
||||
}
|
||||
getDistributionOrder(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
getShopList(val) {
|
||||
const params = {
|
||||
pageNumber: 1,
|
||||
pageSize: 20,
|
||||
storeName: val || "",
|
||||
};
|
||||
getShopListData(params).then((res) => {
|
||||
this.shopList = res.result.records;
|
||||
});
|
||||
},
|
||||
searchChange(val) {
|
||||
this.getShopList(val);
|
||||
getDistributionOrder(this.searchForm)
|
||||
.then((res) => {
|
||||
if (res?.success) {
|
||||
const page = res.result || {};
|
||||
this.data = page.records || [];
|
||||
this.total = page.total || 0;
|
||||
} else {
|
||||
this.data = [];
|
||||
this.total = 0;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
filterStatus(status) {
|
||||
const arr = [
|
||||
|
||||
@@ -78,15 +78,35 @@
|
||||
}
|
||||
|
||||
.sku-val {
|
||||
width: 100%;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.sku-val-label {
|
||||
margin-bottom: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sku-val-form {
|
||||
flex-wrap: wrap !important;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
>.ivu-form {
|
||||
flex-wrap: wrap !important;
|
||||
}
|
||||
|
||||
:deep(.sku-item-content-val) {
|
||||
margin-right: 20px;
|
||||
margin-left: 0 !important;
|
||||
width: auto !important;
|
||||
min-width: auto !important;
|
||||
|
||||
.el-form-item__content {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,9 +171,23 @@ div.base-info-item {
|
||||
|
||||
.sku-item-content-name {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.sku-item-label {
|
||||
font-weight: bold;
|
||||
margin-bottom: 8px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.sku-item-input-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,14 +114,6 @@
|
||||
>
|
||||
批量下架
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="currentStatus === 'TOBEAUDITED'"
|
||||
type="primary"
|
||||
:disabled="selectedRows.length === 0"
|
||||
@click="batchAudit"
|
||||
>
|
||||
批量审核
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
@@ -178,20 +170,15 @@
|
||||
<el-table-column prop="storeName" label="店铺名称" width="200" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="200" align="center" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<template v-if="row.authFlag === 'TOBEAUDITED'">
|
||||
<a class="link-text" @click="openAuditModal(row)">审核</a>
|
||||
<span class="op-split">|</span>
|
||||
<a class="link-text" @click="showDetail(row)">查看</a>
|
||||
</template>
|
||||
<template v-else-if="row.marketEnable === 'DOWN'">
|
||||
<template v-if="row.marketEnable === 'DOWN'">
|
||||
<a class="link-text" @click="upper(row)">上架</a>
|
||||
<span class="op-split">|</span>
|
||||
<a class="link-text" @click="showDetail(row)">查看</a>
|
||||
<a class="link-text" @click="editGoods(row)">编辑</a>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a class="link-text" @click="edit(row)">下架</a>
|
||||
<span class="op-split">|</span>
|
||||
<a class="link-text" @click="showDetail(row)">查看</a>
|
||||
<a class="link-text" @click="editGoods(row)">编辑</a>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -223,49 +210,6 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="auditModalVisible" title="商品审核" width="500px" :close-on-click-modal="false">
|
||||
<el-form ref="auditForm" :model="goodsAuditForm" label-width="100px">
|
||||
<el-form-item label="审核结果" prop="auth_flag">
|
||||
<el-radio-group v-model="goodsAuditForm.auth_flag">
|
||||
<el-radio :value="1">审核通过</el-radio>
|
||||
<el-radio :value="2">审核拒绝</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="auditModalVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmAudit">提交审核</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
v-model="batchAuditModalVisible"
|
||||
title="批量商品审核"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="batchAuditForm" :model="batchAuditForm" label-width="100px">
|
||||
<el-form-item label="审核结果" prop="auth_flag">
|
||||
<el-radio-group v-model="batchAuditForm.auth_flag">
|
||||
<el-radio :value="1">审核通过</el-radio>
|
||||
<el-radio :value="2">审核拒绝</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="batchAuditForm.auth_flag === 2" label="审核备注" prop="reason">
|
||||
<el-input v-model="batchAuditForm.reason" type="textarea" :rows="3" placeholder="请输入拒绝原因" />
|
||||
</el-form-item>
|
||||
<el-form-item label="选中商品">
|
||||
<div style="max-height: 200px; overflow-y: auto">
|
||||
<el-tag v-for="item in selectedRows" :key="item.id" style="margin: 2px">{{ item.goodsName }}</el-tag>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="batchAuditModalVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submitBatchAudit">提交审核</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="goodsGroupFlag" title="批量设置商品分组" width="420px">
|
||||
<el-form ref="goodsGroupForm" :model="goodsGroupForm" :rules="goodsGroupRule" label-width="90px">
|
||||
<el-form-item label="商品分组" prop="groupId">
|
||||
@@ -295,7 +239,6 @@ import {
|
||||
getGoodsNumerData,
|
||||
upGoods,
|
||||
lowGoods,
|
||||
authGoods,
|
||||
getGoodsGroupByPage,
|
||||
addGoodsGroupItems
|
||||
} from "@/api/goods";
|
||||
@@ -318,12 +261,6 @@ export default {
|
||||
// 下架原因
|
||||
reason: "",
|
||||
},
|
||||
goodsAuditForm: {
|
||||
// 商品审核表单
|
||||
auth_flag: 1,
|
||||
},
|
||||
auditModalVisible: false, // 审核弹框显示状态
|
||||
currentAuditGoods: null, // 当前审核的商品
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
@@ -331,11 +268,6 @@ export default {
|
||||
goodsNumerData: {},
|
||||
selectedRows: [], // 选中的行数据
|
||||
selectAll: false, // 全选状态
|
||||
batchAuditModalVisible: false, // 批量审核弹框显示状态
|
||||
batchAuditForm: {
|
||||
auth_flag: 1,
|
||||
reason: ''
|
||||
},
|
||||
goodsGroupFlag: false,
|
||||
goodsGroupLoading: false,
|
||||
goodsGroupList: [],
|
||||
@@ -477,10 +409,10 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
//查看商品详情
|
||||
showDetail(v) {
|
||||
// 编辑商品
|
||||
editGoods(v) {
|
||||
this.$filters.customRouterPush({
|
||||
name: "goods-detail",
|
||||
name: "goods-operation-edit",
|
||||
query: { id: v.id },
|
||||
});
|
||||
},
|
||||
@@ -498,73 +430,6 @@ export default {
|
||||
this.clearTableSelection();
|
||||
this.getDataList();
|
||||
},
|
||||
examine(v, authFlag) {
|
||||
// 审核商品
|
||||
let examine = "通过";
|
||||
this.goodsAuditForm.authFlag = "PASS";
|
||||
if (authFlag != 1) {
|
||||
examine = "拒绝";
|
||||
this.goodsAuditForm.authFlag = "REFUSE";
|
||||
}
|
||||
|
||||
this.$Modal.confirm({
|
||||
title: "确认审核",
|
||||
content: "您确认要审核" + examine + " " + v.goodsName + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
this.goodsAuditForm.goodsIds=v.id;
|
||||
let formData = new FormData();
|
||||
formData.append('goodsIds', v.id);
|
||||
formData.append('authFlag', this.goodsAuditForm.authFlag);
|
||||
|
||||
authGoods(formData).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("审核成功");
|
||||
this.getDataList();
|
||||
this.getNumberData();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 打开审核弹框
|
||||
openAuditModal(goods) {
|
||||
this.currentAuditGoods = goods;
|
||||
this.goodsAuditForm.auth_flag = 1;
|
||||
this.goodsAuditForm.reason = '';
|
||||
this.auditModalVisible = true;
|
||||
},
|
||||
|
||||
// 确认审核(二次确认)
|
||||
confirmAudit() {
|
||||
const auditText = this.goodsAuditForm.auth_flag === 1 ? '通过' : '拒绝';
|
||||
this.$Modal.confirm({
|
||||
title: '确认审核',
|
||||
content: `您确认要审核${auditText} "${this.currentAuditGoods.goodsName}" 吗?`,
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
this.submitAudit();
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 提交审核
|
||||
submitAudit() {
|
||||
let formData = new FormData();
|
||||
formData.append('goodsIds', this.currentAuditGoods.id);
|
||||
formData.append('authFlag', this.goodsAuditForm.auth_flag === 1 ? 'PASS' : 'REFUSE');
|
||||
authGoods(formData).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success('审核成功');
|
||||
this.auditModalVisible = false;
|
||||
this.getDataList();
|
||||
this.getNumberData();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
onSelectionChange(selection) {
|
||||
this.selectedRows = selection;
|
||||
@@ -640,68 +505,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 批量审核
|
||||
batchAudit() {
|
||||
if (this.selectedRows.length === 0) {
|
||||
this.$Message.warning('请先选择要审核的商品');
|
||||
return;
|
||||
}
|
||||
|
||||
// 重置批量审核表单
|
||||
this.batchAuditForm = {
|
||||
auth_flag: 1,
|
||||
reason: ''
|
||||
};
|
||||
this.batchAuditModalVisible = true;
|
||||
},
|
||||
|
||||
// 提交批量审核
|
||||
submitBatchAudit() {
|
||||
if (this.selectedRows.length === 0) {
|
||||
this.$Message.warning('请先选择要审核的商品');
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果是拒绝审核,必须填写原因
|
||||
if (this.batchAuditForm.auth_flag === 2 && !this.batchAuditForm.reason.trim()) {
|
||||
this.$Message.warning('审核拒绝时必须填写拒绝原因');
|
||||
return;
|
||||
}
|
||||
|
||||
const actionText = this.batchAuditForm.auth_flag === 1 ? '通过' : '拒绝';
|
||||
const goodsNames = this.selectedRows.map(item => item.goodsName).join('、');
|
||||
|
||||
this.$Modal.confirm({
|
||||
title: `确认批量审核${actionText}`,
|
||||
content: `您确认要${actionText}以下商品的审核吗?\n${goodsNames}`,
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 提取所有选中商品的ID
|
||||
const goodsIds = this.selectedRows.map(item => item.id);
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append('goodsId', goodsIds);
|
||||
formData.append('authFlag', this.batchAuditForm.auth_flag === 1 ? 'PASS' : 'REFUSE');
|
||||
formData.append('reason', this.batchAuditForm.reason || '');
|
||||
|
||||
// 修正:直接调用authGoods,不传递'batch'参数
|
||||
authGoods(formData).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success(`批量审核${actionText}成功`);
|
||||
this.selectedRows = [];
|
||||
this.selectAll = false;
|
||||
this.batchAuditModalVisible = false;
|
||||
this.getDataList();
|
||||
this.getNumberData();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$Modal.remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
loadGoodsGroupList() {
|
||||
getGoodsGroupByPage({ pageNumber: 1, pageSize: 1000 }).then((res) => {
|
||||
if (res && res.success && res.result) {
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="goods-type-actions">
|
||||
<el-button @click="cancelGoodsType">取消</el-button>
|
||||
<el-button type="primary" @click="confirmGoodsType">确认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 商品分类 -->
|
||||
<div class="content-goods-publish">
|
||||
@@ -64,7 +70,7 @@
|
||||
<!-- 底部按钮 -->
|
||||
<div class="footer">
|
||||
<div class="footer-btns">
|
||||
<el-button type="primary" @click="selectGoodsType = true">商品类型</el-button>
|
||||
<el-button type="primary" @click="openGoodsTypeDialog">商品类型</el-button>
|
||||
<el-button type="primary" @click="next">下一步</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -100,6 +106,7 @@ export default {
|
||||
],
|
||||
// 商品类型
|
||||
goodsType: "",
|
||||
pendingGoodsType: "",
|
||||
/** 1级分类列表*/
|
||||
categoryListLevel1: [],
|
||||
/** 2级分类列表*/
|
||||
@@ -108,15 +115,41 @@ export default {
|
||||
categoryListLevel3: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
selectGoodsType(val) {
|
||||
if (val) {
|
||||
this.syncGoodsTypeSelection();
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 点击商品类型
|
||||
handleClickGoodsType(val) {
|
||||
this.goodsTypeWay.map((item) => {
|
||||
return (item.check = false);
|
||||
syncGoodsTypeSelection() {
|
||||
this.pendingGoodsType = this.goodsType;
|
||||
this.goodsTypeWay.forEach((item) => {
|
||||
item.check = item.type === this.goodsType;
|
||||
});
|
||||
|
||||
val.check = !val.check;
|
||||
this.goodsType = val.type;
|
||||
},
|
||||
openGoodsTypeDialog() {
|
||||
this.selectGoodsType = true;
|
||||
},
|
||||
// 点击商品类型(仅临时选中,确认后才生效)
|
||||
handleClickGoodsType(val) {
|
||||
this.goodsTypeWay.forEach((item) => {
|
||||
item.check = item.type === val.type;
|
||||
});
|
||||
this.pendingGoodsType = val.type;
|
||||
},
|
||||
cancelGoodsType() {
|
||||
this.syncGoodsTypeSelection();
|
||||
this.selectGoodsType = false;
|
||||
},
|
||||
confirmGoodsType() {
|
||||
if (!this.pendingGoodsType) {
|
||||
this.$Message.error("请选择商品类型");
|
||||
return;
|
||||
}
|
||||
this.goodsType = this.pendingGoodsType;
|
||||
this.selectGoodsType = false;
|
||||
},
|
||||
/** 选择商城商品分类 */
|
||||
handleSelectCategory(row, index, level) {
|
||||
@@ -177,4 +210,22 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./addGoods.scss";
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.footer-btns {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.goods-type-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -120,19 +120,23 @@
|
||||
<div class="form-item-view">
|
||||
<el-form-item class="form-item-view-el required" label="主图" prop="goodsGalleryFiles">
|
||||
<div style="display: flex; flex-wrap: wrap;">
|
||||
<vuedraggable :animation="200" :list="baseInfoForm.goodsGalleryFiles">
|
||||
<div v-for="(item, __index) in baseInfoForm.goodsGalleryFiles" :key="__index"
|
||||
class="demo-upload-list">
|
||||
<template>
|
||||
<img :src="item" />
|
||||
<vuedraggable
|
||||
v-model="baseInfoForm.goodsGalleryFiles"
|
||||
:animation="200"
|
||||
:item-key="draggableItemKey"
|
||||
style="display: flex; flex-wrap: wrap"
|
||||
>
|
||||
<template #item="{ element }">
|
||||
<div class="demo-upload-list">
|
||||
<img :src="element" />
|
||||
<div class="demo-upload-list-cover">
|
||||
<div>
|
||||
<el-button link type="primary" @click="handleViewGoodsPicture(item)">预览</el-button>
|
||||
<el-button link type="danger" @click="handleRemoveGoodsPicture(item)">删除</el-button>
|
||||
<el-button link type="primary" @click="handleViewGoodsPicture(element)">预览</el-button>
|
||||
<el-button link type="danger" @click="handleRemoveGoodsPicture(element)">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</vuedraggable>
|
||||
<!--<Upload ref="upload"-->
|
||||
<!--:action="uploadFileUrl" :before-upload="handleBeforeUploadGoodsPicture"-->
|
||||
@@ -190,39 +194,34 @@
|
||||
<template #header>
|
||||
<el-button link type="danger" @click="handleCloseSkuItem($index, item)">删除规格项</el-button>
|
||||
</template>
|
||||
<div>
|
||||
<div style="display: flex;margin-bottom: 10px;font-weight: bold">规格项</div>
|
||||
<el-form-item class="sku-item-content-val flex" label="">
|
||||
|
||||
<div>
|
||||
<el-autocomplete
|
||||
v-model="item.name"
|
||||
:fetch-suggestions="(q, cb) => cb([])"
|
||||
maxlength="30"
|
||||
placeholder="请输入规格项名称"
|
||||
style="width: 150px"
|
||||
@focus="changeSkuItem(item.name)"
|
||||
@change="editSkuItem(item.name, $index, item)"
|
||||
/>
|
||||
|
||||
<el-switch
|
||||
v-if="$index === 0"
|
||||
v-model="openImage"
|
||||
style="margin-left: 10px"
|
||||
@change="changeSkuOpenImage"
|
||||
/>
|
||||
<span v-if="$index === 0" style="margin-left: 5px">添加规格图片</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<div class="sku-item-content-name">
|
||||
<div class="sku-item-label">规格项</div>
|
||||
<div class="sku-item-input-row">
|
||||
<el-autocomplete
|
||||
v-model="item.name"
|
||||
:fetch-suggestions="(q, cb) => cb([])"
|
||||
maxlength="30"
|
||||
placeholder="请输入规格项名称"
|
||||
style="width: 150px"
|
||||
@focus="changeSkuItem(item.name)"
|
||||
@change="editSkuItem(item.name, $index, item)"
|
||||
/>
|
||||
<el-switch
|
||||
v-if="$index === 0"
|
||||
v-model="openImage"
|
||||
style="margin-left: 10px"
|
||||
@change="changeSkuOpenImage"
|
||||
/>
|
||||
<span v-if="$index === 0" style="margin-left: 5px">添加规格图片</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sku-val">
|
||||
<div style="margin-bottom: 10px;font-weight: bold;display: flex">规格值 (输入完成后,鼠标点击其他地方后生效)</div>
|
||||
<el-form :model="item" class="flex">
|
||||
<div class="sku-val-label">规格值 (输入完成后,鼠标点击其他地方后生效)</div>
|
||||
<el-form :model="item" class="sku-val-form flex">
|
||||
<!--规格值文本列表-->
|
||||
<el-form-item v-for="(val, index) in item.spec_values" :key="index"
|
||||
class="sku-item-content-val flex" label="" style="line-height: 32px;">
|
||||
<div style="display: flex; justify-content: center; align-items: center;">
|
||||
<div style="display: flex; justify-content: flex-start; align-items: center;">
|
||||
|
||||
|
||||
<el-autocomplete
|
||||
@@ -244,19 +243,26 @@
|
||||
<!-- 内联错误提示 -->
|
||||
<div v-if="val._error" class="sku-inline-error">{{ val._error }}</div>
|
||||
<div v-if="$index === 0 && openImage" style="margin-top: 10px">
|
||||
<vuedraggable :animation="200" :list="val.images">
|
||||
<div v-for="(img, __index) in val.images" :key="__index" class="sku-upload-list"
|
||||
style="width: 180px;height: 140px">
|
||||
<template>
|
||||
<img :src="img" style="width: 180px;height: 140px" />
|
||||
<vuedraggable
|
||||
v-model="val.images"
|
||||
:animation="200"
|
||||
:item-key="draggableItemKey"
|
||||
style="display: flex; flex-wrap: wrap"
|
||||
>
|
||||
<template #item="{ element, index: imgIndex }">
|
||||
<div
|
||||
class="sku-upload-list"
|
||||
style="width: 180px;height: 140px"
|
||||
>
|
||||
<img :src="element" style="width: 180px;height: 140px" />
|
||||
<div class="sku-upload-list-cover">
|
||||
<div style="margin-top: 50px">
|
||||
<el-icon :size="25" style="cursor:pointer;margin-right:8px" @click="handleView(img)"><ZoomIn /></el-icon>
|
||||
<el-icon :size="25" style="cursor:pointer" @click="handleRemove(val.images, __index)"><Delete /></el-icon>
|
||||
<el-icon :size="25" style="cursor:pointer;margin-right:8px" @click="handleView(element)"><ZoomIn /></el-icon>
|
||||
<el-icon :size="25" style="cursor:pointer" @click="handleRemove(val.images, imgIndex)"><Delete /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</vuedraggable>
|
||||
<el-upload
|
||||
v-if="val.images.length < 1"
|
||||
@@ -311,21 +317,21 @@
|
||||
:prop="col.key"
|
||||
min-width="120"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<template #default="{ row, $index }">
|
||||
<span v-if="col.key && !col.slot">{{ row[col.key] }}</span>
|
||||
<el-input
|
||||
v-else-if="col.slot === 'sn'"
|
||||
v-model="row.sn"
|
||||
clearable
|
||||
placeholder="请输入货号"
|
||||
@change="updateSkuTable(row, 'sn')"
|
||||
@change="updateSkuTable(row, 'sn', $index)"
|
||||
/>
|
||||
<el-input
|
||||
v-else-if="col.slot === 'weight' && baseInfoForm.goodsType !== 'VIRTUAL_GOODS'"
|
||||
v-model="row.weight"
|
||||
clearable
|
||||
placeholder="请输入重量"
|
||||
@change="updateSkuTable(row, 'weight')"
|
||||
@change="updateSkuTable(row, 'weight', $index)"
|
||||
>
|
||||
<template #append>kg</template>
|
||||
</el-input>
|
||||
@@ -334,7 +340,7 @@
|
||||
v-model="row.quantity"
|
||||
clearable
|
||||
placeholder="请输入库存"
|
||||
@change="updateSkuTable(row, 'quantity')"
|
||||
@change="updateSkuTable(row, 'quantity', $index)"
|
||||
>
|
||||
<template #append>{{ baseInfoForm.goodsUnit || "" }}</template>
|
||||
</el-input>
|
||||
@@ -343,7 +349,7 @@
|
||||
v-model="row.cost"
|
||||
clearable
|
||||
placeholder="请输入成本价"
|
||||
@change="updateSkuTable(row, 'cost')"
|
||||
@change="updateSkuTable(row, 'cost', $index)"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
@@ -352,7 +358,7 @@
|
||||
v-model="row.price"
|
||||
clearable
|
||||
placeholder="请输入价格"
|
||||
@change="updateSkuTable(row, 'price')"
|
||||
@change="updateSkuTable(row, 'price', $index)"
|
||||
>
|
||||
<template #append>元</template>
|
||||
</el-input>
|
||||
@@ -414,15 +420,19 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item class="form-item-view-el" label="PC商品描述" prop="intro" style="width: 100%">
|
||||
<editor ref="editor" v-model="baseInfoForm.intro" height="800px" openXss></editor>
|
||||
<div class="promise-intro-btn">
|
||||
<el-button type="primary" @click="promiseIntroEditor">将PC商品描述同步到移动端描述
|
||||
</el-button>
|
||||
<div class="intro-editor-field">
|
||||
<editor ref="editor" v-model="baseInfoForm.intro" height="800px" openXss></editor>
|
||||
<div class="promise-intro-btn">
|
||||
<el-button type="primary" @click="promiseIntroEditor">将PC商品描述同步到移动端描述
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="form-item-view-el" label="移动端描述" prop="skuList" style="width: 100%">
|
||||
<editor ref="introEditor" v-model="baseInfoForm.mobileIntro" height="800px" openXss></editor>
|
||||
<div class="intro-editor-field">
|
||||
<editor ref="introEditor" v-model="baseInfoForm.mobileIntro" height="800px" openXss></editor>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-if="baseInfoForm.goodsType != 'VIRTUAL_GOODS'">
|
||||
@@ -669,7 +679,7 @@ export default {
|
||||
// 某一规格名下的规格值
|
||||
skuVal: [],
|
||||
// 规格展开的项
|
||||
open_panel: [1, 2],
|
||||
open_panel: ["1", "2"],
|
||||
/** 要提交的规格数据*/
|
||||
skuInfo: [],
|
||||
/** 物流模板 **/
|
||||
@@ -736,12 +746,18 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
draggableItemKey(item) {
|
||||
return item;
|
||||
},
|
||||
// 选择图片modal
|
||||
handleCLickImg(val, index) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.selectedFormBtnName = val;
|
||||
// this.picIndex = index;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleLoadingSkuData() {
|
||||
this.needToloadSku = false
|
||||
@@ -908,11 +924,21 @@ export default {
|
||||
this.baseInfoForm.goodsGalleryFiles =
|
||||
this.baseInfoForm.goodsGalleryFiles.filter((i) => i !== file);
|
||||
},
|
||||
assignSkuTableIndex() {
|
||||
this.skuTableData.forEach((row, index) => {
|
||||
row._index = index;
|
||||
});
|
||||
},
|
||||
// 更新sku图片
|
||||
updateSkuPicture() {
|
||||
this.baseInfoForm.regeneratorSkuFlag = true;
|
||||
let _index = this.selectedSku._index;
|
||||
this.skuTableData[_index] = this.selectedSku;
|
||||
if (_index === undefined || _index === null) {
|
||||
_index = this.skuTableData.indexOf(this.selectedSku);
|
||||
}
|
||||
if (_index >= 0) {
|
||||
this.skuTableData[_index] = this.selectedSku;
|
||||
}
|
||||
},
|
||||
// sku图片上传成功
|
||||
handleSuccess(res, file, images) {
|
||||
@@ -1251,13 +1277,12 @@ export default {
|
||||
},
|
||||
// 将pc商品描述同步给移动端
|
||||
promiseIntroEditor() {
|
||||
const pcContent = this.$refs.editor?.getContent?.() ?? this.baseInfoForm.intro ?? "";
|
||||
this.baseInfoForm.intro = pcContent;
|
||||
this.baseInfoForm.mobileIntro = pcContent;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.introEditor.setContent(this.baseInfoForm.intro);
|
||||
})
|
||||
|
||||
this.baseInfoForm.mobileIntro = this.baseInfoForm.intro;
|
||||
|
||||
this.$forceUpdate();
|
||||
this.$refs.introEditor?.setContent?.(pcContent);
|
||||
});
|
||||
},
|
||||
|
||||
/** 根据当前分类id查询商品应包含的参数 */
|
||||
@@ -1830,6 +1855,7 @@ export default {
|
||||
};
|
||||
}
|
||||
});
|
||||
this.assignSkuTableIndex();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1967,8 +1993,18 @@ export default {
|
||||
return option.toUpperCase().indexOf(value.toUpperCase()) !== -1;
|
||||
},
|
||||
/** 数据改变之后 抛出数据 */
|
||||
updateSkuTable(row, item, type = "default") {
|
||||
let index = row._index;
|
||||
updateSkuTable(row, item, rowIndex) {
|
||||
let index = rowIndex;
|
||||
if (index === undefined || index === null) {
|
||||
index = row._index;
|
||||
}
|
||||
if (index === undefined || index === null) {
|
||||
index = this.skuTableData.indexOf(row);
|
||||
}
|
||||
if (index < 0 || !this.skuTableData[index]) {
|
||||
return;
|
||||
}
|
||||
row._index = index;
|
||||
this.baseInfoForm.regeneratorSkuFlag = true;
|
||||
/** 进行自定义校验 判断是否是数字(小数也能通过)重量 */
|
||||
if (item === "weight") {
|
||||
@@ -1994,35 +2030,11 @@ export default {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// else if (item === "alertQuantity") {
|
||||
// if (
|
||||
// !/^[0-9]\d*$/.test(row[item]) ||
|
||||
// parseInt(row[item]) < 0 ||
|
||||
// parseInt(row[item]) > 99999999
|
||||
// ) {
|
||||
// // 库存预警
|
||||
// this.validateError.push([index, item]);
|
||||
// this.validatatxt = "请输入0~99999999之间的整数";
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// else if (item === "cost" || item === "price") {
|
||||
// if (
|
||||
// !regular.money.test(row[item]) ||
|
||||
// parseInt(row[item]) < 0 ||
|
||||
// parseInt(row[item]) > 99999999
|
||||
// ) {
|
||||
// // 成本价 价格
|
||||
// this.validateError.push([index, item]);
|
||||
// this.validatatxt = "请输入0~99999999之间的价格";
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
this.$nextTick(() => {
|
||||
this.skuTableData[index][item] = row[item];
|
||||
if (this.skuTableData[index]) {
|
||||
this.skuTableData[index][item] = row[item];
|
||||
}
|
||||
});
|
||||
// // migrated
|
||||
(this.skuTableData,[index][item],row[item])
|
||||
},
|
||||
// 店内分类选择
|
||||
selectTree(v) {
|
||||
@@ -2285,6 +2297,26 @@ export default {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.intro-editor-field {
|
||||
width: calc(100% - 400px);
|
||||
}
|
||||
|
||||
.promise-intro-btn {
|
||||
margin-top: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.footer-btns {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* .tox-notifications-container{
|
||||
|
||||
@@ -16,6 +16,10 @@ export default {
|
||||
components:{uploadImage},
|
||||
name: "Tinymce",
|
||||
props: {
|
||||
modelValue: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: "",
|
||||
@@ -25,6 +29,7 @@ export default {
|
||||
default:'500px'
|
||||
}
|
||||
},
|
||||
emits: ["update:modelValue", "input"],
|
||||
data() {
|
||||
return {
|
||||
// 引入编辑器的配置
|
||||
@@ -41,14 +46,19 @@ export default {
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
computed: {
|
||||
bindValue() {
|
||||
return this.modelValue ?? this.value ?? "";
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
bindValue: {
|
||||
handler(val) {
|
||||
if (!this.hasChange && this.hasInit) {
|
||||
// 当内容有更改且编辑器已初始化时,更新编辑器的内容
|
||||
this.$nextTick(() =>
|
||||
window.tinymce.get(this.tinymceId).setContent(val || "")
|
||||
);
|
||||
const editor = window.tinymce.get(this.tinymceId);
|
||||
if (editor) {
|
||||
this.$nextTick(() => editor.setContent(val || ""));
|
||||
}
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
@@ -69,19 +79,15 @@ export default {
|
||||
selector: `#${this.tinymceId}`,
|
||||
convert_urls: false,
|
||||
init_instance_callback: (editor) => {
|
||||
if (_this.value) {
|
||||
// 如果有初始值,则设置编辑器的内容为初始值
|
||||
this.$nextTick(() => editor.setContent(_this.value));
|
||||
if (_this.bindValue) {
|
||||
_this.$nextTick(() => editor.setContent(_this.bindValue));
|
||||
}
|
||||
_this.hasInit = true;
|
||||
// 监听编辑器内容的变化
|
||||
editor.on("NodeChange Change KeyUp SetContent", (event) => {
|
||||
if (_this.value) {
|
||||
// 内容发生更改
|
||||
this.hasChange = true;
|
||||
}
|
||||
// 通过 input 事件将编辑器的内容传递给父组件
|
||||
this.$emit("input", editor.getContent());
|
||||
editor.on("NodeChange Change KeyUp SetContent", () => {
|
||||
_this.hasChange = true;
|
||||
const content = editor.getContent();
|
||||
_this.$emit("update:modelValue", content);
|
||||
_this.$emit("input", content);
|
||||
});
|
||||
},
|
||||
setup(editor) {
|
||||
@@ -96,8 +102,15 @@ export default {
|
||||
});
|
||||
},
|
||||
setContent(value) {
|
||||
// 设置编辑器的内容
|
||||
window.tinymce.get(this.tinymceId).setContent(value);
|
||||
const editor = window.tinymce.get(this.tinymceId);
|
||||
if (!editor) {
|
||||
return;
|
||||
}
|
||||
const content = value || "";
|
||||
this.hasChange = false;
|
||||
editor.setContent(content);
|
||||
this.$emit("update:modelValue", content);
|
||||
this.$emit("input", content);
|
||||
},
|
||||
getContent() {
|
||||
// 获取编辑器的内容
|
||||
|
||||
@@ -4,28 +4,31 @@
|
||||
<el-dialog v-model="show" width="850px" title="上传图片" append-to-body :z-index="3500">
|
||||
<div class="import-oss" @click="importOSS">从资源库中导入</div>
|
||||
<div style="display: flex; flex-wrap: wrap">
|
||||
<vuedraggable :animation="200" :list="images">
|
||||
<div
|
||||
v-for="(item, __index) in images"
|
||||
:key="__index"
|
||||
class="upload-list"
|
||||
>
|
||||
<img alt="image" :src="item.url" />
|
||||
<div class="upload-list-cover">
|
||||
<div>
|
||||
<el-icon class="action-icon" :size="30" @click="handleView(item.url)">
|
||||
<ZoomIn />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="action-icon"
|
||||
:size="30"
|
||||
@click="handleRemoveGoodsPicture(__index)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
<vuedraggable
|
||||
v-model="images"
|
||||
:animation="200"
|
||||
:item-key="draggableItemKey"
|
||||
style="display: flex; flex-wrap: wrap"
|
||||
>
|
||||
<template #item="{ element, index }">
|
||||
<div class="upload-list">
|
||||
<img alt="image" :src="element.url" />
|
||||
<div class="upload-list-cover">
|
||||
<div>
|
||||
<el-icon class="action-icon" :size="30" @click="handleView(element.url)">
|
||||
<ZoomIn />
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="action-icon"
|
||||
:size="30"
|
||||
@click="handleRemoveGoodsPicture(index)"
|
||||
>
|
||||
<Delete />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</vuedraggable>
|
||||
<div class="upload-box">
|
||||
<el-upload
|
||||
@@ -58,17 +61,16 @@
|
||||
append-to-body
|
||||
:z-index="3600"
|
||||
destroy-on-close
|
||||
@closed="confirmUrls"
|
||||
@closed="resetOssSelection"
|
||||
>
|
||||
<OssManage
|
||||
ref="ossManage"
|
||||
:is-component="true"
|
||||
:initialize="showOssManager"
|
||||
@selected="(list) => { selectedImage = list }"
|
||||
@callback="handleCallback"
|
||||
@selected="handleOssSelected"
|
||||
/>
|
||||
<template #footer>
|
||||
<el-button @click="showOssManager = false">取消</el-button>
|
||||
<el-button @click="cancelOssImport">取消</el-button>
|
||||
<el-button type="primary" @click="confirmUrls">确定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -114,6 +116,9 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
draggableItemKey(item) {
|
||||
return item?.url || item;
|
||||
},
|
||||
handleClickUploadImage() {
|
||||
this.show = true;
|
||||
},
|
||||
@@ -153,18 +158,39 @@ export default {
|
||||
this.$Message.error(err?.message || String(err));
|
||||
},
|
||||
confirmUrls() {
|
||||
if (this.selectedImage.length) {
|
||||
this.selectedImage.forEach((element) => {
|
||||
this.images.push({ url: element.url });
|
||||
});
|
||||
}
|
||||
this.applySelectedImages();
|
||||
this.showOssManager = false;
|
||||
},
|
||||
handleCallback(val) {
|
||||
this.$Message.success("导入成功");
|
||||
this.images.push({ url: val.url });
|
||||
cancelOssImport() {
|
||||
this.selectedImage = [];
|
||||
this.showOssManager = false;
|
||||
},
|
||||
resetOssSelection() {
|
||||
this.selectedImage = [];
|
||||
},
|
||||
handleOssSelected(list) {
|
||||
this.selectedImage = Array.isArray(list) ? list : [];
|
||||
},
|
||||
parseOssSelectionUrl(item) {
|
||||
if (!item) {
|
||||
return "";
|
||||
}
|
||||
if (typeof item === "string") {
|
||||
const index = item.indexOf(",");
|
||||
return index >= 0 ? item.slice(index + 1) : item;
|
||||
}
|
||||
return item.url || "";
|
||||
},
|
||||
applySelectedImages() {
|
||||
(this.selectedImage || []).forEach((item) => {
|
||||
const url = this.parseOssSelectionUrl(item);
|
||||
if (url) {
|
||||
this.images.push({ url });
|
||||
}
|
||||
});
|
||||
},
|
||||
importOSS() {
|
||||
this.selectedImage = [];
|
||||
this.showOssManager = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
category(val) {
|
||||
this.goodsParams.categoryPath = val[2];
|
||||
this.goodsParams.categoryPath = val && val.length ? val.join(",") : "";
|
||||
},
|
||||
selectedWay: {
|
||||
handler() {
|
||||
|
||||
@@ -57,8 +57,9 @@ export default {
|
||||
this.goodsData = [];
|
||||
},
|
||||
clickClose() {
|
||||
this.$emit("closeFlag", false);
|
||||
this.flag = false;
|
||||
this.goodsFlag = false;
|
||||
this.$emit("closeFlag", false);
|
||||
},
|
||||
singleGoods() {
|
||||
var timer = setInterval(() => {
|
||||
|
||||
@@ -73,26 +73,21 @@ export default {
|
||||
this.thirdIndex = index;
|
||||
},
|
||||
init() {
|
||||
|
||||
|
||||
let category = JSON.parse(localStorage.getItem('category'))
|
||||
if (category) {
|
||||
const loadCategory = () => {
|
||||
const category = JSON.parse(localStorage.getItem("category"));
|
||||
if (!Array.isArray(category)) {
|
||||
return;
|
||||
}
|
||||
category.forEach((item) => {
|
||||
item.___type = "category";
|
||||
});
|
||||
this.categoryList = category;
|
||||
// this.handleClickChild(category[0], 0);
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
category = JSON.parse(localStorage.getItem('category'))
|
||||
category.forEach((item) => {
|
||||
item.___type = "category";
|
||||
});
|
||||
this.categoryList = category;
|
||||
// this.handleClickChild(category[0], 0);
|
||||
},3000)
|
||||
}
|
||||
};
|
||||
|
||||
loadCategory();
|
||||
if (!this.categoryList.length) {
|
||||
setTimeout(loadCategory, 3000);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -95,12 +95,25 @@ export default {
|
||||
height: auto;
|
||||
min-height: 56px;
|
||||
white-space: normal;
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
:deep(.el-menu-item:not(.is-active):hover),
|
||||
:deep(.el-menu-item:not(.is-active):focus) {
|
||||
background-color: #43444d !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
:deep(.el-menu-item.is-active) {
|
||||
background-color: #fff !important;
|
||||
color: $theme_color !important;
|
||||
}
|
||||
|
||||
:deep(.el-menu-item.is-active:hover),
|
||||
:deep(.el-menu-item.is-active:focus) {
|
||||
background-color: #fff !important;
|
||||
color: $theme_color !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sub-menu {
|
||||
|
||||
@@ -112,10 +112,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleCLickImg(val, index) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModalFlag = true;
|
||||
this.selectedFormBtnName = val;
|
||||
this.picIndex = index;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
callbackSelected(val) {
|
||||
this.picModalFlag = false;
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="upload-pic-thumb">
|
||||
<vuedraggable
|
||||
:list="uploadList"
|
||||
:disabled="!draggable || !multiple"
|
||||
:animation="200"
|
||||
class="list-group"
|
||||
ghost-class="thumb-ghost"
|
||||
@end="onEnd"
|
||||
>
|
||||
<div v-for="(item, index) in uploadList" :key="index" class="upload-list">
|
||||
<div v-if="disable || isView" class="list-group">
|
||||
<div v-for="item in uploadList" :key="item.url" class="upload-list">
|
||||
<div v-if="item.status == 'finished'" style="height: 60px">
|
||||
<img :src="item.url" alt="" />
|
||||
<div class="upload-list-cover">
|
||||
@@ -25,6 +18,35 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<vuedraggable
|
||||
v-else
|
||||
v-model="uploadList"
|
||||
:disabled="disable || !draggable || !multiple"
|
||||
:animation="200"
|
||||
class="list-group"
|
||||
ghost-class="thumb-ghost"
|
||||
item-key="url"
|
||||
@end="onEnd"
|
||||
>
|
||||
<template #item="{ element: item }">
|
||||
<div class="upload-list">
|
||||
<div v-if="item.status == 'finished'" style="height: 60px">
|
||||
<img :src="item.url" alt="" />
|
||||
<div class="upload-list-cover">
|
||||
<el-icon class="action-icon" @click="handleView(item.url)"><View /></el-icon>
|
||||
<el-icon v-if="remove" class="action-icon" @click="handleRemove(item)"><Delete /></el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-progress
|
||||
v-if="item.showProgress"
|
||||
:percentage="item.percentage"
|
||||
:show-text="false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</vuedraggable>
|
||||
<div
|
||||
v-if="!isView"
|
||||
@@ -121,9 +143,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleCLickImg(val) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
this.selectedFormBtnName = val;
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.ossManage) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
callbackSelected(val) {
|
||||
this.picModelFlag = false;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
class="search-form"
|
||||
@keyup.enter="handleSearch"
|
||||
>
|
||||
<el-form-item label="关键字" prop="keywords" style="display: block; width: 100%">
|
||||
<el-form-item label="关键字" prop="keywords">
|
||||
<el-input
|
||||
v-model="searchForm.keywords"
|
||||
placeholder="请输入商品名称、订单编号搜索"
|
||||
@@ -61,17 +61,6 @@
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="售后类型">
|
||||
<el-select
|
||||
v-model="searchForm.serviceType"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option label="退款" value="RETURN_MONEY" />
|
||||
<el-option label="退货" value="RETURN_GOODS" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" class="search-btn" @click="handleSearch">搜索</el-button>
|
||||
</el-form-item>
|
||||
@@ -129,13 +118,6 @@
|
||||
{{ $filters.unitPrice(row.applyRefundPrice, "¥") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="售后类型" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row" :type="serviceTypeTagType(row.serviceType)">
|
||||
{{ serviceTypeText(row.serviceType) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="售后状态" width="180">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row" :type="serviceStatusTagType(row.serviceStatus)">
|
||||
@@ -182,6 +164,7 @@ export default {
|
||||
order: "desc",
|
||||
startDate: "",
|
||||
endDate: "",
|
||||
serviceType: "RETURN_GOODS",
|
||||
orderSn: "",
|
||||
memberName: "",
|
||||
serviceStatus: "",
|
||||
@@ -240,22 +223,6 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
serviceTypeText(type) {
|
||||
const map = {
|
||||
RETURN_MONEY: "退款",
|
||||
RETURN_GOODS: "退货",
|
||||
EXCHANGE_GOODS: "换货",
|
||||
};
|
||||
return map[type] || type || "-";
|
||||
},
|
||||
serviceTypeTagType(type) {
|
||||
const map = {
|
||||
RETURN_MONEY: "primary",
|
||||
RETURN_GOODS: "warning",
|
||||
EXCHANGE_GOODS: "success",
|
||||
};
|
||||
return map[type] || "info";
|
||||
},
|
||||
serviceStatusText(status) {
|
||||
const map = {
|
||||
APPLY: "申请中",
|
||||
@@ -331,7 +298,7 @@ export default {
|
||||
detail(v) {
|
||||
const sn = v.sn;
|
||||
this.$filters.customRouterPush({
|
||||
name: "after-order-detail",
|
||||
name: "return-goods-order-detail",
|
||||
query: { sn: sn },
|
||||
});
|
||||
},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user