|
@@ -12,25 +12,25 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="经销商">
|
|
<a-form-item label="经销商">
|
|
- <a-input id="dealerZoneSearch-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
|
|
|
|
|
|
+ <a-input id="dealerZoneSearch-dealerName" v-model.trim="queryParam.dealerDTO.dealerName" allowClear placeholder="请输入经销商名称"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="8" :sm="24">
|
|
<a-col :md="8" :sm="24">
|
|
<a-form-item label="客服/区域负责人/销售总监">
|
|
<a-form-item label="客服/区域负责人/销售总监">
|
|
- <a-input id="dealerZoneSearch-dealerName" v-model.trim="queryParam.customerName" allowClear placeholder="请输入客服/区域负责人/销售总监"/>
|
|
|
|
|
|
+ <a-input id="dealerZoneSearch-dealerName" v-model.trim="queryParam.bizUserName" allowClear placeholder="请输入客服/区域负责人/销售总监"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="24" :sm="24" style="margin-top: 10px;text-align:center;">
|
|
<a-col :md="24" :sm="24" style="margin-top: 10px;text-align:center;">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="dealerZoneSearch-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="dealerZoneSearch-refresh">查询</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="dealerZoneSearch-reset">重置</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="dealerZoneSearch-reset">重置</a-button>
|
|
- <a-button
|
|
|
|
|
|
+ <!-- <a-button
|
|
style="margin-left: 5px"
|
|
style="margin-left: 5px"
|
|
type="primary"
|
|
type="primary"
|
|
class="button-warning"
|
|
class="button-warning"
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
:disabled="disabled"
|
|
:disabled="disabled"
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
- id="dealerZoneSearch-export">导出</a-button>
|
|
|
|
|
|
+ id="dealerZoneSearch-export">导出</a-button> -->
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
@@ -44,9 +44,9 @@
|
|
ref="table"
|
|
ref="table"
|
|
:style="{ height: tableHeight+84.5+'px' }"
|
|
:style="{ height: tableHeight+84.5+'px' }"
|
|
size="small"
|
|
size="small"
|
|
- :rowKey="(record) => record.id"
|
|
|
|
|
|
+ :rowKey="(record) => record.no"
|
|
|
|
+ rowKeyName="no"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
- :showPagination="false"
|
|
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:scroll="{ y: tableHeight }"
|
|
:scroll="{ y: tableHeight }"
|
|
:defaultLoadData="false"
|
|
:defaultLoadData="false"
|
|
@@ -59,54 +59,54 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
-import { STable, VSelect } from '@/components'
|
|
|
|
|
|
+import { STable } from '@/components'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import { exportExcel } from '@/libs/JGPrint.js'
|
|
import { exportExcel } from '@/libs/JGPrint.js'
|
|
-import { subareaQueryIncludeAreaAll, dealerExport } from '@/api/subarea'
|
|
|
|
|
|
+import { queryDealerWithBizuser } from '@/api/dealerRelation'
|
|
export default {
|
|
export default {
|
|
name: 'DealerZoneSearch',
|
|
name: 'DealerZoneSearch',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, VSelect, subarea },
|
|
|
|
|
|
+ components: { STable, subarea },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
queryParam: {
|
|
queryParam: {
|
|
- subareaArea:{
|
|
|
|
- subareaSn: undefined,
|
|
|
|
- subareaAreaSn: undefined
|
|
|
|
|
|
+ subareaSn: undefined,
|
|
|
|
+ subareaAreaSn: undefined,
|
|
|
|
+ dealerDTO: {
|
|
|
|
+ dealerName: ''
|
|
},
|
|
},
|
|
- dealerName: '',
|
|
|
|
- customerName: ''
|
|
|
|
|
|
+ bizUserName: ''
|
|
},
|
|
},
|
|
|
|
+ exportLoading: false, // 导出loading
|
|
columns: [
|
|
columns: [
|
|
- { title: '经销商名称', dataIndex: 'subareaName1', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '所属区域', dataIndex: 'subareaArea.subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '所属分区', dataIndex: 'subareaArea.subareaAreaName', width: "10%", align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '客服', dataIndex: 'subareaName4', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '区域负责人', dataIndex: 'subareaName5', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '销售总监', dataIndex: 'subareaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
|
|
+ { title: '经销商名称', dataIndex: 'dealer.dealerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '所属区域', dataIndex: 'subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '所属分区', dataIndex: 'subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '客服', dataIndex: 'userNameKfs', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '销售总监', dataIndex: 'userNameXszjs', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- return subareaQueryIncludeAreaAll(Object.assign(parameter,this.queryParam)).then(res => {
|
|
|
|
|
|
+ return queryDealerWithBizuser(Object.assign(parameter, this.queryParam)).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
const no = 0
|
|
const no = 0
|
|
- for (var i = 0; i < data.length; i++) {
|
|
|
|
- data[i].no = no + i + 1
|
|
|
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
|
+ data.list[i].no = no + i + 1
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
}
|
|
}
|
|
this.spinning = false
|
|
this.spinning = false
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
- },
|
|
|
|
- exportLoading: false// 导出loading
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -121,16 +121,16 @@ export default {
|
|
_this.exportLoading = false
|
|
_this.exportLoading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- subareaChange(val){
|
|
|
|
- this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
|
|
- this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
|
|
|
|
|
|
+ subareaChange (val) {
|
|
|
|
+ this.queryParam.subareaSn = val[0] ? val[0] : undefined
|
|
|
|
+ this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
- this.queryParam.subareaArea.subareaSn = undefined
|
|
|
|
- this.queryParam.subareaArea.subareaAreaSn = undefined
|
|
|
|
- this.queryParam.dealerName = ''
|
|
|
|
- this.queryParam.customerName = ''
|
|
|
|
|
|
+ this.queryParam.subareaSn = undefined
|
|
|
|
+ this.queryParam.subareaAreaSn = undefined
|
|
|
|
+ this.queryParam.dealerDTO.dealerName = ''
|
|
|
|
+ this.queryParam.bizUserName = ''
|
|
this.$refs.subarea.clearData()
|
|
this.$refs.subarea.clearData()
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
@@ -139,6 +139,7 @@ export default {
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
_this.setTableH()
|
|
_this.setTableH()
|
|
})
|
|
})
|
|
|
|
+ this.$refs.table.refresh()
|
|
},
|
|
},
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
@@ -153,19 +154,12 @@ export default {
|
|
mounted () {
|
|
mounted () {
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
this.pageInit()
|
|
this.pageInit()
|
|
- this.resetSearchForm()
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
activated () {
|
|
activated () {
|
|
// 如果是新页签打开,则重置当前页面
|
|
// 如果是新页签打开,则重置当前页面
|
|
if (this.$store.state.app.isNewTab) {
|
|
if (this.$store.state.app.isNewTab) {
|
|
this.pageInit()
|
|
this.pageInit()
|
|
- this.resetSearchForm()
|
|
|
|
- }
|
|
|
|
- // 仅刷新列表,不重置页面
|
|
|
|
- if (this.$store.state.app.updateList) {
|
|
|
|
- this.pageInit()
|
|
|
|
- this.$refs.table.refresh()
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|