朱鑫波 5 gadi atpakaļ
vecāks
revīzija
982175a305

+ 30 - 2
src/views/modules/Statistics/accountMaterStatistics.vue

@@ -10,6 +10,7 @@
   margin-right: 10px;
   padding: 5px 10px;
   cursor: pointer;
+  
 }
 </style>
 <style>
@@ -45,7 +46,7 @@ th div {
         <a-button @click="dianji">进入素材报表</a-button>
       </div>
       <a-row type="flex" align="middle" justify="space-between" class="panel-body">
-        <div class="search-bar" style="width:100%">
+        <div class="search-bar" style="width:100%;position:relative">
           <span>账户选择:</span>
           <treeselect :appId.sync="appId" request="2,4"/>
           <a-button type="primary" style="margin:10px" @click="addUser">搜索</a-button>
@@ -57,6 +58,7 @@ th div {
             >刷新</a-button
           >
           <a-button type="primary" style="margin:10px" @click="getDataResetAll">重置</a-button>
+          <a-button type='primary' class="export" @click="exportExcel" style="position: absolute;right:0;">导出报表</a-button>
         </div>
       </a-row>
       <a-row>
@@ -135,7 +137,8 @@ import { JeecgListMixin } from '@/mixins/ipagination'
 
 // import the component
 import Treeselect from './components/Treeselect.vue'
-import { getAction } from '../../../api/manage'
+// import { getAction } from '../../../api/manage'
+import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
 
 // 引入基本模板
 let echarts = require('echarts/lib/echarts')
@@ -490,6 +493,31 @@ export default {
       this.appId = []
       this.data = []
     },
+    //导出报表
+    exportExcel() {
+     
+        var params = {}
+        params.accountIds = JSON.stringify(this.appId)
+        params.type = this.active
+        if (this.active == 9) {
+          params.startDate = this.allValue[0]
+          params.endDate = this.allValue[1]
+        }
+      downFilePost('/materialReport/materialReport/excel', params).then(res => {
+        let blob = new Blob([res], {
+          type:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+        })
+        let downloadElement = document.createElement('a')
+        let href = window.URL.createObjectURL(blob) //创建下载的链接
+        downloadElement.href = href
+        downloadElement.download = moment().format('YYYY-MM-DD') + '账户报表.xlsx' //下载后文件名
+        document.body.appendChild(downloadElement)
+        downloadElement.click() //点击下载
+        document.body.removeChild(downloadElement) //下载完成移除元素
+        window.URL.revokeObjectURL(href) //释放掉blob对象
+      })
+    },
+
     addUser() {
       this.loading = true
       var that = this

+ 68 - 9
src/views/modules/advertiser/AdvertiserList.vue

@@ -4,21 +4,35 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline">
         <a-row :gutter="24">
-          <a-col :md="6" :sm="8">
+          <a-col :md="8" :sm="8">
             <a-form-item label="广告主开户主体名称">
-              <a-input placeholder="请输入广告主开户主体名称" v-model="queryParam.name"></a-input>
+              <!-- <a-input placeholder="请输入广告主开户主体名称" v-model="queryParam.name"></a-input> -->
+              <a-select
+                optionFilterProp="children"
+                showSearch
+                labelInValue
+                :filterOption="filterOption"
+                v-model="allIdUser"
+                placeholder="请选择广告主开户主体名称"
+                @keyup.enter.native="searchQueryOne"
+              >
+                <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
+                  {{
+                  item.name
+                  }}
+                </a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
-          <a-col :md="6" :sm="8">
+          <a-col :md="8" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchQueryOne" icon="search">查询</a-button>
               <a-button type="primary" @click="searchRe" icon="reload" style="margin-left: 8px">重置</a-button>
             </span>
           </a-col>
         </a-row>
       </a-form>
     </div>
-
     <!-- 操作按钮区域 -->
     <!-- <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
@@ -112,7 +126,7 @@ import AFormItem from 'ant-design-vue/es/form/FormItem'
 import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
 import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
 import JSelectUser from '@/components/jeecgbiz/JSelectUser'
-import { postAction } from '../../../api/manage'
+import { postAction, getAction } from '../../../api/manage'
 import { mapActions, mapGetters } from 'vuex'
 
 const advertiserColumns = [
@@ -263,6 +277,8 @@ export default {
   },
   data() {
     return {
+      list: [],
+      allIdUser: {},
       departDisabled: false, //是否是我的部门调用该页面
       users: this.userInfo().realname, //用户名称
       departmentId: this.userInfo().departId, //部门id
@@ -317,8 +333,29 @@ export default {
   },
   created() {
     // this.queryParam.userId = this.userInfo().id
+    this.getList()
   },
   methods: {
+    filterOption(input, option) {
+      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+    },
+    getList() {
+      var params = {}
+      // params.userId = this.userInfo().id
+      params.pageSize = 1000
+      params.pageNo = 1
+      console.log(params)
+      getAction('/ctop/advertiser/list', params)
+        .then((res) => {
+          if (res.success) {
+            console.log(res)
+            this.list = res.result.records
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+        .finally(() => {})
+    },
     handleEditElse(item, type) {
       if (type == 'product') {
         this.$refs.modalFormTwo.edit(item)
@@ -357,8 +394,8 @@ export default {
             ? this.queryParam.advertiserId
             : this.advertiserId
             ? this.advertiserId
-            : null,
-          productId: this.queryParam.productId,
+            : undefined,
+          productId: this.queryParam.productId?this.queryParam.productId:undefined,
         })
         this.$refs.modalFormThree.title = '新增'
         this.$refs.modalFormThree.disableSubmit = false
@@ -368,6 +405,8 @@ export default {
       if (key == 'product') {
         this.queryParam.advertiserId = item.id
         this.advertiserName = item.name
+        this.queryParam.productId = null
+        this.productName = null
         this.callbackTwo('product')
       } else if (key == 'project') {
         this.queryParam.productId = item.id
@@ -391,15 +430,35 @@ export default {
         this.url.list = '/ctop/project/list'
         this.url.delete = '/ctop/project/delete'
       }
-      this.loadData(1)
+      this.searchQueryOne()
     },
     ...mapGetters(['nickname', 'avatar', 'userInfo']),
     searchRe() {
       this.queryParam.name = null
       this.queryParam.advertiserId = null
       this.queryParam.productId = null
+      this.queryParam.id = null
+      this.allIdUser = {}
       this.callbackTwo('advertiser')
     },
+    searchQueryOne() {
+      console.log(this.allIdUser)
+      if (this.allIdUser.key) {
+        if (this.active == 'advertiser') {
+          this.queryParam.advertiserId = null
+          this.queryParam.id = this.allIdUser.key
+        } else {
+          this.queryParam.id = null
+          this.queryParam.advertiserId = this.allIdUser.key
+        }
+        this.advertiserName = this.allIdUser.label
+      } else {
+        // this.queryParam.advertiserId = null
+        // this.queryParam.productId = null
+        // this.queryParam.id = null
+      }
+      this.searchQuery()
+    },
     handleSubmit() {
       let params = {}
       params.advertiserId = this.record.id

+ 3 - 3
src/views/modules/advertiser/ProjectList.vue

@@ -172,7 +172,7 @@ export default {
         {
           title: '广告主名称',
           align: 'center',
-          dataIndex: 'advertiserName',
+          dataIndex: 'advertiserId_dictText',
         },
         {
           title: '行业类型',
@@ -208,12 +208,12 @@ export default {
         {
           title: '运营负责人',
           align: 'center',
-          dataIndex: 'responsibleName',
+          dataIndex: 'responsibleId_dictText',
         },
         {
           title: '设计负责人',
           align: 'center',
-          dataIndex: 'designResponsibleName',
+          dataIndex: 'designResponsibleId_dictText',
         },
         {
           title: '操作',

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 742 - 570
src/views/modules/advertiser/ProjectMemberList.vue


+ 2 - 0
src/views/modules/advertiser/modules/projectListModal.vue

@@ -57,6 +57,7 @@
             showSearch
             :filterOption="filterOption"
             v-decorator="['advertiserId', validatorRules.advertiserId]"
+            placeholder="请选择广告主"
             disabled
           >
             <a-select-option :value="item.id" v-for="(item, index) of list" :key="index">
@@ -72,6 +73,7 @@
             showSearch
             :filterOption="filterOption"
             v-decorator="['productId', validatorRules.productId]"
+            placeholder="请选择产品"
             disabled
           >
             <a-select-option :value="item.id" v-for="(item, index) of listProduct" :key="index">

+ 26 - 1
src/views/modules/kuaishouapp/account/stepForm/stepModule/targetedPopulation.vue

@@ -370,8 +370,9 @@ li:hover {
         <a-input
           placeholder="请输入搜索内容"
           @change="getAppAll"
-          @focus="getAppAll"
+          @focus="getAppAllElse"
           style="width:100%;position:relative;"
+          v-model="appListValue"
         />
         <div
           style="width:100%;position:absolute;z-index:10;height:200px;background:white;overflow:auto;box-shadow: 0 2px 8px 0 rgba(0,0,0,.15);"
@@ -840,6 +841,7 @@ export default {
       step: 0,
       loading: false,
       checkArr: [],
+      appListValue:"",
       checkAll: false,
       allForm: {
         regionType: 'noLimit',
@@ -1161,6 +1163,29 @@ export default {
         return [item.substring(0, 2), item]
       })
     },
+    getAppAllElse(e){
+        this.checkArr = this.optionsAll
+        // this.getAppAll()
+        
+        if(this.appListValue!=''){
+           getAction('/kuaishou/batch/getAppSearch', {
+              accountId: localStorage.getItem('accountId'),
+              appName: e.target.value
+            }).then(res => {
+              if (res.result) {
+                this.optionsApp = res.result
+                this.checkOptions.push(...res.result)
+                this.closeDialog = true
+              } else {
+                this.optionsApp = []
+                this.closeDialog = false
+              }
+            })
+        }else {
+          this.optionsApp = []
+          this.closeDialog = false
+        }
+    },
     getAppAll(e) {
       if (e.target.value !== '') {
         getAction('/kuaishou/batch/getAppSearch', {