mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-06 10:57:26 +08:00
feat: 增强组件功能与样式优化
- 在多个组件中添加了新的属性和方法以提升功能性,如在卡片组件中引入 _ActiveTab 属性以管理活动标签。 - 优化了商品详情和商户页面的收藏逻辑,确保在未登录状态下引导用户登录。 - 更新了轮播组件的路由解析逻辑,增强了用户体验。 - 改进了投诉列表和收藏列表的样式,提升了响应式布局和可读性。 - 在全局配置中添加了对开发环境的错误处理,提升了调试体验。
This commit is contained in:
@@ -50,12 +50,21 @@ export default {
|
||||
type: null,
|
||||
default: null,
|
||||
},
|
||||
_ActiveTab: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isActive: 0,
|
||||
isActive: this._ActiveTab,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
_ActiveTab(val) {
|
||||
this.isActive = val;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
callBack() {
|
||||
if (this._Src) {
|
||||
|
||||
@@ -173,11 +173,30 @@ export default {
|
||||
carouselItemKey(item, index) {
|
||||
return item?.img || item?.url || `slide-${index}`;
|
||||
},
|
||||
resolveRoute(pathStr) {
|
||||
if (!pathStr) return { path: "/" };
|
||||
const [path, search] = pathStr.split("?");
|
||||
if (!search) return { path };
|
||||
return {
|
||||
path,
|
||||
query: Object.fromEntries(new URLSearchParams(search)),
|
||||
};
|
||||
},
|
||||
// 快捷跳转中心
|
||||
entryControl(val) {
|
||||
console.log("val",val)
|
||||
let url = this.$router.resolve(val.path);
|
||||
window.open(url.href, '_blank');
|
||||
const location = this.resolveRoute(val.path);
|
||||
if (location.path.startsWith("/home/") && !storage.getItem("userInfo")) {
|
||||
this.$router.push({
|
||||
path: "/login",
|
||||
query: {
|
||||
rePath: location.path,
|
||||
query: JSON.stringify(location.query || {}),
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
const url = this.$router.resolve(location);
|
||||
window.open(url.href, "_blank");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{ item.name }}
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<div class="store-collect" v-if="!takeDownSale">
|
||||
<div class="store-collect" v-if="!takeDownSale && goodsMsg.data">
|
||||
<span class="mr_10" v-if="goodsMsg.data">
|
||||
<router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{
|
||||
goodsMsg.data.storeName
|
||||
@@ -176,14 +176,23 @@ export default {
|
||||
},
|
||||
async collect () {
|
||||
// 收藏店铺
|
||||
const storeId = this.goodsMsg.data && this.goodsMsg.data.storeId;
|
||||
if (!storeId) {
|
||||
return;
|
||||
}
|
||||
if (!this.Cookies.getItem("userInfo")) {
|
||||
this.$Message.warning("请先登录");
|
||||
this.$router.push("/login");
|
||||
return;
|
||||
}
|
||||
if (this.storeCollected) {
|
||||
let cancel = await cancelStoreCollect("STORE", this.goodsMsg.data.storeId);
|
||||
let cancel = await cancelStoreCollect("STORE", storeId);
|
||||
if (cancel.success) {
|
||||
this.$Message.success("已取消收藏");
|
||||
this.storeCollected = false;
|
||||
}
|
||||
} else {
|
||||
let collect = await collectStore("STORE", this.goodsMsg.data.storeId);
|
||||
let collect = await collectStore("STORE", storeId);
|
||||
if (collect.code === 200) {
|
||||
this.storeCollected = true;
|
||||
this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看");
|
||||
|
||||
@@ -285,14 +285,23 @@ export default {
|
||||
},
|
||||
async collect() {
|
||||
// 收藏店铺
|
||||
const storeId = this.storeMsg && this.storeMsg.storeId;
|
||||
if (!storeId) {
|
||||
return;
|
||||
}
|
||||
if (!this.Cookies.getItem("userInfo")) {
|
||||
this.$Message.warning("请先登录");
|
||||
this.$router.push("/login");
|
||||
return;
|
||||
}
|
||||
if (this.storeCollected) {
|
||||
let cancel = await cancelStoreCollect("STORE", this.storeMsg.storeId);
|
||||
let cancel = await cancelStoreCollect("STORE", storeId);
|
||||
if (cancel.success) {
|
||||
this.$Message.success("已取消收藏");
|
||||
this.storeCollected = false;
|
||||
}
|
||||
} else {
|
||||
let collect = await collectStore("STORE", this.storeMsg.storeId);
|
||||
let collect = await collectStore("STORE", storeId);
|
||||
if (collect.code === 200) {
|
||||
this.storeCollected = true;
|
||||
this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看");
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
<div class="order">
|
||||
<div class="order-title">
|
||||
<div class="order-row title">
|
||||
<div span="12">商品信息</div>
|
||||
<div span="4">投诉状态</div>
|
||||
<div span="4">投诉主题</div>
|
||||
<div span="6"></div>
|
||||
<div class="col-12">商品信息</div>
|
||||
<div class="col-4">投诉状态</div>
|
||||
<div class="col-4">投诉主题</div>
|
||||
<div class="col-4">投诉内容</div>
|
||||
</div>
|
||||
</div>
|
||||
<empty v-if="list.length === 0" />
|
||||
@@ -22,7 +22,7 @@
|
||||
<span class="hover-pointer fontsize_12 eval-detail" style="right: 90px" v-if="item.complainStatus === 'APPLYING' || item.complainStatus === 'NEW'" @click="cancel(item.id)">取消投诉</span>
|
||||
</div>
|
||||
<div class="order-item-view">
|
||||
<div span="12" class="item-view-name">
|
||||
<div class="col-12 item-view-name">
|
||||
<div class="order-img hover-color" @click="linkTo(`/goodsDetail?goodsId=${item.goodsId}&skuId=${item.skuId}`)">
|
||||
<img :src="item.goodsImage" alt="" />
|
||||
</div>
|
||||
@@ -30,11 +30,11 @@
|
||||
{{item.goodsName}}
|
||||
</div>
|
||||
</div>
|
||||
<div span="4">{{statusLabel[item.complainStatus]}}</div>
|
||||
<div span="4">
|
||||
<div class="col-4">{{statusLabel[item.complainStatus]}}</div>
|
||||
<div class="col-4">
|
||||
<div class="content">{{item.complainTopic}}</div>
|
||||
</div>
|
||||
<div span="4">
|
||||
<div class="col-4">
|
||||
<el-tooltip>
|
||||
<div class="content">{{item.content}}</div>
|
||||
<template #content>
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
clearComplain(id).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('取消投诉成功');
|
||||
this.getCartList();
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -159,8 +159,34 @@ export default {
|
||||
font-size: 13px;
|
||||
position: relative;
|
||||
}
|
||||
.order-row,
|
||||
.order-item-view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 10px 20px;
|
||||
|
||||
.col-12,
|
||||
.col-4 {
|
||||
box-sizing: border-box;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.col-12 {
|
||||
flex: 0 0 50%;
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
.col-4 {
|
||||
flex: 0 0 16.666667%;
|
||||
max-width: 16.666667%;
|
||||
}
|
||||
}
|
||||
|
||||
.order-item-view {
|
||||
align-items: flex-start;
|
||||
}
|
||||
.order-item {
|
||||
text-align: center;
|
||||
@@ -168,14 +194,16 @@ export default {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.order-row {
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
}
|
||||
.content {
|
||||
color: #999;
|
||||
max-height: 60px;
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
}
|
||||
|
||||
.eval-detail {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<card _Title="近期收藏" :_Tabs="favoriteWay" @_Change="change" :_Size="16" v-if="!homePage" />
|
||||
<card _Title="近期收藏" :_Size="16" :_Tabs="favoriteWay" @_Change="change" _More="全部收藏" _Src="/home/Favorites" v-else>
|
||||
<card _Title="近期收藏" :_Tabs="favoriteWay" :_ActiveTab="activeTabIndex" @_Change="change" :_Size="16" v-if="!homePage" />
|
||||
<card _Title="近期收藏" :_Size="16" :_Tabs="favoriteWay" :_ActiveTab="activeTabIndex" @_Change="change" _More="全部收藏" _Src="/home/Favorites" v-else>
|
||||
</card>
|
||||
<div v-if="list.length">
|
||||
<div v-for="(item, index) in list" :key="index">
|
||||
@@ -61,20 +61,42 @@ export default {
|
||||
spinShow: false // 加载状态
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
activeTabIndex() {
|
||||
return this.params.type === 'STORE' ? 1 : 0;
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() { // 获取收藏列表
|
||||
loadFavorites() {
|
||||
if (this.params.type === 'STORE') {
|
||||
this.getStoreList();
|
||||
} else {
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
getList() { // 获取商品收藏列表
|
||||
this.spinShow = true
|
||||
collectList(this.params).then(res => {
|
||||
if (res.success && res.result) {
|
||||
this.list = res.result.records || [];
|
||||
}
|
||||
}).catch(() => {
|
||||
this.list = [];
|
||||
}).finally(() => {
|
||||
this.spinShow = false
|
||||
if (res.success) this.list = res.result.records;
|
||||
})
|
||||
},
|
||||
getStoreList() { // 获取收藏列表
|
||||
getStoreList() { // 获取店铺收藏列表
|
||||
this.spinShow = true
|
||||
storeCollectList(this.params).then(res => {
|
||||
if (res.success && res.result) {
|
||||
this.list = res.result.records || [];
|
||||
}
|
||||
}).catch(() => {
|
||||
this.list = [];
|
||||
}).finally(() => {
|
||||
this.spinShow = false
|
||||
if (res.success) this.list = res.result.records;
|
||||
})
|
||||
},
|
||||
change(index) { // tab栏切换
|
||||
@@ -137,8 +159,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
if (this.homePage) this.params.pageSize = 5;
|
||||
this.getList()
|
||||
|
||||
this.loadFavorites();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -31,9 +31,8 @@
|
||||
{{ showZoneText(zone) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="hotzone-box-item-actions">
|
||||
<div class="hotzone-btn" @click="editZone(index)">修改</div>
|
||||
|
||||
<div class="hotzone-btn" @click="delZone(index)">删除</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -241,13 +240,16 @@ export default {
|
||||
}
|
||||
> div:nth-of-type(2) {
|
||||
width: 50%;
|
||||
min-width: 0;
|
||||
background: #f7f7f7;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.hotzone-add-box-body {
|
||||
height: 90%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.hotzone-box-item-main {
|
||||
@@ -258,11 +260,18 @@ export default {
|
||||
.hotzone-box-item {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
border-bottom: 1px solid #ededed;
|
||||
font-size: 12px;
|
||||
justify-content: space-between;
|
||||
padding: 5px 10px 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-width: 0;
|
||||
|
||||
> div:nth-child(2) {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.hotzone-add-box-footer {
|
||||
@@ -282,8 +291,18 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hotzone-box-item-actions {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.hotzone-box-item-text {
|
||||
width: 200px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<img class="show-image" :src="zoneForm.img" alt />
|
||||
</div>
|
||||
|
||||
<el-form :model="zoneForm" label-width="80px">
|
||||
<el-form :model="zoneForm" label-width="90px" class="hz-edit-form">
|
||||
<el-form-item label="跳转链接:">
|
||||
<el-input type="textarea" v-if="zoneForm.type === 'other' && zoneForm.title === '外部链接'" v-model="zoneForm.link" />
|
||||
<el-button size="small" type="primary" @click="handleSelectLink"
|
||||
@@ -252,3 +252,9 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.hz-edit-form :deep(.el-form-item__label) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,34 +1,31 @@
|
||||
import _ from '../utils'
|
||||
|
||||
export default {
|
||||
bind: function (el, binding, vnode) {
|
||||
const MIN_LIMIT = _.MIN_LIMIT
|
||||
mounted(el, binding) {
|
||||
const handleMouseDown = (e) => {
|
||||
const ctx = binding.instance
|
||||
if (!ctx) return
|
||||
|
||||
el.addEventListener('mousedown', handleMouseDown, { passive: false })
|
||||
|
||||
function handleMouseDown(e) {
|
||||
// console.log('additem', e)
|
||||
e && e.preventDefault()
|
||||
|
||||
let itemInfo = {
|
||||
top: _.getDistanceY(e, el),
|
||||
left: _.getDistanceX(e, el),
|
||||
width: 0,
|
||||
height: 0
|
||||
height: 0,
|
||||
}
|
||||
let container = _.getOffset(el)
|
||||
const container = _.getOffset(el)
|
||||
|
||||
// Only used once at the beginning of init
|
||||
let setting = {
|
||||
const setting = {
|
||||
topPer: _.decimalPoint(itemInfo.top / container.height),
|
||||
leftPer: _.decimalPoint(itemInfo.left / container.width),
|
||||
widthPer: 0,
|
||||
heightPer: 0
|
||||
heightPer: 0,
|
||||
}
|
||||
let preX = _.getPageX(e)
|
||||
let preY = _.getPageY(e)
|
||||
|
||||
vnode.context.addItem(setting)// 这里去添加并发送了add通知,不应该发送通知
|
||||
ctx.addItem(setting)
|
||||
|
||||
window.addEventListener('mousemove', handleChange, { passive: false })
|
||||
window.addEventListener('mouseup', handleMouseUp, { passive: false })
|
||||
@@ -36,56 +33,58 @@ export default {
|
||||
function handleChange(e) {
|
||||
e && e.preventDefault()
|
||||
|
||||
let moveX = _.getPageX(e) - preX
|
||||
let moveY = _.getPageY(e) - preY
|
||||
const moveX = _.getPageX(e) - preX
|
||||
const moveY = _.getPageY(e) - preY
|
||||
preX = _.getPageX(e)
|
||||
preY = _.getPageY(e)
|
||||
|
||||
// Not consider the direction of movement first, consider only the lower right drag point
|
||||
let minLimit = 0
|
||||
// 添加热区时,判定鼠标释放时,满足(热区大于48*48时)条件时生效
|
||||
let styleInfo = _.dealBR(itemInfo, moveX, moveY, minLimit)
|
||||
const minLimit = 0
|
||||
const styleInfo = _.dealBR(itemInfo, moveX, moveY, minLimit)
|
||||
|
||||
// Boundary value processing 改变热区大小时边界条件的处理
|
||||
itemInfo = _.dealEdgeValue(itemInfo, styleInfo, container, vnode.context.zones)
|
||||
itemInfo = _.dealEdgeValue(itemInfo, styleInfo, container, ctx.zones)
|
||||
|
||||
Object.assign(el.lastElementChild.style, {
|
||||
top: `${itemInfo.top}px`,
|
||||
left: `${itemInfo.left}px`,
|
||||
width: `${itemInfo.width}px`,
|
||||
height: `${itemInfo.height}px`
|
||||
height: `${itemInfo.height}px`,
|
||||
})
|
||||
}
|
||||
|
||||
function handleMouseUp() {
|
||||
let perInfo = {
|
||||
const perInfo = {
|
||||
topPer: _.decimalPoint(itemInfo.top / container.height),
|
||||
leftPer: _.decimalPoint(itemInfo.left / container.width),
|
||||
widthPer: _.decimalPoint(itemInfo.width / container.width),
|
||||
heightPer: _.decimalPoint(itemInfo.height / container.height),
|
||||
img: "",
|
||||
link: "",
|
||||
type: "",
|
||||
title: ""
|
||||
img: '',
|
||||
link: '',
|
||||
type: '',
|
||||
title: '',
|
||||
}
|
||||
|
||||
if (vnode.context.isOverRange()) {
|
||||
vnode.context.overRange() // 判断超出个数限制,给overRange钩子抛回调
|
||||
} else if (container.height < MIN_LIMIT && itemInfo.width > MIN_LIMIT) {
|
||||
vnode.context.changeItem(Object.assign(perInfo, {
|
||||
topPer: 0,
|
||||
heightPer: 1
|
||||
}), true)
|
||||
} else if (container.width < MIN_LIMIT && itemInfo.height > MIN_LIMIT) {
|
||||
vnode.context.changeItem(Object.assign(perInfo, {
|
||||
leftper: 0,
|
||||
widthPer: 1
|
||||
}), true)
|
||||
} else if (itemInfo.width > MIN_LIMIT && itemInfo.height > MIN_LIMIT) {
|
||||
vnode.context.changeItem(perInfo, true)
|
||||
if (ctx.isOverRange()) {
|
||||
ctx.overRange()
|
||||
} else if (container.height < _.MIN_LIMIT && itemInfo.width > _.MIN_LIMIT) {
|
||||
ctx.changeItem(
|
||||
Object.assign(perInfo, {
|
||||
topPer: 0,
|
||||
heightPer: 1,
|
||||
}),
|
||||
true
|
||||
)
|
||||
} else if (container.width < _.MIN_LIMIT && itemInfo.height > _.MIN_LIMIT) {
|
||||
ctx.changeItem(
|
||||
Object.assign(perInfo, {
|
||||
leftper: 0,
|
||||
widthPer: 1,
|
||||
}),
|
||||
true
|
||||
)
|
||||
} else if (itemInfo.width > _.MIN_LIMIT && itemInfo.height > _.MIN_LIMIT) {
|
||||
ctx.changeItem(perInfo, true)
|
||||
} else {
|
||||
// 当添加区域超出范围或小于最小区域(48*48)时触发,删除当亲绘制的热区并发送erase事件通知
|
||||
vnode.context.eraseItem()
|
||||
ctx.eraseItem()
|
||||
}
|
||||
|
||||
window.removeEventListener('mousemove', handleChange)
|
||||
@@ -93,9 +92,10 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
el.$destroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.__hotzoneAddDestroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.addEventListener('mousedown', handleMouseDown, { passive: false })
|
||||
},
|
||||
beforeUnmount(el) {
|
||||
el.__hotzoneAddDestroy?.()
|
||||
},
|
||||
unbind: function (el) {
|
||||
el.$destroy()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import _ from '../utils'
|
||||
|
||||
export default {
|
||||
bind: function (el, binding, vnode) {
|
||||
el.addEventListener('mousedown', handleMouseDown,{ passive: false })
|
||||
mounted(el, binding) {
|
||||
const handleMouseDown = (e) => {
|
||||
const ctx = binding.instance
|
||||
if (!ctx) return
|
||||
|
||||
function handleMouseDown (e) {
|
||||
let pointer = e.target.dataset.pointer //元素上绑定的方法名
|
||||
const pointer = e.target.dataset.pointer
|
||||
|
||||
if (!pointer) {
|
||||
return
|
||||
@@ -13,79 +14,81 @@ export default {
|
||||
|
||||
e && e.stopPropagation()
|
||||
|
||||
let zone = el.parentNode
|
||||
let setting = vnode.context.setting
|
||||
let currentIndex = vnode.context.index
|
||||
let container = _.getOffset(zone.parentNode)
|
||||
const zone = el.parentNode
|
||||
const setting = ctx.setting
|
||||
const currentIndex = ctx.index
|
||||
const container = _.getOffset(zone.parentNode)
|
||||
let itemInfo = {
|
||||
width: _.getOffset(zone).width || 0,
|
||||
height: _.getOffset(zone).height || 0,
|
||||
top: setting.topPer * container.height || 0,
|
||||
left: setting.leftPer * container.width || 0
|
||||
left: setting.leftPer * container.width || 0,
|
||||
}
|
||||
let preX = _.getPageX(e)
|
||||
let preY = _.getPageY(e)
|
||||
let flag
|
||||
|
||||
// Hide the info displayed by hover
|
||||
vnode.context.handlehideZone(true)
|
||||
ctx.handlehideZone(true)
|
||||
|
||||
window.addEventListener('mousemove', handleChange,{ passive: false })
|
||||
window.addEventListener('mouseup', handleMouseUp,{ passive: false })
|
||||
window.addEventListener('mousemove', handleChange, { passive: false })
|
||||
window.addEventListener('mouseup', handleMouseUp, { passive: false })
|
||||
|
||||
function handleChange (e) {
|
||||
function handleChange(e) {
|
||||
e && e.preventDefault()
|
||||
flag = true
|
||||
|
||||
let moveX = _.getPageX(e) - preX
|
||||
let moveY = _.getPageY(e) - preY
|
||||
const moveX = _.getPageX(e) - preX
|
||||
const moveY = _.getPageY(e) - preY
|
||||
|
||||
preX = _.getPageX(e)
|
||||
preY = _.getPageY(e)
|
||||
|
||||
// Handling the situation when different dragging points are selected
|
||||
let styleInfo = _[pointer](itemInfo, moveX, moveY)//调用对应的方法
|
||||
// Boundary value processing
|
||||
itemInfo = _.dealEdgeValue(itemInfo, styleInfo, container, vnode.context.$parent.zones, currentIndex)
|
||||
const styleInfo = _[pointer](itemInfo, moveX, moveY)
|
||||
itemInfo = _.dealEdgeValue(
|
||||
itemInfo,
|
||||
styleInfo,
|
||||
container,
|
||||
ctx.$parent.zones,
|
||||
currentIndex
|
||||
)
|
||||
|
||||
Object.assign(zone.style, {
|
||||
top: `${itemInfo.top}px`,
|
||||
left: `${itemInfo.left}px`,
|
||||
width: `${itemInfo.width}px`,
|
||||
height: `${itemInfo.height}px`
|
||||
height: `${itemInfo.height}px`,
|
||||
})
|
||||
}
|
||||
|
||||
function handleMouseUp () {
|
||||
function handleMouseUp() {
|
||||
if (flag) {
|
||||
flag = false
|
||||
let perInfo = {
|
||||
const perInfo = {
|
||||
topPer: _.decimalPoint(itemInfo.top / container.height),
|
||||
leftPer: _.decimalPoint(itemInfo.left / container.width),
|
||||
widthPer: _.decimalPoint(itemInfo.width / container.width),
|
||||
heightPer: _.decimalPoint(itemInfo.height / container.height)
|
||||
heightPer: _.decimalPoint(itemInfo.height / container.height),
|
||||
}
|
||||
vnode.context.changeInfo(perInfo)
|
||||
ctx.changeInfo(perInfo)
|
||||
|
||||
// 兼容数据无变更情况下导致 computed 不更新,数据仍为 px 时 resize 出现的问题
|
||||
Object.assign(zone.style, {
|
||||
top: `${itemInfo.top}px`,
|
||||
left: `${itemInfo.left}px`,
|
||||
width: `${itemInfo.width}px`,
|
||||
height: `${itemInfo.height}px`
|
||||
height: `${itemInfo.height}px`,
|
||||
})
|
||||
}
|
||||
// Show the info
|
||||
vnode.context.handlehideZone(false)
|
||||
ctx.handlehideZone(false)
|
||||
|
||||
window.removeEventListener('mousemove', handleChange)
|
||||
window.removeEventListener('mouseup', handleMouseUp)
|
||||
}
|
||||
}
|
||||
|
||||
el.$destroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.__hotzoneResizeDestroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.addEventListener('mousedown', handleMouseDown, { passive: false })
|
||||
},
|
||||
beforeUnmount(el) {
|
||||
el.__hotzoneResizeDestroy?.()
|
||||
},
|
||||
unbind: function (el) {
|
||||
el.$destroy()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
import _ from '../utils'
|
||||
|
||||
export default {
|
||||
bind: function (el, binding, vnode) {
|
||||
el.addEventListener('mousedown', handleMouseDown)
|
||||
mounted(el, binding) {
|
||||
let collision
|
||||
function handleMouseDown (e) {
|
||||
const handleMouseDown = (e) => {
|
||||
const ctx = binding.instance
|
||||
if (!ctx) return
|
||||
|
||||
e && e.stopPropagation()
|
||||
let container = _.getOffset(el.parentNode)
|
||||
const container = _.getOffset(el.parentNode)
|
||||
let preX = _.getPageX(e)
|
||||
let preY = _.getPageY(e)
|
||||
let topPer
|
||||
let leftPer
|
||||
let flag
|
||||
|
||||
window.addEventListener('mousemove', handleChange,{ passive: false })
|
||||
window.addEventListener('mouseup', handleMouseUp,{ passive: false })
|
||||
window.addEventListener('mousemove', handleChange, { passive: false })
|
||||
window.addEventListener('mouseup', handleMouseUp, { passive: false })
|
||||
|
||||
function handleChange (e) {
|
||||
function handleChange(e) {
|
||||
e && e.preventDefault()
|
||||
flag = true
|
||||
collision = false
|
||||
// Hide the info displayed by hover
|
||||
vnode.context.handlehideZone(true)
|
||||
ctx.handlehideZone(true)
|
||||
|
||||
let setting = vnode.context.setting
|
||||
let currentIndex = vnode.context.index
|
||||
const setting = ctx.setting
|
||||
const currentIndex = ctx.index
|
||||
let moveX = _.getPageX(e) - preX
|
||||
let moveY = _.getPageY(e) - preY
|
||||
|
||||
@@ -33,7 +34,6 @@ export default {
|
||||
topPer = _.decimalPoint(moveY / container.height + setting.topPer)
|
||||
leftPer = _.decimalPoint(moveX / container.width + setting.leftPer)
|
||||
|
||||
// Hotzone moving boundary processing
|
||||
if (topPer < 0) {
|
||||
topPer = 0
|
||||
moveY = -container.height * setting.topPer
|
||||
@@ -53,23 +53,20 @@ export default {
|
||||
leftPer = 1 - setting.widthPer
|
||||
moveX = container.width * (leftPer - setting.leftPer)
|
||||
}
|
||||
// 拖拽碰撞检测
|
||||
if (vnode.context.$parent.zones.length > 1) {
|
||||
let currentzones = JSON.parse(JSON.stringify(vnode.context.$parent.zones)).map((zone) => {
|
||||
return {
|
||||
left: (zone.leftPer || 0) * container.width,
|
||||
top: (zone.topPer || 0) * container.height,
|
||||
width: (zone.widthPer || 0) * container.width,
|
||||
height: (zone.heightPer || 0) * container.height
|
||||
}
|
||||
})
|
||||
// 矫正
|
||||
let changeSetting = {}
|
||||
changeSetting.left = setting.leftPer * container.width + moveX
|
||||
changeSetting.top = setting.topPer * container.height + moveY
|
||||
changeSetting.width = setting.widthPer * container.width
|
||||
changeSetting.height = setting.heightPer * container.height
|
||||
// 碰撞检测
|
||||
|
||||
if (ctx.$parent.zones.length > 1) {
|
||||
const currentzones = JSON.parse(JSON.stringify(ctx.$parent.zones)).map((zone) => ({
|
||||
left: (zone.leftPer || 0) * container.width,
|
||||
top: (zone.topPer || 0) * container.height,
|
||||
width: (zone.widthPer || 0) * container.width,
|
||||
height: (zone.heightPer || 0) * container.height,
|
||||
}))
|
||||
const changeSetting = {
|
||||
left: setting.leftPer * container.width + moveX,
|
||||
top: setting.topPer * container.height + moveY,
|
||||
width: setting.widthPer * container.width,
|
||||
height: setting.heightPer * container.height,
|
||||
}
|
||||
for (let i = 0, len = currentzones.length; i < len; i++) {
|
||||
if (currentIndex !== i && _.handleEgdeCollisions(currentzones[i], changeSetting)) {
|
||||
collision = true
|
||||
@@ -80,29 +77,29 @@ export default {
|
||||
el.style.transform = `translate(${moveX}px, ${moveY}px)`
|
||||
}
|
||||
|
||||
function handleMouseUp () {
|
||||
function handleMouseUp() {
|
||||
if (flag) {
|
||||
flag = false
|
||||
el.style.transform = 'translate(0, 0)'
|
||||
if (!collision) {
|
||||
vnode.context.changeInfo({
|
||||
ctx.changeInfo({
|
||||
topPer,
|
||||
leftPer
|
||||
leftPer,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Show the info
|
||||
vnode.context.handlehideZone(false)
|
||||
ctx.handlehideZone(false)
|
||||
|
||||
window.removeEventListener('mousemove', handleChange)
|
||||
window.removeEventListener('mouseup', handleMouseUp)
|
||||
}
|
||||
}
|
||||
|
||||
el.$destroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.__hotzoneDragDestroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.addEventListener('mousedown', handleMouseDown)
|
||||
},
|
||||
beforeUnmount(el) {
|
||||
el.__hotzoneDragDestroy?.()
|
||||
},
|
||||
unbind: function (el) {
|
||||
el.$destroy()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
destroy-on-close
|
||||
@close="clickClose"
|
||||
>
|
||||
<template v-if="flag">
|
||||
<template v-if="flag && hotzoneRes">
|
||||
<hotzone
|
||||
ref="hotzone"
|
||||
@change="changeHotzone"
|
||||
:zonesInit="res.zoneInfo"
|
||||
:image="res.img"
|
||||
:zonesInit="hotzoneRes.zoneInfo"
|
||||
:image="hotzoneRes.img"
|
||||
></hotzone>
|
||||
</template>
|
||||
<template #footer>
|
||||
@@ -31,30 +31,35 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
flag: false, // modal显隐
|
||||
flag: false,
|
||||
hotzoneRes: null,
|
||||
};
|
||||
},
|
||||
props: ["res"],
|
||||
mounted() {},
|
||||
methods: {
|
||||
changeHotzone(info) {
|
||||
if (this.hotzoneRes) {
|
||||
this.hotzoneRes.zoneInfo = info;
|
||||
}
|
||||
this.$emit("changeZone", info);
|
||||
},
|
||||
// 关闭弹窗
|
||||
clickClose() {
|
||||
this.flag = false;
|
||||
this.hotzoneRes = null;
|
||||
this.$emit("closeFlag", false);
|
||||
},
|
||||
// 点击确认
|
||||
clickOK() {
|
||||
this.clickClose();
|
||||
},
|
||||
// 打开组件方法
|
||||
open(type, mutiple) {
|
||||
open(val) {
|
||||
this.hotzoneRes = val || null;
|
||||
if (this.hotzoneRes && !this.hotzoneRes.zoneInfo) {
|
||||
this.hotzoneRes.zoneInfo = [];
|
||||
}
|
||||
this.flag = true;
|
||||
},
|
||||
// 关闭组件
|
||||
close() {
|
||||
this.flag = false;
|
||||
this.hotzoneRes = null;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -58,8 +58,9 @@ export default {
|
||||
},
|
||||
// 关闭弹窗
|
||||
clickClose() {
|
||||
this.$emit("closeFlag", false);
|
||||
this.flag = false;
|
||||
this.goodsFlag = false;
|
||||
this.$emit("closeFlag", false);
|
||||
},
|
||||
// 单选商品
|
||||
singleGoods() {
|
||||
|
||||
@@ -39,7 +39,7 @@ export const Notice = {
|
||||
|
||||
export const Modal = {
|
||||
confirm(options = {}) {
|
||||
const content = options.content || options.title || "确认操作?";
|
||||
const content = normalizeModalContent(options.content || options.title || "确认操作?");
|
||||
const title = options.title || "提示";
|
||||
return ElMessageBox.confirm(content, title, {
|
||||
confirmButtonText: options.okText || "确定",
|
||||
@@ -76,6 +76,18 @@ export const Modal = {
|
||||
}
|
||||
});
|
||||
},
|
||||
warning(options = {}) {
|
||||
const content = normalizeModalContent(options.content || options.title || "");
|
||||
const title = options.title || "提示";
|
||||
return ElMessageBox.alert(content, title, {
|
||||
confirmButtonText: options.okText || "确定",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
if (typeof options.onOk === "function") {
|
||||
return options.onOk();
|
||||
}
|
||||
});
|
||||
},
|
||||
remove() {
|
||||
try {
|
||||
ElMessageBox.close();
|
||||
@@ -91,6 +103,11 @@ function normalize(content) {
|
||||
return String(content ?? "");
|
||||
}
|
||||
|
||||
function normalizeModalContent(content) {
|
||||
const text = normalize(content);
|
||||
return text.replace(/<\/?p>/gi, "").trim();
|
||||
}
|
||||
|
||||
export function setupLegacyMessage(app) {
|
||||
app.config.globalProperties.$Message = Message;
|
||||
app.config.globalProperties.$Modal = Modal;
|
||||
|
||||
35
manager/src/utils/print.js
Normal file
35
manager/src/utils/print.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 打印指定 DOM 区域(替代 vue-print-nb)
|
||||
*/
|
||||
export function printElement(elementId, title = "打印") {
|
||||
const el = document.getElementById(elementId);
|
||||
if (!el) {
|
||||
console.warn(`[print] element #${elementId} not found`);
|
||||
return;
|
||||
}
|
||||
const iframe = document.createElement("iframe");
|
||||
iframe.style.cssText = "position:fixed;right:0;bottom:0;width:0;height:0;border:0";
|
||||
document.body.appendChild(iframe);
|
||||
const doc = iframe.contentWindow.document;
|
||||
doc.open();
|
||||
doc.write(
|
||||
`<!DOCTYPE html><html><head><title>${title}</title><style>
|
||||
body{font-family:Arial,sans-serif;padding:12px;color:#333}
|
||||
table{width:100%;border-collapse:collapse}
|
||||
td,th{border:1px solid #ddd;padding:6px}
|
||||
.lineH30{line-height:30px}
|
||||
.f14{font-size:14px;color:#333}
|
||||
.printgoodtitle{font-size:14px;line-height:1.5;margin-top:15px;color:#333}
|
||||
.printgoodinfo{padding:10px}
|
||||
.printgooditem{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #eee}
|
||||
.printgoodname{flex:1}
|
||||
.printgoodguid{margin-top:4px;color:#666;font-size:12px}
|
||||
.printgoodguiditem{margin-right:8px}
|
||||
.printgoodnumber{white-space:nowrap;margin-left:12px}
|
||||
</style></head><body>${el.innerHTML}</body></html>`
|
||||
);
|
||||
doc.close();
|
||||
iframe.contentWindow.focus();
|
||||
iframe.contentWindow.print();
|
||||
setTimeout(() => document.body.removeChild(iframe), 1000);
|
||||
}
|
||||
@@ -6,7 +6,11 @@
|
||||
<div class="sidebar-menu-con menu-bar">
|
||||
<shrinkable-menu />
|
||||
</div>
|
||||
<div class="main-header-con" :style="{ height: '60px' }">
|
||||
<div
|
||||
class="main-header-con"
|
||||
:class="{ 'has-tabs': setting.isUseTabsRouter }"
|
||||
:style="{ height: setting.isUseTabsRouter ? '106px' : '60px' }"
|
||||
>
|
||||
<div class="main-header">
|
||||
<div class="header-logo-con">
|
||||
<img :src="domainLogo" key="max-logo" />
|
||||
@@ -51,15 +55,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="breadcrumb-bar" v-if="setting.isUseTabsRouter">
|
||||
<page-breadcrumb />
|
||||
<div class="tags-con" v-if="setting.isUseTabsRouter">
|
||||
<tags-page-opened :pageTagsList="pageTagsList" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="single-page-con"
|
||||
:style="{
|
||||
top: setting.isUseTabsRouter ? '104px' : '60px',
|
||||
height: setting.isUseTabsRouter ? 'calc(100% - 114px)' : 'calc(100% - 70px)',
|
||||
top: setting.isUseTabsRouter ? '106px' : '60px',
|
||||
height: setting.isUseTabsRouter ? 'calc(100% - 116px)' : 'calc(100% - 70px)',
|
||||
}"
|
||||
>
|
||||
<div class="single-page">
|
||||
@@ -75,7 +79,7 @@
|
||||
<script>
|
||||
import { UserFilled } from "@element-plus/icons-vue";
|
||||
import shrinkableMenu from "./main-parts/shrinkable-menu/shrinkable-menu.vue";
|
||||
import pageBreadcrumb from "./main-parts/page-breadcrumb.vue";
|
||||
import tagsPageOpened from "./main-parts/tags-page-opened.vue";
|
||||
import messageTip from "./main-parts/message-tip.vue";
|
||||
import circleLoading from "@/components/lili/circle-loading.vue";
|
||||
import Cookies from "js-cookie";
|
||||
@@ -88,7 +92,7 @@ export default {
|
||||
components: {
|
||||
UserFilled,
|
||||
shrinkableMenu,
|
||||
pageBreadcrumb,
|
||||
tagsPageOpened,
|
||||
messageTip,
|
||||
circleLoading,
|
||||
},
|
||||
|
||||
@@ -128,15 +128,16 @@ export default {
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
getCustomWordsPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
getCustomWordsPage(this.searchForm)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
|
||||
@@ -108,14 +108,15 @@
|
||||
<el-dialog
|
||||
v-model="modalVisible"
|
||||
title="修改分销员"
|
||||
width="600px"
|
||||
width="640px"
|
||||
:close-on-click-modal="false"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-form
|
||||
ref="distributionForm"
|
||||
:model="distributionForm"
|
||||
label-width="150px"
|
||||
label-width="180px"
|
||||
class="distribution-form"
|
||||
:rules="distributionFormValidate"
|
||||
>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
@@ -268,3 +269,9 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.distribution-form :deep(.el-form-item__label) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -128,15 +128,16 @@ export default {
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
getGoodsUnitPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
getGoodsUnitPage(this.searchForm)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
|
||||
@@ -264,15 +264,16 @@ export default {
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
API_Member.getMemberReview(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
API_Member.getMemberReview(this.searchForm)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
info(v) {
|
||||
this.currentReviewId = v.id;
|
||||
|
||||
@@ -152,14 +152,42 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login {
|
||||
height: 100%;
|
||||
background: url("../assets/background.png") no-repeat;
|
||||
background-color: #f0f2f5;
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
background-image: url("../assets/background.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center bottom;
|
||||
background-size: 100% auto;
|
||||
display: flex;
|
||||
background-size: cover;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
:deep(.el-input__wrapper) {
|
||||
background-color: #fff !important;
|
||||
box-shadow: 0 0 0 1px var(--el-border-color) inset !important;
|
||||
|
||||
&.is-focus {
|
||||
box-shadow: 0 0 0 1px var(--el-border-color) inset !important;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-input__inner) {
|
||||
background-color: transparent !important;
|
||||
|
||||
&:-webkit-autofill,
|
||||
&:-webkit-autofill:hover,
|
||||
&:-webkit-autofill:focus,
|
||||
&:-webkit-autofill:active {
|
||||
-webkit-box-shadow: 0 0 0 1000px #fff inset !important;
|
||||
box-shadow: 0 0 0 1000px #fff inset !important;
|
||||
-webkit-text-fill-color: #606266 !important;
|
||||
caret-color: #606266;
|
||||
transition: background-color 99999s ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
.verify-con {
|
||||
position: absolute;
|
||||
top: 150px;
|
||||
|
||||
@@ -42,17 +42,19 @@ export default {
|
||||
},
|
||||
getSite() {
|
||||
getBaseSite().then((res) => {
|
||||
const { domainLogo, domainIcon, siteName } = JSON.parse(
|
||||
res.result.settingValue
|
||||
);
|
||||
this.domainLogo = domainLogo;
|
||||
const expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||
localStorage.setItem("icontitle_expiration_time", expirationTime);
|
||||
localStorage.setItem("icon", domainLogo);
|
||||
localStorage.setItem("domainIcon", domainIcon);
|
||||
localStorage.setItem("title", siteName);
|
||||
this.applyFavicon(domainIcon || domainLogo);
|
||||
window.document.title = siteName + " - 运营后台";
|
||||
if (res.success && res.result && res.result.settingValue) {
|
||||
const { domainLogo, domainIcon, siteName } = JSON.parse(
|
||||
res.result.settingValue
|
||||
);
|
||||
this.domainLogo = domainLogo;
|
||||
const expirationTime = new Date().setHours(new Date().getHours() + 1);
|
||||
localStorage.setItem("icontitle_expiration_time", expirationTime);
|
||||
localStorage.setItem("icon", domainLogo);
|
||||
localStorage.setItem("domainIcon", domainIcon);
|
||||
localStorage.setItem("title", siteName);
|
||||
this.applyFavicon(domainIcon || domainLogo);
|
||||
window.document.title = siteName + " - 运营后台";
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@@ -165,7 +165,6 @@ export default {
|
||||
watch: {
|
||||
$route(to) {
|
||||
this.currentPageName = to.name;
|
||||
this.tagsCount = this.pageTagsList?.length;
|
||||
},
|
||||
visible(value) {
|
||||
if (value) {
|
||||
@@ -175,6 +174,9 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeUnmount() {
|
||||
document.body.removeEventListener("click", this.closeMenu);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -188,13 +190,13 @@ export default {
|
||||
z-index: 11000;
|
||||
list-style-type: none;
|
||||
border-radius: 4px;
|
||||
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
|
||||
li {
|
||||
margin: 0;
|
||||
padding: 5px 15px;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background: #eee;
|
||||
background: rgba($color: $theme_color, $alpha: 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -207,6 +209,21 @@ export default {
|
||||
font-size: 13px;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&.el-tag--info.el-tag--plain {
|
||||
color: #606266;
|
||||
border-color: #dcdfe6;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
&.el-tag--info.el-tag--plain .el-tag__close {
|
||||
color: #909399;
|
||||
|
||||
&:hover {
|
||||
color: #606266;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
& + .page-tag {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
@@ -55,9 +55,13 @@
|
||||
padding-left: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
z-index: 22;
|
||||
z-index: 20;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
|
||||
transition: padding 0.3s;
|
||||
|
||||
&.has-tabs {
|
||||
box-shadow: 0 2px 1px 1px rgba(100, 100, 100, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
&-breadcrumb {
|
||||
@@ -81,29 +85,30 @@
|
||||
}
|
||||
|
||||
.tags-con {
|
||||
height: 44px;
|
||||
height: 46px;
|
||||
z-index: -1;
|
||||
background: #fff;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
margin-left: 200px;
|
||||
width: calc(100% - 200px);
|
||||
background: #f0f0f0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.tags-outer-scroll-con {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding-right: 12px;
|
||||
padding-right: 120px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.tags-inner-scroll-body {
|
||||
position: absolute;
|
||||
padding: 0 6px;
|
||||
overflow: visible;
|
||||
white-space: nowrap;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
padding: 0 10px;
|
||||
overflow: visible;
|
||||
white-space: nowrap;
|
||||
transition: left 0.3s ease;
|
||||
}
|
||||
|
||||
@@ -126,6 +131,7 @@
|
||||
min-width: 740px;
|
||||
height: 60px;
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 1px 1px rgba(100, 100, 100, 0.1);
|
||||
position: relative;
|
||||
z-index: 11;
|
||||
display: flex;
|
||||
@@ -242,28 +248,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumb-bar {
|
||||
position: fixed;
|
||||
top: 60px;
|
||||
left: 212px;
|
||||
right: 0;
|
||||
height: 44px;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
z-index: 19;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.single-page-con {
|
||||
min-width: 740px;
|
||||
position: relative;
|
||||
left: 200px;
|
||||
top: 100px;
|
||||
top: 106px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: calc(100% - 110px);
|
||||
height: calc(100% - 116px);
|
||||
width: calc(100% - 200px);
|
||||
overflow: auto;
|
||||
background-color: #f0f0f0;
|
||||
@@ -272,7 +264,7 @@
|
||||
|
||||
.single-page {
|
||||
position: relative;
|
||||
margin: 10px 12px;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,8 @@
|
||||
direction="rtl"
|
||||
:z-index="950"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
class="benefit-form-drawer"
|
||||
>
|
||||
<el-form ref="addForm" :model="formAdd" :rules="rulesAdd" label-width="110px">
|
||||
@@ -218,6 +220,8 @@
|
||||
direction="rtl"
|
||||
:z-index="950"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
class="benefit-form-drawer"
|
||||
>
|
||||
<el-form ref="editForm" :model="formEdit" :rules="rulesEdit" label-width="110px">
|
||||
@@ -807,7 +811,7 @@ export default {
|
||||
const text = checked ? "开启" : "关闭";
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
content: `<p>确定${text}该客户权益?</p>`,
|
||||
content: `确定${text}该客户权益?`,
|
||||
onOk: () => {
|
||||
row._benefitStateLoading = true;
|
||||
return API_Member.updateMemberBenefitState(row.id, nextState)
|
||||
@@ -829,7 +833,7 @@ export default {
|
||||
remove(row) {
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
content: "<p>确定删除该客户权益?</p>",
|
||||
content: "确定删除该客户权益?",
|
||||
onOk: () => {
|
||||
API_Member.deleteMemberBenefit(row.id).then((res) => {
|
||||
if (res && res.success) {
|
||||
|
||||
@@ -154,13 +154,30 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-model="addFlag" title="添加会员" width="500px" destroy-on-close>
|
||||
<el-form ref="addMemberForm" :model="addMemberForm" :rules="addRule" label-width="100px">
|
||||
<el-dialog v-model="addFlag" title="添加会员" width="500px" destroy-on-close class="add-member-dialog">
|
||||
<el-form
|
||||
ref="addMemberForm"
|
||||
:model="addMemberForm"
|
||||
:rules="addRule"
|
||||
label-width="100px"
|
||||
autocomplete="off"
|
||||
>
|
||||
<el-form-item label="手机号码" prop="mobile" style="width: 90%">
|
||||
<el-input v-model="addMemberForm.mobile" maxlength="11" placeholder="请输入手机号码" />
|
||||
<el-input
|
||||
v-model="addMemberForm.mobile"
|
||||
maxlength="11"
|
||||
placeholder="请输入手机号码"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员名称" prop="username" style="width: 90%">
|
||||
<el-input v-model="addMemberForm.username" maxlength="15" placeholder="请输入会员名称" />
|
||||
<el-input
|
||||
v-model="addMemberForm.username"
|
||||
maxlength="15"
|
||||
placeholder="请输入会员名称"
|
||||
autocomplete="off"
|
||||
name="member-username"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员密码" prop="password" style="width: 90%">
|
||||
<el-input
|
||||
@@ -169,6 +186,8 @@
|
||||
show-password
|
||||
maxlength="20"
|
||||
placeholder="请输入会员密码"
|
||||
autocomplete="new-password"
|
||||
name="member-password"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -509,8 +528,15 @@ export default {
|
||||
this.getMemberInfo(val.id);
|
||||
},
|
||||
addMember() {
|
||||
this.addMemberForm = {
|
||||
mobile: "",
|
||||
username: "",
|
||||
password: "",
|
||||
};
|
||||
this.addFlag = true;
|
||||
this.$refs.addMemberForm?.resetFields();
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addMemberForm?.clearValidate();
|
||||
});
|
||||
},
|
||||
getMemberInfo(id) {
|
||||
API_Member.getMemberInfoData(id).then((res) => {
|
||||
@@ -705,4 +731,30 @@ export default {
|
||||
margin: 0 8px;
|
||||
color: #dcdee2;
|
||||
}
|
||||
|
||||
.add-member-dialog {
|
||||
:deep(.el-input__wrapper) {
|
||||
background-color: #fff !important;
|
||||
box-shadow: 0 0 0 1px var(--el-border-color) inset !important;
|
||||
|
||||
&.is-focus {
|
||||
box-shadow: 0 0 0 1px var(--el-border-color) inset !important;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-input__inner) {
|
||||
background-color: transparent !important;
|
||||
|
||||
&:-webkit-autofill,
|
||||
&:-webkit-autofill:hover,
|
||||
&:-webkit-autofill:focus,
|
||||
&:-webkit-autofill:active {
|
||||
-webkit-box-shadow: 0 0 0 1000px #fff inset !important;
|
||||
box-shadow: 0 0 0 1000px #fff inset !important;
|
||||
-webkit-text-fill-color: #606266 !important;
|
||||
caret-color: #606266;
|
||||
transition: background-color 99999s ease-out;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -119,3 +119,14 @@
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.member-tab-panel {
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
.address-table {
|
||||
:deep(table) {
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,8 +237,9 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="TA收货地址" name="address">
|
||||
<el-table v-loading="loading" border :data="addressData" class="mt_10" style="width: 100%">
|
||||
<el-tab-pane label="TA收货地址" name="address" lazy>
|
||||
<div v-loading="addressLoading" class="member-tab-panel">
|
||||
<el-table border :data="addressData" class="mt_10 address-table" style="width: 100%">
|
||||
<el-table-column prop="alias" label="地址别名" min-width="80" show-overflow-tooltip />
|
||||
<el-table-column prop="name" label="收货人姓名" min-width="90" show-overflow-tooltip />
|
||||
<el-table-column prop="mobile" label="收货人电话" width="125" />
|
||||
@@ -263,6 +264,7 @@
|
||||
@size-change="addressChangePageSize"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="TA的余额" name="wallet">
|
||||
@@ -428,6 +430,7 @@ export default {
|
||||
id: "",
|
||||
activeTab: "point",
|
||||
loading: true,
|
||||
addressLoading: false,
|
||||
memberInfo: {},
|
||||
memberWalletInfo: {},
|
||||
addressModalTitle: "",
|
||||
@@ -565,7 +568,9 @@ export default {
|
||||
this.getPointData();
|
||||
}
|
||||
if (v == "address") {
|
||||
this.getAddressData();
|
||||
this.$nextTick(() => {
|
||||
this.getAddressData();
|
||||
});
|
||||
}
|
||||
if (v == "order") {
|
||||
this.getOrderData();
|
||||
@@ -723,15 +728,17 @@ export default {
|
||||
});
|
||||
},
|
||||
getAddressData() {
|
||||
this.loading = true;
|
||||
API_Member.getMemberAddressData(this.id, this.addressSearchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.addressData = res.result.records;
|
||||
this.addressTotal = res.result.total;
|
||||
}
|
||||
});
|
||||
this.loading = false;
|
||||
this.addressLoading = true;
|
||||
API_Member.getMemberAddressData(this.id, this.addressSearchForm)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.addressData = res.result.records;
|
||||
this.addressTotal = res.result.total;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.addressLoading = false;
|
||||
});
|
||||
},
|
||||
pointChangePage(v) {
|
||||
this.pointSearchForm.pageNumber = v;
|
||||
@@ -749,7 +756,7 @@ export default {
|
||||
addressChangePageSize(v) {
|
||||
this.addressSearchForm.pageNumber = 1;
|
||||
this.addressSearchForm.pageSize = v;
|
||||
this.getPointData();
|
||||
this.getAddressData();
|
||||
},
|
||||
walletChangePage(v) {
|
||||
this.walletSearchForm.pageNumber = v;
|
||||
@@ -770,9 +777,12 @@ export default {
|
||||
this.getOrderData();
|
||||
},
|
||||
selectDateRange(v) {
|
||||
if (v) {
|
||||
if (v && v.length === 2) {
|
||||
this.orderSearchForm.startDate = v[0];
|
||||
this.orderSearchForm.endDate = v[1];
|
||||
} else {
|
||||
delete this.orderSearchForm.startDate;
|
||||
delete this.orderSearchForm.endDate;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -81,33 +81,34 @@
|
||||
</template>
|
||||
<el-table
|
||||
v-loading="memberLoading"
|
||||
border
|
||||
:data="memberData"
|
||||
class="member-table"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column label="客户名称" width="180" show-overflow-tooltip>
|
||||
<el-table-column label="客户名称" min-width="160" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ row.nickName || "-" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户账号" width="180" show-overflow-tooltip>
|
||||
<el-table-column label="客户账号" min-width="260" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ row.username || "-" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账号状态" width="180">
|
||||
<el-table-column label="账号状态" min-width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row" :type="row.disabled === true ? 'success' : 'info'">
|
||||
{{ row.disabled === true ? "启用" : "禁用" }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="积分余额" width="180">
|
||||
<el-table-column label="积分余额" min-width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ row.point == null ? 0 : row.point }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" align="center">
|
||||
<el-table-column label="操作" width="120" align="center" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<a v-if="row" class="link-text" @click="detail(row)">详情</a>
|
||||
</template>
|
||||
@@ -409,8 +410,27 @@ export default {
|
||||
}
|
||||
|
||||
.member-table {
|
||||
:deep(.el-table__header th) {
|
||||
width: 100%;
|
||||
|
||||
:deep(.el-table__header th.el-table__cell) {
|
||||
background: #fafafa;
|
||||
padding: 14px 0;
|
||||
font-size: 14px;
|
||||
color: #17233d;
|
||||
}
|
||||
|
||||
:deep(.el-table__header .cell) {
|
||||
padding: 0 16px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
:deep(.el-table__body td.el-table__cell) {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
:deep(.el-table__body .cell) {
|
||||
padding: 0 16px;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" class="search-btn" @click="handleSearch">搜索</el-button>
|
||||
<el-button class="search-btn" @click="handleExport">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@@ -114,8 +113,6 @@
|
||||
|
||||
<script>
|
||||
import * as API_Order from "@/api/order";
|
||||
import * as API_Finance from "@/api/finance";
|
||||
import { downloadBlob } from "@/utils/downloadBlob";
|
||||
|
||||
export default {
|
||||
name: "paymentLog",
|
||||
@@ -167,11 +164,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
handleExport() {
|
||||
API_Finance.exportPaymentFlow(this.searchForm).then((blob) => {
|
||||
downloadBlob(blob, "支付流水.xlsx");
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="printModal = false">关闭</el-button>
|
||||
<el-button type="primary" v-print="printInfoObj">打印发货单</el-button>
|
||||
<el-button type="primary" @click="handlePrintInvoice">打印发货单</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
@@ -437,6 +437,7 @@ import * as RegExp from "@/libs/RegExp.js";
|
||||
|
||||
import multipleMap from "@/components/map/multiple-map";
|
||||
import vueQr from "vue-qr";
|
||||
import { printElement } from "@/utils/print";
|
||||
export default {
|
||||
name: "orderList",
|
||||
components: {
|
||||
@@ -449,11 +450,6 @@ export default {
|
||||
typeList: [],
|
||||
showPrices: false,
|
||||
printHiddenFlag: false,//隐藏信息
|
||||
printInfoObj: {
|
||||
id: "printInfo",//要打印的id名 无#号
|
||||
popTitle: ' ',//页眉标题 默认浏览器标题 空字符串时显示undefined 使用html语言
|
||||
extraHead: '',//头部文字 默认空
|
||||
},
|
||||
loading: false, //加载表格
|
||||
|
||||
addr: "", //地区
|
||||
@@ -686,6 +682,9 @@ export default {
|
||||
printCancel () {
|
||||
// this.printHiddenFlag = false;
|
||||
},
|
||||
handlePrintInvoice () {
|
||||
printElement("printInfo", "发货单");
|
||||
},
|
||||
//弹出修改收货地址框
|
||||
editAddress () {
|
||||
this.addressModal = true;
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
class="search-form"
|
||||
@keyup.enter="handleSearch"
|
||||
>
|
||||
<el-form-item label="关键字" prop="keywords" style="display: block; width: 100%">
|
||||
<el-form-item label="关键字" prop="keywords">
|
||||
<el-input
|
||||
v-model="searchForm.keywords"
|
||||
placeholder="请输入商品名称/收货人/收货人手机号/店铺名称"
|
||||
clearable
|
||||
style="width: 500px"
|
||||
style="width: 380px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="orderSn">
|
||||
@@ -76,7 +76,7 @@
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="info" class="export" @click="exportOrder">导出订单</el-button>
|
||||
<el-button type="warning" class="export" @click="exportOrder">导出订单</el-button>
|
||||
</div>
|
||||
|
||||
<el-table v-loading="loading" :data="data" ref="table" class="mt_10" style="width: 100%">
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
:deep(.ivu-modal-mask),
|
||||
:deep(.ivu-modal-wrap) {
|
||||
z-index: 800;
|
||||
:deep(.ivu-modal-wrap),
|
||||
:deep(.el-overlay) {
|
||||
z-index: 2000;
|
||||
}
|
||||
|
||||
.decorate-view-link {
|
||||
font-size: 12px;
|
||||
margin: 0 4px;
|
||||
flex:8;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
color: #999;
|
||||
}
|
||||
.decorate-view-btn{
|
||||
flex: 2;
|
||||
.decorate-view-btn {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
>button{
|
||||
align-items: stretch;
|
||||
gap: 8px;
|
||||
margin-left: 10px;
|
||||
|
||||
width: 70px;
|
||||
:deep(.el-button) {
|
||||
width: 76px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,14 @@
|
||||
</el-alert>
|
||||
|
||||
<!-- 右侧显示抽屉 -->
|
||||
<el-drawer title="选择风格" :show-close="false" size="400px" v-model="styleFlag">
|
||||
<el-drawer
|
||||
title="选择风格"
|
||||
:show-close="false"
|
||||
size="400px"
|
||||
v-model="styleFlag"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
>
|
||||
<div class="drawer">
|
||||
<template v-for="(item, index) in modelData" :key="index">
|
||||
<div
|
||||
@@ -67,6 +74,8 @@
|
||||
:show-close="false"
|
||||
size="400px"
|
||||
v-model="promotionsFlag"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
>
|
||||
<div class="drawer">
|
||||
<template v-for="(item, index) in modelData" :key="index">
|
||||
@@ -185,7 +194,6 @@
|
||||
<el-button
|
||||
@click="bindGoodsCategory(title_index)"
|
||||
size="small"
|
||||
style="margin-top: 20px"
|
||||
>选择分类</el-button
|
||||
>
|
||||
</div>
|
||||
@@ -686,6 +694,7 @@ export default {
|
||||
clickDrawer(item, index) {
|
||||
this.$emit("handleDrawer", item);
|
||||
this.styleFlag = false;
|
||||
this.promotionsFlag = false;
|
||||
},
|
||||
// 打开图片选择器
|
||||
liliDialogFlag(flag) {
|
||||
@@ -705,8 +714,7 @@ export default {
|
||||
if (!val.zoneInfo) {
|
||||
val.zoneInfo = [];
|
||||
}
|
||||
this.$refs.hotzone.flag = true;
|
||||
this.$refs.hotzone.res = val;
|
||||
this.$refs.hotzone.open(val);
|
||||
} else {
|
||||
this.liliDialogFlag(false);
|
||||
}
|
||||
|
||||
@@ -200,25 +200,27 @@ export default {
|
||||
API_Promotions.getLiveList({
|
||||
status: "START",
|
||||
pageSize: 1,
|
||||
}).then((res) => {
|
||||
if (res.success && res.result.size > 0) {
|
||||
API_Promotions.getLiveInfo(res.result.records[0].id).then(
|
||||
(res) => {
|
||||
if (res.success) {
|
||||
this.contentData.list[newIndex].options.list.push({
|
||||
type: val.promotionsType,
|
||||
title: val.name,
|
||||
title1: val.subName,
|
||||
color1: val.subColor,
|
||||
bk_color: val.subBkColor,
|
||||
data: res.result.commodityList
|
||||
? res.result.commodityList.splice(0, 2)
|
||||
: [],
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
pageNumber: 1,
|
||||
}).then((listRes) => {
|
||||
const records = listRes.result?.records || [];
|
||||
if (!listRes.success || records.length === 0) {
|
||||
this.$Message.warning("暂无进行中的直播活动");
|
||||
return;
|
||||
}
|
||||
API_Promotions.getLiveInfo(records[0].id).then((infoRes) => {
|
||||
if (infoRes.success) {
|
||||
this.contentData.list[newIndex].options.list.push({
|
||||
type: val.promotionsType,
|
||||
title: val.name,
|
||||
title1: val.subName,
|
||||
color1: val.subColor,
|
||||
bk_color: val.subBkColor,
|
||||
data: infoRes.result.commodityList
|
||||
? infoRes.result.commodityList.splice(0, 2)
|
||||
: [],
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
API_Promotions.getAllPromotion().then((res) => {
|
||||
|
||||
@@ -42,23 +42,36 @@
|
||||
text-align: center;
|
||||
height: 44px;
|
||||
border-bottom: 1px solid #ededed;
|
||||
background: #fff;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.content {
|
||||
box-sizing: border-box;
|
||||
margin: 20px 0;
|
||||
padding: 50px 13px;
|
||||
width: 360px;
|
||||
background: url("../../../assets/iPhoneX_model.png") no-repeat;
|
||||
height: 780px;
|
||||
background-size: 360px;
|
||||
background-size: 100% 100%;
|
||||
overflow: hidden;
|
||||
> .component,
|
||||
.draggable {
|
||||
height: 590px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
> .draggable {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
min-height: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
background: #ebebeb;
|
||||
}
|
||||
> .draggable {
|
||||
padding-bottom: 100px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
> .component,
|
||||
.draggable :deep(.component) {
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
|
||||
@@ -13,14 +13,6 @@
|
||||
export default {
|
||||
title: "导航栏",
|
||||
props: ["res"],
|
||||
watch: {
|
||||
res: {
|
||||
handler(newValue, oldValue) {
|
||||
this['res'] = newValue;
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div v-if="goodsBlock" class="layout">
|
||||
<div class="goods-cell-title">
|
||||
<div
|
||||
class="goods-item-title"
|
||||
:class="{ selected: selected.index == index }"
|
||||
@click="handleClickTitle(title, index)"
|
||||
v-for="(title, index) in res.list[0].titleWay"
|
||||
v-for="(title, index) in goodsBlock.titleWay"
|
||||
:key="index"
|
||||
>
|
||||
<h4>{{ title.title }}</h4>
|
||||
@@ -13,36 +13,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="goods-list">
|
||||
<div
|
||||
v-if="
|
||||
item.___index != undefined
|
||||
? selected.index == item.___index
|
||||
: selected.val == item.type
|
||||
"
|
||||
class="goods-item"
|
||||
v-for="(item, item_index) in res.list[0].listWay"
|
||||
:key="item_index"
|
||||
>
|
||||
<div class="goods-img">
|
||||
<el-icon
|
||||
:size="20"
|
||||
color="#e1251b"
|
||||
@click="closeGoods(item, item_index)"
|
||||
class="goods-icon"
|
||||
>
|
||||
<CircleClose />
|
||||
</el-icon>
|
||||
<img :src="item.img" alt />
|
||||
</div>
|
||||
<div class="goods-desc">
|
||||
<div class="goods-title">
|
||||
{{ item.title }}
|
||||
<template v-for="(item, item_index) in goodsBlock.listWay" :key="item_index">
|
||||
<div v-if="isGoodsVisible(item)" class="goods-item">
|
||||
<div class="goods-img">
|
||||
<el-icon
|
||||
:size="20"
|
||||
color="#e1251b"
|
||||
@click="closeGoods(item, item_index)"
|
||||
class="goods-icon"
|
||||
>
|
||||
<CircleClose />
|
||||
</el-icon>
|
||||
<img :src="item.img" alt />
|
||||
</div>
|
||||
<div class="goods-bottom">
|
||||
<div class="goods-price">¥{{ $filters.unitPrice(item.price) }}</div>
|
||||
<div class="goods-desc">
|
||||
<div class="goods-title">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="goods-bottom">
|
||||
<div class="goods-price">¥{{ $filters.unitPrice(item.price) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -53,29 +46,46 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
selected: {
|
||||
// 已选数据
|
||||
index: 0,
|
||||
val: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
props: ["res"],
|
||||
computed: {
|
||||
goodsBlock() {
|
||||
return this.res?.list?.[0] || null;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
res: {
|
||||
goodsBlock: {
|
||||
handler(val) {
|
||||
// 监听父级的值 如果有值将值赋给selected
|
||||
if (val) {
|
||||
this.selected.val = this.res.list[0].listWay[0].type;
|
||||
if (!val) {
|
||||
return;
|
||||
}
|
||||
const firstGoods = (val.listWay || []).find(Boolean);
|
||||
if (firstGoods) {
|
||||
this.selected.val = firstGoods.type;
|
||||
} else if (val.titleWay?.[0]?.title) {
|
||||
this.selected.val = val.titleWay[0].title;
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 删除商品
|
||||
closeGoods(val, index) {
|
||||
this.res.list[0].listWay.splice(index, 1);
|
||||
isGoodsVisible(item) {
|
||||
if (!item) {
|
||||
return false;
|
||||
}
|
||||
if (item.___index != undefined) {
|
||||
return this.selected.index == item.___index;
|
||||
}
|
||||
return this.selected.val == item.type;
|
||||
},
|
||||
closeGoods(val, index) {
|
||||
this.goodsBlock.listWay.splice(index, 1);
|
||||
},
|
||||
// 切换商品列表
|
||||
handleClickTitle(val, index) {
|
||||
this.selected.index = index;
|
||||
this.selected.val = val.title;
|
||||
|
||||
@@ -311,18 +311,16 @@ export default {
|
||||
getDataList(val) {
|
||||
if (val) this.form = {};
|
||||
this.loading = true;
|
||||
getArticle(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.total = res.result.total;
|
||||
this.data = [];
|
||||
if (res.result.records.length > 0) {
|
||||
this.data = res.result.records;
|
||||
getArticle(this.searchForm)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.total = res.result.total;
|
||||
this.data = res.result.records?.length ? res.result.records : [];
|
||||
}
|
||||
}
|
||||
});
|
||||
this.total = this.data?.length;
|
||||
this.loading = false;
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
|
||||
@@ -8,28 +8,35 @@
|
||||
:rules="ruleValidate"
|
||||
>
|
||||
<el-form-item label="热词默认配置" prop="hotWordsSettingItems">
|
||||
<div
|
||||
class="item-label"
|
||||
v-for="(item, index) in formValidate.hotWordsSettingItems"
|
||||
:key="index"
|
||||
>
|
||||
<div>
|
||||
<div class="item-keyword">
|
||||
<div>热词:</div>
|
||||
<el-input v-model="item.keywords" />
|
||||
<div class="hotwords-config">
|
||||
<div
|
||||
class="item-label"
|
||||
v-for="(item, index) in formValidate.hotWordsSettingItems"
|
||||
:key="index"
|
||||
>
|
||||
<div class="item-fields">
|
||||
<div class="item-keyword">
|
||||
<div>热词:</div>
|
||||
<el-input v-model="item.keywords" />
|
||||
</div>
|
||||
<div class="item-score">
|
||||
<div>分数:</div>
|
||||
<el-input-number :max="5" :min="0" v-model="item.score" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-score">
|
||||
<div>分数:</div>
|
||||
<el-input-number :max="5" :min="0" v-model="item.score" />
|
||||
<div class="item-actions">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="formValidate.hotWordsSettingItems.splice(index, 1)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-if="index === formValidate.hotWordsSettingItems.length - 1" @click="addSetItem">
|
||||
添加配置
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="formValidate.hotWordsSettingItems.splice(index, 1)">
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-button @click="addSetItem">添加配置</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="每日持久化热词数量" prop="saveNum">
|
||||
<el-input-number :min="0" v-model="formValidate.saveNum" />
|
||||
@@ -109,8 +116,21 @@ export default {
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 500px;
|
||||
width: 560px;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.item-fields {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.item-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.item-keyword,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-button style="margin-bottom: 10px" @click="back()">返回</el-button>
|
||||
|
||||
<el-card>
|
||||
<el-form ref="searchForm" :model="searchForm" inline label-width="75px" class="search-form mb_10">
|
||||
<el-form ref="searchForm" :model="searchForm" inline label-width="90px" class="search-form mb_10">
|
||||
<el-form-item label="优惠券名称" prop="couponName">
|
||||
<el-input
|
||||
v-model="searchForm.couponName"
|
||||
@@ -121,7 +121,7 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效时间" width="150">
|
||||
<el-table-column label="有效时间" width="200">
|
||||
<template #default="{ row }">
|
||||
<template v-if="row">
|
||||
<span v-if="row.getType === 'ACTIVITY' && row.rangeDayType === 'DYNAMICTIME'">长期有效</span>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<div class="operation padding-row" v-if="getType !== 'ACTIVITY'">
|
||||
<el-button type="primary" @click="add">添加优惠券</el-button>
|
||||
<el-button @click="delAll">批量关闭</el-button>
|
||||
<el-button type="info" @click="receivePage()">优惠券领取记录</el-button>
|
||||
<el-button type="warning" @click="receivePage()">优惠券领取记录</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
|
||||
@@ -225,7 +225,10 @@ export default {
|
||||
this.form.stockTotal =
|
||||
d.stockTotal !== null && d.stockTotal !== undefined ? d.stockTotal : null;
|
||||
this.form.validityType = d.validityType || "LONG_TERM";
|
||||
this.form.validEndTime = this.parseDetailDate(d.validEndTime);
|
||||
const endDate = this.parseDetailDate(d.validEndTime);
|
||||
this.form.validEndTime = endDate
|
||||
? this.$filters.unixToDate(endDate.getTime() / 1000)
|
||||
: null;
|
||||
this.form.validMonthsAfterActivate =
|
||||
d.validMonthsAfterActivate !== null &&
|
||||
d.validMonthsAfterActivate !== undefined &&
|
||||
@@ -271,7 +274,10 @@ export default {
|
||||
stockTotal: this.form.stockTotal,
|
||||
};
|
||||
if (payload.validityType === "FIXED_UNTIL") {
|
||||
payload.validEndTime = this.form.validEndTime;
|
||||
const endDate = new Date(this.form.validEndTime);
|
||||
payload.validEndTime = Number.isNaN(endDate.getTime())
|
||||
? this.form.validEndTime
|
||||
: endDate.getTime();
|
||||
}
|
||||
if (payload.validityType === "AFTER_ACTIVATE_MONTHS") {
|
||||
payload.validMonthsAfterActivate = this.form.validMonthsAfterActivate;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
label-width="80px"
|
||||
label-width="100px"
|
||||
class="search-form mb_10"
|
||||
@keyup.enter="handleSearch"
|
||||
>
|
||||
|
||||
@@ -13,67 +13,72 @@
|
||||
<el-form-item style="width: 100%">
|
||||
<el-table
|
||||
border
|
||||
class="kanjia-goods-table"
|
||||
:data="form.promotionGoodsList"
|
||||
style="width: 100%"
|
||||
@selection-change="changeSelect"
|
||||
>
|
||||
<el-table-column type="selection" width="60" align="center" />
|
||||
<el-table-column prop="goodsName" label="商品名称" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="商品价格" width="120">
|
||||
<el-table-column label="商品价格" width="150">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row" :style="{ color: $mainColor }">
|
||||
{{ $filters.unitPrice(row.price, "¥") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存" width="100">
|
||||
<el-table-column label="库存" width="120">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ row.quantity }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算价格" width="130">
|
||||
<el-table-column label="结算价格" width="160">
|
||||
<template #default="{ $index }">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
v-model="form.promotionGoodsList[$index].settlementPrice"
|
||||
style="width: 110px"
|
||||
controls-position="right"
|
||||
class="kanjia-goods-input"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最低砍" width="130">
|
||||
<el-table-column label="最低砍" width="160">
|
||||
<template #default="{ $index }">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
v-model="form.promotionGoodsList[$index].lowestPrice"
|
||||
style="width: 110px"
|
||||
controls-position="right"
|
||||
class="kanjia-goods-input"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最高砍" width="130">
|
||||
<el-table-column label="最高砍" width="160">
|
||||
<template #default="{ $index }">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
v-model="form.promotionGoodsList[$index].highestPrice"
|
||||
style="width: 110px"
|
||||
controls-position="right"
|
||||
class="kanjia-goods-input"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动库存" width="130">
|
||||
<el-table-column label="活动库存" width="160">
|
||||
<template #default="{ $index }">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
v-model="form.promotionGoodsList[$index].stock"
|
||||
style="width: 110px"
|
||||
controls-position="right"
|
||||
class="kanjia-goods-input"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" align="center">
|
||||
<el-table-column label="操作" width="120" align="center">
|
||||
<template #default="{ $index }">
|
||||
<el-button type="danger" size="small" plain @click="delGoods($index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="rangeTime">
|
||||
<el-form-item label="活动时间" prop="rangeTime" class="kanjia-activity-time-form-item">
|
||||
<el-date-picker
|
||||
type="datetimerange"
|
||||
v-model="form.rangeTime"
|
||||
@@ -82,7 +87,6 @@
|
||||
end-placeholder="结束时间"
|
||||
placeholder="请选择"
|
||||
:disabled-date="options.disabledDate"
|
||||
style="width: 260px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div>
|
||||
@@ -253,7 +257,27 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scpoed>
|
||||
<style lang="scss" scoped>
|
||||
.kanjia-goods-table {
|
||||
:deep(.el-table__body .el-table__cell .cell) {
|
||||
overflow: visible;
|
||||
text-overflow: clip;
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.kanjia-goods-input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.kanjia-activity-time-form-item {
|
||||
:deep(.el-date-editor) {
|
||||
width: 360px !important;
|
||||
max-width: 360px;
|
||||
flex-grow: 0;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin-bottom: 10px;
|
||||
padding: 0 10px;
|
||||
|
||||
@@ -73,6 +73,14 @@ import {
|
||||
deletePointsGoodsCategoryById,
|
||||
} from "@/api/promotion";
|
||||
|
||||
const buildDefaultFormAdd = () => ({
|
||||
parentId: 0,
|
||||
name: "",
|
||||
deleteFlag: 0,
|
||||
level: 0,
|
||||
sortOrder: 1,
|
||||
});
|
||||
|
||||
export default {
|
||||
name: "pointsGoodsCategory",
|
||||
data() {
|
||||
@@ -88,13 +96,7 @@ export default {
|
||||
sort: "sortOrder",
|
||||
order: "asc",
|
||||
},
|
||||
formAdd: {
|
||||
parentId: 0,
|
||||
name: "",
|
||||
deleteFlag: 0,
|
||||
level: 0,
|
||||
sortOrder: 1,
|
||||
},
|
||||
formAdd: buildDefaultFormAdd(),
|
||||
formValidate: {
|
||||
name: [{ required: true, message: "商品分类名称不能为空", trigger: "blur" }],
|
||||
},
|
||||
@@ -109,18 +111,22 @@ export default {
|
||||
edit(v) {
|
||||
this.modalType = 1;
|
||||
this.modalTitle = "编辑";
|
||||
this.formAdd.id = v.id;
|
||||
this.formAdd.name = v.name;
|
||||
this.formAdd.sortOrder = v.sortOrder;
|
||||
this.formAdd = {
|
||||
...buildDefaultFormAdd(),
|
||||
id: v.id,
|
||||
name: v.name,
|
||||
sortOrder: v.sortOrder,
|
||||
};
|
||||
this.modalVisible = true;
|
||||
},
|
||||
addParent() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加积分商品分类";
|
||||
this.$refs.form?.resetFields();
|
||||
delete this.formAdd.id;
|
||||
this.formAdd.parentId = 0;
|
||||
this.formAdd = buildDefaultFormAdd();
|
||||
this.modalVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form?.clearValidate();
|
||||
});
|
||||
},
|
||||
Submit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
@@ -134,7 +140,7 @@ export default {
|
||||
this.$Message.success("添加成功");
|
||||
this.getAllList();
|
||||
this.modalVisible = false;
|
||||
this.$refs.form.resetFields();
|
||||
this.formAdd = buildDefaultFormAdd();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -144,7 +150,7 @@ export default {
|
||||
this.$Message.success("修改成功");
|
||||
this.getAllList();
|
||||
this.modalVisible = false;
|
||||
this.$refs.form.resetFields();
|
||||
this.formAdd = buildDefaultFormAdd();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="活动时间" prop="rangeTime">
|
||||
<el-form-item label="活动时间" prop="rangeTime" class="points-goods-time-form-item">
|
||||
<el-date-picker
|
||||
type="datetimerange"
|
||||
v-model="form.rangeTime"
|
||||
@@ -100,7 +100,6 @@
|
||||
end-placeholder="结束时间"
|
||||
placeholder="请选择"
|
||||
:disabled-date="options.disabledDate"
|
||||
style="width: 260px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div>
|
||||
@@ -127,7 +126,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
rangeTime: ["", ""],
|
||||
rangeTime: null,
|
||||
promotionGoodsList: [],
|
||||
},
|
||||
showTable: true,
|
||||
@@ -136,7 +135,19 @@ export default {
|
||||
submitLoading: false,
|
||||
selectedGoods: [],
|
||||
formRule: {
|
||||
rangeTime: [{ required: true, message: "请选择活动时间" }],
|
||||
rangeTime: [
|
||||
{
|
||||
required: true,
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value || !Array.isArray(value) || value.length < 2 || !value[0] || !value[1]) {
|
||||
callback(new Error("请选择活动时间"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
options: {
|
||||
disabledDate(date) {
|
||||
@@ -154,33 +165,31 @@ export default {
|
||||
this.categoryList = res.result.records;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.form.startTime = this.form.rangeTime[0];
|
||||
this.form.endTime = this.form.rangeTime[1];
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
let params = this.promotionGoodsList;
|
||||
const start = this.$filters.unixToDate(this.form.startTime / 1000);
|
||||
const end = this.$filters.unixToDate(this.form.endTime / 1000);
|
||||
|
||||
if (!params || params.length === 0) {
|
||||
this.$Modal.warning({ title: "提示", content: "请选择指定商品" });
|
||||
return;
|
||||
}
|
||||
|
||||
this.submitLoading = true;
|
||||
params = params.map((j) => {
|
||||
j.startTime = start;
|
||||
j.endTime = end;
|
||||
return j;
|
||||
});
|
||||
addPointsGoods(params).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("积分商品创建成功");
|
||||
this.closeCurrentPage();
|
||||
}
|
||||
});
|
||||
if (!valid) return;
|
||||
let params = this.promotionGoodsList;
|
||||
if (!params || params.length === 0) {
|
||||
this.$Modal.warning({ title: "提示", content: "请选择指定商品" });
|
||||
return;
|
||||
}
|
||||
this.form.startTime = this.form.rangeTime[0];
|
||||
this.form.endTime = this.form.rangeTime[1];
|
||||
const start = this.$filters.unixToDate(this.form.startTime / 1000);
|
||||
const end = this.$filters.unixToDate(this.form.endTime / 1000);
|
||||
|
||||
this.submitLoading = true;
|
||||
params = params.map((j) => {
|
||||
j.startTime = start;
|
||||
j.endTime = end;
|
||||
return j;
|
||||
});
|
||||
addPointsGoods(params).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("积分商品创建成功");
|
||||
this.closeCurrentPage();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
closeCurrentPage() {
|
||||
@@ -251,7 +260,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scpoed>
|
||||
<style lang="scss" scoped>
|
||||
h4 {
|
||||
margin-bottom: 10px;
|
||||
padding: 0 10px;
|
||||
@@ -273,4 +282,13 @@ h4 {
|
||||
.wrapper {
|
||||
min-height: 800px;
|
||||
}
|
||||
|
||||
.points-goods-time-form-item {
|
||||
:deep(.el-date-editor.el-date-editor--datetimerange) {
|
||||
width: 420px !important;
|
||||
min-width: 420px;
|
||||
max-width: 420px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -134,15 +134,16 @@ export default {
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
getSensitiveWordsPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
getSensitiveWordsPage(this.searchForm)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
|
||||
@@ -28,6 +28,17 @@ module.exports = {
|
||||
},
|
||||
devServer: {
|
||||
port: configs.port,
|
||||
client: {
|
||||
overlay: {
|
||||
runtimeErrors: (error) => {
|
||||
const message = error?.message || "";
|
||||
if (message.includes("ResizeObserver loop")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
productionSourceMap: false,
|
||||
configureWebpack: {
|
||||
|
||||
@@ -7,15 +7,42 @@ const config = require("@/config/index");
|
||||
|
||||
let util = {};
|
||||
|
||||
/** 静态路由名,禁止被动态路由清理误删 */
|
||||
const STATIC_ROUTE_NAMES = new Set([
|
||||
"home_index",
|
||||
"change_pass",
|
||||
"message_index",
|
||||
"main",
|
||||
"renovation",
|
||||
"login",
|
||||
"forgetPassword",
|
||||
]);
|
||||
|
||||
util.dynamicRouteNames = [];
|
||||
|
||||
util.clearDynamicRoutes = function () {
|
||||
util.dynamicRouteNames.forEach((name) => {
|
||||
if (STATIC_ROUTE_NAMES.has(name)) {
|
||||
return;
|
||||
}
|
||||
if (router.hasRoute(name)) {
|
||||
router.removeRoute(name);
|
||||
}
|
||||
});
|
||||
util.dynamicRouteNames = [];
|
||||
util.dynamicRouteNames = util.dynamicRouteNames.filter(
|
||||
(name) => !STATIC_ROUTE_NAMES.has(name)
|
||||
);
|
||||
};
|
||||
|
||||
util.resolveRouteComponent = function (menu) {
|
||||
const routeKey =
|
||||
menu.frontRoute ||
|
||||
(typeof menu.component === "string" &&
|
||||
menu.component &&
|
||||
menu.component !== "Main"
|
||||
? menu.component
|
||||
: "");
|
||||
return routeKey ? lazyLoading(routeKey) : null;
|
||||
};
|
||||
|
||||
util.collectLeafRoutes = function (routes, result = [], parentPath = "") {
|
||||
@@ -29,7 +56,7 @@ util.collectLeafRoutes = function (routes, result = [], parentPath = "") {
|
||||
util.collectLeafRoutes(route.children, result, fullPath);
|
||||
} else if (
|
||||
route.name &&
|
||||
route.component &&
|
||||
typeof route.component === "function" &&
|
||||
!String(route.name).endsWith("__layout")
|
||||
) {
|
||||
result.push({
|
||||
@@ -59,7 +86,7 @@ util.registerDynamicRoutes = function (menuData, options = {}) {
|
||||
util.collectLeafRoutes(top.children, leaves, base);
|
||||
} else if (
|
||||
top.name &&
|
||||
top.component &&
|
||||
typeof top.component === "function" &&
|
||||
!String(top.name).endsWith("__layout")
|
||||
) {
|
||||
leaves.push({
|
||||
@@ -73,15 +100,24 @@ util.registerDynamicRoutes = function (menuData, options = {}) {
|
||||
|
||||
leaves.forEach((leaf) => {
|
||||
const path = (leaf.path || leaf.name || "").replace(/^\//, "");
|
||||
if (!router.hasRoute(leaf.name)) {
|
||||
router.addRoute("otherRouter", {
|
||||
path,
|
||||
name: leaf.name,
|
||||
component: leaf.component,
|
||||
meta: leaf.meta,
|
||||
});
|
||||
util.dynamicRouteNames.push(leaf.name);
|
||||
let component = leaf.component;
|
||||
if (typeof component === "string") {
|
||||
component = util.resolveRouteComponent({ component });
|
||||
}
|
||||
if (
|
||||
typeof component !== "function" ||
|
||||
STATIC_ROUTE_NAMES.has(leaf.name) ||
|
||||
router.hasRoute(leaf.name)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
router.addRoute("otherRouter", {
|
||||
path,
|
||||
name: leaf.name,
|
||||
component,
|
||||
meta: leaf.meta,
|
||||
});
|
||||
util.dynamicRouteNames.push(leaf.name);
|
||||
});
|
||||
|
||||
if (!router.hasRoute("error-404")) {
|
||||
@@ -378,6 +414,7 @@ util.initRouter = function (vm) {
|
||||
let data = window.localStorage.getItem("menuData");
|
||||
if (!data) {
|
||||
vm.$store.commit("setAdded", false);
|
||||
util.initRouter(vm);
|
||||
return;
|
||||
}
|
||||
let menuData = JSON.parse(data);
|
||||
@@ -456,13 +493,19 @@ util.initRouterNode = function (routers, data) {
|
||||
menu.name = `${menu.name}__layout`;
|
||||
}
|
||||
util.initRouterNode(menu.children, item.children);
|
||||
if (menu.frontRoute) {
|
||||
menu.component = lazyLoading(menu.frontRoute);
|
||||
const layoutComponent = util.resolveRouteComponent(menu);
|
||||
if (layoutComponent) {
|
||||
menu.component = layoutComponent;
|
||||
} else {
|
||||
delete menu.component;
|
||||
}
|
||||
} else {
|
||||
const component = util.resolveRouteComponent(menu);
|
||||
if (component) {
|
||||
menu.component = component;
|
||||
} else {
|
||||
delete menu.component;
|
||||
}
|
||||
} else if (menu.frontRoute) {
|
||||
menu.component = lazyLoading(menu.frontRoute);
|
||||
}
|
||||
|
||||
const meta = {};
|
||||
|
||||
@@ -109,15 +109,17 @@ export const otherRouter = {
|
||||
},
|
||||
{
|
||||
path: "/floorList/main",
|
||||
title: "编辑模板",
|
||||
title: "移动装修",
|
||||
name: "main",
|
||||
component: () => import("@/views/shop/wap/main.vue")
|
||||
meta: { title: "移动装修" },
|
||||
component: () => import("@/views/shop/wap/main.vue"),
|
||||
},
|
||||
{
|
||||
path: "/pcFloorList/main",
|
||||
title: "编辑模板",
|
||||
title: "PC装修",
|
||||
name: "renovation",
|
||||
component: () => import("@/views/shop/renovation.vue")
|
||||
meta: { title: "PC装修" },
|
||||
component: () => import("@/views/shop/renovation.vue"),
|
||||
},
|
||||
{
|
||||
path: "order-complaint-detail",
|
||||
@@ -157,24 +159,6 @@ export const otherRouter = {
|
||||
name: "export-order-deliver",
|
||||
component: () => import("@/views/order/order/exportOrderDeliver.vue")
|
||||
},
|
||||
{
|
||||
path: "order-detail",
|
||||
title: "订单详情",
|
||||
name: "order-detail",
|
||||
component: () => import("@/views/order/order/orderDetail.vue")
|
||||
},
|
||||
{
|
||||
path: "/floorList/main",
|
||||
title: "编辑模板",
|
||||
name: "main",
|
||||
component: () => import("@/views/shop/wap/main.vue")
|
||||
},
|
||||
{
|
||||
path: "/pcFloorList/main",
|
||||
title: "编辑模板",
|
||||
name: "renovation",
|
||||
component: () => import("@/views/shop/renovation.vue")
|
||||
},
|
||||
{
|
||||
path: "promotions/coupon-receive",
|
||||
title: "优惠券领取记录",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Element Plus 主题覆盖(对齐原 iView 主色) */
|
||||
:root {
|
||||
--el-color-primary: #f31947;
|
||||
--el-color-success: #68cabe;
|
||||
--el-color-success: #67c23a;
|
||||
--el-color-warning: #fa6419;
|
||||
--el-color-danger: #ff3c2a;
|
||||
--el-font-size-extra-small: 12px;
|
||||
|
||||
@@ -56,6 +56,17 @@ export const Modal = {
|
||||
}
|
||||
});
|
||||
},
|
||||
warning(options = {}) {
|
||||
const content = options.content || options.title || "";
|
||||
return ElMessageBox.alert(content, options.title || "提示", {
|
||||
confirmButtonText: options.okText || "确定",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
if (typeof options.onOk === "function") {
|
||||
return options.onOk();
|
||||
}
|
||||
});
|
||||
},
|
||||
remove() {
|
||||
ElMessageBox.close();
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<shrinkable-menu />
|
||||
</div>
|
||||
<div class="main-header-con" :style="{ height: setting.isUseTabsRouter ? '100px' : '60px' }">
|
||||
<div class="main-header-con" :style="{ height: setting.isUseTabsRouter ? '106px' : '60px' }">
|
||||
<div class="main-header">
|
||||
<div class="header-avator-con">
|
||||
<div></div>
|
||||
@@ -24,7 +24,7 @@
|
||||
<ul class="nav-list">
|
||||
<li class="nav-item" @click="im">
|
||||
<el-tooltip content="联系客服" placement="bottom">
|
||||
<el-button type="info" size="small" :loading="load">
|
||||
<el-button type="warning" size="small" :loading="load">
|
||||
<el-icon><ChatDotRound /></el-icon>
|
||||
客服
|
||||
</el-button>
|
||||
@@ -64,8 +64,8 @@
|
||||
<div
|
||||
class="single-page-con"
|
||||
:style="{
|
||||
top: setting.isUseTabsRouter ? '100px' : '60px',
|
||||
height: setting.isUseTabsRouter ? 'calc(100% - 110px)' : 'calc(100% - 70px)',
|
||||
top: setting.isUseTabsRouter ? '106px' : '60px',
|
||||
height: setting.isUseTabsRouter ? 'calc(100% - 116px)' : 'calc(100% - 70px)',
|
||||
}"
|
||||
>
|
||||
<div class="single-page">
|
||||
|
||||
@@ -36,7 +36,7 @@ h4 {
|
||||
.shop-box {
|
||||
flex: 3;
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
font-size: 16px;
|
||||
margin-top: 50px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
@@ -65,12 +65,16 @@ h4 {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.detail-title {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -15px;
|
||||
opacity: 0.3;
|
||||
color: #999;
|
||||
font-size: 21px;
|
||||
flex: 0 0 100%;
|
||||
width: 100%;
|
||||
order: -1;
|
||||
align-self: flex-start;
|
||||
margin-bottom: 8px;
|
||||
padding-left: 4px;
|
||||
opacity: 1;
|
||||
color: #000;
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
text-decoration: initial;
|
||||
transition: 0.35s;
|
||||
}
|
||||
@@ -82,22 +86,24 @@ h4 {
|
||||
font-weight: bold;
|
||||
width: 286px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
:deep(span) {
|
||||
color: $theme_color;
|
||||
font-size: 18px;
|
||||
}
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
padding: 16px 12px 20px;
|
||||
background: #eee;
|
||||
border-radius: 0.4em;
|
||||
margin: 10px;
|
||||
> div {
|
||||
> div:not(.detail-title) {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0 20px;
|
||||
margin: 0 8px;
|
||||
}
|
||||
}
|
||||
.detail-item:hover {
|
||||
@@ -105,8 +111,6 @@ h4 {
|
||||
transform: translateY(-4px);
|
||||
> .detail-title {
|
||||
opacity: 1;
|
||||
|
||||
top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div>店铺状态:{{ userData.storeDisable == "OPEN" ? "开启中" : "关闭" }}</div>
|
||||
</div>
|
||||
<div class="box-item" @click="im()">
|
||||
<el-button type="info" :loading="load">点击登录客服</el-button>
|
||||
<el-button type="warning" :loading="load">点击登录客服</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -125,13 +125,15 @@ export default {
|
||||
this.selectedWay.searchType = "";
|
||||
this.$emit("selected", this.selectedWay);
|
||||
} else {
|
||||
const current = this.dateList.find((item) => item.selected);
|
||||
this.selectedWay = current;
|
||||
const current =
|
||||
this.dateList.find((item) => item.selected) ||
|
||||
this.dateList.find((item) => item.title === this.selectedWay.title) ||
|
||||
this.dateList.find((item) => item.searchType === "LAST_SEVEN");
|
||||
this.clickBreadcrumb(current);
|
||||
this.$emit("selected", this.selectedWay);
|
||||
}
|
||||
},
|
||||
clickBreadcrumb(item) {
|
||||
if (!item) return;
|
||||
let currentIndex;
|
||||
this.dateList.forEach((res, index) => {
|
||||
res.selected = false;
|
||||
|
||||
@@ -289,15 +289,42 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login {
|
||||
height: 100%;
|
||||
background: url("../assets/background.png") no-repeat;
|
||||
background-size: 100%;
|
||||
background-position-y: bottom;
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
background-image: url("../assets/background.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center bottom;
|
||||
background-size: 100% auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
:deep(.el-input__wrapper) {
|
||||
background-color: #fff !important;
|
||||
box-shadow: 0 0 0 1px var(--el-border-color) inset !important;
|
||||
|
||||
&.is-focus {
|
||||
box-shadow: 0 0 0 1px var(--el-border-color) inset !important;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-input__inner) {
|
||||
background-color: transparent !important;
|
||||
|
||||
&:-webkit-autofill,
|
||||
&:-webkit-autofill:hover,
|
||||
&:-webkit-autofill:focus,
|
||||
&:-webkit-autofill:active {
|
||||
-webkit-box-shadow: 0 0 0 1000px #fff inset !important;
|
||||
box-shadow: 0 0 0 1000px #fff inset !important;
|
||||
-webkit-text-fill-color: #606266 !important;
|
||||
caret-color: #606266;
|
||||
transition: background-color 99999s ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
.verify-con {
|
||||
position: absolute;
|
||||
top: 126px;
|
||||
|
||||
@@ -214,6 +214,21 @@ export default {
|
||||
font-size: 13px;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&.el-tag--info.el-tag--plain {
|
||||
color: #606266;
|
||||
border-color: #dcdfe6;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
&.el-tag--info.el-tag--plain .el-tag__close {
|
||||
color: #909399;
|
||||
|
||||
&:hover {
|
||||
color: #606266;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
& + .page-tag {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
display: block;
|
||||
padding-left: 180px;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
height: 106px;
|
||||
z-index: 20;
|
||||
box-shadow: 0 2px 1px 1px rgba(100, 100, 100, 0.1);
|
||||
transition: padding 0.3s;
|
||||
@@ -81,9 +81,11 @@
|
||||
}
|
||||
|
||||
.tags-con {
|
||||
height: 40px;
|
||||
height: 46px;
|
||||
z-index: -1;
|
||||
background: #f0f0f0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.tags-outer-scroll-con {
|
||||
position: relative;
|
||||
@@ -94,7 +96,11 @@
|
||||
|
||||
.tags-inner-scroll-body {
|
||||
position: absolute;
|
||||
padding: 2px 10px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
overflow: visible;
|
||||
white-space: nowrap;
|
||||
transition: left 0.3s ease;
|
||||
@@ -233,10 +239,10 @@
|
||||
min-width: 740px;
|
||||
position: relative;
|
||||
left: 180px;
|
||||
top: 100px;
|
||||
top: 106px;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: calc(100% - 110px);
|
||||
height: calc(100% - 116px);
|
||||
width: calc(100% - 180px);
|
||||
overflow: auto;
|
||||
background-color: #f0f0f0;
|
||||
|
||||
@@ -42,7 +42,36 @@
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="div-form-default" v-if="complaintInfo.appealContent">
|
||||
<div class="div-form-default" v-if="complaintInfo.complainStatus === 'WAIT_APPEAL'">
|
||||
<h3>商家申诉</h3>
|
||||
<dl>
|
||||
<dt>申诉内容</dt>
|
||||
<dd>
|
||||
<el-input
|
||||
v-model="appeal.appealContent"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
:rows="4"
|
||||
clearable
|
||||
style="width: 260px"
|
||||
/>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>申诉凭证</dt>
|
||||
<dd>
|
||||
<upload-pic-thumb v-model="appeal.appealImages" :limit="5" />
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt></dt>
|
||||
<dd>
|
||||
<el-button type="primary" :loading="submitLoading" @click="appealSubmit">提交申诉</el-button>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="div-form-default" v-else-if="complaintInfo.appealContent">
|
||||
<h3>商家申诉信息</h3>
|
||||
<dl>
|
||||
<dt>申诉时间</dt>
|
||||
@@ -116,50 +145,6 @@
|
||||
<dd>{{ complaintInfo.arbitrationResult }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="div-form-default" v-if="complaintInfo.complainStatus != 'COMPLETE'">
|
||||
<h3>平台仲裁</h3>
|
||||
<dl v-if="arbitrationResultShow">
|
||||
<dt>仲裁</dt>
|
||||
<dd>
|
||||
<el-input
|
||||
v-model="arbitrationParams.arbitrationResult"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
:rows="4"
|
||||
clearable
|
||||
style="width: 260px"
|
||||
/>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt></dt>
|
||||
<dd style="text-align: right; display: flex; justify-content: space-between">
|
||||
<el-button
|
||||
v-if="!arbitrationResultShow"
|
||||
:loading="submitLoading"
|
||||
@click="arbitrationHandle"
|
||||
>
|
||||
直接仲裁结束投诉流程
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="complaintInfo.complainStatus == 'NEW'"
|
||||
:loading="submitLoading"
|
||||
@click="handleStoreComplaint"
|
||||
>
|
||||
交由商家申诉
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="arbitrationResultShow"
|
||||
type="primary"
|
||||
:loading="submitLoading"
|
||||
@click="arbitrationHandleSubmit"
|
||||
>
|
||||
提交仲裁
|
||||
</el-button>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-flow-center"></div>
|
||||
@@ -173,7 +158,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>下单时间</dt>
|
||||
<dd>{{ complaintInfo.createTime }}</dd>
|
||||
<dd>{{ complaintInfo.orderTime || complaintInfo.createTime }}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>订单金额</dt>
|
||||
@@ -205,6 +190,7 @@
|
||||
|
||||
<script>
|
||||
import * as API_Order from "@/api/order";
|
||||
import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb";
|
||||
const emptyComplaint = () => ({
|
||||
id: "",
|
||||
orderComplaintCommunications: [],
|
||||
@@ -212,6 +198,9 @@ const emptyComplaint = () => ({
|
||||
|
||||
export default {
|
||||
name: "orderComplaintDetail",
|
||||
components: {
|
||||
uploadPicThumb,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
@@ -224,10 +213,11 @@ export default {
|
||||
content: "",
|
||||
complainId: "",
|
||||
},
|
||||
arbitrationParams: {
|
||||
arbitrationResult: "",
|
||||
appeal: {
|
||||
orderComplaintId: "",
|
||||
appealContent: "",
|
||||
appealImages: [],
|
||||
},
|
||||
arbitrationResultShow: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -242,17 +232,6 @@ export default {
|
||||
};
|
||||
return map[v] || v || "-";
|
||||
},
|
||||
handleStoreComplaint() {
|
||||
API_Order.storeComplain({
|
||||
complainStatus: "WAIT_APPEAL",
|
||||
complainId: this.complaintInfo.id,
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDetail();
|
||||
}
|
||||
});
|
||||
},
|
||||
getDetail() {
|
||||
if (!this.id) return;
|
||||
this.loading = true;
|
||||
@@ -278,22 +257,26 @@ export default {
|
||||
returnDataList() {
|
||||
this.$router.push({ name: "orderComplaint" });
|
||||
},
|
||||
arbitrationHandle() {
|
||||
this.arbitrationResultShow = true;
|
||||
},
|
||||
arbitrationHandleSubmit() {
|
||||
if (!this.arbitrationParams.arbitrationResult) {
|
||||
this.$Message.error("请填写仲裁内容");
|
||||
appealSubmit() {
|
||||
if (!this.appeal.appealContent) {
|
||||
this.$Message.error("请填写申诉内容");
|
||||
return;
|
||||
}
|
||||
this.submitLoading = true;
|
||||
API_Order.orderComplete(this.id, this.arbitrationParams)
|
||||
const appealImages = Array.isArray(this.appeal.appealImages)
|
||||
? this.appeal.appealImages
|
||||
: [];
|
||||
API_Order.appeal({
|
||||
orderComplaintId: this.id,
|
||||
appealContent: this.appeal.appealContent,
|
||||
appealImages,
|
||||
})
|
||||
.then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("仲裁成功");
|
||||
this.arbitrationParams.arbitrationResult = "";
|
||||
this.arbitrationResultShow = false;
|
||||
this.$Message.success("申诉成功");
|
||||
this.appeal.appealContent = "";
|
||||
this.appeal.appealImages = [];
|
||||
this.getDetail();
|
||||
}
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-button style="margin-bottom: 10px" @click="back()">返回</el-button>
|
||||
|
||||
<el-card>
|
||||
<el-form ref="searchForm" :model="searchForm" inline label-width="75px" class="search-form mb_10">
|
||||
<el-form ref="searchForm" :model="searchForm" inline label-width="90px" class="search-form mb_10">
|
||||
<el-form-item label="优惠券名称" prop="couponName">
|
||||
<el-input
|
||||
v-model="searchForm.couponName"
|
||||
@@ -64,11 +64,6 @@
|
||||
>
|
||||
<el-table-column prop="memberName" label="会员名称" min-width="130" fixed="left" />
|
||||
<el-table-column prop="couponName" label="优惠券名称" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="发布店铺" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<span v-if="row">{{ (row.storeName === "platform" && "平台") || row.storeName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="面额/折扣" width="100">
|
||||
<template #default="{ row }">
|
||||
<priceColorScheme
|
||||
@@ -121,7 +116,7 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效时间" width="150">
|
||||
<el-table-column label="有效时间" width="200">
|
||||
<template #default="{ row }">
|
||||
<template v-if="row">
|
||||
<span v-if="row.getType === 'ACTIVITY' && row.rangeDayType === 'DYNAMICTIME'">长期有效</span>
|
||||
|
||||
@@ -31,9 +31,8 @@
|
||||
{{ showZoneText(zone) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div class="hotzone-box-item-actions">
|
||||
<div class="hotzone-btn" @click="editZone(index)">修改</div>
|
||||
|
||||
<div class="hotzone-btn" @click="delZone(index)">删除</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -239,13 +238,16 @@ export default {
|
||||
}
|
||||
> div:nth-of-type(2) {
|
||||
width: 50%;
|
||||
min-width: 0;
|
||||
background: #f7f7f7;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.hotzone-add-box-body {
|
||||
height: 90%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.hotzone-box-item-main {
|
||||
@@ -256,11 +258,18 @@ export default {
|
||||
.hotzone-box-item {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
border-bottom: 1px solid #ededed;
|
||||
font-size: 12px;
|
||||
justify-content: space-between;
|
||||
padding: 5px 10px 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-width: 0;
|
||||
|
||||
> div:nth-child(2) {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.hotzone-add-box-footer {
|
||||
@@ -280,8 +289,18 @@ export default {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hotzone-box-item-actions {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.hotzone-box-item-text {
|
||||
width: 200px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<img class="show-image" :src="zoneForm.img" alt />
|
||||
</div>
|
||||
|
||||
<el-form :model="zoneForm" label-width="80px">
|
||||
<el-form :model="zoneForm" label-width="90px" class="hz-edit-form">
|
||||
<!-- <el-form-item label="图片链接:">
|
||||
<el-input v-model="zoneForm.img"></el-input>
|
||||
<el-button size="small" type="primary" @click="handleSelectImg"
|
||||
@@ -240,3 +240,9 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.hz-edit-form :deep(.el-form-item__label) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,34 +1,31 @@
|
||||
import _ from '../utils'
|
||||
|
||||
export default {
|
||||
bind: function (el, binding, vnode) {
|
||||
const MIN_LIMIT = _.MIN_LIMIT
|
||||
mounted(el, binding) {
|
||||
const handleMouseDown = (e) => {
|
||||
const ctx = binding.instance
|
||||
if (!ctx) return
|
||||
|
||||
el.addEventListener('mousedown', handleMouseDown, { passive: false })
|
||||
|
||||
function handleMouseDown(e) {
|
||||
// console.log('additem', e)
|
||||
e && e.preventDefault()
|
||||
|
||||
let itemInfo = {
|
||||
top: _.getDistanceY(e, el),
|
||||
left: _.getDistanceX(e, el),
|
||||
width: 0,
|
||||
height: 0
|
||||
height: 0,
|
||||
}
|
||||
let container = _.getOffset(el)
|
||||
const container = _.getOffset(el)
|
||||
|
||||
// Only used once at the beginning of init
|
||||
let setting = {
|
||||
const setting = {
|
||||
topPer: _.decimalPoint(itemInfo.top / container.height),
|
||||
leftPer: _.decimalPoint(itemInfo.left / container.width),
|
||||
widthPer: 0,
|
||||
heightPer: 0
|
||||
heightPer: 0,
|
||||
}
|
||||
let preX = _.getPageX(e)
|
||||
let preY = _.getPageY(e)
|
||||
|
||||
vnode.context.addItem(setting)// 这里去添加并发送了add通知,不应该发送通知
|
||||
ctx.addItem(setting)
|
||||
|
||||
window.addEventListener('mousemove', handleChange, { passive: false })
|
||||
window.addEventListener('mouseup', handleMouseUp, { passive: false })
|
||||
@@ -36,56 +33,58 @@ export default {
|
||||
function handleChange(e) {
|
||||
e && e.preventDefault()
|
||||
|
||||
let moveX = _.getPageX(e) - preX
|
||||
let moveY = _.getPageY(e) - preY
|
||||
const moveX = _.getPageX(e) - preX
|
||||
const moveY = _.getPageY(e) - preY
|
||||
preX = _.getPageX(e)
|
||||
preY = _.getPageY(e)
|
||||
|
||||
// Not consider the direction of movement first, consider only the lower right drag point
|
||||
let minLimit = 0
|
||||
// 添加热区时,判定鼠标释放时,满足(热区大于48*48时)条件时生效
|
||||
let styleInfo = _.dealBR(itemInfo, moveX, moveY, minLimit)
|
||||
const minLimit = 0
|
||||
const styleInfo = _.dealBR(itemInfo, moveX, moveY, minLimit)
|
||||
|
||||
// Boundary value processing 改变热区大小时边界条件的处理
|
||||
itemInfo = _.dealEdgeValue(itemInfo, styleInfo, container, vnode.context.zones)
|
||||
itemInfo = _.dealEdgeValue(itemInfo, styleInfo, container, ctx.zones)
|
||||
|
||||
Object.assign(el.lastElementChild.style, {
|
||||
top: `${itemInfo.top}px`,
|
||||
left: `${itemInfo.left}px`,
|
||||
width: `${itemInfo.width}px`,
|
||||
height: `${itemInfo.height}px`
|
||||
height: `${itemInfo.height}px`,
|
||||
})
|
||||
}
|
||||
|
||||
function handleMouseUp() {
|
||||
let perInfo = {
|
||||
const perInfo = {
|
||||
topPer: _.decimalPoint(itemInfo.top / container.height),
|
||||
leftPer: _.decimalPoint(itemInfo.left / container.width),
|
||||
widthPer: _.decimalPoint(itemInfo.width / container.width),
|
||||
heightPer: _.decimalPoint(itemInfo.height / container.height),
|
||||
img: "",
|
||||
link: "",
|
||||
type: "",
|
||||
title: ""
|
||||
img: '',
|
||||
link: '',
|
||||
type: '',
|
||||
title: '',
|
||||
}
|
||||
|
||||
if (vnode.context.isOverRange()) {
|
||||
vnode.context.overRange() // 判断超出个数限制,给overRange钩子抛回调
|
||||
} else if (container.height < MIN_LIMIT && itemInfo.width > MIN_LIMIT) {
|
||||
vnode.context.changeItem(Object.assign(perInfo, {
|
||||
topPer: 0,
|
||||
heightPer: 1
|
||||
}), true)
|
||||
} else if (container.width < MIN_LIMIT && itemInfo.height > MIN_LIMIT) {
|
||||
vnode.context.changeItem(Object.assign(perInfo, {
|
||||
leftper: 0,
|
||||
widthPer: 1
|
||||
}), true)
|
||||
} else if (itemInfo.width > MIN_LIMIT && itemInfo.height > MIN_LIMIT) {
|
||||
vnode.context.changeItem(perInfo, true)
|
||||
if (ctx.isOverRange()) {
|
||||
ctx.overRange()
|
||||
} else if (container.height < _.MIN_LIMIT && itemInfo.width > _.MIN_LIMIT) {
|
||||
ctx.changeItem(
|
||||
Object.assign(perInfo, {
|
||||
topPer: 0,
|
||||
heightPer: 1,
|
||||
}),
|
||||
true
|
||||
)
|
||||
} else if (container.width < _.MIN_LIMIT && itemInfo.height > _.MIN_LIMIT) {
|
||||
ctx.changeItem(
|
||||
Object.assign(perInfo, {
|
||||
leftper: 0,
|
||||
widthPer: 1,
|
||||
}),
|
||||
true
|
||||
)
|
||||
} else if (itemInfo.width > _.MIN_LIMIT && itemInfo.height > _.MIN_LIMIT) {
|
||||
ctx.changeItem(perInfo, true)
|
||||
} else {
|
||||
// 当添加区域超出范围或小于最小区域(48*48)时触发,删除当亲绘制的热区并发送erase事件通知
|
||||
vnode.context.eraseItem()
|
||||
ctx.eraseItem()
|
||||
}
|
||||
|
||||
window.removeEventListener('mousemove', handleChange)
|
||||
@@ -93,9 +92,10 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
el.$destroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.__hotzoneAddDestroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.addEventListener('mousedown', handleMouseDown, { passive: false })
|
||||
},
|
||||
beforeUnmount(el) {
|
||||
el.__hotzoneAddDestroy?.()
|
||||
},
|
||||
unbind: function (el) {
|
||||
el.$destroy()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import _ from '../utils'
|
||||
|
||||
export default {
|
||||
bind: function (el, binding, vnode) {
|
||||
el.addEventListener('mousedown', handleMouseDown,{ passive: false })
|
||||
mounted(el, binding) {
|
||||
const handleMouseDown = (e) => {
|
||||
const ctx = binding.instance
|
||||
if (!ctx) return
|
||||
|
||||
function handleMouseDown (e) {
|
||||
let pointer = e.target.dataset.pointer //元素上绑定的方法名
|
||||
const pointer = e.target.dataset.pointer
|
||||
|
||||
if (!pointer) {
|
||||
return
|
||||
@@ -13,79 +14,81 @@ export default {
|
||||
|
||||
e && e.stopPropagation()
|
||||
|
||||
let zone = el.parentNode
|
||||
let setting = vnode.context.setting
|
||||
let currentIndex = vnode.context.index
|
||||
let container = _.getOffset(zone.parentNode)
|
||||
const zone = el.parentNode
|
||||
const setting = ctx.setting
|
||||
const currentIndex = ctx.index
|
||||
const container = _.getOffset(zone.parentNode)
|
||||
let itemInfo = {
|
||||
width: _.getOffset(zone).width || 0,
|
||||
height: _.getOffset(zone).height || 0,
|
||||
top: setting.topPer * container.height || 0,
|
||||
left: setting.leftPer * container.width || 0
|
||||
left: setting.leftPer * container.width || 0,
|
||||
}
|
||||
let preX = _.getPageX(e)
|
||||
let preY = _.getPageY(e)
|
||||
let flag
|
||||
|
||||
// Hide the info displayed by hover
|
||||
vnode.context.handlehideZone(true)
|
||||
ctx.handlehideZone(true)
|
||||
|
||||
window.addEventListener('mousemove', handleChange,{ passive: false })
|
||||
window.addEventListener('mouseup', handleMouseUp,{ passive: false })
|
||||
window.addEventListener('mousemove', handleChange, { passive: false })
|
||||
window.addEventListener('mouseup', handleMouseUp, { passive: false })
|
||||
|
||||
function handleChange (e) {
|
||||
function handleChange(e) {
|
||||
e && e.preventDefault()
|
||||
flag = true
|
||||
|
||||
let moveX = _.getPageX(e) - preX
|
||||
let moveY = _.getPageY(e) - preY
|
||||
const moveX = _.getPageX(e) - preX
|
||||
const moveY = _.getPageY(e) - preY
|
||||
|
||||
preX = _.getPageX(e)
|
||||
preY = _.getPageY(e)
|
||||
|
||||
// Handling the situation when different dragging points are selected
|
||||
let styleInfo = _[pointer](itemInfo, moveX, moveY)//调用对应的方法
|
||||
// Boundary value processing
|
||||
itemInfo = _.dealEdgeValue(itemInfo, styleInfo, container, vnode.context.$parent.zones, currentIndex)
|
||||
const styleInfo = _[pointer](itemInfo, moveX, moveY)
|
||||
itemInfo = _.dealEdgeValue(
|
||||
itemInfo,
|
||||
styleInfo,
|
||||
container,
|
||||
ctx.$parent.zones,
|
||||
currentIndex
|
||||
)
|
||||
|
||||
Object.assign(zone.style, {
|
||||
top: `${itemInfo.top}px`,
|
||||
left: `${itemInfo.left}px`,
|
||||
width: `${itemInfo.width}px`,
|
||||
height: `${itemInfo.height}px`
|
||||
height: `${itemInfo.height}px`,
|
||||
})
|
||||
}
|
||||
|
||||
function handleMouseUp () {
|
||||
function handleMouseUp() {
|
||||
if (flag) {
|
||||
flag = false
|
||||
let perInfo = {
|
||||
const perInfo = {
|
||||
topPer: _.decimalPoint(itemInfo.top / container.height),
|
||||
leftPer: _.decimalPoint(itemInfo.left / container.width),
|
||||
widthPer: _.decimalPoint(itemInfo.width / container.width),
|
||||
heightPer: _.decimalPoint(itemInfo.height / container.height)
|
||||
heightPer: _.decimalPoint(itemInfo.height / container.height),
|
||||
}
|
||||
vnode.context.changeInfo(perInfo)
|
||||
ctx.changeInfo(perInfo)
|
||||
|
||||
// 兼容数据无变更情况下导致 computed 不更新,数据仍为 px 时 resize 出现的问题
|
||||
Object.assign(zone.style, {
|
||||
top: `${itemInfo.top}px`,
|
||||
left: `${itemInfo.left}px`,
|
||||
width: `${itemInfo.width}px`,
|
||||
height: `${itemInfo.height}px`
|
||||
height: `${itemInfo.height}px`,
|
||||
})
|
||||
}
|
||||
// Show the info
|
||||
vnode.context.handlehideZone(false)
|
||||
ctx.handlehideZone(false)
|
||||
|
||||
window.removeEventListener('mousemove', handleChange)
|
||||
window.removeEventListener('mouseup', handleMouseUp)
|
||||
}
|
||||
}
|
||||
|
||||
el.$destroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.__hotzoneResizeDestroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.addEventListener('mousedown', handleMouseDown, { passive: false })
|
||||
},
|
||||
beforeUnmount(el) {
|
||||
el.__hotzoneResizeDestroy?.()
|
||||
},
|
||||
unbind: function (el) {
|
||||
el.$destroy()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
import _ from '../utils'
|
||||
|
||||
export default {
|
||||
bind: function (el, binding, vnode) {
|
||||
el.addEventListener('mousedown', handleMouseDown)
|
||||
mounted(el, binding) {
|
||||
let collision
|
||||
function handleMouseDown (e) {
|
||||
const handleMouseDown = (e) => {
|
||||
const ctx = binding.instance
|
||||
if (!ctx) return
|
||||
|
||||
e && e.stopPropagation()
|
||||
let container = _.getOffset(el.parentNode)
|
||||
const container = _.getOffset(el.parentNode)
|
||||
let preX = _.getPageX(e)
|
||||
let preY = _.getPageY(e)
|
||||
let topPer
|
||||
let leftPer
|
||||
let flag
|
||||
|
||||
window.addEventListener('mousemove', handleChange,{ passive: false })
|
||||
window.addEventListener('mouseup', handleMouseUp,{ passive: false })
|
||||
window.addEventListener('mousemove', handleChange, { passive: false })
|
||||
window.addEventListener('mouseup', handleMouseUp, { passive: false })
|
||||
|
||||
function handleChange (e) {
|
||||
function handleChange(e) {
|
||||
e && e.preventDefault()
|
||||
flag = true
|
||||
collision = false
|
||||
// Hide the info displayed by hover
|
||||
vnode.context.handlehideZone(true)
|
||||
ctx.handlehideZone(true)
|
||||
|
||||
let setting = vnode.context.setting
|
||||
let currentIndex = vnode.context.index
|
||||
const setting = ctx.setting
|
||||
const currentIndex = ctx.index
|
||||
let moveX = _.getPageX(e) - preX
|
||||
let moveY = _.getPageY(e) - preY
|
||||
|
||||
@@ -33,7 +34,6 @@ export default {
|
||||
topPer = _.decimalPoint(moveY / container.height + setting.topPer)
|
||||
leftPer = _.decimalPoint(moveX / container.width + setting.leftPer)
|
||||
|
||||
// Hotzone moving boundary processing
|
||||
if (topPer < 0) {
|
||||
topPer = 0
|
||||
moveY = -container.height * setting.topPer
|
||||
@@ -53,23 +53,20 @@ export default {
|
||||
leftPer = 1 - setting.widthPer
|
||||
moveX = container.width * (leftPer - setting.leftPer)
|
||||
}
|
||||
// 拖拽碰撞检测
|
||||
if (vnode.context.$parent.zones.length > 1) {
|
||||
let currentzones = JSON.parse(JSON.stringify(vnode.context.$parent.zones)).map((zone) => {
|
||||
return {
|
||||
left: (zone.leftPer || 0) * container.width,
|
||||
top: (zone.topPer || 0) * container.height,
|
||||
width: (zone.widthPer || 0) * container.width,
|
||||
height: (zone.heightPer || 0) * container.height
|
||||
}
|
||||
})
|
||||
// 矫正
|
||||
let changeSetting = {}
|
||||
changeSetting.left = setting.leftPer * container.width + moveX
|
||||
changeSetting.top = setting.topPer * container.height + moveY
|
||||
changeSetting.width = setting.widthPer * container.width
|
||||
changeSetting.height = setting.heightPer * container.height
|
||||
// 碰撞检测
|
||||
|
||||
if (ctx.$parent.zones.length > 1) {
|
||||
const currentzones = JSON.parse(JSON.stringify(ctx.$parent.zones)).map((zone) => ({
|
||||
left: (zone.leftPer || 0) * container.width,
|
||||
top: (zone.topPer || 0) * container.height,
|
||||
width: (zone.widthPer || 0) * container.width,
|
||||
height: (zone.heightPer || 0) * container.height,
|
||||
}))
|
||||
const changeSetting = {
|
||||
left: setting.leftPer * container.width + moveX,
|
||||
top: setting.topPer * container.height + moveY,
|
||||
width: setting.widthPer * container.width,
|
||||
height: setting.heightPer * container.height,
|
||||
}
|
||||
for (let i = 0, len = currentzones.length; i < len; i++) {
|
||||
if (currentIndex !== i && _.handleEgdeCollisions(currentzones[i], changeSetting)) {
|
||||
collision = true
|
||||
@@ -80,29 +77,29 @@ export default {
|
||||
el.style.transform = `translate(${moveX}px, ${moveY}px)`
|
||||
}
|
||||
|
||||
function handleMouseUp () {
|
||||
function handleMouseUp() {
|
||||
if (flag) {
|
||||
flag = false
|
||||
el.style.transform = 'translate(0, 0)'
|
||||
if (!collision) {
|
||||
vnode.context.changeInfo({
|
||||
ctx.changeInfo({
|
||||
topPer,
|
||||
leftPer
|
||||
leftPer,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Show the info
|
||||
vnode.context.handlehideZone(false)
|
||||
ctx.handlehideZone(false)
|
||||
|
||||
window.removeEventListener('mousemove', handleChange)
|
||||
window.removeEventListener('mouseup', handleMouseUp)
|
||||
}
|
||||
}
|
||||
|
||||
el.$destroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.__hotzoneDragDestroy = () => el.removeEventListener('mousedown', handleMouseDown)
|
||||
el.addEventListener('mousedown', handleMouseDown)
|
||||
},
|
||||
beforeUnmount(el) {
|
||||
el.__hotzoneDragDestroy?.()
|
||||
},
|
||||
unbind: function (el) {
|
||||
el.$destroy()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
destroy-on-close
|
||||
@close="clickClose"
|
||||
>
|
||||
<template v-if="flag">
|
||||
<template v-if="flag && hotzoneRes">
|
||||
<hotzone
|
||||
ref="hotzone"
|
||||
:zonesInit="res.zoneInfo"
|
||||
:image="res.img"
|
||||
:zonesInit="hotzoneRes.zoneInfo"
|
||||
:image="hotzoneRes.img"
|
||||
@change="changeHotzone"
|
||||
/>
|
||||
</template>
|
||||
@@ -33,25 +33,34 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
flag: false,
|
||||
hotzoneRes: null,
|
||||
};
|
||||
},
|
||||
props: ["res"],
|
||||
methods: {
|
||||
changeHotzone(info) {
|
||||
if (this.hotzoneRes) {
|
||||
this.hotzoneRes.zoneInfo = info;
|
||||
}
|
||||
this.$emit("changeZone", info);
|
||||
},
|
||||
clickClose() {
|
||||
this.flag = false;
|
||||
this.hotzoneRes = null;
|
||||
this.$emit("closeFlag", false);
|
||||
},
|
||||
clickOK() {
|
||||
this.clickClose();
|
||||
},
|
||||
open() {
|
||||
open(val) {
|
||||
this.hotzoneRes = val || null;
|
||||
if (this.hotzoneRes && !this.hotzoneRes.zoneInfo) {
|
||||
this.hotzoneRes.zoneInfo = [];
|
||||
}
|
||||
this.flag = true;
|
||||
},
|
||||
close() {
|
||||
this.flag = false;
|
||||
this.hotzoneRes = null;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -49,11 +49,13 @@
|
||||
<draggable
|
||||
class="model-form-list"
|
||||
v-model="data.list"
|
||||
v-bind="{ group: 'model', ghostClass: 'ghost' }"
|
||||
:item-key="getModelItemKey"
|
||||
group="model"
|
||||
ghost-class="ghost"
|
||||
@end="handleMoveEnd"
|
||||
@add="handleModelAdd"
|
||||
>
|
||||
<template v-for="(element, index) in data.list" :key="element.key || index">
|
||||
<template #item="{ element, index }">
|
||||
<model-form-item
|
||||
v-if="element && element.key"
|
||||
:element="element"
|
||||
@@ -190,6 +192,9 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getModelItemKey(element) {
|
||||
return element.model || element.key || element.type;
|
||||
},
|
||||
handleSelectLink(item, index) {
|
||||
if (item) this.selectedNav = item;
|
||||
this.$refs.liliDialog.open("link");
|
||||
@@ -238,16 +243,18 @@ export default {
|
||||
},
|
||||
handleModelAdd(evt) {
|
||||
const newIndex = evt.newIndex;
|
||||
|
||||
this.data.list[newIndex] = JSON.parse(JSON.stringify(this.data.list[newIndex]));
|
||||
const key = Date.parse(new Date()) + "_" + Math.ceil(Math.random() * 99999);
|
||||
const current = this.data.list[newIndex];
|
||||
if (!current || current.key) {
|
||||
return;
|
||||
}
|
||||
const key = Date.now() + "_" + Math.ceil(Math.random() * 99999);
|
||||
this.data.list[newIndex] = {
|
||||
...this.data.list[newIndex],
|
||||
...JSON.parse(JSON.stringify(current)),
|
||||
options: {
|
||||
...this.data.list[newIndex].options,
|
||||
...current.options,
|
||||
},
|
||||
key,
|
||||
model: this.data.list[newIndex].type + "_" + key,
|
||||
model: current.type + "_" + key,
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
@@ -16,35 +16,31 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<swiper ref="mySwiper" :options="swiperOptions">
|
||||
<swiper-slide
|
||||
v-for="(item, index) in options.list[0].goodsList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="content">
|
||||
<img :src="item.img" width="140" height="140" :alt="item.name" />
|
||||
<div class="ellipsis">{{ item.name }}</div>
|
||||
<div>
|
||||
<span>{{ $filters.unitPrice(item.price, "¥") }}</span>
|
||||
<span>{{ $filters.unitPrice(item.originalPrice, "¥") }}</span>
|
||||
<div ref="swiperEl" class="swiper">
|
||||
<div class="swiper-wrapper">
|
||||
<div
|
||||
class="swiper-slide"
|
||||
v-for="(item, index) in options.list[0].goodsList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="content">
|
||||
<img :src="item.img" width="140" height="140" :alt="item.name" />
|
||||
<div class="ellipsis">{{ item.name }}</div>
|
||||
<div>
|
||||
<span>{{ $filters.unitPrice(item.price, "¥") }}</span>
|
||||
<span>{{ $filters.unitPrice(item.originalPrice, "¥") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Swiper, SwiperSlide, directive } from "vue-awesome-swiper";
|
||||
import Swiper from "swiper";
|
||||
import "swiper/swiper-bundle.css";
|
||||
export default {
|
||||
components: {
|
||||
Swiper,
|
||||
SwiperSlide,
|
||||
},
|
||||
directives: {
|
||||
swiper: directive,
|
||||
},
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -62,12 +58,7 @@ export default {
|
||||
minutes: "00", // 分钟
|
||||
seconds: "00", // 秒
|
||||
interval: undefined, // 定时器
|
||||
swiperOptions: {
|
||||
// 轮播图参数
|
||||
slidesPerView: 5,
|
||||
autoplay: true,
|
||||
loop: true,
|
||||
},
|
||||
swiperInstance: null,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -94,11 +85,26 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.countDown(this.options.list);
|
||||
this.initSwiper();
|
||||
},
|
||||
beforeUnmount() {
|
||||
clearInterval(this.interval);
|
||||
if (this.swiperInstance) {
|
||||
this.swiperInstance.destroy(true, true);
|
||||
this.swiperInstance = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initSwiper() {
|
||||
if (!this.$refs.swiperEl) {
|
||||
return;
|
||||
}
|
||||
this.swiperInstance = new Swiper(this.$refs.swiperEl, {
|
||||
slidesPerView: 5,
|
||||
autoplay: true,
|
||||
loop: true,
|
||||
});
|
||||
},
|
||||
// 倒计时
|
||||
countDown(list) {
|
||||
/**
|
||||
|
||||
@@ -16,35 +16,31 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<swiper ref="mySwiper" :options="swiperOptions">
|
||||
<swiper-slide
|
||||
v-for="(item, index) in options.list[0].goodsList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="content">
|
||||
<img :src="item.img" width="140" height="140" :alt="item.name" />
|
||||
<div class="ellipsis">{{ item.name }}</div>
|
||||
<div>
|
||||
<span>{{ $filters.unitPrice(item.price, "¥") }}</span>
|
||||
<span>{{ $filters.unitPrice(item.originalPrice, "¥") }}</span>
|
||||
<div ref="swiperEl" class="swiper">
|
||||
<div class="swiper-wrapper">
|
||||
<div
|
||||
class="swiper-slide"
|
||||
v-for="(item, index) in options.list[0].goodsList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="content">
|
||||
<img :src="item.img" width="140" height="140" :alt="item.name" />
|
||||
<div class="ellipsis">{{ item.name }}</div>
|
||||
<div>
|
||||
<span>{{ $filters.unitPrice(item.price, "¥") }}</span>
|
||||
<span>{{ $filters.unitPrice(item.originalPrice, "¥") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</swiper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Swiper, SwiperSlide, directive } from "vue-awesome-swiper";
|
||||
import Swiper from "swiper";
|
||||
import "swiper/swiper-bundle.css";
|
||||
export default {
|
||||
components: {
|
||||
Swiper,
|
||||
SwiperSlide,
|
||||
},
|
||||
directives: {
|
||||
swiper: directive,
|
||||
},
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -62,12 +58,7 @@ export default {
|
||||
minutes: "00", // 分钟
|
||||
seconds: "00", // 秒
|
||||
interval: undefined, // 定时器
|
||||
swiperOptions: {
|
||||
// 轮播图参数
|
||||
slidesPerView: 5,
|
||||
autoplay: true,
|
||||
loop: true,
|
||||
},
|
||||
swiperInstance: null,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -94,11 +85,26 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.countDown(this.options.list);
|
||||
this.initSwiper();
|
||||
},
|
||||
beforeUnmount() {
|
||||
clearInterval(this.interval);
|
||||
if (this.swiperInstance) {
|
||||
this.swiperInstance.destroy(true, true);
|
||||
this.swiperInstance = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initSwiper() {
|
||||
if (!this.$refs.swiperEl) {
|
||||
return;
|
||||
}
|
||||
this.swiperInstance = new Swiper(this.$refs.swiperEl, {
|
||||
slidesPerView: 5,
|
||||
autoplay: true,
|
||||
loop: true,
|
||||
});
|
||||
},
|
||||
// 倒计时
|
||||
countDown(list) {
|
||||
/**
|
||||
|
||||
@@ -1,23 +1,36 @@
|
||||
<template>
|
||||
<div class="renovation">
|
||||
<div class="model-list">
|
||||
<div class="classification-title">基础模块</div>
|
||||
<draggable tag="ul" :list="modelData" v-bind="{group:{ name:'model', pull:'clone',put:false},sort:false, ghostClass: 'ghost'}" >
|
||||
<li v-for="(model, index) in modelData" :key="index" class="model-item">
|
||||
<el-icon><Picture /></el-icon>
|
||||
<span>{{model.name}}</span>
|
||||
</li>
|
||||
</draggable>
|
||||
</div>
|
||||
<div class="show-content">
|
||||
<model-form ref="modelForm" :data="modelForm"></model-form>
|
||||
</div>
|
||||
<div class="btn-bar" :class="{'top':isHiddenBar}">
|
||||
<div class="btn-bar">
|
||||
<el-button type="primary" :loading="submitLoading" @click="saveTemplate">保存模板</el-button>
|
||||
<el-button class="ml_10" @click="resetTemplate">还原模板</el-button>
|
||||
<el-button class="ml_10" @click="witeLocalStore">将装修内容写入到本地</el-button>
|
||||
<el-button class="ml_10" v-if="hasCache" @click="clearCache">清空本地装修缓存</el-button>
|
||||
</div>
|
||||
<div class="renovation-main">
|
||||
<div class="model-list">
|
||||
<div class="classification-title">基础模块</div>
|
||||
<draggable
|
||||
tag="ul"
|
||||
:list="modelData"
|
||||
:item-key="getModelKey"
|
||||
:clone="cloneModel"
|
||||
:group="{ name: 'model', pull: 'clone', put: false }"
|
||||
:sort="false"
|
||||
ghost-class="ghost"
|
||||
handle=".model-item"
|
||||
>
|
||||
<template #item="{ element: model }">
|
||||
<li class="model-item">
|
||||
<el-icon><Picture /></el-icon>
|
||||
<span>{{ model.name }}</span>
|
||||
</li>
|
||||
</template>
|
||||
</draggable>
|
||||
</div>
|
||||
<div class="show-content">
|
||||
<model-form ref="modelForm" :data="modelForm"></model-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -33,9 +46,7 @@ export default {
|
||||
Picture,
|
||||
},
|
||||
mounted() {
|
||||
const setting = window.localStorage.getItem('seller-setting') ? JSON.parse(window.localStorage.getItem('seller-setting')) : {};
|
||||
this.isHiddenBar = setting.isUseTabsRouter
|
||||
const cache = this.getStore('managerPCPageCache')
|
||||
const cache = this.getStore('managerPCPageCache')
|
||||
this.hasCache = !!cache;
|
||||
if(cache){
|
||||
this.$Modal.confirm({
|
||||
@@ -69,10 +80,21 @@ export default {
|
||||
modelData,
|
||||
modelForm: { list: [] },
|
||||
submitLoading: false,
|
||||
isHiddenBar:true,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getModelKey(model) {
|
||||
return model.type || model.name;
|
||||
},
|
||||
cloneModel(model) {
|
||||
const key = Date.now() + "_" + Math.ceil(Math.random() * 99999);
|
||||
const cloned = JSON.parse(JSON.stringify(model));
|
||||
return {
|
||||
...cloned,
|
||||
key,
|
||||
model: cloned.type + "_" + key,
|
||||
};
|
||||
},
|
||||
clearCache(){
|
||||
this.setStore('managerPCPageCache', '')
|
||||
this.$Message.success('清除成功')
|
||||
@@ -143,21 +165,49 @@ export default {
|
||||
.renovation {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100%;
|
||||
}
|
||||
.btn-bar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
background: #fff;
|
||||
height: 50px;
|
||||
padding: 10px;
|
||||
box-shadow: 1px 1px 10px #999;
|
||||
}
|
||||
.renovation-main {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 20px;
|
||||
flex: 1;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.model-list {
|
||||
flex-shrink: 0;
|
||||
width: 130px;
|
||||
height: 620px;
|
||||
max-height: calc(100vh - 180px);
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
background: #fff;
|
||||
margin-top: 60px;
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
position: sticky;
|
||||
top: 60px;
|
||||
z-index: 10;
|
||||
box-shadow: 1px 1px 10px #999;
|
||||
.classification-title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
:deep(ul) {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.model-item {
|
||||
width: 110px;
|
||||
@@ -165,9 +215,12 @@ export default {
|
||||
background: #eee;
|
||||
margin-top: 10px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
color: #999;
|
||||
transition:0.15s;
|
||||
transition: 0.15s;
|
||||
border-radius: 4px;
|
||||
&:hover {
|
||||
background: $theme_color;
|
||||
@@ -182,8 +235,8 @@ export default {
|
||||
}
|
||||
}
|
||||
.show-content {
|
||||
margin-left: 150px;
|
||||
margin-top: 60px;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.ghost {
|
||||
background: #fff;
|
||||
@@ -203,16 +256,4 @@ export default {
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
.btn-bar {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 50px;
|
||||
padding: 10px;
|
||||
box-shadow: 1px 1px 10px #999;
|
||||
z-index: 99;
|
||||
}
|
||||
.top{
|
||||
top: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -133,11 +133,22 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.form = {
|
||||
addressName: "",
|
||||
center: "",
|
||||
address: "",
|
||||
mobile: "",
|
||||
};
|
||||
},
|
||||
add() {
|
||||
this.modalType = 0;
|
||||
this.$refs.form.resetFields();
|
||||
this.modalVisible = true;
|
||||
this.modalTitle = "添加自提地址";
|
||||
this.resetForm();
|
||||
this.modalVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form?.resetFields();
|
||||
});
|
||||
},
|
||||
edit(v) {
|
||||
this.modalType = 1;
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="发货地址">
|
||||
<el-form ref="addressGoods" :model="addressGoods" label-width="100px" :rules="addressGoodsValidate">
|
||||
<el-form ref="addressGoods" :model="addressGoods" label-width="120px" :rules="addressGoodsValidate" class="shop-setting-form">
|
||||
<el-form-item label="发货人姓名" prop="salesConsignorName">
|
||||
<el-input v-model="addressGoods.salesConsignorName" maxlength="11" clearable style="width: 20%">
|
||||
</el-input>
|
||||
@@ -482,4 +482,15 @@ export default {
|
||||
margin-left: 10px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.shop-setting-form {
|
||||
:deep(.el-form-item) {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
white-space: nowrap;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -95,9 +95,10 @@
|
||||
v-model="userEditModalVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="500px"
|
||||
top="30px"
|
||||
align-center
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="editForm" label-width="80px" :rules="formValidate">
|
||||
<el-form ref="editFormRef" :model="editForm" label-width="100px" :rules="formValidate" class="clerk-form">
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="mobile" disabled/>
|
||||
</el-form-item>
|
||||
@@ -106,12 +107,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="超级管理员" prop="isSuper">
|
||||
<el-radio-group v-model="editForm.isSuper">
|
||||
<el-radio-button value="1">是</el-radio-button>
|
||||
<el-radio-button value="0">否</el-radio-button>
|
||||
<el-radio-button :value="1">是</el-radio-button>
|
||||
<el-radio-button :value="0">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="角色" prop="roles" v-if="editForm.isSuper == 0">
|
||||
<el-form-item label="角色" prop="roles" v-if="editForm.isSuper === 0">
|
||||
<el-select v-model="editForm.roles" multiple>
|
||||
<el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
@@ -132,9 +133,10 @@
|
||||
v-model="userModalVisible"
|
||||
:close-on-click-modal="false"
|
||||
width="500px"
|
||||
top="30px"
|
||||
align-center
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" label-width="80px" :rules="formValidate">
|
||||
<el-form ref="addForm" :model="form" label-width="100px" :rules="addFormRules" class="clerk-form">
|
||||
<el-form-item label="手机号" prop="mobile">
|
||||
<el-input placeholder="请输入要添加的会员手机号码" maxlength="11" style="width: 75%" v-model="form.mobile"
|
||||
autocomplete="off" @change="checkClerks"/>
|
||||
@@ -146,6 +148,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item v-if="oldMember" label="用户名" prop="username">
|
||||
<el-input v-model="form.username" autocomplete="off" disabled/>
|
||||
<div class="form-tip">该手机号已注册为平台会员,提交后将直接添加为店员</div>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="密码" prop="password" v-if="newMember" :error="errorPass">
|
||||
@@ -153,11 +156,11 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="超级管理员" prop="isSuper" v-if="newMember || oldMember">
|
||||
<el-radio-group v-model="form.isSuper">
|
||||
<el-radio-button value="1">是</el-radio-button>
|
||||
<el-radio-button value="0">否</el-radio-button>
|
||||
<el-radio-button :value="1">是</el-radio-button>
|
||||
<el-radio-button :value="0">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="角色" prop="roles" v-if="(oldMember || newMember) && form.isSuper == 0">
|
||||
<el-form-item label="角色" prop="roles" v-if="(oldMember || newMember) && form.isSuper === 0">
|
||||
<el-select v-model="form.roles" multiple>
|
||||
<el-option v-for="item in roleList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
@@ -260,6 +263,18 @@ export default {
|
||||
total: 0, // 总数
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
addFormRules() {
|
||||
const rules = {
|
||||
username: this.formValidate.username,
|
||||
mobile: this.formValidate.mobile,
|
||||
};
|
||||
if (this.newMember) {
|
||||
rules.password = this.formValidate.password;
|
||||
}
|
||||
return rules;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
@@ -297,28 +312,43 @@ export default {
|
||||
},
|
||||
//重新校验会员
|
||||
checkAgainClerk() {
|
||||
this.memberCheck = false
|
||||
this.newMember = false
|
||||
this.oldMember = false
|
||||
this.memberCheck = false;
|
||||
this.newMember = false;
|
||||
this.oldMember = false;
|
||||
this.form.username = "";
|
||||
this.form.password = "";
|
||||
this.form.isSuper = 0;
|
||||
this.form.roles = [];
|
||||
this.errorPass = "";
|
||||
},
|
||||
//检测当前店员
|
||||
// 检测当前手机号对应会员:无 id 为新建会员,有 id 为已有会员
|
||||
checkClerk() {
|
||||
if (this.form.mobile) {
|
||||
this.newMember = false
|
||||
this.oldMember = false
|
||||
checkClerk(this.form.mobile).then(res => {
|
||||
if (!res.result.id) {
|
||||
this.newMember = true
|
||||
} else {
|
||||
this.oldMember = true
|
||||
this.form.username = res.result.username
|
||||
this.form.password = res.result.password
|
||||
}
|
||||
this.form.isSuper = 1
|
||||
this.memberCheck = true;
|
||||
});
|
||||
if (!this.form.mobile) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.newMember = false;
|
||||
this.oldMember = false;
|
||||
this.form.username = "";
|
||||
this.form.password = "";
|
||||
this.errorPass = "";
|
||||
checkClerk(this.form.mobile).then((res) => {
|
||||
if (!res.success) {
|
||||
return;
|
||||
}
|
||||
if (!res.result || !res.result.id) {
|
||||
// 平台无此会员,需新建账号并设置密码
|
||||
this.newMember = true;
|
||||
this.oldMember = false;
|
||||
} else {
|
||||
// 已有会员,仅绑定为店员,不需要也不应展示/回填密码
|
||||
this.newMember = false;
|
||||
this.oldMember = true;
|
||||
this.form.username = res.result.username || "";
|
||||
this.form.password = "";
|
||||
}
|
||||
this.form.isSuper = 0;
|
||||
this.memberCheck = true;
|
||||
});
|
||||
},
|
||||
// 搜索项部门选择
|
||||
handleSelectDep(v) {
|
||||
@@ -416,10 +446,9 @@ export default {
|
||||
},
|
||||
// 确认提交
|
||||
submitUser() {
|
||||
this.$refs.form.validate(valid => {
|
||||
this.$refs.addForm?.validate(valid => {
|
||||
if (valid) {
|
||||
// 添加用户 避免编辑后传入id
|
||||
const params = JSON.parse(JSON.stringify(this.form))
|
||||
const params = JSON.parse(JSON.stringify(this.form));
|
||||
delete params.id;
|
||||
delete params.status;
|
||||
if (this.newMember) {
|
||||
@@ -431,10 +460,12 @@ export default {
|
||||
this.errorPass = "密码长度不得少于6位";
|
||||
return;
|
||||
}
|
||||
//todo
|
||||
params.password = this.md5(params.password)
|
||||
} else {
|
||||
params.password = this.form.password
|
||||
params.password = this.md5(params.password);
|
||||
} else if (this.oldMember) {
|
||||
// 后端 ClerkAddDTO 对 username/password 有 @NotEmpty 校验;
|
||||
// 已有会员走 findByMobile 分支,不会使用该 password,仅用于通过参数校验
|
||||
params.username = this.form.username;
|
||||
params.password = params.password || "000000";
|
||||
}
|
||||
this.submitLoading = true;
|
||||
addUser(params).then(res => {
|
||||
@@ -450,21 +481,25 @@ export default {
|
||||
},
|
||||
// 添加用户
|
||||
add() {
|
||||
// this.checkClerks();
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加店员";
|
||||
this.$refs.form.resetFields();
|
||||
this.form = { // 表单
|
||||
this.form = {
|
||||
username: "",
|
||||
mobile: "",
|
||||
password: "",
|
||||
isSuper: 0,
|
||||
roles: [],
|
||||
departmentId: "",
|
||||
departmentTitle: ""
|
||||
},
|
||||
this.oldMember = false
|
||||
this.newMember = false
|
||||
departmentTitle: "",
|
||||
};
|
||||
this.oldMember = false;
|
||||
this.newMember = false;
|
||||
this.memberCheck = false;
|
||||
this.userModalVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addForm?.resetFields();
|
||||
this.$refs.depTree?.clearSelect?.();
|
||||
});
|
||||
},
|
||||
// 编辑用户
|
||||
edit(v) {
|
||||
@@ -593,3 +628,17 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.clerk-form {
|
||||
:deep(.el-form-item__label) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
.form-tip {
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
line-height: 1.4;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -75,8 +75,9 @@
|
||||
:title="modalTitle"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
align-center
|
||||
append-to-body
|
||||
class="permModal"
|
||||
top="30px"
|
||||
>
|
||||
<div v-loading="treeLoading" style="position: relative; max-height: 560px; overflow: auto">
|
||||
<el-tree
|
||||
@@ -115,7 +116,15 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-model="selectIsSuperModel" title="选择菜单权限" width="800px">
|
||||
<el-dialog
|
||||
v-model="selectIsSuperModel"
|
||||
title="选择菜单权限"
|
||||
width="800px"
|
||||
append-to-body
|
||||
align-center
|
||||
:close-on-click-modal="false"
|
||||
:z-index="3500"
|
||||
>
|
||||
<div class="btns">
|
||||
<el-button type="primary" class="btn-item" @click="setRole()">一键选中·数据权限</el-button>
|
||||
<el-button class="btn-item" @click="setRole('onlyView')">一键选中·查看权限</el-button>
|
||||
@@ -295,9 +304,14 @@ export default {
|
||||
addRole() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加角色";
|
||||
this.$refs.roleForm?.resetFields();
|
||||
delete this.roleForm.id;
|
||||
this.roleForm = {
|
||||
name: "",
|
||||
description: "",
|
||||
};
|
||||
this.roleModalVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.roleForm?.clearValidate();
|
||||
});
|
||||
},
|
||||
edit(v) {
|
||||
this.modalType = 1;
|
||||
|
||||
@@ -1,12 +1,27 @@
|
||||
|
||||
:deep(.el-overlay) {
|
||||
z-index: 800;
|
||||
z-index: 2000;
|
||||
}
|
||||
.decorate-view-link{
|
||||
font-size: 12px;
|
||||
margin: 0 4px;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
color: #999;
|
||||
}
|
||||
.decorate-view-btn {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 8px;
|
||||
margin-left: 10px;
|
||||
|
||||
:deep(.el-button) {
|
||||
width: 76px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.decorate-view-style {
|
||||
border: 1px solid #ededed;
|
||||
background: #f7f7fa;
|
||||
|
||||
@@ -46,7 +46,14 @@
|
||||
</el-alert>
|
||||
|
||||
<!-- 右侧显示抽屉 -->
|
||||
<el-drawer title="选择风格" :show-close="false" size="400px" v-model="styleFlag">
|
||||
<el-drawer
|
||||
title="选择风格"
|
||||
:show-close="false"
|
||||
size="400px"
|
||||
v-model="styleFlag"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
>
|
||||
<div class="drawer">
|
||||
<template v-for="(item, index) in modelData" :key="index">
|
||||
<div
|
||||
@@ -67,6 +74,8 @@
|
||||
:show-close="false"
|
||||
size="400px"
|
||||
v-model="promotionsFlag"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
>
|
||||
<div class="drawer">
|
||||
<template v-for="(item, index) in modelData" :key="index">
|
||||
@@ -185,7 +194,6 @@
|
||||
<el-button
|
||||
@click="bindGoodsCategory(title_index)"
|
||||
size="small"
|
||||
style="margin-top: 20px"
|
||||
>选择分类</el-button
|
||||
>
|
||||
</div>
|
||||
@@ -686,6 +694,7 @@ export default {
|
||||
clickDrawer(item, index) {
|
||||
this.$emit("handleDrawer", item);
|
||||
this.styleFlag = false;
|
||||
this.promotionsFlag = false;
|
||||
},
|
||||
// 打开图片选择器
|
||||
liliDialogFlag(flag) {
|
||||
@@ -705,8 +714,7 @@ export default {
|
||||
if (!val.zoneInfo) {
|
||||
val.zoneInfo = [];
|
||||
}
|
||||
this.$refs.hotzone.flag = true;
|
||||
this.$refs.hotzone.res = val;
|
||||
this.$refs.hotzone.open(val);
|
||||
} else {
|
||||
this.liliDialogFlag(false);
|
||||
}
|
||||
|
||||
@@ -186,25 +186,27 @@ export default {
|
||||
API_Promotions.getLiveList({
|
||||
status: "START",
|
||||
pageSize: 1,
|
||||
}).then((res) => {
|
||||
if (res.success && res.result.size > 0) {
|
||||
API_Promotions.getLiveInfo(res.result.records[0].id).then(
|
||||
(res) => {
|
||||
if (res.success) {
|
||||
this.contentData.list[newIndex].options.list.push({
|
||||
type: val.promotionsType,
|
||||
title: val.name,
|
||||
title1: val.subName,
|
||||
color1: val.subColor,
|
||||
bk_color: val.subBkColor,
|
||||
data: res.result.commodityList
|
||||
? res.result.commodityList.splice(0, 2)
|
||||
: [],
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
pageNumber: 1,
|
||||
}).then((listRes) => {
|
||||
const records = listRes.result?.records || [];
|
||||
if (!listRes.success || records.length === 0) {
|
||||
this.$Message.warning("暂无进行中的直播活动");
|
||||
return;
|
||||
}
|
||||
API_Promotions.getLiveInfo(records[0].id).then((infoRes) => {
|
||||
if (infoRes.success) {
|
||||
this.contentData.list[newIndex].options.list.push({
|
||||
type: val.promotionsType,
|
||||
title: val.name,
|
||||
title1: val.subName,
|
||||
color1: val.subColor,
|
||||
bk_color: val.subBkColor,
|
||||
data: infoRes.result.commodityList
|
||||
? infoRes.result.commodityList.splice(0, 2)
|
||||
: [],
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
API_Promotions.getAllPromotion().then((res) => {
|
||||
|
||||
@@ -42,23 +42,36 @@
|
||||
text-align: center;
|
||||
height: 44px;
|
||||
border-bottom: 1px solid #ededed;
|
||||
background: #fff;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.content {
|
||||
box-sizing: border-box;
|
||||
margin: 20px 0;
|
||||
padding: 50px 13px;
|
||||
width: 360px;
|
||||
background: url("../../../assets/iPhoneX_model.png") no-repeat;
|
||||
height: 780px;
|
||||
background-size: 360px;
|
||||
background-size: 100% 100%;
|
||||
overflow: hidden;
|
||||
> .component,
|
||||
.draggable {
|
||||
height: 590px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
> .draggable {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
min-height: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
background: #ebebeb;
|
||||
}
|
||||
> .draggable {
|
||||
padding-bottom: 100px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
> .component,
|
||||
.draggable :deep(.component) {
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
|
||||
@@ -13,14 +13,6 @@
|
||||
export default {
|
||||
title: "导航栏",
|
||||
props: ["res"],
|
||||
watch: {
|
||||
res: {
|
||||
handler(newValue, oldValue) {
|
||||
this['res'] = newValue;
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<div v-if="goodsBlock" class="layout">
|
||||
<div class="goods-cell-title">
|
||||
<div
|
||||
class="goods-item-title"
|
||||
:class="{ selected: selected.index == index }"
|
||||
@click="handleClickTitle(title, index)"
|
||||
v-for="(title, index) in res.list[0].titleWay"
|
||||
v-for="(title, index) in goodsBlock.titleWay"
|
||||
:key="index"
|
||||
>
|
||||
<h4>{{ title.title }}</h4>
|
||||
@@ -13,36 +13,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="goods-list">
|
||||
<div
|
||||
v-if="
|
||||
item.___index != undefined
|
||||
? selected.index == item.___index
|
||||
: selected.val == item.type
|
||||
"
|
||||
class="goods-item"
|
||||
v-for="(item, item_index) in res.list[0].listWay"
|
||||
:key="item_index"
|
||||
>
|
||||
<div class="goods-img">
|
||||
<el-icon
|
||||
:size="20"
|
||||
color="#e1251b"
|
||||
@click="closeGoods(item, item_index)"
|
||||
class="goods-icon"
|
||||
>
|
||||
<CircleClose />
|
||||
</el-icon>
|
||||
<img :src="item.img" alt />
|
||||
</div>
|
||||
<div class="goods-desc">
|
||||
<div class="goods-title">
|
||||
{{ item.title }}
|
||||
<template v-for="(item, item_index) in goodsBlock.listWay" :key="item_index">
|
||||
<div v-if="isGoodsVisible(item)" class="goods-item">
|
||||
<div class="goods-img">
|
||||
<el-icon
|
||||
:size="20"
|
||||
color="#e1251b"
|
||||
@click="closeGoods(item, item_index)"
|
||||
class="goods-icon"
|
||||
>
|
||||
<CircleClose />
|
||||
</el-icon>
|
||||
<img :src="item.img" alt />
|
||||
</div>
|
||||
<div class="goods-bottom">
|
||||
<div class="goods-price">¥{{ $filters.unitPrice(item.price) }}</div>
|
||||
<div class="goods-desc">
|
||||
<div class="goods-title">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="goods-bottom">
|
||||
<div class="goods-price">¥{{ $filters.unitPrice(item.price) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -53,29 +46,46 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
selected: {
|
||||
// 已选数据
|
||||
index: 0,
|
||||
val: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
props: ["res"],
|
||||
computed: {
|
||||
goodsBlock() {
|
||||
return this.res?.list?.[0] || null;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
res: {
|
||||
goodsBlock: {
|
||||
handler(val) {
|
||||
// 监听父级的值 如果有值将值赋给selected
|
||||
if (val) {
|
||||
this.selected.val = this.res.list[0].listWay[0].type;
|
||||
if (!val) {
|
||||
return;
|
||||
}
|
||||
const firstGoods = (val.listWay || []).find(Boolean);
|
||||
if (firstGoods) {
|
||||
this.selected.val = firstGoods.type;
|
||||
} else if (val.titleWay?.[0]?.title) {
|
||||
this.selected.val = val.titleWay[0].title;
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 删除商品
|
||||
closeGoods(val, index) {
|
||||
this.res.list[0].listWay.splice(index, 1);
|
||||
isGoodsVisible(item) {
|
||||
if (!item) {
|
||||
return false;
|
||||
}
|
||||
if (item.___index != undefined) {
|
||||
return this.selected.index == item.___index;
|
||||
}
|
||||
return this.selected.val == item.type;
|
||||
},
|
||||
closeGoods(val, index) {
|
||||
this.goodsBlock.listWay.splice(index, 1);
|
||||
},
|
||||
// 切换商品列表
|
||||
handleClickTitle(val, index) {
|
||||
this.selected.index = index;
|
||||
this.selected.val = val.title;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="wrapper">
|
||||
<el-affix :offset="100">
|
||||
<el-card class="card fixed-bottom">
|
||||
<affixTime @selected="clickBreadcrumb" />
|
||||
<affixTime :closeShop="true" @selected="clickBreadcrumb" />
|
||||
</el-card>
|
||||
</el-affix>
|
||||
|
||||
@@ -183,11 +183,6 @@
|
||||
{{ $filters.unitPrice(row.flowPrice, "¥") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="80" align="center">
|
||||
<template #default="{ row }">
|
||||
<a v-if="row" class="link-text" @click="goDetail(row)">查看</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="退单" name="refund">
|
||||
@@ -236,11 +231,6 @@
|
||||
<span v-if="row">{{ $filters.unitPrice(row.flowPrice || 0, "¥") }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="90" align="center">
|
||||
<template #default="{ row }">
|
||||
<a v-if="row" class="link-text" @click="goDetail(row)">查看</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -413,11 +403,6 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
goDetail(row) {
|
||||
const sn = row.sn;
|
||||
const path = this.orderOrRefund === "order" ? "order-detail" : "return-goods-order-detail";
|
||||
this.$router.push({ path, query: { sn } });
|
||||
},
|
||||
// 订单图
|
||||
initOrderChart() {
|
||||
// 默认已经加载 legend-filter 交互
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="wrapper">
|
||||
<el-affix :offset="100">
|
||||
<el-card class="card fixed-bottom">
|
||||
<affixTime @selected="clickBreadcrumb" />
|
||||
<affixTime :closeShop="true" @selected="clickBreadcrumb" />
|
||||
</el-card>
|
||||
</el-affix>
|
||||
<el-card class="card">
|
||||
|
||||
@@ -161,6 +161,9 @@
|
||||
box-sizing: border-box;
|
||||
margin: 0 13px 8px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
.card {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
@@ -172,12 +175,19 @@
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.checkbox {
|
||||
.card-checkbox {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
z-index: 1000;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
|
||||
:deep(.el-checkbox__label) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.preview {
|
||||
width: 100%;
|
||||
@@ -226,35 +236,6 @@
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
/* Checkbox默认的样式 */
|
||||
.check-box {
|
||||
.ivu-checkbox {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
z-index: 100;
|
||||
}
|
||||
}
|
||||
/* 覆盖iView默认的Checkbox样式 */
|
||||
.ivu-checkbox-wrapper {
|
||||
/*font-size: 16px; !* 修改字体大小 *!*/
|
||||
/*color: #495060; !* 修改文本颜色 *!*/
|
||||
/* 添加其他需要的样式 */
|
||||
}
|
||||
.ivu-checkbox-inner {
|
||||
/*width: 20px; !* 修改选框大小 *!*/
|
||||
/*height: 20px;*/
|
||||
/*border-color: #dcdee2; !* 修改边框颜色 *!*/
|
||||
/* 添加其他需要的样式 */
|
||||
}
|
||||
/* 当Checkbox被选中时的样式 */
|
||||
.ivu-checkbox-checked .ivu-checkbox-inner {
|
||||
/*background-color: #2db7f5; !* 修改选中时的背景颜色 *!*/
|
||||
}
|
||||
/* 当Checkbox不可用时的样式 */
|
||||
.ivu-checkbox-disabled .ivu-checkbox-inner {
|
||||
/*background-color: #e9e9e9; !* 修改禁用状态下的背景颜色 *!*/
|
||||
}
|
||||
|
||||
.demo-tree-render .ivu-tree-title{
|
||||
width: 94%;
|
||||
|
||||
@@ -165,37 +165,39 @@
|
||||
<el-checkbox-group v-model="selectedOss" @change="selectOssChange">
|
||||
<div class="img-box">
|
||||
<div v-for="(item, index) in data" :key="index" class="img-item">
|
||||
<el-checkbox :value="item.id + ',' + item.url" class="check-box">
|
||||
<div
|
||||
class="card"
|
||||
@mouseenter="onMouseOver(item, index)"
|
||||
@mouseleave="onMouseOut(item, index)"
|
||||
>
|
||||
<img :src="item.url" alt="" />
|
||||
<div v-if="item.isShowPreview" class="preview">
|
||||
<div @click.prevent="download(item)">
|
||||
<el-tooltip content="下载" placement="top">
|
||||
<el-icon :size="18"><Download /></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div @click.prevent="remove(item)">
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-icon :size="18"><Delete /></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div @click.prevent="showPic(item)">
|
||||
<el-tooltip content="预览" placement="top">
|
||||
<el-icon :size="22"><View /></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div
|
||||
class="card"
|
||||
:class="{ 'custom-checkbox-card-checked': selectedOss.includes(item.id + ',' + item.url) }"
|
||||
@mouseenter="onMouseOver(item, index)"
|
||||
@mouseleave="onMouseOut(item, index)"
|
||||
>
|
||||
<el-checkbox
|
||||
:value="item.id + ',' + item.url"
|
||||
class="card-checkbox"
|
||||
@click.stop
|
||||
/>
|
||||
<img :src="item.url" alt="" />
|
||||
<div v-if="item.isShowPreview" class="preview">
|
||||
<div @click.prevent="download(item)">
|
||||
<el-tooltip content="下载" placement="top">
|
||||
<el-icon :size="18"><Download /></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div @click.prevent="remove(item)">
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-icon :size="18"><Delete /></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div @click.prevent="showPic(item)">
|
||||
<el-tooltip content="预览" placement="top">
|
||||
<el-icon :size="22"><View /></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
<div>
|
||||
<el-tooltip :content="item.name" placement="bottom">
|
||||
<div class="text">{{ item.name }}</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-tooltip :content="item.name" placement="bottom">
|
||||
<div class="text">{{ item.name }}</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
|
||||
Reference in New Issue
Block a user