|
@@ -895,879 +895,882 @@ var vKeepEntComponent = new Vue({
|
|
|
// }
|
|
|
}
|
|
|
})
|
|
|
-window.vBuyerSearchComponent = new Vue({
|
|
|
- el: '#v-buyer-search-group',
|
|
|
- components: {
|
|
|
- areaCityMobile: areaCityMobileComponent,
|
|
|
- moneyComponent: moneyComponent,
|
|
|
- dateComponent: dateComponent,
|
|
|
- keywordComponent: keywordComponent,
|
|
|
- industryComponent: industryComponent,
|
|
|
- cateComponent: cateComponent
|
|
|
- },
|
|
|
- delimiters: ['@@', '@@'],
|
|
|
- data: function () {
|
|
|
- return {
|
|
|
- entSearchKey: new Date().getTime(),
|
|
|
- industryComponentKey: new Date().getTime(),
|
|
|
- showEntSearch: false,
|
|
|
- showPop: false,
|
|
|
- showUpTip: false,
|
|
|
- moneyTags: [
|
|
|
- {
|
|
|
- name: '不限',
|
|
|
+if (navigator.userAgent.toLowerCase().indexOf('micromessenger') === -1) {
|
|
|
+ window.vBuyerSearchComponent = new Vue({
|
|
|
+ el: '#v-buyer-search-group',
|
|
|
+ components: {
|
|
|
+ areaCityMobile: areaCityMobileComponent,
|
|
|
+ moneyComponent: moneyComponent,
|
|
|
+ dateComponent: dateComponent,
|
|
|
+ keywordComponent: keywordComponent,
|
|
|
+ industryComponent: industryComponent,
|
|
|
+ cateComponent: cateComponent
|
|
|
+ },
|
|
|
+ delimiters: ['@@', '@@'],
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ entSearchKey: new Date().getTime(),
|
|
|
+ industryComponentKey: new Date().getTime(),
|
|
|
+ showEntSearch: false,
|
|
|
+ showPop: false,
|
|
|
+ showUpTip: false,
|
|
|
+ moneyTags: [
|
|
|
+ {
|
|
|
+ name: '不限',
|
|
|
+ value: '',
|
|
|
+ selected: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '100万以内',
|
|
|
+ value: '0-100',
|
|
|
+ selected: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '100-500万',
|
|
|
+ value: '100-500',
|
|
|
+ selected: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '500-1000万',
|
|
|
+ value: '500-1000',
|
|
|
+ selected: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '1000-5000万',
|
|
|
+ value: '1000-5000',
|
|
|
+ selected: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '5000万以上',
|
|
|
+ value: '5000-',
|
|
|
+ selected: false
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ listInfo: {
|
|
|
value: '',
|
|
|
- selected: true
|
|
|
- },
|
|
|
- {
|
|
|
- name: '100万以内',
|
|
|
- value: '0-100',
|
|
|
- selected: false
|
|
|
- },
|
|
|
- {
|
|
|
- name: '100-500万',
|
|
|
- value: '100-500',
|
|
|
- selected: false
|
|
|
+ pageNum: 0,
|
|
|
+ pageSize: 500,
|
|
|
+ total: -1,
|
|
|
+ loading: true,
|
|
|
+ finished: false
|
|
|
},
|
|
|
- {
|
|
|
- name: '500-1000万',
|
|
|
- value: '500-1000',
|
|
|
- selected: false
|
|
|
- },
|
|
|
- {
|
|
|
- name: '1000-5000万',
|
|
|
- value: '1000-5000',
|
|
|
- selected: false
|
|
|
- },
|
|
|
- {
|
|
|
- name: '5000万以上',
|
|
|
- value: '5000-',
|
|
|
- selected: false
|
|
|
- }
|
|
|
- ],
|
|
|
- listInfo: {
|
|
|
- value: '',
|
|
|
- pageNum: 0,
|
|
|
- pageSize: 500,
|
|
|
- total: -1,
|
|
|
- loading: true,
|
|
|
- finished: false
|
|
|
- },
|
|
|
- activeTabIndex: 0,
|
|
|
- beforeTabIndex: 0,
|
|
|
- entTabs: [
|
|
|
- {
|
|
|
- title: ''
|
|
|
- },
|
|
|
- {
|
|
|
- title: '区域'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '行业'
|
|
|
+ activeTabIndex: 0,
|
|
|
+ beforeTabIndex: 0,
|
|
|
+ entTabs: [
|
|
|
+ {
|
|
|
+ title: ''
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '区域'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '行业'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '客户分类'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '业务范围'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '企业历史客户',
|
|
|
+ disabled: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ statusEnum: ['存续', '吊销', '停业', '撤销'],
|
|
|
+ statusColors: ['#2CB7CA', '#F5AF5C', '#58A1E7', '#51CEA2'],
|
|
|
+ list: [],
|
|
|
+ conditionMap: {
|
|
|
+ 1: [
|
|
|
+ {
|
|
|
+ title: '企业名称',
|
|
|
+ checked: true,
|
|
|
+ key: 'A'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '法定代表人',
|
|
|
+ checked: false,
|
|
|
+ key: 'B'
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // title: '股东',
|
|
|
+ // checked: false,
|
|
|
+ // key: 'C'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '高管',
|
|
|
+ // checked: false,
|
|
|
+ // key: 'D'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ title: '经营范围',
|
|
|
+ disabled: true,
|
|
|
+ checked: false,
|
|
|
+ key: 'F'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '中标项目/标的物',
|
|
|
+ disabled: true,
|
|
|
+ checked: false,
|
|
|
+ key: 'E'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
- {
|
|
|
- title: '客户分类'
|
|
|
+ conditionStrMap: {
|
|
|
+ industry: [],
|
|
|
+ area: [],
|
|
|
+ buyerclass: [],
|
|
|
+ business_scope: [],
|
|
|
+ entcustomer: []
|
|
|
},
|
|
|
- {
|
|
|
- title: '业务范围'
|
|
|
+ isSelectConditionTabs: {
|
|
|
+ 1: false,
|
|
|
+ 2: false,
|
|
|
+ 3: false,
|
|
|
+ 4: false,
|
|
|
+ 5: false,
|
|
|
+ 6: false,
|
|
|
+ 7: false,
|
|
|
+ 8: false,
|
|
|
+ 9: false
|
|
|
},
|
|
|
- {
|
|
|
- title: '企业历史客户',
|
|
|
- disabled: true
|
|
|
- }
|
|
|
- ],
|
|
|
- statusEnum: ['存续', '吊销', '停业', '撤销'],
|
|
|
- statusColors: ['#2CB7CA', '#F5AF5C', '#58A1E7', '#51CEA2'],
|
|
|
- list: [],
|
|
|
- conditionMap: {
|
|
|
- 1: [
|
|
|
+ moreContentList: [4,5],
|
|
|
+ showPopForArea: false,
|
|
|
+ dateComponentKey: new Date().getTime(),
|
|
|
+ times: [
|
|
|
{
|
|
|
- title: '企业名称',
|
|
|
- checked: true,
|
|
|
- key: 'A'
|
|
|
+ name: '全部',
|
|
|
+ value: '',
|
|
|
+ selected: true
|
|
|
},
|
|
|
{
|
|
|
- title: '法定代表人',
|
|
|
- checked: false,
|
|
|
- key: 'B'
|
|
|
+ name: '近1年内',
|
|
|
+ value: '-1y',
|
|
|
+ selected: false
|
|
|
},
|
|
|
- // {
|
|
|
- // title: '股东',
|
|
|
- // checked: false,
|
|
|
- // key: 'C'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: '高管',
|
|
|
- // checked: false,
|
|
|
- // key: 'D'
|
|
|
- // },
|
|
|
{
|
|
|
- title: '经营范围',
|
|
|
- disabled: true,
|
|
|
- checked: false,
|
|
|
- key: 'F'
|
|
|
+ name: '1-3年',
|
|
|
+ value: '1y-3y',
|
|
|
+ selected: false
|
|
|
},
|
|
|
{
|
|
|
- title: '中标项目/标的物',
|
|
|
- disabled: true,
|
|
|
- checked: false,
|
|
|
- key: 'E'
|
|
|
+ name: '3-5年',
|
|
|
+ value: '3y-5y',
|
|
|
+ selected: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '5-10年',
|
|
|
+ value: '5y-10y',
|
|
|
+ selected: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '10年以上',
|
|
|
+ value: '10y-',
|
|
|
+ selected: false
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ selectDate: {
|
|
|
+ startDate: '',
|
|
|
+ endDate: '',
|
|
|
+ exact: ''
|
|
|
+ },
|
|
|
+ entList: [],
|
|
|
+ buyerList: [],
|
|
|
+ checked: false,
|
|
|
+ cateNameStr: '', // 采购单位搜索名称
|
|
|
+ showEntHistory: false, // 企业客户历史
|
|
|
+ showEntKeyword: false, // 关键词
|
|
|
+ entHistoryList: [],
|
|
|
+ keytimer: '',
|
|
|
+ keyWordList: [], // 关键词列表
|
|
|
+ keyContent: '请选择业务范围',
|
|
|
+ selectEntList: '请选择企业历史客户',
|
|
|
+ nowOpenBid: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ this.keytimer = new Date().getTime()
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ getTabs () {
|
|
|
+ var tempList = this.entTabs.slice(0, 4)
|
|
|
+ tempList.push({
|
|
|
+ title: '更多筛选'
|
|
|
+ })
|
|
|
+ return tempList
|
|
|
},
|
|
|
- conditionStrMap: {
|
|
|
- industry: [],
|
|
|
- area: [],
|
|
|
- buyerclass: [],
|
|
|
- business_scope: [],
|
|
|
- entcustomer: []
|
|
|
+ isMoreSelect () {
|
|
|
+ return this.activeTabIndex < 7
|
|
|
},
|
|
|
- isSelectConditionTabs: {
|
|
|
- 1: false,
|
|
|
- 2: false,
|
|
|
- 3: false,
|
|
|
- 4: false,
|
|
|
- 5: false,
|
|
|
- 6: false,
|
|
|
- 7: false,
|
|
|
- 8: false,
|
|
|
- 9: false
|
|
|
- },
|
|
|
- moreContentList: [4,5],
|
|
|
- showPopForArea: false,
|
|
|
- dateComponentKey: new Date().getTime(),
|
|
|
- times: [
|
|
|
- {
|
|
|
- name: '全部',
|
|
|
- value: '',
|
|
|
- selected: true
|
|
|
- },
|
|
|
- {
|
|
|
- name: '近1年内',
|
|
|
- value: '-1y',
|
|
|
- selected: false
|
|
|
- },
|
|
|
- {
|
|
|
- name: '1-3年',
|
|
|
- value: '1y-3y',
|
|
|
- selected: false
|
|
|
- },
|
|
|
- {
|
|
|
- name: '3-5年',
|
|
|
- value: '3y-5y',
|
|
|
- selected: false
|
|
|
- },
|
|
|
- {
|
|
|
- name: '5-10年',
|
|
|
- value: '5y-10y',
|
|
|
- selected: false
|
|
|
- },
|
|
|
- {
|
|
|
- name: '10年以上',
|
|
|
- value: '10y-',
|
|
|
- selected: false
|
|
|
- }
|
|
|
- ],
|
|
|
- selectDate: {
|
|
|
- startDate: '',
|
|
|
- endDate: '',
|
|
|
- exact: ''
|
|
|
+ isMoreContent () {
|
|
|
+ return this.activeTabIndex === 4
|
|
|
},
|
|
|
- entList: [],
|
|
|
- buyerList: [],
|
|
|
- checked: false,
|
|
|
- cateNameStr: '', // 采购单位搜索名称
|
|
|
- showEntHistory: false, // 企业客户历史
|
|
|
- showEntKeyword: false, // 关键词
|
|
|
- entHistoryList: [],
|
|
|
- keytimer: '',
|
|
|
- keyWordList: [], // 关键词列表
|
|
|
- keyContent: '请选择业务范围',
|
|
|
- selectEntList: '请选择企业历史客户',
|
|
|
- nowOpenBid: ''
|
|
|
- }
|
|
|
- },
|
|
|
- mounted () {
|
|
|
- this.keytimer = new Date().getTime()
|
|
|
- },
|
|
|
- computed: {
|
|
|
- getTabs () {
|
|
|
- var tempList = this.entTabs.slice(0, 4)
|
|
|
- tempList.push({
|
|
|
- title: '更多筛选'
|
|
|
- })
|
|
|
- return tempList
|
|
|
- },
|
|
|
- isMoreSelect () {
|
|
|
- return this.activeTabIndex < 7
|
|
|
- },
|
|
|
- isMoreContent () {
|
|
|
- return this.activeTabIndex === 4
|
|
|
+ isWaitBuy () {
|
|
|
+ return this.entTabs[this.activeTabIndex].disabled
|
|
|
+ }
|
|
|
},
|
|
|
- isWaitBuy () {
|
|
|
- return this.entTabs[this.activeTabIndex].disabled
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- // 企业历史客户列表
|
|
|
- getHistoryList () {
|
|
|
- let _this = this
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: '/entnicheNew/customer/history',
|
|
|
- success: function(res) {
|
|
|
- console.log(res)
|
|
|
- if(res.error_code == 0) {
|
|
|
- if(res.data.list && res.data.list.length > 0) {
|
|
|
- _this.entHistoryList = res.data.list
|
|
|
+ methods: {
|
|
|
+ // 企业历史客户列表
|
|
|
+ getHistoryList () {
|
|
|
+ let _this = this
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/entnicheNew/customer/history',
|
|
|
+ success: function(res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.error_code == 0) {
|
|
|
+ if(res.data.list && res.data.list.length > 0) {
|
|
|
+ _this.entHistoryList = res.data.list
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ })
|
|
|
+ },
|
|
|
+ toggle (index) {
|
|
|
+ console.log(index)
|
|
|
+ },
|
|
|
+ checkNowPower () {
|
|
|
+ var tempPower = window.jyUserPower
|
|
|
+ var resultPower = false
|
|
|
+ if (tempPower) {
|
|
|
+ resultPower = tempPower.entniche || tempPower.member || tempPower.vip !== 0
|
|
|
+ this.changePower(!resultPower)
|
|
|
}
|
|
|
- })
|
|
|
- },
|
|
|
- toggle (index) {
|
|
|
- console.log(index)
|
|
|
- },
|
|
|
- checkNowPower () {
|
|
|
- var tempPower = window.jyUserPower
|
|
|
- var resultPower = false
|
|
|
- if (tempPower) {
|
|
|
- resultPower = tempPower.entniche || tempPower.member || tempPower.vip !== 0
|
|
|
- this.changePower(!resultPower)
|
|
|
- }
|
|
|
- return resultPower
|
|
|
- },
|
|
|
- changePower (type) {
|
|
|
- this.conditionMap[1][2].disabled = type
|
|
|
- this.conditionMap[1][3].disabled = type
|
|
|
- },
|
|
|
- getMoreListToStr (key) {
|
|
|
- if (typeof this.conditionMap[key] !== "undefined" && this.conditionMap[key].length) {
|
|
|
- return this.conditionMap[key].filter(function (v) {
|
|
|
- return v.checked
|
|
|
- }).map(function (v) {
|
|
|
- return v.key
|
|
|
- }).join(',')
|
|
|
- }
|
|
|
- return ''
|
|
|
- },
|
|
|
- changeConditionStrMap (i, type) {
|
|
|
- this.isSelectConditionTabs[(i > 4 ? 4: i)] = type
|
|
|
- switch (i) {
|
|
|
- case 1 : {
|
|
|
- var tempParams = {}
|
|
|
- if (type) {
|
|
|
- tempParams = this.$refs.areaCitySelector.onConfirm()
|
|
|
- } else {
|
|
|
- tempParams = this.$refs.areaCitySelector.resetAll()
|
|
|
+ return resultPower
|
|
|
+ },
|
|
|
+ changePower (type) {
|
|
|
+ this.conditionMap[1][2].disabled = type
|
|
|
+ this.conditionMap[1][3].disabled = type
|
|
|
+ },
|
|
|
+ getMoreListToStr (key) {
|
|
|
+ if (typeof this.conditionMap[key] !== "undefined" && this.conditionMap[key].length) {
|
|
|
+ return this.conditionMap[key].filter(function (v) {
|
|
|
+ return v.checked
|
|
|
+ }).map(function (v) {
|
|
|
+ return v.key
|
|
|
+ }).join(',')
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ },
|
|
|
+ changeConditionStrMap (i, type) {
|
|
|
+ this.isSelectConditionTabs[(i > 4 ? 4: i)] = type
|
|
|
+ switch (i) {
|
|
|
+ case 1 : {
|
|
|
+ var tempParams = {}
|
|
|
+ if (type) {
|
|
|
+ tempParams = this.$refs.areaCitySelector.onConfirm()
|
|
|
+ } else {
|
|
|
+ tempParams = this.$refs.areaCitySelector.resetAll()
|
|
|
+ }
|
|
|
+ if (tempParams && tempParams.data) {
|
|
|
+ this.conditionStrMap.area = tempParams.data
|
|
|
+ } else {
|
|
|
+ this.conditionStrMap.area = []
|
|
|
+ }
|
|
|
+ break
|
|
|
}
|
|
|
- if (tempParams && tempParams.data) {
|
|
|
- this.conditionStrMap.area = tempParams.data
|
|
|
- } else {
|
|
|
- this.conditionStrMap.area = []
|
|
|
+ case 2: {
|
|
|
+ var tempParams = {}
|
|
|
+ if (type) {
|
|
|
+ tempParams = this.$refs.industryComponent.onConfirm()
|
|
|
+ } else {
|
|
|
+ tempParams = this.$refs.industryComponent.resetAll()
|
|
|
+ this.industryComponentKey = new Date().getTime()
|
|
|
+ }
|
|
|
+ break
|
|
|
}
|
|
|
- break
|
|
|
- }
|
|
|
- case 2: {
|
|
|
- var tempParams = {}
|
|
|
- if (type) {
|
|
|
- tempParams = this.$refs.industryComponent.onConfirm()
|
|
|
- } else {
|
|
|
- tempParams = this.$refs.industryComponent.resetAll()
|
|
|
- this.industryComponentKey = new Date().getTime()
|
|
|
+ case 3: {
|
|
|
+ var tempParams = {}
|
|
|
+ if (type) {
|
|
|
+ tempParams = this.$refs.cateComponent.onConfirm()
|
|
|
+ } else {
|
|
|
+ tempParams = this.$refs.cateComponent.resetAll()
|
|
|
+ this.cateComponentKey = new Date().getTime()
|
|
|
+ }
|
|
|
+ console.log(tempParams)
|
|
|
+ if (tempParams && tempParams.data) {
|
|
|
+ this.conditionStrMap.buyerclass = tempParams.data
|
|
|
+ } else {
|
|
|
+ this.conditionStrMap.buyerclass = []
|
|
|
+ }
|
|
|
+ break
|
|
|
}
|
|
|
- break
|
|
|
- }
|
|
|
- case 3: {
|
|
|
- var tempParams = {}
|
|
|
- if (type) {
|
|
|
- tempParams = this.$refs.cateComponent.onConfirm()
|
|
|
- } else {
|
|
|
- tempParams = this.$refs.cateComponent.resetAll()
|
|
|
- this.cateComponentKey = new Date().getTime()
|
|
|
+ case 4 : {
|
|
|
+ // this.conditionStrMap.entcustomer = this.getMoreListToStr(4)
|
|
|
+ break
|
|
|
}
|
|
|
- console.log(tempParams)
|
|
|
- if (tempParams && tempParams.data) {
|
|
|
- this.conditionStrMap.buyerclass = tempParams.data
|
|
|
- } else {
|
|
|
- this.conditionStrMap.buyerclass = []
|
|
|
+ case 5 : {
|
|
|
+ this.conditionStrMap.entStatus = this.getMoreListToStr(5)
|
|
|
+ break
|
|
|
}
|
|
|
- break
|
|
|
- }
|
|
|
- case 4 : {
|
|
|
- // this.conditionStrMap.entcustomer = this.getMoreListToStr(4)
|
|
|
- break
|
|
|
- }
|
|
|
- case 5 : {
|
|
|
- this.conditionStrMap.entStatus = this.getMoreListToStr(5)
|
|
|
- break
|
|
|
- }
|
|
|
- case 6: {
|
|
|
- var tempParams = {}
|
|
|
- try {
|
|
|
- if (type) {
|
|
|
- tempParams = this.$refs.dateComponentForEnt.onConfirm()
|
|
|
- } else {
|
|
|
- tempParams = this.$refs.dateComponentForEnt.resetAll()
|
|
|
- this.dateComponentKey = new Date().getTime()
|
|
|
- }
|
|
|
- } catch (err) {
|
|
|
- if (type) {
|
|
|
- tempParams = this.$refs.dateComponentForEnt[0].onConfirm()
|
|
|
- } else {
|
|
|
- tempParams = this.$refs.dateComponentForEnt[0].resetAll()
|
|
|
- this.dateComponentKey = new Date().getTime()
|
|
|
- }
|
|
|
- }
|
|
|
- console.log(tempParams)
|
|
|
- if (tempParams && tempParams.data) {
|
|
|
- if (tempParams.data.start === '' && tempParams.data.end === '') {
|
|
|
+ case 6: {
|
|
|
+ var tempParams = {}
|
|
|
+ try {
|
|
|
+ if (type) {
|
|
|
+ tempParams = this.$refs.dateComponentForEnt.onConfirm()
|
|
|
+ } else {
|
|
|
+ tempParams = this.$refs.dateComponentForEnt.resetAll()
|
|
|
+ this.dateComponentKey = new Date().getTime()
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ if (type) {
|
|
|
+ tempParams = this.$refs.dateComponentForEnt[0].onConfirm()
|
|
|
+ } else {
|
|
|
+ tempParams = this.$refs.dateComponentForEnt[0].resetAll()
|
|
|
+ this.dateComponentKey = new Date().getTime()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(tempParams)
|
|
|
+ if (tempParams && tempParams.data) {
|
|
|
+ if (tempParams.data.start === '' && tempParams.data.end === '') {
|
|
|
+ this.selectDate = {
|
|
|
+ startDate: '',
|
|
|
+ endDate: '',
|
|
|
+ exact: ''
|
|
|
+ }
|
|
|
+ this.conditionStrMap.establish = ''
|
|
|
+ this.dateComponentKey = new Date().getTime()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var tempDate = tempParams.data.exact
|
|
|
+ this.selectDate = {
|
|
|
+ startDate: tempParams.data.start,
|
|
|
+ endDate: tempParams.data.end,
|
|
|
+ exact: tempParams.data.exact
|
|
|
+ }
|
|
|
+ if (tempDate === 'exact') {
|
|
|
+ tempDate = (tempParams.data.start ? tempParams.data.start / 1000 : '') + '-' + (tempParams.data.end ? tempParams.data.end / 1000 : '')
|
|
|
+ }
|
|
|
+ this.conditionStrMap.establish = tempDate
|
|
|
+ if (this.conditionStrMap.establish === '_' || this.conditionStrMap.establish === 'all') {
|
|
|
+ this.conditionStrMap.establish = ''
|
|
|
+ }
|
|
|
+ } else {
|
|
|
this.selectDate = {
|
|
|
startDate: '',
|
|
|
endDate: '',
|
|
|
exact: ''
|
|
|
}
|
|
|
this.conditionStrMap.establish = ''
|
|
|
- this.dateComponentKey = new Date().getTime()
|
|
|
- return
|
|
|
- }
|
|
|
- var tempDate = tempParams.data.exact
|
|
|
- this.selectDate = {
|
|
|
- startDate: tempParams.data.start,
|
|
|
- endDate: tempParams.data.end,
|
|
|
- exact: tempParams.data.exact
|
|
|
}
|
|
|
- if (tempDate === 'exact') {
|
|
|
- tempDate = (tempParams.data.start ? tempParams.data.start / 1000 : '') + '-' + (tempParams.data.end ? tempParams.data.end / 1000 : '')
|
|
|
+ break
|
|
|
+ }
|
|
|
+ case 7: {
|
|
|
+ var tempParams = {}
|
|
|
+ if (type) {
|
|
|
+ tempParams = this.$refs.areaRadioComponent.onConfirm()
|
|
|
+ } else {
|
|
|
+ tempParams = this.$refs.areaRadioComponent.resetAll()
|
|
|
}
|
|
|
- this.conditionStrMap.establish = tempDate
|
|
|
- if (this.conditionStrMap.establish === '_' || this.conditionStrMap.establish === 'all') {
|
|
|
- this.conditionStrMap.establish = ''
|
|
|
+ if (tempParams && tempParams.data) {
|
|
|
+ this.conditionStrMap.biddingArea = tempParams.data[0]
|
|
|
}
|
|
|
- } else {
|
|
|
- this.selectDate = {
|
|
|
- startDate: '',
|
|
|
- endDate: '',
|
|
|
- exact: ''
|
|
|
- }
|
|
|
- this.conditionStrMap.establish = ''
|
|
|
+ break
|
|
|
}
|
|
|
- break
|
|
|
- }
|
|
|
- case 7: {
|
|
|
- var tempParams = {}
|
|
|
- if (type) {
|
|
|
- tempParams = this.$refs.areaRadioComponent.onConfirm()
|
|
|
- } else {
|
|
|
- tempParams = this.$refs.areaRadioComponent.resetAll()
|
|
|
+ case 8 : {
|
|
|
+ this.conditionStrMap.entClass = this.getMoreListToStr(8)
|
|
|
+ break
|
|
|
}
|
|
|
- if (tempParams && tempParams.data) {
|
|
|
- this.conditionStrMap.biddingArea = tempParams.data[0]
|
|
|
+ case 9 : {
|
|
|
+ this.conditionStrMap.entContact = this.getMoreListToStr(9)
|
|
|
+ break
|
|
|
}
|
|
|
- break
|
|
|
- }
|
|
|
- case 8 : {
|
|
|
- this.conditionStrMap.entClass = this.getMoreListToStr(8)
|
|
|
- break
|
|
|
}
|
|
|
- case 9 : {
|
|
|
- this.conditionStrMap.entContact = this.getMoreListToStr(9)
|
|
|
- break
|
|
|
+ },
|
|
|
+ // 企业客户历史确定
|
|
|
+ submitEnt () {
|
|
|
+ console.log(this.conditionStrMap.entcustomer)
|
|
|
+ if(this.conditionStrMap.entcustomer.length > 0) {
|
|
|
+ this.selectEntList = '已选:' + this.conditionStrMap.entcustomer.length + '个客户'
|
|
|
+ } else {
|
|
|
+ this.selectEntList = '请选择企业历史客户'
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- // 企业客户历史确定
|
|
|
- submitEnt () {
|
|
|
- console.log(this.conditionStrMap.entcustomer)
|
|
|
- if(this.conditionStrMap.entcustomer.length > 0) {
|
|
|
- this.selectEntList = '已选:' + this.conditionStrMap.entcustomer.length + '个客户'
|
|
|
- } else {
|
|
|
+ this.togglePopForArea(false)
|
|
|
+ },
|
|
|
+ resetEnt () {
|
|
|
this.selectEntList = '请选择企业历史客户'
|
|
|
- }
|
|
|
- this.togglePopForArea(false)
|
|
|
- },
|
|
|
- resetEnt () {
|
|
|
- this.selectEntList = '请选择企业历史客户'
|
|
|
- this.conditionStrMap.entcustomer= []
|
|
|
- this.togglePopForArea(false)
|
|
|
- },
|
|
|
- // 获取关键词
|
|
|
- getKeyWordList () {
|
|
|
- let _this = this
|
|
|
- let setScopeList = sessionStorage.getItem('big-setScopeList')
|
|
|
- if(setScopeList) {
|
|
|
- setScopeList = JSON.parse(setScopeList)
|
|
|
- _this.conditionStrMap.business_scope = setScopeList
|
|
|
- _this.keyContent = '已选:' + this.formatterContent(setScopeList)
|
|
|
- } else {
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: '/entnicheNew/subscribe/key/get',
|
|
|
- success:function(res) {
|
|
|
- // console.log(res)
|
|
|
- let getArr = []
|
|
|
- if (res.data.data.length > 0) {
|
|
|
- res.data.data.forEach((item) => {
|
|
|
- item.a_key.forEach((sum) => {
|
|
|
- let obj = {
|
|
|
- "appendkey": sum.appendkey,
|
|
|
- "key": sum.key,
|
|
|
- "matchway": 1,
|
|
|
- "notkey": sum.notkey,
|
|
|
- "updatetime": new Date().getTime()
|
|
|
- }
|
|
|
- getArr.push(obj)
|
|
|
+ this.conditionStrMap.entcustomer= []
|
|
|
+ this.togglePopForArea(false)
|
|
|
+ },
|
|
|
+ // 获取关键词
|
|
|
+ getKeyWordList () {
|
|
|
+ let _this = this
|
|
|
+ let setScopeList = sessionStorage.getItem('big-setScopeList')
|
|
|
+ if(setScopeList) {
|
|
|
+ setScopeList = JSON.parse(setScopeList)
|
|
|
+ _this.conditionStrMap.business_scope = setScopeList
|
|
|
+ _this.keyContent = '已选:' + this.formatterContent(setScopeList)
|
|
|
+ } else {
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/entnicheNew/subscribe/key/get',
|
|
|
+ success:function(res) {
|
|
|
+ // console.log(res)
|
|
|
+ let getArr = []
|
|
|
+ if (res.data.data.length > 0) {
|
|
|
+ res.data.data.forEach((item) => {
|
|
|
+ item.a_key.forEach((sum) => {
|
|
|
+ let obj = {
|
|
|
+ "appendkey": sum.appendkey,
|
|
|
+ "key": sum.key,
|
|
|
+ "matchway": 1,
|
|
|
+ "notkey": sum.notkey,
|
|
|
+ "updatetime": new Date().getTime()
|
|
|
+ }
|
|
|
+ getArr.push(obj)
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
- _this.conditionStrMap.business_scope = getArr
|
|
|
- _this.keyContent = '已选:' + _this.formatterContent(getArr)
|
|
|
- } else {
|
|
|
- _this.keyContent = '请选择业务范围'
|
|
|
+ _this.conditionStrMap.business_scope = getArr
|
|
|
+ _this.keyContent = '已选:' + _this.formatterContent(getArr)
|
|
|
+ } else {
|
|
|
+ _this.keyContent = '请选择业务范围'
|
|
|
+ }
|
|
|
+ sessionStorage.setItem('big-setScopeList',JSON.stringify(getArr))
|
|
|
}
|
|
|
- sessionStorage.setItem('big-setScopeList',JSON.stringify(getArr))
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- // 处理采购内容数据格式
|
|
|
- formatterContent: function(data){
|
|
|
- var arr = [];
|
|
|
- if(data) {
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 处理采购内容数据格式
|
|
|
+ formatterContent: function(data){
|
|
|
+ var arr = [];
|
|
|
+ if(data) {
|
|
|
data.forEach(function(item,i){
|
|
|
- arr.push(item.key)
|
|
|
+ arr.push(item.key)
|
|
|
});
|
|
|
- }
|
|
|
- return arr.join('、');
|
|
|
- },
|
|
|
- onSelectScreen (data) {
|
|
|
- if(data == 4) {
|
|
|
- // this.showPop = false
|
|
|
- // this.showEntKeyword = true
|
|
|
- location.href = '/jyapp/big/page/client_set_scope?header=业务范围'
|
|
|
- } else if(data == 5) {
|
|
|
- this.showEntHistory = true
|
|
|
- }
|
|
|
- },
|
|
|
- goUpBuyPage (originName) {
|
|
|
- if (!originName) {
|
|
|
- originName = '企业搜索' + this.entTabs[this.activeTabIndex].title + '-去开通'
|
|
|
- }
|
|
|
- try {
|
|
|
- _hmt.push(['_trackEvent','超级订阅-' + (utils.isWeiXinBrowser ? 'wx' : 'app'), 'click', originName]);
|
|
|
- } catch (e) {
|
|
|
- console.log('未初始化百度统计')
|
|
|
- }
|
|
|
- window.location.href = (utils.isWeiXinBrowser ? '/front' : '/jyapp') + '/vipsubscribe/vipsubscribe_new'
|
|
|
- },
|
|
|
- // 获取地区数据
|
|
|
- getAreaConfirm (data) {
|
|
|
- console.log(data)
|
|
|
- this.conditionStrMap.area = data.data
|
|
|
- },
|
|
|
- getCancel (data) {
|
|
|
- console.log(data)
|
|
|
- },
|
|
|
- // 获取行业数据
|
|
|
- getIndustryData(data) {
|
|
|
- if(data) {
|
|
|
- this.conditionStrMap.industry = data.data
|
|
|
- }
|
|
|
- },
|
|
|
- // 获取客户分类数据
|
|
|
- getCateData(data) {
|
|
|
- console.log(data)
|
|
|
- this.conditionStrMap.buyerclass = data
|
|
|
- },
|
|
|
- getSearchParams () {
|
|
|
- var tempParams = {
|
|
|
- entName: this.listInfo.value,
|
|
|
- pageSize: this.listInfo.pageSize,
|
|
|
- pageNum: this.listInfo.pageNum
|
|
|
- }
|
|
|
- // for (var k in this.conditionStrMap) {
|
|
|
- // tempParams[k] = this.conditionStrMap[k]
|
|
|
- // }
|
|
|
- Object.assign(tempParams, this.conditionStrMap)
|
|
|
- return tempParams
|
|
|
- },
|
|
|
- entSwitch: function() {
|
|
|
-
|
|
|
- },
|
|
|
- onLoad () {
|
|
|
- this.ajaxEntList().done(this.doFormatList.bind(this))
|
|
|
- },
|
|
|
- doFormatList (r) {
|
|
|
- if (r && r.error_msg == '' && r.data) {
|
|
|
- this.listInfo.pageNum++
|
|
|
- if (this.listInfo.pageNum === 1) {
|
|
|
- if (r.data.list.length > 10) {
|
|
|
- this.listInfo.total = r.data.list.length
|
|
|
- this.showUpTip = false
|
|
|
- } else {
|
|
|
- // this.showUpTip = true
|
|
|
- this.listInfo.finished = true
|
|
|
- }
|
|
|
}
|
|
|
+ return arr.join('、');
|
|
|
+ },
|
|
|
+ onSelectScreen (data) {
|
|
|
+ if(data == 4) {
|
|
|
+ // this.showPop = false
|
|
|
+ // this.showEntKeyword = true
|
|
|
+ location.href = '/jyapp/big/page/client_set_scope?header=业务范围'
|
|
|
+ } else if(data == 5) {
|
|
|
+ this.showEntHistory = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ goUpBuyPage (originName) {
|
|
|
+ if (!originName) {
|
|
|
+ originName = '企业搜索' + this.entTabs[this.activeTabIndex].title + '-去开通'
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ _hmt.push(['_trackEvent','超级订阅-' + (utils.isWeiXinBrowser ? 'wx' : 'app'), 'click', originName]);
|
|
|
+ } catch (e) {
|
|
|
+ console.log('未初始化百度统计')
|
|
|
+ }
|
|
|
+ window.location.href = (utils.isWeiXinBrowser ? '/front' : '/jyapp') + '/vipsubscribe/vipsubscribe_new'
|
|
|
+ },
|
|
|
+ // 获取地区数据
|
|
|
+ getAreaConfirm (data) {
|
|
|
+ console.log(data)
|
|
|
+ this.conditionStrMap.area = data.data
|
|
|
+ },
|
|
|
+ getCancel (data) {
|
|
|
+ console.log(data)
|
|
|
+ },
|
|
|
+ // 获取行业数据
|
|
|
+ getIndustryData(data) {
|
|
|
+ if(data) {
|
|
|
+ this.conditionStrMap.industry = data.data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取客户分类数据
|
|
|
+ getCateData(data) {
|
|
|
+ console.log(data)
|
|
|
+ this.conditionStrMap.buyerclass = data
|
|
|
+ },
|
|
|
+ getSearchParams () {
|
|
|
+ var tempParams = {
|
|
|
+ entName: this.listInfo.value,
|
|
|
+ pageSize: this.listInfo.pageSize,
|
|
|
+ pageNum: this.listInfo.pageNum
|
|
|
+ }
|
|
|
+ // for (var k in this.conditionStrMap) {
|
|
|
+ // tempParams[k] = this.conditionStrMap[k]
|
|
|
+ // }
|
|
|
+ Object.assign(tempParams, this.conditionStrMap)
|
|
|
+ return tempParams
|
|
|
+ },
|
|
|
+ entSwitch: function() {
|
|
|
|
|
|
- let cateArr = []
|
|
|
- r.data.list.forEach(function(sum) {
|
|
|
- console.log(sum)
|
|
|
- sum.follow = false
|
|
|
- sum.claim = false
|
|
|
- cateArr.push(sum.Buyer)
|
|
|
- })
|
|
|
- if (r.data.list) {
|
|
|
- r.data.list = r.data.list.splice(0, 499)
|
|
|
- if(r.data.count<=10) {
|
|
|
- this.buyerList = r.data.list
|
|
|
- } else {
|
|
|
- if(this.listInfo.pageNum <= 1) {
|
|
|
+ },
|
|
|
+ onLoad () {
|
|
|
+ this.ajaxEntList().done(this.doFormatList.bind(this))
|
|
|
+ },
|
|
|
+ doFormatList (r) {
|
|
|
+ if (r && r.error_msg == '' && r.data) {
|
|
|
+ this.listInfo.pageNum++
|
|
|
+ if (this.listInfo.pageNum === 1) {
|
|
|
+ if (r.data.list.length > 10) {
|
|
|
+ this.listInfo.total = r.data.list.length
|
|
|
+ this.showUpTip = false
|
|
|
+ } else {
|
|
|
+ // this.showUpTip = true
|
|
|
+ this.listInfo.finished = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ let cateArr = []
|
|
|
+ r.data.list.forEach(function(sum) {
|
|
|
+ console.log(sum)
|
|
|
+ sum.follow = false
|
|
|
+ sum.claim = false
|
|
|
+ cateArr.push(sum.Buyer)
|
|
|
+ })
|
|
|
+ if (r.data.list) {
|
|
|
+ r.data.list = r.data.list.splice(0, 499)
|
|
|
+ if(r.data.count<=10) {
|
|
|
this.buyerList = r.data.list
|
|
|
} else {
|
|
|
- this.buyerList = this.buyerList.concat(r.data.list)
|
|
|
+ if(this.listInfo.pageNum <= 1) {
|
|
|
+ this.buyerList = r.data.list
|
|
|
+ } else {
|
|
|
+ this.buyerList = this.buyerList.concat(r.data.list)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- this.cateNameStr = cateArr.join(',')
|
|
|
- this.getActionState(this.cateNameStr, 'r')
|
|
|
- this.getActionState(this.cateNameStr, 'g')
|
|
|
- this.listInfo.loading = false
|
|
|
- if (this.listInfo.total !== -1 && this.listInfo.total <= this.buyerList.length) {
|
|
|
- this.listInfo.finished = true
|
|
|
+ this.cateNameStr = cateArr.join(',')
|
|
|
+ this.getActionState(this.cateNameStr, 'r')
|
|
|
+ this.getActionState(this.cateNameStr, 'g')
|
|
|
+ this.listInfo.loading = false
|
|
|
+ if (this.listInfo.total !== -1 && this.listInfo.total <= this.buyerList.length) {
|
|
|
+ this.listInfo.finished = true
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$toast(r.error_msg)
|
|
|
}
|
|
|
- } else {
|
|
|
- this.$toast(r.error_msg)
|
|
|
- }
|
|
|
- },
|
|
|
- // 是否认领和关注企业
|
|
|
- getActionState (names, str) {
|
|
|
- let _this = this
|
|
|
- const params = {
|
|
|
- entUserId: '171',
|
|
|
- names: names
|
|
|
- }
|
|
|
- // 认领
|
|
|
- if(str == 'r') {
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: '/entnicheNew/customer/claimcheck',
|
|
|
- contentType: 'application/json',
|
|
|
- data: JSON.stringify(params),
|
|
|
- success: function(res) {
|
|
|
- console.log(res)
|
|
|
- if(res.data.iscoll) {
|
|
|
- _this.buyerList.forEach(function(item) {
|
|
|
- res.data.names.forEach(function(sum) {
|
|
|
- if(item.Buyer == sum) {
|
|
|
- item.claim = true
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 是否认领和关注企业
|
|
|
+ getActionState (names, str) {
|
|
|
+ let _this = this
|
|
|
+ const params = {
|
|
|
+ entUserId: '171',
|
|
|
+ names: names
|
|
|
+ }
|
|
|
+ // 认领
|
|
|
+ if(str == 'r') {
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/entnicheNew/customer/claimcheck',
|
|
|
+ contentType: 'application/json',
|
|
|
+ data: JSON.stringify(params),
|
|
|
+ success: function(res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.iscoll) {
|
|
|
+ _this.buyerList.forEach(function(item) {
|
|
|
+ res.data.names.forEach(function(sum) {
|
|
|
+ if(item.Buyer == sum) {
|
|
|
+ item.claim = true
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
- } else if (str == 'g') {
|
|
|
- // 关注
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: '/entnicheNew/customer/check',
|
|
|
- contentType: 'application/json',
|
|
|
- data: JSON.stringify(params),
|
|
|
- success: function(res) {
|
|
|
- console.log(res)
|
|
|
- if(res.data.iscoll) {
|
|
|
- _this.buyerList.forEach(function(item) {
|
|
|
- res.data.names.forEach(function(sum) {
|
|
|
- if(item.Buyer == sum) {
|
|
|
- item.follow = true
|
|
|
- }
|
|
|
+ })
|
|
|
+ } else if (str == 'g') {
|
|
|
+ // 关注
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/entnicheNew/customer/check',
|
|
|
+ contentType: 'application/json',
|
|
|
+ data: JSON.stringify(params),
|
|
|
+ success: function(res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.data.iscoll) {
|
|
|
+ _this.buyerList.forEach(function(item) {
|
|
|
+ res.data.names.forEach(function(sum) {
|
|
|
+ if(item.Buyer == sum) {
|
|
|
+ item.follow = true
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- // 关注企业
|
|
|
- changeFollowState (data, str, tags, tagstr) {
|
|
|
- const dataparams = {
|
|
|
- data: data,
|
|
|
- str: 'r'
|
|
|
- }
|
|
|
- sessionStorage.setItem('setClientInfo', JSON.stringify(dataparams))
|
|
|
- let _this = this
|
|
|
- let params = {
|
|
|
- "userId": 123,
|
|
|
- "name": data.Buyer, //采购单位名称
|
|
|
- "province": data.wProvince, //省份
|
|
|
- "city": data.wCity, //区域
|
|
|
- "mold": 0, //1 认领;默认 0关注
|
|
|
- "B": data.follow, //true 取关;默认 false 关注
|
|
|
- }
|
|
|
- if(str == 'r') {
|
|
|
- params = {
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 关注企业
|
|
|
+ changeFollowState (data, str, tags, tagstr) {
|
|
|
+ const dataparams = {
|
|
|
+ data: data,
|
|
|
+ str: 'r'
|
|
|
+ }
|
|
|
+ sessionStorage.setItem('setClientInfo', JSON.stringify(dataparams))
|
|
|
+ let _this = this
|
|
|
+ let params = {
|
|
|
"userId": 123,
|
|
|
"name": data.Buyer, //采购单位名称
|
|
|
"province": data.wProvince, //省份
|
|
|
"city": data.wCity, //区域
|
|
|
- "mold": 1, //1 认领;默认 0关注
|
|
|
- "D": data.claim, //true 取关;默认 false 关注
|
|
|
- 'label': tags || ''
|
|
|
- }
|
|
|
- if(tagstr) {
|
|
|
- params.D = false
|
|
|
+ "mold": 0, //1 认领;默认 0关注
|
|
|
+ "B": data.follow, //true 取关;默认 false 关注
|
|
|
}
|
|
|
- }
|
|
|
- if(!data.claim && tagstr != 'tag' && str == 'r') {
|
|
|
- if (vKeepEntComponent) {
|
|
|
- vKeepEntComponent.changeBid(data.Buyer, !data.claim)
|
|
|
- // vKeepComponent.changeKeepStatus(!data.claim, this)
|
|
|
+ if(str == 'r') {
|
|
|
+ params = {
|
|
|
+ "userId": 123,
|
|
|
+ "name": data.Buyer, //采购单位名称
|
|
|
+ "province": data.wProvince, //省份
|
|
|
+ "city": data.wCity, //区域
|
|
|
+ "mold": 1, //1 认领;默认 0关注
|
|
|
+ "D": data.claim, //true 取关;默认 false 关注
|
|
|
+ 'label': tags || ''
|
|
|
+ }
|
|
|
+ if(tagstr) {
|
|
|
+ params.D = false
|
|
|
+ }
|
|
|
}
|
|
|
- } else {
|
|
|
- $.ajax({
|
|
|
- type: 'POST',
|
|
|
- url: '/entnicheNew/customer/attention',
|
|
|
- contentType: 'application/json',
|
|
|
- data: JSON.stringify(params),
|
|
|
- success: function(res) {
|
|
|
- console.log(res)
|
|
|
- if(res.error_code == 0) {
|
|
|
- if(res.data) {
|
|
|
- if(params.mold == 0) {
|
|
|
- data.follow = !data.follow
|
|
|
+ if(!data.claim && tagstr != 'tag' && str == 'r') {
|
|
|
+ if (vKeepEntComponent) {
|
|
|
+ vKeepEntComponent.changeBid(data.Buyer, !data.claim)
|
|
|
+ // vKeepComponent.changeKeepStatus(!data.claim, this)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/entnicheNew/customer/attention',
|
|
|
+ contentType: 'application/json',
|
|
|
+ data: JSON.stringify(params),
|
|
|
+ success: function(res) {
|
|
|
+ console.log(res)
|
|
|
+ if(res.error_code == 0) {
|
|
|
+ if(res.data) {
|
|
|
+ if(params.mold == 0) {
|
|
|
+ data.follow = !data.follow
|
|
|
+ } else {
|
|
|
+ data.claim = !data.claim
|
|
|
+ }
|
|
|
+ _this.$toast('操作成功')
|
|
|
+ _this.onLoad()
|
|
|
} else {
|
|
|
- data.claim = !data.claim
|
|
|
+ _this.$toast(res.error_msg)
|
|
|
}
|
|
|
- _this.$toast('操作成功')
|
|
|
- _this.onLoad()
|
|
|
- } else {
|
|
|
- _this.$toast(res.error_msg)
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- ajaxEntList() {
|
|
|
- let aa = this.getSearchParams()
|
|
|
- return $.ajax({
|
|
|
- url: '/entnicheNew/customer/corList',
|
|
|
- type: 'POST',
|
|
|
- contentType: 'application/json',
|
|
|
- data: JSON.stringify(aa)
|
|
|
- })
|
|
|
- },
|
|
|
- doQueryList () {
|
|
|
- this.listInfo.pageNum = 0
|
|
|
- this.listInfo.total = -1
|
|
|
- this.listInfo.finished = false
|
|
|
- this.listInfo.loading = true
|
|
|
- this.listInfo.value = $("#search-header-input").val()
|
|
|
- this.list = []
|
|
|
- this.onLoad()
|
|
|
- },
|
|
|
- onCancelArea (tempParams) {
|
|
|
- this.resetValueForData(7)
|
|
|
- if (tempParams && tempParams.data) {
|
|
|
- this.conditionStrMap.biddingArea = tempParams.data[0]
|
|
|
- }
|
|
|
- this.togglePopForArea(false)
|
|
|
- },
|
|
|
- onConfirmArea (tempParams) {
|
|
|
- if (tempParams && tempParams.data) {
|
|
|
- this.conditionStrMap.biddingArea = tempParams.data[0]
|
|
|
- }
|
|
|
- this.togglePopForArea(false)
|
|
|
- },
|
|
|
- resetCondition () {
|
|
|
- var _this = this
|
|
|
- if (this.activeTabIndex === 4) {
|
|
|
- this.moreContentList.forEach(function (v) {
|
|
|
- _this.resetValueForData(v)
|
|
|
- _this.changeConditionStrMap(v, false)
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.resetValueForData(this.activeTabIndex)
|
|
|
- this.changeConditionStrMap(this.activeTabIndex, false)
|
|
|
- }
|
|
|
- this.togglePop(false)
|
|
|
- this.doQueryList()
|
|
|
- },
|
|
|
- submitCondition () {
|
|
|
- console.log('submit', this.activeTabIndex)
|
|
|
- var _this = this
|
|
|
- if (this.activeTabIndex === 4) {
|
|
|
- this.moreContentList.forEach(function (v) {
|
|
|
- _this.changeConditionStrMap(v, true)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ajaxEntList() {
|
|
|
+ let aa = this.getSearchParams()
|
|
|
+ return $.ajax({
|
|
|
+ url: '/entnicheNew/customer/corList',
|
|
|
+ type: 'POST',
|
|
|
+ contentType: 'application/json',
|
|
|
+ data: JSON.stringify(aa)
|
|
|
})
|
|
|
- } else {
|
|
|
- this.changeConditionStrMap(this.activeTabIndex, true)
|
|
|
- }
|
|
|
- this.togglePop(false)
|
|
|
- this.doQueryList()
|
|
|
- },
|
|
|
- resetValueForData (key) {
|
|
|
- if (typeof this.conditionMap[key] !== "undefined") {
|
|
|
- var defalutKey = this.$options.data().conditionMap[key]
|
|
|
- this.$set(this.conditionMap, key, defalutKey)
|
|
|
- }
|
|
|
- },
|
|
|
- removeFixedScroll () {
|
|
|
- $(".app-layout-content-b").scrollTop(0)
|
|
|
- $(".app-layout-content-b").removeClass('ent-stop-scroll')
|
|
|
- $("#v-buyer-search-group .ent-search-list").css({height: 'unset'})
|
|
|
- $("#v-buyer-search-group .ent-search-pop").css({height: 'unset'})
|
|
|
- },
|
|
|
- fixedScroll () {
|
|
|
- console.log('fix view Height for EntSearch')
|
|
|
- $(".app-layout-content-b").scrollTop(0)
|
|
|
- $(".app-layout-content-b").addClass('ent-stop-scroll')
|
|
|
- var isMaxHeight = $(".app-layout-content-b").height() - $(".tabs-nav").height() - $("#v-buyer-search-group .van-tabs.van-tabs--line").height()
|
|
|
- $("#v-buyer-search-group .ent-search-list").css({height: isMaxHeight})
|
|
|
- $("#v-buyer-search-group .ent-search-pop").css({height: isMaxHeight})
|
|
|
- },
|
|
|
- updateScrollTop () {
|
|
|
- $(".app-layout-content-b").scrollTop(0)
|
|
|
- },
|
|
|
- selectEnt (ent) {
|
|
|
- sessionStorage.setItem('home_top_search_tab_index', $(".tabs-nav .active").index())
|
|
|
- saveSearchHistory('ent', ent.Buyer, ent._id)
|
|
|
- sessionStorage.setItem('landentinfo', JSON.stringify({
|
|
|
- anchor: '企业全景分析',
|
|
|
- landname: ent.name
|
|
|
- }))
|
|
|
- SuperSearch.setSessionStorage()
|
|
|
- // if(!this.checkNowPower()){
|
|
|
- // this.goUpBuyPage()
|
|
|
- // }else{
|
|
|
+ },
|
|
|
+ doQueryList () {
|
|
|
+ this.listInfo.pageNum = 0
|
|
|
+ this.listInfo.total = -1
|
|
|
+ this.listInfo.finished = false
|
|
|
+ this.listInfo.loading = true
|
|
|
+ this.listInfo.value = $("#search-header-input").val()
|
|
|
+ this.list = []
|
|
|
+ this.onLoad()
|
|
|
+ },
|
|
|
+ onCancelArea (tempParams) {
|
|
|
+ this.resetValueForData(7)
|
|
|
+ if (tempParams && tempParams.data) {
|
|
|
+ this.conditionStrMap.biddingArea = tempParams.data[0]
|
|
|
+ }
|
|
|
+ this.togglePopForArea(false)
|
|
|
+ },
|
|
|
+ onConfirmArea (tempParams) {
|
|
|
+ if (tempParams && tempParams.data) {
|
|
|
+ this.conditionStrMap.biddingArea = tempParams.data[0]
|
|
|
+ }
|
|
|
+ this.togglePopForArea(false)
|
|
|
+ },
|
|
|
+ resetCondition () {
|
|
|
+ var _this = this
|
|
|
+ if (this.activeTabIndex === 4) {
|
|
|
+ this.moreContentList.forEach(function (v) {
|
|
|
+ _this.resetValueForData(v)
|
|
|
+ _this.changeConditionStrMap(v, false)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.resetValueForData(this.activeTabIndex)
|
|
|
+ this.changeConditionStrMap(this.activeTabIndex, false)
|
|
|
+ }
|
|
|
+ this.togglePop(false)
|
|
|
+ this.doQueryList()
|
|
|
+ },
|
|
|
+ submitCondition () {
|
|
|
+ console.log('submit', this.activeTabIndex)
|
|
|
+ var _this = this
|
|
|
+ if (this.activeTabIndex === 4) {
|
|
|
+ this.moreContentList.forEach(function (v) {
|
|
|
+ _this.changeConditionStrMap(v, true)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.changeConditionStrMap(this.activeTabIndex, true)
|
|
|
+ }
|
|
|
+ this.togglePop(false)
|
|
|
+ this.doQueryList()
|
|
|
+ },
|
|
|
+ resetValueForData (key) {
|
|
|
+ if (typeof this.conditionMap[key] !== "undefined") {
|
|
|
+ var defalutKey = this.$options.data().conditionMap[key]
|
|
|
+ this.$set(this.conditionMap, key, defalutKey)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ removeFixedScroll () {
|
|
|
+ $(".app-layout-content-b").scrollTop(0)
|
|
|
+ $(".app-layout-content-b").removeClass('ent-stop-scroll')
|
|
|
+ $("#v-buyer-search-group .ent-search-list").css({height: 'unset'})
|
|
|
+ $("#v-buyer-search-group .ent-search-pop").css({height: 'unset'})
|
|
|
+ },
|
|
|
+ fixedScroll () {
|
|
|
+ console.log('fix view Height for EntSearch')
|
|
|
+ $(".app-layout-content-b").scrollTop(0)
|
|
|
+ $(".app-layout-content-b").addClass('ent-stop-scroll')
|
|
|
+ var isMaxHeight = $(".app-layout-content-b").height() - $(".tabs-nav").height() - $("#v-buyer-search-group .van-tabs.van-tabs--line").height()
|
|
|
+ $("#v-buyer-search-group .ent-search-list").css({height: isMaxHeight})
|
|
|
+ $("#v-buyer-search-group .ent-search-pop").css({height: isMaxHeight})
|
|
|
+ },
|
|
|
+ updateScrollTop () {
|
|
|
+ $(".app-layout-content-b").scrollTop(0)
|
|
|
+ },
|
|
|
+ selectEnt (ent) {
|
|
|
+ sessionStorage.setItem('home_top_search_tab_index', $(".tabs-nav .active").index())
|
|
|
+ saveSearchHistory('ent', ent.Buyer, ent._id)
|
|
|
+ sessionStorage.setItem('landentinfo', JSON.stringify({
|
|
|
+ anchor: '企业全景分析',
|
|
|
+ landname: ent.name
|
|
|
+ }))
|
|
|
+ SuperSearch.setSessionStorage()
|
|
|
+ // if(!this.checkNowPower()){
|
|
|
+ // this.goUpBuyPage()
|
|
|
+ // }else{
|
|
|
var tempUrl = '/jyapp/big/page/client_portrayal?entName='
|
|
|
location.href = tempUrl + encodeURIComponent(ent.Buyer) + '&from=client'
|
|
|
- // }
|
|
|
- },
|
|
|
- onClickTabs (name, title) {
|
|
|
- this.checkNowPower()
|
|
|
- this.togglePop(!(name === this.beforeTabIndex && this.showPop))
|
|
|
- this.beforeTabIndex = name
|
|
|
- if(name == 4 ) {
|
|
|
- this.getKeyWordList()
|
|
|
- this.getHistoryList()
|
|
|
- }
|
|
|
- },
|
|
|
- getNowAllCheckStatus (index) {
|
|
|
- var tempA = this.conditionMap[index].map(function (v) {
|
|
|
- return v.checked
|
|
|
- })
|
|
|
- var nowLength = 0
|
|
|
- try {
|
|
|
- nowLength = tempA.slice(1,tempA.length).filter(function(v) {
|
|
|
- return v
|
|
|
- }).length
|
|
|
- } catch (e) {
|
|
|
- console.log(e)
|
|
|
- }
|
|
|
- var allLength = this.conditionMap[index].length - 1
|
|
|
- return nowLength === 0 || allLength === nowLength
|
|
|
- },
|
|
|
- recoverAllCheckForIndex (index) {
|
|
|
- this.conditionMap[index].forEach(function (v) {
|
|
|
- v.checked = false
|
|
|
- })
|
|
|
- },
|
|
|
- togglePopForArea (status) {
|
|
|
- this.showEntHistory = status
|
|
|
- },
|
|
|
- onSelectMoreGroup (index) {
|
|
|
- // if (this.entTabs[index].disabled) {
|
|
|
- // return this.showBuyTip()
|
|
|
- // }
|
|
|
- // if (index === 7) {
|
|
|
- // this.togglePopForArea(true)
|
|
|
- // }
|
|
|
- },
|
|
|
- onSelectMoreItem (index, tags, tagIndex) {
|
|
|
- if (this.entTabs[index].disabled) {
|
|
|
- return this.showBuyTip()
|
|
|
- }
|
|
|
- var isMoreCheck = index < 7
|
|
|
- var isMoreAllCheck = tagIndex === 0
|
|
|
- if (isMoreCheck && !isMoreAllCheck) {
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ onClickTabs (name, title) {
|
|
|
+ this.checkNowPower()
|
|
|
+ this.togglePop(!(name === this.beforeTabIndex && this.showPop))
|
|
|
+ this.beforeTabIndex = name
|
|
|
+ if(name == 4 ) {
|
|
|
+ this.getKeyWordList()
|
|
|
+ this.getHistoryList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getNowAllCheckStatus (index) {
|
|
|
+ var tempA = this.conditionMap[index].map(function (v) {
|
|
|
+ return v.checked
|
|
|
+ })
|
|
|
+ var nowLength = 0
|
|
|
+ try {
|
|
|
+ nowLength = tempA.slice(1,tempA.length).filter(function(v) {
|
|
|
+ return v
|
|
|
+ }).length
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e)
|
|
|
+ }
|
|
|
+ var allLength = this.conditionMap[index].length - 1
|
|
|
+ return nowLength === 0 || allLength === nowLength
|
|
|
+ },
|
|
|
+ recoverAllCheckForIndex (index) {
|
|
|
+ this.conditionMap[index].forEach(function (v) {
|
|
|
+ v.checked = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ togglePopForArea (status) {
|
|
|
+ this.showEntHistory = status
|
|
|
+ },
|
|
|
+ onSelectMoreGroup (index) {
|
|
|
+ // if (this.entTabs[index].disabled) {
|
|
|
+ // return this.showBuyTip()
|
|
|
+ // }
|
|
|
+ // if (index === 7) {
|
|
|
+ // this.togglePopForArea(true)
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ onSelectMoreItem (index, tags, tagIndex) {
|
|
|
+ if (this.entTabs[index].disabled) {
|
|
|
+ return this.showBuyTip()
|
|
|
+ }
|
|
|
+ var isMoreCheck = index < 7
|
|
|
+ var isMoreAllCheck = tagIndex === 0
|
|
|
+ if (isMoreCheck && !isMoreAllCheck) {
|
|
|
this.conditionMap[index][0].checked = false
|
|
|
tags.checked = !tags.checked
|
|
|
if (this.getNowAllCheckStatus(index)) {
|
|
|
this.recoverAllCheckForIndex(index)
|
|
|
this.conditionMap[index][0].checked = true
|
|
|
}
|
|
|
- } else {
|
|
|
- this.recoverAllCheckForIndex(index)
|
|
|
- tags.checked = true
|
|
|
- }
|
|
|
- },
|
|
|
- showBuyTip () {
|
|
|
- var _this = this
|
|
|
- this.$dialog.close()
|
|
|
- this.$dialog.confirm({
|
|
|
- title: '开通超级订阅',
|
|
|
- message: '立享更多搜索权限<br>寻找商机更精准',
|
|
|
- className: 'ent-search-dialog center-text',
|
|
|
- overlayClass: 'z-2030',
|
|
|
- confirmButtonText: '去开通',
|
|
|
- }).then(function () {
|
|
|
- _this.goUpBuyPage('会员选项-去开通')
|
|
|
- }).catch(function () {});
|
|
|
- },
|
|
|
- onSelectItem (item, index) {
|
|
|
- if (item.disabled) {
|
|
|
- return this.showBuyTip()
|
|
|
- }
|
|
|
- if (index < 7) {
|
|
|
- item.checked = !item.checked
|
|
|
- } else {
|
|
|
- this.conditionMap[index].forEach(function (v) {
|
|
|
- v.checked = false
|
|
|
- })
|
|
|
- item.checked = true
|
|
|
- this.submitCondition()
|
|
|
- }
|
|
|
- },
|
|
|
- togglePop (type) {
|
|
|
- this.checkNowPower()
|
|
|
- this.showPop = type
|
|
|
- },
|
|
|
- toggleEntShow (type) {
|
|
|
- if (type) {
|
|
|
- Object.assign(vBuyerSearchComponent.$data, vBuyerSearchComponent.$options.data())
|
|
|
- }
|
|
|
- this.checkNowPower()
|
|
|
- this.showEntSearch = type
|
|
|
- if (type) {
|
|
|
- this.entSearchKey = new Date().getTime()
|
|
|
- $("#supersearchPage input[name=super_searchinput]").blur();
|
|
|
- this.doQueryList()
|
|
|
- $(window).on('resize', this.fixedScroll.bind(this))
|
|
|
- } else {
|
|
|
- $(window).off('resize', this.fixedScroll.bind(this))
|
|
|
- }
|
|
|
- var _this = this
|
|
|
- this.$nextTick(function () {
|
|
|
+ } else {
|
|
|
+ this.recoverAllCheckForIndex(index)
|
|
|
+ tags.checked = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showBuyTip () {
|
|
|
+ var _this = this
|
|
|
+ this.$dialog.close()
|
|
|
+ this.$dialog.confirm({
|
|
|
+ title: '开通超级订阅',
|
|
|
+ message: '立享更多搜索权限<br>寻找商机更精准',
|
|
|
+ className: 'ent-search-dialog center-text',
|
|
|
+ overlayClass: 'z-2030',
|
|
|
+ confirmButtonText: '去开通',
|
|
|
+ }).then(function () {
|
|
|
+ _this.goUpBuyPage('会员选项-去开通')
|
|
|
+ }).catch(function () {});
|
|
|
+ },
|
|
|
+ onSelectItem (item, index) {
|
|
|
+ if (item.disabled) {
|
|
|
+ return this.showBuyTip()
|
|
|
+ }
|
|
|
+ if (index < 7) {
|
|
|
+ item.checked = !item.checked
|
|
|
+ } else {
|
|
|
+ this.conditionMap[index].forEach(function (v) {
|
|
|
+ v.checked = false
|
|
|
+ })
|
|
|
+ item.checked = true
|
|
|
+ this.submitCondition()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ togglePop (type) {
|
|
|
+ this.checkNowPower()
|
|
|
+ this.showPop = type
|
|
|
+ },
|
|
|
+ toggleEntShow (type) {
|
|
|
if (type) {
|
|
|
- _this.fixedScroll()
|
|
|
+ Object.assign(vBuyerSearchComponent.$data, vBuyerSearchComponent.$options.data())
|
|
|
+ }
|
|
|
+ this.checkNowPower()
|
|
|
+ this.showEntSearch = type
|
|
|
+ if (type) {
|
|
|
+ this.entSearchKey = new Date().getTime()
|
|
|
+ $("#supersearchPage input[name=super_searchinput]").blur();
|
|
|
+ this.doQueryList()
|
|
|
+ $(window).on('resize', this.fixedScroll.bind(this))
|
|
|
} else {
|
|
|
- _this.removeFixedScroll()
|
|
|
+ $(window).off('resize', this.fixedScroll.bind(this))
|
|
|
}
|
|
|
- })
|
|
|
- setTimeout(function () {
|
|
|
- _this.$nextTick(function () {
|
|
|
+ var _this = this
|
|
|
+ this.$nextTick(function () {
|
|
|
if (type) {
|
|
|
_this.fixedScroll()
|
|
|
} else {
|
|
|
_this.removeFixedScroll()
|
|
|
}
|
|
|
})
|
|
|
- }, 300)
|
|
|
+ setTimeout(function () {
|
|
|
+ _this.$nextTick(function () {
|
|
|
+ if (type) {
|
|
|
+ _this.fixedScroll()
|
|
|
+ } else {
|
|
|
+ _this.removeFixedScroll()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }, 300)
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-})
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
function changeDefaultForSearchRange (type, key, value) {
|
|
|
var prefixForKey = 'mainSearchRangeFor'
|