|
@@ -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
|