Commit 864c2d28 by chenwq

商品管理(门店),带货管理ui管理

1 parent c060da7d
...@@ -212,6 +212,10 @@ export default { ...@@ -212,6 +212,10 @@ export default {
{ {
confId: '3', confId: '3',
confName: '已失效' confName: '已失效'
},
{
confId: '4',
confName: '已作废'
} }
], ],
wechatUserFlagList: [ wechatUserFlagList: [
......
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
<GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton> <GLButton :size="size" type="primary" fn="新建商品" class="el-icon-plus" @click="handleEdit(1)">新建商品</GLButton>
</div> </div>
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
</div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
...@@ -19,18 +17,17 @@ ...@@ -19,18 +17,17 @@
</el-popover> </el-popover>
</template> </template>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <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> --> <!-- <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 == 1" type="text" fn="自建编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && scope.scope.takeType == '1'" type="text" fn="带货编辑" @click="handleEditDh(2, scope.scope)">编辑</GLButton> <GLButton v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && scope.scope.takeType == '1'" 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 == 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 && scope.scope.offReason" type="text" @click="handleDwonNotice(scope.scope)">下架通知</el-button> <el-button v-if="!scope.scope.goodsStatus && scope.scope.goodsSource == 2 && !scope.scope.originGoodsStatus && scope.scope.offReason" 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" 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 == 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 && 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> -->
<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 == 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> <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> <el-button v-if="scope.scope.goodsStatus" type="text" @click="handleShare(scope.scope)">分享</el-button> -->
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -104,6 +101,143 @@ export default { ...@@ -104,6 +101,143 @@ export default {
optionsName: 'goodsStatusList' optionsName: 'goodsStatusList'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '自建编辑'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 1
},
listeners: {
click: row => this.handleEdit(2, row)
}
},
{
type: 'GLButton',
name: '编辑',
attrs: {
type: 'text',
fn: '带货编辑'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 2 && row.takeType == '1'
},
listeners: {
click: row => this.handleEditDh(2, row)
}
},
{
type: 'el-button',
name: '上架',
attrs: {
type: 'text'
},
condition: row => {
return !row.goodsStatus && (row.goodsSource == 1 || (row.goodsSource == 2 && row.originGoodsStatus))
},
listeners: {
click: this.handleUpOrDown
}
},
{
type: 'el-button',
name: '下架通知',
attrs: {
type: 'text'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 2 && !row.originGoodsStatus && row.offReason
},
listeners: {
click: this.handleDwonNotice
}
},
{
type: 'el-button',
name: '下架',
attrs: {
type: 'text'
},
condition: row => {
return row.goodsStatus
},
listeners: {
click: this.handleUpOrDown
}
},
{
type: 'el-button',
name: '取消带货',
attrs: {
type: 'text'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 2
},
listeners: {
click: this.handleTakeGood
}
},
{
type: 'el-button',
name: '置顶',
attrs: {
type: 'text'
},
condition: row => {
return !row.goodsStatus && row.goodsSource == 1
},
listeners: {
click: this.handleTop
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '自建查看'
},
condition: row => {
return row.goodsStatus && row.goodsSource == 1
},
listeners: {
click: row => this.handleEdit(3, row)
}
},
{
type: 'GLButton',
name: '查看',
attrs: {
type: 'text',
fn: '带货查看'
},
condition: row => {
return row.goodsStatus && row.goodsSource == 2
},
listeners: {
click: row => this.handleEditDh(3, row)
}
},
{
type: 'el-button',
name: '分享',
attrs: {
type: 'text'
},
condition: row => {
return row.goodsStatus
},
listeners: {
click: this.handleShare
}
}
],
// 表格 // 表格
getListApi: this.$apis.proManage.getListApi, getListApi: this.$apis.proManage.getListApi,
tableParams: { tableParams: {
...@@ -291,7 +425,7 @@ export default { ...@@ -291,7 +425,7 @@ export default {
handleDwonNotice(row) { handleDwonNotice(row) {
this.$alert('你带货的' + row.goodsName + '商品现已下架,下架原因:' + row.offReason, '商品下架通知', { this.$alert('你带货的' + row.goodsName + '商品现已下架,下架原因:' + row.offReason, '商品下架通知', {
confirmButtonText: '确定', confirmButtonText: '确定',
callback: action => {} callback: action => { }
}) })
}, },
handleUpOrDown(row) { handleUpOrDown(row) {
......
...@@ -2,14 +2,7 @@ ...@@ -2,14 +2,7 @@
<template> <template>
<div class="marketing take-good p-t-20"> <div class="marketing take-good p-t-20">
<div class="container"> <div class="container">
<div> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
<el-button :size="size" class="default-blue-btn f-right m-b-10" type="default" @click="handleTakeGood()">一键带货</el-button> <el-button :size="size" class="default-blue-btn f-right m-b-10" type="default" @click="handleTakeGood()">一键带货</el-button>
...@@ -22,10 +15,9 @@ ...@@ -22,10 +15,9 @@
</el-popover> </el-popover>
</div> </div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="!scope.scope.taked" type="text" @click="handleSingleTakeGood(scope.scope)">带货</el-button> <!-- <el-button v-if="!scope.scope.taked" type="text" @click="handleSingleTakeGood(scope.scope)">带货</el-button>
<!-- <GLButton v-if="!scope.scope.taked" fn="带货" type="text" @click="handleSingleTakeGood(scope.scope)">带货</GLButton> --> <GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton> -->
<!-- <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> --> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
<GLButton type="text" fn="详情" @click="handleDetail(scope.scope)">详情</GLButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -64,6 +56,33 @@ export default { ...@@ -64,6 +56,33 @@ export default {
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} }
], ],
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '带货',
attrs: {
type: 'text'
},
condition: row => {
return !row.taked
},
listeners: {
click: this.handleSingleTakeGood
}
},
{
type: 'GLButton',
name: '详情',
attrs: {
type: 'text',
fn: '详情'
},
listeners: {
click: this.handleDetail
}
}
],
// 表格 // 表格
getListApi: this.$apis.takeGood.getListApi, getListApi: this.$apis.takeGood.getListApi,
tableParams: { tableParams: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!