更新了商户批发价功能
This commit is contained in:
parent
2662e98a96
commit
182f8f8507
@ -4,31 +4,73 @@
|
||||
<el-col v-bind="grid">
|
||||
<div class="Nav">
|
||||
<div class="input">
|
||||
<el-input v-model="filterText" placeholder="选择分类" prefix-icon="el-icon-search" style="width: 100%;" clearable />
|
||||
<el-input
|
||||
v-model="filterText"
|
||||
placeholder="选择分类"
|
||||
prefix-icon="el-icon-search"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
<div class="trees-coadd">
|
||||
<div class="scollhide">
|
||||
<div class="trees">
|
||||
<el-tree ref="tree" :data="treeData2" :filter-node-method="filterNode" :props="defaultProps">
|
||||
<div slot-scope="{ node, data}" class="custom-tree-node" @click.stop="handleNodeClick(data)">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
:data="treeData2"
|
||||
:filter-node-method="filterNode"
|
||||
:props="defaultProps"
|
||||
>
|
||||
<div
|
||||
slot-scope="{ node, data }"
|
||||
class="custom-tree-node"
|
||||
@click.stop="handleNodeClick(data)"
|
||||
>
|
||||
<div>
|
||||
<span>{{ node.label }}</span>
|
||||
<span v-if="data.space_property_name" style="font-size: 11px;color: #3889b1">({{ data.attachment_category_name }})</span>
|
||||
<span
|
||||
v-if="data.space_property_name"
|
||||
style="font-size: 11px; color: #3889b1"
|
||||
>({{ data.attachment_category_name }})</span
|
||||
>
|
||||
</div>
|
||||
<span class="el-ic">
|
||||
<i class="el-icon-circle-plus-outline" @click.stop="onAdd(data.attachment_category_id)" />
|
||||
<i
|
||||
class="el-icon-circle-plus-outline"
|
||||
@click.stop="onAdd(data.attachment_category_id)"
|
||||
/>
|
||||
<!-- <svg-icon-->
|
||||
<!-- icon-class="danyuan"-->
|
||||
<!-- title="添加管理单元"-->
|
||||
<!-- class="icon-space"-->
|
||||
<!-- />-->
|
||||
<i v-if="data.space_id!='0' && (!data.children || data.children == 'undefined') && data.attachment_category_id" class="el-icon-edit" title="修改" @click.stop="onEdit(data.attachment_category_id)" />
|
||||
<i
|
||||
v-if="
|
||||
data.space_id != '0' &&
|
||||
(!data.children || data.children == 'undefined') &&
|
||||
data.attachment_category_id
|
||||
"
|
||||
class="el-icon-edit"
|
||||
title="修改"
|
||||
@click.stop="onEdit(data.attachment_category_id)"
|
||||
/>
|
||||
<!-- <svg-icon-->
|
||||
<!-- icon-class="detail"-->
|
||||
<!-- title="查看该空间详情"-->
|
||||
<!-- class="icon-space"-->
|
||||
<!-- />-->
|
||||
<i v-if="data.space_id!='0' && (!data.children || data.children == 'undefined') && data.attachment_category_id" class="el-icon-delete" title="删除分类" @click.stop="() => handleDelete(data.attachment_category_id)" />
|
||||
<i
|
||||
v-if="
|
||||
data.space_id != '0' &&
|
||||
(!data.children || data.children == 'undefined') &&
|
||||
data.attachment_category_id
|
||||
"
|
||||
class="el-icon-delete"
|
||||
title="删除分类"
|
||||
@click.stop="
|
||||
() => handleDelete(data.attachment_category_id)
|
||||
"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</el-tree>
|
||||
@ -40,15 +82,49 @@
|
||||
<el-col v-bind="grid2" class="colLeft">
|
||||
<div v-loading="loading" class="conter">
|
||||
<div class="bnt">
|
||||
<el-button v-if="params !== '/merchant/config/picture'" size="small" type="primary" class="mb10 mr10" @click="checkPics">使用选中图片</el-button>
|
||||
<el-upload class="upload-demo mr10 mb15" :action="fileUrl" :on-success="handleSuccess" :headers="myHeaders" :show-file-list="false" multiple>
|
||||
<el-button
|
||||
v-if="params !== '/merchant/config/picture'"
|
||||
size="small"
|
||||
type="primary"
|
||||
class="mb10 mr10"
|
||||
@click="checkPics"
|
||||
>使用选中图片</el-button
|
||||
>
|
||||
<el-upload
|
||||
class="upload-demo mr10 mb15"
|
||||
:action="fileUrl"
|
||||
:on-success="handleSuccess"
|
||||
:headers="myHeaders"
|
||||
:show-file-list="false"
|
||||
multiple
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
|
||||
<el-button type="success" size="small" @click.stop="onAdd(0)">添加分类</el-button>
|
||||
<el-button type="error" size="small" class="mr10" :disabled="checkPicList.length===0" @click.stop="editPicList('图片')">删除图片</el-button>
|
||||
<el-input v-model="tableData.attachment_name" placeholder="请输入图片名称搜索" style="width: 230px;" @keyup.enter.native="getFileList(1)" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" class="el-button-solt" @click="getFileList(1)" />
|
||||
<el-button type="success" size="small" @click.stop="onAdd(0)"
|
||||
>添加分类</el-button
|
||||
>
|
||||
<el-button
|
||||
type="error"
|
||||
size="small"
|
||||
class="mr10"
|
||||
:disabled="checkPicList.length === 0"
|
||||
@click.stop="editPicList('图片')"
|
||||
>删除图片</el-button
|
||||
>
|
||||
<el-input
|
||||
v-model="tableData.attachment_name"
|
||||
placeholder="请输入图片名称搜索"
|
||||
style="width: 230px"
|
||||
@keyup.enter.native="getFileList(1)"
|
||||
size="small"
|
||||
>
|
||||
<el-button
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
class="el-button-solt"
|
||||
@click="getFileList(1)"
|
||||
/>
|
||||
</el-input>
|
||||
<!--<el-select
|
||||
v-model="tableData.order"
|
||||
@ -66,35 +142,90 @@
|
||||
value="1"
|
||||
/>
|
||||
</el-select>-->
|
||||
<el-select v-model="sleOptions.attachment_category_name" placeholder="图片移动至" class="mb15" size="small">
|
||||
<el-option :label="sleOptions.attachment_category_name" :value="sleOptions.attachment_category_id" style="max-width: 560px;height:200px;overflow: auto;background-color:#fff">
|
||||
<el-tree ref="tree2" :data="treeData2" :filter-node-method="filterNode" :props="defaultProps" @node-click="handleSelClick" />
|
||||
<el-select
|
||||
v-model="sleOptions.attachment_category_name"
|
||||
placeholder="图片移动至"
|
||||
class="mb15"
|
||||
size="small"
|
||||
>
|
||||
<el-option
|
||||
:label="sleOptions.attachment_category_name"
|
||||
:value="sleOptions.attachment_category_id"
|
||||
style="
|
||||
max-width: 560px;
|
||||
height: 200px;
|
||||
overflow: auto;
|
||||
background-color: #fff;
|
||||
"
|
||||
>
|
||||
<el-tree
|
||||
ref="tree2"
|
||||
:data="treeData2"
|
||||
:filter-node-method="filterNode"
|
||||
:props="defaultProps"
|
||||
@node-click="handleSelClick"
|
||||
/>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="pictrueList acea-row mb15">
|
||||
<div v-show="isShowPic" class="imagesNo">
|
||||
<i class="el-icon-picture" style="font-size: 60px;color: rgb(219, 219, 219);" />
|
||||
<i
|
||||
class="el-icon-picture"
|
||||
style="font-size: 60px; color: rgb(219, 219, 219)"
|
||||
/>
|
||||
<span class="imagesNo_sp">图片库为空</span>
|
||||
</div>
|
||||
<div class="conters">
|
||||
<div v-for="(item, index) in pictrueList.list" :key="index" class="gridPic">
|
||||
<div
|
||||
v-for="(item, index) in pictrueList.list"
|
||||
:key="index"
|
||||
class="gridPic"
|
||||
>
|
||||
<p class="number" v-if="item.num > 0">
|
||||
<el-badge class="item" :value="item.num">
|
||||
<a href="#" class="demo-badge"></a>
|
||||
</el-badge>
|
||||
</p>
|
||||
<img v-lazy="item.attachment_src" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />
|
||||
<div style="display: flex;align-items: center;justify-content: space-between">
|
||||
<el-input v-model="item.attachment_name" v-if="editId === item.attachment_id"></el-input>
|
||||
<p class="name" style="width: 80%" v-else>{{item.attachment_name}}</p>
|
||||
<i class="el-icon-edit" @click="handleEdit(item.attachment_id,item.attachment_name)" />
|
||||
<img
|
||||
v-lazy="item.attachment_src"
|
||||
:class="item.isSelect ? 'on' : ''"
|
||||
@click="changImage(item, index, pictrueList.list)"
|
||||
/>
|
||||
<div
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<el-input
|
||||
v-model="item.attachment_name"
|
||||
v-if="editId === item.attachment_id"
|
||||
></el-input>
|
||||
<p class="name" style="width: 80%" v-else>
|
||||
{{ item.attachment_name }}
|
||||
</p>
|
||||
<i
|
||||
class="el-icon-edit"
|
||||
@click="
|
||||
handleEdit(item.attachment_id, item.attachment_name)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="block">
|
||||
<el-pagination :page-sizes="[12, 20, 40, 60]" :page-size="tableData.limit" :current-page="tableData.page" layout="total, sizes, prev, pager, next, jumper" :total="pictrueList.total" @size-change="handleSizeChange" @current-change="pageChange" />
|
||||
<el-pagination
|
||||
:page-sizes="[12, 20, 40, 60]"
|
||||
:page-size="tableData.limit"
|
||||
:current-page="tableData.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pictrueList.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
@ -388,7 +519,7 @@ export default {
|
||||
// 点击使用选中图片
|
||||
checkPics () {
|
||||
if (this.checkPicList.length) {
|
||||
console.log(this.$route);
|
||||
// console.log(this.$route);
|
||||
if (this.$route) {
|
||||
if (this.$route.query.type === "1") {
|
||||
if (this.checkPicList.length > 1)
|
||||
@ -559,7 +690,7 @@ export default {
|
||||
font-weight: bold;
|
||||
}
|
||||
/deep/ .el-tree-node:focus > .el-tree-node__content {
|
||||
background-color: #F5F7FA!important;
|
||||
background-color: #f5f7fa !important;
|
||||
}
|
||||
.el-tree--highlight-current
|
||||
.el-tree-node.is-current
|
||||
|
@ -16,17 +16,21 @@
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
</template>
|
||||
<div class="platformLabel">{{ label.mer_name }}</div>
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click" :hide-on-click="false">
|
||||
<el-dropdown
|
||||
class="avatar-container right-menu-item hover-effect"
|
||||
trigger="click"
|
||||
:hide-on-click="false"
|
||||
>
|
||||
<span class="el-dropdown-link fontSize">
|
||||
{{ adminInfo }}
|
||||
<i class="el-icon-arrow-down el-icon--right" />
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="goUser">
|
||||
<span style="display:block;">个人中心</span>
|
||||
<span style="display: block">个人中心</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided @click.native="goPassword">
|
||||
<span style="display:block;">修改密码</span>
|
||||
<span style="display: block">修改密码</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided>
|
||||
<el-dropdown placement="right-start" @command="handleCommand">
|
||||
@ -38,11 +42,10 @@
|
||||
</el-dropdown>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided @click.native="logout">
|
||||
<span style="display:block;">退出</span>
|
||||
<span style="display: block">退出</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -91,7 +94,8 @@ export default {
|
||||
mounted () {
|
||||
getBaseInfo()
|
||||
.then(res => {
|
||||
this.label = res.data
|
||||
this.label = res.data;
|
||||
this.$store.commit('user/SET_MERCHANT_TYPE', res.data.merchantType || {})
|
||||
})
|
||||
.catch(({ message }) => {
|
||||
this.$message.error(message);
|
||||
@ -217,7 +221,7 @@ export default {
|
||||
}
|
||||
.platformLabel {
|
||||
display: inline-block;
|
||||
background: #F0AA0B;
|
||||
background: #f0aa0b;
|
||||
color: #fff;
|
||||
vertical-align: text-bottom;
|
||||
font-size: 12px;
|
||||
@ -227,7 +231,6 @@ export default {
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
top: -11px;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
@ -25,7 +25,20 @@
|
||||
</el-menu>
|
||||
<template v-else>
|
||||
<template v-if="!isCollapse">
|
||||
<ul v-for="item in menuList" :key="item.route" style="padding: 0;"><li><div class="menu menu-one"><div class="menu-item" :class="{ active: pathCompute(item) }" @click="goPath(item)"><i :class="'menu-icon el-icon-' + item.icon"></i><span>{{ item.menu_name }}</span></div></div></li></ul>
|
||||
<ul v-for="item in menuList" :key="item.route" style="padding: 0">
|
||||
<li>
|
||||
<div class="menu menu-one">
|
||||
<div
|
||||
class="menu-item"
|
||||
:class="{ active: pathCompute(item) }"
|
||||
@click="goPath(item)"
|
||||
>
|
||||
<i :class="'menu-icon el-icon-' + item.icon"></i
|
||||
><span>{{ item.menu_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
<!--一级菜单点击后二级菜单展开样式-->
|
||||
<el-menu
|
||||
@ -38,7 +51,7 @@
|
||||
active-text-color="#303133"
|
||||
mode="vertical"
|
||||
>
|
||||
<div style="height: 100%;">
|
||||
<div style="height: 100%">
|
||||
<div class="sub-title">{{ menu_name }}</div>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<div v-for="(itm, idx) in subMenuList" :key="idx">
|
||||
@ -55,7 +68,10 @@
|
||||
:to="resolvePath(onlyOneChild.route)"
|
||||
>
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.route)">
|
||||
<item :icon="onlyOneChild.icon || (itm && itm.icon)":title="onlyOneChild.menu_name"/>
|
||||
<item
|
||||
:icon="onlyOneChild.icon || (itm && itm.icon)"
|
||||
:title="onlyOneChild.menu_name"
|
||||
/>
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
</template>
|
||||
@ -309,7 +325,7 @@ export default {
|
||||
},
|
||||
//判断当前页面父级菜单
|
||||
pathCompute (data) {
|
||||
console.log(this.$route)
|
||||
// console.log(this.$route)
|
||||
const loop = child => {
|
||||
// 是否有子节点,有则继续遍历下一级,无则是叶子节点
|
||||
for (let i = 0; i < child.length; i++) {
|
||||
@ -375,7 +391,6 @@ export default {
|
||||
}
|
||||
&:hover {
|
||||
background: rgba(67, 127, 253, 0.2);
|
||||
|
||||
}
|
||||
}
|
||||
.menu-two {
|
||||
@ -414,7 +429,8 @@ export default {
|
||||
font-size: 18px;
|
||||
padding: 20px;
|
||||
}
|
||||
/deep/.el-menu-item,/deep/.el-submenu__title {
|
||||
/deep/.el-menu-item,
|
||||
/deep/.el-submenu__title {
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
// background: #ffffff !important;
|
||||
@ -422,10 +438,10 @@ export default {
|
||||
font-size: 13px;
|
||||
|
||||
&:hover {
|
||||
background: #ECF2FE !important;
|
||||
background: #ecf2fe !important;
|
||||
color: #303133 !important;
|
||||
.el-submenu__title {
|
||||
background: #ECF2FE !important;
|
||||
background: #ecf2fe !important;
|
||||
color: #303133 !important;
|
||||
}
|
||||
}
|
||||
@ -433,8 +449,10 @@ export default {
|
||||
/deep/.subMenu2 .el-submenu__title {
|
||||
padding-left: 15px !important;
|
||||
}
|
||||
/deep/.router-link-active .el-menu-item, /deep/.el-menu-item.is-active,/deep/ .router-link-active .el-submenu__title{
|
||||
background: #ECF2FE !important;
|
||||
/deep/.router-link-active .el-menu-item,
|
||||
/deep/.el-menu-item.is-active,
|
||||
/deep/ .router-link-active .el-submenu__title {
|
||||
background: #ecf2fe !important;
|
||||
}
|
||||
}
|
||||
/deep/.menus-new .el-icon-arrow-down {
|
||||
@ -444,20 +462,24 @@ export default {
|
||||
min-width: 140px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
/deep/.menuOpen .el-menu-item,/deep/.menuOpen .el-menu-item,/deep/.menuOpen .el-submenu__title{
|
||||
/deep/.menuOpen .el-menu-item,
|
||||
/deep/.menuOpen .el-menu-item,
|
||||
/deep/.menuOpen .el-submenu__title {
|
||||
padding-left: 15px !important;
|
||||
}
|
||||
/deep/.menuOpen .subMenu2 .el-submenu__title {
|
||||
padding-left: 30px !important;
|
||||
}
|
||||
/deep/.style2 .is-active,/deep/.style2>.el-submenu:hover{
|
||||
/deep/.style2 .is-active,
|
||||
/deep/.style2 > .el-submenu:hover {
|
||||
background: #182848 !important;
|
||||
}
|
||||
/deep/.style2.menuTwo .el-submenu__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
/deep/.subMenu1 .menuTwo .el-submenu__title:hover,/deep/.subMenu1 .menuTwo .el-menu-item:hover{
|
||||
/deep/.subMenu1 .menuTwo .el-submenu__title:hover,
|
||||
/deep/.subMenu1 .menuTwo .el-menu-item:hover {
|
||||
background: #182848 !important;
|
||||
}
|
||||
.menu-link {
|
||||
@ -478,9 +500,10 @@ export default {
|
||||
background: transparent !important;
|
||||
}
|
||||
/deep/.subMenu1 .menuTwo .el-menu {
|
||||
background: #030C17!important;
|
||||
background: #030c17 !important;
|
||||
}
|
||||
/deep/.subMenu1 .menuTwo .nest-menu .el-submenu>.el-submenu__title,/deep/.subMenu1 .menuTwo .el-submenu .el-menu-item{
|
||||
/deep/.subMenu1 .menuTwo .nest-menu .el-submenu > .el-submenu__title,
|
||||
/deep/.subMenu1 .menuTwo .el-submenu .el-menu-item {
|
||||
background: #030c17 !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -19,7 +19,8 @@ const state = {
|
||||
roles: [],
|
||||
menuList: JSON.parse(localStorage.getItem('MenuList')),
|
||||
sidebarWidth: window.localStorage.getItem('sidebarWidth'),
|
||||
sidebarStyle: window.localStorage.getItem('sidebarStyle')
|
||||
sidebarStyle: window.localStorage.getItem('sidebarStyle'),
|
||||
merchantType: JSON.parse(window.localStorage.getItem('merchantType') || '{}')
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
@ -47,7 +48,11 @@ const mutations = {
|
||||
SET_SIDEBAR_STYLE: (state, style) => {
|
||||
state.sidebarStyle = style;
|
||||
window.localStorage.setItem('sidebarStyle', style);
|
||||
}
|
||||
},
|
||||
SET_MERCHANT_TYPE: (state, merchantType) => {
|
||||
state.merchantType = merchantType;
|
||||
window.localStorage.setItem('merchantType', JSON.stringify(merchantType));
|
||||
},
|
||||
}
|
||||
|
||||
const actions = {
|
||||
|
@ -448,7 +448,6 @@
|
||||
align="center"
|
||||
min-width="120"
|
||||
>
|
||||
|
||||
<template slot-scope="scope">
|
||||
<div v-if="formValidate.svip_price_type != 0">
|
||||
<el-input
|
||||
@ -893,12 +892,14 @@
|
||||
<el-col v-if="deliveryList.length > 0" :span="24">
|
||||
<el-form-item label="送货方式:" prop="delivery_way">
|
||||
<div class="acea-row">
|
||||
<el-checkbox-group style="pointer-events: none" v-model="formValidate.delivery_way">
|
||||
<el-checkbox-group
|
||||
style="pointer-events: none"
|
||||
v-model="formValidate.delivery_way"
|
||||
>
|
||||
<el-checkbox
|
||||
v-for="item in deliveryList"
|
||||
:key="item.value"
|
||||
:label="item.value"
|
||||
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
@ -1315,7 +1316,7 @@ const defaultObj = {
|
||||
}
|
||||
const objTitle = {
|
||||
price: {
|
||||
title: '售价'
|
||||
title: '零售价'
|
||||
},
|
||||
cost: {
|
||||
title: '成本价'
|
||||
@ -1544,6 +1545,7 @@ export default {
|
||||
],
|
||||
type: 0,
|
||||
modals: false,
|
||||
// attrVal 商品规格内的字段设置
|
||||
attrVal: {
|
||||
price: null,
|
||||
cost: null,
|
||||
@ -1597,6 +1599,10 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// console.log(this.$store.state.user.merchantType.type_code); // 店铺类型, 非市级供应链不显示批发价
|
||||
if (this.$store.state.user.merchantType.type_code != 'TypeSupplyChain') {
|
||||
delete this.attrVal.procure_price
|
||||
}
|
||||
this.formValidate.slider_image = []
|
||||
if (this.$route.params.id) {
|
||||
this.setTagsViewTitle()
|
||||
@ -1622,7 +1628,7 @@ export default {
|
||||
this.productCon()
|
||||
this.productGetRule()
|
||||
this.getLabelLst()
|
||||
this.$store.dispatch('settings/setEdit', true)
|
||||
this.$store.dispatch('settings/setEdit', true);
|
||||
},
|
||||
destroyed () {
|
||||
window.removeEventListener('popstate', this.goBack, false)
|
||||
@ -2787,7 +2793,4 @@ export default {
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user