aXin-0810 il y a 1 an
Parent
commit
6fcc862f93

+ 8 - 0
src/api/setActivity.js

@@ -47,3 +47,11 @@ export function promotionQuestionnaireShow(params) {
     params
   })
 }
+
+export function promotionQuestionnaireDownload(params) {
+  return request({
+    url: '/promotion/questionnaire/download',
+    method: 'get',
+    params
+  })
+}

+ 15 - 5
src/views/mallManagement/setActivity/formModule.vue

@@ -1,11 +1,17 @@
 <template>
-  <zj-form-module title="活动网点" label-width="120px" :form-data="item" :form-items="formItems"> </zj-form-module>
+  <zj-form-module title="活动网点" label-width="120px" :form-data="item" :form-items="formItems">
+    <div style="text-align: right; padding-bottom: 10px; padding-right: 10px">
+      <el-button v-if="item.promotionQuestionnaireQrcodes.length" size="mini" type="primary" @click="piliangxiazai"
+        >批量下载二维码</el-button
+      >
+    </div>
+  </zj-form-module>
 </template>
 
 <script>
 import editTable from '@/components/template/editTable.js'
 import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
-import { string } from '@zjlib/element-plugins'
+import { promotionQuestionnaireDownload } from '@/api/setActivity.js'
 export default {
   props: {
     item: {
@@ -90,7 +96,7 @@ export default {
                 }
               ],
               {
-                isEdit: this.qx(this.item),
+                isEdit: true,
                 isAdd: this.qx(this.item),
                 isUpdate: false,
                 isDel: ({ row, column, index }) => {
@@ -138,7 +144,10 @@ export default {
                       <el-button
                         type="text"
                         onClick={() => {
-                          window.open(row.qrcode)
+                          promotionQuestionnaireDownload({
+                            id: this.item.id,
+                            id2: row.id
+                          })
                         }}
                       >
                         下载二维码
@@ -167,7 +176,8 @@ export default {
       } else {
         return this.acquireVerify(v.$parent, name)
       }
-    }
+    },
+    piliangxiazai() {}
   }
 }
 </script>

+ 1 - 1
src/views/mallManagement/setActivity/index.vue

@@ -874,7 +874,7 @@ export default {
     },
     qx(item) {
       return (
-        this.typeView &&
+        !!this.typeView &&
         (!item.id || !!~[0, 1].indexOf(item.status) || !!~['待生效', '生效中'].indexOf(item.statusText))
       )
     },