Commit 1b2e8969 by cwq0219

权限按钮,跳转方式

1 parent f44150cc
......@@ -48,16 +48,16 @@ export default {
data() {
return {
size: 'small',
title: '新增分类',
title: '新建分类',
titleObj: {
1: '新增分类',
1: '新建分类',
2: '编辑分类'
},
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
routeInfo: {
// 1-新增;2-编辑;3-查看
// 1-新建;2-编辑;3-查看
addOrEdit: 1,
id: ''
},
......@@ -118,7 +118,7 @@ export default {
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.routeInfo = this.$route.query
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
},
......
......@@ -2,7 +2,8 @@
<template>
<div class="marketing p-t-20">
<div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增分类</el-button>
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建分类</el-button> -->
<GLButton :size="size" type="primary" fn="新建分类" class="el-icon-plus" @click="handleEdit(1)">新建分类</GLButton>
</div>
<div class="container">
<div>
......@@ -17,7 +18,8 @@
<!-- 表格区域 开始 -->
<GLTable ref="classifyRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<!-- <el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> -->
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
</div>
......@@ -122,9 +124,18 @@ export default {
}
})
},
// 1-新增;2-编辑
// 1-新建;2-编辑
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/classifyList/editClassify/' + addOrEdit) : this.$router.push('/classifyList/editClassify/' + addOrEdit + '/' + row.id)
// addOrEdit == 1 ? this.$router.push('/classifyList/editClassify/' + addOrEdit) : this.$router.push('/classifyList/editClassify/' + addOrEdit + '/' + row.id)
var params = {
addOrEdit: addOrEdit,
$title:encodeURI(addOrEdit == 1 ? '新建分类' : '编辑分类')
}
addOrEdit != 1 && (params.id = row.id)
this.$router.push({
path: '/classifyList/editClassify',
query: params
})
},
handleDelete(row) {
......
......@@ -53,7 +53,7 @@ export default {
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.routeInfo = this.$route.query
this.getInfo()
},
......
......@@ -16,7 +16,8 @@
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.commentStatus == '0'" type="text" @click="handleRevoke(scope.scope)">发布</el-button>
<el-button v-if="scope.scope.commentStatus == '1'" type="text" @click="handleRevoke(scope.scope)">撤回</el-button>
<el-button type="text" @click="handleDetail(scope.scope)">查看</el-button>
<!-- <el-button type="text" @click="handleDetail(scope.scope)">查看</el-button> -->
<GLButton type="text" fn="评价详情" @click="handleDetail(scope.scope)">查看</GLButton>
<!-- <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> -->
</div>
</GLTable>
......@@ -152,7 +153,12 @@ export default {
// 查看
handleDetail(row) {
this.$router.push('/orderComment/commentDetail/' + row.id)
this.$router.push({
path: '/orderComment/commentDetail',
query: {
id: row.id
}
})
},
// 发布/撤回
......
......@@ -34,7 +34,8 @@
<!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<GLTable ref="allOrderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button>
<!-- <el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button> -->
<GLButton type="text" fn="查看订单" @click="handleDetail(scope.scope)">查看订单</GLButton>
<el-button v-if="scope.scope.deliveryType == 1 && scope.scope.orderStatus == 14" type="text" @click="handleWriteOff(scope.scope)">订单核销</el-button>
<el-button v-if="scope.scope.deliveryType == 2 && scope.scope.orderStatus == 13" type="text" @click="handleExpressInfo(scope.scope)">输入快递信息</el-button>
<el-button v-if="scope.scope.orderStatus == 6" type="text" @click="handleExamine(scope.scope)">退款审核</el-button>
......@@ -466,7 +467,12 @@ export default {
},
handleDetail(row) {
this.$router.push('/orderManage/orderDetail/' + row.orderCode)
this.$router.push({
path: '/orderManage/orderDetail',
query: {
orderCode: row.orderCode
}
})
},
// 输入快递信息 - start
......
......@@ -160,7 +160,7 @@ export default {
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.routeInfo = this.$route.query
this.getInfo()
},
......
......@@ -2,7 +2,6 @@
<template>
<div class="edit-pro marketing p-t-20 edit-box">
<div class="container edit-container">
<!-- <p class="edit-title">{{ title }}</p> -->
<div class="flex">
<div class="home-set-form flex-grow">
<div v-for="(item, index) in externalFormList" :key="index">
......@@ -409,11 +408,6 @@ export default {
data() {
return {
size: 'small',
title: '新增商品',
titleObj: {
1: '新增商品',
2: '编辑商品'
},
footerLeft: '0',
footerWidth: '0',
editChildRef: 'editChildRef',
......@@ -421,7 +415,7 @@ export default {
isDisabled: false,
wechatImgList: [],
routeInfo: {
// 1-新增;2-编辑;3-查看
// 1-新建;2-编辑;3-查看
addOrEdit: 1,
// 1-集团;2-门店
groupOrStore: '',
......@@ -808,9 +802,8 @@ export default {
this.$refs.merchantTableRef[0].tableHeightValues = '400px'
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.routeInfo = this.$route.query
// console.log(this.routeInfo)
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.getBaseDate().then(() => {
this.getOptionsList(0, 'editFormData', false)
})
......
......@@ -2,7 +2,8 @@
<template>
<div class="marketing pro-group p-t-20">
<div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button>
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button> -->
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div>
<div class="container">
<div>
......@@ -21,8 +22,10 @@
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleUpOrDown(scope.scope)">{{ scope.scope.goodsStatus ? '下架' : '上架' }}</el-button>
<el-button v-if="!scope.scope.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleEdit(3, scope.scope)">查看</el-button>
<!-- <el-button v-if="!scope.scope.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleEdit(3, scope.scope)">查看</el-button> -->
<GLButton v-if="!scope.scope.goodsStatus" type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="scope.scope.goodsStatus" type="text" fn="查看" @click="handleEdit(3, scope.scope)">查看</GLButton>
<el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
<el-button type="text" @click="handleShare(scope.scope)">分享</el-button>
</div>
......@@ -226,7 +229,22 @@ export default {
// addOrEdit:1-新增;2-编辑;3-查看
// groupOrStore:1-集团;2-门店
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 1) : this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 1 + '/' + row.id)
// addOrEdit == 1 ? this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 1) : this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 1 + '/' + row.id)
var titleObj = {
1: '新建商品',
2: '编辑商品',
3: '查看商品',
}
var params = {
addOrEdit: addOrEdit,
groupOrStore: 1,
$title:encodeURI(titleObj[addOrEdit])
}
addOrEdit != 1 && (params.id = row.id)
this.$router.push({
path: '/productGroup/editProduct',
query: params
})
},
handleUpOrDown(row) {
if (row.goodsStatus) {
......
......@@ -162,7 +162,7 @@ export default {
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.routeInfo = this.$route.query
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.isDisabled = this.routeInfo.addOrEdit == 3
this.editFormData[0].isDisabled = this.isDisabled
......
......@@ -2,7 +2,8 @@
<template>
<div class="marketing pro-group p-t-20">
<div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button>
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建商品</el-button> -->
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div>
<div class="container">
<div>
......@@ -20,13 +21,17 @@
<img class="img-60" :src="scope.scope.goodsImage" />
</template>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="!scope.scope.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<!-- <el-button v-if="!scope.scope.goodsStatus" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> -->
<GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" fn="自建编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2" type="text" fn="带货编辑" @click="handleEditDh(2, scope.scope)">编辑</GLButton>
<el-button v-if="!scope.scope.goodsStatus && (scope.scope.goodsSource == 1 || (scope.scope.goodsSource == 2 && scope.scope.originGoodsStatus))" type="text" @click="handleUpOrDown(scope.scope)">上架</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && !scope.scope.originGoodsStatus" type="text" @click="handleDwonNotice(scope.scope)">下架通知</el-button>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleUpOrDown(scope.scope)">下架</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2" type="text" @click="handleTakeGood(scope.scope)">取消带货</el-button>
<el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" @click="handleTop(scope.scope)">置顶</el-button>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleEdit(3, scope.scope)">查看</el-button>
<!-- <el-button v-if="scope.scope.goodsStatus" type="text" @click="handleEdit(3, scope.scope)">查看</el-button> -->
<GLButton v-if="scope.scope.goodsStatus && scope.scope.goodsSource == 1" type="text" fn="自建查看" @click="handleEdit(3, scope.scope)">查看</GLButton>
<GLButton v-if="scope.scope.goodsStatus && scope.scope.goodsSource == 2" type="text" fn="带货查看" @click="handleEditDh(3, scope.scope)">查看</GLButton>
<el-button v-if="scope.scope.goodsStatus" type="text" @click="handleShare(scope.scope)">分享</el-button>
</div>
</GLTable>
......@@ -246,13 +251,43 @@ export default {
},
// addOrEdit:1-新增;2-编辑;3-查看
// groupOrStore:1-集团;2-门店
// goodsSource: 1-门店;2-带货
handleEdit(addOrEdit, row) {
// 1-门店;2-带货
if (addOrEdit != 1 && row.goodsSource == 2) {
this.$router.push('/productStore/editProductDh/' + addOrEdit + '/' + row.id)
return true
// if (addOrEdit != 1 && row.goodsSource == 2) {
// this.$router.push('/productStore/editProductDh/' + addOrEdit + '/' + row.id)
// return true
// }
// addOrEdit == 1 ? this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 2) : this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 2 + '/' + row.id)
var titleObj = {
1: '新建商品',
2: '编辑商品',
3: '查看商品',
}
addOrEdit == 1 ? this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 2) : this.$router.push('/productGroup/editProduct/' + addOrEdit + '/' + 2 + '/' + row.id)
var params = {
addOrEdit: addOrEdit,
groupOrStore: 2,
$title:encodeURI(titleObj[addOrEdit])
}
addOrEdit != 1 && (params.id = row.id)
this.$router.push({
path: '/productGroup/editProduct',
query: params
})
},
handleEditDh(addOrEdit, row) {
var titleObj = {
2: '编辑商品',
3: '查看商品',
}
var params = {
addOrEdit: addOrEdit,
id: row.id,
$title:encodeURI(titleObj[addOrEdit])
}
this.$router.push({
path: '/productStore/editProductDh',
query: params
})
},
// 下架通知
handleDwonNotice(row) {
......
......@@ -131,7 +131,7 @@ export default {
mounted() {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
this.routeInfo = this.$route.query
this.title = this.titleObj[this.routeInfo.addOrEdit]
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
},
......
......@@ -2,7 +2,8 @@
<template>
<div class="marketing p-t-20">
<div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建专区</el-button>
<!-- <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新建专区</el-button> -->
<GLButton :size="size" type="primary" fn="新建专区" class="el-icon-plus" @click="handleEdit(1)">新建专区</GLButton>
</div>
<div class="container">
<div>
......@@ -17,8 +18,8 @@
<!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<el-button type="text" fn="删除" @click="handleDelete(scope.scope)">删除</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -124,7 +125,16 @@ export default {
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
// addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
var params = {
addOrEdit: addOrEdit,
$title:encodeURI(addOrEdit == 1 ? '新建专区' : '编辑专区')
}
addOrEdit != 1 && (params.id = row.id)
this.$router.push({
path: '/zoneList/editZone',
query: params
})
},
handleDelete(row) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!