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