前端
This commit is contained in:
parent
034bce71f4
commit
f1b2f11ca0
@ -45,7 +45,7 @@ export function updateActiveFullminus(data) {
|
||||
// 删除满减营销
|
||||
export function delActiveFullminus(id) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/activeFullminus/' + id,
|
||||
url: '/business/marketingActivity/activeFullminus/delById/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
@ -3,11 +3,20 @@ import request from '@/utils/request'
|
||||
// 查询新人有礼活动列表
|
||||
export function listActiveNewlyweds(query) {
|
||||
return request({
|
||||
url: '/business/marketingActivity/activeNewlyweds',
|
||||
url: 'business/marketingActivity/activeNewlyweds',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 回显
|
||||
export function huiActiveNewlyweds(id) {
|
||||
return request({
|
||||
url: 'business/marketingActivity/activeNewlyweds/'+id,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function getoilName(query) {
|
||||
return request({
|
||||
url: 'business/petrolStationManagement/oilNumber/getOilName',
|
||||
|
@ -816,12 +816,18 @@ export default {
|
||||
id:row.id
|
||||
}
|
||||
looklook(data).then(res=>{
|
||||
this.looklist = res.data
|
||||
if(res.data){
|
||||
this.looklist = res.data
|
||||
}
|
||||
|
||||
|
||||
console.log('详情',res)
|
||||
})
|
||||
looklooklook(row.id).then(resp=>{
|
||||
this.statisticsyou = resp.data
|
||||
if( resp.data){
|
||||
this.statisticsyou = resp.data
|
||||
}
|
||||
|
||||
console.log('优惠券详情统计',resp)
|
||||
})
|
||||
},
|
||||
|
@ -71,8 +71,6 @@
|
||||
<span> {{scope.row.activeDiscountChildList[0].deductionAmount}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="活动状态 " align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<span style="cursor: pointer;" @click="qiyong(scope.row)" v-if="scope.row.status == 0"> <el-tag>启用</el-tag > </span>
|
||||
@ -101,8 +99,13 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="lookDetail(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -110,11 +113,16 @@
|
||||
@click="handleDeletexia(scope.row)"
|
||||
v-if="scope.row.isonline == 0"
|
||||
>下线</el-button>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="Deleteshan(scope.row)"
|
||||
v-if="scope.row.isonline == 1"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -124,6 +132,47 @@
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
<el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>
|
||||
<div style="display: flex;justify-content: space-between;width: 100%;">
|
||||
<div class="x-box">
|
||||
<div>优惠券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.count ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEd ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLd ||0}}</div>
|
||||
</div>
|
||||
<div class="x-box">
|
||||
<div>兑换券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.counts ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEds ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLds ||0}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="looklist"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="昵称"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="mobile"
|
||||
label="联系方式"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="领取日期"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="exchangeFrom"
|
||||
label="获取方式"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改满减营销对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="45%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="110px">
|
||||
@ -138,7 +187,6 @@
|
||||
</div>
|
||||
<div style="width: 25%;display: flex; align-items: center;">
|
||||
<span>减</span> <el-input-number v-model="activeDiscountChildList[0].deductionAmount" :min="0" :max="9.9" placeholder="1 ~ 9.9" label=""></el-input-number> <span>元</span>
|
||||
|
||||
</div>
|
||||
<!-- <div @click="deleteactiveDiscountChildList(index)">-->
|
||||
<!-- <el-button type="danger" icon="el-icon-delete" circle style="margin-left: 8px" ></el-button>-->
|
||||
@ -172,10 +220,6 @@
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="可用油品" prop="adaptOil" >
|
||||
<el-checkbox-group v-model="form.adaptOil">
|
||||
<el-checkbox v-for="(item,index) in oillist" :label="item.id" :key="index">{{item.oilType}}{{item.oilName}}</el-checkbox>
|
||||
@ -219,14 +263,17 @@
|
||||
|
||||
<script>
|
||||
import { listActiveFullminus, getActiveFullminus, delActiveFullminus, addActiveFullminus, updateActiveFullminus } from "@/api/EventMarketing/activeFullminus";
|
||||
import {getActiveDiscount, updateActiveDiscount} from "@/api/EventMarketing/activeDiscount";
|
||||
import {getoilName} from "@/api/EventMarketing/activeConsumption";
|
||||
import {delActiveDiscount, getActiveDiscount, updateActiveDiscount} from "@/api/EventMarketing/activeDiscount";
|
||||
import {getoilName, looklook, looklooklook} from "@/api/EventMarketing/activeConsumption";
|
||||
import {listUserGrade} from "@/api/staff/user/usergrade";
|
||||
|
||||
export default {
|
||||
name: "ActiveFullminus",
|
||||
data() {
|
||||
return {
|
||||
opendetails:false,
|
||||
looklist:[],
|
||||
statisticsyou:{},
|
||||
activeDiscountChildList:[
|
||||
{amount:'',deductionAmount:''},
|
||||
|
||||
@ -490,16 +537,33 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
lookDetail(row){
|
||||
this.opendetails = true
|
||||
let data = {
|
||||
id:row.id
|
||||
}
|
||||
looklook(data).then(res=>{
|
||||
this.looklist = res.data
|
||||
|
||||
console.log('详情',res)
|
||||
})
|
||||
looklooklook(row.id).then(resp=>{
|
||||
this.statisticsyou = resp.data
|
||||
console.log('优惠券详情统计',resp)
|
||||
})
|
||||
},
|
||||
Deleteshan(row){
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除满减营销编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delActiveFullminus(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('business/marketingActivity/activeFullminus/export', {
|
||||
@ -509,3 +573,19 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.box-bt{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
.x-box{
|
||||
background: #f9f9f9;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
width: 45%;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,6 +1,46 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入活动名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="queryParams.status" clearable placeholder="请选择活动状态">
|
||||
<el-option label="启用" value="0"></el-option>
|
||||
<el-option label="禁用" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否在线" prop="isonline">
|
||||
<el-select v-model="queryParams.isonline" clearable placeholder="请选择是否在线">
|
||||
<el-option label="在线" value="0"></el-option>
|
||||
<el-option label="下线" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="open = true"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="65%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="110px">
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||
@ -44,12 +84,12 @@
|
||||
<el-table-column
|
||||
prop="giftCardName"
|
||||
label="卡券名称"
|
||||
>
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="giftCardType"
|
||||
label="券类型"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.giftCardType == 0" >油品券</span>
|
||||
<span v-if="scope.row.giftCardType == 1" >商品券</span>
|
||||
@ -59,7 +99,7 @@
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券详情"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.giftCardDetail}}</span>
|
||||
</template>
|
||||
@ -67,17 +107,17 @@
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="有效期(天)"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.timeType == 0" > <el-input-number v-model="scope.row.validityZero" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 1" > <el-input-number v-model="scope.row.validityOne" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 2" > <el-input-number v-model="scope.row.validityTwo" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 0" > <el-input-number v-model="scope.row.validityZero" size="small" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 1" > <el-input-number v-model="scope.row.validityOne" size="small" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
<span v-if="scope.row.timeType == 2" > <el-input-number v-model="scope.row.validityTwo" size="small" controls-position="right" :min="0" :max="9999"></el-input-number>天 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="数量"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
</template>
|
||||
@ -108,12 +148,12 @@
|
||||
<el-table-column
|
||||
prop="giftCardName"
|
||||
label="卡券名称"
|
||||
>
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券类型"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.giftCardType == 0" >油品券</span>
|
||||
<span v-if="scope.row.giftCardType == 1" >商品券</span>
|
||||
@ -123,7 +163,7 @@
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="券详情"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.giftCardDetail}}</span>
|
||||
</template>
|
||||
@ -131,17 +171,17 @@
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="有效期(天)"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span > <el-input-number v-model="scope.row.giftCardTime" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
<span > <el-input-number v-model="scope.row.giftCardTime" size="small" controls-position="right" :min="1" :max="9999"></el-input-number>天 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="数量"
|
||||
>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
<el-input-number v-model="scope.row.giftCardTotal" size="small" controls-position="right" :min="1" :max="9999"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -169,17 +209,16 @@
|
||||
<el-form-item label="自定义规则" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入自定义规则" />
|
||||
</el-form-item>
|
||||
<!-- <div slot="footer" class="dialog-footer">-->
|
||||
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
||||
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div slot="footer" class="dialog-footer">-->
|
||||
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
||||
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||
<!-- </div>-->
|
||||
</el-form>
|
||||
<div>
|
||||
<el-button type="primary" @click="submitForm">保存</el-button>
|
||||
<div>
|
||||
<el-button type="primary" @click="submitForm">保存</el-button>
|
||||
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="activeFullminusList" @selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
@ -230,6 +269,12 @@
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="lookDetail(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -237,10 +282,24 @@
|
||||
@click="handleDeletexia(scope.row)"
|
||||
v-if="scope.row.isonline == 0"
|
||||
>下线</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="Deleteshan(scope.row)"
|
||||
v-if="scope.row.isonline == 1"
|
||||
>删除</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="ztotal>0"
|
||||
:total="ztotal"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
|
||||
@ -373,6 +432,46 @@
|
||||
@pagination="getlistExchange"
|
||||
/></div>
|
||||
</el-dialog>
|
||||
<el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>
|
||||
<div style="display: flex;justify-content: space-between;width: 100%;">
|
||||
<div class="x-box">
|
||||
<div>优惠券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.count ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEd ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLd ||0}}</div>
|
||||
</div>
|
||||
<div class="x-box">
|
||||
<div>兑换券数量统计</div>
|
||||
<div>总数量: {{statisticsyou.counts ||0}}</div>
|
||||
<div>已使用数量: {{statisticsyou.countEds ||0}}</div>
|
||||
<div>未使用数量: {{statisticsyou.countLds ||0}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="looklist"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="昵称"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="mobile"
|
||||
label="联系方式"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="领取日期"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="exchangeFrom"
|
||||
label="获取方式"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="二维码"
|
||||
v-loading="loadingdialog"
|
||||
@ -393,15 +492,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listActiveNewlyweds, getActiveNewlyweds, delActiveNewlyweds, addActiveNewlyweds, updateActiveNewlyweds } from "@/api/EventMarketing/activeNewlyweds";
|
||||
import {getoilName, listExchange, listFavorable} from "@/api/EventMarketing/activeConsumption";
|
||||
import { listActiveNewlyweds, getActiveNewlyweds, delActiveNewlyweds, addActiveNewlyweds, updateActiveNewlyweds,huiActiveNewlyweds } from "@/api/EventMarketing/activeNewlyweds";
|
||||
import {getoilName, listExchange, listFavorable, looklook, looklooklook} from "@/api/EventMarketing/activeConsumption";
|
||||
import QRCode from "qrcodejs2";
|
||||
import {getActiveFullminus, updateActiveFullminus} from "@/api/EventMarketing/activeFullminus";
|
||||
import {delActiveFullminus, getActiveFullminus, updateActiveFullminus} from "@/api/EventMarketing/activeFullminus";
|
||||
|
||||
export default {
|
||||
name: "ActiveNewlyweds",
|
||||
data() {
|
||||
return {
|
||||
opendetails:false,
|
||||
looklist:[],
|
||||
statisticsyou:{},
|
||||
labelPosition:'left',
|
||||
loadingdialog:false,
|
||||
centerDialogVisible:false,
|
||||
@ -438,7 +540,7 @@ export default {
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
ztotal: 0,
|
||||
// 新人有礼活动表格数据
|
||||
activeNewlywedsList: [],
|
||||
// 弹出层标题
|
||||
@ -498,16 +600,16 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
// this.handleUpdate();
|
||||
|
||||
},
|
||||
methods: {
|
||||
/** 查询新人有礼活动列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getActiveNewlyweds(1).then(res=>{
|
||||
this.activeFullminusList = res.data;
|
||||
this.total = res.data.total;
|
||||
console.log(res)
|
||||
listActiveNewlyweds(this.queryParams).then(res=>{
|
||||
this.activeFullminusList = res.data.records
|
||||
this.ztotal = res.data.total;
|
||||
console.log('wwwwwc',res)
|
||||
this.loading = false;
|
||||
})
|
||||
// this.loading = true;
|
||||
@ -699,6 +801,31 @@ export default {
|
||||
|
||||
}
|
||||
},
|
||||
lookDetail(row){
|
||||
this.opendetails = true
|
||||
let data = {
|
||||
id:row.id
|
||||
}
|
||||
looklook(data).then(res=>{
|
||||
this.looklist = res.data
|
||||
|
||||
console.log('详情',res)
|
||||
})
|
||||
looklooklook(row.id).then(resp=>{
|
||||
this.statisticsyou = resp.data
|
||||
console.log('优惠券详情统计',resp)
|
||||
})
|
||||
},
|
||||
Deleteshan(row){
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delActiveFullminus(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
@ -722,14 +849,16 @@ export default {
|
||||
this.title = "添加新人有礼活动";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate() {
|
||||
handleUpdate(row){
|
||||
this.reset()
|
||||
getActiveNewlyweds(1).then(response => {
|
||||
getActiveNewlyweds(row.id).then(response => {
|
||||
this.form = response.data;
|
||||
this.form.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '1')
|
||||
this.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '2')
|
||||
if(response.data.activeNewlywedsChildList){
|
||||
this.form.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '1')
|
||||
this.tableDatas = response.data.activeNewlywedsChildList.filter(item => item.activeGift == '2')
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "修改新人有礼活动";
|
||||
this.title = "编辑";
|
||||
});
|
||||
},
|
||||
handleDeletexia(row){
|
||||
@ -750,12 +879,23 @@ export default {
|
||||
this.form.activeNewlywedsChildList = this.form.tableDatas.concat(this.tableDatas);
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
addActiveNewlyweds(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.handleUpdate();
|
||||
});
|
||||
if (this.form.id != null) {
|
||||
|
||||
updateActiveNewlyweds(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}else {
|
||||
addActiveNewlyweds(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
@ -807,4 +947,11 @@ export default {
|
||||
justify-content: space-between;
|
||||
font-size: 18px;
|
||||
}
|
||||
.x-box{
|
||||
background: #f9f9f9;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
width: 45%;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user