Commit 70a2b370 by 李伟康

删除活动同步活动下拉列表

1 parent 60760b29
......@@ -2,123 +2,53 @@
<template>
<div class="marketing">
<div class="m-b-20">
<GLButton
:size="size"
class="default-blue-btn el-icon-plus"
type="default"
@click="handleEdit('add')"
fn="新增众筹"
mode="el-button"
>新建众筹</GLButton>
<GLButton :size="size" class="default-blue-btn el-icon-plus" type="default" @click="handleEdit('add')" fn="新增众筹"
mode="el-button">新建众筹</GLButton>
<template v-if="!hideStatus">
<el-button
:size="size"
type="default"
class="default-blue-btn"
@click="handleJump"
>订单管理</el-button>
<el-button :size="size" type="default" class="default-blue-btn" @click="handleJump">订单管理</el-button>
</template>
</div>
<div class="container">
<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 class="flex m-b-10 w-100-percent">
<span class="table-title"></span>
<el-button
:size="size"
class="default-blue-btn"
type="default"
@click="handleExport"
>导出</el-button>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport">导出</el-button>
</div>
<!-- 表格区域 开始 -->
<single-gltable
ref="activity"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div
slot="activityImg"
class="table-image"
slot-scope="scope"
>
<el-popover
placement="top"
width="160"
trigger="hover"
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"
/>
<single-gltable ref="activity" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm"
:tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div slot="activityImg" class="table-image" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" 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>
</div>
<div
slot="linkText"
slot-scope="scope"
>
<div slot="linkText" slot-scope="scope">
<template v-if="scope.scope.incrementFlag == 'Y' || hideStatus">
{{scope.scope[scope.prop] || 0 }}
{{ scope.scope[scope.prop] || 0 }}
</template>
<template v-else>
<p
class="cursor-pointer"
@click="handleDetail(scope)"
>{{ scope.scope[scope.prop] || 0 }}</p>
<p class="cursor-pointer" @click="handleDetail(scope)">{{ scope.scope[scope.prop] || 0 }}</p>
</template>
</div>
<div
slot="joinText"
slot-scope="scope"
>
<el-tooltip
effect="dark"
:content="formatterNumber(scope.scope,scope.prop)"
placement="top"
>
<div class="line-ellipsis">{{formatterNumber(scope.scope,scope.prop)}}</div>
<div slot="joinText" slot-scope="scope">
<el-tooltip effect="dark" :content="formatterNumber(scope.scope, scope.prop)" placement="top">
<div class="line-ellipsis">{{ formatterNumber(scope.scope, scope.prop) }}</div>
</el-tooltip>
</div>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</single-gltable>
<!-- 表格区域 end -->
</div>
<!-- 众筹分享 -->
<crowdFundingShare
:isShareVisible="isShareVisible"
:shareForm="shareForm"
@handleShareClose="handleShareClose"
:hideStatus="hideStatus"
></crowdFundingShare>
<crowdFundingShare :isShareVisible="isShareVisible" :shareForm="shareForm" @handleShareClose="handleShareClose"
:hideStatus="hideStatus"></crowdFundingShare>
</div>
</template>
......@@ -341,7 +271,7 @@ export default {
mounted () {
this.getCrowdfundingOrderConfig()
this.getCrowdfundingParams()
this.getCrowdfundingParams([1, 2])
this.getOptionsList('searchFormData')
......@@ -578,7 +508,9 @@ export default {
del (row) {
var params = {}
params.id = row.id
this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params)
this.secondConfirm('删除', '确定删除此活动?', 'seckillActivity', 'deleteActivityApi', params, () => {
this.getCrowdfundingParams([1])
})
},
// 1-新增;2-编辑
......@@ -693,34 +625,39 @@ export default {
this.$refs.activity.data.length ? (this.$refs.activity.tableHeightValues = '') : this.$refs.activity.setTableHeightFun()
},
async getCrowdfundingParams () {
async getCrowdfundingParams (parameterTypeList) {
/**参数类型 1:众筹活动名称(返回类型String),2:众筹活动门店 */
const activity = await this.$apis.seckillActivity.getCrowdfundingParams({
parameterType: 1
})
let activityNameList = []
if (activity?.parameters && activity.parameters.length) {
activity.parameters.map(e => {
activityNameList.push({
confId: e,
confName: e
})
if (parameterTypeList.includes(1)) {
const activity = await this.$apis.seckillActivity.getCrowdfundingParams({
parameterType: 1
})
}
this.$set(this.searchFormData[0], 'optionList', this.$common.utils.deepClone(activityNameList))
const merchant = await this.$apis.seckillActivity.getCrowdfundingParams({
parameterType: 2
})
let merchantNameList = []
if (merchant?.parameters && merchant.parameters.length) {
merchant.parameters.map(e => {
merchantNameList.push({
confId: e,
confName: e
let activityNameList = []
if (activity?.parameters && activity.parameters.length) {
activity.parameters.map(e => {
activityNameList.push({
confId: e,
confName: e
})
})
}
this.$set(this.searchFormData[0], 'optionList', this.$common.utils.deepClone(activityNameList))
}
if (parameterTypeList.includes(2)) {
const merchant = await this.$apis.seckillActivity.getCrowdfundingParams({
parameterType: 2
})
let merchantNameList = []
if (merchant?.parameters && merchant.parameters.length) {
merchant.parameters.map(e => {
merchantNameList.push({
confId: e,
confName: e
})
})
}
this.$set(this.searchFormData[2], 'optionList', this.$common.utils.deepClone(merchantNameList))
}
this.$set(this.searchFormData[2], 'optionList', this.$common.utils.deepClone(merchantNameList))
},
formatterNumber (cell, key) {
......@@ -735,13 +672,15 @@ export default {
</script>
<style>
.el-select .el-select__tags > span {
.el-select .el-select__tags>span {
display: flex !important;
width: 80%;
}
.el-select .el-tag {
max-width: 55% !important;
}
.line-ellipsis {
white-space: nowrap;
overflow: hidden;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!