|
@@ -3,7 +3,7 @@
|
|
|
<Card :bordered="false" dis-hover class="mt15 ivu-mt" :padding="0">
|
|
|
<div class="new_card_pd">
|
|
|
<!-- 查询条件 -->
|
|
|
-
|
|
|
+
|
|
|
<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
|
|
|
:label-position="labelPosition" @submit.native.prevent>
|
|
|
<!-- <FormItem label="是否删除:" label-for="is_show">
|
|
@@ -41,10 +41,10 @@
|
|
|
<span
|
|
|
v-if="row.coupon_type==2">{{parseFloat(row.coupon_price)/10}}折({{row.coupon_price.toString().split(".")[0]}}%)</span>
|
|
|
</template>
|
|
|
- <template slot-scope="{ row, index }" slot="status">
|
|
|
+ <!-- <template slot-scope="{ row, index }" slot="status">
|
|
|
<Icon type="md-checkmark" v-if="row.status === 1" color="#0092DC" size="14" />
|
|
|
<Icon type="md-close" v-else color="#ed5565" size="14" />
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
<template slot-scope="{ row, index }" slot="is_show">
|
|
|
<span> {{row.is_show == 1 ?'显示': '隐藏'}}</span>
|
|
|
</template>
|
|
@@ -54,6 +54,13 @@
|
|
|
<template slot-scope="{ row, index }" slot="add_time">
|
|
|
<span> {{row.add_time }}</span>
|
|
|
</template>
|
|
|
+ <template slot-scope="{ row, index }" slot="status">
|
|
|
+ <i-switch v-model="row.is_display" :value="row.is_display" :true-value="1" :false-value="0"
|
|
|
+ @on-change="changeSwitch(row)" size="large">
|
|
|
+ <span slot="open">显示</span>
|
|
|
+ <span slot="close">隐藏</span>
|
|
|
+ </i-switch>
|
|
|
+ </template>
|
|
|
<template slot-scope="{ row, index }" slot="action">
|
|
|
<!-- <a @click="bind(row)">绑定项目</a>
|
|
|
<Divider type="vertical" /> -->
|
|
@@ -82,7 +89,8 @@
|
|
|
ServeItemListApi,
|
|
|
VipDeleteApi,
|
|
|
serveEditApi,
|
|
|
- serveDelApi
|
|
|
+ serveDelApi,
|
|
|
+ createServeProduct
|
|
|
} from '@/api/marketing';
|
|
|
import editFrom from '@/components/from/from';
|
|
|
import {
|
|
@@ -148,11 +156,11 @@
|
|
|
key: 'repertory',
|
|
|
minWidth: 100
|
|
|
},
|
|
|
- // {
|
|
|
- // title: '添加时间',
|
|
|
- // slot: 'add_time',
|
|
|
- // minWidth: 100
|
|
|
- // },
|
|
|
+ {
|
|
|
+ title: '前端显示',
|
|
|
+ slot: 'status',
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
{
|
|
|
title: '操作',
|
|
|
slot: 'action',
|
|
@@ -188,6 +196,17 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeSwitch(row) {
|
|
|
+ //
|
|
|
+ console.log(row)
|
|
|
+ createServeProduct(row.id, row)
|
|
|
+ .then((res) => {
|
|
|
+ this.$Message.success(res.msg);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$Message.error(err.msg);
|
|
|
+ });
|
|
|
+ },
|
|
|
//绑定项目
|
|
|
bind(row) {
|
|
|
this.$router.push({
|
|
@@ -212,7 +231,13 @@
|
|
|
},
|
|
|
// 发布
|
|
|
couponSend(row) {
|
|
|
- this.$router.push({path: this.roterPre + "/marketing/serve_item/create?id=" + row.id + '&craft_price=' + row.craft_price + '&performance_value=' + row.performance_value + '&product_id=' + row.product_id + '&repertory=' + row.repertory + '&sales_commissions=' + row.sales_commissions + '&slider_image=' + row.slider_image + '&store_name=' + row.store_name + '&superior_commission=' + row.superior_commission});
|
|
|
+ this.$router.push({
|
|
|
+ path: this.roterPre + "/marketing/serve_item/create?id=" + row.id + '&craft_price=' + row
|
|
|
+ .craft_price + '&performance_value=' + row.performance_value + '&product_id=' + row
|
|
|
+ .product_id + '&repertory=' + row.repertory + '&sales_commissions=' + row
|
|
|
+ .sales_commissions + '&slider_image=' + row.slider_image + '&store_name=' + row
|
|
|
+ .store_name + '&superior_commission=' + row.superior_commission + '&is_display=' + row.is_display
|
|
|
+ });
|
|
|
console.log(row);
|
|
|
},
|
|
|
// 删除
|