mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-20 01:45:53 +08:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07f41f5cb6 | ||
|
|
133febe7a7 | ||
|
|
e74c6d9eda | ||
|
|
0499a9c237 | ||
|
|
fbb24fd07f | ||
|
|
0b62cba3b9 | ||
|
|
0fd4645514 | ||
|
|
0e277a8e6d | ||
|
|
ca8d518fae | ||
|
|
3e3c101a1e | ||
|
|
c6417cf197 | ||
|
|
4c0aec2f42 | ||
|
|
7331fcbb17 | ||
|
|
f5faad982c | ||
|
|
48c0dcb69b | ||
|
|
0504592f7d | ||
|
|
9ff4197ec4 | ||
|
|
c835616ad2 | ||
|
|
e5449213c2 | ||
|
|
872a5d1982 | ||
|
|
1246810c01 | ||
|
|
fc393ecd64 | ||
|
|
9b9295ea94 | ||
|
|
c403fce786 | ||
|
|
31349634f6 | ||
|
|
cc1afed902 | ||
|
|
3a76ba2c1f | ||
|
|
da330b80c8 | ||
|
|
1028b8189e | ||
|
|
6988ad8bf0 | ||
|
|
e318fe5be0 | ||
|
|
4166a1ca58 | ||
|
|
35ea8adf7d | ||
|
|
be2280907e | ||
|
|
6100f1e39a | ||
|
|
5368f3c323 | ||
|
|
be1a05e566 | ||
|
|
0a02195ca6 | ||
|
|
6887b6c624 | ||
|
|
f7167912e7 | ||
|
|
14feac43fe | ||
|
|
c9e58f3586 | ||
|
|
e8809bbeb8 | ||
|
|
d8b9d81f70 | ||
|
|
4340b1a5b7 | ||
|
|
950b8a097c | ||
|
|
72ed363ac3 | ||
|
|
e493f26442 | ||
|
|
f973cadd80 | ||
|
|
5143f2b83f | ||
|
|
b728e340a0 | ||
|
|
18bfa0edef | ||
|
|
9fbc61f742 |
@@ -1 +1 @@
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-1.0.1:0.0.4 .
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-4.2.0:0.0.2 .
|
||||
|
||||
@@ -31,7 +31,6 @@ export default {
|
||||
</script>
|
||||
<style lang="scss">
|
||||
#app{
|
||||
min-height: 100%;
|
||||
@include background_color($light_background_color);
|
||||
}
|
||||
</style>
|
||||
|
||||
BIN
buyer/src/assets/images/decorate.png
Normal file
BIN
buyer/src/assets/images/decorate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
@@ -53,6 +53,10 @@ export default {
|
||||
store: { // 是否为店铺页面
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
hover: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -89,11 +93,15 @@ export default {
|
||||
} else {
|
||||
this.logoImg = this.Cookies.getItem('logo')
|
||||
}
|
||||
|
||||
this.searchData = this.$route.query.keyword
|
||||
|
||||
if (!this.hover) { // 首页顶部固定搜索栏不调用热词接口
|
||||
hotWords({start: 1, end: 5}).then(res => {
|
||||
if (res.success) this.promotionTags = res.result
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="copyright">
|
||||
<p>Copyright © LILI</p>
|
||||
<p>Copyright © {{year}} LILI</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -58,7 +58,8 @@ export default {
|
||||
[ '支付方式', '货到付款', '在线支付', '分期付款', '邮局汇款', '公司转账' ],
|
||||
[ '售后服务', '售后政策', '价格保护', '退款说明', '返修/退换货', '取消订单' ]
|
||||
],
|
||||
moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'] // 更多链接
|
||||
moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'], // 更多链接
|
||||
year: new Date().getFullYear() // 当前年份
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
{{ skuDetail.goodsName }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="sell-point">
|
||||
{{skuDetail.sellingPoint}}
|
||||
</div>
|
||||
<!-- 限时秒杀 -->
|
||||
<Promotion v-if="promotionMap['SECKILL']" :time="promotionMap['SECKILL'].endTime"></Promotion>
|
||||
<!-- 商品详细 价格、优惠券、促销 -->
|
||||
@@ -84,14 +87,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 选择颜色 -->
|
||||
<div class="item-select" v-for="(sku, index) in formatList" :key="sku.id">
|
||||
<div class="item-select" v-for="(sku, index) in formatList" :key="sku.name">
|
||||
<div class="item-select-title">
|
||||
<p>{{ sku.name }}</p>
|
||||
</div>
|
||||
<div class="item-select-column">
|
||||
<div class="item-select-row" v-for="(item) in sku.values" :key="item.id">
|
||||
<div class="item-select-box" @click="select(index, sku.id, item.id)"
|
||||
:class="{ 'item-select-box-active': item.id === currentSelceted[index] }"
|
||||
<div class="item-select-row" v-for="(item) in sku.values" :key="item.value">
|
||||
<div class="item-select-box" @click="select(index, item.value)"
|
||||
:class="{ 'item-select-box-active': item.value === currentSelceted[index] }"
|
||||
>
|
||||
<div class="item-select-intro">
|
||||
<p>{{ item.value }}</p>
|
||||
@@ -111,7 +114,7 @@
|
||||
<span class="inventory"> 库存{{skuDetail.quantity}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-select" v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS'">
|
||||
<div class="item-select" v-if="skuDetail.goodsType !== 'VIRTUAL_GOODS' && skuDetail.weight !== 0">
|
||||
<div class="item-select-title">
|
||||
<p>重量</p>
|
||||
</div>
|
||||
@@ -151,7 +154,7 @@ export default {
|
||||
count: 1, // 商品数量
|
||||
imgIndex: 0, // 展示图片下标
|
||||
currentSelceted: [], // 当前商品sku
|
||||
imgList: this.detail.data.specList[0].specImage || [], // 商品图片列表
|
||||
imgList: this.detail.data.specList[0].specImage || [{}], // 商品图片列表
|
||||
skuDetail: this.detail.data, // sku详情
|
||||
goodsSpecList: this.detail.specs, // 商品spec
|
||||
promotionMap: { // 活动状态
|
||||
@@ -170,14 +173,14 @@ export default {
|
||||
Promotion
|
||||
},
|
||||
methods: {
|
||||
select (index, id, valueId) { // 选择规格
|
||||
this.$set(this.currentSelceted, index, valueId);
|
||||
select (index, value) { // 选择规格
|
||||
this.$set(this.currentSelceted, index, value);
|
||||
|
||||
let selectedSkuId = this.goodsSpecList.find((i) => {
|
||||
let matched = true;
|
||||
let specValues = i.specValues.filter((j) => j.specName !== 'images');
|
||||
for (let n = 0; n < specValues.length; n++) {
|
||||
if (specValues[n].specValueId !== this.currentSelceted[n]) {
|
||||
if (specValues[n].specValue !== this.currentSelceted[n]) {
|
||||
matched = false;
|
||||
return;
|
||||
}
|
||||
@@ -267,15 +270,12 @@ export default {
|
||||
},
|
||||
formatSku (list) {
|
||||
// 格式化数据
|
||||
|
||||
let arr = [{}];
|
||||
|
||||
list.forEach((item, index) => {
|
||||
item.specValues.forEach((spec, specIndex) => {
|
||||
let id = spec.specNameId;
|
||||
let name = spec.specName;
|
||||
let values = {
|
||||
id: spec.specValueId,
|
||||
value: spec.specValue,
|
||||
quantity: item.quantity
|
||||
};
|
||||
@@ -287,7 +287,7 @@ export default {
|
||||
if (
|
||||
arrItem.name === name &&
|
||||
arrItem.values &&
|
||||
!arrItem.values.find((i) => i.id === values.id)
|
||||
!arrItem.values.find((i) => i.value === values.value)
|
||||
) {
|
||||
arrItem.values.push(values);
|
||||
}
|
||||
@@ -297,7 +297,6 @@ export default {
|
||||
});
|
||||
if (!keys.includes(name)) {
|
||||
arr.push({
|
||||
id: id,
|
||||
name: name,
|
||||
values: [values]
|
||||
});
|
||||
@@ -312,7 +311,7 @@ export default {
|
||||
if (cur) {
|
||||
cur.specValues.filter((i) => i.specName !== 'images')
|
||||
.forEach((value, _index) => {
|
||||
this.currentSelceted[_index] = value.specValueId;
|
||||
this.currentSelceted[_index] = value.specValue;
|
||||
});
|
||||
}
|
||||
this.skuList = list;
|
||||
@@ -659,5 +658,10 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.sell-point {
|
||||
font-size: 12px;
|
||||
color: red;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
/******************商品图片及购买详情结束******************/
|
||||
</style>
|
||||
|
||||
@@ -87,12 +87,17 @@
|
||||
</div>
|
||||
</TabPane>
|
||||
<TabPane label="商品参数">
|
||||
<table class="mt_10" border="1" cellpadding='0' cellspacing="0" v-if="skuDetail.goodsParamsList && skuDetail.length">
|
||||
<tr v-for="param in skuDetail.goodsParamsList" :key="param">
|
||||
<td>{{param.paramName}}</td><td>{{param.paramValue}}</td>
|
||||
<template v-if="detail.goodsParamsDTOList && detail.goodsParamsDTOList.length">
|
||||
<div class="goods-params" v-for="item in detail.goodsParamsDTOList" :key="item.groupId">
|
||||
<span class="ml_10">{{item.groupName}}</span>
|
||||
<table class="mb_10" cellpadding='0' cellspacing="0" >
|
||||
<tr v-for="param in item.goodsParamsItemDTOList" :key="param.paramId">
|
||||
<td style="text-align: center">{{param.paramName}}</td><td>{{param.paramValue}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- <div v-else>暂无商品参数</div> -->
|
||||
</div>
|
||||
</template>
|
||||
<div v-else>暂无商品参数</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
@@ -217,7 +222,7 @@ export default {
|
||||
});
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
this.getList();
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -484,17 +489,27 @@ export default {
|
||||
color: $theme_color;
|
||||
}
|
||||
table{
|
||||
border-color: #eee;
|
||||
border-color:#efefef;
|
||||
color: #999;
|
||||
width: 70%;
|
||||
margin-left: 10px;
|
||||
min-width: 30%;
|
||||
margin-left: 30px;
|
||||
font-size: 12px;
|
||||
tr{
|
||||
td:nth-child(1){
|
||||
width: 200px;
|
||||
width: 100px;
|
||||
}
|
||||
td:nth-child(2){
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
td{
|
||||
padding: 5px;
|
||||
padding: 6px;
|
||||
}
|
||||
}
|
||||
.goods-params {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #eee;
|
||||
margin-left: 30px;
|
||||
span{color:#999}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,37 +2,33 @@
|
||||
<div class="box">
|
||||
<div class="nav">
|
||||
<ul class="location">
|
||||
<li>
|
||||
<router-link to="/" v-if="$route.path !== '/'" class="home-page">
|
||||
<Icon type="md-home" />首页
|
||||
</router-link>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="detail">
|
||||
<li class="first" v-show="!userInfo.username">
|
||||
<router-link :to="`/signUp`">
|
||||
<span style="border:none">立即注册</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-show="!userInfo.username">
|
||||
<router-link :to="`/login?rePath=${$route.path}&query=${JSON.stringify($route.query)}`">
|
||||
<span style="border:none" class="tipsLogin">请登录</span>
|
||||
<span style="border:none">请登录</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-show="!!userInfo.username">
|
||||
<Dropdown>
|
||||
<p class="username-p">
|
||||
<div class="username-p">
|
||||
<p>
|
||||
<Avatar class="person-icon" :src="userInfo.face" icon="person" size="small" />
|
||||
<span class="username">{{ userInfo.nickName? userInfo.nickName : userInfo.username | secrecyMobile }}</span>
|
||||
</p>
|
||||
<DropdownMenu slot="list">
|
||||
<div class="my-page">
|
||||
<div class="my-info" @click="myInfo">
|
||||
<Icon type="md-home"></Icon>
|
||||
<p>我的主页</p>
|
||||
<transition name='fade'>
|
||||
<ul class="drop-items">
|
||||
<li @click="goUserCenter('/home')">我的主页</li>
|
||||
<li @click="goUserCenter('/home/Coupons')">优惠券</li>
|
||||
<li @click="goUserCenter('/home/Favorites')">我的收藏</li>
|
||||
<li @click="signOutFun">退出登录</li>
|
||||
</ul>
|
||||
</transition>
|
||||
</div>
|
||||
<div class="sign-out" @click="signOutFun">
|
||||
<Icon type="md-exit"></Icon>
|
||||
<p>退出登录</p>
|
||||
</div>
|
||||
</div>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</li>
|
||||
<li @click="goUserCenter('/home/MyOrder')"><span class="nav-item hover-color">我的订单</span></li>
|
||||
<li @click="goUserCenter('/home/MyTracks')"><span class="nav-item hover-color">我的足迹</span></li>
|
||||
@@ -95,28 +91,28 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import storage from "@/plugins/storage.js";
|
||||
import { cartGoodsAll } from "@/api/cart.js";
|
||||
import storage from '@/plugins/storage.js';
|
||||
import { cartGoodsAll } from '@/api/cart.js';
|
||||
export default {
|
||||
name: "M-Header",
|
||||
name: 'M-Header',
|
||||
created () {
|
||||
if (storage.getItem("userInfo")) {
|
||||
this.userInfo = JSON.parse(storage.getItem("userInfo"));
|
||||
if (storage.getItem('userInfo')) {
|
||||
this.userInfo = JSON.parse(storage.getItem('userInfo'));
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
// 主题颜色切换
|
||||
themeType: "light",
|
||||
themeType: 'light',
|
||||
userInfo: {}, // 用户信息
|
||||
shoppingCart: [], // 购物车
|
||||
shoppingCart: [] // 购物车
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
cartNum () {
|
||||
return this.$store.state.cartNum;
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeCity (city) { // 选择所在城市
|
||||
@@ -124,15 +120,15 @@ export default {
|
||||
},
|
||||
goToPay () { // 跳转购物车
|
||||
let url = this.$router.resolve({
|
||||
path: "/cart",
|
||||
path: '/cart'
|
||||
});
|
||||
window.open(url.href, "_blank");
|
||||
window.open(url.href, '_blank');
|
||||
},
|
||||
myInfo () { // 跳转会员中心
|
||||
let url = this.$router.resolve({
|
||||
path: "/home",
|
||||
path: '/home'
|
||||
});
|
||||
window.open(url.href, "_blank");
|
||||
window.open(url.href, '_blank');
|
||||
},
|
||||
signOutFun () { // 退出登录
|
||||
storage.removeItem('accessToken');
|
||||
@@ -148,32 +144,32 @@ export default {
|
||||
this.$router.push({ path: path });
|
||||
} else {
|
||||
this.$Modal.confirm({
|
||||
title: "请登录",
|
||||
content: "<p>请登录后执行此操作</p>",
|
||||
okText: "立即登录",
|
||||
cancelText: "继续浏览",
|
||||
title: '请登录',
|
||||
content: '<p>请登录后执行此操作</p>',
|
||||
okText: '立即登录',
|
||||
cancelText: '继续浏览',
|
||||
onOk: () => {
|
||||
this.$router.push({
|
||||
path: "/login",
|
||||
path: '/login',
|
||||
query: {
|
||||
rePath: this.$router.history.current.path,
|
||||
query: JSON.stringify(this.$router.history.current.query),
|
||||
},
|
||||
query: JSON.stringify(this.$router.history.current.query)
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
shopEntry () {
|
||||
// 店铺入驻
|
||||
if (storage.getItem("accessToken")) {
|
||||
if (storage.getItem('accessToken')) {
|
||||
let routeUrl = this.$router.resolve({
|
||||
path: "/shopEntry",
|
||||
query: { id: 1 },
|
||||
path: '/shopEntry',
|
||||
query: { id: 1 }
|
||||
});
|
||||
window.open(routeUrl.href, "_blank");
|
||||
window.open(routeUrl.href, '_blank');
|
||||
} else {
|
||||
this.$router.push("login");
|
||||
this.$router.push('login');
|
||||
}
|
||||
},
|
||||
getCartList () {
|
||||
@@ -181,12 +177,12 @@ export default {
|
||||
if (this.userInfo.username) {
|
||||
cartGoodsAll().then((res) => {
|
||||
this.shoppingCart = res.result.skuList;
|
||||
this.$store.commit("SET_CARTNUM", this.shoppingCart.length);
|
||||
this.Cookies.setItem("cartNum", this.shoppingCart.length);
|
||||
this.$store.commit('SET_CARTNUM', this.shoppingCart.length);
|
||||
this.Cookies.setItem('cartNum', this.shoppingCart.length);
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -201,12 +197,10 @@ export default {
|
||||
.shopping-cart-null span {
|
||||
@include sub_color($light_sub_color);
|
||||
}
|
||||
.tipsLogin {
|
||||
color: $theme_color;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100%;
|
||||
font-size: 12px!important;
|
||||
// height: 35px;
|
||||
@include background_color($light_white_background_color);
|
||||
}
|
||||
@@ -222,7 +216,7 @@ export default {
|
||||
}
|
||||
.nav li {
|
||||
float: left;
|
||||
font-size: 14px;
|
||||
font-size: 12px;
|
||||
line-height: 35px;
|
||||
margin-right: 10px;
|
||||
font-weight: bold;
|
||||
@@ -230,7 +224,7 @@ export default {
|
||||
.nav a,
|
||||
.nav-item {
|
||||
text-decoration: none;
|
||||
padding-left: 10px;
|
||||
padding-left: 14px;
|
||||
border-left: 1px solid #ccc;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
@@ -324,8 +318,67 @@ export default {
|
||||
line-height: 16px;
|
||||
}
|
||||
.username-p {
|
||||
position: relative;
|
||||
p{
|
||||
cursor: pointer;
|
||||
}
|
||||
.drop-items {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 45px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 0 auto;
|
||||
padding: 5px 10px;
|
||||
z-index: 20;
|
||||
height: 150px;
|
||||
background-color: #fff;
|
||||
width: 80px;
|
||||
border: 1px solid #eee;
|
||||
box-shadow: 2px 2px 7px #999;
|
||||
|
||||
li {
|
||||
color: rgb(107, 106, 106);
|
||||
width: 100%;
|
||||
border-bottom:1px solid rgb(207, 206, 206);
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
&:last-child{
|
||||
border: none;
|
||||
}
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
|
||||
&::before{
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
left: 30px;
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 10px solid #999;
|
||||
border-color: transparent transparent #fff transparent ;
|
||||
}
|
||||
|
||||
&::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 80px;
|
||||
height: 20px;
|
||||
top: -20px;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
.drop-items{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.my-page {
|
||||
padding: 3px 5px;
|
||||
width: 180px;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="scroll-show">
|
||||
<div class="content clearfix">
|
||||
<cateNav class="cate" :showNavBar="false"></cateNav>
|
||||
<Search class="search-con" :showLogo="false" :showTag="false"></Search>
|
||||
<cateNav class="cate" :hover="true" :showNavBar="false"></cateNav>
|
||||
<Search class="search-con" :hover="true" :showLogo="false" :showTag="false"></Search>
|
||||
<Icon type="ios-cart-outline" @click="goCartList" class="cart-icon" @mouseenter.native="getCartList" />
|
||||
<i class="cart-badge">{{cartNum < 100 ? cartNum : '99'}}</i>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
.model-content {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
// background: #fff;
|
||||
min-height: 1200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<div class="model-item" v-if="element && element.key">
|
||||
<!-- 轮播图模块,包括个人信息,快捷导航模块 -->
|
||||
<template v-if="element.type == 'carousel'">
|
||||
<model-carousel :data="element"></model-carousel>
|
||||
<model-carousel :data="element" class="mb_20"></model-carousel>
|
||||
</template>
|
||||
<!-- 热门广告 -->
|
||||
<template v-if="element.type == 'hotAdvert'">
|
||||
<div>
|
||||
<div class="mb_20">
|
||||
<img
|
||||
style="display: block"
|
||||
class="hover-pointer"
|
||||
@@ -36,7 +36,7 @@
|
||||
<!-- 折扣广告 -->
|
||||
<template v-if="element.type == 'discountAdvert'">
|
||||
<div
|
||||
class="discountAdvert"
|
||||
class="discountAdvert mb_20"
|
||||
:style="{
|
||||
'background-image': 'url(' + element.options.bgImg.img + ')',
|
||||
}"
|
||||
@@ -66,28 +66,28 @@
|
||||
|
||||
<!-- 好货推荐 -->
|
||||
<template v-if="element.type == 'recommend'">
|
||||
<recommend :data="element"></recommend>
|
||||
<recommend :data="element" class="mb_20"></recommend>
|
||||
</template>
|
||||
<!-- 新品排行 -->
|
||||
<template v-if="element.type == 'newGoodsSort'">
|
||||
<new-goods-sort :data="element"></new-goods-sort>
|
||||
<new-goods-sort :data="element" class="mb_20"></new-goods-sort>
|
||||
</template>
|
||||
<!-- 首页广告 -->
|
||||
<template v-if="element.type == 'firstAdvert'">
|
||||
<first-page-advert :data="element"></first-page-advert>
|
||||
<first-page-advert :data="element" class="mb_20"></first-page-advert>
|
||||
</template>
|
||||
<!-- 横幅广告 -->
|
||||
<template v-if="element.type == 'bannerAdvert'">
|
||||
<img
|
||||
width="1200"
|
||||
class="hover-pointer"
|
||||
class="hover-pointer mb_20"
|
||||
@click="linkTo(element.options.url)"
|
||||
:src="element.options.img"
|
||||
alt=""
|
||||
/>
|
||||
</template>
|
||||
<template v-if="element.type == 'notEnough'">
|
||||
<not-enough :data="element"></not-enough>
|
||||
<not-enough :data="element" class="mb_20"></not-enough>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@@ -122,23 +122,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.model-item {
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
&:hover {
|
||||
.del-btn {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
.del-btn {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: -100px;
|
||||
top: 0;
|
||||
&:hover {
|
||||
display: block;
|
||||
}
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/** 热门广告 */
|
||||
@@ -299,4 +283,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ export default {
|
||||
return {
|
||||
options: this.data.options // 装修数据
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -189,7 +189,6 @@ export default {
|
||||
selectedItem: {
|
||||
// 监听已选条件,来调用列表接口
|
||||
handler (val) {
|
||||
console.log(val);
|
||||
let classification = [];
|
||||
this.params.brandId = ''
|
||||
this.params.prop = ''
|
||||
@@ -636,7 +635,8 @@ export default {
|
||||
> div:first-child {
|
||||
width: 100px;
|
||||
background: #eee;
|
||||
padding: 10px 0 0 10px;
|
||||
padding-left: 10px;
|
||||
line-height: 30px;
|
||||
}
|
||||
> div:last-child {
|
||||
width: 1100px;
|
||||
|
||||
@@ -73,6 +73,10 @@ export default {
|
||||
showNavBar: { // 显示全部商品分类右侧导航条
|
||||
default: true,
|
||||
type: Boolean
|
||||
},
|
||||
hover: {
|
||||
default: false,
|
||||
type: Boolean
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -90,6 +94,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getCate () { // 获取分类数据
|
||||
if (this.hover) return false;
|
||||
getCategory(0).then(res => {
|
||||
if (res.success) {
|
||||
this.cateList = res.result;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp">
|
||||
<div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp" @click.stop>
|
||||
<div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
|
||||
<img :src="data.backImage" style="width:100%;height:100%" alt="">
|
||||
<img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt="">
|
||||
<Icon type="md-refresh" class="refresh" @click="refresh" />
|
||||
<Icon type="md-refresh" class="refresh" @click="init" />
|
||||
</div>
|
||||
<div class="handle" :style="{width:data.originalWidth+'px'}">
|
||||
<span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span>
|
||||
@@ -18,6 +18,7 @@
|
||||
import { getVerifyImg, postVerifyImg } from './verify.js';
|
||||
export default {
|
||||
props: {
|
||||
// 传入数据,判断是登录、注册、修改密码
|
||||
verifyType: {
|
||||
defalut: 'LOGIN',
|
||||
type: String
|
||||
@@ -38,16 +39,18 @@ export default {
|
||||
distance: 0, // 拼图移动距离
|
||||
flag: false, // 判断滑块是否按下
|
||||
downX: 0, // 鼠标按下位置
|
||||
bgColor: 'aqua', // 滑动背景颜色
|
||||
bgColor: '#04ad11', // 滑动背景颜色
|
||||
verifyText: '拖动滑块解锁' // 文字提示
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
mouseDown (e) { // 鼠标按下操作,
|
||||
// 鼠标按下事件,开始拖动滑块
|
||||
mouseDown (e) {
|
||||
this.downX = e.clientX;
|
||||
this.flag = true;
|
||||
},
|
||||
mouseMove (e) { // 鼠标移动
|
||||
// 鼠标移动事件,计算距离
|
||||
mouseMove (e) {
|
||||
if (this.flag) {
|
||||
let offset = e.clientX - this.downX;
|
||||
|
||||
@@ -60,7 +63,8 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mouseUp () { // 鼠标抬起
|
||||
// 鼠标抬起事件,验证是否正确
|
||||
mouseUp () {
|
||||
if (!this.flag) return false;
|
||||
this.flag = false;
|
||||
let params = {
|
||||
@@ -68,6 +72,7 @@ export default {
|
||||
xPos: this.distance
|
||||
};
|
||||
postVerifyImg(params).then(res => {
|
||||
if (res.success) {
|
||||
if (res.result) {
|
||||
this.bgColor = 'green';
|
||||
this.verifyText = '解锁成功';
|
||||
@@ -77,39 +82,40 @@ export default {
|
||||
this.verifyText = '解锁失败';
|
||||
let that = this;
|
||||
setTimeout(() => {
|
||||
that.refresh();
|
||||
that.init();
|
||||
}, 1000);
|
||||
this.$emit('change', { status: false, distance: this.distance });
|
||||
}
|
||||
} else {
|
||||
this.init()
|
||||
}
|
||||
|
||||
}).catch(()=>{
|
||||
this.init()
|
||||
});
|
||||
},
|
||||
refresh () { // 刷新验证图片
|
||||
init () { // 初始化数据
|
||||
this.flag = false;
|
||||
this.downX = 0;
|
||||
this.distance = 0;
|
||||
this.bgColor = 'aqua';
|
||||
this.bgColor = '#04ad11';
|
||||
this.verifyText = '拖动滑块解锁';
|
||||
this.getImg();
|
||||
},
|
||||
getImg () { // 获取验证图片
|
||||
getVerifyImg(this.type).then(res => {
|
||||
if (res.result) {
|
||||
this.data = res.result;
|
||||
this.show = true;
|
||||
} else {
|
||||
this.$Message.warning('请求失败请重试!')
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
created () {
|
||||
// this.getImg();
|
||||
},
|
||||
watch: {
|
||||
verifyType: {
|
||||
immediate: true,
|
||||
handler: function (v) {
|
||||
this.type = v;
|
||||
// this.refresh();
|
||||
}
|
||||
},
|
||||
show (v) {
|
||||
if (v) this.refresh();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -143,7 +149,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.handle {
|
||||
border: 1px solid rgb(134, 134, 134);
|
||||
border: 1px solid #e4dede;
|
||||
margin-top: 5px;
|
||||
height: 42px;
|
||||
background: #ddd;
|
||||
@@ -156,7 +162,7 @@ export default {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
opacity: 0.5;
|
||||
background: aqua;
|
||||
background: #04ad11;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
|
||||
@@ -17,15 +17,15 @@ export default {
|
||||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
common: 'http://192.168.0.100:8890',
|
||||
buyer: 'http://192.168.0.100:8888',
|
||||
seller: 'http://192.168.0.100:8889',
|
||||
manager: 'http://192.168.0.100:8887'
|
||||
// common: 'http://192.168.0.106:8890',
|
||||
// buyer: 'http://192.168.0.106:8888',
|
||||
// seller: 'http://192.168.0.106:8889',
|
||||
// manager: 'http://192.168.0.106:8887'
|
||||
|
||||
// common: 'https://common-api.pickmall.cn',
|
||||
// buyer: 'https://buyer-api.pickmall.cn',
|
||||
// seller: 'https://store-api.pickmall.cn',
|
||||
// manager: 'https://admin-api.pickmall.cn'
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn'
|
||||
},
|
||||
api_prod: {
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
|
||||
@@ -32,7 +32,11 @@ router.afterEach(route => {
|
||||
|
||||
Vue.prototype.linkTo = function (url) {
|
||||
if (url.substr(0, 1) === '/') { // 非外部链接,没有origin,只有路由地址
|
||||
if (router.mode === 'hash') {
|
||||
window.open(location.origin + '/#' + url, '_blank');
|
||||
} else {
|
||||
window.open(location.origin + url, '_blank');
|
||||
}
|
||||
} else { // 外部链接,完整的url地址
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ export default {
|
||||
name: cateName[index]
|
||||
});
|
||||
});
|
||||
console.log(cateArr);
|
||||
this.categoryBar = cateArr;
|
||||
this.goodsMsg = res.result;
|
||||
// 判断是否收藏
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
>人评价
|
||||
</div>
|
||||
<div class="goods-show-seller">
|
||||
<Tag v-if="item.selfOperated" style="padding:0 4px;" size="small" color="error">自营</Tag><span>{{ item.storeName }}</span>
|
||||
<Tag v-if="item.selfOperated" style="padding:0 4px;" size="default" color="error">自营</Tag><span>{{ item.storeName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="login" @keyup.enter="handleSubmit('formInline')">
|
||||
<!-- 顶部logo -->
|
||||
<div class="top-content">
|
||||
<div class="top-content" @click='$refs.verify.show = false'>
|
||||
<div class="logo-box">
|
||||
<img
|
||||
:src="logoImg"
|
||||
@@ -15,7 +15,7 @@
|
||||
<!-- 轮播 -->
|
||||
<Carousel loop :autoplay-speed="5000" class="login-carousel" arrow="never">
|
||||
<CarouselItem>
|
||||
<div class="demo-carousel">
|
||||
<div class="demo-carousel" @click='$refs.verify.show = false'>
|
||||
<img
|
||||
src="https://wanmi-b2b.oss-cn-shanghai.aliyuncs.com/201811141632252680"
|
||||
/>
|
||||
@@ -23,7 +23,7 @@
|
||||
</CarouselItem>
|
||||
</Carousel>
|
||||
<!-- 登录模块 -->
|
||||
<div class="form-box">
|
||||
<div class="form-box" @click='$refs.verify.show = false'>
|
||||
<div class="account-number">
|
||||
<div class="tab-switch">
|
||||
<span>{{type?'账号登录':'验证码登录'}}</span>
|
||||
@@ -37,6 +37,7 @@
|
||||
:model="formData"
|
||||
:rules="ruleInline"
|
||||
v-show="type === true"
|
||||
@click.self='$refs.verify.show = false'
|
||||
>
|
||||
<FormItem prop="username">
|
||||
<i-input
|
||||
@@ -72,6 +73,7 @@
|
||||
:model="formSms"
|
||||
:rules="ruleInline"
|
||||
v-show="type === false"
|
||||
@click.self='$refs.verify.show = false'
|
||||
>
|
||||
<FormItem prop="mobile">
|
||||
<i-input
|
||||
@@ -194,7 +196,7 @@ export default {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.type) {
|
||||
this.$refs.verify.show = true;
|
||||
this.$refs.verify.init();
|
||||
} else {
|
||||
let data = JSON.parse(JSON.stringify(this.formSms));
|
||||
apiLogin.smsLogin(data).then((res) => {
|
||||
@@ -224,6 +226,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 发送手机验证码
|
||||
sendCode () {
|
||||
if (this.time === 60) {
|
||||
if (this.formSms.mobile === '') {
|
||||
@@ -296,9 +299,10 @@ export default {
|
||||
this.$refs.verify.show = false;
|
||||
}
|
||||
},
|
||||
// 开启滑块验证
|
||||
verifyBtnClick () {
|
||||
if (!this.verifyStatus) {
|
||||
this.$refs.verify.show = true;
|
||||
this.$refs.verify.init();
|
||||
}
|
||||
},
|
||||
handleWebLogin (type) { // 第三方登录
|
||||
|
||||
@@ -18,10 +18,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="store-category">
|
||||
<ul>
|
||||
<li @click="searchByCate({id:'', labelName: '店铺推荐'})">首页</li>
|
||||
<li v-for="(cate, index) in cateList" :key="index" @click="searchByCate(cate)">
|
||||
{{cate.labelName}}
|
||||
<ul class="cate-list">
|
||||
<li class="cate-item" @click="searchByCate({id:'', labelName: '店铺推荐'})">首页</li>
|
||||
<li class="cate-item" v-for="(cate, index) in cateList" :key="index" >
|
||||
<Dropdown v-if="cate.children.length">
|
||||
<div @click.self="searchByCate(cate)">{{cate.labelName}} <Icon type="ios-arrow-down"></Icon></div>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem @click.native="searchByCate(sec)" :name="sec.id" v-for="sec in cate.children" :key="sec.id">{{sec.labelName}}</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
<span v-else @click.self="searchByCate(cate)">{{cate.labelName}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -97,13 +103,6 @@ export default {
|
||||
this.getGoodsList()
|
||||
},
|
||||
mounted () {
|
||||
if (this.Cookies.getItem('userInfo')) {
|
||||
isCollection('STORE', this.soterMsg.storeId).then(res => {
|
||||
if (res.success && res.result) {
|
||||
this.storeCollected = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getStoreMsg () { // 店铺信息
|
||||
@@ -111,6 +110,13 @@ export default {
|
||||
if (res.success) {
|
||||
this.storeMsg = res.result
|
||||
document.title = this.storeMsg.storeName
|
||||
if (this.Cookies.getItem('userInfo')) {
|
||||
isCollection('STORE', this.storeMsg.storeId).then(res => {
|
||||
if (res.success && res.result) {
|
||||
this.storeCollected = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -222,15 +228,17 @@ export default {
|
||||
.store-category {
|
||||
background-color: #005aa0;
|
||||
color: #fff;
|
||||
ul{
|
||||
.cate-list{
|
||||
width: 1200px;
|
||||
margin: 0 auto 10px;
|
||||
padding: 3px 0;
|
||||
display: flex;
|
||||
li {
|
||||
margin: 0 auto ;
|
||||
clear: left;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
.cate-item {
|
||||
margin-right: 25px;
|
||||
float: left;
|
||||
}
|
||||
li:hover{
|
||||
.cate-item:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<div class="sign-up" @click='$refs.verify.show = false'>
|
||||
<div style="height:50px;"></div>
|
||||
<div class="logo-box">
|
||||
<img
|
||||
@@ -202,20 +202,19 @@ export default {
|
||||
},
|
||||
verifyBtnClick () {
|
||||
if (!this.verifyStatus) {
|
||||
this.$refs.verify.show = true;
|
||||
this.$refs.verify.init();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.$refs.formRegist.resetFields();
|
||||
this.logoImg = this.Cookies.getItem('logo')
|
||||
},
|
||||
watch: {
|
||||
console.log(window.innerHeight);
|
||||
document.querySelector('.sign-up').style.height = window.innerHeight + 'px'
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
.logo-box {
|
||||
width: 600px;
|
||||
height: 80px;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<div class="forget-password" @click='$refs.verify.show = false'>
|
||||
<div style="height:50px;"></div>
|
||||
<!-- 顶部logo -->
|
||||
<div class="logo-box">
|
||||
@@ -97,7 +97,7 @@
|
||||
<a class="item" href="https://pickmall.cn/" target="_blank">条款</a>
|
||||
</Row>
|
||||
<Row type="flex" justify="center" class="copyright">
|
||||
Copyright © 2020 - Present
|
||||
Copyright © {{year}} - Present
|
||||
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
|
||||
>lili-shop</a
|
||||
>
|
||||
@@ -130,6 +130,7 @@ export default {
|
||||
password: '',
|
||||
oncePasd: ''
|
||||
},
|
||||
year: new Date().getFullYear(), // 当前年份
|
||||
step: 0, // 步骤
|
||||
ruleInline: {
|
||||
// 验证规则
|
||||
@@ -236,7 +237,7 @@ export default {
|
||||
},
|
||||
verifyBtnClick () {
|
||||
if (!this.verifyStatus) {
|
||||
this.$refs.verify.show = true;
|
||||
this.$refs.verify.init();
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -248,7 +249,11 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.forget-password{
|
||||
height: 100%;
|
||||
}
|
||||
.logo-box {
|
||||
width: 600px;
|
||||
height: 80px;
|
||||
|
||||
@@ -5,11 +5,8 @@
|
||||
<div v-if="list.length">
|
||||
<template v-for="(item) in list">
|
||||
<div class="goodsItem" :key="item.skuId">
|
||||
<div class="goodsImg hover-pointer">
|
||||
<img
|
||||
:src="params.type === 'GOODS'? item.image : item.logo"
|
||||
alt=""
|
||||
/>
|
||||
<div class="goodsImg hover-pointer" v-if="params.type === 'GOODS'">
|
||||
<img :src="item.image" />
|
||||
</div>
|
||||
<div class="goodsTitle hover-pointer">
|
||||
{{params.type === 'GOODS'? item.goodsName : item.storeName}}
|
||||
|
||||
@@ -84,7 +84,9 @@ export default {
|
||||
params: { // 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
keywords: ''
|
||||
keywords: '',
|
||||
sort: 'createTime',
|
||||
order: 'desc'
|
||||
},
|
||||
// 状态数组
|
||||
afterSaleStatusList,
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
>{{ goods.goodsPrice | unitPrice("¥") }} </span
|
||||
>x {{ goods.num }}
|
||||
</div>
|
||||
<Button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.sn, goodsIndex)" size="small" style="position:relative;top:-22px;left:100px">评价</Button>
|
||||
<Button v-if="goods.complainStatus == 'NO_APPLY'" @click="complain(order.sn, goodsIndex)" size="small" style="position:relative;top:-22px;left:110px">投诉</Button>
|
||||
<Button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.sn, goodsIndex)" size="small" type="success" class="fontsize_12" style="position:relative;top:-22px;left:100px">评价</Button>
|
||||
<Button v-if="goods.complainStatus == 'NO_APPLY'" @click="complain(order.sn, goodsIndex)" type="warning" class="fontsize_12" size="small" style="position:relative;top:-22px;left:100px">投诉</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div class="order-detail" v-if="order.order">
|
||||
<card _Title="订单详情" :_Size="16"></card>
|
||||
<p class="verificationCode" v-if="order.order.verificationCode">核验码:<span>{{order.order.verificationCode}}</span></p>
|
||||
<div class="order-card">
|
||||
<p class="global_color fontsize_18">{{ order.orderStatusValue }} <span class="verificationCode" v-if="order.order.verificationCode">核验码:{{order.order.verificationCode}}</span></p>
|
||||
<p class="global_color">订单号:{{ order.order.sn }}</p>
|
||||
<p class="global_color fontsize_18">{{ order.orderStatusValue }}</p>
|
||||
<p>订单号:{{ order.order.sn }}</p>
|
||||
<div style="color:#999;" class="operation-time">操作时间:{{order.order.updateTime}}</div>
|
||||
<Steps class="progress" :current="progressList.length" direction="vertical">
|
||||
<Step
|
||||
@@ -25,7 +26,7 @@
|
||||
<p>支付方式:{{order.paymentMethodValue}}</p>
|
||||
<p>付款状态:{{order.payStatusValue}}</p>
|
||||
</div>
|
||||
<div class="order-card">
|
||||
<div class="order-card" v-if="!order.order.verificationCode">
|
||||
<h3>配送信息</h3>
|
||||
<p>配送方式:{{order.deliveryMethodValue}}</p>
|
||||
<p>配送状态:{{order.deliverStatusValue}}</p>
|
||||
@@ -45,9 +46,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">商品</th>
|
||||
<!-- <th width="20%">属性</th> -->
|
||||
<th width="20%">货号</th>
|
||||
<!-- <th width="10%">发货仓库</th> -->
|
||||
<th width="10%">单价</th>
|
||||
<th width="10%">数量</th>
|
||||
<th width="10%">小计</th>
|
||||
@@ -81,10 +80,11 @@
|
||||
<div>
|
||||
<span>运费:</span><span>+{{ order.order.freightPrice | unitPrice("¥") }}</span><br>
|
||||
</div>
|
||||
<div><span>优惠金额:</span><span>-{{ order.order.discountPrice | unitPrice("¥") }}</span></div>
|
||||
<div v-if="order.order.priceDetailDTO.couponPrice"><span>优惠券:</span><span>-{{ order.order.priceDetailDTO.couponPrice || 0 | unitPrice("¥") }}</span></div>
|
||||
<div v-if="order.order.discountPrice"><span>活动优惠:</span><span>-{{ order.order.discountPrice | unitPrice("¥") }}</span></div>
|
||||
<div>
|
||||
<span>应付金额:</span
|
||||
><span class="actrual-price">{{ order.order.flowPrice | unitPrice("¥") }}</span>
|
||||
<span>应付金额:</span>
|
||||
<span class="actrual-price">{{ order.order.flowPrice | unitPrice("¥") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,7 +120,7 @@ export default {
|
||||
});
|
||||
window.open(routeUrl.href, '_blank');
|
||||
},
|
||||
getDetail () { // 订单详情
|
||||
getDetail () { // 获取订单详情
|
||||
orderDetail(this.$route.query.sn).then(res => {
|
||||
if (res.success) {
|
||||
this.order = res.result;
|
||||
@@ -235,10 +235,14 @@ table {
|
||||
}
|
||||
}
|
||||
.verificationCode {
|
||||
font-size: 16px;
|
||||
margin-left: 240px;
|
||||
font-size: 20px;
|
||||
margin-bottom: 20px;
|
||||
color: rgb(65, 63, 63);
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
span{
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
/** 订单进度条 */
|
||||
.progress {
|
||||
|
||||
@@ -412,7 +412,7 @@ export default {
|
||||
});
|
||||
this.$Modal.warning({
|
||||
title: '以下商品超出配送区域' || title,
|
||||
content: content.toString(),
|
||||
content: content.toString()
|
||||
});
|
||||
}
|
||||
if (res.result.memberAddress) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
>
|
||||
<div class="user-icon">
|
||||
<div class="user-img">
|
||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||
<img :src="userInfo.face" style="width:100%;height:100%;" v-if="userInfo.face" alt />
|
||||
<Avatar icon="ios-person" class="mb_10" v-else size="96" />
|
||||
</div>
|
||||
<p>{{userInfo.nickName}}</p>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-1.0.1:0.0.4
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui-1.0.1:0.0.4
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-1.0.1:0.0.4
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-1.0.1:0.0.4
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-4.2.0:0.0.2
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-1.0.1:0.0.4 .
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-4.2.0:0.0.2 .
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"vue-router": "^3.1.3",
|
||||
"vuedraggable": "^2.23.2",
|
||||
"vuex": "^3.4.0",
|
||||
"wangeditor": "^4.5.3",
|
||||
"wangeditor": "^4.7.5",
|
||||
"xlsx": "^0.16.2",
|
||||
"xss": "^1.0.7"
|
||||
},
|
||||
|
||||
@@ -98,7 +98,7 @@ export const getMemberStatistics = params => {
|
||||
};
|
||||
|
||||
|
||||
// 获取会员注册统计列表
|
||||
// 获取流量统计
|
||||
export const getStatisticsList = params => {
|
||||
return getRequest("/statistics/view/list", params);
|
||||
};
|
||||
|
||||
@@ -80,11 +80,11 @@ export const updateArticleCategory = (params, id) => {
|
||||
}
|
||||
//文章添加
|
||||
export const saveArticle = (params) => {
|
||||
return postRequest('/article', params)
|
||||
return postRequest('/article', params, {"Content-Type": "application/json"})
|
||||
}
|
||||
//文章修改
|
||||
export const updateArticle = (params) => {
|
||||
return putRequest(`/article/update/${params.id}`, params)
|
||||
return putRequest(`/article/update/${params.id}`, params, {"Content-Type": "application/json"})
|
||||
}
|
||||
//文章是否展示修改
|
||||
export const updateArticleStatus = (id,params) => {
|
||||
|
||||
@@ -21,10 +21,10 @@ export default {
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
// common: 'http://192.168.0.100:8890',
|
||||
// buyer: 'http://192.168.0.100:8888',
|
||||
// seller: 'http://192.168.0.100:8889',
|
||||
// manager: 'http://192.168.0.100:8887'
|
||||
// common: 'http://192.168.0.103:8890',
|
||||
// buyer: 'http://192.168.0.103:8888',
|
||||
// seller: 'http://192.168.0.103:8889',
|
||||
// manager: 'http://192.168.0.103:8887'
|
||||
},
|
||||
api_prod: {
|
||||
common: "https://common-api.pickmall.cn",
|
||||
|
||||
@@ -230,13 +230,6 @@ export const otherRouter = {
|
||||
name: "edit-platform-coupon",
|
||||
component: () => import("@/views/promotion/coupon/couponPublish.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/member-receive-coupon",
|
||||
title: "领取详情",
|
||||
name: "member-receive-coupon",
|
||||
component: () =>
|
||||
import("@/views/promotion/coupon/memberReceiveCoupon.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/platform-coupon-info",
|
||||
title: "详情",
|
||||
@@ -261,25 +254,12 @@ export const otherRouter = {
|
||||
name: "coupon-activity-info",
|
||||
component: () => import("@/views/promotion/couponActivity/couponInfo.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/member-receive-coupon",
|
||||
title: "领取详情",
|
||||
name: "member-coupon-activity",
|
||||
component: () =>
|
||||
import("@/views/promotion/coupon/memberReceiveCoupon.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/platform-coupon-info",
|
||||
title: "详情",
|
||||
name: "platform-coupon-activity",
|
||||
component: () => import("@/views/promotion/coupon/couponInfo.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/add-coupon-specify",
|
||||
title: "精准发劵",
|
||||
name: "add-coupon-specify",
|
||||
component: () => import("@/views/promotion/coupon/couponSpecify.vue")
|
||||
},
|
||||
{
|
||||
path: "promotion/manager-pintuan",
|
||||
title: "平台拼团",
|
||||
|
||||
@@ -100,7 +100,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "推广单数",
|
||||
key: "orderNum",
|
||||
key: "distributionOrderCount",
|
||||
minWidth: 120,
|
||||
width: 150,
|
||||
},
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
|
||||
this.$options.filters.unitPrice(params.row.canRebate, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -136,7 +136,7 @@ export default {
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.rebateTotal, "¥")
|
||||
this.$options.filters.unitPrice(params.row.commissionFrozen, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch" >
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Input class="search-input" v-model="searchForm.memberName">
|
||||
<span slot="prepend">会员名称</span>
|
||||
</Input>
|
||||
<Input class="search-input" v-model="searchForm.sn">
|
||||
<span slot="prepend">编号</span>
|
||||
</Input>
|
||||
<Form-item label="会员名称">
|
||||
<Input class="search-input" v-model="searchForm.memberName"></Input>
|
||||
</Form-item>
|
||||
<Form-item label="编号">
|
||||
<Input class="search-input" v-model="searchForm.sn"></Input>
|
||||
</Form-item>
|
||||
<Form-item label="状态" style="margin-left: -20px">
|
||||
<Select v-model="searchForm.distributionCashStatus" style="width:150px;">
|
||||
<Option v-for="item in cashStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||
@@ -37,8 +37,8 @@
|
||||
</FormItem>
|
||||
<FormItem label="是否通过" prop="result" v-if="handleStatus =='edit'">
|
||||
<RadioGroup v-model="result" type="button" button-style="solid">
|
||||
<Radio :key=0 :label=0>通过</Radio>
|
||||
<Radio :key=-1 :label=-1>拒绝</Radio>
|
||||
<Radio label="PASS">通过</Radio>
|
||||
<Radio label="REFUSE">拒绝</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
</Form>
|
||||
@@ -67,7 +67,7 @@ export default {
|
||||
loading: true, // 表单加载状态
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
result: -1, // 是否通过
|
||||
result: 'REFUSE', // 是否通过
|
||||
searchForm: { // 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
@@ -80,9 +80,6 @@ export default {
|
||||
memberName: "",
|
||||
price: "",
|
||||
},
|
||||
auditForm: { // 编辑表单
|
||||
result: -1
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
@@ -102,10 +99,8 @@ export default {
|
||||
key: "price",
|
||||
minWidth: 90,
|
||||
render: (h, params) => {
|
||||
if (params.row.price) {
|
||||
return h("div", this.$options.filters.unitPrice(params.row.price,'¥'));
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "申请时间",
|
||||
@@ -114,7 +109,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "处理时间",
|
||||
key: "payTime",
|
||||
key: "updateTime",
|
||||
minWidth: 130
|
||||
},
|
||||
{
|
||||
@@ -193,23 +188,27 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索表格
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
// 排序
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
@@ -218,14 +217,7 @@ export default {
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
@@ -241,7 +233,7 @@ export default {
|
||||
},
|
||||
handleSubmit() {
|
||||
let result = "拒绝"
|
||||
if(this.result == 0){
|
||||
if(this.result == 'PASS'){
|
||||
result = "通过"
|
||||
}
|
||||
this.$refs.form.validate(valid => {
|
||||
@@ -251,13 +243,14 @@ export default {
|
||||
content: "您确认要审核"+result+"么?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
this.auditForm.result = this.result;
|
||||
auditDistributionCash(this.form.id,this.auditForm).then(res => {
|
||||
auditDistributionCash(this.form.id,{result:this.result}).then(res => {
|
||||
if (res.success) {
|
||||
this.$Modal.remove();
|
||||
this.$Message.success("审核成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
} else {
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -275,9 +268,7 @@ export default {
|
||||
v[attr] = "";
|
||||
}
|
||||
}
|
||||
let str = JSON.stringify(v);
|
||||
let data = JSON.parse(str);
|
||||
this.form = data;
|
||||
this.form = JSON.parse(JSON.stringify(v));
|
||||
this.modalVisible = true;
|
||||
},
|
||||
view(v){
|
||||
|
||||
@@ -34,7 +34,28 @@
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom">
|
||||
<template slot-scope="{row}" slot="goodsMsg">
|
||||
<div class="goods-msg">
|
||||
<img :src="row.image" width="60" height="60" alt="">
|
||||
<div>
|
||||
<div class="div-zoom">
|
||||
<a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
|
||||
</div>
|
||||
<div style="color:#999;font-size:10px">数量:x{{row.num}}</div>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
</div>
|
||||
<img src="../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
|
||||
</Poptip>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="{row}" slot="distributionOrderStatus">
|
||||
<Tag :color="filterStatusColor(row.distributionOrderStatus)">{{filterStatus(row.distributionOrderStatus)}}</Tag>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
|
||||
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]"
|
||||
@@ -71,80 +92,52 @@
|
||||
{
|
||||
title: "订单编号",
|
||||
key: "orderSn",
|
||||
minWidth: 120,
|
||||
minWidth: 100,
|
||||
tooltip: true
|
||||
},
|
||||
|
||||
{
|
||||
title: "实付金额",
|
||||
key: "orderPrice",
|
||||
width: 130,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if(params.row.orderPrice == null){
|
||||
return h("div", this.$options.filters.unitPrice(0, '¥'));
|
||||
}else{
|
||||
return h("div", this.$options.filters.unitPrice(params.row.orderPrice, '¥'));
|
||||
}
|
||||
|
||||
}
|
||||
title: '商品信息',
|
||||
slot: 'goodsMsg',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: "退款金额",
|
||||
key: "returnMoney",
|
||||
width: 130,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if(params.row.orderPrice == null){
|
||||
if(params.row.sellBackRebate == null){
|
||||
return h("div", this.$options.filters.unitPrice(0, '¥'));
|
||||
}else{
|
||||
return h("div", this.$options.filters.unitPrice(params.row.returnMoney, '¥'));
|
||||
return h("div", this.$options.filters.unitPrice(params.row.sellBackRebate, '¥'));
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "商品名称",
|
||||
key: "goodsName",
|
||||
minWidth: 120,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: "分销商",
|
||||
key: "distributionName",
|
||||
minWidth: 120,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "storeName",
|
||||
minWidth: 120,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "distributionOrderStatus",
|
||||
width: 100,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if (params.row.distributionOrderStatus == 'COMPLETE_CASH') {
|
||||
return h('div', '提现完成')
|
||||
} else if (params.row.distributionOrderStatus == 'WAIT_BILL') {
|
||||
return h('div', '待结算')
|
||||
} else if (params.row.distributionOrderStatus == 'WAIT_CASH') {
|
||||
return h('div', '待提现')
|
||||
}
|
||||
}
|
||||
},
|
||||
slot: "distributionOrderStatus",
|
||||
width: 120,
|
||||
|
||||
},
|
||||
{
|
||||
title: "佣金金额",
|
||||
key: "rebateGrade",
|
||||
width: 120,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
if(params.row.rebateGrade == null){
|
||||
if(params.row.rebate == null){
|
||||
return h("div", this.$options.filters.unitPrice(0, '¥'));
|
||||
}else{
|
||||
return h("div", this.$options.filters.unitPrice(params.row.rebateGrade, '¥'));
|
||||
return h("div", this.$options.filters.unitPrice(params.row.rebate, '¥'));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -219,13 +212,41 @@
|
||||
},
|
||||
searchChange(val) { // 店铺搜索,键盘点击回调
|
||||
this.getShopList(val)
|
||||
},
|
||||
filterStatus (status) { // 过滤订单状态
|
||||
const arr = [
|
||||
{status: 'WAIT_BILL', title: '待结算'},
|
||||
{status: 'WAIT_CASH', title: '待提现'},
|
||||
{status: 'COMPLETE_CASH', title: '提现完成'},
|
||||
{status: 'CANCEL', title: '订单取消'},
|
||||
{status: 'REFUND', title: '退款'},
|
||||
]
|
||||
for (let i=0;i<arr.length;i++) {
|
||||
if (arr[i].status === status) {
|
||||
return arr[i].title;
|
||||
}
|
||||
}
|
||||
},
|
||||
filterStatusColor (status) { // 状态tag标签颜色
|
||||
const arr = [
|
||||
{status: 'WAIT_BILL', color: 'magenta'},
|
||||
{status: 'WAIT_CASH', color: 'warning'},
|
||||
{status: 'COMPLETE_CASH', color: 'success'},
|
||||
{status: 'CANCEL', color: 'default'},
|
||||
{status: 'REFUND', color: 'error'},
|
||||
]
|
||||
for (let i=0;i<arr.length;i++) {
|
||||
if (arr[i].status === status) {
|
||||
return arr[i].color;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
watch: {
|
||||
$route(e) {
|
||||
$route(e) { // 监听路由,参数变化调取接口
|
||||
this.distributionId = e.query.id ? e.query.id : undefined;
|
||||
this.getDataList();
|
||||
}
|
||||
@@ -234,5 +255,12 @@
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
@import "@/styles/table-common.scss";
|
||||
.goods-msg {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
>div{
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -200,9 +200,9 @@ export default {
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
if (params.row.marketEnable == "DOWN") {
|
||||
return h("Tag", {props: {color: "green"},},"上架");
|
||||
return h("Tag", {props: {color: "volcano"},},"下架");
|
||||
} else if (params.row.marketEnable == "UPPER") {
|
||||
return h("Tag", {props: {color: "volcano",},},"下架");
|
||||
return h("Tag", {props: {color: "green",},},"上架");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -2,13 +2,8 @@
|
||||
<div class="wrapper">
|
||||
<div class="operation">
|
||||
<Button @click="addParent" icon="md-add">添加一级分类</Button>
|
||||
选择分类:
|
||||
<Select @on-change="changeSortCate" v-model="sortCate" style="width:200px">
|
||||
<Option v-for="item in sortCateList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||
</Select>
|
||||
|
||||
</div>
|
||||
<tree-table ref="treeTable" size="default" :loading="loading" :data="tableData" :columns="columns" :border="true" :show-index="false" :is-fold="true" :expand-type="false" primary-key="id">
|
||||
<Table size="default" :load-data="handleLoadData" row-key="id" :loading="loading" :data="tableData" :columns="columns">
|
||||
|
||||
<template slot="action" slot-scope="scope">
|
||||
<Dropdown v-show="scope.row.level == 2" transfer="true" trigger="click">
|
||||
@@ -45,15 +40,10 @@
|
||||
{{ scope.row.commissionRate }}%
|
||||
</template>
|
||||
|
||||
<template slot="deleteFlag" slot-scope="scope">
|
||||
<div v-if="scope.row.deleteFlag == 0">
|
||||
<Badge text="正常启用" status="success"></Badge>
|
||||
</div>
|
||||
<div v-if="scope.row.deleteFlag == 1">
|
||||
<Badge text="禁用" status="error"></Badge>
|
||||
</div>
|
||||
<template slot="deleteFlag" slot-scope="{row}">
|
||||
<Tag :class="{'ml_10': row.deleteFlag}" :color="row.deleteFlag == false ? 'success' : 'error'">{{row.deleteFlag == false ? '正常启用' : '禁用'}}</Tag>
|
||||
</template>
|
||||
</tree-table>
|
||||
</Table>
|
||||
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="form" :model="formAdd" :label-width="100" :rules="formValidate">
|
||||
@@ -132,19 +122,17 @@ import {
|
||||
saveCategorySpec,
|
||||
getCategoryTree,
|
||||
} from "@/api/goods";
|
||||
import TreeTable from "@/views/my-components/tree-table/Table/Table";
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
import {regular} from "@/utils";
|
||||
export default {
|
||||
name: "lili-components",
|
||||
components: {
|
||||
TreeTable,
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
categoryList: [], // 分类列表
|
||||
sortCateList: [], //筛选出分类第一级
|
||||
sortCate: "", //筛选的数据
|
||||
loading: false, // 加载状态
|
||||
selectCount: 0, // 选择数量
|
||||
@@ -179,52 +167,52 @@ export default {
|
||||
brandWay: "", //请求绑定品牌的信息
|
||||
specForm: {},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
formValidate: {
|
||||
commissionRate: [
|
||||
{required: true, message: '请填写佣金比例'},
|
||||
{pattern: regular.Integer, message: "佣金比例不能为负"},
|
||||
]
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: "分类名称",
|
||||
key: "name",
|
||||
minWidth: "120px",
|
||||
tree: true,
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "deleteFlag",
|
||||
headerAlign: "center",
|
||||
type: "template",
|
||||
template: "deleteFlag",
|
||||
slot: "deleteFlag",
|
||||
},
|
||||
{
|
||||
title: "佣金(%)",
|
||||
title: "佣金",
|
||||
key: "commissionRate",
|
||||
headerAlign: "center",
|
||||
type: "template",
|
||||
template: "commissionRate",
|
||||
|
||||
slot: "commissionRate",
|
||||
},
|
||||
{
|
||||
fixed: "right",
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "left",
|
||||
headerAlign: "center",
|
||||
type: "template",
|
||||
template: "action",
|
||||
|
||||
slot: "action",
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
categoryIndex: 0,
|
||||
checkedCategoryChildren: "", //选中的分类子级
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeSortCate(val) {
|
||||
let way = this.categoryList.find((item, index) => {
|
||||
if (item.name == val) {
|
||||
this.categoryIndex = index;
|
||||
console.log((this.categoryIndex = index));
|
||||
return item.name == val;
|
||||
}
|
||||
});
|
||||
this.tableData = [way];
|
||||
},
|
||||
// changeSortCate(val) {
|
||||
// let way = this.categoryList.find((item, index) => {
|
||||
// if (item.name == val) {
|
||||
// this.categoryIndex = index;
|
||||
// console.log((this.categoryIndex = index));
|
||||
// return item.name == val;
|
||||
// }
|
||||
// });
|
||||
// this.tableData = [way];
|
||||
// },
|
||||
init() {
|
||||
this.getAllList(0);
|
||||
this.getBrandList();
|
||||
@@ -240,7 +228,6 @@ export default {
|
||||
getSpecList() {
|
||||
getSpecificationList().then((res) => {
|
||||
if (res.length != 0) {
|
||||
|
||||
this.specifications = res;
|
||||
}
|
||||
});
|
||||
@@ -379,26 +366,64 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 异步手动加载分类名称
|
||||
handleLoadData(item, callback) {
|
||||
console.warn(item);
|
||||
if (item.level == 0) {
|
||||
let categoryList = JSON.parse(JSON.stringify(this.categoryList));
|
||||
categoryList.forEach((val) => {
|
||||
if (val.id == item.id) {
|
||||
val.children.map((child) => {
|
||||
child._loading = false;
|
||||
child.children = [];
|
||||
});
|
||||
// 模拟加载
|
||||
setTimeout(() => {
|
||||
callback(val.children);
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.deepCategoryChildren(item.id, this.categoryList);
|
||||
console.log(this.checkedCategoryChildren);
|
||||
setTimeout(() => {
|
||||
callback(this.checkedCategoryChildren);
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
|
||||
// 通过递归children来实现手动加载数据
|
||||
deepCategoryChildren(id, list) {
|
||||
if (id != "0" && list.length != 0) {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
let item = list[i];
|
||||
if (item.id == id) {
|
||||
this.checkedCategoryChildren = item.children;
|
||||
return;
|
||||
} else {
|
||||
this.deepCategoryChildren(id, item.children);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getAllList(parent_id) {
|
||||
this.sortCateList = [];
|
||||
this.loading = true;
|
||||
getCategoryTree(parent_id).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
localStorage.setItem("category", JSON.stringify(res.result));
|
||||
res.result.forEach((e, index, arr) => {
|
||||
this.sortCateList.push({
|
||||
label: e.name,
|
||||
value: e.name,
|
||||
});
|
||||
this.sortCate = arr[0].name;
|
||||
this.categoryList = JSON.parse(JSON.stringify(res.result));
|
||||
this.tableData = res.result.map((item) => {
|
||||
if (item.children.length != 0) {
|
||||
item.children = [];
|
||||
item._loading = false;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
|
||||
this.categoryList = res.result;
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$set(this, "tableData", [res.result[this.categoryIndex]]);
|
||||
});
|
||||
console.log(this.tableData);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
|
||||
<!-- 评价详情 -->
|
||||
<Modal v-model="infoFlag" width="800" :title="infoTitle">
|
||||
|
||||
<div class="info-list" style="overflow: hidden">
|
||||
@@ -58,12 +58,15 @@
|
||||
<ListItemMeta :avatar="infoData.memberProfile" :title="infoData.memberName"
|
||||
:description="infoData.content"/>
|
||||
</ListItem>
|
||||
<div class="" v-if="infoData.haveImage == 1">
|
||||
<div class="" v-if="infoData.haveImage">
|
||||
评价图
|
||||
<div style="margin-left: 40px">
|
||||
<template v-if="infoData.images && infoData.images.length">
|
||||
<img style="width: 100px;height: 110px;margin-left: 2px"
|
||||
v-for="(img,index) in infoData.image.split(',')" v-if="infoData.image.length !=0" :src="img"
|
||||
v-for="(img,index) in infoData.images.split(',')" :src="img"
|
||||
alt="" :key="index"/>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</List>
|
||||
@@ -74,10 +77,13 @@
|
||||
<div style="float: left"> 商家回复:</div>
|
||||
<div style="margin-left: 60px">{{ infoData.reply }}</div>
|
||||
</div>
|
||||
<div v-if="infoData.haveReplyImage == 1">
|
||||
<div v-if="infoData.haveReplyImage">
|
||||
<div style="margin-left: 60px">
|
||||
<template v-if="infoData.replyImage && infoData.replyImage.length">
|
||||
<img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')" :key="index"
|
||||
v-if="infoData.replyImage.length !=0" :src="img" alt=""/>
|
||||
:src="img" alt=""/>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="list">
|
||||
<!-- TODO 目前数据少暂且不用 -->
|
||||
<!-- <div class="list">
|
||||
<div class="list-item active">
|
||||
文章页
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="content">
|
||||
<Article @callbacked="callbackArticle" :selected="true" />
|
||||
</div>
|
||||
|
||||
@@ -52,6 +52,8 @@ export default {
|
||||
pageData: modelForm,
|
||||
pageShow,
|
||||
};
|
||||
console.log(this.modelForm);
|
||||
|
||||
API_floor.updateHome(this.$route.query.id, data).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("保存模板成功");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<div class="login" @click='$refs.verify.show = false'>
|
||||
<Row @keydown.enter.native="submitLogin" class="flex">
|
||||
<Col style="width: 368px">
|
||||
<Header />
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
// 登录操作
|
||||
this.$refs.usernameLoginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$refs.verify.show = true;
|
||||
this.$refs.verify.init();
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
}
|
||||
.verify-con {
|
||||
position: absolute;
|
||||
top: 90px;
|
||||
top: 150px;
|
||||
z-index: 10;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<a class="item" href="https://pickmall.com" target="_blank">{{ $t('terms') }}</a>
|
||||
</Row>
|
||||
<Row type="flex" justify="center" class="copyright">
|
||||
Copyright © 2020 - Present
|
||||
Copyright © {{year}} - Present
|
||||
<a
|
||||
href="https://pickmall.cn/"
|
||||
target="_blank"
|
||||
@@ -18,7 +18,12 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "footer"
|
||||
name: "footer",
|
||||
data() {
|
||||
return {
|
||||
year: new Date().getFullYear()
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
<template>
|
||||
<div class="ivu-shrinkable-menu">
|
||||
<!-- 一级菜单 -->
|
||||
@@ -38,6 +36,9 @@ export default {
|
||||
navList() {
|
||||
return this.$store.state.app.navList;
|
||||
},
|
||||
currNav() {
|
||||
return this.$store.state.app.currNav;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听路由变化
|
||||
@@ -45,29 +46,17 @@ export default {
|
||||
handler: function (val, oldVal) {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
menuList: {
|
||||
handler: function (val, oldVal) {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
changeMenu(name) { //二级路由点击
|
||||
console.log(name)
|
||||
this.$router.push({
|
||||
name: name
|
||||
});
|
||||
},
|
||||
selectNav(name) {
|
||||
selectNav(name) { // 一级路由点击事件
|
||||
this.$store.commit("setCurrNav", name);
|
||||
this.setStore("currNav", name);
|
||||
// if (this.$route.name != "home_index") {
|
||||
// this.$router.push({
|
||||
// name: "home_index"
|
||||
// });
|
||||
// }
|
||||
util.initRouter(this);
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
width: 180px;
|
||||
display: flex;
|
||||
}
|
||||
.ivu-menu-vertical .ivu-menu-item-group-title {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.ivu-btn-text:hover {
|
||||
background-color: rgba(255,255,255,.2) !important;
|
||||
}
|
||||
@@ -21,3 +19,8 @@
|
||||
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
|
||||
color: #ed3f14;
|
||||
}
|
||||
/deep/.ivu-menu-vertical .ivu-menu-item-group-title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
@@ -30,26 +30,22 @@
|
||||
</Card>
|
||||
|
||||
<!-- 添加用户模态框 -->
|
||||
<Modal v-model="addFlag" title="添加用户">
|
||||
<Modal v-model="addFlag" title="添加会员">
|
||||
<Form ref="addMemberForm" :model="addMemberForm" :rules="addRule" :label-width="100">
|
||||
<FormItem label="手机号码" prop="mobile" style="width: 90%;">
|
||||
<Input v-model="addMemberForm.mobile" maxlength="11" placeholder="请输入手机号码" />
|
||||
</FormItem>
|
||||
<FormItem label="会员名称" prop="uname" style="width: 90%">
|
||||
<FormItem label="会员名称" prop="username" style="width: 90%">
|
||||
<Input v-model="addMemberForm.username" maxlength="15" placeholder="请输入会员名称" />
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="会员密码" prop="pwd" style="width: 90%">
|
||||
<FormItem label="会员密码" prop="password" style="width: 90%">
|
||||
<Input type="password" password v-model="addMemberForm.password" maxlength="20" placeholder="请输入会员密码" />
|
||||
</FormItem>
|
||||
</Form>
|
||||
|
||||
<div slot="footer">
|
||||
<Button @click="
|
||||
() => {
|
||||
addFlag = false;
|
||||
}
|
||||
">
|
||||
<Button @click="addFlag = false">
|
||||
取消
|
||||
</Button>
|
||||
<Button type="primary" :loading="handleAddLoading" @click="addMemberSubmit">
|
||||
@@ -163,8 +159,8 @@ export default {
|
||||
message: "请输入正确的手机号",
|
||||
},
|
||||
],
|
||||
uname: [{ required: true, message: "请输入会员名称" }],
|
||||
pwd: [{ required: true, message: "请输入密码" }],
|
||||
username: [{ required: true, message: "请输入会员名称" }],
|
||||
password: [{ required: true, message: "请输入密码" }],
|
||||
},
|
||||
ruleValidate: {}, //修改验证
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
@@ -421,11 +417,7 @@ export default {
|
||||
},
|
||||
addMember() {
|
||||
this.addFlag = true;
|
||||
this.addMemberForm = {
|
||||
mobile: "",
|
||||
username: "",
|
||||
password: "",
|
||||
};
|
||||
this.$refs.addMemberForm.resetFields()
|
||||
},
|
||||
/**
|
||||
* 查询查看会员详情
|
||||
@@ -460,6 +452,7 @@ export default {
|
||||
if (valid) {
|
||||
API_Member.addMember(this.addMemberForm).then((res) => {
|
||||
if (res.result) {
|
||||
this.$refs.addMemberForm.resetFields()
|
||||
this.getData();
|
||||
this.$Message.success("添加成功!");
|
||||
this.addFlag = false;
|
||||
|
||||
@@ -97,16 +97,16 @@
|
||||
|
||||
{
|
||||
title: "变动积分",
|
||||
key: "point",
|
||||
key: "variablePoint",
|
||||
width: 110,
|
||||
render: (h, params) => {
|
||||
if (params.row.pointType == 1) {
|
||||
if (params.row.pointType == 'INCREASE') {
|
||||
return h('div', [
|
||||
h('span', {
|
||||
style: {
|
||||
color: 'green'
|
||||
}
|
||||
}, "+" + params.row.point),
|
||||
}, "+" + params.row.variablePoint),
|
||||
]);
|
||||
} else {
|
||||
return h('div', [
|
||||
@@ -114,7 +114,7 @@
|
||||
style: {
|
||||
color: 'red'
|
||||
}
|
||||
}, "-" + params.row.point),
|
||||
}, "-" + params.row.variablePoint),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
editor: null, // 富文本编辑器初始化
|
||||
data: this.value, // 富文本数据
|
||||
data: '', // 富文本数据
|
||||
dataEdit: "", // 编辑数据
|
||||
showHTMLModal: false, // 显示html
|
||||
full: false, // html全屏开关
|
||||
@@ -122,6 +122,7 @@ export default {
|
||||
// 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置
|
||||
customInsert: function (insertImg, result, editor) {
|
||||
if (result.success == true) {
|
||||
console.log(insertImg,result,editor);
|
||||
let url = result.result;
|
||||
insertImg(url);
|
||||
that.$Message.success("上传图片成功");
|
||||
@@ -184,12 +185,10 @@ export default {
|
||||
if (!editor) {
|
||||
this.initEditor();
|
||||
}
|
||||
if (value && value != this.data) {
|
||||
this.data = value;
|
||||
editor.txt.html(this.data);
|
||||
this.$emit("input", this.data);
|
||||
this.$emit("on-change", this.data);
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
:readonly="readonly"
|
||||
:maxlength="maxlength"
|
||||
>
|
||||
<Button slot="append" icon="md-eye"></Button>
|
||||
</Input>
|
||||
<Poptip transfer trigger="hover" title="图片预览" placement="right" width="350">
|
||||
<Poptip slot="append" transfer trigger="hover" title="图片预览" placement="right" width="350">
|
||||
<Icon type="md-eye" class="see-icon" />
|
||||
<div slot="content">
|
||||
<img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" />
|
||||
<a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a>
|
||||
</div>
|
||||
</Poptip>
|
||||
</Input>
|
||||
|
||||
<Upload
|
||||
:action="uploadFileUrl"
|
||||
:headers="accessToken"
|
||||
@@ -35,7 +35,7 @@
|
||||
ref="up"
|
||||
class="upload"
|
||||
>
|
||||
<Button :loading="loading" :size="size" :disabled="disabled" :icon="icon">上传图片</Button>
|
||||
<Button :loading="loading" :size="size" :disabled="disabled">上传图片</Button>
|
||||
</Upload>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp">
|
||||
<div class="verify-content" v-if="show" @mousemove="mouseMove" @mouseup="mouseUp" @click.stop>
|
||||
<div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
|
||||
<img :src="data.backImage" style="width:100%;height:100%" alt="">
|
||||
<img class="slider" :src="data.slidingImage" :style="{left:distance+'px',top:data.randomY+'px'}" :width="data.sliderWidth" :height="data.sliderHeight" alt="">
|
||||
<Icon type="md-refresh" class="refresh" @click="refresh" />
|
||||
<Icon type="md-refresh" class="refresh" @click="init" />
|
||||
</div>
|
||||
<div class="handle" :style="{width:data.originalWidth+'px'}">
|
||||
<span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span>
|
||||
@@ -18,7 +18,8 @@
|
||||
import { getVerifyImg, postVerifyImg } from './verify.js';
|
||||
export default {
|
||||
props: {
|
||||
verifyType: { // 验证方式,登录,注册等
|
||||
// 传入数据,判断是登录、注册、修改密码
|
||||
verifyType: {
|
||||
defalut: 'LOGIN',
|
||||
type: String
|
||||
}
|
||||
@@ -38,15 +39,17 @@ export default {
|
||||
distance: 0, // 拼图移动距离
|
||||
flag: false, // 判断滑块是否按下
|
||||
downX: 0, // 鼠标按下位置
|
||||
bgColor: 'aqua', // 滑动背景颜色
|
||||
bgColor: '#04ad11', // 滑动背景颜色
|
||||
verifyText: '拖动滑块解锁' // 文字提示
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 鼠标按下事件,开始拖动滑块
|
||||
mouseDown (e) {
|
||||
this.downX = e.clientX;
|
||||
this.flag = true;
|
||||
},
|
||||
// 鼠标移动事件,计算距离
|
||||
mouseMove (e) {
|
||||
if (this.flag) {
|
||||
let offset = e.clientX - this.downX;
|
||||
@@ -60,6 +63,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 鼠标抬起事件,验证是否正确
|
||||
mouseUp () {
|
||||
if (!this.flag) return false;
|
||||
this.flag = false;
|
||||
@@ -68,6 +72,7 @@ export default {
|
||||
xPos: this.distance
|
||||
};
|
||||
postVerifyImg(params).then(res => {
|
||||
if (res.success) {
|
||||
if (res.result) {
|
||||
this.bgColor = 'green';
|
||||
this.verifyText = '解锁成功';
|
||||
@@ -77,23 +82,31 @@ export default {
|
||||
this.verifyText = '解锁失败';
|
||||
let that = this;
|
||||
setTimeout(() => {
|
||||
that.refresh();
|
||||
that.init();
|
||||
}, 1000);
|
||||
this.$emit('change', { status: false, distance: this.distance });
|
||||
}
|
||||
} else {
|
||||
this.init()
|
||||
}
|
||||
|
||||
}).catch(()=>{
|
||||
this.init()
|
||||
});
|
||||
},
|
||||
refresh () {
|
||||
init () { // 初始化数据
|
||||
this.flag = false;
|
||||
this.downX = 0;
|
||||
this.distance = 0;
|
||||
this.bgColor = 'aqua';
|
||||
this.bgColor = '#04ad11';
|
||||
this.verifyText = '拖动滑块解锁';
|
||||
this.getImg();
|
||||
},
|
||||
getImg () {
|
||||
getVerifyImg(this.type).then(res => {
|
||||
if (res.result) {
|
||||
this.data = res.result;
|
||||
this.show = true;
|
||||
} else {
|
||||
this.$Message.warning('请求失败请重试!')
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -102,11 +115,7 @@ export default {
|
||||
immediate: true,
|
||||
handler: function (v) {
|
||||
this.type = v;
|
||||
// this.refresh();
|
||||
}
|
||||
},
|
||||
show (v) {
|
||||
if (v) this.refresh();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -140,7 +149,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.handle {
|
||||
border: 1px solid rgb(134, 134, 134);
|
||||
border: 1px solid #e4dede;
|
||||
margin-top: 5px;
|
||||
height: 42px;
|
||||
background: #ddd;
|
||||
@@ -153,7 +162,7 @@ export default {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
opacity: 0.5;
|
||||
background: aqua;
|
||||
background: #04ad11;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="支付时间">
|
||||
<DatePicker v-model="searchForm" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
|
||||
<DatePicker v-model="searchForm.paymentTime" type="datetime" format="yyyy-MM-dd HH:mm:ss" clearable @on-change="changeDate" placeholder="选择支付时间" style="width: 200px"></DatePicker>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
@@ -53,10 +53,9 @@ export default {
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
endDate: "", // 终止时间
|
||||
sn: "",
|
||||
payStatus: "",
|
||||
paymentTime: "",
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
@@ -151,61 +150,30 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
dropDown() {
|
||||
if (this.drop) {
|
||||
this.dropDownContent = "展开";
|
||||
this.dropDownIcon = "ios-arrow-down";
|
||||
} else {
|
||||
this.dropDownContent = "收起";
|
||||
this.dropDownIcon = "ios-arrow-up";
|
||||
}
|
||||
this.drop = !this.drop;
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.selectDate = null;
|
||||
this.searchForm.startDate = "";
|
||||
this.searchForm.endDate = "";
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
selectDateRange(v) {
|
||||
if (v) {
|
||||
this.searchForm.startDate = v[0];
|
||||
this.searchForm.endDate = v[1];
|
||||
}
|
||||
changeDate (val) { // 改变日期格式
|
||||
this.searchForm.paymentTime = val
|
||||
},
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
API_Order.paymentLog(this.searchForm).then((res) => {
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
type="primary"
|
||||
>订单取消</Button
|
||||
>
|
||||
<Button
|
||||
v-if="orderInfo.order.orderStatus === 'UNPAID'"
|
||||
@click="confirmPrice"
|
||||
type="success"
|
||||
>收款</Button>
|
||||
<Button @click="orderLog" type="primary"
|
||||
>订单日志</Button
|
||||
>
|
||||
@@ -571,6 +576,25 @@ export default {
|
||||
this.showRegion = true;
|
||||
this.regionId = "";
|
||||
},
|
||||
//确认收款
|
||||
confirmPrice() {
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
content:
|
||||
"<p>您确定要收款吗?线下收款涉及库存变更,需异步进行,等待约一分钟刷新列表查看</p>",
|
||||
onOk: () => {
|
||||
API_Order.orderPay(this.sn).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("收款成功");
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获取订单详情
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
API_Order.orderDetail(this.sn).then((res) => {
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
|
||||
<Card>
|
||||
|
||||
<Row @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Form ref="searchForm" @keydown.enter.native="handleSearch" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Form-item label="订单号" prop="orderSn">
|
||||
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 160px" />
|
||||
</Form-item>
|
||||
@@ -31,13 +28,11 @@
|
||||
<Option value="CANCELLED">已取消</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
|
||||
<Form-item label="下单时间">
|
||||
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker>
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<div>
|
||||
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
|
||||
<Button type="info" class="export">
|
||||
@@ -212,20 +207,13 @@ export default {
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
width: 150,
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
return h("div", [h("Button", {props: {type: "primary", size: "small",},
|
||||
attrs: {disabled: params.row.orderStatus == "UNPAID" ? false : true,},
|
||||
style: {marginRight: "5px",},
|
||||
on: {click: () => {this.confirmPrice(params.row);},},
|
||||
}, "收款"
|
||||
),
|
||||
h("Button", {props: {type: "info", size: "small",},
|
||||
return h("Button", {props: {type: "info", size: "small",},
|
||||
style: {marginRight: "5px",},
|
||||
on: {click: () => {this.detail(params.row);},},
|
||||
}, "查看"
|
||||
),
|
||||
]);
|
||||
)
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -291,25 +279,7 @@ export default {
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
//确认收款
|
||||
confirmPrice(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
content:
|
||||
"<p>您确定要收款吗?线下收款涉及库存变更,需异步进行,等待约一分钟刷新列表查看</p>",
|
||||
onOk: () => {
|
||||
API_Order.orderPay(v.sn).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("收款成功");
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 跳转详情页面
|
||||
detail(v) {
|
||||
let sn = v.sn;
|
||||
this.$router.push({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="operation">
|
||||
<div class="operation mb_10">
|
||||
<Button @click="addParent" icon="md-add">添加一级分类</Button>
|
||||
</div>
|
||||
<tree-table
|
||||
@@ -16,10 +16,9 @@
|
||||
primary-key="id">
|
||||
<template slot="action" slot-scope="scope">
|
||||
<Button
|
||||
type="primary"
|
||||
type="info"
|
||||
@click="edit(scope.row)"
|
||||
size="small"
|
||||
icon="md-add"
|
||||
style="margin-right:5px"
|
||||
>编辑
|
||||
</Button>
|
||||
@@ -28,17 +27,14 @@
|
||||
type="error"
|
||||
@click="remove(scope.row)"
|
||||
size="small"
|
||||
icon="md-add"
|
||||
style="margin-right:5px"
|
||||
>删除
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
v-show="scope.row.level != 2 "
|
||||
type="primary"
|
||||
type="success"
|
||||
@click="addChildren(scope.row)"
|
||||
size="small"
|
||||
icon="md-add"
|
||||
style="margin-right:5px"
|
||||
>添加子分类
|
||||
</Button>
|
||||
@@ -145,12 +141,14 @@
|
||||
this.modalVisible = true;
|
||||
},
|
||||
edit(v) {
|
||||
console.log(v);
|
||||
this.modalType = 1;
|
||||
this.modalTitle = "编辑";
|
||||
this.formAdd.id = v.id;
|
||||
this.formAdd.articleCategoryName = v.articleCategoryName;
|
||||
this.formAdd.level = v.level;
|
||||
this.formAdd.parentId = v.parentId;
|
||||
this.formAdd.sort = v.sort;
|
||||
this.showParent = false;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Row>
|
||||
<Col style=" height: 100%;" span="4">
|
||||
<Card class="article-category">
|
||||
<Tree :data="treeData" @on-select-change="handleSearchChange"></Tree>
|
||||
<Tree :data="treeData" @on-select-change="handleCateChange"></Tree>
|
||||
</Card>
|
||||
</Col>
|
||||
<Col span="20">
|
||||
@@ -18,9 +18,9 @@
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary" style="">添加</Button>
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-selection-change="changeSelect">
|
||||
<!-- 页面展示 -->
|
||||
<template slot="openStatusSlot" slot-scope="scope">
|
||||
<div>
|
||||
@@ -154,28 +154,7 @@ export default {
|
||||
title: "是否显示",
|
||||
key: "openStatus",
|
||||
width: 100,
|
||||
slot: "openStatusSlot",
|
||||
/*render: (h, params) => {
|
||||
if (params.row.openStatus == "CLOSE") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "error",
|
||||
text: "隐藏",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
} else if (params.row.openStatus == "OPEN") {
|
||||
return h("div", [
|
||||
h("Badge", {
|
||||
props: {
|
||||
status: "success",
|
||||
text: "展示",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
}
|
||||
},*/
|
||||
slot: "openStatusSlot"
|
||||
},
|
||||
{
|
||||
title: "排序",
|
||||
@@ -266,11 +245,13 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
this.getAllList(0);
|
||||
},
|
||||
handleSearchChange(data) {
|
||||
// 选择分类回调
|
||||
handleCateChange(data) {
|
||||
let { value, title } = data[0];
|
||||
this.list.push({
|
||||
value,
|
||||
@@ -279,7 +260,7 @@ export default {
|
||||
this.searchForm.categoryId = value;
|
||||
this.searchTreeValue = title;
|
||||
},
|
||||
//是否展示事件
|
||||
//是否展示文章
|
||||
changeSwitch(v) {
|
||||
let params = {
|
||||
status: v.openStatus,
|
||||
@@ -290,6 +271,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 文章分类的选择事件
|
||||
handleCheckChange(data) {
|
||||
let value = "";
|
||||
let title = "";
|
||||
@@ -307,36 +289,33 @@ export default {
|
||||
this.form.categoryId = value;
|
||||
this.treeValue = title;
|
||||
},
|
||||
// 改变页数
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 改变页码
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索列表
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
// 取消全选
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
// 列表选择回调
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
|
||||
// 获取全部文章分类
|
||||
getAllList(parent_id) {
|
||||
this.loading = true;
|
||||
getArticleCategory(parent_id).then((res) => {
|
||||
@@ -353,6 +332,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 文章分类格式化方法
|
||||
getTree(tree = []) {
|
||||
let arr = [];
|
||||
if (!!tree && tree.length !== 0) {
|
||||
@@ -369,6 +349,7 @@ export default {
|
||||
}
|
||||
return arr;
|
||||
},
|
||||
// 获取文章列表
|
||||
getDataList(val) {
|
||||
if (val) this.form = {};
|
||||
this.loading = true;
|
||||
@@ -387,7 +368,7 @@ export default {
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
|
||||
// 添加文章
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
@@ -417,16 +398,27 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加文章modal
|
||||
add() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加文章";
|
||||
this.treeValue = '';
|
||||
this.form = {
|
||||
sort: 1,
|
||||
content:''
|
||||
};
|
||||
this.$refs.form.resetFields();
|
||||
delete this.form.id;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 编辑文章modal
|
||||
edit(data) {
|
||||
this.modalType = 1;
|
||||
this.modalTitle = "编辑文章";
|
||||
this.treeValue = '';
|
||||
this.form = {
|
||||
content:''
|
||||
};
|
||||
this.$refs.form.resetFields();
|
||||
|
||||
seeArticle(data.id).then((res) => {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row>
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form mb_10">
|
||||
<Form-item label="活动名称" prop="couponName">
|
||||
<Input type="text" v-model="searchForm.couponName" placeholder="请输入活动名称" clearable style="width: 200px" />
|
||||
</Form-item>
|
||||
@@ -19,17 +18,15 @@
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="operation padding-row">
|
||||
<Row class="operation padding-row" v-if="getType !== 'ACTIVITY'">
|
||||
<Button @click="add" type="primary">添加优惠券</Button>
|
||||
<Button @click="delAll">批量下架</Button>
|
||||
<!-- <Button @click="upAll" >批量上架</Button> -->
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-select-cancel="cancelSelect" @on-selection-change="changeSelect">
|
||||
<template slot-scope="{ row,index }" slot="action">
|
||||
<Button v-if="!checked && row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="primary" size="small" style="margin-right: 10px" @click="edit(row)">编辑
|
||||
<Table v-if="refreshTable" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="success" :class="{'mr_10' : row.promotionStatus === 'START' || row.promotionStatus === 'NEW'}" size="small" @click="edit(row)">编辑
|
||||
</Button>
|
||||
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error" size="small" style="margin-right: 10px" @click="remove(row)">下架
|
||||
<Button v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error" size="small" @click="remove(row)">下架
|
||||
</Button>
|
||||
</template>
|
||||
</Table>
|
||||
@@ -121,7 +118,7 @@ export default {
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
params.row.receivedNum + "/" + params.row.publishNum
|
||||
params.row.receivedNum + "/" + (params.row.publishNum === 0 ? '不限制' : params.row.publishNum)
|
||||
);
|
||||
},
|
||||
|
||||
@@ -215,20 +212,15 @@ export default {
|
||||
slot: "action",
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
maxWidth: 140,
|
||||
width: 130,
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
selectCoupon: [], //本级选中的优惠券
|
||||
refreshTable: true, // 修改选中状态后刷新表格
|
||||
};
|
||||
},
|
||||
props: {
|
||||
// 是否为选中模式
|
||||
checked: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
//优惠券类型 查询参数
|
||||
getType: {
|
||||
type: String,
|
||||
@@ -246,94 +238,73 @@ export default {
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 选中优惠券 父级传值
|
||||
selectedList: {
|
||||
handler(val) {
|
||||
// 判断是否是父级回调给自己已选择优惠券
|
||||
if (val.length != 0) {
|
||||
this.selectCoupon = val;
|
||||
if (val.length) {
|
||||
this.selectList = val;
|
||||
this.data.forEach((item) => {
|
||||
item._checked = false;
|
||||
if (this.selectList.length) {
|
||||
this.selectList.forEach((child) => {
|
||||
if (item.id == child.id) {
|
||||
item._checked = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.data.forEach((item) => {
|
||||
item._checked = false;
|
||||
});
|
||||
}
|
||||
this.refreshTable = false;
|
||||
this.$nextTick(() =>{
|
||||
this.refreshTable = true;
|
||||
})
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
check() {
|
||||
// this.selectCoupon.push(this.selectList)
|
||||
this.$emit("selected", this.selectCoupon);
|
||||
},
|
||||
methods: {
|
||||
check() { // 选中的优惠券
|
||||
this.$emit("selected", this.selectList);
|
||||
},
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
add() {
|
||||
add() { // 跳转添加页面
|
||||
this.$router.push({ name: "add-platform-coupon" });
|
||||
},
|
||||
/** 跳转至领取详情页面 */
|
||||
receiveInfo(v) {
|
||||
this.$router.push({ name: "member-receive-coupon", query: { id: v.id } });
|
||||
},
|
||||
info(v) {
|
||||
info(v) { // 查看优惠券
|
||||
this.$router.push({ name: "platform-coupon-info", query: { id: v.id } });
|
||||
},
|
||||
changePage(v) {
|
||||
changePage(v) { // 改变页码
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
// this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) {
|
||||
changePageSize(v) { // 改变页数
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
handleSearch() { // 搜索
|
||||
this.searchForm.pageNumber = 0;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
clearSelectAll() { // 清除选中状态
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
|
||||
/**
|
||||
* 取消已选择的数据
|
||||
*/
|
||||
cancelSelect(selection, row) {
|
||||
console.log(row)
|
||||
let findCoupon = this.selectCoupon.find((item) => {
|
||||
return item.id == row.id;
|
||||
});
|
||||
// 如果没有则添加
|
||||
if (!findCoupon) {
|
||||
this.selectCoupon.push(row);
|
||||
} else {
|
||||
// 有重复数据就删除
|
||||
this.selectCoupon.map((item, index) => {
|
||||
if (item.id == findCoupon.id) {
|
||||
this.selectCoupon.splice(index, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 选择优惠券
|
||||
*/
|
||||
changeSelect(e) {
|
||||
if (this.checked && e.length != 0) {
|
||||
this.selectCoupon.push(...e);
|
||||
this.check();
|
||||
}
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
if (this.getType === 'ACTIVITY') this.check()
|
||||
},
|
||||
getDataList() {
|
||||
getDataList() { // 获取数据
|
||||
this.loading = true;
|
||||
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
|
||||
this.searchForm.startTime = this.selectDate[0].getTime();
|
||||
@@ -346,18 +317,6 @@ export default {
|
||||
getPlatformCouponList(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
res.result.records.forEach((item) => {
|
||||
if (this.selectCoupon.length != 0) {
|
||||
this.selectCoupon.forEach((child) => {
|
||||
if (item.id == child.id) {
|
||||
item.___selected = true;
|
||||
item._checked = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
item.___selected = false;
|
||||
});
|
||||
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
@@ -365,43 +324,11 @@ export default {
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
this.postRequest("/coupon/insertOrUpdate", this.form).then(
|
||||
(res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
// 编辑
|
||||
this.postRequest("/coupon/insertOrUpdate", this.form).then(
|
||||
(res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
edit(v) {
|
||||
|
||||
edit(v) { // 跳转编辑页面
|
||||
this.$router.push({ name: "edit-platform-coupon", query: { id: v.id } });
|
||||
},
|
||||
remove(v) {
|
||||
remove(v) { // 下架优惠券
|
||||
this.$Modal.confirm({
|
||||
title: "确认下架",
|
||||
// 记得确认修改此处
|
||||
@@ -426,7 +353,7 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
delAll() {
|
||||
delAll() { // 批量下架
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要下架的优惠券");
|
||||
return;
|
||||
@@ -456,41 +383,12 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
upAll() {
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("请选择要上架的优惠券");
|
||||
return;
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: "确认上架",
|
||||
content: "您确认要上架所选的 " + this.selectCount + " 条数据?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = [];
|
||||
this.selectList.forEach(function (e) {
|
||||
ids.push(e.id);
|
||||
});
|
||||
let params = {
|
||||
couponIds: ids.toString(),
|
||||
promotionStatus: "START",
|
||||
};
|
||||
// 批量上架
|
||||
updatePlatformCouponStatus(params).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("上架成功");
|
||||
this.clearSelectAll();
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//如果作为组件方式,传入了类型值,则搜索参数附加类型
|
||||
if (this.getType) {
|
||||
this.searchForm.getType = this.getType;
|
||||
this.columns.pop()
|
||||
}
|
||||
this.init();
|
||||
},
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
<FormItem v-if="form.scopeType == 'PORTION_GOODS_CATEGORY'">
|
||||
|
||||
<Cascader @on-change="getGoodsCategory" :data="goodsCategoryList" style="width:300px;"
|
||||
<Cascader :data="goodsCategoryList" style="width:260px;"
|
||||
v-model="form.scopeIdGoods"></Cascader>
|
||||
|
||||
</FormItem>
|
||||
@@ -127,7 +127,7 @@ import {regular} from "@/utils";
|
||||
import skuSelect from "@/views/lili-dialog";
|
||||
|
||||
export default {
|
||||
name: "addCoupon",
|
||||
name: "edit-platform-coupon",
|
||||
components: {
|
||||
skuSelect,
|
||||
},
|
||||
@@ -140,6 +140,14 @@ export default {
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
$route(e) { // 监听路由,参数变化调取接口
|
||||
this.id = e.query.id;
|
||||
if (this.id) {
|
||||
this.getCoupon()
|
||||
} else {
|
||||
this.$refs.form.resetFields()
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
const checkPrice = (rule, value, callback) => {
|
||||
@@ -165,7 +173,7 @@ export default {
|
||||
}
|
||||
};
|
||||
return {
|
||||
rangeTimeType: 1,
|
||||
rangeTimeType: 1, // 当前时间类型
|
||||
modalType: 0, // 是否编辑
|
||||
form: {
|
||||
/** 店铺承担比例 */
|
||||
@@ -221,11 +229,11 @@ export default {
|
||||
],
|
||||
publishNum: [
|
||||
{required: true, message: "请输入发放数量"},
|
||||
{pattern: regular.integer, message: "请输入正整数"},
|
||||
{pattern: regular.Integer, message: "请输入正整数"},
|
||||
],
|
||||
couponLimitNum: [
|
||||
{required: true, message: "领取限制不能为空"},
|
||||
{pattern: regular.integer, message: "请输入正整数"},
|
||||
{pattern: regular.Integer, message: "请输入正整数"},
|
||||
],
|
||||
description: [{required: true, message: "请输入范围描述"}],
|
||||
},
|
||||
@@ -495,7 +503,7 @@ export default {
|
||||
async getCagetoryList() {
|
||||
// 获取全部商品分类
|
||||
let data = await getCategoryTree();
|
||||
this.goodsCategoryList = this.filterCategory(data.result);
|
||||
this.goodsCategoryList = data.result;
|
||||
// 过滤出可显示的值
|
||||
|
||||
this.goodsCategoryList = this.goodsCategoryList.map((item) => {
|
||||
@@ -523,18 +531,7 @@ export default {
|
||||
}
|
||||
return {value: item.id, label: item.name, children: item.children};
|
||||
});
|
||||
},
|
||||
filterCategory(list) {
|
||||
// 递归删除空children
|
||||
list.forEach((item) => {
|
||||
if (item.children.length == 0) {
|
||||
delete item.children;
|
||||
} else {
|
||||
this.filterCategory(item.children);
|
||||
}
|
||||
});
|
||||
|
||||
return list;
|
||||
console.log(this.goodsCategoryList);
|
||||
},
|
||||
filterCategoryId(list, idArr) {
|
||||
// 递归获取分类id
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<Card>
|
||||
<Form ref="form" :model="form" :label-width="120">
|
||||
<div class="base-info-item">
|
||||
<h4>优惠券将在指定发放时间发放到用户账号中</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem label="活动名称" prop="promotionName">
|
||||
<Input type="text" v-model="form.promotionName" placeholder="活动名称" clearable style="width: 260px" />
|
||||
</FormItem>
|
||||
<FormItem label="目标客户" prop="vipType">
|
||||
<RadioGroup v-model="vipType">
|
||||
<Radio :label="0">全平台客户</Radio>
|
||||
<Radio :label="1">指定客户</Radio>
|
||||
</RadioGroup>
|
||||
<Button type="primary" v-if="vipType==1" icon="ios-add" @click="addVip" ghost>添加客户</Button>
|
||||
</FormItem>
|
||||
<FormItem label="发放时间" prop="couponDiscount">
|
||||
<DatePicker type="datetime" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择" :options="options" style="width: 260px">
|
||||
</DatePicker>
|
||||
</FormItem>
|
||||
<FormItem label="选择优惠券" prop="couponType">
|
||||
<Button type="primary" icon="ios-add" @click="checkCoupon=!checkCoupon" ghost>选择优惠券</Button>
|
||||
<Table class="table" :columns="couponColumns" :data="couponData"></Table>
|
||||
</FormItem>
|
||||
</div>
|
||||
|
||||
<div style="margin-left:100px">
|
||||
<Button type="text" @click="closeCurrentPage">返回</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</Form>
|
||||
<Modal width="1200" v-model="checkCoupon">
|
||||
<couponList checked @selected="callbackSelectCoupon" />
|
||||
</Modal>
|
||||
<Modal width="1200" v-model="checkUserList">
|
||||
<userList @selected="callbackSelectUser" ref="memberLayout" />
|
||||
</Modal>
|
||||
</Card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addCouponActivity } from "@/api/promotion";
|
||||
|
||||
import couponList from "./coupon";
|
||||
import userList from "@/views/member/list/index";
|
||||
// import userList from ''
|
||||
export default {
|
||||
components: {
|
||||
couponList,
|
||||
userList,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
// 选择优惠券
|
||||
checkCoupon: false,
|
||||
// 选择用户
|
||||
checkUserList: false,
|
||||
// 优惠券表格title
|
||||
couponColumns: [
|
||||
{
|
||||
title: "优惠券名称",
|
||||
key: "name",
|
||||
},
|
||||
{
|
||||
title: "有效期",
|
||||
key: "age",
|
||||
},
|
||||
{
|
||||
title: "优惠券数量",
|
||||
key: "address",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
},
|
||||
],
|
||||
// datpicker时间设置
|
||||
options: {
|
||||
disabledDate(date) {
|
||||
return date && date.valueOf() < Date.now() - 86400000;
|
||||
},
|
||||
},
|
||||
|
||||
//
|
||||
vipType: 0, //客户会员类型 0全平台客户 1指定客户
|
||||
form: {},
|
||||
formRule: {},
|
||||
id: this.$route.query.id, // 优惠券id
|
||||
|
||||
callbackCoupon: [],
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
// 添加指定用户
|
||||
addVip() {
|
||||
this.checkUserList = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.memberLayout.selectedMember = true;
|
||||
});
|
||||
},
|
||||
// 返回已选择的用户
|
||||
callbackSelectUser(val){
|
||||
console.log(val)
|
||||
},
|
||||
|
||||
// 返回已选择的优惠券
|
||||
callbackSelectCoupon(val) {
|
||||
if (val.___selected) {
|
||||
this.callbackCoupon.forEach((item, index) => {
|
||||
if (item.id == val.id) this.callbackCoupon.splice(index, 1);
|
||||
});
|
||||
} else {
|
||||
this.callbackCoupon.push(val);
|
||||
}
|
||||
},
|
||||
// 关闭当前页面
|
||||
closeCurrentPage() {
|
||||
this.$store.commit("removeTag", "add-coupon-specify");
|
||||
localStorage.pageOpenedList = JSON.stringify(
|
||||
this.$store.state.app.pageOpenedList
|
||||
);
|
||||
this.$router.go(-1);
|
||||
},
|
||||
|
||||
async handleSubmit() {
|
||||
let res = await addCouponActivity();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scpoed>
|
||||
.table {
|
||||
width: 800px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
h4 {
|
||||
margin-bottom: 10px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: #f8f8f8;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
}
|
||||
.form-item-view {
|
||||
margin: 20px 0;
|
||||
}
|
||||
.describe {
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
color: #999;
|
||||
}
|
||||
.effectiveDays {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
> * {
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,250 +0,0 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="rangeTime">
|
||||
<div>{{ row.startTime }} ~ {{ row.endTime }}</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
type="error"
|
||||
ghost
|
||||
size="small"
|
||||
:disabled="row.memberCouponStatus != 'NEW'"
|
||||
@click="remove(row)"
|
||||
>作废</Button
|
||||
>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10, 20, 50]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMemberReceiveCouponList,
|
||||
deleteMemberReceiveCoupon,
|
||||
} from "@/api/promotion";
|
||||
|
||||
export default {
|
||||
name: "memberReceiveCoupon",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
id: this.$route.query.id, // 优惠券id
|
||||
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
title: "优惠券编号",
|
||||
key: "couponId",
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
title: "面额",
|
||||
key: "price",
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.price, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "消费门槛",
|
||||
key: "consumeThreshold",
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.consumeThreshold, "¥")
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "有效期",
|
||||
slot: "rangeTime",
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: "会员名称",
|
||||
key: "memberName",
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: "适用范围",
|
||||
key: "couponType",
|
||||
minWidth: 50,
|
||||
render: (h, params) => {
|
||||
let text = "未知";
|
||||
if (params.row.scopeType == "ALL") {
|
||||
text = "全品类";
|
||||
} else if (params.row.scopeType == "PORTION_CATEGORY") {
|
||||
text = "部分商品分类";
|
||||
} else if (params.row.scopeType == "PORTION_GOODS") {
|
||||
text = "指定商品";
|
||||
}
|
||||
return h("div", [text]);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "会员名称",
|
||||
key: "memberName",
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "memberCouponStatus",
|
||||
minWidth: 50,
|
||||
render: (h, params) => {
|
||||
let text = "未知",
|
||||
color = "";
|
||||
if (params.row.memberCouponStatus == "NEW") {
|
||||
text = "未使用";
|
||||
color = "default";
|
||||
} else if (params.row.memberCouponStatus == "USED") {
|
||||
text = "已使用";
|
||||
color = "green";
|
||||
} else if (params.row.memberCouponStatus == "EXPIRE") {
|
||||
text = "已过期";
|
||||
color = "red";
|
||||
} else if (params.row.memberCouponStatus == "CLOSED") {
|
||||
text = "已作废";
|
||||
color = "red";
|
||||
}
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: color,
|
||||
},
|
||||
},
|
||||
text
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
slot: "action",
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
},
|
||||
/** 查询单个优惠券领取详情 */
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getMemberReceiveCouponList(this.id).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;
|
||||
},
|
||||
/** 作废优惠券 */
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认作废",
|
||||
content: "您确认要作废此优惠券?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
deleteMemberReceiveCoupon(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("作废成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "@/styles/table-common.scss";
|
||||
</style>
|
||||
@@ -7,7 +7,7 @@
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom">
|
||||
|
||||
<template slot-scope="{ row,index }" slot="action">
|
||||
<Button type="primary"
|
||||
<Button type="info"
|
||||
size="small" style="margin-right: 10px" @click="info(row)">查看
|
||||
</Button>
|
||||
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error"
|
||||
|
||||
@@ -282,7 +282,6 @@ export default {
|
||||
couponId: item.id,
|
||||
}
|
||||
});
|
||||
console.log(this.form.couponActivityItems)
|
||||
},
|
||||
|
||||
// 添加指定用户
|
||||
@@ -308,7 +307,6 @@ export default {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const params = JSON.parse(JSON.stringify(this.form));
|
||||
console.log(params);
|
||||
this.submitLoading = true;
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete params.id;
|
||||
|
||||
@@ -187,11 +187,11 @@ export default {
|
||||
],
|
||||
publishNum: [
|
||||
{ required: true, message: "请输入发放数量" },
|
||||
{ pattern: regular.integer, message: "请输入正整数" },
|
||||
{ pattern: regular.Integer, message: "请输入正整数" },
|
||||
],
|
||||
couponLimitNum: [
|
||||
{ required: true, message: "请输入领取限制" },
|
||||
{ pattern: regular.integer, message: "请输入正整数" },
|
||||
{ pattern: regular.Integer, message: "请输入正整数" },
|
||||
],
|
||||
description: [{ required: true, message: "请输入范围描述" }],
|
||||
},
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<!-- 遮罩层 -->
|
||||
<div v-if="isRead" class="mask">只读不可修改</div>
|
||||
<div>
|
||||
<FormItem label="会员名称" required prop="memberName">
|
||||
<FormItem label="会员名称" prop="memberName">
|
||||
<div class="item">
|
||||
<Input disabled v-model="shopForm.memberName" />
|
||||
<Button @click="selectMember()" v-if="!$route.query.shopId">选择会员</Button>
|
||||
@@ -44,7 +44,7 @@
|
||||
<FormItem label="店铺所在地" prop="storeAddressPath">
|
||||
<Input disabled v-model="shopForm.storeAddressPath" style="width: 350px" />
|
||||
</FormItem>
|
||||
<FormItem label="店铺详细地址" required prop="storeAddressDetail">
|
||||
<FormItem label="店铺详细地址" prop="storeAddressDetail">
|
||||
<Input v-model="shopForm.storeAddressDetail" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
|
||||
@@ -91,60 +91,60 @@
|
||||
<div v-if="isRead" class="mask">只读不可修改</div>
|
||||
<Divider orientation="left">公司信息</Divider>
|
||||
<div>
|
||||
<FormItem label="公司名称" required prop="companyName">
|
||||
<FormItem label="公司名称" prop="companyName">
|
||||
<Input v-model="shopForm.companyName" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="公司电话" required prop="companyPhone">
|
||||
<FormItem label="公司电话" prop="companyPhone">
|
||||
<Input v-model="shopForm.companyPhone" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<FormItem label="公司所在地" required>
|
||||
<FormItem label="公司所在地" >
|
||||
<Input v-model="shopForm.companyAddressPath" disabled style="width: 260px" v-if="showRegion == false" />
|
||||
<Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary" icon="ios-create-outline" style="margin-left: 8px">修改
|
||||
</Button>
|
||||
<region style="width: 350px" @selected="selectedRegion" v-if="showRegion == true" />
|
||||
</FormItem>
|
||||
<FormItem label="公司详细地址" required prop="companyAddress">
|
||||
<FormItem label="公司详细地址" prop="companyAddress">
|
||||
<Input v-model="shopForm.companyAddress" clearable style="width: 350px" />
|
||||
</FormItem>
|
||||
<FormItem label="员工总数" required prop="employeeNum">
|
||||
<FormItem label="员工总数" prop="employeeNum">
|
||||
<InputNumber style="width: 150px" :min="1" :max="9999999" v-model="shopForm.employeeNum">
|
||||
</InputNumber>
|
||||
</FormItem>
|
||||
<FormItem label="注册资金" required prop="registeredCapital">
|
||||
<FormItem label="注册资金" prop="registeredCapital">
|
||||
<InputNumber style="width: 150px" :min="1" :max="9999999" v-model="shopForm.registeredCapital">
|
||||
</InputNumber>
|
||||
<span style="margin-left: 10px">万</span>
|
||||
</FormItem>
|
||||
<FormItem label="联系人姓名" required prop="linkName">
|
||||
<FormItem label="联系人姓名" prop="linkName">
|
||||
<Input v-model="shopForm.linkName" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
<FormItem label="联系人手机" required prop="linkPhone">
|
||||
<FormItem label="联系人手机" prop="linkPhone">
|
||||
<Input v-model="shopForm.linkPhone" maxlength="11" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
<FormItem label="电子邮箱" required prop="companyEmail">
|
||||
<FormItem label="电子邮箱" prop="companyEmail">
|
||||
<Input v-model="shopForm.companyEmail" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
|
||||
<Divider orientation="left">营业执照信息</Divider>
|
||||
|
||||
<FormItem label="营业执照号" required prop="licenseNum">
|
||||
<FormItem label="营业执照号" prop="licenseNum">
|
||||
<Input v-model="shopForm.licenseNum" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="法定经营范围" required prop="scope">
|
||||
<FormItem label="法定经营范围" prop="scope">
|
||||
<Input v-model="shopForm.scope" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
|
||||
<Divider orientation="left">法人信息</Divider>
|
||||
|
||||
<FormItem label="法人姓名" required prop="legalName">
|
||||
<FormItem label="法人姓名" prop="legalName">
|
||||
<Input v-model="shopForm.legalName" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
<FormItem label="法人证件号" required prop="legalId">
|
||||
<FormItem label="法人证件号" prop="legalId">
|
||||
<Input v-model="shopForm.legalId" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
<FormItem label="法人身份证照片" required ref="legalPhoto">
|
||||
<FormItem label="法人身份证照片" ref="legalPhoto">
|
||||
<Avatar style="height: 100px;width: 100px" v-if="shopForm.legalPhoto" shape="square" icon="ios-person" size="default" :src="shopForm.legalPhoto" />
|
||||
<div>
|
||||
<Button @click="handleCLickImg('legalPhoto')" type="primary">选择图片</Button>
|
||||
@@ -152,20 +152,20 @@
|
||||
</FormItem>
|
||||
|
||||
<Divider orientation="left">结算银行信息</Divider>
|
||||
<FormItem label="银行开户名" required prop="settlementBankAccountName">
|
||||
<FormItem label="银行开户名" prop="settlementBankAccountName">
|
||||
<Input v-model="shopForm.settlementBankAccountName" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
<FormItem label="银行账号" required prop="settlementBankAccountNum">
|
||||
<FormItem label="银行账号" prop="settlementBankAccountNum">
|
||||
<Input v-model="shopForm.settlementBankAccountNum" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
<FormItem label="银行支行名称" required prop="settlementBankBranchName">
|
||||
<FormItem label="银行支行名称" prop="settlementBankBranchName">
|
||||
<Input v-model="shopForm.settlementBankBranchName" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
<FormItem label="支行联行号" required prop="settlementBankJointName">
|
||||
<FormItem label="支行联行号" prop="settlementBankJointName">
|
||||
<Input v-model="shopForm.settlementBankJointName" clearable style="width: 200px" />
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="许可证电子版" required>
|
||||
<FormItem label="许可证电子版" >
|
||||
<Avatar style="height: 100px;width: 100px" v-if="shopForm.licencePhoto" shape="square" icon="ios-person" size="default" :src="shopForm.licencePhoto" />
|
||||
<div>
|
||||
<Button @click="handleCLickImg('licencePhoto')" type="primary">选择图片</Button>
|
||||
@@ -262,28 +262,28 @@ export default {
|
||||
shopValidate: {
|
||||
// 表单验证规则
|
||||
memberName: [
|
||||
{ required: true, message: "会员不能为空", trigger: "blur" },
|
||||
{ required: true, message: "会员不能为空" },
|
||||
],
|
||||
storeName: [
|
||||
{ required: true, message: "店铺名称不能为空", trigger: "blur" },
|
||||
{ required: true, message: "店铺名称不能为空" },
|
||||
],
|
||||
companyAddress: [
|
||||
{ required: true, message: "公司地址不能为空", trigger: "blur" },
|
||||
{ required: true, message: "公司地址不能为空" },
|
||||
],
|
||||
storeAddressDetail: [
|
||||
{ required: true, message: "店铺详细地址不能为空", trigger: "blur" },
|
||||
{ required: true, message: "店铺详细地址不能为空" },
|
||||
],
|
||||
storeDesc: [
|
||||
{ required: true, message: "店铺简介不能为空", trigger: "blur" },
|
||||
{ required: true, message: "店铺简介不能为空" },
|
||||
],
|
||||
storeCenter: [
|
||||
{ required: true, message: "店铺未定位", trigger: "change" },
|
||||
{ required: true, message: "店铺未定位" },
|
||||
],
|
||||
companyName: [
|
||||
{ required: true, message: "公司名称不能为空", trigger: "blur" },
|
||||
{ required: true, message: "公司名称不能为空", },
|
||||
],
|
||||
companyPhone: [
|
||||
{ required: true, message: "公司电话不能为空", trigger: "blur" },
|
||||
{ required: true, message: "公司电话不能为空", },
|
||||
],
|
||||
employeeNum: [
|
||||
{
|
||||
@@ -302,10 +302,10 @@ export default {
|
||||
},
|
||||
],
|
||||
linkName: [
|
||||
{ required: true, message: "联系人姓名不能为空", trigger: "blur" },
|
||||
{ required: true, message: "联系人姓名不能为空", },
|
||||
],
|
||||
linkPhone: [
|
||||
{ required: true, message: "联系人手机号不能为空", trigger: "blur" },
|
||||
{ required: true, message: "联系人手机号不能为空", },
|
||||
{
|
||||
type: "string",
|
||||
pattern: /^1[3|4|5|6|7|8][0-9]{9}$/,
|
||||
@@ -314,32 +314,32 @@ export default {
|
||||
},
|
||||
],
|
||||
companyEmail: [
|
||||
{ required: true, message: "邮箱不能为空", trigger: "blur" },
|
||||
{ type: "email", message: "邮箱格式错误", trigger: "blur" },
|
||||
{ required: true, message: "邮箱不能为空", },
|
||||
{ type: "email", message: "邮箱格式错误", },
|
||||
],
|
||||
licenseNum: [
|
||||
{ required: true, message: "营业执照号不能为空", trigger: "blur" },
|
||||
{ required: true, message: "营业执照号不能为空", },
|
||||
],
|
||||
scope: [
|
||||
{ required: true, message: "法定经营范围不能为空", trigger: "blur" },
|
||||
{ required: true, message: "法定经营范围不能为空", },
|
||||
],
|
||||
legalName: [
|
||||
{ required: true, message: "法人姓名不能为空", trigger: "blur" },
|
||||
{ required: true, message: "法人姓名不能为空", },
|
||||
],
|
||||
legalId: [
|
||||
{ required: true, message: "法人证件号不能为空", trigger: "blur" },
|
||||
{ required: true, message: "法人证件号不能为空", },
|
||||
],
|
||||
settlementBankAccountName: [
|
||||
{ required: true, message: "银行开户名不能为空", trigger: "blur" },
|
||||
{ required: true, message: "银行开户名不能为空", },
|
||||
],
|
||||
settlementBankAccountNum: [
|
||||
{ required: true, message: "银行账号不能为空", trigger: "blur" },
|
||||
{ required: true, message: "银行账号不能为空", },
|
||||
],
|
||||
settlementBankBranchName: [
|
||||
{ required: true, message: "银行支行名称不能为空", trigger: "blur" },
|
||||
{ required: true, message: "银行支行名称不能为空", },
|
||||
],
|
||||
settlementBankJointName: [
|
||||
{ required: true, message: "支行联行号不能为空", trigger: "blur" },
|
||||
{ required: true, message: "支行联行号不能为空", },
|
||||
],
|
||||
salesConsigneeMobile: [
|
||||
{
|
||||
|
||||
@@ -146,7 +146,10 @@
|
||||
<div>
|
||||
<h4>订退单统计</h4>
|
||||
<div class="breadcrumb" style="margin-bottom:20px;">
|
||||
<span @click="clickTab(item,index)" :class="{'active':item.selected}" v-for="(item,index) in orderType" :key="index"> {{item.title}}</span>
|
||||
<RadioGroup v-model="orderOrRefund" type="button" size="small" button-style="solid">
|
||||
<Radio :label="true">订单</Radio>
|
||||
<Radio :label="false">退单</Radio>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
<div>
|
||||
<Table stripe :columns="columns" :data="data"></Table>
|
||||
@@ -173,17 +176,8 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
orderOrRefund: true, // 订单还是单
|
||||
total: "0", // 总数
|
||||
orderType: [ // 订单类型
|
||||
{
|
||||
title: "订单",
|
||||
selected: true,
|
||||
},
|
||||
{
|
||||
title: "退单",
|
||||
selected: false,
|
||||
},
|
||||
],
|
||||
// 订单状态
|
||||
orderStatusList: {
|
||||
UNDELIVERED: "待发货",
|
||||
@@ -459,20 +453,17 @@ export default {
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
orderOrRefund:{ // 订单还是退单
|
||||
handler (val) {
|
||||
if (val) {
|
||||
this.getOrderList();
|
||||
} else {
|
||||
this.getOrderRefundList();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickTab(item, index) {
|
||||
this.refundIndex = index;
|
||||
this.orderType.forEach((res) => {
|
||||
res.selected = false;
|
||||
});
|
||||
if (item.title == "退单") {
|
||||
this.getOrderRefundList();
|
||||
} else {
|
||||
this.getOrderList();
|
||||
}
|
||||
item.selected = true;
|
||||
},
|
||||
// 订单图
|
||||
initOrderChart() {
|
||||
// 默认已经加载 legend-filter 交互
|
||||
|
||||
@@ -12,13 +12,7 @@
|
||||
<Input type='number' v-model="formValidate.autoReceive">
|
||||
<span slot="append">天</span>
|
||||
</Input>
|
||||
|
||||
</FormItem>
|
||||
<FormItem label="订单自动完成" prop="autoComplete">
|
||||
<Input type='number' v-model="formValidate.autoComplete">
|
||||
<span slot="append">天</span>
|
||||
</Input>
|
||||
|
||||
<span class="desc">收货后,订单完成</span>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="自动评价" prop="autoEvaluation">
|
||||
@@ -27,11 +21,17 @@
|
||||
</Input>
|
||||
|
||||
</FormItem>
|
||||
<FormItem label="售后自动取消" prop="autoCancelAfterSale">
|
||||
<Input type='number' v-model="formValidate.autoCancelAfterSale">
|
||||
<FormItem label="已完成订单允许退单" prop="closeAfterSale">
|
||||
<Input type='number' v-model="formValidate.closeAfterSale">
|
||||
<span slot="append">天</span>
|
||||
</Input>
|
||||
|
||||
<span class="desc">如果天数为0,则不允许退单</span>
|
||||
</FormItem>
|
||||
<FormItem label="已完成订单允许投诉" prop="closeComplaint">
|
||||
<Input type='number' v-model="formValidate.closeComplaint">
|
||||
<span slot="append">天</span>
|
||||
</Input>
|
||||
<span class="desc">如果天数为0,则不允许投诉</span>
|
||||
</FormItem>
|
||||
|
||||
<div class="label-btns">
|
||||
@@ -50,10 +50,10 @@ export default {
|
||||
ruleValidate: {}, // 验证规则
|
||||
formValidate: { // 表单数据
|
||||
autoCancel: "",
|
||||
autoComplete: "",
|
||||
autoEvaluation: "",
|
||||
autoReceive: "",
|
||||
autoCancelAfterSale: "",
|
||||
closeAfterSale: "",
|
||||
closeComplaint:""
|
||||
},
|
||||
};
|
||||
},
|
||||
@@ -121,4 +121,8 @@ export default {
|
||||
/deep/ .ivu-input {
|
||||
width: 100px !important;
|
||||
}
|
||||
.desc {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="imageSlot" slot-scope="scope">
|
||||
@@ -53,8 +51,6 @@
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="imageSlot" slot-scope="scope">
|
||||
@@ -99,7 +95,7 @@
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label="图片" prop="resource">
|
||||
<Input v-model="form.resource" clearable style="width: 100%" />
|
||||
<upload-pic-input v-model="form.resource" style="width: 100%"></upload-pic-input>
|
||||
</FormItem>
|
||||
<FormItem label="类型" prop="type">
|
||||
<radio-group v-model="form.type" type="button">
|
||||
@@ -119,15 +115,16 @@
|
||||
</template>
|
||||
<script>
|
||||
import * as API_Setting from "@/api/setting";
|
||||
|
||||
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
|
||||
export default {
|
||||
components: {
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
modalVisible: false, //添加验证码源弹出框
|
||||
modalTitle: "", //添加验证码源弹出框标题
|
||||
loading: true, // 表单加载状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
modalType: 0, // 添加或编辑标识
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
form: {
|
||||
@@ -250,11 +247,6 @@ export default {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
this.getDataList();
|
||||
},
|
||||
//切换tab
|
||||
handleClickType(v) {
|
||||
this.searchForm.pageNumber = 1; // 当前页数
|
||||
@@ -281,15 +273,12 @@ export default {
|
||||
});
|
||||
this.loading = false;
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
//添加验证码源
|
||||
add() {
|
||||
this.form.type = this.searchForm.type;
|
||||
this.modalVisible = true;
|
||||
this.modalType = 0;
|
||||
this.$refs.form.resetFields()
|
||||
this.modalTitle = "添加验证码源";
|
||||
},
|
||||
//修改验证码源
|
||||
|
||||
@@ -1 +1 @@
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-1.0.1:0.0.4 .
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-4.2.0:0.0.2 .
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
"stompjs": "^2.3.3",
|
||||
"swiper": "^6.3.5",
|
||||
"uuid": "^8.3.2",
|
||||
"view-design": "^4.2.0",
|
||||
"vue": "^2.6.10",
|
||||
"vue-awesome": "^4.0.2",
|
||||
"vue-awesome-swiper": "^4.1.1",
|
||||
@@ -59,6 +58,7 @@
|
||||
"less-loader": "^6.2.0",
|
||||
"style-loader": "^2.0.0",
|
||||
"style-resources-loader": "^1.3.2",
|
||||
"view-design": "^4.6.1",
|
||||
"vue-cli-plugin-style-resources-loader": "^0.1.4",
|
||||
"vue-template-compiler": "^2.6.10"
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ export const verificationCode = verificationCode => {
|
||||
export const downLoadDeliverExcel = params => {
|
||||
return getRequest(`/orders/downLoadDeliverExcel`, params, 'blob');
|
||||
};
|
||||
// 导出待发货订单
|
||||
export const queryExportOrder = params => {
|
||||
return getRequest(`/orders/queryExportOrder`, params);
|
||||
};
|
||||
|
||||
|
||||
// 上传待发货的订单列表
|
||||
@@ -109,7 +113,7 @@ export const afterSaleSellerDelivery = (sn, params) => {
|
||||
};
|
||||
//查询物流
|
||||
export const getTraces = (sn, params) => {
|
||||
return postRequest(`/orders/getTraces/${sn}`, params);
|
||||
return getRequest(`/orders/getTraces/${sn}`, params);
|
||||
};
|
||||
//售后单查询物流
|
||||
export const getSellerDeliveryTraces = (sn, params) => {
|
||||
|
||||
@@ -18,17 +18,16 @@ export default {
|
||||
* @description api请求基础路径
|
||||
*/
|
||||
api_dev: {
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn',
|
||||
|
||||
common: "https://common-api.pickmall.cn",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
},
|
||||
api_prod: {
|
||||
common: 'https://common-api.pickmall.cn',
|
||||
buyer: 'https://buyer-api.pickmall.cn',
|
||||
seller: 'https://store-api.pickmall.cn',
|
||||
manager: 'https://admin-api.pickmall.cn'
|
||||
common: "https://common-api.pickmall.cn",
|
||||
buyer: "https://buyer-api.pickmall.cn",
|
||||
seller: "https://store-api.pickmall.cn",
|
||||
manager: "https://admin-api.pickmall.cn"
|
||||
},
|
||||
/**
|
||||
* @description api请求基础路径前缀
|
||||
|
||||
3
seller/src/libs/eventBus.js
Normal file
3
seller/src/libs/eventBus.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import Vue from "vue";
|
||||
|
||||
export default new Vue;
|
||||
@@ -35,12 +35,6 @@ export const otherRouter = {
|
||||
name: "message_index",
|
||||
component: () => import("@/views/message/message.vue")
|
||||
},
|
||||
{
|
||||
path: "stock-goods",
|
||||
title: "店铺端商品库存告警列表",
|
||||
name: "stock-goods",
|
||||
component: () => import("@/views/goods/goods-seller/goodsStock.vue")
|
||||
},
|
||||
{
|
||||
path: "goods-operation",
|
||||
title: "添加商品",
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
<Avatar :src="userInfo.storeLogo" style="background: #fff;margin-left: 10px;"></Avatar>
|
||||
</div>
|
||||
<DropdownMenu slot="list">
|
||||
<!-- <DropdownItem name="ownSpace">{{ $t('userCenter') }}</DropdownItem> -->
|
||||
<DropdownItem name="changePass">{{ $t('changePass') }}</DropdownItem>
|
||||
<DropdownItem name="loginOut" divided>{{ $t('logout') }}</DropdownItem>
|
||||
</DropdownMenu>
|
||||
@@ -53,9 +52,6 @@
|
||||
<script>
|
||||
import shrinkableMenu from "./main-components/shrinkable-menu/shrinkable-menu.vue";
|
||||
import tagsPageOpened from "./main-components/tags-page-opened.vue";
|
||||
import breadcrumbNav from "./main-components/breadcrumb-nav.vue";
|
||||
import fullScreen from "./main-components/fullscreen.vue";
|
||||
import messageTip from "./main-components/message-tip.vue";
|
||||
import circleLoading from "@/views/my-components/lili/circle-loading.vue";
|
||||
import Cookies from "js-cookie";
|
||||
import util from "@/libs/util.js";
|
||||
@@ -64,10 +60,7 @@ export default {
|
||||
components: {
|
||||
shrinkableMenu,
|
||||
tagsPageOpened,
|
||||
breadcrumbNav,
|
||||
fullScreen,
|
||||
messageTip,
|
||||
circleLoading,
|
||||
circleLoading
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
type="primary"
|
||||
style="width: 100px;margin-right:5px"
|
||||
:loading="savePassLoading"
|
||||
@click="saveEditPass"
|
||||
@click="editPassword"
|
||||
>保存</Button>
|
||||
<Button @click="cancelEditPass">取消</Button>
|
||||
</FormItem>
|
||||
@@ -61,6 +61,7 @@ export default {
|
||||
rePass: "" // 从新输入新密码
|
||||
},
|
||||
strength: "", // 密码强度
|
||||
// 验证规则
|
||||
passwordValidate: {
|
||||
oldPass: [
|
||||
{
|
||||
@@ -101,10 +102,12 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 新密码回调
|
||||
changeInputPass(v, grade, strength) {
|
||||
this.strength = strength;
|
||||
},
|
||||
saveEditPass() {
|
||||
// 修改密码
|
||||
editPassword() {
|
||||
let params = {
|
||||
password: this.md5(this.editPasswordForm.oldPass),
|
||||
newPassword: this.md5(this.editPasswordForm.newPassword)
|
||||
@@ -131,6 +134,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消修改密码
|
||||
cancelEditPass() {
|
||||
this.$store.commit("removeTag", "change_pass");
|
||||
localStorage.storeOpenedList = JSON.stringify(
|
||||
@@ -147,11 +151,9 @@ export default {
|
||||
name: lastPageName
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.change-pass {
|
||||
&-btn-box {
|
||||
|
||||
@@ -6,19 +6,13 @@
|
||||
<Form-item label="商品名称" prop="goodsName">
|
||||
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px"/>
|
||||
</Form-item>
|
||||
<!-- <Form-item label="店铺名称">
|
||||
<Select v-model="searchForm.shopId" placeholder="请选择" @on-query-change="searchChange" filterable clearable style="width: 200px">
|
||||
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.storeName }}</Option>
|
||||
</Select>
|
||||
</Form-item> -->
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
<!-- <Button @click="add" type="default">批量删除</Button>-->
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="goodsSlot" slot-scope="{row}">
|
||||
<div style="margin-top: 5px;height: 70px; display: flex;">
|
||||
@@ -92,9 +86,6 @@ export default {
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
shopList:[], // 店铺列表
|
||||
loading: true, // 表单加载状态
|
||||
drop: false,
|
||||
dropDownContent: "展开",
|
||||
dropDownIcon: "ios-arrow-down",
|
||||
searchForm: { // 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
@@ -115,7 +106,7 @@ export default {
|
||||
trigger: "change"
|
||||
}],
|
||||
},
|
||||
columns: [ // 表哥表头
|
||||
columns: [ // 表格表头
|
||||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
@@ -188,30 +179,29 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
init() { // 初始化数据
|
||||
this.getDataList();
|
||||
// this.getShopList()
|
||||
},
|
||||
// 选择商品回调
|
||||
selectedGoodsData(v){
|
||||
this.modalVisible = true
|
||||
this.form.commission = 1
|
||||
this.modalTitle = "保存分销商品"
|
||||
this.skuId = v[0].id
|
||||
//this.data.unshift(v[0])
|
||||
},
|
||||
// 添加商品modal
|
||||
add(){
|
||||
|
||||
this.$refs.liliDialog.flag = true;
|
||||
this.$refs.liliDialog.goodsFlag = true;
|
||||
|
||||
this.$refs.liliDialog.singleGoods();
|
||||
|
||||
},
|
||||
// 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
// 添加商品
|
||||
handleSubmit(){
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
@@ -225,28 +215,18 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
|
||||
// 获取商品列表
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
@@ -260,6 +240,7 @@ export default {
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
// 删除商品
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
@@ -278,6 +259,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取店铺列表 搜索项用
|
||||
getShopList (val) {
|
||||
const params = {
|
||||
pageNumber:1,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" @keydown.enter.native="handleSearch" class="search-form">
|
||||
<Form-item label="订单编号" prop="orderSn">
|
||||
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单编号" clearable style="width: 200px" />
|
||||
</Form-item>
|
||||
@@ -11,9 +10,8 @@
|
||||
</Form-item>
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
|
||||
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small"
|
||||
show-total show-elevator show-sizer></Page>
|
||||
@@ -35,8 +33,6 @@ export default {
|
||||
timeRange: [], // 范围时间
|
||||
orderStatusList, // 订单状态列表
|
||||
distributionId: this.$route.query.id, // 分销id
|
||||
openSearch: true, // 显示搜索
|
||||
openTip: true, // 显示提示
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
@@ -133,23 +129,26 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
init() { // 初始化数据
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
// 获取订单数据
|
||||
getDataList() {
|
||||
this.searchForm.distributionId = this.distributionId;
|
||||
this.loading = true;
|
||||
|
||||
@@ -126,13 +126,16 @@ export default {
|
||||
template: "action",
|
||||
}
|
||||
],
|
||||
// 表格数据
|
||||
tableData: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getAllList();
|
||||
},
|
||||
// 刷新列表
|
||||
refresh() {
|
||||
this.loading = true;
|
||||
let that = this;
|
||||
@@ -152,6 +155,7 @@ export default {
|
||||
this.formAdd.parentId = v.id;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 编辑分类
|
||||
edit(v) {
|
||||
this.modalType = 1;
|
||||
this.modalTitle = "编辑";
|
||||
@@ -209,6 +213,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认删除分类
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
@@ -227,6 +232,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取分类
|
||||
getAllList() {
|
||||
this.loading = true;
|
||||
API_Goods.getShopGoodsLabelList(this.searchForm).then((res) => {
|
||||
|
||||
@@ -77,10 +77,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
/*平铺*/
|
||||
div.base-info-item > div {
|
||||
margin-left: 5%;
|
||||
}
|
||||
|
||||
div.base-info-item {
|
||||
h4 {
|
||||
@@ -94,13 +90,15 @@ div.base-info-item {
|
||||
line-height: 40px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
>div{
|
||||
padding-left: 5%;
|
||||
}
|
||||
.form-item-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
padding-left: 80px;
|
||||
// padding-left: 80px;
|
||||
|
||||
.layout {
|
||||
margin-bottom: 20px;
|
||||
@@ -282,34 +280,13 @@ div.base-info-item {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/deep/ .ivu-steps {
|
||||
width: 100% !important;
|
||||
display: flex;
|
||||
}
|
||||
.step-list {
|
||||
height: 60px;
|
||||
padding: 10px 30px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 0.8em;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
// box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)
|
||||
}
|
||||
.step-view {
|
||||
flex: 1;
|
||||
height: 60px;
|
||||
font-size: 19px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.step-view:nth-of-type(1) {
|
||||
border-top-left-radius: 0.4em;
|
||||
border-bottom-left-radius: 0.4em;
|
||||
}
|
||||
.step-view:nth-last-child(1) {
|
||||
border-top-right-radius: 0.4em;
|
||||
border-bottom-right-radius: 0.4em;
|
||||
}
|
||||
|
||||
.add-sku-btn {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
class="search-form mb_10"
|
||||
@keydown.enter.native="handleSearch"
|
||||
>
|
||||
<Form-item label="商品名称" prop="goodsName">
|
||||
<Input
|
||||
@@ -51,16 +51,14 @@
|
||||
</a>
|
||||
</Form-item>
|
||||
</Form>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
class="mt_10"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
@@ -77,29 +75,6 @@
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
:mask-closable="false"
|
||||
:width="500"
|
||||
>
|
||||
<Form
|
||||
ref="underForm"
|
||||
:model="underForm"
|
||||
:label-width="100"
|
||||
:rules="formValidate"
|
||||
>
|
||||
<FormItem label="下架原因" prop="reason">
|
||||
<Input v-model="underForm.reason" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="lower(form.id)"
|
||||
>提交</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -110,11 +85,7 @@ export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
id: "", //要操作的id
|
||||
openSearch: true, // 显示搜索
|
||||
loading: true, // 表单加载状态
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
drop: false,
|
||||
dropDownContent: "展开",
|
||||
dropDownIcon: "ios-arrow-down",
|
||||
@@ -124,24 +95,8 @@ export default {
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
saveType: "TEMPLATE"
|
||||
},
|
||||
underForm: { // 下架表单
|
||||
reason: "",
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
goodsName: "",
|
||||
sn: "",
|
||||
marketEnable: "",
|
||||
price: "",
|
||||
sellerName: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [ // 表头
|
||||
{
|
||||
title: "ID",
|
||||
@@ -202,7 +157,7 @@ export default {
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
type: "success",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
@@ -243,23 +198,16 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let here = this.$route.matched.find((v) => v.name === this.$route.name);
|
||||
this.pageType = here.props.default ? here.props.default.type : "";
|
||||
if (this.pageType === "TEMPLATE") {
|
||||
this.searchForm.saveType = "TEMPLATE";
|
||||
} else {
|
||||
this.searchForm.saveType = "DRAFT";
|
||||
}
|
||||
init() { // 初始化数据
|
||||
this.getDataList();
|
||||
},
|
||||
// 编辑模板
|
||||
editGoods(v) {
|
||||
this.searchForm.saveType === "TEMPLATE" ?
|
||||
this.$router.push({ name: "goods-template-operation-edit", query: { draftId: v.id } }):
|
||||
this.$router.push({ name: "goods-draft-operation-edit", query: { draftId: v.id } });
|
||||
this.$router.push({ name: "goods-template-operation-edit", query: { draftId: v.id } })
|
||||
},
|
||||
// 删除模板
|
||||
removeDraft (id) {
|
||||
let showType = this.searchForm.saveType === "TEMPLATE" ? "模版" : "草稿";
|
||||
let showType = "模版";
|
||||
this.$Modal.confirm({
|
||||
title: "确认审核",
|
||||
content: "您确认要删除id为 " + id + " 的" + showType + "吗?",
|
||||
@@ -275,20 +223,23 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 改变页数
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 改变页码
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
@@ -296,21 +247,7 @@ export default {
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
// 展开、收起搜索项
|
||||
dropDown() {
|
||||
if (this.drop) {
|
||||
this.dropDownContent = "展开";
|
||||
@@ -321,6 +258,7 @@ export default {
|
||||
}
|
||||
this.drop = !this.drop;
|
||||
},
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</Dropdown>
|
||||
</Row>
|
||||
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
|
||||
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="goodsSlot" slot-scope="{row}">
|
||||
<div style="margin-top: 5px;height: 90px; display: flex;">
|
||||
@@ -64,7 +64,6 @@
|
||||
</template>
|
||||
|
||||
</Table>
|
||||
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||
show-total show-elevator show-sizer></Page>
|
||||
@@ -74,7 +73,7 @@
|
||||
<Modal title="更新库存" v-model="updateStockModalVisible" :mask-closable="false" :width="500">
|
||||
<Tabs value="updateStock">
|
||||
<TabPane label="手动规格更新" name="updateStock">
|
||||
<Table :columns="updateStockColumns" :data="stockList" border :span-method="handleSpan"></Table>
|
||||
<Table class="mt_10" :columns="updateStockColumns" :data="stockList" border :span-method="handleSpan"></Table>
|
||||
</TabPane>
|
||||
<TabPane label="批量规格更新" name="stockAll">
|
||||
<Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" />
|
||||
@@ -123,7 +122,7 @@ export default {
|
||||
return {
|
||||
id: "", //要操作的id
|
||||
loading: true, // 表单加载状态
|
||||
shipTemplateForm: {},
|
||||
shipTemplateForm: {}, // 物流模板
|
||||
shipTemplateModal: false, // 物流模板是否显示
|
||||
logisticsTemplate: [], // 物流列表
|
||||
updateStockModalVisible: false, // 更新库存模态框显隐
|
||||
@@ -382,12 +381,14 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
init() { // 初始化数据
|
||||
this.getDataList();
|
||||
},
|
||||
// 添加商品
|
||||
addGoods() {
|
||||
this.$router.push({ name: "goods-operation" });
|
||||
},
|
||||
// 编辑商品
|
||||
editGoods(v) {
|
||||
this.$router.push({ name: "goods-operation-edit", query: { id: v.id } });
|
||||
},
|
||||
@@ -437,20 +438,24 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
// 重置搜索条件
|
||||
handleReset() {
|
||||
this.searchForm = {};
|
||||
this.searchForm.pageNumber = 1;
|
||||
@@ -458,24 +463,17 @@ export default {
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
// 清除多选
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
// 添加选中项
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
//保存物流模板信息
|
||||
saveShipTemplate() {
|
||||
|
||||
this.$Modal.confirm({
|
||||
title: "确认设置物流模板",
|
||||
content:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
214
seller/src/views/goods/goods-seller/goodsOperationFirst.vue
Normal file
214
seller/src/views/goods/goods-seller/goodsOperationFirst.vue
Normal file
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 选择商品类型 -->
|
||||
<Modal v-model="selectGoodsType" width="550" :closable="false">
|
||||
<div class="goods-type-list" v-if="!showGoodsTemplates">
|
||||
<div class="goods-type-item" :class="{'active-goods-type':item.check}" @click="handleClickGoodsType(item)"
|
||||
v-for="(item,index) in goodsTypeWay" :key="index">
|
||||
<img :src="item.img"/>
|
||||
<div>
|
||||
<h2>{{ item.title }}</h2>
|
||||
<p>{{ item.desc }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="goods-type-list">
|
||||
<h2 @click="showGoodsTemplates = !showGoodsTemplates">返回</h2>
|
||||
<div class="goods-type-item template-item" @click="handleClickGoodsTemplate(item)"
|
||||
v-for="(item,tempIndex) in goodsTemplates" :key="tempIndex">
|
||||
<img :src="item.thumbnail" />
|
||||
<div>
|
||||
<h2>{{ item.goodsName }}</h2>
|
||||
<p>{{ item.sellingPoint || '' }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
<!-- 商品分类 -->
|
||||
<div class="content-goods-publish">
|
||||
<div class="goods-category">
|
||||
<ul v-if="categoryListLevel1.length > 0">
|
||||
<li v-for="(item, index) in categoryListLevel1" :class="{ activeClass: category[0].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 1)" :key="index">
|
||||
<span>{{ item.name }}</span>
|
||||
<span>></span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="categoryListLevel2.length > 0">
|
||||
<li v-for="(item, index) in categoryListLevel2" :class="{ activeClass: category[1].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 2)" :key="index">
|
||||
<span>{{ item.name }}</span>
|
||||
<span>></span>
|
||||
</li>
|
||||
</ul>
|
||||
<ul v-if="categoryListLevel3.length > 0">
|
||||
<li v-for="(item, index) in categoryListLevel3" :class="{ activeClass: category[2].name === item.name }"
|
||||
@click="handleSelectCategory(item, index, 3)" :key="index">
|
||||
<span>{{ item.name }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p class="current-goods-category">
|
||||
您当前选择的商品类别是:
|
||||
<span>{{ category[0].name }}</span>
|
||||
<span v-show="category[1].name">> {{ category[1].name }}</span>
|
||||
<span v-show="category[2].name">> {{ category[2].name }}</span>
|
||||
</p>
|
||||
<template v-if="selectedTemplate.goodsName">
|
||||
<Divider>已选商品模版:{{selectedTemplate.goodsName}}</Divider>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 底部按钮 -->
|
||||
<div class="footer">
|
||||
<ButtonGroup>
|
||||
<Button type="primary" @click="selectGoodsType = true">商品类型</Button>
|
||||
<Button type="primary" @click="next">下一步</Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import * as API_GOODS from "@/api/goods";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selectedTemplate: {}, // 已选模板
|
||||
selectGoodsType: false, // 展示选择商品分类modal
|
||||
goodsTemplates: [], // 商品模板列表
|
||||
showGoodsTemplates: false, //是否显示选择商品模板
|
||||
goodsTypeWay: [
|
||||
{
|
||||
title: "实物商品",
|
||||
img: require("@/assets/goodsType1.png"),
|
||||
desc: "零售批发,物流配送",
|
||||
type: "PHYSICAL_GOODS",
|
||||
check: false,
|
||||
},
|
||||
{
|
||||
title: "虚拟商品",
|
||||
img: require("@/assets/goodsType2.png"),
|
||||
desc: "虚拟核验,无需物流",
|
||||
type: "VIRTUAL_GOODS",
|
||||
check: false,
|
||||
},
|
||||
{
|
||||
title: "商品模板导入",
|
||||
img: require("@/assets/goodsTypeTpl.png"),
|
||||
desc: "商品模板,一键导入",
|
||||
check: false,
|
||||
},
|
||||
],
|
||||
// 商品分类选择数组
|
||||
category: [
|
||||
{name: '', id: ''},
|
||||
{name: '', id: ''},
|
||||
{name: '', id: ''}
|
||||
],
|
||||
// 商品类型
|
||||
goodsType: '',
|
||||
/** 1级分类列表*/
|
||||
categoryListLevel1: [],
|
||||
/** 2级分类列表*/
|
||||
categoryListLevel2: [],
|
||||
/** 3级分类列表*/
|
||||
categoryListLevel3: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 点击商品类型
|
||||
handleClickGoodsType(val) {
|
||||
this.goodsTypeWay.map((item) => {
|
||||
return (item.check = false);
|
||||
});
|
||||
|
||||
val.check = !val.check;
|
||||
if (!val.type) {
|
||||
this.GET_GoodsTemplate()
|
||||
this.showGoodsTemplates = true;
|
||||
} else {
|
||||
this.goodsType = val.type;
|
||||
this.selectedTemplate = {}
|
||||
}
|
||||
},
|
||||
// 点击商品模板
|
||||
handleClickGoodsTemplate(val) {
|
||||
console.log(val);
|
||||
this.selectedTemplate = val;
|
||||
this.selectGoodsType = false;
|
||||
this.$emit('change', {tempId: val.id})
|
||||
},
|
||||
// 获取商品模板
|
||||
GET_GoodsTemplate() {
|
||||
let searchParams = {
|
||||
saveType: "TEMPLATE",
|
||||
sort: "create_time",
|
||||
order: "desc"
|
||||
};
|
||||
API_GOODS.getDraftGoodsListData(searchParams).then((res) => {
|
||||
if (res.success) {
|
||||
this.goodsTemplates = res.result.records;
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 选择商城商品分类 */
|
||||
handleSelectCategory(row, index, level) {
|
||||
if (level === 1) {
|
||||
this.category.forEach(cate => {
|
||||
cate.name = '',
|
||||
cate.id = ''
|
||||
})
|
||||
this.category[0].name = row.name;
|
||||
this.category[0].id = row.id;
|
||||
this.categoryListLevel2 = this.categoryListLevel1[index].children;
|
||||
this.categoryListLevel3 = [];
|
||||
} else if (level === 2) {
|
||||
this.category[1].name = row.name;
|
||||
this.category[1].id = row.id;
|
||||
this.category[2].name = '';
|
||||
this.category[2].id = '';
|
||||
this.categoryListLevel3 = this.categoryListLevel2[index].children;
|
||||
} else {
|
||||
this.category[2].name = row.name
|
||||
this.category[2].id = row.id
|
||||
}
|
||||
},
|
||||
/** 查询下一级 商城商品分类*/
|
||||
GET_NextLevelCategory(row) {
|
||||
const _id = row && row.id !== 0 ? row.id : 0;
|
||||
API_GOODS.getGoodsCategoryAll().then((res) => {
|
||||
if (res.success && res.result) {
|
||||
this.categoryListLevel1 = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 下一步
|
||||
next() {
|
||||
window.scrollTo(0, 0);
|
||||
if (!this.goodsType && !this.selectedTemplate.goodsName) {
|
||||
this.$Message.error('请选择商品类型')
|
||||
return
|
||||
}
|
||||
if (!this.category[0].name) {
|
||||
this.$Message.error("请选择商品分类");
|
||||
return;
|
||||
} else if (!this.category[2].name) {
|
||||
this.$Message.error("必须选择到三级分类");
|
||||
return;
|
||||
} else if (this.category[2].name) {
|
||||
if (this.selectedTemplate.id) {
|
||||
this.$emit('change',{tempId: this.selectedTemplate.id})
|
||||
} else {
|
||||
this.$emit('change',{category: this.category,goodsType:this.goodsType})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.GET_NextLevelCategory()
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./addGoods.scss";
|
||||
</style>
|
||||
1241
seller/src/views/goods/goods-seller/goodsOperationSec.vue
Normal file
1241
seller/src/views/goods/goods-seller/goodsOperationSec.vue
Normal file
File diff suppressed because it is too large
Load Diff
38
seller/src/views/goods/goods-seller/goodsOperationThird.vue
Normal file
38
seller/src/views/goods/goods-seller/goodsOperationThird.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div class="content-goods-publish">
|
||||
<div class="success" style="text-align: left">
|
||||
<h1>恭喜您,商品发布成功!</h1>
|
||||
<div class="goToGoodsList" @click="gotoGoodsList">
|
||||
<a>去店铺查看商品列表>></a>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<h3>您还可以:</h3>
|
||||
<div>
|
||||
1、继续
|
||||
<a @click="gotoBack">发布商品</a>
|
||||
</div>
|
||||
<div>
|
||||
2、进入卖家中心,管理
|
||||
<a @click="gotoGoodsList">商品列表</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
// 跳转商品列表
|
||||
gotoGoodsList() {
|
||||
this.$router.push({name: "goods"});
|
||||
},
|
||||
// 刷新页面
|
||||
gotoBack() {
|
||||
this.$router.go();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./addGoods.scss";
|
||||
</style>
|
||||
@@ -1,341 +0,0 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
|
||||
<Form
|
||||
ref="searchForm"
|
||||
:model="searchForm"
|
||||
inline
|
||||
:label-width="70"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="商品名称" prop="goodsName">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.goodsName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<span v-if="drop">
|
||||
<Form-item label="状态" prop="status">
|
||||
<Select
|
||||
v-model="searchForm.marketEnable"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option value="DOWN">下架</Option>
|
||||
<Option value="UPPER">上架</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="商品编号" prop="sn">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.sn"
|
||||
placeholder="商品编号"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
</span>
|
||||
<Form-item style="margin-left: -35px" class="br">
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search"
|
||||
>搜索</Button
|
||||
>
|
||||
<Button @click="handleReset">重置</Button>
|
||||
<a class="drop-down" @click="dropDown">
|
||||
{{ dropDownContent }}
|
||||
<Icon :type="dropDownIcon"></Icon>
|
||||
</a>
|
||||
</Form-item>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="operation">
|
||||
<Button @click="addGoods" icon="md-refresh">添加商品</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openSearch = !openSearch">{{
|
||||
openSearch ? "关闭搜索" : "开启搜索"
|
||||
}}</Button>
|
||||
<Button type="dashed" @click="openTip = !openTip">{{
|
||||
openTip ? "关闭提示" : "开启提示"
|
||||
}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择 <span class="select-count">{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10, 20, 50]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
<Modal
|
||||
title="更新库存"
|
||||
v-model="updateStockModalVisible"
|
||||
:mask-closable="false"
|
||||
:width="500"
|
||||
>
|
||||
<Input
|
||||
type="number"
|
||||
v-model="updateStockParam.quantity"
|
||||
/>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="updateStockModalVisible = false"
|
||||
>取消</Button
|
||||
>
|
||||
<Button type="primary" @click="updateStock">更新</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getGoodsListDataByStockSeller,
|
||||
getGoodsSkuListDataSeller,
|
||||
updateGoodsSkuStocks,
|
||||
upGoods,
|
||||
lowGoods,
|
||||
} from "@/api/goods";
|
||||
export default {
|
||||
name: "goods",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
id: "", //要操作的id
|
||||
openSearch: true, // 显示搜索
|
||||
openTip: true, // 显示提示
|
||||
loading: true, // 表单加载状态
|
||||
updateStockModalVisible: false, // 更新库存模态框
|
||||
drop: false, // 搜索栏更多选项
|
||||
dropDownContent: "展开",
|
||||
dropDownIcon: "ios-arrow-down",
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "create_time", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
updateStockParam: { // 更新库存表单
|
||||
id: 0,
|
||||
quantity: 0,
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
goodsName: "",
|
||||
sn: "",
|
||||
marketEnable: "",
|
||||
price: "",
|
||||
sellerName: "",
|
||||
},
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [ // 表格表头
|
||||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center",
|
||||
},
|
||||
|
||||
{
|
||||
title: "商品缩略图",
|
||||
key: "thumbnail",
|
||||
width: 150,
|
||||
align: "center",
|
||||
render: (h, params) => {
|
||||
return h("img", {
|
||||
attrs: {
|
||||
src: params.row.thumbnail,
|
||||
alt: "加载图片失败",
|
||||
},
|
||||
style: {
|
||||
cursor: "pointer",
|
||||
width: "80px",
|
||||
height: "60px",
|
||||
margin: "10px 0",
|
||||
"object-fit": "contain",
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: "商品名称",
|
||||
key: "goodsName",
|
||||
minWidth: 120
|
||||
},
|
||||
|
||||
{
|
||||
title: "库存预警数量",
|
||||
key: "stockWarningNum",
|
||||
minWidth: 120
|
||||
},
|
||||
|
||||
{
|
||||
title: "商品库存",
|
||||
key: "quantity",
|
||||
minWidth: 120
|
||||
},
|
||||
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
width: 200,
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.getUpdateStock(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"库存"
|
||||
)
|
||||
]);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
getUpdateStock(row) {
|
||||
this.updateStockParam = {skuId: row.id, quantity: row.quantity};
|
||||
this.updateStockModalVisible = true;
|
||||
},
|
||||
updateStock() {
|
||||
let updateStockList = [this.updateStockParam];
|
||||
updateGoodsSkuStocks(updateStockList).then(res => {
|
||||
if (res.success) {
|
||||
this.updateStockModalVisible = false;
|
||||
this.$Message.success("更新库存成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
dropDown() {
|
||||
if (this.drop) {
|
||||
this.dropDownContent = "展开";
|
||||
this.dropDownIcon = "ios-arrow-down";
|
||||
} else {
|
||||
this.dropDownContent = "收起";
|
||||
this.dropDownIcon = "ios-arrow-up";
|
||||
}
|
||||
this.drop = !this.drop;
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据
|
||||
getGoodsListDataByStockSeller(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.goodsSkuIPage.records.map(i =>{
|
||||
i.stockWarningNum = res.result.stockWarningNum
|
||||
return i;
|
||||
});
|
||||
this.total = res.result.goodsSkuIPage.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.search {
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
.select-count {
|
||||
font-weight: 600;
|
||||
color: #40a9ff;
|
||||
}
|
||||
.select-clear {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.page {
|
||||
margin-top: 2vh;
|
||||
}
|
||||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -22,7 +22,7 @@ h4 {
|
||||
> div {
|
||||
padding: 0 20px;
|
||||
|
||||
border-left: 1px solid #ededed;
|
||||
// border-left: 1px solid #ededed;
|
||||
> h5 {
|
||||
|
||||
text-align: center;
|
||||
|
||||
@@ -217,11 +217,13 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 跳转页面
|
||||
navigateTo(name) {
|
||||
this.$router.push({
|
||||
name,
|
||||
});
|
||||
},
|
||||
// 初始化数据
|
||||
async init() {
|
||||
let userInfo = JSON.parse(Cookies.get("userInfo"));
|
||||
|
||||
@@ -232,7 +234,7 @@ export default {
|
||||
this.notices = res.result.records;
|
||||
}
|
||||
},
|
||||
|
||||
// 跳转文章页
|
||||
async clickLinkNotices(val) {
|
||||
let res = await seeArticle(val.id);
|
||||
if (res.success) {
|
||||
@@ -240,7 +242,7 @@ export default {
|
||||
this.noticeFlage = true;
|
||||
}
|
||||
},
|
||||
|
||||
// 获取首页数据
|
||||
async getHomeData() {
|
||||
let res = await getSellerHomeData();
|
||||
if (res.success) {
|
||||
|
||||
@@ -32,7 +32,7 @@ export default {
|
||||
},
|
||||
storeId: "", // 店铺id
|
||||
dates: [], // 日期列表
|
||||
params: {
|
||||
params: { // 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
storeName: "",
|
||||
@@ -65,8 +65,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.storeId = JSON.parse(Cookies.get("userInfo")).id;
|
||||
|
||||
|
||||
this.getFiveYears();
|
||||
},
|
||||
methods: {
|
||||
@@ -91,7 +89,7 @@ export default {
|
||||
}
|
||||
this.dates = dates.reverse();
|
||||
},
|
||||
|
||||
// 选择回调
|
||||
changeSelect() {
|
||||
if (this.month) {
|
||||
this.dateList.forEach((res) => {
|
||||
@@ -105,7 +103,7 @@ export default {
|
||||
} else {
|
||||
}
|
||||
},
|
||||
|
||||
// 点击时间筛选
|
||||
clickBreadcrumb(item) {
|
||||
this.dateList.forEach((res) => {
|
||||
res.selected = false;
|
||||
@@ -119,7 +117,6 @@ export default {
|
||||
}
|
||||
|
||||
this.selectedWay = item;
|
||||
// this.month = "";
|
||||
this.selectedWay.year = new Date().getFullYear();
|
||||
this.selectedWay.month = "";
|
||||
|
||||
|
||||
@@ -22,6 +22,11 @@ export default {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
clear() { // 引用该组件的父组件会调用
|
||||
this.data = [];
|
||||
this.selectedWay = [];
|
||||
this.init();
|
||||
},
|
||||
/**
|
||||
* 关闭
|
||||
*/
|
||||
@@ -44,37 +49,69 @@ export default {
|
||||
*/
|
||||
open(val, index) {
|
||||
if (val) {
|
||||
// console.warn(val);
|
||||
//已选中的地址
|
||||
let checkedData = this.$store.state.shipTemplate;
|
||||
|
||||
// console.warn(this.$store.state.shipTemplate);
|
||||
// 禁止选中的地址
|
||||
let checkData = [];
|
||||
let disabledData = checkedData.filter((item, i) => {
|
||||
if (i != index) {
|
||||
return i != index;
|
||||
} else {
|
||||
checkData.push(item);
|
||||
}
|
||||
});
|
||||
// 选中
|
||||
checkData.forEach((check) => {
|
||||
// 循环出已经选中的地址id
|
||||
check.areaId.split(",").forEach((ids) => {
|
||||
this.data.forEach((item) => {
|
||||
// 如果当前省份下市区全部选中则选中该省份
|
||||
if (check.selectedAll) {
|
||||
check.area.split(",").forEach((area) => {
|
||||
if (area == item.name) {
|
||||
this.$set(item, "checked", true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 将市区继续循环
|
||||
item.children.forEach((child, childIndex) => {
|
||||
// 判断当前市区是否是已选中状态
|
||||
if (item.checked) {
|
||||
this.$set(child, "checked", true);
|
||||
}
|
||||
if (child.id == ids) {
|
||||
this.$set(child, "checked", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// 禁用
|
||||
disabledData.forEach((dis) => {
|
||||
console.log(dis)
|
||||
// 循环出已经选中的地址id
|
||||
dis.areaId.split(",").forEach((ids) => {
|
||||
// 循环出省份
|
||||
this.data.forEach((item) => {
|
||||
// 如果当前省份下市区全部选中则选中该省份
|
||||
|
||||
// 如果当前省份下市区全部选中则禁用该省份
|
||||
if (dis.selectedAll) {
|
||||
dis.area.split(",").forEach((area) => {
|
||||
if (area == item.name) {
|
||||
console.log(item.name +"选中")
|
||||
this.$set(item, "disabled", true);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 将市区继续循环
|
||||
item.children.forEach((child, childIndex) => {
|
||||
// 判断当前市区是否是已选中状态
|
||||
// 判断当前市区是否是已禁用状态
|
||||
if (item.disabled) {
|
||||
this.$set(child, "disabled", true);
|
||||
} else {
|
||||
if (child.id == ids) {
|
||||
this.$set(child, "disabled", true);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -136,7 +173,7 @@ export default {
|
||||
|
||||
this.cancel();
|
||||
},
|
||||
|
||||
// 初始化地区数据
|
||||
init() {
|
||||
getAllCity().then((res) => {
|
||||
if (res.result) {
|
||||
|
||||
@@ -29,6 +29,7 @@ export default {
|
||||
|
||||
props: ['addressId'],
|
||||
methods: {
|
||||
// 选择地区回显
|
||||
change(val, selectedData) {
|
||||
/**
|
||||
* @returns [regionId,region]
|
||||
@@ -46,8 +47,7 @@ export default {
|
||||
handleChangeOnSelect(value) {
|
||||
this.changeOnSelect = value;
|
||||
},
|
||||
getArea(val) {
|
||||
},
|
||||
// 动态加载数据
|
||||
loadData(item, callback) {
|
||||
item.loading = true;
|
||||
API_Setup.getChildRegion(item.value).then((res) => {
|
||||
@@ -87,6 +87,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
API_Setup.getChildRegion(this.id).then((res) => {
|
||||
let way = [];
|
||||
@@ -116,5 +117,3 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<div class="login" @click="$refs.verify.show = false">
|
||||
<Row type="flex" @keydown.enter.native="submitLogin">
|
||||
<Col style="width: 368px">
|
||||
<Header />
|
||||
@@ -25,7 +25,6 @@
|
||||
<!-- 拼图验证码 -->
|
||||
<verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify>
|
||||
</Col>
|
||||
<!-- <LangSwitch /> -->
|
||||
</Row>
|
||||
</div>
|
||||
</template>
|
||||
@@ -36,12 +35,10 @@ import { validateMobile } from "@/libs/validate";
|
||||
import Cookies from "js-cookie";
|
||||
import Header from "@/views/main-components/header";
|
||||
import Footer from "@/views/main-components/footer";
|
||||
import LangSwitch from "@/views/main-components/lang-switch";
|
||||
import util from "@/libs/util.js";
|
||||
import verify from "@/views/my-components/verify";
|
||||
export default {
|
||||
components: {
|
||||
LangSwitch,
|
||||
Header,
|
||||
Footer,
|
||||
verify,
|
||||
@@ -128,7 +125,7 @@ export default {
|
||||
// 登录提交
|
||||
this.$refs.usernameLoginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$refs.verify.show = true;
|
||||
this.$refs.verify.init();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -1,360 +0,0 @@
|
||||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch"> </Row>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary" icon="md-add">添加</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openTip = !openTip">{{
|
||||
openTip ? "关闭提示" : "开启提示"
|
||||
}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择 <span class="select-count">{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10, 20, 50]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
:mask-closable="false"
|
||||
:width="500"
|
||||
>
|
||||
<Form ref="form" :model="form" :label-width="120" :rules="formValidate">
|
||||
<FormItem label="物流公司名称" prop="name">
|
||||
<Input v-model="form.name" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="物流公司代码" prop="code">
|
||||
<Input v-model="form.code" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="支持电子面单">
|
||||
<i-switch v-model="form.standBy">
|
||||
<span slot="open">开</span>
|
||||
<span slot="close">关</span>
|
||||
</i-switch>
|
||||
</FormItem>
|
||||
<FormItem label="电子面单表单">
|
||||
<Input v-model="form.formItems" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="禁用状态" prop="disabled">
|
||||
<i-switch v-model="form.disabled">
|
||||
<span slot="open">开</span>
|
||||
<span slot="close">关</span>
|
||||
</i-switch>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交</Button
|
||||
>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getLogisticsPage,
|
||||
updateLogistics,
|
||||
getLogisticsDetail,
|
||||
addLogistics,
|
||||
delLogistics,
|
||||
} from "@/api/logistics";
|
||||
export default {
|
||||
name: "bill",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
openTip: true, // 显示提示
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
name: "",
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
name: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入物流公司名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "物流公司名称",
|
||||
key: "name",
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "disabled",
|
||||
minWidth: 50,
|
||||
render(h, params) {
|
||||
if(params.row.disabled){
|
||||
return h("div", [h("tag", {props: {color: "green"}}, "开启")]);
|
||||
}else{
|
||||
return h("div", [h("tag", {props: {color: "volcano"}}, "关闭")]);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
width: 150,
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.detail(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"修改"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
getLogisticsPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
|
||||
if (this.modalType == 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
|
||||
this.form.disabled
|
||||
? (this.form.disabled = "OPEN")
|
||||
: (this.form.disabled = "CLOSE");
|
||||
addLogistics(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 编辑
|
||||
updateLogistics(this.id, this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
add() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加";
|
||||
this.form = {};
|
||||
this.$refs.form.resetFields();
|
||||
|
||||
this.modalVisible = true;
|
||||
},
|
||||
detail(v) {
|
||||
this.modalType = 1;
|
||||
this.id = v.id;
|
||||
this.modalTitle = "修改";
|
||||
this.modalVisible = true;
|
||||
|
||||
this.form.name = v.name;
|
||||
this.form.code = v.code;
|
||||
this.form.standBy = v.standBy;
|
||||
this.form.formItems = v.formItems;
|
||||
this.form.disabled = v.disabled;
|
||||
this.form.disabled == "OPEN"
|
||||
? (this.form.disabled = true)
|
||||
: (this.form.disabled = false);
|
||||
},
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要删除 " + v.name + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delLogistics(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
// 建议引入通用样式 可删除下面样式代码
|
||||
// @import "@/styles/table-common.scss";
|
||||
.search {
|
||||
.operation {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
||||
.select-count {
|
||||
font-weight: 600;
|
||||
color: #40a9ff;
|
||||
}
|
||||
|
||||
.select-clear {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.page {
|
||||
margin-top: 2vh;
|
||||
}
|
||||
|
||||
.drop-down {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,28 +0,0 @@
|
||||
<template>
|
||||
<Breadcrumb>
|
||||
<BreadcrumbItem
|
||||
v-for="item in currentPath"
|
||||
:to="item.path"
|
||||
:key="item.name"
|
||||
>{{ itemTitle(item) }}</BreadcrumbItem>
|
||||
</Breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'breadcrumbNav',
|
||||
props: {
|
||||
currentPath: Array
|
||||
},
|
||||
methods: {
|
||||
itemTitle (item) {
|
||||
if (typeof item.title == 'object') {
|
||||
return this.$t(item.title.i18n);
|
||||
} else {
|
||||
return item.title;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('terms') }}</a>
|
||||
</Row>
|
||||
<Row type="flex" justify="center" class="copyright">
|
||||
Copyright © 2020 - Present
|
||||
Copyright © {{year}} - Present
|
||||
<a
|
||||
href="https://pickmall.cn/"
|
||||
target="_blank"
|
||||
@@ -18,7 +18,12 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "footer"
|
||||
name: "footer",
|
||||
data() {
|
||||
return {
|
||||
year: new Date().getFullYear() // 年
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<template>
|
||||
<div class="lang-icon">
|
||||
<Dropdown @on-click="langChange">
|
||||
<Icon type="md-globe" size="26"/>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem name="zh-CN">简体中文</DropdownItem>
|
||||
<DropdownItem name="en-US">English</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "langSwitch",
|
||||
methods: {
|
||||
langChange(v) {
|
||||
this.$i18n.locale = v;
|
||||
this.$store.commit("switchLang", v);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lang-icon {
|
||||
position: fixed;
|
||||
top: 2vh;
|
||||
right: 1.5vw;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,6 @@
|
||||
<style lang="scss" scoped>
|
||||
@import "./styles/menu.scss";
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div class="ivu-shrinkable-menu">
|
||||
<!-- 一级菜单 -->
|
||||
@@ -34,12 +33,18 @@ import util from "@/libs/util.js";
|
||||
export default {
|
||||
name: "shrinkableMenu",
|
||||
computed: {
|
||||
// 二级菜单列表
|
||||
menuList() {
|
||||
return this.$store.state.app.menuList;
|
||||
},
|
||||
// 一级菜单
|
||||
navList() {
|
||||
return this.$store.state.app.navList;
|
||||
},
|
||||
// 当前一级菜单
|
||||
currNav() {
|
||||
return this.$store.state.app.currNav;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeMenu(name) { //二级路由点击
|
||||
@@ -47,7 +52,7 @@ export default {
|
||||
name: name
|
||||
});
|
||||
},
|
||||
selectNav(name) {
|
||||
selectNav(name) { // 一级路由点击
|
||||
this.$store.commit("setCurrNav", name);
|
||||
this.setStore("currNav", name);
|
||||
util.initRouter(this);
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
width: 180px;
|
||||
display: flex;
|
||||
}
|
||||
.ivu-menu-vertical .ivu-menu-item-group-title {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.ivu-btn-text:hover {
|
||||
background-color: rgba(255,255,255,.2) !important;
|
||||
}
|
||||
@@ -21,3 +19,8 @@
|
||||
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
|
||||
color: #ed3f14;
|
||||
}
|
||||
/deep/.ivu-menu-vertical .ivu-menu-item-group-title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user