|
@@ -74,15 +74,15 @@
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-primary"
|
|
|
- @click="handleOpen(record)"
|
|
|
- v-if="record.dealerEditFlag==='1'&&(record.dealerPublishState=='UNPUBLISH'||record.dealerPublishState=='CLOSE')&&$hasPermissions('B_publishActiveBtn')"
|
|
|
+ @click="handleOpenOrClose(record,'1')"
|
|
|
+ v-if="record.dealerOpenFlag==='1'&&record.dealerOpenState=='0'&&record.promoState=='IS_CLOSE'&&$hasPermissions('B_publishActiveBtn')"
|
|
|
id="productOnlineInfoList-detail-btn">开启</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-primary"
|
|
|
- v-if="record.dealerEditFlag==='1'&&record.dealerPublishState=='PUBLISH'&&$hasPermissions('B_closeActiveBtn')"
|
|
|
- @click="handleClose(record)"
|
|
|
+ v-if="record.dealerOpenFlag==='1'&&record.dealerOpenState=='1'&&record.promoState=='HAVE_RELEASE'&&$hasPermissions('B_closeActiveBtn')"
|
|
|
+ @click="handleOpenOrClose(record,'0')"
|
|
|
id="productOnlineInfoList-detail-btn">关闭</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
@@ -113,8 +113,8 @@ import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import promotionDescModal from './promotionDescModal'
|
|
|
import promotionShowModal from './promotionShowModal'
|
|
|
import detailModal from './detailModal'
|
|
|
-import { shopPromoList } from '@/api/shopPromo'
|
|
|
-import { closeActive, publishActive } from '@/api/promoActive'
|
|
|
+import { shopPromoList, openOrCloseActive } from '@/api/shopPromo'
|
|
|
+import { closeActive } from '@/api/promoActive'
|
|
|
|
|
|
export default {
|
|
|
name: 'UrgentOffsetList',
|
|
@@ -201,15 +201,15 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 开启
|
|
|
- handleOpen (row) {
|
|
|
+ handleOpenOrClose (row, val) {
|
|
|
const _this = this
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
|
- content: '促销活动一旦开启,客户可参与活动。确认开启吗?',
|
|
|
+ content: '促销活动一旦' + (val == '1' ? '开启' : '关闭') + ',客户' + (val == '1' ? '可' : '无法') + '参与活动。确认开启吗?',
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
_this.spinning = true
|
|
|
- publishActive({ sn: row.promoActiveSn }).then(res => {
|
|
|
+ openOrCloseActive({ promoSn: row.promoSn, dealerOpenState: val }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
_this.$message.success(res.message)
|
|
|
_this.$refs.table.refresh()
|
|
@@ -226,7 +226,7 @@ export default {
|
|
|
const _this = this
|
|
|
this.$confirm({
|
|
|
title: '提示',
|
|
|
- content: '促销活动一旦关闭,客户无法参与活动。确认关闭吗?',
|
|
|
+ content: '促销活动一旦,客户无法参与活动。确认关闭吗?',
|
|
|
centered: true,
|
|
|
onOk () {
|
|
|
_this.spinning = true
|