文件

865 行
37 KiB
HTML
可执行文件

<style>
[v-cloak] {
display: none;
}
#giftsPromotion .el-pagination {
border: 1px solid #ebeef5;
border-top: 0;
padding: 5px;
}
.max-dialog-content {
margin-left: 160px;
height: calc(100vh - 65px);
box-sizing: border-box;
margin-bottom: 0;
}
.goods_title {
padding: 10px 0;
}
.chooseGoods {
width: 100%;
box-sizing: border-box;
height: calc(100vh - 190px);
}
#giftsPromotion .max-dialog-content .el-dialog__footer, #giftsPromotion .mini-dialog-content .el-dialog__footer {
padding: 0 20px 0;
}
#giftsPromotion .max-dialog-content .el-dialog__body, #giftsPromotion .mini-dialog-content .el-dialog__body {
padding: 10px 20px;
}
.sku-list-box {
display: flex;
flex-wrap: wrap;
}
.sku-list-name-box {
height: 26px;
line-height: 27px;
border: 1px solid #ddd;
position: relative;
padding: 0 20px;
margin: 5px 10px;
color: #666;
cursor: pointer;
overflow: hidden;
font-size: 12px;
border-radius: 3px;
}
.sku-list-name-box::selection {
background-color: transparent;
}
.check-sku-list {
border-color: #4394ff;
overflow: hidden;
}
.check-sku-list:after {
content: '';
width: 15px;
height: 15px;
background-color: #4394ff;
position: absolute;
top: -7px;
right: -7px;
transform: rotateZ(45deg);
}
.el-tooltip__popper {
max-width: 20%;
}
.el-tooltip__popper,
.el-tooltip__popper.is-dark {
background: #f5f5f5 !important;
color: #303133 !important;
}
.detail_p {
padding-top: 8px;
}
.detail_gifts {
padding-top: 15px;
}
</style>
<div id="giftsPromotion" v-cloak>
<div class="goods_title">
<div class="goods_title_inner">
赠送促销
</div>
</div>
<el-form :inline="true" size="small">
<el-form-item>
<el-input v-model="list_keyword" clearable placeholder="请输入商品名称"></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="value" placeholder="促销状态">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="添加时间">
<el-date-picker v-model="addTimeData" type="daterange" value-format="yyyy-MM-dd" range-separator="至"
start-placeholder="开始时间" end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="促销时间">
<el-date-picker v-model="sellTimeData" type="daterange" value-format="yyyy-MM-dd" range-separator="至"
start-placeholder="开始时间" end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit" plain>搜索</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addActivity" plain v-if="operate.releaseGoodsGiftsActivity">
添加活动
</el-button>
</el-form-item>
</el-form>
<!-- 表格 -->
<template>
<el-table :data="tableData" size="small" border style="width: 100%">
<el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
<el-table-column prop="goods_name" label="商品名称" align="center">
</el-table-column>
<el-table-column prop="sku_name" label="商品规格" align="center">
</el-table-column>
<el-table-column prop="created_at" label="添加时间" align="center">
</el-table-column>
<el-table-column label="促销时间" align="center">
<template slot-scope="scope">
<p>{{scope.row.start_time}}-<br>{{scope.row.end_time}}</p>
</template>
</el-table-column>
<el-table-column label="促销状态" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.status"
active-color="#13ce66"
inactive-color="#999" active-value="1" inactive-value="0"
@change="switchChange(scope.row.activity_id)"
:disabled="!operate.updateGiftsActivityStatus">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="goodsDetail(scope.row.activity_id)">查看详情</el-button>
<el-button type="text" size="mini" @click="deleteActivity(scope.row.activity_id)"
v-if="operate.releaseGoodsGiftsActivity">删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination @current-change="CurrentChange"
:current-page="currentPage"
:page-sizes="[10]"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</template>
<!-- 添加活动弹出框 -->
<el-dialog title="添加活动"
:visible.sync="addDialog"
:modal-append-to-body="false"
:append-to-body="false"
:top="'65px'"
:width="'calc(100vw - 160px)'"
:custom-class="'max-dialog-content'"
:close-on-press-escape="false"
:close-on-click-modal="false">
<el-scrollbar class="chooseGoods">
<el-form ref="addActivityForm" :model="addActivityForm" size="small" label-width="100px" :rules="rules">
<el-form-item label="主商品:">
<el-button type="primary" @click="chooseMain" plain>选择商品</el-button>
<!-- 表格 -->
<template>
<el-table :data="mainGoodsData" size="small" border style="margin-top: 10px">
<el-table-column prop="goods_name" label="商品名称" align="center">
</el-table-column>
<el-table-column label="商品规格" align="center" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.sku_info">{{ scope.row.sku_info }}</span>
<el-button v-else type="text" size="mini"
@click="getGoodsSkuAttrActivity(scope.row.id)">选择规格
</el-button>
</template>
</el-table-column>
<el-table-column prop="retail_price" label="零售价" align="center">
</el-table-column>
<el-table-column prop="goods_code" label="商品条码" align="center">
</el-table-column>
<el-table-column prop="goods_number" label="商品货号" align="center">
</el-table-column>
<el-table-column prop="goods_num" label="商品库存" align="center">
</el-table-column>
</el-table>
</template>
</el-form-item>
<el-form-item label="赠送门槛:" prop="count">
<el-input v-model="addActivityForm.count" @change="giftsCountChange" style="width: 150px;"
size="mini"></el-input>&nbsp;件
</el-form-item>
<el-form-item label="赠送商品:" prop="gifts_num">
<el-button type="primary" size="small" @click="chooseGifts" plain>
选择商品 ({{giftsGoodsData.length}}/10)
</el-button>
<!-- 表格 -->
<template>
<el-table :data="giftsGoodsData" size="small" border style="margin-top: 10px">
<el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
<el-table-column prop="goods_name" label="商品名称" align="center">
</el-table-column>
<el-table-column prop="sku_name" label="商品规格" align="center">
</el-table-column>
<el-table-column prop="remain_inventory" label="零售价" align="center">
</el-table-column>
<el-table-column prop="goods_num" label="商品库存" align="center">
</el-table-column>
<el-table-column label="赠送数量" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.gifts_num" size="small" clearable
@change="giftsNumChange(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="deleteGifts(scope.$index,scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-form-item>
<el-form-item label="促销时间:">
<template>
<el-radio v-model="addActivityForm.time_limit" label="0">不限时</el-radio>
<el-radio v-model="addActivityForm.time_limit" label="1">限时</el-radio>
</template>
</el-form-item>
<el-form-item label="活动时间:" v-if="addActivityForm.time_limit==1">
<el-date-picker v-model="addActivityForm.activityTimeData" type="daterange"
value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始时间"
end-placeholder="结束时间"
size="small">
</el-date-picker>
</el-form-item>
<el-form-item label="线上促销:">
<el-switch v-model="addActivityForm.online_promotion"
active-value="1"
inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label-width="180px" label="线上单人赠送次数数限制:" v-if="addActivityForm.online_promotion==1">
<template>
<el-radio v-model="addActivityForm.online_limit" label="0">不限制</el-radio>
<el-radio v-model="addActivityForm.online_limit" label="1">限制</el-radio>
</template>
<template v-if="addActivityForm.online_limit==1">
<el-input v-model="addActivityForm.online_buy_limit"
@change="onlineChange"
style="width: 100px;">
</el-input>&nbsp;次/人
</template>
</el-form-item>
<el-form-item label="线下促销:">
<el-switch v-model="addActivityForm.offline_promotion"
active-value="1"
inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label-width="180px" label="线下单人赠送次数数限制:" v-if="addActivityForm.offline_promotion==1">
<template>
<el-radio v-model="addActivityForm.offline_limit" label="0">不限制</el-radio>
<el-radio v-model="addActivityForm.offline_limit" label="1">限制</el-radio>
</template>
<template v-if="addActivityForm.offline_limit==1">
<el-input v-model="addActivityForm.offline_buy_limit"
@change="offlineChange"
style="width: 100px;">
</el-input>&nbsp;次/人
</template>
</el-form-item>
</el-form>
</el-scrollbar>
<span slot="footer" class="dialog-footer">
<el-button type="primary"
@click="addActivityOK('addActivityForm')"
size="small">提交</el-button>
</span>
</el-dialog>
<!-- 添加主商品弹框 -->
<el-dialog title="选择商品" :visible.sync="mainDialog"
width="800px"
:modal-append-to-body="false"
:custom-class="'mini-dialog-content'"
:append-to-body="false"
:close-on-click-modal="false">
<el-form :inline="true" size="small">
<el-form-item>
<el-input v-model="search_main_keyword" size="small" clearable placeholder="请输入商品名称"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="search_main" size="small" plain>搜索</el-button>
</el-form-item>
</el-form>
<!-- 表格 -->
<template>
<el-table :data="mainData" border size="small">
<el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
<el-table-column prop="goods_name" label="商品名称" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="retail_price" label="零售价" align="center">
</el-table-column>
<el-table-column prop="goods_code" label="商品条码" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="goods_number" label="商品货号" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="goods_num" label="商品库存" align="center">
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="chooseMainOK(scope.row)">选择商品
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination @current-change="mainCurrentChange"
:current-page="mainCurrentPage"
:page-sizes="[10]"
layout="total, sizes, prev, pager, next, jumper"
:total="mainTotal">
</el-pagination>
</template>
</el-dialog>
<!-- 选择规格 -->
<el-dialog title="选择商品规格" :visible.sync="specificationsDialog" width="30%" :close-on-click-modal="false">
<div class="sku-list-box">
<div class="sku-list-name-box" v-for="(item,i) in skulist" @click="checkSkuList(i)"
:class="item.sku_checked?'check-sku-list':''">
{{item.name}}
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="chooseSkuOK" size="mini">确定</el-button>
</span>
</el-dialog>
<!-- 选择赠品 -->
<el-dialog title="选择赠品" :visible.sync="giftsDialog" width="60%" :close-on-click-modal="false">
<el-form :inline="true" :model="searchGiftsForm" class="demo-form-inline">
<el-form-item>
<el-input v-model="searchGiftsForm.info" size="small" clearable placeholder="请输入商品名称"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="search_gifts" size="small" plain>搜索
</el-button>
</el-form-item>
</el-form>
<!-- 表格 -->
<template>
<el-table :data="giftsData" style="width: 90%">
<el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
<el-table-column prop="goods_name" label="商品名称" align="center">
</el-table-column>
<el-table-column prop="sku_name" label="商品规格" align="center">
</el-table-column>
<el-table-column prop="goods_code" label="零售价" align="center">
</el-table-column>
<el-table-column prop="remain_inventory" label="商品库存" align="center">
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="chooseGiftsOK(scope.$index,scope.row)"
v-if="scope.row.checked==false">选择商品
</el-button>
<el-button type="text" style="color: #666;" size="mini" v-else>已选
</el-button>
</template>
</el-table-column>
</el-table>
</template>
<!-- 分页 -->
<el-pagination @current-change="giftsCurrentChange" :current-page="giftsCurrentPage" :page-sizes="[10]"
layout="total, sizes, prev, pager, next, jumper" :total="giftsTotal">
</el-pagination>
</el-dialog>
<!-- 查看详情 -->
<el-dialog title="查看详情" :visible.sync="detailDialog" width="40%">
<p class="detail_p">主商品:</p>
<template>
<el-table :data="detailInfo.goods_info" style="width: 90%">
<el-table-column prop="goods_name" label="商品名称" align="center">
</el-table-column>
<el-table-column prop="sku_info" label="商品规格" align="center">
</el-table-column>
<el-table-column prop="retail_price" label="零售价" align="center">
</el-table-column>
<el-table-column prop="goods_code" label="商品条码" align="center">
</el-table-column>
<el-table-column prop="goods_number" label="商品货号" align="center">
</el-table-column>
<el-table-column prop="goods_num" label="商品库存" align="center">
</el-table-column>
</el-table>
</template>
<p class="detail_p">赠送门槛:购买{{detailInfo.goods_num_min}}件主商品</p>
<p class="detail_gifts">赠送商品:</p>
<template>
<el-table :data="detailInfo.goods_gifts_info" style="width: 90%" max-height="250">
<el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
<el-table-column prop="goods_name" label="商品名称" align="center">
</el-table-column>
<el-table-column prop="sku_name" label="商品规格" align="center">
</el-table-column>
<el-table-column prop="goods_code" label="零售价" align="center">
</el-table-column>
<el-table-column prop="remain_inventory" label="商品库存" align="center">
</el-table-column>
<el-table-column prop="gifts_num" label="赠送数量" align="center">
</el-table-column>
</el-table>
</template>
<p class="detail_p">线上购买限制:<span v-if="detailInfo.online_buy_limit>0">{{detailInfo.offline_buy_limit}}次/人</span><span
v-else>无限制</span></p>
<p class="detail_p">线下单次购买限制:<span
v-if="detailInfo.offline_buy_limit>0">{{detailInfo.offline_buy_limit}}次</span><span v-else>无限制</span>
</p>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="detailDialog = false" size="mini">确 定</el-button>
</span>
</el-dialog>
</div>
<script type="text/javaScript">
var giftsPromotion = new Vue({
el: "#giftsPromotion",
data: function () {
return {
list_keyword: '',
addActivityForm: {
count: '',
activityTimeData: [],
online_promotion: 1,
online_limit: '0',
online_buy_limit: '',
offline_promotion: 1,
offline_limit: '0',
offline_buy_limit: '',
time_limit: '0',
},
search_main_keyword: '',
searchGiftsForm: {
info: '',
},
options: [
{ // 下拉框
value: '1',
label: '开启'
},
{
value: '0',
label: '关闭'
}],
value: '', // 下拉框值
tableData: [], //活动表格
addTimeData: [], //添加时间数组
sellTimeData: [], //促销时间数组
activityTimeData: [], //添加活动时间
giftsGoodsData: [], // 赠品数组
mainData: [], // 主商品表格
giftsData: [], //选择赠品表格
detailInfo: {},
currentPage: 1,//当前页
mainCurrentPage: 1, //主商品当前页
giftsCurrentPage: 1,
giftsTotal: 0,
total: 0, //总数据
mainTotal: 0, //主商品总数据
addDialog: false,
mainDialog: false,
giftsDialog: false,
specificationsDialog: false,
detailDialog: false,
mainGoodsData: [], // 主商品信息
operate: {},
skulist: [], //规格信息
rules: {
count: [
{required: true, message: '请输入赠送门槛', trigger: 'blur'},
]
}
}
},
created() {
this.getGoodsGiftActivityBack()
//获取操作权限
var auth_list = {
releaseGoodsGiftsActivity: '/index.php/Retail/GoodsGifts/releaseGoodsGiftsActivity',
updateGiftsActivityStatus: '/index.php/Retail/GoodsGifts/updateGiftsActivityStatus',
deleteGiftsActivityRecord: '/index.php/Retail/GoodsGifts/deleteGiftsActivityRecord'
};
$.ajax({
url: "{:U('Retail/Component/checkOperateAuth')}",
type: "post",
data: {
auth_list: JSON.stringify(auth_list),
},
success: (res) => {
if (res.status == 1) {
this.operate = res.data;
}
}
})
},
methods: {
//获取活动详情
getGoodsGiftActivityBack() {
$.ajax({
type: 'post',
url: '/index.php/Retail/GoodsGifts/getGoodsGiftActivityBack',
data: {
page: this.currentPage,
pageSize: 10,
goods_name: this.list_keyword,
start_time: this.addTimeData[0],
end_time: this.addTimeData[1],
sales_start_time: this.sellTimeData[0],
sales_end_time: this.sellTimeData[1],
status: this.value,
},
success: res => {
if (res.status == 1) {
console.log(res);
this.tableData = res.data.list;
this.total = parseInt(res.data.total);
}
}
})
},
// 更改促销状态
switchChange(id) {
$.ajax({
type: 'post',
url: '/index.php/Retail/GoodsGifts/updateGiftsActivityStatus',
data: {
activity_id: id,
},
success: res => {
if (res.status == 1) {
this.$message({
message: '促销状态设置成功',
type: 'success',
});
this.getGoodsGiftActivityBack()
}
}
})
},
//主商品门槛
giftsCountChange() {
if (!/^[1-9]\d*$/.test(this.addActivityForm.count)) {
this.addActivityForm.count = ''
}
},
giftsNumChange(x) {
if (x.gifts_num > x.goods_num || !/^([1-9]|10)$/.test(x.gifts_num)) {
this.$message({
message: '库存数量输入错误',
type: 'warning',
});
this.giftsGoodsData.some((item) => {
if (item.gifts_id == x.gifts_id) {
item.gifts_num = ''
}
});
}
},
offlineChange() {
if (!/^[1-9]\d*$/.test(this.addActivityForm.offline_buy_limit)) {
this.addActivityForm.offline_buy_limit = ''
}
},
onlineChange() {
if (!/^[1-9]\d*$/.test(this.addActivityForm.online_buy_limit)) {
this.addActivityForm.online_buy_limit = ''
}
},
//获取主商品
goodsGiftsActivityMain() {
$.ajax({
type: 'post',
url: '/index.php/Retail/GoodsGifts/goodsGiftsActivityMain',
data: {
page: this.mainCurrentPage,
limit: 10,
keyword: this.search_main_keyword
},
success: res => {
if (res.status == 1) {
this.mainData = res.data
this.mainTotal = parseInt(res.count)
}
}
})
},
//获取赠品
getGoodsGiftBack() {
$.ajax({
type: 'post',
url: '/index.php/Retail/GoodsGifts/getGoodsGiftBack',
data: {
page: this.giftsCurrentPage,
pageSize: 10,
search: this.searchGiftsForm.info,
status: 1
},
success: res => {
if (res.status == 1) {
this.giftsData = res.data.list
this.giftsTotal = parseInt(res.data.total)
}
}
})
},
//获取商品规格
getGoodsSkuAttrActivity(id) {
this.specificationsDialog = true;
$.ajax({
type: 'post',
url: '/index.php/Retail/GoodsGifts/getGoodsSkuAttrActivity',
data: {
id: id
},
success: res => {
this.skulist = res.data.list
}
})
},
addActivityOK(addActivityForm) {
this.$refs[addActivityForm].validate((valid) => {
if (valid) {
for (var i = 0; i < this.giftsGoodsData.length; i++) {
this.giftsGoodsData[i].goods_gifts_id = this.giftsGoodsData[i].gifts_id
var item = this.giftsGoodsData[i];
if (!item.gifts_num) {
this.$message({
message: '赠品库存不能为空',
type: 'warning',
});
return
}
}
$.ajax({
type: 'post',
url: '/index.php/Retail/GoodsGifts/releaseGoodsGiftsActivity',
data: {
goods_json: JSON.stringify(this.mainGoodsData),
gifts_json: JSON.stringify(this.giftsGoodsData),
goods_num_min: this.addActivityForm.count,
time_limit: this.addActivityForm.time_limit,
start_time: this.addActivityForm.activityTimeData[0],
end_time: this.addActivityForm.activityTimeData[1],
online_promotion: this.addActivityForm.online_promotion,
online_buy_limit: this.addActivityForm.online_buy_limit,
offline_promotion: this.addActivityForm.offline_promotion,
offline_buy_limit: this.addActivityForm.offline_buy_limit,
},
success: res => {
if (res.status == 1) {
this.$message({
message: res.msg,
type: 'success'
});
this.mainGoodsData = [];
this.giftsGoodsData = [];
this.addActivityForm = {
count: '',
time_limit: '',
activityTimeData: [],
online_promotion: '',
online_buy_limit: '',
offline_promotion: '',
offline_buy_limit: ''
}
this.getGoodsGiftActivityBack()
} else {
this.$message({
message: res.msg,
});
}
}
})
this.addDialog = false
this.getGoodsGiftActivityBack()
} else {
return false;
}
});
},
//选择赠品
chooseGifts() {
this.giftsDialog = true;
this.getGoodsGiftBack();
},
//点击了选择商品
chooseGiftsOK(index, x) {
if (this.giftsGoodsData.length >= 10) {
this.$message({
message: '赠品数量最多为10件',
type: 'warning',
});
return
}
this.giftsData.some((item) => {
if (item.gifts_id == x.gifts_id) {
item.checked = true
}
})
this.giftsGoodsData.push(x)
console.log(this.giftsGoodsData);
},
// 点击删除赠品
deleteGifts(index) {
this.giftsGoodsData.splice(index, 1)
},
//搜索
onSubmit() {
this.getGoodsGiftActivityBack()
},
//添加活动
addActivity() {
this.addDialog = true;
},
//删除活动
deleteActivity(id) {
var id = id
var that = this
this.$confirm('是否删除该活动?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$.ajax({
type: 'post',
url: '/index.php/Retail/GoodsGifts/deleteGiftsActivityRecord',
data: {
activity_id: id
},
success: res => {
if (res.status == 1) {
this.$message({
message: '删除成功',
type: 'success',
});
that.getGoodsGiftActivityBack()
}
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
//选择主商品
chooseMain() {
this.mainDialog = true;
this.goodsGiftsActivityMain();
},
//确认选择主商品
chooseMainOK(item) {
console.log(item);
this.mainGoodsData = [];
this.mainGoodsData.push(item);
this.mainDialog = false;
console.log(this.mainGoodsData);
if (!item.attribute_state == 2) {
this.getGoodsSkuAttrActivity(item.id)
}
},
search_main() {
this.mainCurrentPage = 1;
this.goodsGiftsActivityMain();
},
search_gifts() {
this.getGoodsGiftBack()
},
//选择规格
checkSkuList(i) {
var skulist = JSON.parse(JSON.stringify(this.skulist));
skulist[i].sku_checked = !skulist[i].sku_checked;
this.skulist = skulist
},
//确定选择规格
chooseSkuOK() {
var str = '';
var arr = [];
for (var i = 0; i < this.skulist.length; i++) {
var item = this.skulist[i]
if (item.sku_checked == true) {
str = str + ';' + item.name[0]
arr.push(item)
}
}
str = str.substr(1)
this.mainGoodsData[0].sku_info = str
this.mainGoodsData[0].specifications = arr
console.log(this.mainGoodsData);
this.specificationsDialog = false
},
//详情
goodsDetail(id) {
this.detailDialog = true;
$.ajax({
type: 'post',
url: '/index.php/Retail/GoodsGifts/goodsGiftsActivityDetails',
data: {
activity_id: id
},
success: res => {
if (res.status == 1) {
console.log(1);
this.detailDialog = true;
this.detailInfo = res.data
}
}
})
},
//页码改变
CurrentChange(val) {
this.currentPage = val;
this.getGoodsGiftActivityBack()
},
mainCurrentChange(val) {
this.mainCurrentPage = val;
this.goodsGiftsActivityMain();
},
giftsCurrentChange(val) {
this.giftsCurrentPage = val;
this.getGoodsGiftBack();
}
}
})
</script>