Commit b06191a1 by 李伟康

提交代码

1 parent 17b95108
...@@ -2,75 +2,103 @@ ...@@ -2,75 +2,103 @@
<template> <template>
<div class="marketing"> <div class="marketing">
<div class="m-b-20"> <div class="m-b-20">
<GLButton :size="size" <GLButton
class="default-blue-btn el-icon-plus" :size="size"
type="default" class="default-blue-btn el-icon-plus"
@click="handleEdit('add')" type="default"
fn="新增众筹" @click="handleEdit('add')"
mode="el-button">新建众筹</GLButton> fn="新增众筹"
<el-button :size="size" mode="el-button"
type="default" >新建众筹</GLButton>
class="default-blue-btn" <el-button
@click="handleJump">订单管理</el-button> :size="size"
type="default"
class="default-blue-btn"
@click="handleJump"
>订单管理</el-button>
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" <GLCombiForm
:rowNumber="1" ref="showSearch"
:formObj="searchForm" :rowNumber="1"
:formData="searchFormData" :formObj="searchForm"
@handleOk="handleSearch" :formData="searchFormData"
@handleRest="handleReset"></GLCombiForm> @handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title"></span> <span class="table-title"></span>
<el-button :size="size" <el-button
class="default-blue-btn" :size="size"
type="default" class="default-blue-btn"
@click="handleExport">导出</el-button> type="default"
@click="handleExport"
>导出</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="activity" <GLTable
:getListApi="getListApi" ref="activity"
:noDataImg="url" :getListApi="getListApi"
:searchForm="tableSearchForm" :noDataImg="url"
:tableParams="tableParams" :searchForm="tableSearchForm"
:pageConf="pageConf" :tableParams="tableParams"
:beforeSearchFn="beforeSearchFn" :pageConf="pageConf"
@setTableFinishFun="setTableFinishFun"> :beforeSearchFn="beforeSearchFn"
<div slot="activityImg" @setTableFinishFun="setTableFinishFun"
class="table-image" >
slot-scope="scope"> <div
<el-popover placement="top" slot="activityImg"
width="160" class="table-image"
trigger="hover" slot-scope="scope"
popper-class="table-popover-block"> >
<img class="table-popover-img" <el-popover
:src="scope.scope.activityImg" /> placement="top"
<img class="img-60 pointer" width="160"
slot="reference" trigger="hover"
:src="scope.scope.activityImg" /> popper-class="table-popover-block"
>
<img
class="table-popover-img"
:src="scope.scope.activityImg"
/>
<img
class="img-60 pointer"
slot="reference"
:src="scope.scope.activityImg"
/>
</el-popover> </el-popover>
</div> </div>
<div slot="linkText" <div
slot-scope="scope"> slot="linkText"
<p class="cursor-pointer" slot-scope="scope"
@click="handleDetail(scope)">{{ scope.scope[scope.prop] || 0 }}</p> >
<p
class="cursor-pointer"
@click="handleDetail(scope)"
>{{ scope.scope[scope.prop] || 0 }}</p>
</div> </div>
<div class="table-btns" <div
slot="auth-button" class="table-btns"
slot-scope="scope"> slot="auth-button"
<GLTableButton :buttonList="tableButtonList" slot-scope="scope"
:buttonItem="scope.scope" >
:buttonNum="3"></GLTableButton> <GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
</div> </div>
<!-- 众筹分享 --> <!-- 众筹分享 -->
<crowdFundingShare :isShareVisible="isShareVisible" <crowdFundingShare
:shareForm="shareForm" :isShareVisible="isShareVisible"
@handleShareClose="handleShareClose"></crowdFundingShare> :shareForm="shareForm"
@handleShareClose="handleShareClose"
></crowdFundingShare>
</div> </div>
</template> </template>
...@@ -81,7 +109,7 @@ import url from '@/assets/empty.png' ...@@ -81,7 +109,7 @@ import url from '@/assets/empty.png'
import { exportFn } from '@/common/constant' import { exportFn } from '@/common/constant'
export default { export default {
name: 'crowdFundList', name: 'crowdFundList',
data() { data () {
return { return {
size: 'small', size: 'small',
url: url, url: url,
...@@ -100,6 +128,7 @@ export default { ...@@ -100,6 +128,7 @@ export default {
tableSearchForm: {}, tableSearchForm: {},
// 搜索 // 搜索
searchFormData: [ searchFormData: [
/*******改👇 */
{ {
label: '活动名称', label: '活动名称',
name: 'activityName', name: 'activityName',
...@@ -117,12 +146,19 @@ export default { ...@@ -117,12 +146,19 @@ export default {
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'statusList' optionsName: 'statusList'
}, },
/*******改👇 */
{ {
label: '门店', label: '门店',
name: 'merchantName', name: 'merchantName',
type: 'input', type: 'select',
width: '215px', width: '215px',
maxlength: 20 // maxlength: 20,
multiple: true,
noFilter: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'statusList'
} }
], ],
// 表格按钮 // 表格按钮
...@@ -134,7 +170,7 @@ export default { ...@@ -134,7 +170,7 @@ export default {
type: 'text' type: 'text'
}, },
condition: row => { condition: row => {
return row.activityStatus == '1' return [1, 3].includes(row.activityStatus)
}, },
listeners: { listeners: {
click: this.start click: this.start
...@@ -391,7 +427,7 @@ export default { ...@@ -391,7 +427,7 @@ export default {
crowdFundingShare crowdFundingShare
}, },
mounted() { mounted () {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
// const { // const {
// $GLBUTTION_PERMISSIONS: { routes = [], routerBase } // $GLBUTTION_PERMISSIONS: { routes = [], routerBase }
...@@ -404,17 +440,17 @@ export default { ...@@ -404,17 +440,17 @@ export default {
}, },
methods: { methods: {
__getRoutes(ctx) { __getRoutes (ctx) {
const { const {
$GLBUTTION_PERMISSIONS: { routes = [], routerBase } $GLBUTTION_PERMISSIONS: { routes = [], routerBase }
} = ctx } = ctx
return routes.find(route => location.pathname === `${routerBase}${route.path.split(':/')[0]}`) return routes.find(route => location.pathname === `${routerBase}${route.path.split(':/')[0]}`)
}, },
getParams() { getParams () {
var params = JSON.parse(JSON.stringify(this.searchForm)) var params = JSON.parse(JSON.stringify(this.searchForm))
return params return params
}, },
beforeSearchFn() { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
this.tableSearchForm = this.getParams() this.tableSearchForm = this.getParams()
// delete this.tableSearchForm.createDate // delete this.tableSearchForm.createDate
...@@ -422,13 +458,13 @@ export default { ...@@ -422,13 +458,13 @@ export default {
}) })
}, },
handleJump(path, row = {}) { handleJump (path, row = {}) {
this.$router.push({ this.$router.push({
path: '/orderManage/index' path: '/orderManage/index'
}) })
}, },
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) { secondConfirm (title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -454,16 +490,16 @@ export default { ...@@ -454,16 +490,16 @@ export default {
}, },
//开始 //开始
start(item) { start (item) {
this.startOrEndConfirm('开始', item) this.startOrEndConfirm('开始', item)
}, },
//结束 //结束
end(item) { end (item) {
this.startOrEndConfirm('结束', item) this.startOrEndConfirm('结束', item)
}, },
startOrEndConfirm(txt, row) { startOrEndConfirm (txt, row) {
var title = txt var title = txt
var params = {} var params = {}
params.id = row.id params.id = row.id
...@@ -476,21 +512,21 @@ export default { ...@@ -476,21 +512,21 @@ export default {
}, },
//置顶 //置顶
topping(row) { topping (row) {
var params = {} var params = {}
params.id = row.id params.id = row.id
this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params) this.secondConfirm('删除', '确定置顶此活动?', 'seckillActivity', 'topActivityApi', params)
}, },
//删除 //删除
del(row) { del (row) {
var params = {} var params = {}
params.id = row.id params.id = row.id
this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params) this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params)
}, },
// 1-新增;2-编辑 // 1-新增;2-编辑
handleEdit(addOrEdit, row) { handleEdit (addOrEdit, row) {
var txtObj = { var txtObj = {
add: '新建', add: '新建',
edit: '编辑', edit: '编辑',
...@@ -509,11 +545,11 @@ export default { ...@@ -509,11 +545,11 @@ export default {
query: params query: params
}) })
}, },
test(option) { test (option) {
console.log(JSON.parse(JSON.stringify(option))) console.log(JSON.parse(JSON.stringify(option)))
}, },
// 明细 // 明细
handleDetail({ prop, scope }) { handleDetail ({ prop, scope }) {
let data = { let data = {
viewAmount: { viewAmount: {
type: 1, type: 1,
...@@ -539,25 +575,25 @@ export default { ...@@ -539,25 +575,25 @@ export default {
}) })
}, },
handleExport() { handleExport () {
var params = this.getParams() var params = this.getParams()
this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => { this.$apis.seckillActivity.exportCrowdfundApi(params).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
handleShare(row) { handleShare (row) {
this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => { this.$apis.seckillActivity.getCrowdSharedApi({ id: row.id }).then(res => {
this.shareForm = res this.shareForm = res
this.handleShareClose() this.handleShareClose()
}) })
}, },
handleShareClose() { handleShareClose () {
this.isShareVisible = !this.isShareVisible this.isShareVisible = !this.isShareVisible
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList (formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle) var index = this[formName].findIndex(k => k.name == refreshSigle)
...@@ -583,11 +619,11 @@ export default { ...@@ -583,11 +619,11 @@ export default {
} }
}, },
handleSearch() { handleSearch () {
this.$refs.activity.refreshTable() this.$refs.activity.refreshTable()
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
activityName: '', activityName: '',
activityStatus: '' activityStatus: ''
...@@ -595,7 +631,7 @@ export default { ...@@ -595,7 +631,7 @@ export default {
this.handleSearch() this.handleSearch()
}, },
setTableFinishFun() { setTableFinishFun () {
//接收到的数据为空 //接收到的数据为空
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun() this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!