会员中心添加首页按钮,pclogo改为阿里云地址,编辑折扣券没有传折扣值,

master
mabo 2021-07-21 15:27:39 +08:00
parent f512caa81d
commit 75bff1edc4
30 changed files with 490 additions and 903 deletions

View File

@ -7,7 +7,6 @@
<script> <script>
import {v4 as uuidv4} from 'uuid'; import {v4 as uuidv4} from 'uuid';
import storage from '@/plugins/storage'; import storage from '@/plugins/storage';
import {getLogo} from '@/api/common.js';
export default { export default {
name: 'App', name: 'App',
mounted () { mounted () {
@ -16,16 +15,6 @@ export default {
uuid = uuidv4(); uuid = uuidv4();
storage.setItem('uuid', uuid); storage.setItem('uuid', uuid);
} }
if (!this.Cookies.getItem('logo')) {
setTimeout(() => {
getLogo().then(res => {
if (res.success) {
let logoObj = JSON.parse(res.result.settingValue)
this.Cookies.setItem('logo', logoObj.buyerSideLogo)
}
})
}, 1000)
}
} }
}; };
</script> </script>

View File

@ -2,7 +2,7 @@
<div> <div>
<div class="container"> <div class="container">
<img <img
:src="logoImg" :src="$store.state.logoImg"
v-if="showLogo" v-if="showLogo"
class="logo-img" class="logo-img"
alt="" alt=""
@ -37,7 +37,6 @@
</template> </template>
<script> <script>
import {getLogo} from '@/api/common.js'
import {hotWords} from '@/api/goods.js' import {hotWords} from '@/api/goods.js'
export default { export default {
name: 'search', name: 'search',
@ -62,7 +61,6 @@ export default {
data () { data () {
return { return {
searchData: '', // searchData: '', //
logoImg: '', // pclogo
promotionTags: [] // promotionTags: [] //
}; };
}, },
@ -82,18 +80,6 @@ export default {
} }
}, },
mounted () { mounted () {
if (!this.Cookies.getItem('logo')) {
getLogo().then(res => {
if (res.success) {
let logoObj = JSON.parse(res.result.settingValue)
this.Cookies.setItem('logo', logoObj.buyerSideLogo)
this.logoImg = logoObj.buyerSideLogo
}
})
} else {
this.logoImg = this.Cookies.getItem('logo')
}
this.searchData = this.$route.query.keyword this.searchData = this.$route.query.keyword
if (!this.hover) { // if (!this.hover) { //

View File

@ -2,6 +2,7 @@
<div class="box"> <div class="box">
<div class="nav"> <div class="nav">
<ul class="location"> <ul class="location">
<li v-if="$route.path.includes('home')" style="margin-left:10px"><router-link to="/"></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">

View File

@ -17,15 +17,15 @@ export default {
* @description api请求基础路径 * @description api请求基础路径
*/ */
api_dev: { api_dev: {
common: 'http://192.168.0.101:8890', // common: 'http://192.168.0.101:8890',
buyer: 'http://192.168.0.101:8888', // buyer: 'http://192.168.0.101:8888',
seller: 'http://192.168.0.101:8889', // seller: 'http://192.168.0.101:8889',
manager: 'http://192.168.0.101:8887' // manager: 'http://192.168.0.101: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

@ -4,7 +4,7 @@
<div class="top-content" @click='$refs.verify.show = false'> <div class="top-content" @click='$refs.verify.show = false'>
<div class="logo-box"> <div class="logo-box">
<img <img
:src="logoImg" :src="$store.state.logoImg"
@click="$router.push('/')" @click="$router.push('/')"
/> />
<div>欢迎登录</div> <div>欢迎登录</div>
@ -186,8 +186,7 @@ export default {
}, },
codeMsg: '发送验证码', // codeMsg: '发送验证码', //
interval: null, // interval: null, //
time: 60, // time: 60 //
logoImg: '' // logo
}; };
}, },
methods: { methods: {
@ -332,7 +331,6 @@ export default {
} }
}); });
} }
this.logoImg = this.Cookies.getItem('logo')
}, },
watch: { watch: {
type (v) { type (v) {

View File

@ -4,7 +4,7 @@
<div class="logo-box"> <div class="logo-box">
<img <img
width="150" width="150"
:src="logoImg" :src="$store.state.logoImg"
@click="$router.push('/')" @click="$router.push('/')"
/> />
<div>注册</div> <div>注册</div>
@ -135,8 +135,7 @@ export default {
verifyType: 'REGISTER', // verifyType: 'REGISTER', //
codeMsg: '发送验证码', // codeMsg: '发送验证码', //
interval: '', // interval: '', //
time: 60, // time: 60 //
logoImg: '' // logo
}; };
}, },
methods: { methods: {
@ -208,8 +207,6 @@ export default {
}, },
mounted () { mounted () {
this.$refs.formRegist.resetFields(); this.$refs.formRegist.resetFields();
this.logoImg = this.Cookies.getItem('logo')
console.log(window.innerHeight);
document.querySelector('.sign-up').style.height = window.innerHeight + 'px' document.querySelector('.sign-up').style.height = window.innerHeight + 'px'
} }
}; };

View File

@ -4,7 +4,7 @@
<!-- 顶部logo --> <!-- 顶部logo -->
<div class="logo-box"> <div class="logo-box">
<img <img
:src="logoImg" width='150' :src="$store.state.logoImg" width='150'
@click="$router.push('/')" @click="$router.push('/')"
/> />
<div>修改密码</div> <div>修改密码</div>
@ -118,7 +118,6 @@ export default {
components: { Verify }, components: { Verify },
data () { data () {
return { return {
logoImg: '', // logo
loading: false, // loading: false, //
loading1: false, // loading1: false, //
formFirst: { // formFirst: { //
@ -243,7 +242,6 @@ export default {
}, },
mounted () { mounted () {
this.$refs.formFirst.resetFields(); this.$refs.formFirst.resetFields();
this.logoImg = this.Cookies.getItem('logo')
}, },
watch: { watch: {
} }

View File

@ -5,7 +5,7 @@
<div class="width_1200 logo"> <div class="width_1200 logo">
<div> <div>
<router-link to="/" <router-link to="/"
><img :src="logoImg" alt="lili shop" title="lilishop" ><img :src="$store.state.logoImg" alt="lili shop" title="lilishop"
/></router-link> /></router-link>
<div>结算页</div> <div>结算页</div>
</div> </div>
@ -347,23 +347,12 @@ export default {
moreAddr: false, // moreAddr: false, //
canUseCouponNum: 0, // canUseCouponNum: 0, //
couponList: [], // couponList: [], //
logoImg: '', // logo
usedCouponId: [], // 使id usedCouponId: [], // 使id
selectedCoupon: {} // selectedCoupon: {} //
}; };
}, },
mounted () { mounted () {
this.init(); this.init();
if (!this.Cookies.getItem('logo')) {
getLogo().then((res) => {
if (res.success) {
let logoObj = JSON.parse(res.result.settingValue);
this.Cookies.setItem('logo', logoObj.buyerSideLogo);
}
});
} else {
this.logoImg = this.Cookies.getItem('logo');
}
}, },
methods: { methods: {
init () { init () {

View File

@ -11,7 +11,8 @@ export default new Vuex.Store({
state: { state: {
category: [], // 全部分类 category: [], // 全部分类
navList: [], navList: [],
cartNum: storage.getItem('cartNum') || 0 cartNum: storage.getItem('cartNum') || 0,
logoImg: 'https://lili-system.oss-cn-beijing.aliyuncs.com/logo.png'
}, },
getters, getters,
actions, actions,

View File

@ -179,7 +179,10 @@ export const getFullDiscountList = params => {
export const getFullDiscountById = id => { export const getFullDiscountById = id => {
return getRequest(`/promotion/fullDiscount/${id}`); return getRequest(`/promotion/fullDiscount/${id}`);
}; };
// 开启、关闭满额活动
export const updateFullDiscount = (id, promotionStatus) => {
return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`)
}
// 积分商品列表 // 积分商品列表
export const getPointsGoodsList = params => { export const getPointsGoodsList = params => {
return getRequest(`/promotion/pointsGoods`, params); return getRequest(`/promotion/pointsGoods`, params);

View File

@ -17,14 +17,14 @@ 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"
common: 'http://192.168.0.101:8890', // common: 'http://192.168.0.101:8890',
buyer: 'http://192.168.0.101:8888', // buyer: 'http://192.168.0.101:8888',
seller: 'http://192.168.0.101:8889', // seller: 'http://192.168.0.101:8889',
manager: 'http://192.168.0.101:8887' // manager: 'http://192.168.0.101:8887'
}, },
api_prod: { api_prod: {
common: "https://common-api.pickmall.cn", common: "https://common-api.pickmall.cn",

View File

@ -48,18 +48,6 @@ export const otherRouter = {
name: "category", name: "category",
component: () => import("@/views/goods/goods-manage/category.vue") component: () => import("@/views/goods/goods-manage/category.vue")
}, },
{
path: "message",
title: "消息中心",
name: "message_index",
component: () => import("@/views/message/message.vue")
},
{
path: "category",
title: "类型列表",
name: "category",
component: () => import("@/views/goods/goods-manage/category.vue")
},
{ {
path: "parameter", path: "parameter",
title: "参数绑定", title: "参数绑定",

View File

@ -1,9 +1,9 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row @keydown.enter.native="handleSearch">
<Form <Form
ref="searchForm" ref="searchForm"
@keydown.enter.native="handleSearch"
:model="searchForm" :model="searchForm"
inline inline
:label-width="70" :label-width="70"
@ -29,18 +29,14 @@
</Form-item> </Form-item>
<Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button> <Button @click="handleSearch" class="search-btn" type="primary" icon="ios-search" >搜索</Button>
</Form> </Form>
</Row>
<Table <Table
:loading="loading" :loading="loading"
border border
:columns="columns" :columns="columns"
:data="data" :data="data"
ref="table" ref="table"
sortable="custom" class="mt_10"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
> >
<!-- 商品栏目格式化 --> <!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="scope"> <template slot="goodsSlot" slot-scope="scope">
<div style="margin-top: 5px;height: 80px; display: flex;"> <div style="margin-top: 5px;height: 80px; display: flex;">
@ -85,7 +81,6 @@
return { return {
id: "", //id id: "", //id
loading: true, // loading: true, //
modalType: 0, //
searchForm: { searchForm: {
// //
pageNumber: 1, // pageNumber: 1, //
@ -93,15 +88,9 @@
sort: "create_time", // sort: "create_time", //
order: "desc", // order: "desc", //
}, },
underForm: { //
reason: "",
},
goodsAuditForm: { // goodsAuditForm: { //
is_auth: 1, is_auth: 1,
}, },
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [ columns: [
{ {
title: "商品名称", title: "商品名称",
@ -252,7 +241,6 @@
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;
@ -263,21 +251,6 @@
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);
},
changeSelect(e) { //
this.selectList = e;
this.selectCount = e.length;
},
getDataList() { // getDataList() { //
this.loading = true; this.loading = true;
// //
@ -312,8 +285,6 @@
}, },
}); });
}, },
// //
showDetail(v) { showDetail(v) {
let id = v.id; let id = v.id;

View File

@ -1,381 +0,0 @@
/*选择商品品类*/
.content-goods-publish {
padding: 15px;
padding-bottom: 50px;
margin: 0 auto;
text-align: center;
border: 1px solid #ddd;
background: none repeat 0 0 #fff;
/*商品品类*/
.goods-category {
text-align: left;
padding: 10px;
background: #fafafa;
border: 1px solid #e6e6e6;
ul {
padding: 8px 4px 8px 8px;
list-style: none;
width: 300px;
background: none repeat 0 0 #fff;
border: 1px solid #e6e6e6;
display: inline-block;
letter-spacing: normal;
margin-right: 15px;
vertical-align: top;
word-spacing: normal;
li {
line-height: 20px;
padding: 5px;
cursor: pointer;
color: #333;
font-size: 12px;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}
}
/** 当前品类被选中的样式 */
.activeClass {
background-color: #d9edf7;
border: 1px solid #bce8f1;
color: #3a87ad;
}
/*!*当前选择的商品品类文字*!*/
.current-goods-category {
text-align: left;
padding: 10px;
width: 100%;
border: 1px solid #fbeed5;
color: #c09853;
background-color: #fcf8e3;
margin: 10px auto;
padding: 8px 35px 8px 14px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
font-size: 12px;
font-weight: bold;
}
}
/*编辑基本信息*/
.el-form {
padding-bottom: 80px;
.el-form-item {
width: 100%;
text-align: left;
}
}
/*平铺*/
div.base-info-item>div {
margin-left: 5%;
}
div.base-info-item {
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 {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: space-between;
padding-left: 80px;
.layout {
margin-bottom: 20px;
.sku-item-content {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
width: 100%;
.sku-item-content-name {
display: flex;
align-items: flex-start;
width: 100%;
}
}
}
.shop-category-text {
font-size: 12px;
}
}
.form-item-view-bottom {
margin-bottom: 50px;
}
.item-goods-properts-row {
display: flex;
flex-direction: row;
word-break: break-all;
white-space: normal;
width: 300px;
height: 100px;
}
.item-goods-properts {
display: flex;
flex-direction: row;
margin-bottom: 10px;
}
.form-item {
display: flex;
align-items: center;
}
/** 审核信息-拒绝原因 */
.auth-info {
color: red;
}
.el-form-item {
width: 30%;
min-width: 300px;
}
.goods-name-width {
width: 50%;
min-width: 300px;
}
.el-form-item__content {
margin-left: 120px;
text-align: left;
}
p.goods-group-manager {
padding-left: 7.5%;
text-align: left;
color: #999;
font-size: 13px;
}
/*teatarea*/
/deep/ .el-textarea {
width: 150%;
}
.seo-text {
width: 150%;
}
}
/*折叠面板*/
.el-collapse-item {
/deep/ .el-collapse-item__header {
text-align: left;
background-color: #f8f8f8;
padding: 0 10px;
font-weight: bold;
color: #333;
font-size: 14px;
}
.el-form-item {
margin-left: 5%;
width: 25%;
}
/deep/ .el-form-item__content {
margin-left: 120px;
text-align: left;
}
p.goods-group-manager {
padding-left: 12%;
text-align: left;
color: #999;
}
/deep/ .el-collapse-item__content {
padding: 10px 0;
text-align: left;
}
}
/*商品描述*/
.goods-intro {
line-height: 40;
}
/** 底部步骤 */
.footer {
width: 88.7%;
padding: 10px;
background-color: #ffc;
position: fixed;
bottom: 0px;
left: 10%;
text-align: center;
z-index: 9999;
}
/*图片上传组件第一张图设置封面*/
.goods-images {
/deep/ li.el-upload-list__item:first-child {
position: relative;
}
/deep/ li.el-upload-list__item:first-child:after {
content: "";
color: #fff;
font-weight: bold;
font-size: 12px;
position: absolute;
left: -15px;
top: -6px;
width: 40px;
height: 24px;
padding-top: 6px;
background: #13ce66;
text-align: center;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
}
}
.el-form-item__label {
word-break: break-all;
}
.step-view {
width: 33%;
height: 40px;
font-size: 19px;
text-align: center;
display: flex;
background-color: #fff;
justify-content: center;
align-items: center;
}
.add-sku-btn {
margin-top: 10px;
}
.sku-item:not(:first-child) {
margin-top: 10px;
}
.sku-upload-list {
display: inline-block;
width: 60px;
height: 60px;
text-align: center;
line-height: 60px;
border: 1px solid transparent;
border-radius: 4px;
overflow: hidden;
background: #fff;
position: relative;
box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
margin-right: 4px;
}
.preview-picture {
width: 100%;
margin: 0 auto;
display: block;
// text-align: center;
border: 1px solid transparent;
// justify-self: center;
// align-self: center;
}
.preview-picture img {
width: 100%;
height: 100%;
}
.sku-upload-list img {
width: 100%;
height: 100%;
}
.sku-upload-list-cover {
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, .6);
}
.sku-upload-list:hover .sku-upload-list-cover {
display: block;
}
.sku-upload-list-cover i {
color: #fff;
font-size: 20px;
cursor: pointer;
margin: 0 2px;
}
.demo-upload-list{
display: inline-block;
width: 60px;
height: 60px;
text-align: center;
line-height: 60px;
border: 1px solid transparent;
border-radius: 4px;
overflow: hidden;
background: #fff;
position: relative;
box-shadow: 0 1px 1px rgba(0,0,0,.2);
margin-right: 4px;
}
.demo-upload-list img{
width: 100%;
height: 100%;
}
.demo-upload-list-cover{
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0,0,0,.6);
}
.demo-upload-list:hover .demo-upload-list-cover{
display: block;
}
.demo-upload-list-cover i{
color: #fff;
font-size: 20px;
cursor: pointer;
margin: 0 2px;
}

View File

@ -1,62 +1,35 @@
<template> <template>
<div> <div>
<Form <Form :label-width="120">
:label-width="120" <Card>
>
<div class="content-goods-publish">
<div class="base-info-item"> <div class="base-info-item">
<h4>基本信息</h4> <h4>基本信息</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem label="商品分类"> <FormItem label="商品分类">
<span v-for="item in goods.categoryName"> {{ item }} > </span> <span v-for="(item,index) in goods.categoryName" :key="index"> {{ item }} <i v-if="index !== (goods.categoryName.length-1)">&gt;</i> </span>
</FormItem> </FormItem>
<FormItem label="商品名称" prop="goodsName"> <FormItem label="商品名称">
{{ goods.goodsName }} {{ goods.goodsName }}
</FormItem> </FormItem>
<FormItem label="商品卖点" prop="sellingPoint"> <FormItem label="商品卖点">
{{ goods.sellingPoint }} {{ goods.sellingPoint }}
</FormItem> </FormItem>
</div> </div>
<h4>商品交易信息</h4> <h4>商品交易信息</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem <FormItem label="计量单位"> {{ goods.goodsUnit }}</FormItem>
class="form-item-view-el" <FormItem label="销售模式">
label="计量单位"
prop="goodsUnit"
> {{ goods.goodsUnit }}
</FormItem>
<FormItem
class="form-item-view-el"
label="销售模式"
prop="salesModel"
>
{{ goods.salesModel === 'RETAIL' ? '零售型' : '批发型' }} {{ goods.salesModel === 'RETAIL' ? '零售型' : '批发型' }}
</FormItem> </FormItem>
</div> </div>
<h4>商品规格及图片</h4> <h4>商品规格及图片</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem label="商品编号" prop="sn"> <FormItem label="商品编号"> {{ goods.sn }}</FormItem>
{{ goods.sn }} <FormItem label="商品价格"> ¥{{ goods.price | unitPrice }} </FormItem>
</FormItem> <FormItem label="市场价格"> ¥{{ goods.cost | unitPrice }} </FormItem>
<FormItem label="商品价格" prop="price"> <FormItem label="商品图片">
¥{{ goods.price | unitPrice }} <div class="demo-upload-list" v-for="(item, __index) in goods.goodsGalleryList" :key="__index">
</FormItem>
<FormItem label="市场价格" prop="cost">
¥{{ goods.cost | unitPrice }}
</FormItem>
<FormItem
class="form-item-view-el"
label="商品图片"
prop="goodsGalleryFiles"
>
<div
class="demo-upload-list"
v-for="(item, __index) in goods.goodsGalleryList"
:key="__index"
>
<img :src="item"/> <img :src="item"/>
<div class="demo-upload-list-cover"> <div class="demo-upload-list-cover">
<Icon <Icon
@ -64,7 +37,6 @@
@click.native="handleViewGoodsPicture(item)" @click.native="handleViewGoodsPicture(item)"
></Icon> ></Icon>
</div> </div>
<Modal title="View Image" v-model="goodsPictureVisible"> <Modal title="View Image" v-model="goodsPictureVisible">
<img <img
:src="previewGoodsPicture" :src="previewGoodsPicture"
@ -73,70 +45,50 @@
/> />
</Modal> </Modal>
</div> </div>
</FormItem> </FormItem>
<FormItem label="商品规格">
<FormItem
class="form-item-view-el"
label="商品规格"
>
<Table :columns="skuColumn" :data="skuData"> <Table :columns="skuColumn" :data="skuData">
<!-- 商品栏目格式化 -->
<template slot="showImage" slot-scope="scope"> <template slot="showImage" slot-scope="scope">
<div style="margin-top: 5px;height: 80px; display: flex;"> <div style="margin-top: 5px;height: 80px; display: flex;">
<div style=""> <div>
<img :src="scope.row.image" style="height: 60px;margin-top: 1px;width: 60px"> <img :src="scope.row.image" style="height: 60px;margin-top: 1px;width: 60px">
</div> </div>
</div> </div>
</template> </template>
</Table> </Table>
</FormItem> </FormItem>
</div> </div>
<h4>商品详情描述</h4> <h4>商品详情描述</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem class="form-item-view-el" label="商品描述" prop="intro"> <FormItem label="商品描述">
<div v-html="goods.intro"></div> <div v-html="goods.intro"></div>
</FormItem> </FormItem>
<FormItem <FormItem
class="form-item-view-el"
label="移动端描述" label="移动端描述"
prop="skuList"
> >
<div v-html="goods.mobileIntro"></div> <div v-html="goods.mobileIntro"></div>
</FormItem> </FormItem>
</div> </div>
<h4>商品物流信息</h4> <h4>商品物流信息</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem class="form-item-view-el" label="商品重量" prop="weight"> <FormItem label="商品重量">
<Input v-model="goods.weight"> <Input v-model="goods.weight">
<span slot="append">kg</span> <span slot="append">kg</span>
</Input> </Input>
</FormItem> </FormItem>
</div> </div>
</div> </div>
</div> </Card>
</Form> </Form>
</div> </div>
</template> </template>
<script> <script>
import {getGoodsDetail} from "@/api/goods"; import {getGoodsDetail} from "@/api/goods";
export default { export default {
name: "goodsDetail", name: "goodsDetail",
data() { data() {
return { return {
goods: '', // goods: {}, //
previewGoodsPicture: '', // previewGoodsPicture: '', //
goodsPictureVisible: false, // goodsPictureVisible: false, //
skuColumn: [ // skuColumn: [ //
@ -149,7 +101,7 @@ export default {
key: 'sn' key: 'sn'
}, },
{ {
title: '重量', title: '重量(kg)',
key: 'weight' key: 'weight'
}, },
{ {
@ -173,12 +125,12 @@ export default {
} }
, ,
methods: { methods: {
//
initGoods(id) { initGoods(id) {
getGoodsDetail(id).then(res => { getGoodsDetail(id).then(res => {
this.goods = res.result; this.goods = res.result;
let that = this let that = this
res.result.skuList.forEach(function (sku, index, array) { res.result.skuList.forEach(function (sku, index, array) {
console.log(sku)
that.skuData.push({ that.skuData.push({
'specs': sku.goodsName, 'specs': sku.goodsName,
'sn': sku.sn, 'sn': sku.sn,
@ -191,9 +143,8 @@ export default {
console.warn(this.skuData) console.warn(this.skuData)
}); });
} },
, //
handleViewGoodsPicture(url) { handleViewGoodsPicture(url) {
this.previewGoodsPicture = url; this.previewGoodsPicture = url;
this.goodsPictureVisible = true; this.goodsPictureVisible = true;
@ -207,8 +158,61 @@ export default {
</script> </script>
<style lang="scss" soped> <style lang="scss" soped>
@import "./goodsDetail.scss"; /*平铺*/
div.base-info-item {
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 {
padding-left: 80px;
}
}
.demo-upload-list{
display: inline-block;
width: 60px;
height: 60px;
text-align: center;
line-height: 60px;
border: 1px solid transparent;
border-radius: 4px;
overflow: hidden;
background: #fff;
position: relative;
box-shadow: 0 1px 1px rgba(0,0,0,.2);
margin-right: 4px;
}
.demo-upload-list img{
width: 100%;
height: 100%;
}
.demo-upload-list-cover{
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0,0,0,.6);
}
.demo-upload-list:hover .demo-upload-list-cover{
display: block;
}
.demo-upload-list-cover i{
color: #fff;
font-size: 20px;
cursor: pointer;
margin: 0 2px;
}
.ivu-table table { .ivu-table table {
width: 100% !important; width: 100% !important;
} }

View File

@ -1,19 +1,16 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Form ref="searchForm" @keydown.enter.native="handleSearch" :model="searchForm" inline :label-width="70" class="search-form">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form-item label="品牌名称">
<Form-item label="品牌名称" prop="name">
<Input type="text" v-model="searchForm.name" placeholder="请输入品牌名称" clearable style="width: 200px" /> <Input type="text" v-model="searchForm.name" placeholder="请输入品牌名称" clearable style="width: 200px" />
</Form-item> </Form-item>
<Button @click="handleSearch" type="primary">搜索</Button>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</Row>
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button @click="add" type="primary">添加</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> <Table :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
<Row type="flex" justify="end" class="mt_10"> <Row type="flex" justify="end" class="mt_10">
<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>
@ -30,8 +27,7 @@
</Form> </Form>
<div slot="footer"> <div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button> <Button type="text" @click="modalVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="handleSubmit"> <Button type="primary" :loading="submitLoading" @click="handleSubmit"></Button>
</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
@ -50,7 +46,7 @@ import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default { export default {
name: "brand", name: "brand",
components: { components: {
uploadPicInput, uploadPicInput
}, },
data() { data() {
return { return {
@ -74,8 +70,6 @@ export default {
// //
formValidate: {}, formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [ columns: [
{ {
title: "品牌名称", title: "品牌名称",
@ -237,51 +231,38 @@ export default {
this.getDataList(); this.getDataList();
} }
}, },
//
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) { //
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() { getDataList() {
this.loading = true; this.loading = true;
//
getManagerBrandPage(this.searchForm).then((res) => { getManagerBrandPage(this.searchForm).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
console.warn(12);
this.data = res.result.records; this.data = res.result.records;
this.total = res.result.total; this.total = res.result.total;
} }
}); });
}, },
//
handleSubmit() { handleSubmit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
@ -311,6 +292,7 @@ export default {
} }
}); });
}, },
//
add() { add() {
this.modalType = 0; this.modalType = 0;
this.modalTitle = "添加"; this.modalTitle = "添加";
@ -318,6 +300,7 @@ export default {
delete this.form.id; delete this.form.id;
this.modalVisible = true; this.modalVisible = true;
}, },
//
edit(v) { edit(v) {
this.modalType = 1; this.modalType = 1;
this.modalTitle = "编辑"; this.modalTitle = "编辑";
@ -333,6 +316,7 @@ export default {
this.form = data; this.form = data;
this.modalVisible = true; this.modalVisible = true;
}, },
//
enable(v) { enable(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认启用", title: "确认启用",
@ -349,6 +333,7 @@ export default {
}, },
}); });
}, },
//
disable(v) { disable(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认禁用", title: "确认禁用",

View File

@ -1,10 +1,10 @@
<template> <template>
<div class="wrapper"> <div>
<div class="operation"> <Card>
<div class="mb_10">
<Button @click="addParent" icon="md-add">添加一级分类</Button> <Button @click="addParent" icon="md-add">添加一级分类</Button>
</div> </div>
<Table size="default" :load-data="handleLoadData" row-key="id" :loading="loading" :data="tableData" :columns="columns"> <Table :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">
<Button size="small"> <Button size="small">
@ -106,6 +106,8 @@
<Button type="primary" :loading="submitLoading" @click="saveCategorySpec"></Button> <Button type="primary" :loading="submitLoading" @click="saveCategorySpec"></Button>
</div> </div>
</Modal> </Modal>
</Card>
</div> </div>
</template> </template>
<script> <script>
@ -126,22 +128,18 @@ import {
import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
import {regular} from "@/utils"; import {regular} from "@/utils";
export default { export default {
name: "lili-components", name: "goods-category",
components: { components: {
uploadPicInput, uploadPicInput
}, },
data() { data() {
return { return {
categoryList: [], // categoryList: [], //
sortCate: "", //
loading: false, // loading: false, //
selectCount: 0, //
brands: [], // brands: [], //
specifications: [], // specifications: [], //
categoryId: "", // id categoryId: "", // id
category_brands: [], //
categorySpecs: [], // categorySpecs: [], //
expandLevel: 1, //
modalType: 0, // modalType: 0, //
modalVisible: false, // modalVisible: false, //
modalBrandVisible: false, // modalBrandVisible: false, //
@ -149,8 +147,8 @@ export default {
modalTitle: "", // modalTitle: "", //
showParent: false, // showParent: false, //
parentTitle: "", // parentTitle: "", //
modalBrandTitle: "", modalBrandTitle: "", //
modalSpecTitle: "", modalSpecTitle: "", //
formAdd: { formAdd: {
// //
parentId: "", parentId: "",
@ -165,7 +163,7 @@ export default {
categoryBrands: [], categoryBrands: [],
}, },
brandWay: "", // brandWay: "", //
specForm: {}, specForm: {}, //
// //
formValidate: { formValidate: {
commissionRate: [ commissionRate: [
@ -197,22 +195,13 @@ export default {
slot: "action", slot: "action",
}, },
], ],
tableData: [], tableData: [], //
categoryIndex: 0, categoryIndex: 0, // id
checkedCategoryChildren: "", // checkedCategoryChildren: "", //
}; };
}, },
methods: { methods: {
// changeSortCate(val) { //
// let way = this.categoryList.find((item, index) => {
// if (item.name == val) {
// this.categoryIndex = index;
// console.log((this.categoryIndex = index));
// return item.name == val;
// }
// });
// this.tableData = [way];
// },
init() { init() {
this.getAllList(0); this.getAllList(0);
this.getBrandList(); this.getBrandList();
@ -239,7 +228,6 @@ export default {
this.categoryId = v.id; this.categoryId = v.id;
this.modalBrandTitle = "品牌关联"; this.modalBrandTitle = "品牌关联";
this.brandForm.categoryBrands = res.result.map((item) => item.id); this.brandForm.categoryBrands = res.result.map((item) => item.id);
// this.brandWay = {...res.result}
this.modalBrandVisible = true; this.modalBrandVisible = true;
}); });
}, },
@ -272,27 +260,22 @@ export default {
} }
}); });
}, },
//
parameterOperation(v) { parameterOperation(v) {
this.$router.push({ name: "parameter", query: { id: v.id } }); this.$router.push({ name: "parameter", query: { id: v.id } });
}, },
refresh() { //
this.loading = true;
let that = this;
setTimeout(function () {
that.loading = false;
}, 1000);
},
addChildren(v) { addChildren(v) {
this.modalType = 0; this.modalType = 0;
this.modalTitle = "添加子分类"; this.modalTitle = "添加子分类";
this.parentTitle = v.name; this.parentTitle = v.name;
this.formAdd.level = eval(v.level + "+1"); this.formAdd.level = eval(v.level + "+1");
this.showParent = true; this.showParent = true;
// this.$refs.form.resetFields();
delete this.formAdd.id; delete this.formAdd.id;
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 = "编辑";
@ -307,6 +290,7 @@ export default {
this.showParent = false; this.showParent = false;
this.modalVisible = true; this.modalVisible = true;
}, },
//
addParent() { addParent() {
this.modalType = 0; this.modalType = 0;
this.modalTitle = "添加一级分类"; this.modalTitle = "添加一级分类";
@ -317,6 +301,7 @@ export default {
this.formAdd.parentId = 0; this.formAdd.parentId = 0;
this.modalVisible = true; this.modalVisible = true;
}, },
//
Submit() { Submit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
@ -348,10 +333,10 @@ export default {
} }
}); });
}, },
//
remove(v) { remove(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认删除", title: "确认删除",
//
content: "您确认要删除 " + v.name + " ?", content: "您确认要删除 " + v.name + " ?",
loading: true, loading: true,
onOk: () => { onOk: () => {
@ -407,7 +392,7 @@ export default {
} }
} }
}, },
//
getAllList(parent_id) { getAllList(parent_id) {
this.loading = true; this.loading = true;
getCategoryTree(parent_id).then((res) => { getCategoryTree(parent_id).then((res) => {
@ -427,6 +412,7 @@ export default {
} }
}); });
}, },
//
enable(v) { enable(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认启用", title: "确认启用",
@ -448,6 +434,7 @@ export default {
}, },
}); });
}, },
//
disable(v) { disable(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认禁用", title: "确认禁用",
@ -476,14 +463,4 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrapper {
width: 100%;
height: 100%;
background: #fff;
padding: 20px;
}
.operation {
margin-bottom: 2vh;
}
</style> </style>

View File

@ -116,7 +116,6 @@ import {
} from "@/api/goods"; } from "@/api/goods";
export default { export default {
name: "categoryParams", name: "categoryParams",
components: {},
data() { data() {
return { return {
/** 分类ID */ /** 分类ID */
@ -127,19 +126,17 @@ export default {
modalType: 0, modalType: 0,
/** 添加或编辑标题 */ /** 添加或编辑标题 */
modalTitle: "", modalTitle: "",
modalTitle1: "",
/** 参数添加或编辑弹出框 */ /** 参数添加或编辑弹出框 */
dialogParamsVisible: false, dialogParamsVisible: false,
/** 参数组添加或编辑弹出框 */ /** 参数组添加或编辑弹出框 */
dialogParamsGroupVisible: false, dialogParamsGroupVisible: false,
/** 参数ID **/
paramId: "",
// //
paramForm: {}, paramForm: {},
/** 参数值 **/ /** 参数值 **/
ops:{ ops:{
options: [] options: []
}, },
//
paramGroupForm: {}, paramGroupForm: {},
/** 添加、编辑参数 规格 */ /** 添加、编辑参数 规格 */
formValidate: { formValidate: {
@ -161,6 +158,7 @@ export default {
}, },
}, },
methods: { methods: {
//
init() { init() {
this.getDataList(); this.getDataList();
}, },
@ -207,6 +205,7 @@ export default {
this.modalTitle = "修改参数组"; this.modalTitle = "修改参数组";
this.dialogParamsGroupVisible = true; this.dialogParamsGroupVisible = true;
}, },
//
handleAddParamsGroup() { handleAddParamsGroup() {
this.paramGroupForm = { this.paramGroupForm = {
@ -279,6 +278,7 @@ export default {
} }
}); });
}, },
//
getDataList() { getDataList() {
getCategoryParamsListData(this.categoryId).then((res) => { getCategoryParamsListData(this.categoryId).then((res) => {
if (res.success) { if (res.success) {

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row @keydown.enter.native="handleSearch">
<Form <Form
@keydown.enter.native="handleSearch"
ref="searchForm" ref="searchForm"
:model="searchForm" :model="searchForm"
inline inline
@ -18,10 +18,8 @@
style="width: 200px" style="width: 200px"
/> />
</Form-item> </Form-item>
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
</Form> </Form>
</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="delAll"></Button> <Button @click="delAll"></Button>
@ -58,7 +56,7 @@
:mask-closable="false" :mask-closable="false"
:width="500" :width="500"
> >
<Form ref="form" :model="form" :label-width="100" :rules="formValidate"> <Form ref="form" :model="form" :label-width="100">
<FormItem label="规格名称" prop="specName"> <FormItem label="规格名称" prop="specName">
<Input v-model="form.specName" maxlength="30" clearable style="width: 100%"/> <Input v-model="form.specName" maxlength="30" clearable style="width: 100%"/>
</FormItem> </FormItem>
@ -73,11 +71,7 @@
popper-class="spec-values-popper" popper-class="spec-values-popper"
style="width: 100%; text-align: left; margin-right: 10px" style="width: 100%; text-align: left; margin-right: 10px"
> >
<Option <Option v-for="item in specValue" :value="item" :label="item" :key="item">
v-for="item in specValue"
:value="item"
:label="item"
>
</Option> </Option>
</Select> </Select>
</FormItem> </FormItem>
@ -110,7 +104,6 @@ export default {
modalType: 0, // modalType: 0, //
modalVisible: false, // modalVisible: false, //
modalTitle: "", // modalTitle: "", //
specTitle: "", //
searchForm: { searchForm: {
// //
pageNumber: 1, // pageNumber: 1, //
@ -125,8 +118,6 @@ export default {
}, },
/** 编辑规格值 */ /** 编辑规格值 */
specValue: [], specValue: [],
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //
@ -320,10 +311,10 @@ export default {
} }
this.modalVisible = true; this.modalVisible = true;
}, },
//
remove(v) { remove(v) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认删除", title: "确认删除",
//
content: "您确认要删除 " + v.specName + " ?", content: "您确认要删除 " + v.specName + " ?",
loading: true, loading: true,
onOk: () => { onOk: () => {
@ -338,6 +329,7 @@ export default {
}, },
}); });
}, },
//
delAll() { delAll() {
if (this.selectCount <= 0) { if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要删除的数据"); this.$Message.warning("您还未选择要删除的数据");

View File

@ -1,48 +0,0 @@
.left-container {
float: left;
}
.right-container {
float: left;
margin-left: 50px;
}
.img {
width: 100%;
height: 100%;
}
img {
vertical-align: middle;
border-style: none;
}
.product {
width: 140px;
height: 160px;
border: 1px solid #d9d9d9;
border-radius: 3px;
}
.show{
label{
font-size: 14px;
}
margin-top: 15px;
}
label {
font-size: 12px;
color: #666;
margin-top: 4px;
display: block;
float: left;
margin-right: 2px;
}
.border-b {
border-bottom: 1px solid #e9e9e9;
width: 500px;
overflow: hidden;
position: relative;
margin-top: 12px;
}
.div-height{
line-height: 25px;
}

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="search"> <div>
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Row>
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form ref="searchForm" :model="searchForm" @keydown.enter.native="handleSearch" inline :label-width="70" class="search-form">
<Form-item label="会员名称" prop="memberName"> <Form-item label="会员名称" prop="memberName">
<Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 200px"/> <Input type="text" v-model="searchForm.memberName" placeholder="请输入会员名称" clearable style="width: 200px"/>
</Form-item> </Form-item>
@ -350,5 +350,52 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./index.scss"; .left-container {
float: left;
}
.right-container {
float: left;
margin-left: 50px;
}
.img {
width: 100%;
height: 100%;
}
img {
vertical-align: middle;
border-style: none;
}
.product {
width: 140px;
height: 160px;
border: 1px solid #d9d9d9;
border-radius: 3px;
}
.show{
label{
font-size: 14px;
}
margin-top: 15px;
}
label {
font-size: 12px;
color: #666;
margin-top: 4px;
display: block;
float: left;
margin-right: 2px;
}
.border-b {
border-bottom: 1px solid #e9e9e9;
width: 500px;
overflow: hidden;
position: relative;
margin-top: 12px;
}
.div-height{
line-height: 25px;
}
</style> </style>

View File

@ -11,7 +11,7 @@
:readonly="readonly" :readonly="readonly"
:maxlength="maxlength" :maxlength="maxlength"
> >
<Poptip slot="append" transfer trigger="hover" title="图片预览" placement="right" width="350"> <Poptip slot="append" transfer trigger="hover" title="图片预览" placement="right">
<Icon type="md-eye" class="see-icon" /> <Icon type="md-eye" class="see-icon" />
<div slot="content"> <div slot="content">
<img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" /> <img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" />
@ -54,7 +54,10 @@ export default {
name: "uploadPicInput", name: "uploadPicInput",
props: { props: {
value: String, value: String,
size: String, size: {
default: 'default',
type: String
},
placeholder: { placeholder: {
type: String, type: String,
default: "图片链接" default: "图片链接"
@ -91,11 +94,13 @@ export default {
}; };
}, },
methods: { methods: {
//
init() { init() {
this.accessToken = { this.accessToken = {
accessToken: this.getStore("accessToken") accessToken: this.getStore("accessToken")
}; };
}, },
//
handleFormatError(file) { handleFormatError(file) {
this.loading = false; this.loading = false;
this.$Notice.warning({ this.$Notice.warning({
@ -106,6 +111,7 @@ export default {
" ’格式不正确, 请选择 .jpg .jpeg .png .gif .bmp格式文件" " ’格式不正确, 请选择 .jpg .jpeg .png .gif .bmp格式文件"
}); });
}, },
//
handleMaxSize(file) { handleMaxSize(file) {
this.loading = false; this.loading = false;
this.$Notice.warning({ this.$Notice.warning({
@ -113,10 +119,12 @@ export default {
desc: "所选文件‘ " + file.name + " ’大小过大, 不得超过 " + this.maxSize + "M." desc: "所选文件‘ " + file.name + " ’大小过大, 不得超过 " + this.maxSize + "M."
}); });
}, },
//
beforeUpload() { beforeUpload() {
this.loading = true; this.loading = true;
return true; return true;
}, },
//
handleSuccess(res, file) { handleSuccess(res, file) {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
@ -127,15 +135,18 @@ export default {
this.$Message.error(res.message); this.$Message.error(res.message);
} }
}, },
//
handleError(error, file, fileList) { handleError(error, file, fileList) {
this.loading = false; this.loading = false;
this.$Message.error(error.toString()); this.$Message.error(error.toString());
}, },
//
handleChange(v) { handleChange(v) {
this.$emit("input", this.currentValue); this.$emit("input", this.currentValue);
this.$emit("on-change", this.currentValue); this.$emit("on-change", this.currentValue);
this.$attrs.rollback && this.$attrs.rollback() this.$attrs.rollback && this.$attrs.rollback()
}, },
//
setCurrentValue(value) { setCurrentValue(value) {
if (value === this.currentValue) { if (value === this.currentValue) {
return; return;
@ -158,9 +169,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.see-icon { .see-icon {
font-size: 16px; font-size: 16px;
margin-left: -32px;
margin-top: 3px;
padding: 7px;
cursor: pointer; cursor: pointer;
} }

View File

@ -49,6 +49,7 @@
:columns="columns" :columns="columns"
:data="data" :data="data"
ref="table" ref="table"
class="mt_10"
sortable="custom" sortable="custom"
> >
<template slot-scope="{ row }" slot="applyEndTime"> <template slot-scope="{ row }" slot="applyEndTime">
@ -64,15 +65,27 @@
</template> </template>
<template slot-scope="{ row }" slot="action"> <template slot-scope="{ row }" slot="action">
<div> <div>
<Button type="success" size="small" @click="view(row)" <Button type="info" size="small" @click="view(row)"></Button>
>查看</Button <Button
>&nbsp; type="error"
v-if="row.promotionStatus === 'START'"
style="margin-left:5px"
size="small"
@click="openOrClose(row)"
>关闭</Button>
<Button
type="success"
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
style="margin-left:5px"
size="small"
@click="openOrClose(row)"
>开启</Button>
</div> </div>
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page operation"> <Row type="flex" justify="end" class="page operation">
<Page <Page
:current="searchForm.pageNumber + 1" :current="searchForm.pageNumber"
:total="total" :total="total"
:page-size="searchForm.pageSize" :page-size="searchForm.pageSize"
@on-change="changePage" @on-change="changePage"
@ -88,14 +101,14 @@
</div> </div>
</template> </template>
<script> <script>
import { getFullDiscountList } from "@/api/promotion.js"; import { getFullDiscountList, updateFullDiscount } from "@/api/promotion.js";
export default { export default {
data() { data() {
return { return {
loading: false, // loading: false, //
searchForm: { // searchForm: { //
pageNumber: 0, pageNumber: 1,
pageSize: 10, pageSize: 10,
sort: "startTime", sort: "startTime",
order: "desc", order: "desc",
@ -163,7 +176,7 @@ export default {
title: "操作", title: "操作",
slot: "action", slot: "action",
align: "center", align: "center",
width: 100, width: 140,
}, },
], ],
data: [], // data: [], //
@ -173,9 +186,34 @@ export default {
init() { init() {
this.getDataList(); this.getDataList();
}, },
//
openOrClose (row) {
let name = '开启'
let status = 'START'
if (row.promotionStatus === 'START') {
name = '关闭'
status = 'CLOSE'
}
this.$Modal.confirm({
title: "提示",
//
content: `确认${name}此活动吗?需要一定时间才能生效,请耐心等待`,
loading: true,
onOk: () => {
//
updateFullDiscount(row.id, status).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success(`${name}成功`);
this.getDataList();
}
});
},
});
},
changePage(v) { changePage(v) {
// //
this.searchForm.pageNumber = v - 1; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
}, },
changePageSize(v) { changePageSize(v) {
@ -185,7 +223,7 @@ export default {
}, },
handleSearch() { handleSearch() {
// //
this.searchForm.pageNumber = 0; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
@ -210,6 +248,7 @@ export default {
// //
this.$router.push({ name: "full-cut-detail", query: { id: row.id } }); this.$router.push({ name: "full-cut-detail", query: { id: row.id } });
}, },
}, },
mounted() { mounted() {
this.init(); this.init();

View File

@ -175,3 +175,7 @@ export const getFullDiscountById = (id) => {
export const delFullDiscount = (id) => { export const delFullDiscount = (id) => {
return deleteRequest(`/promotion/fullDiscount/${id}`) return deleteRequest(`/promotion/fullDiscount/${id}`)
} }
// 开启、关闭满减活动
export const updateFullDiscount = (id, promotionStatus) => {
return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`)
}

View File

@ -233,6 +233,7 @@ util.openNewPage = function (vm, name, argu, query) {
if (query) { if (query) {
tag.query = query; tag.query = query;
} }
console.log(tag);
vm.$store.commit('increateTag', tag); vm.$store.commit('increateTag', tag);
} }
} }

View File

@ -14,7 +14,7 @@ const app = {
navList: [], // 顶部菜单 navList: [], // 顶部菜单
currNav: "", // 当前顶部菜单name currNav: "", // 当前顶部菜单name
currNavTitle: "", // 当前顶部菜单标题 currNavTitle: "", // 当前顶部菜单标题
cachePage: [], cachePage: [], // 缓存的页面
lang: '', lang: '',
isFullScreen: false, isFullScreen: false,
openedSubmenuArr: [], // 要展开的菜单数组 openedSubmenuArr: [], // 要展开的菜单数组
@ -93,6 +93,7 @@ const app = {
state.cachePage.splice(index, 1); state.cachePage.splice(index, 1);
} }
}); });
localStorage.cachePage = JSON.stringify(state.cachePage);
}, },
initCachepage(state) { initCachepage(state) {
if (localStorage.cachePage) { if (localStorage.cachePage) {
@ -120,6 +121,7 @@ const app = {
clearAllTags(state) { clearAllTags(state) {
state.storeOpenedList.splice(1); state.storeOpenedList.splice(1);
state.cachePage.length = 0; state.cachePage.length = 0;
localStorage.cachePage = '';
localStorage.storeOpenedList = JSON.stringify(state.storeOpenedList); localStorage.storeOpenedList = JSON.stringify(state.storeOpenedList);
}, },
clearOtherTags(state, vm) { clearOtherTags(state, vm) {
@ -140,6 +142,7 @@ const app = {
return item == currentName; return item == currentName;
}); });
state.cachePage = newCachepage; state.cachePage = newCachepage;
localStorage.cachePage = JSON.stringify(state.cachePage);
localStorage.storeOpenedList = JSON.stringify(state.storeOpenedList); localStorage.storeOpenedList = JSON.stringify(state.storeOpenedList);
}, },
setOpenedList(state) { setOpenedList(state) {
@ -165,6 +168,7 @@ const app = {
setMessageCount(state, count) { setMessageCount(state, count) {
state.messageCount = count; state.messageCount = count;
}, },
// 新增页签
increateTag(state, tagObj) { increateTag(state, tagObj) {
if (!Util.oneOf(tagObj.name, state.dontCache)) { if (!Util.oneOf(tagObj.name, state.dontCache)) {
state.cachePage.push(tagObj.name); state.cachePage.push(tagObj.name);

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">
</Input>
<Poptip transfer trigger="hover" title="图片预览" placement="right" width="350">
<Icon type="md-eye" class="see-icon" /> <Icon type="md-eye" class="see-icon" />
<div slot="content"> <div slot="content">
<img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" /> <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> <a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a>
</div> </div>
</Poptip> </Poptip>
</Input>
<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>
@ -166,9 +166,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.see-icon { .see-icon {
font-size: 16px; font-size: 16px;
margin-left: -32px;
margin-top: 3px;
padding: 7px;
cursor: pointer; cursor: pointer;
} }

View File

@ -351,7 +351,6 @@ export default {
} else { } else {
// //
delete params.consumeLimit; delete params.consumeLimit;
delete params.couponDiscount;
delete params.updateTime; delete params.updateTime;
editShopCoupon(params).then((res) => { editShopCoupon(params).then((res) => {

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="full-cut"> <div class="search">
<Card> <Card>
<Form <Form
ref="searchForm" ref="searchForm"
@ -73,25 +73,38 @@
v-if="row.promotionStatus == 'NEW'" v-if="row.promotionStatus == 'NEW'"
size="small" size="small"
@click="edit(row)" @click="edit(row)"
>编辑</Button >编辑</Button>
>&nbsp; <Button type="info" v-else size="small" @click="edit(row)"></Button>
<Button type="success" v-else size="small" @click="edit(row)" <Button
>查看</Button type="success"
>&nbsp; v-if="row.promotionStatus === 'START'"
ghost
style="margin-left:5px"
size="small"
@click="openOrClose(row)"
>关闭</Button>
<Button
type="success"
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
ghost
style="margin-left:5px"
size="small"
@click="openOrClose(row)"
>开启</Button>
<Button <Button
type="error" type="error"
:disabled="row.promotionStatus == 'START'" :disabled="row.promotionStatus == 'START'"
ghost ghost
style="margin-left:5px"
size="small" size="small"
@click="del(row)" @click="del(row)"
>删除</Button >删除</Button>
>
</div> </div>
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="page operation"> <Row type="flex" justify="end" class="page operation">
<Page <Page
:current="searchForm.pageNumber + 1" :current="searchForm.pageNumber"
:total="total" :total="total"
:page-size="searchForm.pageSize" :page-size="searchForm.pageSize"
@on-change="changePage" @on-change="changePage"
@ -107,14 +120,14 @@
</div> </div>
</template> </template>
<script> <script>
import { getFullDiscountList, delFullDiscount } from "@/api/promotion.js"; import { getFullDiscountList, delFullDiscount, updateFullDiscount } from "@/api/promotion.js";
export default { export default {
name: 'full-cut', name: 'full-cut',
data() { data() {
return { return {
loading: false, // loading: false, //
searchForm: { // searchForm: { //
pageNumber: 0, pageNumber: 1,
pageSize: 10, pageSize: 10,
sort: "startTime", sort: "startTime",
order: "desc", order: "desc",
@ -194,7 +207,7 @@ export default {
}, },
// //
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v - 1; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
}, },
// //
@ -204,7 +217,7 @@ export default {
}, },
// //
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 0; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
@ -212,7 +225,7 @@ export default {
handleReset() { handleReset() {
this.selectDate = '' this.selectDate = ''
this.searchForm = {} this.searchForm = {}
this.searchForm.pageNumber = 0; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
@ -239,6 +252,31 @@ export default {
}, },
}); });
}, },
//
openOrClose (row) {
let name = '开启'
let status = 'START'
if (row.promotionStatus === 'START') {
name = '关闭'
status = 'CLOSE'
}
this.$Modal.confirm({
title: "提示",
//
content: `确认${name}此活动吗?需要一定时间才能生效,请耐心等待`,
loading: true,
onOk: () => {
//
updateFullDiscount(row.id, status).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success(`${name}成功`);
this.getDataList();
}
});
},
});
},
// //
getDataList() { getDataList() {
this.loading = true; this.loading = true;

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<Card> <Card>
<Form ref="form" :model="form" :label-width="120" :rules="formRule"> <Form ref="form" :model="form" :label-width="120" :rules="formRule" class="search-form">
<div class="base-info-item"> <div class="base-info-item">
<h4>基本信息</h4> <h4>基本信息</h4>
<div class="form-item-view"> <div class="form-item-view">
@ -100,17 +100,17 @@
:disabled="form.promotionStatus != 'NEW'" :disabled="form.promotionStatus != 'NEW'"
v-model="form.isFreeFreight" v-model="form.isFreeFreight"
>免邮费</Checkbox >免邮费</Checkbox
>&nbsp; >
<Checkbox <Checkbox
:disabled="form.promotionStatus != 'NEW'" :disabled="form.promotionStatus != 'NEW'"
v-model="form.isCoupon" v-model="form.isCoupon"
>送优惠券</Checkbox >送优惠券</Checkbox
>&nbsp; >
<Checkbox <Checkbox
:disabled="form.promotionStatus != 'NEW'" :disabled="form.promotionStatus != 'NEW'"
v-model="form.isGift" v-model="form.isGift"
>送赠品</Checkbox >送赠品</Checkbox
>&nbsp; >
<Checkbox <Checkbox
:disabled="form.promotionStatus != 'NEW'" :disabled="form.promotionStatus != 'NEW'"
v-if="JSON.parse(getStore('userInfo')).selfOperated" v-if="JSON.parse(getStore('userInfo')).selfOperated"