|
@@ -40,14 +40,15 @@
|
|
|
v-for="item in activeList"
|
|
|
:key="item.activeId"
|
|
|
>
|
|
|
- <div slot="title" style="display: inline-block;width:80%;">
|
|
|
- <div>
|
|
|
- <strong style="margin-right:10px;font-size:14px;">{{item.activeName}}</strong> ({{item.activeDesc}})
|
|
|
- <span style="margin-left:10px;color:#00aaff;cursor: pointer;" @click="(event) => {showDesc(event, item.activeId)}">
|
|
|
- <a-icon title="查看活动详情" type="eye"/> 详情
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div slot="title" style="display: inline-block;width:100%;">
|
|
|
+ <strong style="margin-right:10px;font-size:14px;">{{item.activeName}}</strong> ({{item.activeDesc}})
|
|
|
+ <span style="margin-left:20px;color:#00aaff;cursor: pointer;" @click="(event) => {showDesc(event, item.activeId)}">
|
|
|
+ <a-icon title="查看活动详情" type="eye"/> 活动详情
|
|
|
+ </span>
|
|
|
+ <span style="margin:0 20px;color:#ff0800;cursor: pointer;" @click="(event) => {disabledActive(event, item.activeId)}">
|
|
|
+ <a-icon title="禁用活动" type="disconnect"/> 禁用活动
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
<div slot="extra" @click="tooglePanel(item)" style="cursor: pointer;">{{ item.isActive ? '收起' : '展开' }} <a-icon type="caret-right" :rotate="item.isActive ? 90 : 0"/> </div>
|
|
|
<div v-show="item.isActive" style="padding: 10px;">
|
|
|
<productList :ref="'productList-'+item.activeId" :id="item.activeId" @openCpModal="openProductModal" :detailData="detailData" :warehouseSn="warehouseSn" :salesBillSn="salesBillSn"></productList>
|
|
@@ -149,7 +150,8 @@ export default {
|
|
|
showDetail: false,
|
|
|
showCpModal: false,
|
|
|
cpModalType: '0',
|
|
|
- cpCurRefId: ''
|
|
|
+ cpCurRefId: '',
|
|
|
+ disabledActiveOption: null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -256,17 +258,43 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 展开收缩查询
|
|
|
- showSearch(e,id){
|
|
|
- e.stopPropagation()
|
|
|
- const row = this.$refs['productList-'+id][0]
|
|
|
- row&&row.showSearch()
|
|
|
- },
|
|
|
+ // 展开收缩活动详情
|
|
|
showDesc(e,id){
|
|
|
e.stopPropagation()
|
|
|
const row = this.$refs['productList-'+id][0]
|
|
|
row&&row.showDesc()
|
|
|
},
|
|
|
+ // 禁用活动
|
|
|
+ disabledActive(e,id){
|
|
|
+ const _this = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '禁用活动?',
|
|
|
+ centered: true,
|
|
|
+ content: <div>
|
|
|
+ <div>禁用规则后,将无法享受该活动规则优惠</div>
|
|
|
+ <div style="padding:10px 0;">
|
|
|
+ <aRadioGroup vModel={_this.disabledActiveOption}>
|
|
|
+ <aRadio style="display:block;height: '30px';lineHeight: '30px';padding:5px 0;" value="1">
|
|
|
+ 删除规则中相关产品
|
|
|
+ </aRadio>
|
|
|
+ <aRadio style="display:block;height: '30px';lineHeight: '30px';padding:5px 0;" value="2">
|
|
|
+ 移出规则中相关产品
|
|
|
+ </aRadio>
|
|
|
+ </aRadioGroup>
|
|
|
+ </div>
|
|
|
+ </div>,
|
|
|
+ onOk() {
|
|
|
+ console.log(_this.disabledActiveOption)
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ _this.disabledActiveOption = null
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeDaOpt(e){
|
|
|
+ console.log(e)
|
|
|
+ this.disabledActiveOption = e.target.value
|
|
|
+ },
|
|
|
// 获取活动列表
|
|
|
getActive(){
|
|
|
this.activeList = [
|