From 283c6c7c125105db1e56f752e142bd063f3a2789 Mon Sep 17 00:00:00 2001 From: liuyang <396235408@qq.com> Date: Thu, 28 May 2020 16:00:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E8=AE=A1=E5=88=92=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8C=89=E9=92=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/activity/ActivityPlan.vue | 139 ++++++++++++++++++++++------ 1 file changed, 109 insertions(+), 30 deletions(-) diff --git a/src/pages/activity/ActivityPlan.vue b/src/pages/activity/ActivityPlan.vue index 8bece92..2228742 100644 --- a/src/pages/activity/ActivityPlan.vue +++ b/src/pages/activity/ActivityPlan.vue @@ -78,7 +78,27 @@ border @on-row-dblclick="showDetail" :columns="columns1" - :data="data"> + :data="data"> + + + + + + + +
+

+
+

{{this.showStoreName}}

+ +
+ +
+
@@ -121,6 +158,8 @@ export default { data () { const _this = this; return { + showStoreName:"", + isShow: false, loading: false, isShowDetail: false, totalSize: 0, @@ -129,11 +168,13 @@ export default { pageSize: 10, saving: false, data: [], + rowData: {}, companyList: [], customerId: null, shopList: [], showUse: false, activityInstance: {}, + qrCodeImage: '', formValidate: { date: null, organizationId: null, @@ -270,35 +311,35 @@ export default { }, { title: "操作", - key: "action", + slot: 'action', width: 200, - render (h, p) { - let r = [ - h( - "Button", - { - props: { type: "primary", size: "small" }, - style: { marginRight: "8px" }, - on: { - click: () => _this.stop(p.row) - } - }, - "终止" - ), - h( - "Button", - { - props: { type: "primary", size: "small" }, - on: { click: () => _this.modify(p.row) } - }, - "修改" - ) - ]; - if (p.row.status > 2) { - delete r[0]; - } - return h("div", r); - } + // render (h, p) { + // let r = [ + // h( + // "Button", + // { + // props: { type: "primary", size: "small" }, + // style: { marginRight: "8px" }, + // on: { + // click: () => _this.stop(p.row) + // } + // }, + // "终止" + // ), + // h( + // "Button", + // { + // props: { type: "primary", size: "small" }, + // on: { click: () => _this.modify(p.row) } + // }, + // "修改" + // ) + // ]; + // if (p.row.status > 2) { + // delete r[0]; + // } + // return h("div", r); + // } } ] }; @@ -453,7 +494,28 @@ export default { return date && (date.valueOf() > endTime); } } - } + }, + show: function (index) { + this.isShow = true; + this.showStoreName = index.name; + this.qrCodeImage = index.qrCodeAction; + this.rowData = index; + }, + hide: function () { + this.isShow = false; + }, + // 下载二维码 + download: function (index) { + let fileName = index.name + "-门店码"; + http.downloadImg({ + url: index.qrCodeAction + }, fileName, function (/*data*/) { + + }) + }, + ok: function () { + this.isShow = false; + }, } }; @@ -462,4 +524,21 @@ export default { .ivu-date-picker .ivu-select-dropdown { left: 0 !important; } +.table-width-80 { + width: 80px !important; +} +.router-btn { + border: none; + color: #3496EB !important; + margin-left: -15px; +} +.table-img-qr-code { + margin-left: 5px; + margin-top: 5px; + width: 30px; + height: 30px; +} +button:hover { + background:inherit!important; +}