合并master

master
lemon橪 2021-06-17 11:45:53 +08:00
commit c158874c31
8 changed files with 106 additions and 40 deletions

View File

@ -17,7 +17,7 @@
<div class="user-img">
<img :src="userInfo.face" />
</div>
<p>{{userInfo.username | secrecyMobile}}</p>
<p>{{userInfo.nickName}}</p>
</div>
<!-- 循环导航栏 -->

View File

@ -5,10 +5,14 @@ import { getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios'
export const getManagerBrandPage = (params) => {
return getRequest('/goods/brand/getByPage', params)
}
// 添加或修改品牌设置
// 添加
export const addBrand = (params) => {
return postRequest('/goods/brand', params)
}
// 修改品牌设置
export const updateBrand = (params) => {
return putRequest(`/goods/brand/${params.id}`, params)
}
// 禁用品牌
export const disableBrand = (id, params) => {
return putRequest(`/goods/brand/disable/${id}`, params)

View File

@ -82,7 +82,7 @@
</template>
<script>
import {getManagerBrandPage, addBrand, disableBrand} from "@/api/goods";
import {getManagerBrandPage, addBrand,updateBrand, disableBrand} from "@/api/goods";
import uploadPicInput from "@/views/my-components/lili/upload-pic-input";
export default {
@ -323,7 +323,7 @@
});
} else {
//
addBrand(this.form).then((res) => {
updateBrand(this.form).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");

View File

@ -376,6 +376,7 @@ export default {
});
},
getAllList(parent_id) {
this.sortCateList = []
this.loading = true;
getCategoryTree(parent_id).then((res) => {
this.loading = false;

View File

@ -41,22 +41,24 @@ export default {
saveTemplate() {
//
this.$Modal.confirm({
title: "Title",
content: "<p>Content of dialog</p><p>Content of dialog</p>",
title: "是否立即发布?",
onOk: () => {
this.$Message.info("Clicked ok");
this.submitTemplate("OPEN");
},
onCancel: () => {
this.$Message.info("Clicked cancel");
this.submitTemplate("CLOSE");
},
});
},
//
submitTemplate(pageShow) {
this.modelForm.list.unshift(this.$refs.modelForm.navList);
this.modelForm.list.unshift(this.$refs.modelForm.topAdvert);
const modelForm = JSON.stringify(this.modelForm);
const data = {
id: this.$route.query.id,
pageData: modelForm,
pageShow,
};
API_floor.updateHome(this.$route.query.id, data).then((res) => {
if (res.success) {

View File

@ -24,35 +24,78 @@
<Row class="operation padding-row">
<Button type="primary" @click="add"></Button>
</Row>
<Tabs value="list" @on-click="clickTabPane">
<TabPane label="秒杀活动列表" name="list">
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="page">
<template slot-scope="{ row }" slot="action">
<Button type="info" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW'" @click="edit(row)"></Button>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
class="page"
>
<template slot-scope="{ row }" slot="action">
<Button
type="info"
size="small"
class="mr_5"
v-if="row.promotionStatus == 'NEW'"
@click="edit(row)"
>编辑</Button
>
<Button type="info" size="small" class="mr_5" v-else @click="manage(row)"></Button>
<Button
type="info"
size="small"
class="mr_5"
v-else
@click="manage(row)"
>查看</Button
>
<Button type="primary" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW'" @click="manage(row)"></Button>
<Button
type="primary"
size="small"
class="mr_5"
v-if="row.promotionStatus == 'NEW'"
@click="manage(row)"
>管理</Button
>
<Button type="error" size="small" v-if="
row.promotionStatus == 'START' || row.promotionStatus == 'NEW'
" class="mr_5" @click="off(row)">下架</Button>
&nbsp;
<Button type="error" size="small" v-if="row.promotionStatus == 'CLOSE'" ghost @click="expire(row)"></Button>
</template>
</Table>
<Row type="flex" justify="end" class="page">
<Page style="margin: 20px 0;" :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>
</TabPane>
<TabPane label="秒杀活动设置" name="setup">
<setupSeckill v-if="setupFlag"></setupSeckill>
</TabPane>
</Tabs>
<!-- <Button type="success" size="small" class="mr_5" v-if="row.promotionStatus == 'NEW' || row.promotionStatus == 'END'" @click="upper(row)"></Button> -->
<Button
type="error"
size="small"
v-if="
row.promotionStatus == 'START' || row.promotionStatus == 'NEW'
"
class="mr_5"
@click="off(row)"
>下架</Button
>
<Button
type="error"
size="small"
v-if="row.promotionStatus == 'CLOSE'"
ghost
@click="expire(row)"
>删除</Button
>
</template>
</Table>
<Row type="flex" justify="end" class="page">
<Page
:current="searchForm.pageNumber + 1"
: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>
@ -259,7 +302,7 @@ export default {
</script>
<style lang="scss">
@import "@/styles/table-common.scss";
.mr_5 {
margin: 0 5px;
.mr_5{
margin: 0 4px;
}
</style>

View File

@ -472,3 +472,9 @@ div.base-info-item {
.template-item {
justify-content: flex-start !important;
}
.tree-bar{
height: auto !important;
max-height: auto !important;
min-height: 240px !important;
}

View File

@ -294,9 +294,20 @@
</div>
<h4>商品详情描述</h4>
<div class="form-item-view">
<div class="tree-bar" :style="{ maxHeight: maxHeight }">
<FormItem class="form-item-view-el" label="店内分类" prop="shopCategory">
<Tree ref="tree" :data="shopCategory" show-checkbox @on-select-change="selectTree" @on-check-change="changeSelect" :check-strictly="!strict"></Tree>
<div class="tree-bar" >
<FormItem
class="form-item-view-el"
label="店内分类"
prop="shopCategory"
>
<Tree
ref="tree"
:data="shopCategory"
show-checkbox
@on-select-change="selectTree"
@on-check-change="changeSelect"
:check-strictly="!strict"
></Tree>
</FormItem>
</div>
<FormItem class="form-item-view-el" label="商品描述" prop="intro">
@ -594,7 +605,6 @@ export default {
/** 3级分类列表*/
categoryListLevel3: [],
maxHeight: "240px",
/** 请求的商品参数组列表 */
goodsParams: [
{