|
@@ -6,17 +6,17 @@
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="8" :sm="24">
|
|
|
<a-form-item label="经销商名称/别名">
|
|
|
- <a-input id="chooseDealer-nameLike" v-model.trim="queryParam.dealer.nameLike" allowClear placeholder="请输入经销商名称/别名"/>
|
|
|
+ <a-input id="chooseDealer-nameLike" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入经销商名称/别名"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="8" :sm="24">
|
|
|
<a-form-item label="商户类型">
|
|
|
- <v-select code="DEALER_TYPE" id="chooseDealer-dealerType" v-model="queryParam.dealer.dealerType" allowClear placeholder="请选择商户类型"></v-select>
|
|
|
+ <v-select code="DEALER_TYPE" id="chooseDealer-dealerType" v-model="queryParam.dealerType" allowClear placeholder="请选择商户类型"></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="8" :sm="24">
|
|
|
<a-form-model-item label="商户级别" prop="dealerLevel">
|
|
|
- <v-select code="DEALER_LEVEL" id="ucModal-dealerLevel" v-model="queryParam.dealer.dealerLevel" allowClear placeholder="请选择商户级别"></v-select>
|
|
|
+ <v-select code="DEALER_LEVEL" id="ucModal-dealerLevel" v-model="queryParam.dealerLevel" allowClear placeholder="请选择商户级别"></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="8" :sm="24" v-if="pageType!='viewDealers'">
|
|
@@ -86,7 +86,7 @@
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import AreaList from '@/views/common/areaList.js'
|
|
|
-import { bizuserScopeQueryDealer } from '@/api/bizuser'
|
|
|
+import { dealerQueryList } from '@/api/dealer'
|
|
|
import subarea from '@/views/common/subarea.js'
|
|
|
export default {
|
|
|
name: 'ChooseDealer',
|
|
@@ -108,17 +108,17 @@ export default {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
queryParam: { // 查询条件
|
|
|
- dealer: {
|
|
|
- nameLike: '',
|
|
|
- dealerType: null,
|
|
|
- dealerLevel: null
|
|
|
+ nameLike: '',
|
|
|
+ dealerType: null,
|
|
|
+ dealerLevel: null,
|
|
|
+ subareaArea: {
|
|
|
+ subareaSn: undefined, // 区域
|
|
|
+ subareaAreaSn: undefined // 分区
|
|
|
},
|
|
|
auditState: undefined,
|
|
|
provinceSn: undefined,
|
|
|
citySn: undefined,
|
|
|
- districtSn: undefined,
|
|
|
- subareaSn: undefined,
|
|
|
- subareaAreaSn: undefined
|
|
|
+ districtSn: undefined
|
|
|
},
|
|
|
pageFlag: false,
|
|
|
chooseInfo: [],
|
|
@@ -128,7 +128,7 @@ export default {
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.spinning = true
|
|
|
- return bizuserScopeQueryDealer(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return dealerQueryList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
const _this = this
|
|
|
if (res.status == 200) {
|
|
@@ -137,15 +137,15 @@ export default {
|
|
|
const chooseData = []
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
- data.list[i].dealerSn = data.list[i].dealer.dealerSn
|
|
|
if (!_this.pageType && _this.chooseInfo && _this.chooseInfo.length > 0) {
|
|
|
// 回显选中数据
|
|
|
- const flag = _this.chooseInfo.includes(data.list[i].dealer.dealerSn)
|
|
|
+ const flag = _this.chooseInfo.includes(data.list[i].dealerSn)
|
|
|
if (flag) {
|
|
|
chooseData.push(data.list[i])
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ console.log('22222222222222222222222222222222222:', chooseData)
|
|
|
if (!this.pageFlag) {
|
|
|
this.pageFlag = true
|
|
|
_this.$refs.table.setTableSelected(_this.chooseInfo, chooseData) // 设置表格选中项
|
|
@@ -162,18 +162,18 @@ export default {
|
|
|
columns () {
|
|
|
const _this = this
|
|
|
const arr = [
|
|
|
- { title: '经销商名称', dataIndex: 'dealer.dealerName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '商户别名', dataIndex: 'dealer.dealerAlias', align: 'left', width: '30%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '商户类型', dataIndex: 'dealer.dealerTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '商户级别', dataIndex: 'dealer.dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '经销商名称', dataIndex: 'dealerName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '商户别名', dataIndex: 'dealerAlias', align: 'left', width: '30%', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
]
|
|
|
if (_this.pageType == 'viewDealers') {
|
|
|
arr.splice(4, 0, { title: '审核状态', dataIndex: 'auditStateDictValue', width: '20%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
arr.splice(5, 0, { title: '当前所属区域', scopedSlots: { customRender: 'areas' }, width: '30%', align: 'center' })
|
|
|
arr.splice(6, 0, { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' })
|
|
|
} else {
|
|
|
- arr.splice(4, 0, { title: '所在区域', dataIndex: 'subareaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
- arr.splice(5, 0, { title: '所在分区', dataIndex: 'subareaAreaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
+ arr.splice(4, 0, { title: '所在区域', dataIndex: 'subareaArea.subareaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
+ arr.splice(5, 0, { title: '所在分区', dataIndex: 'subareaArea.subareaAreaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
}
|
|
|
return arr
|
|
|
},
|
|
@@ -184,6 +184,7 @@ export default {
|
|
|
methods: {
|
|
|
// 表格选中项
|
|
|
rowSelectionFun (obj) {
|
|
|
+ console.log('111111111111111111111111111:', obj)
|
|
|
this.rowSelectionInfo = obj || null
|
|
|
},
|
|
|
areaChange (val) {
|
|
@@ -196,23 +197,23 @@ export default {
|
|
|
this.spinning = false
|
|
|
},
|
|
|
subareaChange (val) {
|
|
|
- this.queryParam.subareaSn = val[0] ? val[0] : undefined
|
|
|
- this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
|
|
|
+ this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
|
|
|
+ this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.queryParam = {
|
|
|
- dealer: {
|
|
|
- nameLike: '',
|
|
|
- dealerType: null,
|
|
|
- dealerLevel: null
|
|
|
+ nameLike: '',
|
|
|
+ dealerType: null,
|
|
|
+ dealerLevel: null,
|
|
|
+ subareaArea: {
|
|
|
+ subareaSn: undefined, // 区域
|
|
|
+ subareaAreaSn: undefined // 分区
|
|
|
},
|
|
|
auditState: undefined,
|
|
|
provinceSn: undefined,
|
|
|
citySn: undefined,
|
|
|
- districtSn: undefined,
|
|
|
- subareaSn: undefined,
|
|
|
- subareaAreaSn: undefined
|
|
|
+ districtSn: undefined
|
|
|
}
|
|
|
if (this.pageType != 'viewDealers') {
|
|
|
this.$refs.subarea.clearData()
|
|
@@ -237,7 +238,7 @@ export default {
|
|
|
const dealerSnList = _this.rowSelectionInfo.selectedRows
|
|
|
const newDealerSnList = dealerSnList.map(con => {
|
|
|
const obj = {
|
|
|
- buyerName: con.dealer.dealerName,
|
|
|
+ buyerName: con.dealerName,
|
|
|
buyerSn: con.dealerSn
|
|
|
}
|
|
|
return obj
|