53 Commits
v4.2 ... v4.2.1

Author SHA1 Message Date
mabo
07f41f5cb6 pc商品列表样式修改,商家注释添加,订单统计,退订单按钮样式 2021-07-16 17:57:24 +08:00
mabo
133febe7a7 代码注释添加 2021-07-15 10:19:56 +08:00
mabo
e74c6d9eda Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-07-14 18:01:03 +08:00
mabo
0499a9c237 批量上传、添加注释 2021-07-14 18:00:59 +08:00
pikachu
fbb24fd07f 修复积分字段展示问题 2021-07-13 18:55:20 +08:00
pikachu
0b62cba3b9 修改积分类型字段 2021-07-13 18:46:55 +08:00
mabo
0fd4645514 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
# Conflicts:
#	seller/src/config/index.js
2021-07-13 18:16:10 +08:00
mabo
0e277a8e6d 前端首页下拉样式,头部样式,seller端批量上传 2021-07-13 18:15:32 +08:00
lemon橪
ca8d518fae 修改物流请求 2021-07-12 18:37:42 +08:00
lemon橪
3e3c101a1e 合并方法 2021-07-12 18:19:05 +08:00
lemon橪
c6417cf197 修改商家端物流这块请求方法 2021-07-12 18:18:49 +08:00
mabo
4c0aec2f42 文章分类,订单列表,商品分类,收款记录等页面bug修改 2021-07-09 17:58:31 +08:00
mabo
7331fcbb17 Merge branch 'ma' 2021-07-09 15:21:28 +08:00
mabo
f5faad982c 发布商品代码拆分完成,管理端订单设置修改 2021-07-09 15:04:02 +08:00
mabo
48c0dcb69b bug修改 2021-07-08 14:36:05 +08:00
mabo
0504592f7d 拆分代码 2021-07-08 09:24:42 +08:00
mabo
9ff4197ec4 no message 2021-07-07 17:45:38 +08:00
mabo
c835616ad2 Merge branch 'master' into ma
# Conflicts:
#	buyer/src/components/goodsDetail/ShowGoodsDetail.vue
#	buyer/src/config/index.js
#	seller/src/views/goods/goods-seller/goodsOperation.vue
2021-07-07 16:14:23 +08:00
mabo
e5449213c2 no message 2021-07-07 16:12:55 +08:00
mabo
872a5d1982 左侧菜单选中设置 2021-07-07 16:03:48 +08:00
mabo
1246810c01 bug修改 2021-07-07 15:34:38 +08:00
mabo
fc393ecd64 部分bug修改 2021-07-05 17:53:23 +08:00
mabo
9b9295ea94 拆分发布商品代码 2021-07-05 16:08:12 +08:00
mabo
c403fce786 no message 2021-07-02 18:04:17 +08:00
mabo
31349634f6 Merge branch 'master' into ma
# Conflicts:
#	seller/src/views/goods/goods-seller/goodsOperation.vue
2021-07-02 17:38:14 +08:00
mabo
cc1afed902 分销提现,滑块验证bug修改 2021-07-02 16:45:52 +08:00
mabo
3a76ba2c1f 发布文章图片不回显,发布商品不选类型可以点下一步 2021-07-02 14:26:01 +08:00
mabo
da330b80c8 Merge branch 'master' into ma 2021-07-02 10:33:34 +08:00
mabo
1028b8189e 导出待发货订单 2021-07-02 10:32:15 +08:00
mabo
6988ad8bf0 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-07-02 09:50:28 +08:00
mabo
e318fe5be0 pc首页margin问题 2021-07-02 09:50:25 +08:00
lemon橪
4166a1ca58 合并master 2021-07-02 09:38:07 +08:00
lemon橪
35ea8adf7d 解决配送地址选择不回显bug 2021-07-02 09:37:46 +08:00
mabo
be2280907e 导出待发货订单 2021-07-02 09:10:53 +08:00
mabo
6100f1e39a 商品参数修改 2021-07-01 17:00:52 +08:00
mabo
5368f3c323 发布商品,选择模板后跳到商品编辑页面 2021-07-01 16:32:41 +08:00
mabo
be1a05e566 Revert "no message"
This reverts commit 0a02195ca6.
2021-07-01 16:04:06 +08:00
mabo
0a02195ca6 no message 2021-07-01 16:03:59 +08:00
mabo
6887b6c624 issues上bug修改 2021-07-01 16:02:12 +08:00
mabo
f7167912e7 商品sku只展示一个问题 2021-06-30 17:41:24 +08:00
mabo
14feac43fe Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-06-30 15:51:18 +08:00
mabo
c9e58f3586 修改bug 2021-06-30 15:51:14 +08:00
Chopper
e8809bbeb8 镜像脚本更新 2021-06-30 14:54:24 +08:00
lemon橪
d8b9d81f70 合并master 2021-06-30 14:29:03 +08:00
lemon橪
4340b1a5b7 优化商品分类,隐藏没用的楼层装修弹窗的样式 2021-06-30 14:28:50 +08:00
mabo
950b8a097c bug修改 2021-06-30 09:45:36 +08:00
mabo
72ed363ac3 商品评价,点击查看报错问题 2021-06-29 18:13:58 +08:00
mabo
e493f26442 拆分发布商品代码 2021-06-29 17:53:50 +08:00
mabo
f973cadd80 Merge branch 'master' into ma 2021-06-29 15:29:59 +08:00
mabo
5143f2b83f 添加滑块验证注释 2021-06-29 15:24:16 +08:00
mabo
b728e340a0 Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui 2021-06-29 14:58:10 +08:00
mabo
18bfa0edef 滑块验证优化 2021-06-29 14:58:07 +08:00
mabo
9fbc61f742 拆分商品发布代码 2021-06-29 11:50:37 +08:00
125 changed files with 2948 additions and 4327 deletions

View File

@@ -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 .

View File

@@ -31,7 +31,6 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
#app{ #app{
min-height: 100%;
@include background_color($light_background_color); @include background_color($light_background_color);
} }
</style> </style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -53,6 +53,10 @@ export default {
store: { // 是否为店铺页面 store: { // 是否为店铺页面
type: Boolean, type: Boolean,
default: false default: false
},
hover: {
type: Boolean,
default: false
} }
}, },
data () { data () {
@@ -89,10 +93,14 @@ export default {
} else { } else {
this.logoImg = this.Cookies.getItem('logo') this.logoImg = this.Cookies.getItem('logo')
} }
this.searchData = this.$route.query.keyword this.searchData = this.$route.query.keyword
hotWords({start: 1, end: 5}).then(res => {
if (res.success) this.promotionTags = res.result if (!this.hover) { // 首页顶部固定搜索栏不调用热词接口
}) hotWords({start: 1, end: 5}).then(res => {
if (res.success) this.promotionTags = res.result
})
}
} }
}; };
</script> </script>

View File

@@ -40,7 +40,7 @@
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="copyright"> <div class="copyright">
<p>Copyright © LILI</p> <p>Copyright © {{year}} LILI</p>
</div> </div>
</div> </div>
</footer> </footer>
@@ -58,7 +58,8 @@ export default {
[ '支付方式', '货到付款', '在线支付', '分期付款', '邮局汇款', '公司转账' ], [ '支付方式', '货到付款', '在线支付', '分期付款', '邮局汇款', '公司转账' ],
[ '售后服务', '售后政策', '价格保护', '退款说明', '返修/退换货', '取消订单' ] [ '售后服务', '售后政策', '价格保护', '退款说明', '返修/退换货', '取消订单' ]
], ],
moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'] // 更多链接 moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'], // 更多链接
year: new Date().getFullYear() // 当前年份
}; };
}, },
methods: { methods: {

View File

@@ -29,6 +29,9 @@
{{ skuDetail.goodsName }} {{ skuDetail.goodsName }}
</p> </p>
</div> </div>
<div class="sell-point">
{{skuDetail.sellingPoint}}
</div>
<!-- 限时秒杀 --> <!-- 限时秒杀 -->
<Promotion v-if="promotionMap['SECKILL']" :time="promotionMap['SECKILL'].endTime"></Promotion> <Promotion v-if="promotionMap['SECKILL']" :time="promotionMap['SECKILL'].endTime"></Promotion>
<!-- 商品详细 价格优惠券促销 --> <!-- 商品详细 价格优惠券促销 -->
@@ -84,14 +87,14 @@
</div> </div>
</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"> <div class="item-select-title">
<p>{{ sku.name }}</p> <p>{{ sku.name }}</p>
</div> </div>
<div class="item-select-column"> <div class="item-select-column">
<div class="item-select-row" v-for="(item) in sku.values" :key="item.id"> <div class="item-select-row" v-for="(item) in sku.values" :key="item.value">
<div class="item-select-box" @click="select(index, sku.id, item.id)" <div class="item-select-box" @click="select(index, item.value)"
:class="{ 'item-select-box-active': item.id === currentSelceted[index] }" :class="{ 'item-select-box-active': item.value === currentSelceted[index] }"
> >
<div class="item-select-intro"> <div class="item-select-intro">
<p>{{ item.value }}</p> <p>{{ item.value }}</p>
@@ -111,7 +114,7 @@
<span class="inventory"> 库存{{skuDetail.quantity}}</span> <span class="inventory"> 库存{{skuDetail.quantity}}</span>
</div> </div>
</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"> <div class="item-select-title">
<p>重量</p> <p>重量</p>
</div> </div>
@@ -151,7 +154,7 @@ export default {
count: 1, // 商品数量 count: 1, // 商品数量
imgIndex: 0, // 展示图片下标 imgIndex: 0, // 展示图片下标
currentSelceted: [], // 当前商品sku currentSelceted: [], // 当前商品sku
imgList: this.detail.data.specList[0].specImage || [], // 商品图片列表 imgList: this.detail.data.specList[0].specImage || [{}], // 商品图片列表
skuDetail: this.detail.data, // sku详情 skuDetail: this.detail.data, // sku详情
goodsSpecList: this.detail.specs, // 商品spec goodsSpecList: this.detail.specs, // 商品spec
promotionMap: { // 活动状态 promotionMap: { // 活动状态
@@ -170,14 +173,14 @@ export default {
Promotion Promotion
}, },
methods: { methods: {
select (index, id, valueId) { // 选择规格 select (index, value) { // 选择规格
this.$set(this.currentSelceted, index, valueId); this.$set(this.currentSelceted, index, value);
let selectedSkuId = this.goodsSpecList.find((i) => { let selectedSkuId = this.goodsSpecList.find((i) => {
let matched = true; let matched = true;
let specValues = i.specValues.filter((j) => j.specName !== 'images'); let specValues = i.specValues.filter((j) => j.specName !== 'images');
for (let n = 0; n < specValues.length; n++) { for (let n = 0; n < specValues.length; n++) {
if (specValues[n].specValueId !== this.currentSelceted[n]) { if (specValues[n].specValue !== this.currentSelceted[n]) {
matched = false; matched = false;
return; return;
} }
@@ -267,15 +270,12 @@ export default {
}, },
formatSku (list) { formatSku (list) {
// 格式化数据 // 格式化数据
let arr = [{}]; let arr = [{}];
list.forEach((item, index) => { list.forEach((item, index) => {
item.specValues.forEach((spec, specIndex) => { item.specValues.forEach((spec, specIndex) => {
let id = spec.specNameId;
let name = spec.specName; let name = spec.specName;
let values = { let values = {
id: spec.specValueId,
value: spec.specValue, value: spec.specValue,
quantity: item.quantity quantity: item.quantity
}; };
@@ -287,7 +287,7 @@ export default {
if ( if (
arrItem.name === name && arrItem.name === name &&
arrItem.values && arrItem.values &&
!arrItem.values.find((i) => i.id === values.id) !arrItem.values.find((i) => i.value === values.value)
) { ) {
arrItem.values.push(values); arrItem.values.push(values);
} }
@@ -297,7 +297,6 @@ export default {
}); });
if (!keys.includes(name)) { if (!keys.includes(name)) {
arr.push({ arr.push({
id: id,
name: name, name: name,
values: [values] values: [values]
}); });
@@ -312,7 +311,7 @@ export default {
if (cur) { if (cur) {
cur.specValues.filter((i) => i.specName !== 'images') cur.specValues.filter((i) => i.specName !== 'images')
.forEach((value, _index) => { .forEach((value, _index) => {
this.currentSelceted[_index] = value.specValueId; this.currentSelceted[_index] = value.specValue;
}); });
} }
this.skuList = list; this.skuList = list;
@@ -659,5 +658,10 @@ export default {
} }
} }
} }
.sell-point {
font-size: 12px;
color: red;
margin-bottom: 5px;
}
/******************商品图片及购买详情结束******************/ /******************商品图片及购买详情结束******************/
</style> </style>

View File

@@ -87,12 +87,17 @@
</div> </div>
</TabPane> </TabPane>
<TabPane label="商品参数"> <TabPane label="商品参数">
<table class="mt_10" border="1" cellpadding='0' cellspacing="0" v-if="skuDetail.goodsParamsList && skuDetail.length"> <template v-if="detail.goodsParamsDTOList && detail.goodsParamsDTOList.length">
<tr v-for="param in skuDetail.goodsParamsList" :key="param"> <div class="goods-params" v-for="item in detail.goodsParamsDTOList" :key="item.groupId">
<td>{{param.paramName}}</td><td>{{param.paramValue}}</td> <span class="ml_10">{{item.groupName}}</span>
</tr> <table class="mb_10" cellpadding='0' cellspacing="0" >
</table> <tr v-for="param in item.goodsParamsItemDTOList" :key="param.paramId">
<!-- <div v-else>暂无商品参数</div> --> <td style="text-align: center">{{param.paramName}}</td><td>{{param.paramValue}}</td>
</tr>
</table>
</div>
</template>
<div v-else>暂无商品参数</div>
</TabPane> </TabPane>
</Tabs> </Tabs>
</div> </div>
@@ -131,7 +136,7 @@ export default {
} }
}, },
methods: { methods: {
changeHeight (name) { // 设置商品详情高度 changeHeight (name) { // 设置商品详情高度
let heightCss = window.getComputedStyle(this.$refs[name]).height; let heightCss = window.getComputedStyle(this.$refs[name]).height;
heightCss = parseInt(heightCss.substr(0, heightCss.length - 2)) + 89; heightCss = parseInt(heightCss.substr(0, heightCss.length - 2)) + 89;
this.$refs.itemIntroDetail.style.height = heightCss + 'px'; this.$refs.itemIntroDetail.style.height = heightCss + 'px';
@@ -217,7 +222,7 @@ export default {
}); });
window.addEventListener('scroll', this.handleScroll) window.addEventListener('scroll', this.handleScroll)
this.getList(); this.getList();
}, }
}; };
</script> </script>
@@ -484,17 +489,27 @@ export default {
color: $theme_color; color: $theme_color;
} }
table{ table{
border-color: #eee; border-color:#efefef;
color: #999; color: #999;
width: 70%; min-width: 30%;
margin-left: 10px; margin-left: 30px;
font-size: 12px;
tr{ tr{
td:nth-child(1){ td:nth-child(1){
width: 200px; width: 100px;
}
td:nth-child(2){
padding-left: 20px;
} }
} }
td{ td{
padding: 5px; padding: 6px;
} }
} }
.goods-params {
display: flex;
border-bottom: 1px solid #eee;
margin-left: 30px;
span{color:#999}
}
</style> </style>

View File

@@ -2,37 +2,33 @@
<div class="box"> <div class="box">
<div class="nav"> <div class="nav">
<ul class="location"> <ul class="location">
<li>
<router-link to="/" v-if="$route.path !== '/'" class="home-page">
<Icon type="md-home" />首页
</router-link>
</li>
</ul> </ul>
<ul class="detail"> <ul class="detail">
<li class="first" v-show="!userInfo.username"> <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)}`"> <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> </router-link>
</li> </li>
<li v-show="!!userInfo.username"> <li v-show="!!userInfo.username">
<Dropdown> <div class="username-p">
<p class="username-p"> <p>
<Avatar class="person-icon" :src="userInfo.face" icon="person" size="small" /> <Avatar class="person-icon" :src="userInfo.face" icon="person" size="small" />
<span class="username">{{ userInfo.nickName? userInfo.nickName : userInfo.username | secrecyMobile }}</span> <span class="username">{{ userInfo.nickName? userInfo.nickName : userInfo.username | secrecyMobile }}</span>
</p> </p>
<DropdownMenu slot="list"> <transition name='fade'>
<div class="my-page"> <ul class="drop-items">
<div class="my-info" @click="myInfo"> <li @click="goUserCenter('/home')">我的主页</li>
<Icon type="md-home"></Icon> <li @click="goUserCenter('/home/Coupons')">优惠券</li>
<p>我的主页</p> <li @click="goUserCenter('/home/Favorites')">我的收藏</li>
</div> <li @click="signOutFun">退出登录</li>
<div class="sign-out" @click="signOutFun"> </ul>
<Icon type="md-exit"></Icon> </transition>
<p>退出登录</p> </div>
</div>
</div>
</DropdownMenu>
</Dropdown>
</li> </li>
<li @click="goUserCenter('/home/MyOrder')"><span class="nav-item hover-color">我的订单</span></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> <li @click="goUserCenter('/home/MyTracks')"><span class="nav-item hover-color">我的足迹</span></li>
@@ -95,28 +91,28 @@
</template> </template>
<script> <script>
import storage from "@/plugins/storage.js"; import storage from '@/plugins/storage.js';
import { cartGoodsAll } from "@/api/cart.js"; import { cartGoodsAll } from '@/api/cart.js';
export default { export default {
name: "M-Header", name: 'M-Header',
created() { created () {
if (storage.getItem("userInfo")) { if (storage.getItem('userInfo')) {
this.userInfo = JSON.parse(storage.getItem("userInfo")); this.userInfo = JSON.parse(storage.getItem('userInfo'));
} }
}, },
data() { data () {
return { return {
// 主题颜色切换 // 主题颜色切换
themeType: "light", themeType: 'light',
userInfo: {}, // 用户信息 userInfo: {}, // 用户信息
shoppingCart: [], // 购物车 shoppingCart: [] // 购物车
}; };
}, },
computed: { computed: {
cartNum() { cartNum () {
return this.$store.state.cartNum; return this.$store.state.cartNum;
}, }
}, },
methods: { methods: {
changeCity (city) { // 选择所在城市 changeCity (city) { // 选择所在城市
@@ -124,15 +120,15 @@ export default {
}, },
goToPay () { // 跳转购物车 goToPay () { // 跳转购物车
let url = this.$router.resolve({ let url = this.$router.resolve({
path: "/cart", path: '/cart'
}); });
window.open(url.href, "_blank"); window.open(url.href, '_blank');
}, },
myInfo () { // 跳转会员中心 myInfo () { // 跳转会员中心
let url = this.$router.resolve({ let url = this.$router.resolve({
path: "/home", path: '/home'
}); });
window.open(url.href, "_blank"); window.open(url.href, '_blank');
}, },
signOutFun () { // 退出登录 signOutFun () { // 退出登录
storage.removeItem('accessToken'); storage.removeItem('accessToken');
@@ -142,51 +138,51 @@ export default {
this.$store.commit('SET_CARTNUM', 0) this.$store.commit('SET_CARTNUM', 0)
this.$router.push('/login'); this.$router.push('/login');
}, },
goUserCenter(path) { goUserCenter (path) {
// 跳转我的订单,我的足迹 // 跳转我的订单,我的足迹
if (this.userInfo.username) { if (this.userInfo.username) {
this.$router.push({ path: path }); this.$router.push({ path: path });
} else { } else {
this.$Modal.confirm({ this.$Modal.confirm({
title: "请登录", title: '请登录',
content: "<p>请登录后执行此操作</p>", content: '<p>请登录后执行此操作</p>',
okText: "立即登录", okText: '立即登录',
cancelText: "继续浏览", cancelText: '继续浏览',
onOk: () => { onOk: () => {
this.$router.push({ this.$router.push({
path: "/login", path: '/login',
query: { query: {
rePath: this.$router.history.current.path, rePath: this.$router.history.current.path,
query: JSON.stringify(this.$router.history.current.query), query: JSON.stringify(this.$router.history.current.query)
}, }
}); });
}, }
}); });
} }
}, },
shopEntry() { shopEntry () {
// 店铺入驻 // 店铺入驻
if (storage.getItem("accessToken")) { if (storage.getItem('accessToken')) {
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: "/shopEntry", path: '/shopEntry',
query: { id: 1 }, query: { id: 1 }
}); });
window.open(routeUrl.href, "_blank"); window.open(routeUrl.href, '_blank');
} else { } else {
this.$router.push("login"); this.$router.push('login');
} }
}, },
getCartList() { getCartList () {
// 获取购物车列表 // 获取购物车列表
if (this.userInfo.username) { if (this.userInfo.username) {
cartGoodsAll().then((res) => { cartGoodsAll().then((res) => {
this.shoppingCart = res.result.skuList; this.shoppingCart = res.result.skuList;
this.$store.commit("SET_CARTNUM", this.shoppingCart.length); this.$store.commit('SET_CARTNUM', this.shoppingCart.length);
this.Cookies.setItem("cartNum", this.shoppingCart.length); this.Cookies.setItem('cartNum', this.shoppingCart.length);
}); });
} }
}, }
}, }
}; };
</script> </script>
@@ -201,12 +197,10 @@ export default {
.shopping-cart-null span { .shopping-cart-null span {
@include sub_color($light_sub_color); @include sub_color($light_sub_color);
} }
.tipsLogin {
color: $theme_color;
}
.box { .box {
width: 100%; width: 100%;
font-size: 12px!important;
// height: 35px; // height: 35px;
@include background_color($light_white_background_color); @include background_color($light_white_background_color);
} }
@@ -222,7 +216,7 @@ export default {
} }
.nav li { .nav li {
float: left; float: left;
font-size: 14px; font-size: 12px;
line-height: 35px; line-height: 35px;
margin-right: 10px; margin-right: 10px;
font-weight: bold; font-weight: bold;
@@ -230,7 +224,7 @@ export default {
.nav a, .nav a,
.nav-item { .nav-item {
text-decoration: none; text-decoration: none;
padding-left: 10px; padding-left: 14px;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
color: #999; color: #999;
cursor: pointer; cursor: pointer;
@@ -324,8 +318,67 @@ export default {
line-height: 16px; line-height: 16px;
} }
.username-p { .username-p {
cursor: pointer; 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 { .my-page {
padding: 3px 5px; padding: 3px 5px;
width: 180px; width: 180px;

View File

@@ -1,8 +1,8 @@
<template> <template>
<div class="scroll-show"> <div class="scroll-show">
<div class="content clearfix"> <div class="content clearfix">
<cateNav class="cate" :showNavBar="false"></cateNav> <cateNav class="cate" :hover="true" :showNavBar="false"></cateNav>
<Search class="search-con" :showLogo="false" :showTag="false"></Search> <Search class="search-con" :hover="true" :showLogo="false" :showTag="false"></Search>
<Icon type="ios-cart-outline" @click="goCartList" class="cart-icon" @mouseenter.native="getCartList" /> <Icon type="ios-cart-outline" @click="goCartList" class="cart-icon" @mouseenter.native="getCartList" />
<i class="cart-badge">{{cartNum < 100 ? cartNum : '99'}}</i> <i class="cart-badge">{{cartNum < 100 ? cartNum : '99'}}</i>
</div> </div>

View File

@@ -27,7 +27,7 @@ export default {
.model-content { .model-content {
width: 1200px; width: 1200px;
margin: 0 auto; margin: 0 auto;
background: #fff; // background: #fff;
min-height: 1200px; min-height: 1200px;
} }
</style> </style>

View File

@@ -2,11 +2,11 @@
<div class="model-item" v-if="element && element.key"> <div class="model-item" v-if="element && element.key">
<!-- 轮播图模块包括个人信息快捷导航模块 --> <!-- 轮播图模块包括个人信息快捷导航模块 -->
<template v-if="element.type == 'carousel'"> <template v-if="element.type == 'carousel'">
<model-carousel :data="element"></model-carousel> <model-carousel :data="element" class="mb_20"></model-carousel>
</template> </template>
<!-- 热门广告 --> <!-- 热门广告 -->
<template v-if="element.type == 'hotAdvert'"> <template v-if="element.type == 'hotAdvert'">
<div> <div class="mb_20">
<img <img
style="display: block" style="display: block"
class="hover-pointer" class="hover-pointer"
@@ -36,7 +36,7 @@
<!-- 折扣广告 --> <!-- 折扣广告 -->
<template v-if="element.type == 'discountAdvert'"> <template v-if="element.type == 'discountAdvert'">
<div <div
class="discountAdvert" class="discountAdvert mb_20"
:style="{ :style="{
'background-image': 'url(' + element.options.bgImg.img + ')', 'background-image': 'url(' + element.options.bgImg.img + ')',
}" }"
@@ -66,28 +66,28 @@
<!-- 好货推荐 --> <!-- 好货推荐 -->
<template v-if="element.type == 'recommend'"> <template v-if="element.type == 'recommend'">
<recommend :data="element"></recommend> <recommend :data="element" class="mb_20"></recommend>
</template> </template>
<!-- 新品排行 --> <!-- 新品排行 -->
<template v-if="element.type == 'newGoodsSort'"> <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>
<!-- 首页广告 --> <!-- 首页广告 -->
<template v-if="element.type == 'firstAdvert'"> <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>
<!-- 横幅广告 --> <!-- 横幅广告 -->
<template v-if="element.type == 'bannerAdvert'"> <template v-if="element.type == 'bannerAdvert'">
<img <img
width="1200" width="1200"
class="hover-pointer" class="hover-pointer mb_20"
@click="linkTo(element.options.url)" @click="linkTo(element.options.url)"
:src="element.options.img" :src="element.options.img"
alt="" alt=""
/> />
</template> </template>
<template v-if="element.type == 'notEnough'"> <template v-if="element.type == 'notEnough'">
<not-enough :data="element"></not-enough> <not-enough :data="element" class="mb_20"></not-enough>
</template> </template>
</div> </div>
</template> </template>
@@ -122,23 +122,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.model-item { .model-item {
position: relative; position: relative;
margin-bottom: 20px; background-color: #fff;
&:hover {
.del-btn {
display: block;
}
}
}
.del-btn {
width: 100px;
height: 100px;
display: none;
position: absolute;
right: -100px;
top: 0;
&:hover {
display: block;
}
} }
/** 热门广告 */ /** 热门广告 */
@@ -299,4 +283,3 @@ export default {
} }
} }
</style> </style>

View File

@@ -31,7 +31,7 @@ export default {
return { return {
options: this.data.options // 装修数据 options: this.data.options // 装修数据
}; };
}, }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -189,7 +189,6 @@ export default {
selectedItem: { selectedItem: {
// 监听已选条件,来调用列表接口 // 监听已选条件,来调用列表接口
handler (val) { handler (val) {
console.log(val);
let classification = []; let classification = [];
this.params.brandId = '' this.params.brandId = ''
this.params.prop = '' this.params.prop = ''
@@ -248,7 +247,7 @@ export default {
this.$set(this.tabBar, 'second', second) this.$set(this.tabBar, 'second', second)
} }
}, },
cateClick (item, index) { // 点选分类 cateClick (item, index) { // 点选分类
switch (index) { switch (index) {
case 1: case 1:
this.$router.push({ this.$router.push({
@@ -636,7 +635,8 @@ export default {
> div:first-child { > div:first-child {
width: 100px; width: 100px;
background: #eee; background: #eee;
padding: 10px 0 0 10px; padding-left: 10px;
line-height: 30px;
} }
> div:last-child { > div:last-child {
width: 1100px; width: 1100px;

View File

@@ -73,6 +73,10 @@ export default {
showNavBar: { // 显示全部商品分类右侧导航条 showNavBar: { // 显示全部商品分类右侧导航条
default: true, default: true,
type: Boolean type: Boolean
},
hover: {
default: false,
type: Boolean
} }
}, },
data () { data () {
@@ -90,6 +94,7 @@ export default {
}, },
methods: { methods: {
getCate () { // 获取分类数据 getCate () { // 获取分类数据
if (this.hover) return false;
getCategory(0).then(res => { getCategory(0).then(res => {
if (res.success) { if (res.success) {
this.cateList = res.result; this.cateList = res.result;

View File

@@ -1,9 +1,9 @@
<template> <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'}"> <div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
<img :src="data.backImage" style="width:100%;height:100%" alt=""> <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=""> <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>
<div class="handle" :style="{width:data.originalWidth+'px'}"> <div class="handle" :style="{width:data.originalWidth+'px'}">
<span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span> <span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span>
@@ -18,6 +18,7 @@
import { getVerifyImg, postVerifyImg } from './verify.js'; import { getVerifyImg, postVerifyImg } from './verify.js';
export default { export default {
props: { props: {
// 传入数据,判断是登录、注册、修改密码
verifyType: { verifyType: {
defalut: 'LOGIN', defalut: 'LOGIN',
type: String type: String
@@ -38,16 +39,18 @@ export default {
distance: 0, // 拼图移动距离 distance: 0, // 拼图移动距离
flag: false, // 判断滑块是否按下 flag: false, // 判断滑块是否按下
downX: 0, // 鼠标按下位置 downX: 0, // 鼠标按下位置
bgColor: 'aqua', // 滑动背景颜色 bgColor: '#04ad11', // 滑动背景颜色
verifyText: '拖动滑块解锁' // 文字提示 verifyText: '拖动滑块解锁' // 文字提示
}; };
}, },
methods: { methods: {
mouseDown (e) { // 鼠标按下操作, // 鼠标按下事件,开始拖动滑块
mouseDown (e) {
this.downX = e.clientX; this.downX = e.clientX;
this.flag = true; this.flag = true;
}, },
mouseMove (e) { // 鼠标移动 // 鼠标移动事件,计算距离
mouseMove (e) {
if (this.flag) { if (this.flag) {
let offset = e.clientX - this.downX; let offset = e.clientX - this.downX;
@@ -60,7 +63,8 @@ export default {
} }
} }
}, },
mouseUp () { // 鼠标抬起 // 鼠标抬起事件,验证是否正确
mouseUp () {
if (!this.flag) return false; if (!this.flag) return false;
this.flag = false; this.flag = false;
let params = { let params = {
@@ -68,48 +72,50 @@ export default {
xPos: this.distance xPos: this.distance
}; };
postVerifyImg(params).then(res => { postVerifyImg(params).then(res => {
if (res.result) { if (res.success) {
this.bgColor = 'green'; if (res.result) {
this.verifyText = '解锁成功'; this.bgColor = 'green';
this.$emit('change', { status: true, distance: this.distance }); this.verifyText = '解锁成功';
this.$emit('change', { status: true, distance: this.distance });
} else {
this.bgColor = 'red';
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.init();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
}
} else { } else {
this.bgColor = 'red'; this.init()
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.refresh();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
} }
}).catch(()=>{
this.init()
}); });
}, },
refresh () { // 刷新验证图片 init () { // 初始化数据
this.flag = false; this.flag = false;
this.downX = 0; this.downX = 0;
this.distance = 0; this.distance = 0;
this.bgColor = 'aqua'; this.bgColor = '#04ad11';
this.verifyText = '拖动滑块解锁'; this.verifyText = '拖动滑块解锁';
this.getImg();
},
getImg () { // 获取验证图片
getVerifyImg(this.type).then(res => { getVerifyImg(this.type).then(res => {
this.data = res.result; if (res.result) {
this.data = res.result;
this.show = true;
} else {
this.$Message.warning('请求失败请重试!')
}
}); });
} }
}, },
created () {
// this.getImg();
},
watch: { watch: {
verifyType: { verifyType: {
immediate: true, immediate: true,
handler: function (v) { handler: function (v) {
this.type = v; this.type = v;
// this.refresh();
} }
},
show (v) {
if (v) this.refresh();
} }
} }
}; };
@@ -143,7 +149,7 @@ export default {
} }
} }
.handle { .handle {
border: 1px solid rgb(134, 134, 134); border: 1px solid #e4dede;
margin-top: 5px; margin-top: 5px;
height: 42px; height: 42px;
background: #ddd; background: #ddd;
@@ -156,7 +162,7 @@ export default {
width: 40px; width: 40px;
height: 40px; height: 40px;
opacity: 0.5; opacity: 0.5;
background: aqua; background: #04ad11;
} }
.swiper { .swiper {

View File

@@ -17,15 +17,15 @@ export default {
* @description api请求基础路径 * @description api请求基础路径
*/ */
api_dev: { api_dev: {
common: 'http://192.168.0.100:8890', // common: 'http://192.168.0.106:8890',
buyer: 'http://192.168.0.100:8888', // buyer: 'http://192.168.0.106:8888',
seller: 'http://192.168.0.100:8889', // seller: 'http://192.168.0.106:8889',
manager: 'http://192.168.0.100:8887' // manager: 'http://192.168.0.106:8887'
// common: 'https://common-api.pickmall.cn', common: 'https://common-api.pickmall.cn',
// buyer: 'https://buyer-api.pickmall.cn', buyer: 'https://buyer-api.pickmall.cn',
// seller: 'https://store-api.pickmall.cn', seller: 'https://store-api.pickmall.cn',
// manager: 'https://admin-api.pickmall.cn' manager: 'https://admin-api.pickmall.cn'
}, },
api_prod: { api_prod: {
common: 'https://common-api.pickmall.cn', common: 'https://common-api.pickmall.cn',

View File

@@ -32,7 +32,11 @@ router.afterEach(route => {
Vue.prototype.linkTo = function (url) { Vue.prototype.linkTo = function (url) {
if (url.substr(0, 1) === '/') { // 非外部链接没有origin只有路由地址 if (url.substr(0, 1) === '/') { // 非外部链接没有origin只有路由地址
window.open(location.origin + url, '_blank'); if (router.mode === 'hash') {
window.open(location.origin + '/#' + url, '_blank');
} else {
window.open(location.origin + url, '_blank');
}
} else { // 外部链接完整的url地址 } else { // 外部链接完整的url地址
window.open(url, '_blank') window.open(url, '_blank')
} }

View File

@@ -77,7 +77,6 @@ export default {
name: cateName[index] name: cateName[index]
}); });
}); });
console.log(cateArr);
this.categoryBar = cateArr; this.categoryBar = cateArr;
this.goodsMsg = res.result; this.goodsMsg = res.result;
// 判断是否收藏 // 判断是否收藏

View File

@@ -69,7 +69,7 @@
>人评价 >人评价
</div> </div>
<div class="goods-show-seller"> <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> </div>
</div> </div>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="login" @keyup.enter="handleSubmit('formInline')"> <div class="login" @keyup.enter="handleSubmit('formInline')">
<!-- 顶部logo --> <!-- 顶部logo -->
<div class="top-content"> <div class="top-content" @click='$refs.verify.show = false'>
<div class="logo-box"> <div class="logo-box">
<img <img
:src="logoImg" :src="logoImg"
@@ -15,7 +15,7 @@
<!-- 轮播 --> <!-- 轮播 -->
<Carousel loop :autoplay-speed="5000" class="login-carousel" arrow="never"> <Carousel loop :autoplay-speed="5000" class="login-carousel" arrow="never">
<CarouselItem> <CarouselItem>
<div class="demo-carousel"> <div class="demo-carousel" @click='$refs.verify.show = false'>
<img <img
src="https://wanmi-b2b.oss-cn-shanghai.aliyuncs.com/201811141632252680" src="https://wanmi-b2b.oss-cn-shanghai.aliyuncs.com/201811141632252680"
/> />
@@ -23,7 +23,7 @@
</CarouselItem> </CarouselItem>
</Carousel> </Carousel>
<!-- 登录模块 --> <!-- 登录模块 -->
<div class="form-box"> <div class="form-box" @click='$refs.verify.show = false'>
<div class="account-number"> <div class="account-number">
<div class="tab-switch"> <div class="tab-switch">
<span>{{type?'账号登录':'验证码登录'}}</span> <span>{{type?'账号登录':'验证码登录'}}</span>
@@ -37,6 +37,7 @@
:model="formData" :model="formData"
:rules="ruleInline" :rules="ruleInline"
v-show="type === true" v-show="type === true"
@click.self='$refs.verify.show = false'
> >
<FormItem prop="username"> <FormItem prop="username">
<i-input <i-input
@@ -72,6 +73,7 @@
:model="formSms" :model="formSms"
:rules="ruleInline" :rules="ruleInline"
v-show="type === false" v-show="type === false"
@click.self='$refs.verify.show = false'
> >
<FormItem prop="mobile"> <FormItem prop="mobile">
<i-input <i-input
@@ -194,7 +196,7 @@ export default {
this.$refs[name].validate((valid) => { this.$refs[name].validate((valid) => {
if (valid) { if (valid) {
if (this.type) { if (this.type) {
this.$refs.verify.show = true; this.$refs.verify.init();
} else { } else {
let data = JSON.parse(JSON.stringify(this.formSms)); let data = JSON.parse(JSON.stringify(this.formSms));
apiLogin.smsLogin(data).then((res) => { apiLogin.smsLogin(data).then((res) => {
@@ -224,6 +226,7 @@ export default {
} }
}); });
}, },
// 发送手机验证码
sendCode () { sendCode () {
if (this.time === 60) { if (this.time === 60) {
if (this.formSms.mobile === '') { if (this.formSms.mobile === '') {
@@ -296,9 +299,10 @@ export default {
this.$refs.verify.show = false; this.$refs.verify.show = false;
} }
}, },
// 开启滑块验证
verifyBtnClick () { verifyBtnClick () {
if (!this.verifyStatus) { if (!this.verifyStatus) {
this.$refs.verify.show = true; this.$refs.verify.init();
} }
}, },
handleWebLogin (type) { // 第三方登录 handleWebLogin (type) { // 第三方登录

View File

@@ -18,10 +18,16 @@
</div> </div>
</div> </div>
<div class="store-category"> <div class="store-category">
<ul> <ul class="cate-list">
<li @click="searchByCate({id:'', labelName: '店铺推荐'})">首页</li> <li class="cate-item" @click="searchByCate({id:'', labelName: '店铺推荐'})">首页</li>
<li v-for="(cate, index) in cateList" :key="index" @click="searchByCate(cate)"> <li class="cate-item" v-for="(cate, index) in cateList" :key="index" >
{{cate.labelName}} <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> </li>
</ul> </ul>
</div> </div>
@@ -97,13 +103,6 @@ export default {
this.getGoodsList() this.getGoodsList()
}, },
mounted () { mounted () {
if (this.Cookies.getItem('userInfo')) {
isCollection('STORE', this.soterMsg.storeId).then(res => {
if (res.success && res.result) {
this.storeCollected = true;
}
})
}
}, },
methods: { methods: {
getStoreMsg () { // 店铺信息 getStoreMsg () { // 店铺信息
@@ -111,6 +110,13 @@ export default {
if (res.success) { if (res.success) {
this.storeMsg = res.result this.storeMsg = res.result
document.title = this.storeMsg.storeName 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 { .store-category {
background-color: #005aa0; background-color: #005aa0;
color: #fff; color: #fff;
ul{ .cate-list{
width: 1200px; width: 1200px;
margin: 0 auto 10px; margin: 0 auto ;
padding: 3px 0; clear: left;
display: flex; height: 30px;
li { line-height: 30px;
.cate-item {
margin-right: 25px; margin-right: 25px;
float: left;
} }
li:hover{ .cate-item:hover{
cursor: pointer; cursor: pointer;
} }
} }

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="login"> <div class="sign-up" @click='$refs.verify.show = false'>
<div style="height:50px;"></div> <div style="height:50px;"></div>
<div class="logo-box"> <div class="logo-box">
<img <img
@@ -202,20 +202,19 @@ export default {
}, },
verifyBtnClick () { verifyBtnClick () {
if (!this.verifyStatus) { if (!this.verifyStatus) {
this.$refs.verify.show = true; this.$refs.verify.init();
} }
} }
}, },
mounted () { mounted () {
this.$refs.formRegist.resetFields(); this.$refs.formRegist.resetFields();
this.logoImg = this.Cookies.getItem('logo') this.logoImg = this.Cookies.getItem('logo')
}, console.log(window.innerHeight);
watch: { document.querySelector('.sign-up').style.height = window.innerHeight + 'px'
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.logo-box { .logo-box {
width: 600px; width: 600px;
height: 80px; height: 80px;

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="login"> <div class="forget-password" @click='$refs.verify.show = false'>
<div style="height:50px;"></div> <div style="height:50px;"></div>
<!-- 顶部logo --> <!-- 顶部logo -->
<div class="logo-box"> <div class="logo-box">
@@ -97,7 +97,7 @@
<a class="item" href="https://pickmall.cn/" target="_blank">条款</a> <a class="item" href="https://pickmall.cn/" target="_blank">条款</a>
</Row> </Row>
<Row type="flex" justify="center" class="copyright"> <Row type="flex" justify="center" class="copyright">
Copyright © 2020 - Present Copyright © {{year}} - Present
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px" <a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
>lili-shop</a >lili-shop</a
> >
@@ -130,6 +130,7 @@ export default {
password: '', password: '',
oncePasd: '' oncePasd: ''
}, },
year: new Date().getFullYear(), // 当前年份
step: 0, // 步骤 step: 0, // 步骤
ruleInline: { ruleInline: {
// 验证规则 // 验证规则
@@ -236,7 +237,7 @@ export default {
}, },
verifyBtnClick () { verifyBtnClick () {
if (!this.verifyStatus) { if (!this.verifyStatus) {
this.$refs.verify.show = true; this.$refs.verify.init();
} }
} }
}, },
@@ -248,7 +249,11 @@ export default {
} }
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.forget-password{
height: 100%;
}
.logo-box { .logo-box {
width: 600px; width: 600px;
height: 80px; height: 80px;

View File

@@ -5,11 +5,8 @@
<div v-if="list.length"> <div v-if="list.length">
<template v-for="(item) in list"> <template v-for="(item) in list">
<div class="goodsItem" :key="item.skuId"> <div class="goodsItem" :key="item.skuId">
<div class="goodsImg hover-pointer"> <div class="goodsImg hover-pointer" v-if="params.type === 'GOODS'">
<img <img :src="item.image" />
:src="params.type === 'GOODS'? item.image : item.logo"
alt=""
/>
</div> </div>
<div class="goodsTitle hover-pointer"> <div class="goodsTitle hover-pointer">
{{params.type === 'GOODS'? item.goodsName : item.storeName}} {{params.type === 'GOODS'? item.goodsName : item.storeName}}

View File

@@ -84,7 +84,9 @@ export default {
params: { // 请求参数 params: { // 请求参数
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
keywords: '' keywords: '',
sort: 'createTime',
order: 'desc'
}, },
// 状态数组 // 状态数组
afterSaleStatusList, afterSaleStatusList,

View File

@@ -55,8 +55,8 @@
>{{ goods.goodsPrice | unitPrice("¥") }} </span >{{ goods.goodsPrice | unitPrice("¥") }} </span
>x {{ goods.num }} >x {{ goods.num }}
</div> </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.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)" size="small" style="position:relative;top:-22px;left:110px">投诉</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> </div>
</div> </div>

View File

@@ -1,9 +1,10 @@
<template> <template>
<div class="order-detail" v-if="order.order"> <div class="order-detail" v-if="order.order">
<card _Title="订单详情" :_Size="16"></card> <card _Title="订单详情" :_Size="16"></card>
<p class="verificationCode" v-if="order.order.verificationCode">核验码<span>{{order.order.verificationCode}}</span></p>
<div class="order-card"> <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 fontsize_18">{{ order.orderStatusValue }}</p>
<p class="global_color">订单号{{ order.order.sn }}</p> <p>订单号{{ order.order.sn }}</p>
<div style="color:#999;" class="operation-time">操作时间{{order.order.updateTime}}</div> <div style="color:#999;" class="operation-time">操作时间{{order.order.updateTime}}</div>
<Steps class="progress" :current="progressList.length" direction="vertical"> <Steps class="progress" :current="progressList.length" direction="vertical">
<Step <Step
@@ -25,7 +26,7 @@
<p>支付方式{{order.paymentMethodValue}}</p> <p>支付方式{{order.paymentMethodValue}}</p>
<p>付款状态{{order.payStatusValue}}</p> <p>付款状态{{order.payStatusValue}}</p>
</div> </div>
<div class="order-card"> <div class="order-card" v-if="!order.order.verificationCode">
<h3>配送信息</h3> <h3>配送信息</h3>
<p>配送方式{{order.deliveryMethodValue}}</p> <p>配送方式{{order.deliveryMethodValue}}</p>
<p>配送状态{{order.deliverStatusValue}}</p> <p>配送状态{{order.deliverStatusValue}}</p>
@@ -45,9 +46,7 @@
<thead> <thead>
<tr> <tr>
<th width="50%">商品</th> <th width="50%">商品</th>
<!-- <th width="20%">属性</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> <th width="10%">数量</th>
<th width="10%">小计</th> <th width="10%">小计</th>
@@ -81,10 +80,11 @@
<div> <div>
<span>运费</span><span>+{{ order.order.freightPrice | unitPrice("¥") }}</span><br> <span>运费</span><span>+{{ order.order.freightPrice | unitPrice("¥") }}</span><br>
</div> </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> <div>
<span>应付金额</span <span>应付金额</span>
><span class="actrual-price">{{ order.order.flowPrice | unitPrice("¥") }}</span> <span class="actrual-price">{{ order.order.flowPrice | unitPrice("¥") }}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -120,7 +120,7 @@ export default {
}); });
window.open(routeUrl.href, '_blank'); window.open(routeUrl.href, '_blank');
}, },
getDetail () { // 订单详情 getDetail () { // 获取订单详情
orderDetail(this.$route.query.sn).then(res => { orderDetail(this.$route.query.sn).then(res => {
if (res.success) { if (res.success) {
this.order = res.result; this.order = res.result;
@@ -235,10 +235,14 @@ table {
} }
} }
.verificationCode { .verificationCode {
font-size: 16px; font-size: 20px;
margin-left: 240px; margin-bottom: 20px;
color: rgb(65, 63, 63); color: rgb(65, 63, 63);
font-weight: bold; font-weight: bold;
text-align: center;
span{
color: $theme_color;
}
} }
/** 订单进度条 */ /** 订单进度条 */
.progress { .progress {

View File

@@ -412,7 +412,7 @@ export default {
}); });
this.$Modal.warning({ this.$Modal.warning({
title: '以下商品超出配送区域' || title, title: '以下商品超出配送区域' || title,
content: content.toString(), content: content.toString()
}); });
} }
if (res.result.memberAddress) { if (res.result.memberAddress) {

View File

@@ -15,7 +15,7 @@
> >
<div class="user-icon"> <div class="user-icon">
<div class="user-img"> <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" /> <Avatar icon="ios-person" class="mb_10" v-else size="96" />
</div> </div>
<p>{{userInfo.nickName}}</p> <p>{{userInfo.nickName}}</p>

View File

@@ -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/buyer-ui-4.2.0:0.0.2
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/wap-ui-4.2.0:0.0.2
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/seller-ui-4.2.0:0.0.2
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/manager-ui-4.2.0:0.0.2

View File

@@ -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 .

View File

@@ -47,7 +47,7 @@
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuedraggable": "^2.23.2", "vuedraggable": "^2.23.2",
"vuex": "^3.4.0", "vuex": "^3.4.0",
"wangeditor": "^4.5.3", "wangeditor": "^4.7.5",
"xlsx": "^0.16.2", "xlsx": "^0.16.2",
"xss": "^1.0.7" "xss": "^1.0.7"
}, },

View File

@@ -98,7 +98,7 @@ export const getMemberStatistics = params => {
}; };
// 获取会员注册统计列表 // 获取流量统计
export const getStatisticsList = params => { export const getStatisticsList = params => {
return getRequest("/statistics/view/list", params); return getRequest("/statistics/view/list", params);
}; };

View File

@@ -80,11 +80,11 @@ export const updateArticleCategory = (params, id) => {
} }
//文章添加 //文章添加
export const saveArticle = (params) => { export const saveArticle = (params) => {
return postRequest('/article', params) return postRequest('/article', params, {"Content-Type": "application/json"})
} }
//文章修改 //文章修改
export const updateArticle = (params) => { 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) => { export const updateArticleStatus = (id,params) => {

View File

@@ -21,10 +21,10 @@ export default {
buyer: "https://buyer-api.pickmall.cn", buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn", seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn" manager: "https://admin-api.pickmall.cn"
// common: 'http://192.168.0.100:8890', // common: 'http://192.168.0.103:8890',
// buyer: 'http://192.168.0.100:8888', // buyer: 'http://192.168.0.103:8888',
// seller: 'http://192.168.0.100:8889', // seller: 'http://192.168.0.103:8889',
// manager: 'http://192.168.0.100:8887' // manager: 'http://192.168.0.103:8887'
}, },
api_prod: { api_prod: {
common: "https://common-api.pickmall.cn", common: "https://common-api.pickmall.cn",

View File

@@ -230,13 +230,6 @@ export const otherRouter = {
name: "edit-platform-coupon", name: "edit-platform-coupon",
component: () => import("@/views/promotion/coupon/couponPublish.vue") 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", path: "promotion/platform-coupon-info",
title: "详情", title: "详情",
@@ -261,25 +254,12 @@ export const otherRouter = {
name: "coupon-activity-info", name: "coupon-activity-info",
component: () => import("@/views/promotion/couponActivity/couponInfo.vue") 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", path: "promotion/platform-coupon-info",
title: "详情", title: "详情",
name: "platform-coupon-activity", name: "platform-coupon-activity",
component: () => import("@/views/promotion/coupon/couponInfo.vue") 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", path: "promotion/manager-pintuan",
title: "平台拼团", title: "平台拼团",

View File

@@ -100,7 +100,7 @@ export default {
}, },
{ {
title: "推广单数", title: "推广单数",
key: "orderNum", key: "distributionOrderCount",
minWidth: 120, minWidth: 120,
width: 150, width: 150,
}, },
@@ -124,7 +124,7 @@ export default {
render: (h, params) => { render: (h, params) => {
return h( return h(
"div", "div",
this.$options.filters.unitPrice(params.row.rebateTotal, "¥") this.$options.filters.unitPrice(params.row.canRebate, "¥")
); );
}, },
}, },
@@ -136,7 +136,7 @@ export default {
render: (h, params) => { render: (h, params) => {
return h( return h(
"div", "div",
this.$options.filters.unitPrice(params.row.rebateTotal, "¥") this.$options.filters.unitPrice(params.row.commissionFrozen, "¥")
); );
}, },
}, },

View File

@@ -3,12 +3,12 @@
<Card> <Card>
<Row @keydown.enter.native="handleSearch" > <Row @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" class="search-form">
<Input class="search-input" v-model="searchForm.memberName"> <Form-item label="会员名称">
<span slot="prepend">会员名称</span> <Input class="search-input" v-model="searchForm.memberName"></Input>
</Input> </Form-item>
<Input class="search-input" v-model="searchForm.sn"> <Form-item label="编号">
<span slot="prepend">编号</span> <Input class="search-input" v-model="searchForm.sn"></Input>
</Input> </Form-item>
<Form-item label="状态" style="margin-left: -20px"> <Form-item label="状态" style="margin-left: -20px">
<Select v-model="searchForm.distributionCashStatus" style="width:150px;"> <Select v-model="searchForm.distributionCashStatus" style="width:150px;">
<Option v-for="item in cashStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option> <Option v-for="item in cashStatusList" :value="item.value" :key="item.value">{{ item.label }}</Option>
@@ -37,8 +37,8 @@
</FormItem> </FormItem>
<FormItem label="是否通过" prop="result" v-if="handleStatus =='edit'"> <FormItem label="是否通过" prop="result" v-if="handleStatus =='edit'">
<RadioGroup v-model="result" type="button" button-style="solid"> <RadioGroup v-model="result" type="button" button-style="solid">
<Radio :key=0 :label=0>通过</Radio> <Radio label="PASS">通过</Radio>
<Radio :key=-1 :label=-1>拒绝</Radio> <Radio label="REFUSE">拒绝</Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
</Form> </Form>
@@ -67,7 +67,7 @@ export default {
loading: true, // 表单加载状态 loading: true, // 表单加载状态
modalVisible: false, // 添加或编辑显示 modalVisible: false, // 添加或编辑显示
modalTitle: "", // 添加或编辑标题 modalTitle: "", // 添加或编辑标题
result: -1, // 是否通过 result: 'REFUSE', // 是否通过
searchForm: { // 搜索框初始化对象 searchForm: { // 搜索框初始化对象
pageNumber: 1, // 当前页数 pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小 pageSize: 10, // 页面大小
@@ -80,9 +80,6 @@ export default {
memberName: "", memberName: "",
price: "", price: "",
}, },
auditForm: { // 编辑表单
result: -1
},
submitLoading: false, // 添加或编辑提交状态 submitLoading: false, // 添加或编辑提交状态
selectList: [], // 多选数据 selectList: [], // 多选数据
selectCount: 0, // 多选计数 selectCount: 0, // 多选计数
@@ -101,11 +98,9 @@ export default {
title: "申请金额", title: "申请金额",
key: "price", key: "price",
minWidth: 90, minWidth: 90,
render: (h, params) => { render: (h, params) => {
if (params.row.price) { return h("div", this.$options.filters.unitPrice(params.row.price,'¥'));
return h("div", this.$options.filters.unitPrice(params.row.price,'¥')); }
}
}
}, },
{ {
title: "申请时间", title: "申请时间",
@@ -114,7 +109,7 @@ export default {
}, },
{ {
title: "处理时间", title: "处理时间",
key: "payTime", key: "updateTime",
minWidth: 130 minWidth: 130
}, },
{ {
@@ -193,23 +188,27 @@ export default {
}; };
}, },
methods: { methods: {
// 初始化数据
init() { init() {
this.getDataList(); this.getDataList();
}, },
// 改变页码
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
this.clearSelectAll();
}, },
// 改变页数
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
// 搜索表格
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
// 排序
changeSort(e) { changeSort(e) {
this.searchForm.sort = e.key; this.searchForm.sort = e.key;
this.searchForm.order = e.order; this.searchForm.order = e.order;
@@ -218,14 +217,7 @@ export default {
} }
this.getDataList(); this.getDataList();
}, },
clearSelectAll() { // 获取列表数据
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
getDataList() { getDataList() {
this.loading = true; this.loading = true;
// 带多条件搜索参数获取表单数据 请自行修改接口 // 带多条件搜索参数获取表单数据 请自行修改接口
@@ -241,7 +233,7 @@ export default {
}, },
handleSubmit() { handleSubmit() {
let result = "拒绝" let result = "拒绝"
if(this.result == 0){ if(this.result == 'PASS'){
result = "通过" result = "通过"
} }
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
@@ -251,13 +243,14 @@ export default {
content: "您确认要审核"+result+"么?", content: "您确认要审核"+result+"么?",
loading: true, loading: true,
onOk: () => { onOk: () => {
this.auditForm.result = this.result; auditDistributionCash(this.form.id,{result:this.result}).then(res => {
auditDistributionCash(this.form.id,this.auditForm).then(res => {
if (res.success) { if (res.success) {
this.$Modal.remove(); this.$Modal.remove();
this.$Message.success("审核成功"); this.$Message.success("审核成功");
this.getDataList(); this.getDataList();
this.modalVisible = false; this.modalVisible = false;
} else {
this.modalVisible = false;
} }
}); });
} }
@@ -275,9 +268,7 @@ export default {
v[attr] = ""; v[attr] = "";
} }
} }
let str = JSON.stringify(v); this.form = JSON.parse(JSON.stringify(v));
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true; this.modalVisible = true;
}, },
view(v){ view(v){

View File

@@ -21,16 +21,16 @@
<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-sort-change="changeSort" @on-selection-change="changeSelect">
<template slot="goodsName" slot-scope="{row}"> <template slot="goodsName" slot-scope="{row}">
<div> <div>
<div class="div-zoom"> <div class="div-zoom">
<a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a> <a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
</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>
<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>
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">

View File

@@ -34,7 +34,28 @@
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> </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"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]"
@@ -71,80 +92,52 @@
{ {
title: "订单编号", title: "订单编号",
key: "orderSn", key: "orderSn",
minWidth: 120, minWidth: 100,
tooltip: true tooltip: true
}, },
{ {
title: "实付金额", title: '商品信息',
key: "orderPrice", slot: 'goodsMsg',
width: 130, minWidth: 120
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: "退款金额", title: "退款金额",
key: "returnMoney", key: "returnMoney",
width: 130,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
if(params.row.orderPrice == null){ if(params.row.sellBackRebate == null){
return h("div", this.$options.filters.unitPrice(0, '¥')); return h("div", this.$options.filters.unitPrice(0, '¥'));
}else{ }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: "分销商", title: "分销商",
key: "distributionName", key: "distributionName",
minWidth: 120,
tooltip: true tooltip: true
}, },
{ {
title: "店铺名称", title: "店铺名称",
key: "storeName", key: "storeName",
minWidth: 120, tooltip: true
}, },
{ {
title: "状态", title: "状态",
key: "distributionOrderStatus", slot: "distributionOrderStatus",
width: 100, width: 120,
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', '待提现')
}
}
},
},
{ {
title: "佣金金额", title: "佣金金额",
key: "rebateGrade", key: "rebateGrade",
width: 120, width: 120,
sortable: false, sortable: false,
render: (h, params) => { render: (h, params) => {
if(params.row.rebateGrade == null){ if(params.row.rebate == null){
return h("div", this.$options.filters.unitPrice(0, '¥')); return h("div", this.$options.filters.unitPrice(0, '¥'));
}else{ }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) { // 店铺搜索,键盘点击回调 searchChange(val) { // 店铺搜索,键盘点击回调
this.getShopList(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() { mounted() {
this.init(); this.init();
}, },
watch: { watch: {
$route(e) { $route(e) { // 监听路由参数变化调取接口
this.distributionId = e.query.id ? e.query.id : undefined; this.distributionId = e.query.id ? e.query.id : undefined;
this.getDataList(); this.getDataList();
} }
@@ -234,5 +255,12 @@
</script> </script>
<style lang="scss" > <style lang="scss" >
@import "@/styles/table-common.scss"; @import "@/styles/table-common.scss";
.goods-msg {
display: flex;
align-items: center;
>div{
margin-left: 10px;
}
}
</style> </style>

View File

@@ -200,9 +200,9 @@ export default {
width: 100, width: 100,
render: (h, params) => { render: (h, params) => {
if (params.row.marketEnable == "DOWN") { if (params.row.marketEnable == "DOWN") {
return h("Tag", {props: {color: "green"},},"架"); return h("Tag", {props: {color: "volcano"},},"架");
} else if (params.row.marketEnable == "UPPER") { } else if (params.row.marketEnable == "UPPER") {
return h("Tag", {props: {color: "volcano",},},"架"); return h("Tag", {props: {color: "green",},},"架");
} }
}, },
}, },

View File

@@ -2,13 +2,8 @@
<div class="wrapper"> <div class="wrapper">
<div class="operation"> <div class="operation">
<Button @click="addParent" icon="md-add">添加一级分类</Button> <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> </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"> <template slot="action" slot-scope="scope">
<Dropdown v-show="scope.row.level == 2" transfer="true" trigger="click"> <Dropdown v-show="scope.row.level == 2" transfer="true" trigger="click">
@@ -45,15 +40,10 @@
{{ scope.row.commissionRate }}% {{ scope.row.commissionRate }}%
</template> </template>
<template slot="deleteFlag" slot-scope="scope"> <template slot="deleteFlag" slot-scope="{row}">
<div v-if="scope.row.deleteFlag == 0"> <Tag :class="{'ml_10': row.deleteFlag}" :color="row.deleteFlag == false ? 'success' : 'error'">{{row.deleteFlag == false ? '正常启用' : '禁用'}}</Tag>
<Badge text="正常启用" status="success"></Badge>
</div>
<div v-if="scope.row.deleteFlag == 1">
<Badge text="禁用" status="error"></Badge>
</div>
</template> </template>
</tree-table> </Table>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500"> <Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
<Form ref="form" :model="formAdd" :label-width="100" :rules="formValidate"> <Form ref="form" :model="formAdd" :label-width="100" :rules="formValidate">
@@ -132,19 +122,17 @@ import {
saveCategorySpec, saveCategorySpec,
getCategoryTree, getCategoryTree,
} from "@/api/goods"; } 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 { export default {
name: "lili-components", name: "lili-components",
components: { components: {
TreeTable,
uploadPicInput, uploadPicInput,
}, },
data() { data() {
return { return {
categoryList: [], // 分类列表 categoryList: [], // 分类列表
sortCateList: [], //筛选出分类第一级
sortCate: "", //筛选的数据 sortCate: "", //筛选的数据
loading: false, // 加载状态 loading: false, // 加载状态
selectCount: 0, // 选择数量 selectCount: 0, // 选择数量
@@ -179,52 +167,52 @@ export default {
brandWay: "", //请求绑定品牌的信息 brandWay: "", //请求绑定品牌的信息
specForm: {}, specForm: {},
// 表单验证规则 // 表单验证规则
formValidate: {}, formValidate: {
commissionRate: [
{required: true, message: '请填写佣金比例'},
{pattern: regular.Integer, message: "佣金比例不能为负"},
]
},
columns: [ columns: [
{ {
title: "分类名称", title: "分类名称",
key: "name", key: "name",
minWidth: "120px", tree: true,
}, },
{ {
title: "状态", title: "状态",
key: "deleteFlag", slot: "deleteFlag",
headerAlign: "center",
type: "template",
template: "deleteFlag",
}, },
{ {
title: "佣金(%)", title: "佣金",
key: "commissionRate", key: "commissionRate",
headerAlign: "center",
type: "template", slot: "commissionRate",
template: "commissionRate",
}, },
{ {
fixed: "right", fixed: "right",
title: "操作", title: "操作",
key: "action", key: "action",
align: "left",
headerAlign: "center", slot: "action",
type: "template",
template: "action",
}, },
], ],
tableData: [], tableData: [],
categoryIndex: 0, categoryIndex: 0,
checkedCategoryChildren: "", //选中的分类子级
}; };
}, },
methods: { methods: {
changeSortCate(val) { // changeSortCate(val) {
let way = this.categoryList.find((item, index) => { // let way = this.categoryList.find((item, index) => {
if (item.name == val) { // if (item.name == val) {
this.categoryIndex = index; // this.categoryIndex = index;
console.log((this.categoryIndex = index)); // console.log((this.categoryIndex = index));
return item.name == val; // return item.name == val;
} // }
}); // });
this.tableData = [way]; // this.tableData = [way];
}, // },
init() { init() {
this.getAllList(0); this.getAllList(0);
this.getBrandList(); this.getBrandList();
@@ -240,7 +228,6 @@ export default {
getSpecList() { getSpecList() {
getSpecificationList().then((res) => { getSpecificationList().then((res) => {
if (res.length != 0) { if (res.length != 0) {
this.specifications = res; 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) { getAllList(parent_id) {
this.sortCateList = [];
this.loading = true; this.loading = true;
getCategoryTree(parent_id).then((res) => { getCategoryTree(parent_id).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
localStorage.setItem("category", JSON.stringify(res.result)); localStorage.setItem("category", JSON.stringify(res.result));
res.result.forEach((e, index, arr) => { this.categoryList = JSON.parse(JSON.stringify(res.result));
this.sortCateList.push({ this.tableData = res.result.map((item) => {
label: e.name, if (item.children.length != 0) {
value: e.name, item.children = [];
}); item._loading = false;
this.sortCate = arr[0].name; }
return item;
}); });
this.categoryList = res.result; console.log(this.tableData);
this.$nextTick(() => {
this.$set(this, "tableData", [res.result[this.categoryIndex]]);
});
} }
}); });
}, },

View File

@@ -28,7 +28,7 @@
size="small" show-total show-elevator show-sizer></Page> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
</Card> </Card>
<!-- 评价详情 -->
<Modal v-model="infoFlag" width="800" :title="infoTitle"> <Modal v-model="infoFlag" width="800" :title="infoTitle">
<div class="info-list" style="overflow: hidden"> <div class="info-list" style="overflow: hidden">
@@ -58,12 +58,15 @@
<ListItemMeta :avatar="infoData.memberProfile" :title="infoData.memberName" <ListItemMeta :avatar="infoData.memberProfile" :title="infoData.memberName"
:description="infoData.content"/> :description="infoData.content"/>
</ListItem> </ListItem>
<div class="" v-if="infoData.haveImage == 1"> <div class="" v-if="infoData.haveImage">
评价图 评价图
<div style="margin-left: 40px"> <div style="margin-left: 40px">
<img style="width: 100px;height: 110px;margin-left: 2px" <template v-if="infoData.images && infoData.images.length">
v-for="(img,index) in infoData.image.split(',')" v-if="infoData.image.length !=0" :src="img" <img style="width: 100px;height: 110px;margin-left: 2px"
v-for="(img,index) in infoData.images.split(',')" :src="img"
alt="" :key="index"/> alt="" :key="index"/>
</template>
</div> </div>
</div> </div>
</List> </List>
@@ -74,10 +77,13 @@
<div style="float: left"> 商家回复</div> <div style="float: left"> 商家回复</div>
<div style="margin-left: 60px">{{ infoData.reply }}</div> <div style="margin-left: 60px">{{ infoData.reply }}</div>
</div> </div>
<div v-if="infoData.haveReplyImage == 1"> <div v-if="infoData.haveReplyImage">
<div style="margin-left: 60px"> <div style="margin-left: 60px">
<img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')" :key="index" <template v-if="infoData.replyImage && infoData.replyImage.length">
v-if="infoData.replyImage.length !=0" :src="img" alt=""/> <img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')" :key="index"
:src="img" alt=""/>
</template>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,10 +1,11 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<div class="list"> <!-- TODO 目前数据少暂且不用 -->
<!-- <div class="list">
<div class="list-item active"> <div class="list-item active">
文章页 文章页
</div> </div>
</div> </div> -->
<div class="content"> <div class="content">
<Article @callbacked="callbackArticle" :selected="true" /> <Article @callbacked="callbackArticle" :selected="true" />
</div> </div>
@@ -36,8 +37,8 @@ export default {
height: 414px; height: 414px;
overflow: auto; overflow: auto;
} }
.ivu-table-wrapper ivu-table-wrapper-with-border{ .ivu-table-wrapper ivu-table-wrapper-with-border {
height: 300px !important; height: 300px !important;
} }
.list { .list {
margin: 0 1.5%; margin: 0 1.5%;

View File

@@ -52,6 +52,8 @@ export default {
pageData: modelForm, pageData: modelForm,
pageShow, pageShow,
}; };
console.log(this.modelForm);
API_floor.updateHome(this.$route.query.id, data).then((res) => { API_floor.updateHome(this.$route.query.id, data).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success("保存模板成功"); this.$Message.success("保存模板成功");

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="login"> <div class="login" @click='$refs.verify.show = false'>
<Row @keydown.enter.native="submitLogin" class="flex"> <Row @keydown.enter.native="submitLogin" class="flex">
<Col style="width: 368px"> <Col style="width: 368px">
<Header /> <Header />
@@ -111,7 +111,7 @@ export default {
// 登录操作 // 登录操作
this.$refs.usernameLoginForm.validate((valid) => { this.$refs.usernameLoginForm.validate((valid) => {
if (valid) { if (valid) {
this.$refs.verify.show = true; this.$refs.verify.init();
} }
}); });
}, },
@@ -161,7 +161,7 @@ export default {
} }
.verify-con { .verify-con {
position: absolute; position: absolute;
top: 90px; top: 150px;
z-index: 10; z-index: 10;
left: 20px; left: 20px;
} }

View File

@@ -6,7 +6,7 @@
<a class="item" href="https://pickmall.com" target="_blank">{{ $t('terms') }}</a> <a class="item" href="https://pickmall.com" target="_blank">{{ $t('terms') }}</a>
</Row> </Row>
<Row type="flex" justify="center" class="copyright"> <Row type="flex" justify="center" class="copyright">
Copyright © 2020 - Present Copyright © {{year}} - Present
<a <a
href="https://pickmall.cn/" href="https://pickmall.cn/"
target="_blank" target="_blank"
@@ -18,7 +18,12 @@
<script> <script>
export default { export default {
name: "footer" name: "footer",
data() {
return {
year: new Date().getFullYear()
}
},
}; };
</script> </script>

View File

@@ -1,5 +1,3 @@
<template> <template>
<div class="ivu-shrinkable-menu"> <div class="ivu-shrinkable-menu">
<!-- 一级菜单 --> <!-- 一级菜单 -->
@@ -38,6 +36,9 @@ export default {
navList() { navList() {
return this.$store.state.app.navList; return this.$store.state.app.navList;
}, },
currNav() {
return this.$store.state.app.currNav;
}
}, },
watch: { watch: {
// 监听路由变化 // 监听路由变化
@@ -45,29 +46,17 @@ export default {
handler: function (val, oldVal) { handler: function (val, oldVal) {
console.log(val); console.log(val);
} }
},
menuList: {
handler: function (val, oldVal) {
}
} }
}, },
mounted() {
},
methods: { methods: {
changeMenu(name) { //二级路由点击 changeMenu(name) { //二级路由点击
console.log(name)
this.$router.push({ this.$router.push({
name: name name: name
}); });
}, },
selectNav(name) { selectNav(name) { // 一级路由点击事件
this.$store.commit("setCurrNav", name); this.$store.commit("setCurrNav", name);
this.setStore("currNav", name); this.setStore("currNav", name);
// if (this.$route.name != "home_index") {
// this.$router.push({
// name: "home_index"
// });
// }
util.initRouter(this); util.initRouter(this);
}, },
} }

View File

@@ -3,9 +3,7 @@
width: 180px; width: 180px;
display: flex; display: flex;
} }
.ivu-menu-vertical .ivu-menu-item-group-title {
padding-left: 5px;
}
.ivu-btn-text:hover { .ivu-btn-text:hover {
background-color: rgba(255,255,255,.2) !important; 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){ .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; color: #ed3f14;
} }
/deep/.ivu-menu-vertical .ivu-menu-item-group-title {
height: 40px;
line-height: 40px;
padding-left: 20px;
}

View File

@@ -30,26 +30,22 @@
</Card> </Card>
<!-- 添加用户模态框 --> <!-- 添加用户模态框 -->
<Modal v-model="addFlag" title="添加用户"> <Modal v-model="addFlag" title="添加会员">
<Form ref="addMemberForm" :model="addMemberForm" :rules="addRule" :label-width="100"> <Form ref="addMemberForm" :model="addMemberForm" :rules="addRule" :label-width="100">
<FormItem label="手机号码" prop="mobile" style="width: 90%;"> <FormItem label="手机号码" prop="mobile" style="width: 90%;">
<Input v-model="addMemberForm.mobile" maxlength="11" placeholder="请输入手机号码" /> <Input v-model="addMemberForm.mobile" maxlength="11" placeholder="请输入手机号码" />
</FormItem> </FormItem>
<FormItem label="会员名称" prop="uname" style="width: 90%"> <FormItem label="会员名称" prop="username" style="width: 90%">
<Input v-model="addMemberForm.username" maxlength="15" placeholder="请输入会员名称" /> <Input v-model="addMemberForm.username" maxlength="15" placeholder="请输入会员名称" />
</FormItem> </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="请输入会员密码" /> <Input type="password" password v-model="addMemberForm.password" maxlength="20" placeholder="请输入会员密码" />
</FormItem> </FormItem>
</Form> </Form>
<div slot="footer"> <div slot="footer">
<Button @click=" <Button @click="addFlag = false">
() => {
addFlag = false;
}
">
取消 取消
</Button> </Button>
<Button type="primary" :loading="handleAddLoading" @click="addMemberSubmit"> <Button type="primary" :loading="handleAddLoading" @click="addMemberSubmit">
@@ -163,8 +159,8 @@ export default {
message: "请输入正确的手机号", message: "请输入正确的手机号",
}, },
], ],
uname: [{ required: true, message: "请输入会员名称" }], username: [{ required: true, message: "请输入会员名称" }],
pwd: [{ required: true, message: "请输入密码" }], password: [{ required: true, message: "请输入密码" }],
}, },
ruleValidate: {}, //修改验证 ruleValidate: {}, //修改验证
submitLoading: false, // 添加或编辑提交状态 submitLoading: false, // 添加或编辑提交状态
@@ -421,11 +417,7 @@ export default {
}, },
addMember() { addMember() {
this.addFlag = true; this.addFlag = true;
this.addMemberForm = { this.$refs.addMemberForm.resetFields()
mobile: "",
username: "",
password: "",
};
}, },
/** /**
* 查询查看会员详情 * 查询查看会员详情
@@ -460,6 +452,7 @@ export default {
if (valid) { if (valid) {
API_Member.addMember(this.addMemberForm).then((res) => { API_Member.addMember(this.addMemberForm).then((res) => {
if (res.result) { if (res.result) {
this.$refs.addMemberForm.resetFields()
this.getData(); this.getData();
this.$Message.success("添加成功!"); this.$Message.success("添加成功!");
this.addFlag = false; this.addFlag = false;

View File

@@ -97,16 +97,16 @@
{ {
title: "变动积分", title: "变动积分",
key: "point", key: "variablePoint",
width: 110, width: 110,
render: (h, params) => { render: (h, params) => {
if (params.row.pointType == 1) { if (params.row.pointType == 'INCREASE') {
return h('div', [ return h('div', [
h('span', { h('span', {
style: { style: {
color: 'green' color: 'green'
} }
}, "+" + params.row.point), }, "+" + params.row.variablePoint),
]); ]);
} else { } else {
return h('div', [ return h('div', [
@@ -114,7 +114,7 @@
style: { style: {
color: 'red' color: 'red'
} }
}, "-" + params.row.point), }, "-" + params.row.variablePoint),
]); ]);
} }

View File

@@ -63,7 +63,7 @@ export default {
data() { data() {
return { return {
editor: null, // 富文本编辑器初始化 editor: null, // 富文本编辑器初始化
data: this.value, // 富文本数据 data: '', // 富文本数据
dataEdit: "", // 编辑数据 dataEdit: "", // 编辑数据
showHTMLModal: false, // 显示html showHTMLModal: false, // 显示html
full: false, // html全屏开关 full: false, // html全屏开关
@@ -122,6 +122,7 @@ export default {
// 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置 // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置
customInsert: function (insertImg, result, editor) { customInsert: function (insertImg, result, editor) {
if (result.success == true) { if (result.success == true) {
console.log(insertImg,result,editor);
let url = result.result; let url = result.result;
insertImg(url); insertImg(url);
that.$Message.success("上传图片成功"); that.$Message.success("上传图片成功");
@@ -184,12 +185,10 @@ export default {
if (!editor) { if (!editor) {
this.initEditor(); this.initEditor();
} }
if (value && value != this.data) { this.data = value;
this.data = value; editor.txt.html(this.data);
editor.txt.html(this.data); this.$emit("input", this.data);
this.$emit("input", this.data); this.$emit("on-change", this.data);
this.$emit("on-change", this.data);
}
}, },
}, },
watch: { watch: {

View File

@@ -11,15 +11,15 @@
:readonly="readonly" :readonly="readonly"
:maxlength="maxlength" :maxlength="maxlength"
> >
<Button slot="append" icon="md-eye"></Button> <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> </Input>
<Poptip transfer trigger="hover" title="图片预览" placement="right" width="350">
<Icon type="md-eye" class="see-icon" />
<div slot="content">
<img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" />
<a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a>
</div>
</Poptip>
<Upload <Upload
:action="uploadFileUrl" :action="uploadFileUrl"
:headers="accessToken" :headers="accessToken"
@@ -35,7 +35,7 @@
ref="up" ref="up"
class="upload" class="upload"
> >
<Button :loading="loading" :size="size" :disabled="disabled" :icon="icon">上传图片</Button> <Button :loading="loading" :size="size" :disabled="disabled">上传图片</Button>
</Upload> </Upload>
</div> </div>

View File

@@ -1,9 +1,9 @@
<template> <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'}"> <div class="imgBox" :style="{width:data.originalWidth+'px',height:data.originalHeight + 'px'}">
<img :src="data.backImage" style="width:100%;height:100%" alt=""> <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=""> <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>
<div class="handle" :style="{width:data.originalWidth+'px'}"> <div class="handle" :style="{width:data.originalWidth+'px'}">
<span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span> <span class="bgcolor" :style="{width:distance + 'px',background:bgColor}"></span>
@@ -18,7 +18,8 @@
import { getVerifyImg, postVerifyImg } from './verify.js'; import { getVerifyImg, postVerifyImg } from './verify.js';
export default { export default {
props: { props: {
verifyType: { // 验证方式,登录注册 // 传入数据,判断是登录注册、修改密码
verifyType: {
defalut: 'LOGIN', defalut: 'LOGIN',
type: String type: String
} }
@@ -38,15 +39,17 @@ export default {
distance: 0, // 拼图移动距离 distance: 0, // 拼图移动距离
flag: false, // 判断滑块是否按下 flag: false, // 判断滑块是否按下
downX: 0, // 鼠标按下位置 downX: 0, // 鼠标按下位置
bgColor: 'aqua', // 滑动背景颜色 bgColor: '#04ad11', // 滑动背景颜色
verifyText: '拖动滑块解锁' // 文字提示 verifyText: '拖动滑块解锁' // 文字提示
}; };
}, },
methods: { methods: {
// 鼠标按下事件,开始拖动滑块
mouseDown (e) { mouseDown (e) {
this.downX = e.clientX; this.downX = e.clientX;
this.flag = true; this.flag = true;
}, },
// 鼠标移动事件,计算距离
mouseMove (e) { mouseMove (e) {
if (this.flag) { if (this.flag) {
let offset = e.clientX - this.downX; let offset = e.clientX - this.downX;
@@ -60,6 +63,7 @@ export default {
} }
} }
}, },
// 鼠标抬起事件,验证是否正确
mouseUp () { mouseUp () {
if (!this.flag) return false; if (!this.flag) return false;
this.flag = false; this.flag = false;
@@ -68,32 +72,41 @@ export default {
xPos: this.distance xPos: this.distance
}; };
postVerifyImg(params).then(res => { postVerifyImg(params).then(res => {
if (res.result) { if (res.success) {
this.bgColor = 'green'; if (res.result) {
this.verifyText = '解锁成功'; this.bgColor = 'green';
this.$emit('change', { status: true, distance: this.distance }); this.verifyText = '解锁成功';
this.$emit('change', { status: true, distance: this.distance });
} else {
this.bgColor = 'red';
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.init();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
}
} else { } else {
this.bgColor = 'red'; this.init()
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.refresh();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
} }
}).catch(()=>{
this.init()
}); });
}, },
refresh () { init () { // 初始化数据
this.flag = false; this.flag = false;
this.downX = 0; this.downX = 0;
this.distance = 0; this.distance = 0;
this.bgColor = 'aqua'; this.bgColor = '#04ad11';
this.verifyText = '拖动滑块解锁'; this.verifyText = '拖动滑块解锁';
this.getImg();
},
getImg () {
getVerifyImg(this.type).then(res => { getVerifyImg(this.type).then(res => {
this.data = res.result; if (res.result) {
this.data = res.result;
this.show = true;
} else {
this.$Message.warning('请求失败请重试!')
}
}); });
} }
}, },
@@ -102,11 +115,7 @@ export default {
immediate: true, immediate: true,
handler: function (v) { handler: function (v) {
this.type = v; this.type = v;
// this.refresh();
} }
},
show (v) {
if (v) this.refresh();
} }
} }
}; };
@@ -140,7 +149,7 @@ export default {
} }
} }
.handle { .handle {
border: 1px solid rgb(134, 134, 134); border: 1px solid #e4dede;
margin-top: 5px; margin-top: 5px;
height: 42px; height: 42px;
background: #ddd; background: #ddd;
@@ -153,7 +162,7 @@ export default {
width: 40px; width: 40px;
height: 40px; height: 40px;
opacity: 0.5; opacity: 0.5;
background: aqua; background: #04ad11;
} }
.swiper { .swiper {

View File

@@ -22,7 +22,7 @@
</Select> </Select>
</Form-item> </Form-item>
<Form-item label="支付时间"> <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> </Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
@@ -53,10 +53,9 @@ export default {
pageSize: 10, // 页面大小 pageSize: 10, // 页面大小
sort: "createTime", // 默认排序字段 sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式 order: "desc", // 默认排序方式
startDate: "", // 起始时间
endDate: "", // 终止时间
sn: "", sn: "",
payStatus: "", payStatus: "",
paymentTime: "",
}, },
columns: [ columns: [
{ {
@@ -151,61 +150,30 @@ export default {
}; };
}, },
methods: { 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() { init() {
this.getDataList(); this.getDataList();
}, },
// 改变页码
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
}, },
// 改变页数
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
// 搜索
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
handleReset() { changeDate (val) { // 改变日期格式
this.$refs.searchForm.resetFields(); this.searchForm.paymentTime = val
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];
}
}, },
// 获取列表
getDataList() { getDataList() {
this.loading = true; this.loading = true;
API_Order.paymentLog(this.searchForm).then((res) => { API_Order.paymentLog(this.searchForm).then((res) => {

View File

@@ -23,6 +23,11 @@
type="primary" type="primary"
>订单取消</Button >订单取消</Button
> >
<Button
v-if="orderInfo.order.orderStatus === 'UNPAID'"
@click="confirmPrice"
type="success"
>收款</Button>
<Button @click="orderLog" type="primary" <Button @click="orderLog" type="primary"
>订单日志</Button >订单日志</Button
> >
@@ -571,6 +576,25 @@ export default {
this.showRegion = true; this.showRegion = true;
this.regionId = ""; 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() { getDataList() {
this.loading = true; this.loading = true;
API_Order.orderDetail(this.sn).then((res) => { API_Order.orderDetail(this.sn).then((res) => {

View File

@@ -1,43 +1,38 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<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>
<Form-item label="会员名称" prop="buyerName">
<Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 160px" />
</Form-item>
<Row @keydown.enter.native="handleSearch"> <Form-item label="订单类型" prop="orderType">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Select v-model="searchForm.orderType" placeholder="请选择" clearable style="width: 160px">
<Form-item label="订单号" prop="orderSn"> <Option value="NORMAL">普通订单</Option>
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单号" clearable style="width: 160px" /> <Option value="PINTUAN">拼团订单</Option>
</Form-item> <Option value="GIFT">赠品订单</Option>
<Form-item label="会员名称" prop="buyerName"> <Option value="VIRTUAL">核验订单</Option>
<Input type="text" v-model="searchForm.buyerName" placeholder="请输入会员名称" clearable style="width: 160px" /> </Select>
</Form-item> </Form-item>
<Form-item label="订单状态" prop="orderStatus">
<Form-item label="订单类型" prop="orderType"> <Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px">
<Select v-model="searchForm.orderType" placeholder="请选择" clearable style="width: 160px"> <Option value="UNPAID">未付款</Option>
<Option value="NORMAL">普通订单</Option> <Option value="PAID">已付款</Option>
<Option value="PINTUAN">拼团订单</Option> <Option value="UNDELIVERED">待发货</Option>
<Option value="GIFT">赠品订单</Option> <Option value="DELIVERED">已发货</Option>
<Option value="VIRTUAL">核验订单</Option> <Option value="COMPLETED">已完成</Option>
</Select> <Option value="TAKE">待核验</Option>
</Form-item> <Option value="CANCELLED">已取消</Option>
<Form-item label="订单状态" prop="orderStatus"> </Select>
<Select v-model="searchForm.orderStatus" placeholder="请选择" clearable style="width: 160px"> </Form-item>
<Option value="UNPAID">未付款</Option> <Form-item label="下单时间">
<Option value="PAID">已付款</Option> <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker>
<Option value="UNDELIVERED">待发货</Option> </Form-item>
<Option value="DELIVERED">已发货</Option> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Option value="COMPLETED">已完成</Option> </Form>
<Option value="TAKE">待核验</Option>
<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> <div>
<download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls"> <download-excel class="export-excel-wrapper" :data="data" :fields="fields" name="商品订单.xls">
<Button type="info" class="export"> <Button type="info" class="export">
@@ -212,20 +207,13 @@ export default {
title: "操作", title: "操作",
key: "action", key: "action",
align: "center", align: "center",
width: 150, width: 100,
render: (h, params) => { render: (h, params) => {
return h("div", [h("Button", {props: {type: "primary", size: "small",}, return h("Button", {props: {type: "info", size: "small",},
attrs: {disabled: params.row.orderStatus == "UNPAID" ? false : true,},
style: {marginRight: "5px",}, style: {marginRight: "5px",},
on: {click: () => {this.confirmPrice(params.row);},}, on: {click: () => {this.detail(params.row);},},
}, "收款" }, "查看"
), )
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.total = this.data.length;
this.loading = false; 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) { detail(v) {
let sn = v.sn; let sn = v.sn;
this.$router.push({ this.$router.push({

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="operation"> <div class="operation mb_10">
<Button @click="addParent" icon="md-add">添加一级分类</Button> <Button @click="addParent" icon="md-add">添加一级分类</Button>
</div> </div>
<tree-table <tree-table
@@ -16,10 +16,9 @@
primary-key="id"> primary-key="id">
<template slot="action" slot-scope="scope"> <template slot="action" slot-scope="scope">
<Button <Button
type="primary" type="info"
@click="edit(scope.row)" @click="edit(scope.row)"
size="small" size="small"
icon="md-add"
style="margin-right:5px" style="margin-right:5px"
>编辑 >编辑
</Button> </Button>
@@ -28,17 +27,14 @@
type="error" type="error"
@click="remove(scope.row)" @click="remove(scope.row)"
size="small" size="small"
icon="md-add"
style="margin-right:5px" style="margin-right:5px"
>删除 >删除
</Button> </Button>
&nbsp;
<Button <Button
v-show="scope.row.level != 2 " v-show="scope.row.level != 2 "
type="primary" type="success"
@click="addChildren(scope.row)" @click="addChildren(scope.row)"
size="small" size="small"
icon="md-add"
style="margin-right:5px" style="margin-right:5px"
>添加子分类 >添加子分类
</Button> </Button>
@@ -145,12 +141,14 @@
this.modalVisible = true; this.modalVisible = true;
}, },
edit(v) { edit(v) {
console.log(v);
this.modalType = 1; this.modalType = 1;
this.modalTitle = "编辑"; this.modalTitle = "编辑";
this.formAdd.id = v.id; this.formAdd.id = v.id;
this.formAdd.articleCategoryName = v.articleCategoryName; this.formAdd.articleCategoryName = v.articleCategoryName;
this.formAdd.level = v.level; this.formAdd.level = v.level;
this.formAdd.parentId = v.parentId; this.formAdd.parentId = v.parentId;
this.formAdd.sort = v.sort;
this.showParent = false; this.showParent = false;
this.modalVisible = true; this.modalVisible = true;
}, },

View File

@@ -4,7 +4,7 @@
<Row> <Row>
<Col style=" height: 100%;" span="4"> <Col style=" height: 100%;" span="4">
<Card class="article-category"> <Card class="article-category">
<Tree :data="treeData" @on-select-change="handleSearchChange"></Tree> <Tree :data="treeData" @on-select-change="handleCateChange"></Tree>
</Card> </Card>
</Col> </Col>
<Col span="20"> <Col span="20">
@@ -18,9 +18,9 @@
</Form> </Form>
</Row> </Row>
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button @click="add" type="primary" style="">添加</Button> <Button @click="add" type="primary">添加</Button>
</Row> </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"> <template slot="openStatusSlot" slot-scope="scope">
<div> <div>
@@ -57,7 +57,7 @@
<Input type="number" v-model="form.sort" clearable style="width: 10%" /> <Input type="number" v-model="form.sort" clearable style="width: 10%" />
</FormItem> </FormItem>
<FormItem class="form-item-view-el" label="文章内容" prop="content"> <FormItem class="form-item-view-el" label="文章内容" prop="content">
<editor openXss v-model="form.content"></editor> <editor openXss v-model="form.content"></editor>
</FormItem> </FormItem>
<FormItem label="是否展示" prop="openStatus"> <FormItem label="是否展示" prop="openStatus">
<i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close"> <i-switch size="large" v-model="form.openStatus" :true-value="open" :false-value="close">
@@ -154,28 +154,7 @@ export default {
title: "是否显示", title: "是否显示",
key: "openStatus", key: "openStatus",
width: 100, width: 100,
slot: "openStatusSlot", 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: "展示",
},
}),
]);
}
},*/
}, },
{ {
title: "排序", title: "排序",
@@ -266,11 +245,13 @@ export default {
}, },
}, },
methods: { methods: {
// 初始化数据
init() { init() {
this.getDataList(); this.getDataList();
this.getAllList(0); this.getAllList(0);
}, },
handleSearchChange(data) { // 选择分类回调
handleCateChange(data) {
let { value, title } = data[0]; let { value, title } = data[0];
this.list.push({ this.list.push({
value, value,
@@ -279,7 +260,7 @@ export default {
this.searchForm.categoryId = value; this.searchForm.categoryId = value;
this.searchTreeValue = title; this.searchTreeValue = title;
}, },
//是否展示事件 //是否展示文章
changeSwitch(v) { changeSwitch(v) {
let params = { let params = {
status: v.openStatus, status: v.openStatus,
@@ -290,6 +271,7 @@ export default {
} }
}); });
}, },
// 文章分类的选择事件
handleCheckChange(data) { handleCheckChange(data) {
let value = ""; let value = "";
let title = ""; let title = "";
@@ -307,36 +289,33 @@ export default {
this.form.categoryId = value; this.form.categoryId = value;
this.treeValue = title; this.treeValue = title;
}, },
// 改变页数
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
this.clearSelectAll(); this.clearSelectAll();
}, },
// 改变页码
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
// 搜索列表
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); 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); this.$refs.table.selectAll(false);
}, },
// 列表选择回调
changeSelect(e) { changeSelect(e) {
this.selectList = e; this.selectList = e;
this.selectCount = e.length; this.selectCount = e.length;
}, },
// 获取全部文章分类
getAllList(parent_id) { getAllList(parent_id) {
this.loading = true; this.loading = true;
getArticleCategory(parent_id).then((res) => { getArticleCategory(parent_id).then((res) => {
@@ -353,6 +332,7 @@ export default {
} }
}); });
}, },
// 文章分类格式化方法
getTree(tree = []) { getTree(tree = []) {
let arr = []; let arr = [];
if (!!tree && tree.length !== 0) { if (!!tree && tree.length !== 0) {
@@ -369,6 +349,7 @@ export default {
} }
return arr; return arr;
}, },
// 获取文章列表
getDataList(val) { getDataList(val) {
if (val) this.form = {}; if (val) this.form = {};
this.loading = true; this.loading = true;
@@ -387,7 +368,7 @@ export default {
this.total = this.data.length; this.total = this.data.length;
this.loading = false; this.loading = false;
}, },
// 添加文章
handleSubmit() { handleSubmit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
@@ -417,16 +398,27 @@ export default {
} }
}); });
}, },
// 添加文章modal
add() { add() {
this.modalType = 0; this.modalType = 0;
this.modalTitle = "添加文章"; this.modalTitle = "添加文章";
this.treeValue = '';
this.form = {
sort: 1,
content:''
};
this.$refs.form.resetFields(); this.$refs.form.resetFields();
delete this.form.id; delete this.form.id;
this.modalVisible = true; this.modalVisible = true;
}, },
// 编辑文章modal
edit(data) { edit(data) {
this.modalType = 1; this.modalType = 1;
this.modalTitle = "编辑文章"; this.modalTitle = "编辑文章";
this.treeValue = '';
this.form = {
content:''
};
this.$refs.form.resetFields(); this.$refs.form.resetFields();
seeArticle(data.id).then((res) => { seeArticle(data.id).then((res) => {

View File

@@ -1,35 +1,32 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row> <Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form mb_10">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form-item label="活动名称" prop="couponName">
<Form-item label="活动名称" prop="couponName"> <Input type="text" v-model="searchForm.couponName" placeholder="请输入活动名称" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.couponName" placeholder="请输入活动名称" clearable style="width: 200px" /> </Form-item>
</Form-item> <Form-item label="活动状态" prop="promotionStatus">
<Form-item label="活动状态" prop="promotionStatus"> <Select v-model="searchForm.promotionStatus" placeholder="请选择" clearable style="width: 200px">
<Select v-model="searchForm.promotionStatus" placeholder="请选择" clearable style="width: 200px"> <Option value="NEW">未开始</Option>
<Option value="NEW">开始</Option> <Option value="START">开始/上架</Option>
<Option value="START">开始/</Option> <Option value="END">结束/</Option>
<Option value="END">已结束/下架</Option> <Option value="CLOSE">紧急关闭/作废</Option>
<Option value="CLOSE">紧急关闭/作废</Option> </Select>
</Select> </Form-item>
</Form-item> <Form-item label="活动时间">
<Form-item label="活动时间"> <DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" style="width: 200px"></DatePicker>
<DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" style="width: 200px"></DatePicker> </Form-item>
</Form-item> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Form>
</Form> <Row class="operation padding-row" v-if="getType !== 'ACTIVITY'">
</Row>
<Row class="operation padding-row">
<Button @click="add" type="primary">添加优惠券</Button> <Button @click="add" type="primary">添加优惠券</Button>
<Button @click="delAll">批量下架</Button> <Button @click="delAll">批量下架</Button>
<!-- <Button @click="upAll" >批量上架</Button> -->
</Row> </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"> <Table v-if="refreshTable" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
<template slot-scope="{ row,index }" slot="action"> <template slot-scope="{ row }" slot="action">
<Button v-if="!checked && row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="primary" size="small" style="margin-right: 10px" @click="edit(row)">编辑 <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>
<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> </Button>
</template> </template>
</Table> </Table>
@@ -121,7 +118,7 @@ export default {
render: (h, params) => { render: (h, params) => {
return h( return h(
"div", "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", slot: "action",
align: "center", align: "center",
fixed: "right", fixed: "right",
maxWidth: 140, width: 130,
}, },
], ],
data: [], // 表单数据 data: [], // 表单数据
total: 0, // 表单数据总数 total: 0, // 表单数据总数
selectCoupon: [], //本级选中的优惠券 refreshTable: true, // 修改选中状态后刷新表格
}; };
}, },
props: { props: {
// 是否为选中模式
checked: {
type: Boolean,
default: false,
},
//优惠券类型 查询参数 //优惠券类型 查询参数
getType: { getType: {
type: String, type: String,
@@ -246,94 +238,73 @@ export default {
this.init(); this.init();
} }
}, },
},
methods: {
// 选中优惠券 父级传值 // 选中优惠券 父级传值
selectedList: { selectedList: {
handler(val) { handler(val) {
// 判断是否是父级回调给自己已选择优惠券 // 判断是否是父级回调给自己已选择优惠券
if (val.length != 0) { if (val.length) {
this.selectCoupon = val; 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, deep: true,
immediate: true,
}, },
check() { },
// this.selectCoupon.push(this.selectList) methods: {
this.$emit("selected", this.selectCoupon); check() { // 选中的优惠券
this.$emit("selected", this.selectList);
}, },
init() { init() {
this.getDataList(); this.getDataList();
}, },
add() { add() { // 跳转添加页面
this.$router.push({ name: "add-platform-coupon" }); this.$router.push({ name: "add-platform-coupon" });
}, },
/** 跳转至领取详情页面 */ info(v) { // 查看优惠券
receiveInfo(v) {
this.$router.push({ name: "member-receive-coupon", query: { id: v.id } });
},
info(v) {
this.$router.push({ name: "platform-coupon-info", query: { id: v.id } }); this.$router.push({ name: "platform-coupon-info", query: { id: v.id } });
}, },
changePage(v) { changePage(v) { // 改变页码
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
// this.clearSelectAll();
}, },
changePageSize(v) { changePageSize(v) { // 改变页数
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
handleSearch() { handleSearch() { // 搜索
this.searchForm.pageNumber = 0; this.searchForm.pageNumber = 0;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
changeSort(e) { clearSelectAll() { // 清除选中状态
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); 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) { changeSelect(e) {
if (this.checked && e.length != 0) {
this.selectCoupon.push(...e);
this.check();
}
this.selectList = e; this.selectList = e;
this.selectCount = e.length; this.selectCount = e.length;
if (this.getType === 'ACTIVITY') this.check()
}, },
getDataList() { getDataList() { // 获取数据
this.loading = true; this.loading = true;
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) { if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
this.searchForm.startTime = this.selectDate[0].getTime(); this.searchForm.startTime = this.selectDate[0].getTime();
@@ -346,18 +317,6 @@ export default {
getPlatformCouponList(this.searchForm).then((res) => { getPlatformCouponList(this.searchForm).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { 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.data = res.result.records;
this.total = res.result.total; this.total = res.result.total;
} }
@@ -365,43 +324,11 @@ export default {
this.total = this.data.length; this.total = this.data.length;
this.loading = false; this.loading = false;
}, },
handleSubmit() {
this.$refs.form.validate((valid) => { edit(v) { // 跳转编辑页面
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) {
this.$router.push({ name: "edit-platform-coupon", query: { id: v.id } }); this.$router.push({ name: "edit-platform-coupon", query: { id: v.id } });
}, },
remove(v) { remove(v) { // 下架优惠券
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认下架", title: "确认下架",
// 记得确认修改此处 // 记得确认修改此处
@@ -426,7 +353,7 @@ export default {
}, },
}); });
}, },
delAll() { delAll() { // 批量下架
if (this.selectCount <= 0) { if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要下架的优惠券"); this.$Message.warning("您还未选择要下架的优惠券");
return; 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() { mounted() {
//如果作为组件方式,传入了类型值,则搜索参数附加类型 //如果作为组件方式,传入了类型值,则搜索参数附加类型
if (this.getType) { if (this.getType) {
this.searchForm.getType = this.getType; this.searchForm.getType = this.getType;
this.columns.pop()
} }
this.init(); this.init();
}, },

View File

@@ -68,7 +68,7 @@
</div> </div>
<div v-if="rangeTimeType == 1"> <div v-if="rangeTimeType == 1">
<DatePicker type="datetimerange" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择" <DatePicker type="datetimerange" v-model="form.rangeTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择"
:options="options" style="width: 260px"> :options="options" style="width: 260px">
</DatePicker> </DatePicker>
</div> </div>
<div class="effectiveDays" v-if="rangeTimeType == 0"> <div class="effectiveDays" v-if="rangeTimeType == 0">
@@ -100,8 +100,8 @@
<FormItem v-if="form.scopeType == 'PORTION_GOODS_CATEGORY'"> <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> v-model="form.scopeIdGoods"></Cascader>
</FormItem> </FormItem>
<div> <div>
@@ -127,7 +127,7 @@ import {regular} from "@/utils";
import skuSelect from "@/views/lili-dialog"; import skuSelect from "@/views/lili-dialog";
export default { export default {
name: "addCoupon", name: "edit-platform-coupon",
components: { components: {
skuSelect, skuSelect,
}, },
@@ -140,6 +140,14 @@ export default {
}, },
deep: true, deep: true,
}, },
$route(e) { // 监听路由,参数变化调取接口
this.id = e.query.id;
if (this.id) {
this.getCoupon()
} else {
this.$refs.form.resetFields()
}
}
}, },
data() { data() {
const checkPrice = (rule, value, callback) => { const checkPrice = (rule, value, callback) => {
@@ -165,7 +173,7 @@ export default {
} }
}; };
return { return {
rangeTimeType: 1, rangeTimeType: 1, // 当前时间类型
modalType: 0, // 是否编辑 modalType: 0, // 是否编辑
form: { form: {
/** 店铺承担比例 */ /** 店铺承担比例 */
@@ -221,11 +229,11 @@ export default {
], ],
publishNum: [ publishNum: [
{required: true, message: "请输入发放数量"}, {required: true, message: "请输入发放数量"},
{pattern: regular.integer, message: "请输入正整数"}, {pattern: regular.Integer, message: "请输入正整数"},
], ],
couponLimitNum: [ couponLimitNum: [
{required: true, message: "领取限制不能为空"}, {required: true, message: "领取限制不能为空"},
{pattern: regular.integer, message: "请输入正整数"}, {pattern: regular.Integer, message: "请输入正整数"},
], ],
description: [{required: true, message: "请输入范围描述"}], description: [{required: true, message: "请输入范围描述"}],
}, },
@@ -289,7 +297,7 @@ export default {
}, },
}; };
}, },
async mounted() { async mounted () {
await this.getCagetoryList(); await this.getCagetoryList();
// 如果id不为空则查询信息 // 如果id不为空则查询信息
if (this.id) { if (this.id) {
@@ -495,7 +503,7 @@ export default {
async getCagetoryList() { async getCagetoryList() {
// 获取全部商品分类 // 获取全部商品分类
let data = await getCategoryTree(); let data = await getCategoryTree();
this.goodsCategoryList = this.filterCategory(data.result); this.goodsCategoryList = data.result;
// 过滤出可显示的值 // 过滤出可显示的值
this.goodsCategoryList = this.goodsCategoryList.map((item) => { this.goodsCategoryList = this.goodsCategoryList.map((item) => {
@@ -523,18 +531,7 @@ export default {
} }
return {value: item.id, label: item.name, children: item.children}; return {value: item.id, label: item.name, children: item.children};
}); });
}, console.log(this.goodsCategoryList);
filterCategory(list) {
// 递归删除空children
list.forEach((item) => {
if (item.children.length == 0) {
delete item.children;
} else {
this.filterCategory(item.children);
}
});
return list;
}, },
filterCategoryId(list, idArr) { filterCategoryId(list, idArr) {
// 递归获取分类id // 递归获取分类id

View File

@@ -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>

View File

@@ -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>

View File

@@ -7,7 +7,7 @@
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"> <Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom">
<template slot-scope="{ row,index }" slot="action"> <template slot-scope="{ row,index }" slot="action">
<Button type="primary" <Button type="info"
size="small" style="margin-right: 10px" @click="info(row)">查看 size="small" style="margin-right: 10px" @click="info(row)">查看
</Button> </Button>
<Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error" <Button v-if="!checked && row.promotionStatus === 'START' || row.promotionStatus === 'NEW'" type="error"

View File

@@ -275,14 +275,13 @@ export default {
this.reSelectCoupon(); this.reSelectCoupon();
}, },
reSelectCoupon() { reSelectCoupon() {
//清空原有数据 // 清空原有数据
this.form.couponActivityItems = this.selectCouponList.map((item) => { this.form.couponActivityItems = this.selectCouponList.map((item) => {
return { return {
num: 0, num: 0,
couponId: item.id, couponId: item.id,
} }
}); });
console.log(this.form.couponActivityItems)
}, },
// 添加指定用户 // 添加指定用户
@@ -308,7 +307,6 @@ export default {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
const params = JSON.parse(JSON.stringify(this.form)); const params = JSON.parse(JSON.stringify(this.form));
console.log(params);
this.submitLoading = true; this.submitLoading = true;
// 添加 避免编辑后传入id等数据 记得删除 // 添加 避免编辑后传入id等数据 记得删除
delete params.id; delete params.id;

View File

@@ -187,11 +187,11 @@ export default {
], ],
publishNum: [ publishNum: [
{ required: true, message: "请输入发放数量" }, { required: true, message: "请输入发放数量" },
{ pattern: regular.integer, message: "请输入正整数" }, { pattern: regular.Integer, message: "请输入正整数" },
], ],
couponLimitNum: [ couponLimitNum: [
{ required: true, message: "请输入领取限制" }, { required: true, message: "请输入领取限制" },
{ pattern: regular.integer, message: "请输入正整数" }, { pattern: regular.Integer, message: "请输入正整数" },
], ],
description: [{ required: true, message: "请输入范围描述" }], description: [{ required: true, message: "请输入范围描述" }],
}, },

View File

@@ -8,7 +8,7 @@
<!-- 遮罩层 --> <!-- 遮罩层 -->
<div v-if="isRead" class="mask">只读不可修改</div> <div v-if="isRead" class="mask">只读不可修改</div>
<div> <div>
<FormItem label="会员名称" required prop="memberName"> <FormItem label="会员名称" prop="memberName">
<div class="item"> <div class="item">
<Input disabled v-model="shopForm.memberName" /> <Input disabled v-model="shopForm.memberName" />
<Button @click="selectMember()" v-if="!$route.query.shopId">选择会员</Button> <Button @click="selectMember()" v-if="!$route.query.shopId">选择会员</Button>
@@ -44,7 +44,7 @@
<FormItem label="店铺所在地" prop="storeAddressPath"> <FormItem label="店铺所在地" prop="storeAddressPath">
<Input disabled v-model="shopForm.storeAddressPath" style="width: 350px" /> <Input disabled v-model="shopForm.storeAddressPath" style="width: 350px" />
</FormItem> </FormItem>
<FormItem label="店铺详细地址" required prop="storeAddressDetail"> <FormItem label="店铺详细地址" prop="storeAddressDetail">
<Input v-model="shopForm.storeAddressDetail" clearable style="width: 350px" /> <Input v-model="shopForm.storeAddressDetail" clearable style="width: 350px" />
</FormItem> </FormItem>
@@ -91,60 +91,60 @@
<div v-if="isRead" class="mask">只读不可修改</div> <div v-if="isRead" class="mask">只读不可修改</div>
<Divider orientation="left">公司信息</Divider> <Divider orientation="left">公司信息</Divider>
<div> <div>
<FormItem label="公司名称" required prop="companyName"> <FormItem label="公司名称" prop="companyName">
<Input v-model="shopForm.companyName" clearable style="width: 350px" /> <Input v-model="shopForm.companyName" clearable style="width: 350px" />
</FormItem> </FormItem>
<FormItem label="公司电话" required prop="companyPhone"> <FormItem label="公司电话" prop="companyPhone">
<Input v-model="shopForm.companyPhone" clearable style="width: 350px" /> <Input v-model="shopForm.companyPhone" clearable style="width: 350px" />
</FormItem> </FormItem>
<FormItem label="公司所在地" required> <FormItem label="公司所在地" >
<Input v-model="shopForm.companyAddressPath" disabled style="width: 260px" v-if="showRegion == false" /> <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 v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary" icon="ios-create-outline" style="margin-left: 8px">修改
</Button> </Button>
<region style="width: 350px" @selected="selectedRegion" v-if="showRegion == true" /> <region style="width: 350px" @selected="selectedRegion" v-if="showRegion == true" />
</FormItem> </FormItem>
<FormItem label="公司详细地址" required prop="companyAddress"> <FormItem label="公司详细地址" prop="companyAddress">
<Input v-model="shopForm.companyAddress" clearable style="width: 350px" /> <Input v-model="shopForm.companyAddress" clearable style="width: 350px" />
</FormItem> </FormItem>
<FormItem label="员工总数" required prop="employeeNum"> <FormItem label="员工总数" prop="employeeNum">
<InputNumber style="width: 150px" :min="1" :max="9999999" v-model="shopForm.employeeNum"> <InputNumber style="width: 150px" :min="1" :max="9999999" v-model="shopForm.employeeNum">
</InputNumber> </InputNumber>
</FormItem> </FormItem>
<FormItem label="注册资金" required prop="registeredCapital"> <FormItem label="注册资金" prop="registeredCapital">
<InputNumber style="width: 150px" :min="1" :max="9999999" v-model="shopForm.registeredCapital"> <InputNumber style="width: 150px" :min="1" :max="9999999" v-model="shopForm.registeredCapital">
</InputNumber> </InputNumber>
<span style="margin-left: 10px"></span> <span style="margin-left: 10px"></span>
</FormItem> </FormItem>
<FormItem label="联系人姓名" required prop="linkName"> <FormItem label="联系人姓名" prop="linkName">
<Input v-model="shopForm.linkName" clearable style="width: 200px" /> <Input v-model="shopForm.linkName" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="联系人手机" required prop="linkPhone"> <FormItem label="联系人手机" prop="linkPhone">
<Input v-model="shopForm.linkPhone" maxlength="11" clearable style="width: 200px" /> <Input v-model="shopForm.linkPhone" maxlength="11" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="电子邮箱" required prop="companyEmail"> <FormItem label="电子邮箱" prop="companyEmail">
<Input v-model="shopForm.companyEmail" clearable style="width: 200px" /> <Input v-model="shopForm.companyEmail" clearable style="width: 200px" />
</FormItem> </FormItem>
<Divider orientation="left">营业执照信息</Divider> <Divider orientation="left">营业执照信息</Divider>
<FormItem label="营业执照号" required prop="licenseNum"> <FormItem label="营业执照号" prop="licenseNum">
<Input v-model="shopForm.licenseNum" clearable style="width: 200px" /> <Input v-model="shopForm.licenseNum" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="法定经营范围" required prop="scope"> <FormItem label="法定经营范围" prop="scope">
<Input v-model="shopForm.scope" clearable style="width: 200px" /> <Input v-model="shopForm.scope" clearable style="width: 200px" />
</FormItem> </FormItem>
<Divider orientation="left">法人信息</Divider> <Divider orientation="left">法人信息</Divider>
<FormItem label="法人姓名" required prop="legalName"> <FormItem label="法人姓名" prop="legalName">
<Input v-model="shopForm.legalName" clearable style="width: 200px" /> <Input v-model="shopForm.legalName" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="法人证件号" required prop="legalId"> <FormItem label="法人证件号" prop="legalId">
<Input v-model="shopForm.legalId" clearable style="width: 200px" /> <Input v-model="shopForm.legalId" clearable style="width: 200px" />
</FormItem> </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" /> <Avatar style="height: 100px;width: 100px" v-if="shopForm.legalPhoto" shape="square" icon="ios-person" size="default" :src="shopForm.legalPhoto" />
<div> <div>
<Button @click="handleCLickImg('legalPhoto')" type="primary">选择图片</Button> <Button @click="handleCLickImg('legalPhoto')" type="primary">选择图片</Button>
@@ -152,20 +152,20 @@
</FormItem> </FormItem>
<Divider orientation="left">结算银行信息</Divider> <Divider orientation="left">结算银行信息</Divider>
<FormItem label="银行开户名" required prop="settlementBankAccountName"> <FormItem label="银行开户名" prop="settlementBankAccountName">
<Input v-model="shopForm.settlementBankAccountName" clearable style="width: 200px" /> <Input v-model="shopForm.settlementBankAccountName" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="银行账号" required prop="settlementBankAccountNum"> <FormItem label="银行账号" prop="settlementBankAccountNum">
<Input v-model="shopForm.settlementBankAccountNum" clearable style="width: 200px" /> <Input v-model="shopForm.settlementBankAccountNum" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="银行支行名称" required prop="settlementBankBranchName"> <FormItem label="银行支行名称" prop="settlementBankBranchName">
<Input v-model="shopForm.settlementBankBranchName" clearable style="width: 200px" /> <Input v-model="shopForm.settlementBankBranchName" clearable style="width: 200px" />
</FormItem> </FormItem>
<FormItem label="支行联行号" required prop="settlementBankJointName"> <FormItem label="支行联行号" prop="settlementBankJointName">
<Input v-model="shopForm.settlementBankJointName" clearable style="width: 200px" /> <Input v-model="shopForm.settlementBankJointName" clearable style="width: 200px" />
</FormItem> </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" /> <Avatar style="height: 100px;width: 100px" v-if="shopForm.licencePhoto" shape="square" icon="ios-person" size="default" :src="shopForm.licencePhoto" />
<div> <div>
<Button @click="handleCLickImg('licencePhoto')" type="primary">选择图片</Button> <Button @click="handleCLickImg('licencePhoto')" type="primary">选择图片</Button>
@@ -262,28 +262,28 @@ export default {
shopValidate: { shopValidate: {
// 表单验证规则 // 表单验证规则
memberName: [ memberName: [
{ required: true, message: "会员不能为空", trigger: "blur" }, { required: true, message: "会员不能为空" },
], ],
storeName: [ storeName: [
{ required: true, message: "店铺名称不能为空", trigger: "blur" }, { required: true, message: "店铺名称不能为空" },
], ],
companyAddress: [ companyAddress: [
{ required: true, message: "公司地址不能为空", trigger: "blur" }, { required: true, message: "公司地址不能为空" },
], ],
storeAddressDetail: [ storeAddressDetail: [
{ required: true, message: "店铺详细地址不能为空", trigger: "blur" }, { required: true, message: "店铺详细地址不能为空" },
], ],
storeDesc: [ storeDesc: [
{ required: true, message: "店铺简介不能为空", trigger: "blur" }, { required: true, message: "店铺简介不能为空" },
], ],
storeCenter: [ storeCenter: [
{ required: true, message: "店铺未定位", trigger: "change" }, { required: true, message: "店铺未定位" },
], ],
companyName: [ companyName: [
{ required: true, message: "公司名称不能为空", trigger: "blur" }, { required: true, message: "公司名称不能为空", },
], ],
companyPhone: [ companyPhone: [
{ required: true, message: "公司电话不能为空", trigger: "blur" }, { required: true, message: "公司电话不能为空", },
], ],
employeeNum: [ employeeNum: [
{ {
@@ -302,10 +302,10 @@ export default {
}, },
], ],
linkName: [ linkName: [
{ required: true, message: "联系人姓名不能为空", trigger: "blur" }, { required: true, message: "联系人姓名不能为空", },
], ],
linkPhone: [ linkPhone: [
{ required: true, message: "联系人手机号不能为空", trigger: "blur" }, { required: true, message: "联系人手机号不能为空", },
{ {
type: "string", type: "string",
pattern: /^1[3|4|5|6|7|8][0-9]{9}$/, pattern: /^1[3|4|5|6|7|8][0-9]{9}$/,
@@ -314,32 +314,32 @@ export default {
}, },
], ],
companyEmail: [ companyEmail: [
{ required: true, message: "邮箱不能为空", trigger: "blur" }, { required: true, message: "邮箱不能为空", },
{ type: "email", message: "邮箱格式错误", trigger: "blur" }, { type: "email", message: "邮箱格式错误", },
], ],
licenseNum: [ licenseNum: [
{ required: true, message: "营业执照号不能为空", trigger: "blur" }, { required: true, message: "营业执照号不能为空", },
], ],
scope: [ scope: [
{ required: true, message: "法定经营范围不能为空", trigger: "blur" }, { required: true, message: "法定经营范围不能为空", },
], ],
legalName: [ legalName: [
{ required: true, message: "法人姓名不能为空", trigger: "blur" }, { required: true, message: "法人姓名不能为空", },
], ],
legalId: [ legalId: [
{ required: true, message: "法人证件号不能为空", trigger: "blur" }, { required: true, message: "法人证件号不能为空", },
], ],
settlementBankAccountName: [ settlementBankAccountName: [
{ required: true, message: "银行开户名不能为空", trigger: "blur" }, { required: true, message: "银行开户名不能为空", },
], ],
settlementBankAccountNum: [ settlementBankAccountNum: [
{ required: true, message: "银行账号不能为空", trigger: "blur" }, { required: true, message: "银行账号不能为空", },
], ],
settlementBankBranchName: [ settlementBankBranchName: [
{ required: true, message: "银行支行名称不能为空", trigger: "blur" }, { required: true, message: "银行支行名称不能为空", },
], ],
settlementBankJointName: [ settlementBankJointName: [
{ required: true, message: "支行联行号不能为空", trigger: "blur" }, { required: true, message: "支行联行号不能为空", },
], ],
salesConsigneeMobile: [ salesConsigneeMobile: [
{ {

View File

@@ -146,7 +146,10 @@
<div> <div>
<h4>订退单统计</h4> <h4>订退单统计</h4>
<div class="breadcrumb" style="margin-bottom:20px;"> <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>
<div> <div>
<Table stripe :columns="columns" :data="data"></Table> <Table stripe :columns="columns" :data="data"></Table>
@@ -173,17 +176,8 @@ export default {
data() { data() {
return { return {
orderOrRefund: true, // 订单还是单
total: "0", // 总数 total: "0", // 总数
orderType: [ // 订单类型
{
title: "订单",
selected: true,
},
{
title: "退单",
selected: false,
},
],
// 订单状态 // 订单状态
orderStatusList: { orderStatusList: {
UNDELIVERED: "待发货", UNDELIVERED: "待发货",
@@ -459,20 +453,17 @@ export default {
}, },
deep: true, deep: true,
}, },
orderOrRefund:{ // 订单还是退单
handler (val) {
if (val) {
this.getOrderList();
} else {
this.getOrderRefundList();
}
}
}
}, },
methods: { 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() { initOrderChart() {
// 默认已经加载 legend-filter 交互 // 默认已经加载 legend-filter 交互

View File

@@ -12,13 +12,7 @@
<Input type='number' v-model="formValidate.autoReceive"> <Input type='number' v-model="formValidate.autoReceive">
<span slot="append"></span> <span slot="append"></span>
</Input> </Input>
<span class="desc">收货后订单完成</span>
</FormItem>
<FormItem label="订单自动完成" prop="autoComplete">
<Input type='number' v-model="formValidate.autoComplete">
<span slot="append"></span>
</Input>
</FormItem> </FormItem>
<FormItem label="自动评价" prop="autoEvaluation"> <FormItem label="自动评价" prop="autoEvaluation">
@@ -27,11 +21,17 @@
</Input> </Input>
</FormItem> </FormItem>
<FormItem label="售后自动取消" prop="autoCancelAfterSale"> <FormItem label="已完成订单允许退单" prop="closeAfterSale">
<Input type='number' v-model="formValidate.autoCancelAfterSale"> <Input type='number' v-model="formValidate.closeAfterSale">
<span slot="append"></span> <span slot="append"></span>
</Input> </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> </FormItem>
<div class="label-btns"> <div class="label-btns">
@@ -50,10 +50,10 @@ export default {
ruleValidate: {}, // 验证规则 ruleValidate: {}, // 验证规则
formValidate: { // 表单数据 formValidate: { // 表单数据
autoCancel: "", autoCancel: "",
autoComplete: "",
autoEvaluation: "", autoEvaluation: "",
autoReceive: "", autoReceive: "",
autoCancelAfterSale: "", closeAfterSale: "",
closeComplaint:""
}, },
}; };
}, },
@@ -121,4 +121,8 @@ export default {
/deep/ .ivu-input { /deep/ .ivu-input {
width: 100px !important; width: 100px !important;
} }
.desc {
font-size: 12px;
color: #999;
}
</style> </style>

View File

@@ -13,8 +13,6 @@
:data="data" :data="data"
ref="table" ref="table"
sortable="custom" sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
> >
<!-- 商品栏目格式化 --> <!-- 商品栏目格式化 -->
<template slot="imageSlot" slot-scope="scope"> <template slot="imageSlot" slot-scope="scope">
@@ -53,8 +51,6 @@
:data="data" :data="data"
ref="table" ref="table"
sortable="custom" sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
> >
<!-- 商品栏目格式化 --> <!-- 商品栏目格式化 -->
<template slot="imageSlot" slot-scope="scope"> <template slot="imageSlot" slot-scope="scope">
@@ -99,7 +95,7 @@
/> />
</FormItem> </FormItem>
<FormItem label="图片" prop="resource"> <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>
<FormItem label="类型" prop="type"> <FormItem label="类型" prop="type">
<radio-group v-model="form.type" type="button"> <radio-group v-model="form.type" type="button">
@@ -119,15 +115,16 @@
</template> </template>
<script> <script>
import * as API_Setting from "@/api/setting"; import * as API_Setting from "@/api/setting";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default { export default {
components: {
uploadPicInput,
},
data() { data() {
return { return {
modalVisible: false, //添加验证码源弹出框 modalVisible: false, //添加验证码源弹出框
modalTitle: "", //添加验证码源弹出框标题 modalTitle: "", //添加验证码源弹出框标题
loading: true, // 表单加载状态 loading: true, // 表单加载状态
selectList: [], // 多选数据
selectCount: 0, // 多选计数
modalType: 0, // 添加或编辑标识 modalType: 0, // 添加或编辑标识
submitLoading: false, // 添加或编辑提交状态 submitLoading: false, // 添加或编辑提交状态
form: { form: {
@@ -250,11 +247,6 @@ export default {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
this.getDataList();
},
//切换tab //切换tab
handleClickType(v) { handleClickType(v) {
this.searchForm.pageNumber = 1; // 当前页数 this.searchForm.pageNumber = 1; // 当前页数
@@ -281,15 +273,12 @@ export default {
}); });
this.loading = false; this.loading = false;
}, },
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
//添加验证码源 //添加验证码源
add() { add() {
this.form.type = this.searchForm.type; this.form.type = this.searchForm.type;
this.modalVisible = true; this.modalVisible = true;
this.modalType = 0; this.modalType = 0;
this.$refs.form.resetFields()
this.modalTitle = "添加验证码源"; this.modalTitle = "添加验证码源";
}, },
//修改验证码源 //修改验证码源

View File

@@ -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 .

View File

@@ -30,7 +30,6 @@
"stompjs": "^2.3.3", "stompjs": "^2.3.3",
"swiper": "^6.3.5", "swiper": "^6.3.5",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"view-design": "^4.2.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-awesome": "^4.0.2", "vue-awesome": "^4.0.2",
"vue-awesome-swiper": "^4.1.1", "vue-awesome-swiper": "^4.1.1",
@@ -59,6 +58,7 @@
"less-loader": "^6.2.0", "less-loader": "^6.2.0",
"style-loader": "^2.0.0", "style-loader": "^2.0.0",
"style-resources-loader": "^1.3.2", "style-resources-loader": "^1.3.2",
"view-design": "^4.6.1",
"vue-cli-plugin-style-resources-loader": "^0.1.4", "vue-cli-plugin-style-resources-loader": "^0.1.4",
"vue-template-compiler": "^2.6.10" "vue-template-compiler": "^2.6.10"
} }

View File

@@ -12,6 +12,10 @@ export const verificationCode = verificationCode => {
export const downLoadDeliverExcel = params => { export const downLoadDeliverExcel = params => {
return getRequest(`/orders/downLoadDeliverExcel`, params, 'blob'); 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) => { export const getTraces = (sn, params) => {
return postRequest(`/orders/getTraces/${sn}`, params); return getRequest(`/orders/getTraces/${sn}`, params);
}; };
//售后单查询物流 //售后单查询物流
export const getSellerDeliveryTraces = (sn, params) => { export const getSellerDeliveryTraces = (sn, params) => {

View File

@@ -18,17 +18,16 @@ export default {
* @description api请求基础路径 * @description api请求基础路径
*/ */
api_dev: { api_dev: {
common: 'https://common-api.pickmall.cn', common: "https://common-api.pickmall.cn",
buyer: 'https://buyer-api.pickmall.cn', buyer: "https://buyer-api.pickmall.cn",
seller: 'https://store-api.pickmall.cn', seller: "https://store-api.pickmall.cn",
manager: 'https://admin-api.pickmall.cn', manager: "https://admin-api.pickmall.cn"
}, },
api_prod: { api_prod: {
common: 'https://common-api.pickmall.cn', common: "https://common-api.pickmall.cn",
buyer: 'https://buyer-api.pickmall.cn', buyer: "https://buyer-api.pickmall.cn",
seller: 'https://store-api.pickmall.cn', seller: "https://store-api.pickmall.cn",
manager: 'https://admin-api.pickmall.cn' manager: "https://admin-api.pickmall.cn"
}, },
/** /**
* @description api请求基础路径前缀 * @description api请求基础路径前缀

View File

@@ -0,0 +1,3 @@
import Vue from "vue";
export default new Vue;

View File

@@ -35,12 +35,6 @@ export const otherRouter = {
name: "message_index", name: "message_index",
component: () => import("@/views/message/message.vue") component: () => import("@/views/message/message.vue")
}, },
{
path: "stock-goods",
title: "店铺端商品库存告警列表",
name: "stock-goods",
component: () => import("@/views/goods/goods-seller/goodsStock.vue")
},
{ {
path: "goods-operation", path: "goods-operation",
title: "添加商品", title: "添加商品",

View File

@@ -24,7 +24,6 @@
<Avatar :src="userInfo.storeLogo" style="background: #fff;margin-left: 10px;"></Avatar> <Avatar :src="userInfo.storeLogo" style="background: #fff;margin-left: 10px;"></Avatar>
</div> </div>
<DropdownMenu slot="list"> <DropdownMenu slot="list">
<!-- <DropdownItem name="ownSpace">{{ $t('userCenter') }}</DropdownItem> -->
<DropdownItem name="changePass">{{ $t('changePass') }}</DropdownItem> <DropdownItem name="changePass">{{ $t('changePass') }}</DropdownItem>
<DropdownItem name="loginOut" divided>{{ $t('logout') }}</DropdownItem> <DropdownItem name="loginOut" divided>{{ $t('logout') }}</DropdownItem>
</DropdownMenu> </DropdownMenu>
@@ -53,9 +52,6 @@
<script> <script>
import shrinkableMenu from "./main-components/shrinkable-menu/shrinkable-menu.vue"; import shrinkableMenu from "./main-components/shrinkable-menu/shrinkable-menu.vue";
import tagsPageOpened from "./main-components/tags-page-opened.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 circleLoading from "@/views/my-components/lili/circle-loading.vue";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import util from "@/libs/util.js"; import util from "@/libs/util.js";
@@ -64,10 +60,7 @@ export default {
components: { components: {
shrinkableMenu, shrinkableMenu,
tagsPageOpened, tagsPageOpened,
breadcrumbNav, circleLoading
fullScreen,
messageTip,
circleLoading,
}, },
data() { data() {
return { return {

View File

@@ -27,7 +27,7 @@
type="primary" type="primary"
style="width: 100px;margin-right:5px" style="width: 100px;margin-right:5px"
:loading="savePassLoading" :loading="savePassLoading"
@click="saveEditPass" @click="editPassword"
>保存</Button> >保存</Button>
<Button @click="cancelEditPass">取消</Button> <Button @click="cancelEditPass">取消</Button>
</FormItem> </FormItem>
@@ -61,6 +61,7 @@ export default {
rePass: "" // 从新输入新密码 rePass: "" // 从新输入新密码
}, },
strength: "", // 密码强度 strength: "", // 密码强度
// 验证规则
passwordValidate: { passwordValidate: {
oldPass: [ oldPass: [
{ {
@@ -101,10 +102,12 @@ export default {
}; };
}, },
methods: { methods: {
// 新密码回调
changeInputPass(v, grade, strength) { changeInputPass(v, grade, strength) {
this.strength = strength; this.strength = strength;
}, },
saveEditPass() { // 修改密码
editPassword() {
let params = { let params = {
password: this.md5(this.editPasswordForm.oldPass), password: this.md5(this.editPasswordForm.oldPass),
newPassword: this.md5(this.editPasswordForm.newPassword) newPassword: this.md5(this.editPasswordForm.newPassword)
@@ -131,6 +134,7 @@ export default {
} }
}); });
}, },
// 取消修改密码
cancelEditPass() { cancelEditPass() {
this.$store.commit("removeTag", "change_pass"); this.$store.commit("removeTag", "change_pass");
localStorage.storeOpenedList = JSON.stringify( localStorage.storeOpenedList = JSON.stringify(
@@ -147,11 +151,9 @@ export default {
name: lastPageName name: lastPageName
}); });
} }
}, }
mounted() {}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.change-pass { .change-pass {
&-btn-box { &-btn-box {

View File

@@ -6,19 +6,13 @@
<Form-item label="商品名称" prop="goodsName"> <Form-item label="商品名称" prop="goodsName">
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px"/> <Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px"/>
</Form-item> </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> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row> </Row>
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button @click="add" type="primary">添加</Button> <Button @click="add" type="primary">添加</Button>
<!-- <Button @click="add" type="default">批量删除</Button>-->
</Row> </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}"> <template slot="goodsSlot" slot-scope="{row}">
<div style="margin-top: 5px;height: 70px; display: flex;"> <div style="margin-top: 5px;height: 70px; display: flex;">
@@ -92,9 +86,6 @@ export default {
submitLoading: false, // 添加或编辑提交状态 submitLoading: false, // 添加或编辑提交状态
shopList:[], // 店铺列表 shopList:[], // 店铺列表
loading: true, // 表单加载状态 loading: true, // 表单加载状态
drop: false,
dropDownContent: "展开",
dropDownIcon: "ios-arrow-down",
searchForm: { // 搜索框初始化对象 searchForm: { // 搜索框初始化对象
pageNumber: 1, // 当前页数 pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小 pageSize: 10, // 页面大小
@@ -115,7 +106,7 @@ export default {
trigger: "change" trigger: "change"
}], }],
}, },
columns: [ // 表表头 columns: [ // 表表头
{ {
type: "selection", type: "selection",
width: 60, width: 60,
@@ -188,30 +179,29 @@ export default {
}; };
}, },
methods: { methods: {
init() { init() { // 初始化数据
this.getDataList(); this.getDataList();
// this.getShopList()
}, },
// 选择商品回调
selectedGoodsData(v){ selectedGoodsData(v){
this.modalVisible = true this.modalVisible = true
this.form.commission = 1 this.form.commission = 1
this.modalTitle = "保存分销商品" this.modalTitle = "保存分销商品"
this.skuId = v[0].id this.skuId = v[0].id
//this.data.unshift(v[0])
}, },
// 添加商品modal
add(){ add(){
this.$refs.liliDialog.flag = true;
this.$refs.liliDialog.flag = true;
this.$refs.liliDialog.goodsFlag = true; this.$refs.liliDialog.goodsFlag = true;
this.$refs.liliDialog.singleGoods(); this.$refs.liliDialog.singleGoods();
}, },
// 改变页码
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
this.clearSelectAll(); this.$refs.table.selectAll(false);
}, },
// 添加商品
handleSubmit(){ handleSubmit(){
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
@@ -225,28 +215,18 @@ export default {
} }
}) })
}, },
// 改变页数
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
// 搜索
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); 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() { getDataList() {
this.loading = true; this.loading = true;
// 带多条件搜索参数获取表单数据 请自行修改接口 // 带多条件搜索参数获取表单数据 请自行修改接口
@@ -260,6 +240,7 @@ export default {
this.total = this.data.length; this.total = this.data.length;
this.loading = false; this.loading = false;
}, },
// 删除商品
remove(v) { remove(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认删除", title: "确认删除",
@@ -278,6 +259,7 @@ export default {
} }
}); });
}, },
// 获取店铺列表 搜索项用
getShopList (val) { getShopList (val) {
const params = { const params = {
pageNumber:1, pageNumber:1,

View File

@@ -1,19 +1,17 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> <Form ref="searchForm" :model="searchForm" inline :label-width="70" @keydown.enter.native="handleSearch" class="search-form">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form-item label="订单编号" prop="orderSn">
<Form-item label="订单编号" prop="orderSn"> <Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单编号" clearable style="width: 200px" />
<Input type="text" v-model="searchForm.orderSn" placeholder="请输入订单编号" clearable style="width: 200px" /> </Form-item>
</Form-item> <Form-item label="订单时间">
<Form-item label="订单时间"> <DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间" style="width: 210px"></DatePicker>
<DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间" style="width: 210px"></DatePicker> </Form-item>
</Form-item> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> </Form>
</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"> <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" <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> show-total show-elevator show-sizer></Page>
@@ -35,8 +33,6 @@ export default {
timeRange: [], // 范围时间 timeRange: [], // 范围时间
orderStatusList, // 订单状态列表 orderStatusList, // 订单状态列表
distributionId: this.$route.query.id, // 分销id distributionId: this.$route.query.id, // 分销id
openSearch: true, // 显示搜索
openTip: true, // 显示提示
loading: true, // 表单加载状态 loading: true, // 表单加载状态
searchForm: { searchForm: {
// 搜索框初始化对象 // 搜索框初始化对象
@@ -133,23 +129,26 @@ export default {
}; };
}, },
methods: { methods: {
init() { init() { // 初始化数据
this.getDataList(); this.getDataList();
}, },
// 改变页码
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
}, },
// 改变页数
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
// 搜索
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
// 获取订单数据
getDataList() { getDataList() {
this.searchForm.distributionId = this.distributionId; this.searchForm.distributionId = this.distributionId;
this.loading = true; this.loading = true;

View File

@@ -126,13 +126,16 @@ export default {
template: "action", template: "action",
} }
], ],
// 表格数据
tableData: [] tableData: []
}; };
}, },
methods: { methods: {
// 初始化数据
init() { init() {
this.getAllList(); this.getAllList();
}, },
// 刷新列表
refresh() { refresh() {
this.loading = true; this.loading = true;
let that = this; let that = this;
@@ -152,6 +155,7 @@ export default {
this.formAdd.parentId = v.id; this.formAdd.parentId = v.id;
this.modalVisible = true; this.modalVisible = true;
}, },
// 编辑分类
edit(v) { edit(v) {
this.modalType = 1; this.modalType = 1;
this.modalTitle = "编辑"; this.modalTitle = "编辑";
@@ -209,6 +213,7 @@ export default {
} }
}); });
}, },
// 确认删除分类
remove(v) { remove(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认删除", title: "确认删除",
@@ -227,6 +232,7 @@ export default {
} }
}); });
}, },
// 获取分类
getAllList() { getAllList() {
this.loading = true; this.loading = true;
API_Goods.getShopGoodsLabelList(this.searchForm).then((res) => { API_Goods.getShopGoodsLabelList(this.searchForm).then((res) => {

View File

@@ -77,10 +77,6 @@
} }
} }
/*平铺*/
div.base-info-item > div {
margin-left: 5%;
}
div.base-info-item { div.base-info-item {
h4 { h4 {
@@ -94,13 +90,15 @@ div.base-info-item {
line-height: 40px; line-height: 40px;
text-align: left; text-align: left;
} }
>div{
padding-left: 5%;
}
.form-item-view { .form-item-view {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
justify-content: space-between; justify-content: space-between;
padding-left: 80px; // padding-left: 80px;
.layout { .layout {
margin-bottom: 20px; margin-bottom: 20px;
@@ -282,34 +280,13 @@ div.base-info-item {
word-break: break-all; word-break: break-all;
} }
/deep/ .ivu-steps {
width: 100% !important;
display: flex;
}
.step-list { .step-list {
height: 60px; height: 60px;
padding: 10px 30px;
background-color: #fff;
margin-bottom: 20px; margin-bottom: 20px;
border-radius: 0.8em; border-radius: 0.8em;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); 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 { .add-sku-btn {

View File

@@ -1,66 +1,64 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> <Form
<Form ref="searchForm"
ref="searchForm" :model="searchForm"
:model="searchForm" inline
inline :label-width="70"
:label-width="70" class="search-form mb_10"
class="search-form" @keydown.enter.native="handleSearch"
> >
<Form-item label="商品名称" prop="goodsName"> <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 <Input
type="text" type="text"
v-model="searchForm.goodsName" v-model="searchForm.sn"
placeholder="请输入商品名称" placeholder="商品编号"
clearable clearable
style="width: 200px" style="width: 200px"
/> />
</Form-item> </Form-item>
<span v-if="drop"> </span>
<Form-item label="状态" prop="status"> <Form-item style="margin-left: -35px" class="br">
<Select <Button @click="handleSearch" type="primary" icon="ios-search"
v-model="searchForm.marketEnable" >搜索</Button
placeholder="请选择" >
clearable <Button @click="handleReset">重置</Button>
style="width: 200px" <a class="drop-down" @click="dropDown">
> {{ dropDownContent }}
<Option value="DOWN">下架</Option> <Icon :type="dropDownIcon"></Icon>
<Option value="UPPER">上架</Option> </a>
</Select> </Form-item>
</Form-item> </Form>
<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>
<Table <Table
:loading="loading" :loading="loading"
border border
:columns="columns" :columns="columns"
:data="data" :data="data"
ref="table" ref="table"
class="mt_10"
sortable="custom" sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table> ></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page <Page
@@ -77,29 +75,6 @@
></Page> ></Page>
</Row> </Row>
</Card> </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> </div>
</template> </template>
@@ -110,11 +85,7 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
id: "", //要操作的id
openSearch: true, // 显示搜索
loading: true, // 表单加载状态 loading: true, // 表单加载状态
modalVisible: false, // 添加或编辑显示
modalTitle: "", // 添加或编辑标题
drop: false, drop: false,
dropDownContent: "展开", dropDownContent: "展开",
dropDownIcon: "ios-arrow-down", dropDownIcon: "ios-arrow-down",
@@ -124,24 +95,8 @@ export default {
pageSize: 10, // 页面大小 pageSize: 10, // 页面大小
sort: "create_time", // 默认排序字段 sort: "create_time", // 默认排序字段
order: "desc", // 默认排序方式 order: "desc", // 默认排序方式
saveType: "TEMPLATE"
}, },
underForm: { // 下架表单
reason: "",
},
form: {
// 添加或编辑表单对象初始化数据
goodsName: "",
sn: "",
marketEnable: "",
price: "",
sellerName: "",
},
// 表单验证规则
formValidate: {},
submitLoading: false, // 添加或编辑提交状态
selectList: [], // 多选数据
selectCount: 0, // 多选计数
columns: [ // 表头 columns: [ // 表头
{ {
title: "ID", title: "ID",
@@ -202,7 +157,7 @@ export default {
"Button", "Button",
{ {
props: { props: {
type: "primary", type: "success",
size: "small", size: "small",
}, },
style: { style: {
@@ -243,23 +198,16 @@ export default {
}; };
}, },
methods: { methods: {
init() { 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";
}
this.getDataList(); this.getDataList();
}, },
// 编辑模板
editGoods(v) { editGoods(v) {
this.searchForm.saveType === "TEMPLATE" ? this.$router.push({ name: "goods-template-operation-edit", query: { draftId: v.id } })
this.$router.push({ name: "goods-template-operation-edit", query: { draftId: v.id } }):
this.$router.push({ name: "goods-draft-operation-edit", query: { draftId: v.id } });
}, },
// 删除模板
removeDraft (id) { removeDraft (id) {
let showType = this.searchForm.saveType === "TEMPLATE" ? "模版" : "草稿"; let showType = "模版";
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认审核", title: "确认审核",
content: "您确认要删除id为 " + id + " 的" + showType + "吗?", content: "您确认要删除id为 " + id + " 的" + showType + "吗?",
@@ -275,20 +223,23 @@ export default {
}, },
}); });
}, },
// 改变页数
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
this.clearSelectAll();
}, },
// 改变页码
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
// 搜索
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
// 重置
handleReset() { handleReset() {
this.$refs.searchForm.resetFields(); this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
@@ -296,21 +247,7 @@ export default {
// 重新加载数据 // 重新加载数据
this.getDataList(); 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() { dropDown() {
if (this.drop) { if (this.drop) {
this.dropDownContent = "展开"; this.dropDownContent = "展开";
@@ -321,6 +258,7 @@ export default {
} }
this.drop = !this.drop; this.drop = !this.drop;
}, },
// 获取列表数据
getDataList() { getDataList() {
this.loading = true; this.loading = true;
// 带多条件搜索参数获取表单数据 // 带多条件搜索参数获取表单数据

View File

@@ -41,7 +41,7 @@
</Dropdown> </Dropdown>
</Row> </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}"> <template slot="goodsSlot" slot-scope="{row}">
<div style="margin-top: 5px;height: 90px; display: flex;"> <div style="margin-top: 5px;height: 90px; display: flex;">
@@ -64,7 +64,6 @@
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page"> <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" <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> show-total show-elevator show-sizer></Page>
@@ -74,7 +73,7 @@
<Modal title="更新库存" v-model="updateStockModalVisible" :mask-closable="false" :width="500"> <Modal title="更新库存" v-model="updateStockModalVisible" :mask-closable="false" :width="500">
<Tabs value="updateStock"> <Tabs value="updateStock">
<TabPane label="手动规格更新" name="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>
<TabPane label="批量规格更新" name="stockAll"> <TabPane label="批量规格更新" name="stockAll">
<Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" /> <Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" />
@@ -123,7 +122,7 @@ export default {
return { return {
id: "", //要操作的id id: "", //要操作的id
loading: true, // 表单加载状态 loading: true, // 表单加载状态
shipTemplateForm: {}, shipTemplateForm: {}, // 物流模板
shipTemplateModal: false, // 物流模板是否显示 shipTemplateModal: false, // 物流模板是否显示
logisticsTemplate: [], // 物流列表 logisticsTemplate: [], // 物流列表
updateStockModalVisible: false, // 更新库存模态框显隐 updateStockModalVisible: false, // 更新库存模态框显隐
@@ -382,12 +381,14 @@ export default {
}; };
}, },
methods: { methods: {
init() { init() { // 初始化数据
this.getDataList(); this.getDataList();
}, },
// 添加商品
addGoods() { addGoods() {
this.$router.push({ name: "goods-operation" }); this.$router.push({ name: "goods-operation" });
}, },
// 编辑商品
editGoods(v) { editGoods(v) {
this.$router.push({ name: "goods-operation-edit", query: { id: v.id } }); this.$router.push({ name: "goods-operation-edit", query: { id: v.id } });
}, },
@@ -437,20 +438,24 @@ export default {
} }
}); });
}, },
// 改变页码
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
this.clearSelectAll(); this.clearSelectAll();
}, },
// 改变页数
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
// 搜索
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
// 重置搜索条件
handleReset() { handleReset() {
this.searchForm = {}; this.searchForm = {};
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
@@ -458,24 +463,17 @@ export default {
// 重新加载数据 // 重新加载数据
this.getDataList(); 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); this.$refs.table.selectAll(false);
}, },
// 添加选中项
changeSelect(e) { changeSelect(e) {
this.selectList = e; this.selectList = e;
this.selectCount = e.length; this.selectCount = e.length;
}, },
//保存物流模板信息 //保存物流模板信息
saveShipTemplate() { saveShipTemplate() {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认设置物流模板", title: "确认设置物流模板",
content: content:

File diff suppressed because it is too large Load Diff

View 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>&gt;</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>&gt;</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>

File diff suppressed because it is too large Load Diff

View 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>

View File

@@ -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>

View File

@@ -22,7 +22,7 @@ h4 {
> div { > div {
padding: 0 20px; padding: 0 20px;
border-left: 1px solid #ededed; // border-left: 1px solid #ededed;
> h5 { > h5 {
text-align: center; text-align: center;

View File

@@ -217,11 +217,13 @@ export default {
}; };
}, },
methods: { methods: {
// 跳转页面
navigateTo(name) { navigateTo(name) {
this.$router.push({ this.$router.push({
name, name,
}); });
}, },
// 初始化数据
async init() { async init() {
let userInfo = JSON.parse(Cookies.get("userInfo")); let userInfo = JSON.parse(Cookies.get("userInfo"));
@@ -232,7 +234,7 @@ export default {
this.notices = res.result.records; this.notices = res.result.records;
} }
}, },
// 跳转文章页
async clickLinkNotices(val) { async clickLinkNotices(val) {
let res = await seeArticle(val.id); let res = await seeArticle(val.id);
if (res.success) { if (res.success) {
@@ -240,7 +242,7 @@ export default {
this.noticeFlage = true; this.noticeFlage = true;
} }
}, },
// 获取首页数据
async getHomeData() { async getHomeData() {
let res = await getSellerHomeData(); let res = await getSellerHomeData();
if (res.success) { if (res.success) {

View File

@@ -32,7 +32,7 @@ export default {
}, },
storeId: "", // 店铺id storeId: "", // 店铺id
dates: [], // 日期列表 dates: [], // 日期列表
params: { params: { // 请求参数
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
storeName: "", storeName: "",
@@ -65,8 +65,6 @@ export default {
}, },
mounted() { mounted() {
this.storeId = JSON.parse(Cookies.get("userInfo")).id; this.storeId = JSON.parse(Cookies.get("userInfo")).id;
this.getFiveYears(); this.getFiveYears();
}, },
methods: { methods: {
@@ -91,7 +89,7 @@ export default {
} }
this.dates = dates.reverse(); this.dates = dates.reverse();
}, },
// 选择回调
changeSelect() { changeSelect() {
if (this.month) { if (this.month) {
this.dateList.forEach((res) => { this.dateList.forEach((res) => {
@@ -105,7 +103,7 @@ export default {
} else { } else {
} }
}, },
// 点击时间筛选
clickBreadcrumb(item) { clickBreadcrumb(item) {
this.dateList.forEach((res) => { this.dateList.forEach((res) => {
res.selected = false; res.selected = false;
@@ -119,7 +117,6 @@ export default {
} }
this.selectedWay = item; this.selectedWay = item;
// this.month = "";
this.selectedWay.year = new Date().getFullYear(); this.selectedWay.year = new Date().getFullYear();
this.selectedWay.month = ""; this.selectedWay.month = "";

View File

@@ -22,6 +22,11 @@ export default {
this.init(); this.init();
}, },
methods: { methods: {
clear() { // 引用该组件的父组件会调用
this.data = [];
this.selectedWay = [];
this.init();
},
/** /**
* 关闭 * 关闭
*/ */
@@ -44,36 +49,68 @@ export default {
*/ */
open(val, index) { open(val, index) {
if (val) { if (val) {
// console.warn(val);
//已选中的地址 //已选中的地址
let checkedData = this.$store.state.shipTemplate; let checkedData = this.$store.state.shipTemplate;
// console.warn(this.$store.state.shipTemplate); let checkData = [];
// 禁止选中的地址
let disabledData = checkedData.filter((item, i) => { let disabledData = checkedData.filter((item, i) => {
return i != index; 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) => { disabledData.forEach((dis) => {
console.log(dis)
// 循环出已经选中的地址id // 循环出已经选中的地址id
dis.areaId.split(",").forEach((ids) => { dis.areaId.split(",").forEach((ids) => {
// 循环出省份 // 循环出省份
this.data.forEach((item) => { this.data.forEach((item) => {
// 如果当前省份下市区全部选中则选中该省份 // 如果当前省份下市区全部选中则禁用该省份
if (dis.selectedAll) { if (dis.selectedAll) {
dis.area.split(",").forEach((area) => { dis.area.split(",").forEach((area) => {
if (area == item.name) { if (area == item.name) {
console.log(item.name +"选中")
this.$set(item, "disabled", true); this.$set(item, "disabled", true);
} }
}); });
} }
// 将市区继续循环 // 将市区继续循环
item.children.forEach((child, childIndex) => { item.children.forEach((child, childIndex) => {
// 判断当前市区是否是已选中状态 // 判断当前市区是否是已禁用状态
if (child.id == ids) { if (item.disabled) {
this.$set(child, "disabled", true); this.$set(child, "disabled", true);
} else {
if (child.id == ids) {
this.$set(child, "disabled", true);
}
} }
}); });
}); });
@@ -136,7 +173,7 @@ export default {
this.cancel(); this.cancel();
}, },
// 初始化地区数据
init() { init() {
getAllCity().then((res) => { getAllCity().then((res) => {
if (res.result) { if (res.result) {

View File

@@ -29,6 +29,7 @@ export default {
props: ['addressId'], props: ['addressId'],
methods: { methods: {
// 选择地区回显
change(val, selectedData) { change(val, selectedData) {
/** /**
* @returns [regionId,region] * @returns [regionId,region]
@@ -46,8 +47,7 @@ export default {
handleChangeOnSelect(value) { handleChangeOnSelect(value) {
this.changeOnSelect = value; this.changeOnSelect = value;
}, },
getArea(val) { // 动态加载数据
},
loadData(item, callback) { loadData(item, callback) {
item.loading = true; item.loading = true;
API_Setup.getChildRegion(item.value).then((res) => { API_Setup.getChildRegion(item.value).then((res) => {
@@ -87,6 +87,7 @@ export default {
} }
}); });
}, },
// 初始化数据
init() { init() {
API_Setup.getChildRegion(this.id).then((res) => { API_Setup.getChildRegion(this.id).then((res) => {
let way = []; let way = [];
@@ -116,5 +117,3 @@ export default {
}, },
}; };
</script> </script>
<style scoped lang="scss">
</style>

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="login"> <div class="login" @click="$refs.verify.show = false">
<Row type="flex" @keydown.enter.native="submitLogin"> <Row type="flex" @keydown.enter.native="submitLogin">
<Col style="width: 368px"> <Col style="width: 368px">
<Header /> <Header />
@@ -25,7 +25,6 @@
<!-- 拼图验证码 --> <!-- 拼图验证码 -->
<verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify> <verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify>
</Col> </Col>
<!-- <LangSwitch /> -->
</Row> </Row>
</div> </div>
</template> </template>
@@ -36,12 +35,10 @@ import { validateMobile } from "@/libs/validate";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import Header from "@/views/main-components/header"; import Header from "@/views/main-components/header";
import Footer from "@/views/main-components/footer"; import Footer from "@/views/main-components/footer";
import LangSwitch from "@/views/main-components/lang-switch";
import util from "@/libs/util.js"; import util from "@/libs/util.js";
import verify from "@/views/my-components/verify"; import verify from "@/views/my-components/verify";
export default { export default {
components: { components: {
LangSwitch,
Header, Header,
Footer, Footer,
verify, verify,
@@ -128,7 +125,7 @@ export default {
// 登录提交 // 登录提交
this.$refs.usernameLoginForm.validate((valid) => { this.$refs.usernameLoginForm.validate((valid) => {
if (valid) { if (valid) {
this.$refs.verify.show = true; this.$refs.verify.init();
} }
}); });
}, },

View File

@@ -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>

View File

@@ -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>

View File

@@ -6,7 +6,7 @@
<a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('terms') }}</a> <a class="item" href="https://pickmall.cn/" target="_blank">{{ $t('terms') }}</a>
</Row> </Row>
<Row type="flex" justify="center" class="copyright"> <Row type="flex" justify="center" class="copyright">
Copyright © 2020 - Present Copyright © {{year}} - Present
<a <a
href="https://pickmall.cn/" href="https://pickmall.cn/"
target="_blank" target="_blank"
@@ -18,7 +18,12 @@
<script> <script>
export default { export default {
name: "footer" name: "footer",
data() {
return {
year: new Date().getFullYear() // 年
}
},
}; };
</script> </script>

View File

@@ -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>

View File

@@ -1,7 +1,6 @@
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./styles/menu.scss"; @import "./styles/menu.scss";
</style> </style>
<template> <template>
<div class="ivu-shrinkable-menu"> <div class="ivu-shrinkable-menu">
<!-- 一级菜单 --> <!-- 一级菜单 -->
@@ -34,12 +33,18 @@ import util from "@/libs/util.js";
export default { export default {
name: "shrinkableMenu", name: "shrinkableMenu",
computed: { computed: {
// 二级菜单列表
menuList() { menuList() {
return this.$store.state.app.menuList; return this.$store.state.app.menuList;
}, },
// 一级菜单
navList() { navList() {
return this.$store.state.app.navList; return this.$store.state.app.navList;
}, },
// 当前一级菜单
currNav() {
return this.$store.state.app.currNav;
}
}, },
methods: { methods: {
changeMenu(name) { //二级路由点击 changeMenu(name) { //二级路由点击
@@ -47,7 +52,7 @@ export default {
name: name name: name
}); });
}, },
selectNav(name) { selectNav(name) { // 一级路由点击
this.$store.commit("setCurrNav", name); this.$store.commit("setCurrNav", name);
this.setStore("currNav", name); this.setStore("currNav", name);
util.initRouter(this); util.initRouter(this);

Some files were not shown because too many files have changed in this diff Show More