修改管理端bug

master
mabo 2021-05-17 17:38:04 +08:00
parent eeb2e94d52
commit da5cc8335f
9 changed files with 79 additions and 49 deletions

View File

@ -14,7 +14,9 @@ $theme_color: #804ed1;
border-radius: 1em; border-radius: 1em;
background-color: rgba(50,50,50,.1); background-color: rgba(50,50,50,.1);
} }
.ivu-table table{
width: 100%!important;
}
.flex{ .flex{
display: flex !important; display: flex !important;

View File

@ -8,20 +8,8 @@
@mousewheel="handlescroll" @mousewheel="handlescroll"
class="tags-outer-scroll-con" class="tags-outer-scroll-con"
> >
<!-- <div class="close-all-tag-con">
<Dropdown transfer @on-click="handleTagsOption">
<Button size="small" type="primary">
<Icon type="md-arrow-dropdown"></Icon>
</Button>
<DropdownMenu slot="list">
<DropdownItem name="clearAll">{{ $t('closeAll') }}</DropdownItem>
<DropdownItem name="clearOthers">{{ $t('closeOthers') }}</DropdownItem>
</DropdownMenu>
</Dropdown>
</div> -->
<ul v-show="visible" :style="{left: contextMenuLeft + 'px', top: contextMenuTop + 'px'}" class="contextmenu"> <ul v-show="visible" :style="{left: contextMenuLeft + 'px', top: contextMenuTop + 'px'}" class="contextmenu">
<li v-for="(item, key) of menuList" @click="handleTagsOption(key)" :key="key">{{item}}</li> <li v-for="(item, key) of actionList" @click="handleTagsOption(key)" :key="key">{{item}}</li>
</ul> </ul>
<div ref="scrollBody" class="tags-inner-scroll-body" :style="{left: tagBodyLeft + 'px'}"> <div ref="scrollBody" class="tags-inner-scroll-body" :style="{left: tagBodyLeft + 'px'}">
<transition-group name="taglist-moving-animation"> <transition-group name="taglist-moving-animation">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -14,7 +14,9 @@ $theme_color: #804ed1;
border-radius: 1em; border-radius: 1em;
background-color: rgba(50,50,50,.1); background-color: rgba(50,50,50,.1);
} }
.ivu-table table {
width: 100%!important;
}
.flex{ .flex{
display: flex !important; display: flex !important;

View File

@ -28,7 +28,7 @@
:key="index" :key="index"
> >
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<span></span> <span>&gt;</span>
</li> </li>
</ul> </ul>
<ul v-if="categoryListLevel2 && categoryListLevel2.length > 0"> <ul v-if="categoryListLevel2 && categoryListLevel2.length > 0">
@ -39,7 +39,7 @@
:key="index" :key="index"
> >
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<span></span> <span>&gt;</span>
</li> </li>
</ul> </ul>
<ul v-if="categoryListLevel3 && categoryListLevel3.length > 0"> <ul v-if="categoryListLevel3 && categoryListLevel3.length > 0">
@ -701,6 +701,34 @@ export default {
this.activestep = 1; this.activestep = 1;
this.isOperationGoods = false; this.isOperationGoods = false;
this.GET_GoodData(); this.GET_GoodData();
} else if (to.query.id) {
this.activestep = 1;
this.goodsId = this.$route.query.id;
this.GET_GoodData();
} else {
this.baseInfoForm = {
salesModel: "RETAIL",
goodsParamsList: [],
freightPayer: "BUYER",
weight: "",
goodsGalleryFiles: [],
release: "true",
recommend: "true",
storeCategoryPath: "",
brandId: 0,
goodsUnit: "",
categoryPath: "",
sellingPoint: "",
intro: "",
mobileIntro: "",
updateSku: true,
regeneratorSkuFlag: false,
templateId: 0,
};
this.activestep = 0;
this.isPublish = true;
this.GET_GoodsTemplate();
this.GET_NextLevelCategory();
} }
} }
}, },
@ -985,7 +1013,25 @@ export default {
} }
// //
else { else {
this.baseInfoForm = {}; this.baseInfoForm = {
salesModel: "RETAIL",
goodsParamsList: [],
freightPayer: "BUYER",
weight: "",
goodsGalleryFiles: [],
release: "true",
recommend: "true",
storeCategoryPath: "",
brandId: 0,
goodsUnit: "",
categoryPath: "",
sellingPoint: "",
intro: "",
mobileIntro: "",
updateSku: true,
regeneratorSkuFlag: false,
templateId: 0,
};
this.activestep = 0; this.activestep = 0;
this.isPublish = true; this.isPublish = true;
this.GET_GoodsTemplate(); this.GET_GoodsTemplate();
@ -1088,6 +1134,7 @@ export default {
}); });
}, },
handleBeforeUploadGoodsPicture() { handleBeforeUploadGoodsPicture() {
console.log(this.baseInfoForm);
const check = this.baseInfoForm.goodsGalleryFiles.length < 5; const check = this.baseInfoForm.goodsGalleryFiles.length < 5;
if (!check) { if (!check) {
this.$Notice.warning({ this.$Notice.warning({
@ -1198,6 +1245,7 @@ export default {
...this.baseInfoForm, ...this.baseInfoForm,
...response.result, ...response.result,
}; };
console.warn(this.baseInfoForm);
if (this.baseInfoForm.freightPayer != "BUYER") { if (this.baseInfoForm.freightPayer != "BUYER") {
API_Shop.getShipTemplate().then((res) => { API_Shop.getShipTemplate().then((res) => {
if (res.success) { if (res.success) {
@ -1702,6 +1750,7 @@ export default {
this.GET_GoodData(); this.GET_GoodData();
return; return;
} }
console.log(this.baseInfoForm);
this.GET_GoodsParams(); this.GET_GoodsParams();
/** 1级校验 */ /** 1级校验 */
this.loading = true; this.loading = true;

View File

@ -258,7 +258,7 @@
top: 100px; top: 100px;
right: 0; right: 0;
bottom: 0; bottom: 0;
height: calc(100% + 52px); height: calc(100% + 200px);
width: calc(100% - 240px); width: calc(100% - 240px);
background-color: #f0f0f0; background-color: #f0f0f0;

View File

@ -19,11 +19,14 @@
<Row class="operation"> <Row class="operation">
<Table :loading="loading" border :columns="goodsColumns" :data="goodsData" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> <Table :loading="loading" border :columns="goodsColumns" :data="goodsData" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
<template slot-scope="{ row, index }" slot="price"> <template slot-scope="{ row, index }" slot="price">
<Input v-model="row.price" @input="goodsData[index].price = row.price" /> <Input v-model="row.price" :disabled="status==='view'" @input="goodsData[index].price = row.price" />
</template> </template>
<template slot-scope="{ row }" slot="QRCode"> <template slot-scope="{ row }" slot="QRCode">
<img :src="row.QRCode || '../../../assets/lili.png'" width="50px" height="50px" alt="" /> <img :src="row.QRCode || '../../../assets/lili.png'" width="50px" height="50px" alt="" />
</template> </template>
<template slot-scope="{ index }" slot="action">
<Button type="error" size="small" ghost v-if="status === 'manager'" @click="delGoods(index)"></Button>
</template>
</Table> </Table>
</Row> </Row>
<Row type="flex" justify="end" class="page operation"> <Row type="flex" justify="end" class="page operation">
@ -138,27 +141,9 @@ export default {
{ {
title: "操作", title: "操作",
key: "action", slot: "action",
minWidth: 50, minWidth: 50,
align: "center", align: "center",
render: (h, params) => {
return h(
"Button",
{
props: {
size: "small",
type: "error",
ghost: true,
},
on: {
click: () => {
this.delGoods(params.index);
},
},
},
"删除"
);
},
}, },
], ],
goodsData: [], // goodsData: [], //
@ -327,9 +312,9 @@ export default {
margin: 20px 0; margin: 20px 0;
font-size: 15px; font-size: 15px;
&::before{ &::before{
content: ''; content: '|';
border: 1px solid $theme_color; color: $theme_color;
height: 10px; display: inline-block;
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
margin-right: 5px; margin-right: 5px;

View File

@ -64,14 +64,19 @@
</template> </template>
<template slot-scope="{ row }" slot="action"> <template slot-scope="{ row }" slot="action">
<Button <Button
v-if=" v-if="row.promotionStatus === 'NEW'"
row.promotionStatus === 'NEW'
"
type="primary" type="primary"
size="small" size="small"
@click="manage(row)" @click="manage(row)"
>管理</Button >管理</Button
> >
<Button
v-else
type="info"
size="small"
@click="manage(row)"
>查看</Button
>
</template> </template>
</Table> </Table>
</Row> </Row>

View File

@ -16,7 +16,7 @@
<Button @click="delAll"></Button> <Button @click="delAll"></Button>
</template> </template>
</Row> </Row>
<Row v-show="openTip"> <Row v-show="openTip" v-if="promotionStatus == 'NEW'">
<Alert show-icon> <Alert show-icon>
已选择 <span class="select-count">{{ selectCount }}</span> 已选择 <span class="select-count">{{ selectCount }}</span>
</Alert> </Alert>
@ -101,8 +101,7 @@
<template slot-scope="{ row, index }" slot="action"> <template slot-scope="{ row, index }" slot="action">
<Button <Button
type="error" type="error"
v-if="row.promotionApplyStatus !== 'PASS'" v-if="promotionStatus === 'NEW'"
:disabled="promotionStatus != 'NEW'"
size="small" size="small"
ghost ghost
@click="delGoods(index, row.id)" @click="delGoods(index, row.id)"
@ -119,7 +118,7 @@
<Button <Button
type="primary" type="primary"
:loading="submitLoading" :loading="submitLoading"
:disabled="promotionStatus != 'NEW'" v-if="promotionStatus === 'NEW'"
@click="save" @click="save"
>提交</Button >提交</Button
> >