@@ -187,7 +187,7 @@ | |||
<el-input v-model="addagentobj.linkmanPhone" type="tel" maxlength="11" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));"></el-input> | |||
</el-form-item> | |||
<el-form-item label="省:" prop="provinceId"> | |||
<!-- <el-form-item label="省:" prop="provinceId"> | |||
<el-select v-model="addagentobj.provinceId" placeholder="请选择" @change='clickprovinceId()'> | |||
<el-option | |||
v-for="item in optionsparentId" | |||
@@ -208,8 +208,21 @@ | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-form-item> --> | |||
<el-form-item label="楼盘地区" prop="provinceId"> | |||
<el-cascader | |||
:props="props" | |||
@change="locationsChange" | |||
:options="addressOptions" | |||
placeholder="省/市" | |||
size="small" | |||
separator="/" | |||
v-model="addagentobj.area" | |||
clearable | |||
></el-cascader> | |||
</el-form-item> | |||
<el-form-item label="详细地址:" prop="address"> | |||
<el-input v-model="addagentobj.address" type="textarea" maxlength="60" show-word-limit></el-input> | |||
</el-form-item> | |||
@@ -263,7 +276,20 @@ | |||
<el-form-item label="联系手机:" prop="linkmanPhone"> | |||
<el-input v-model="editoragentobj.linkmanPhone" type="tel" maxlength="11" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));"></el-input> | |||
</el-form-item> | |||
<el-form-item label="省:" prop="provinceId"> | |||
<el-form-item label="楼盘地区" prop="provinceId"> | |||
<el-cascader | |||
:props="props" | |||
@change="locationsChange" | |||
:options="addressOptions" | |||
placeholder="省/市" | |||
size="small" | |||
separator="/" | |||
v-model="editoragentobj.area" | |||
clearable | |||
></el-cascader> | |||
</el-form-item> | |||
<!-- <el-form-item label="省:" prop="provinceId"> | |||
<el-select v-model="editoragentobj.provinceId" placeholder="请选择" @change='clickprovinceId3()'> | |||
<el-option | |||
v-for="item in optionsparentId" | |||
@@ -282,7 +308,7 @@ | |||
:value="item.id" > | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-form-item> --> | |||
<el-form-item label="详细地址:" prop="address"> | |||
<el-input v-model="editoragentobj.address" type="textarea" maxlength="60" show-word-limit></el-input> | |||
</el-form-item> | |||
@@ -345,6 +371,7 @@ | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
import { getAreaList } from "@/api/modules/api"; | |||
export default { | |||
data() { | |||
@@ -424,6 +451,35 @@ export default { | |||
} | |||
}; | |||
return { | |||
props: { | |||
lazy: true, | |||
async lazyLoad(node, resolve) { | |||
console.log(node, 123); | |||
const { level } = node; | |||
if (level == 0) { | |||
console.log(23); | |||
const { data } = await getAreaList({ parentId: 0 }); //获取省接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: false, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} else if (level == 1) { | |||
const { data } = await getAreaList({ parentId: node.data.value }); //获取市接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: true, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} | |||
}, | |||
}, | |||
options: [ | |||
{ | |||
value: "0", | |||
@@ -442,6 +498,7 @@ export default { | |||
operaVisible:false, | |||
timelist:'', | |||
tableData: [], | |||
addressOptions: [], | |||
currentPage4:1, | |||
total:0,//总条数 | |||
pageNum:1, | |||
@@ -457,6 +514,7 @@ export default { | |||
contractEndDate:'',// 合同结束时间 | |||
linkman:'',// 联系人 | |||
provinceId:'',// 省id | |||
area:[], | |||
cityId:'',// 市id | |||
address:'',// 详细地址 | |||
// operationalPeople:'',// 运营人员id | |||
@@ -531,7 +589,7 @@ export default { | |||
{ required: false, message: '请输入选择市', trigger: 'blur' }, | |||
], | |||
address: [ | |||
{ required: true, message: '请输入详细地址', trigger: 'blur' }, | |||
{ required: false, message: '请输入详细地址', trigger: 'blur' }, | |||
], | |||
// operationalPeople: [ | |||
// { required: true, message: '请选择运营人员', trigger: 'blur' }, | |||
@@ -641,9 +699,11 @@ export default { | |||
}, | |||
//编辑 | |||
infoeditor(row){ | |||
this.resetFlag=true | |||
this.getparentIdList() | |||
this.clickprovinceId2(row.provinceId) | |||
this.getAllOperationsStaff() | |||
this.editoragentobj.agentName=row.agentName;// 代理商名称 | |||
this.editoragentobj.contractStartDate=row.contractStartDate;// 合同开始时间 | |||
this.editoragentobj.contractEndDate=row.contractEndDate;// 合同结束时间 | |||
@@ -655,6 +715,7 @@ export default { | |||
this.editoragentobj.linkmanPhone=row.linkmanPhone;// 联系人手机号 | |||
this.editoragentobj.rulestimelist=[row.contractStartDate,row.contractEndDate]; | |||
this.editoragentobj.id=row.id; | |||
this.editoragentobj.area = [this.editoragentobj.provinceId, this.editoragentobj.cityId]; | |||
this.dialogVisible2=true; | |||
}, | |||
//获取市 | |||
@@ -677,9 +738,11 @@ export default { | |||
}, | |||
reset1(){ | |||
this.$refs.addagentobj.resetFields(); | |||
this.editoragentobj.area=[] | |||
}, | |||
reset2(){ | |||
this.$refs.editoragentobj.resetFields(); | |||
this.editoragentobj.area=[] | |||
}, | |||
//确认编辑 | |||
editor(){ | |||
@@ -908,6 +971,17 @@ export default { | |||
this.pageSize=val; | |||
this.getAgentList() | |||
}, | |||
locationsChange(e) { | |||
console.log(e); | |||
if (!e) return; | |||
if(this.dialogVisible){ | |||
this.addagentobj.provinceId = e[0]; | |||
this.addagentobj.cityId = e[1]; | |||
}else{ | |||
this.editoragentobj.provinceId = e[0]; | |||
this.editoragentobj.cityId = e[1]; | |||
} | |||
}, | |||
handleCurrentChange(val) { | |||
this.pageNum=val; | |||
this.getAgentList() | |||
@@ -138,7 +138,19 @@ | |||
<el-input v-model="addagentobj.contactNumber" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));" maxlength="11"></el-input> | |||
</el-form-item> | |||
<el-form-item label="省:" prop="provinceId"> | |||
<el-form-item label="楼盘地区" prop="provinceId"> | |||
<el-cascader | |||
:props="props" | |||
@change="locationsChange" | |||
:options="addressOptions" | |||
placeholder="省/市" | |||
size="small" | |||
separator="/" | |||
v-model="editoragentobj.area" | |||
clearable | |||
></el-cascader> | |||
</el-form-item> | |||
<!-- <el-form-item label="省:" prop="provinceId"> | |||
<el-select v-model="addagentobj.provinceId" placeholder="请选择" @change='clickprovinceId()'> | |||
<el-option v-for="item in optionsparentId" :key="item.value" :label="item.name" :value="item.id" > </el-option> | |||
</el-select> | |||
@@ -153,7 +165,7 @@ | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-form-item> --> | |||
<el-form-item label="详细地址:" prop="address"> | |||
<el-input v-model="addagentobj.address" type="textarea" maxlength="60" show-word-limit></el-input> | |||
</el-form-item> | |||
@@ -200,7 +212,20 @@ | |||
<el-form-item label="联系手机:" prop="contactNumber"> | |||
<el-input v-model="editoragentobj.contactNumber" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));" maxlength="11"></el-input> | |||
</el-form-item> | |||
<el-form-item label="省:" prop="provinceId"> | |||
<el-form-item label="楼盘地区" prop="provinceId"> | |||
<el-cascader | |||
:props="props" | |||
@change="locationsChange" | |||
:options="addressOptions" | |||
placeholder="省/市" | |||
size="small" | |||
separator="/" | |||
v-model="editoragentobj.area" | |||
clearable | |||
></el-cascader> | |||
</el-form-item> | |||
<!-- <el-form-item label="省:" prop="provinceId"> | |||
<el-select v-model="editoragentobj.provinceId" placeholder="请选择" @change='clickprovinceId3()'> | |||
<el-option v-for="item in optionsparentId" :key="item.value" :label="item.name" :value="item.id" > </el-option> | |||
</el-select> | |||
@@ -215,7 +240,7 @@ | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-form-item> | |||
</el-form-item> --> | |||
<el-form-item label="详细地址:" prop="address"> | |||
<el-input v-model="editoragentobj.address" type="textarea" maxlength="60" show-word-limit></el-input> | |||
</el-form-item> | |||
@@ -297,6 +322,7 @@ | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
import { getAreaList } from "@/api/modules/api"; | |||
export default { | |||
data() { | |||
var validatePass = (rule, value, callback) => { | |||
@@ -373,6 +399,35 @@ export default { | |||
} | |||
}; | |||
return { | |||
props: { | |||
lazy: true, | |||
async lazyLoad(node, resolve) { | |||
console.log(node, 123); | |||
const { level } = node; | |||
if (level == 0) { | |||
console.log(23); | |||
const { data } = await getAreaList({ parentId: 0 }); //获取省接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: false, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} else if (level == 1) { | |||
const { data } = await getAreaList({ parentId: node.data.value }); //获取市接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: true, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} | |||
}, | |||
}, | |||
addagentobj:{ | |||
agentId:'',// 代理商名称 | |||
name:'',// 公司名称 | |||
@@ -380,6 +435,7 @@ export default { | |||
contactNumber:'',// 联系人手机号 | |||
provinceId:'',// 省id | |||
cityId:'',// 市id | |||
area:[], | |||
address:'',// 详细地址 | |||
operationStaff:'',// 运营人员id | |||
managerPhone:'',// 管理员账号 | |||
@@ -430,6 +486,7 @@ export default { | |||
optionsoperationStaff:[],//运营人员列表 | |||
currentPage4:1, | |||
tableData: [], | |||
addressOptions: [], | |||
dialogVisible:false, | |||
dialogVisible2:false, | |||
dialogVisible3:false, | |||
@@ -469,6 +526,7 @@ export default { | |||
contactNumber:'',// 联系人手机号 | |||
provinceId:'',// 省id | |||
cityId:'',// 市id | |||
area:[], | |||
address:'',// 详细地址 | |||
// operationStaff:'',// 运营人员id | |||
}, | |||
@@ -513,7 +571,7 @@ export default { | |||
{ required: false, message: '请输入选择市', trigger: 'blur' }, | |||
], | |||
address: [ | |||
{ required: true, message: '请输入详细地址', trigger: 'blur' }, | |||
{ required: false, message: '请输入详细地址', trigger: 'blur' }, | |||
{ min: 1, max: 60, message: '最多输入60个汉字', trigger: 'blur' }, | |||
], | |||
// operationStaff: [ | |||
@@ -621,6 +679,7 @@ export default { | |||
//编辑 | |||
infoeditor(row){ | |||
this.editoragentobj.id=row.id; | |||
this.resetFlag=true | |||
this.$api.http.gitfindById({id:row.id}).then((res) => { | |||
this.editoragentobj.operator=res.data.operator; | |||
this.editoragentobj.name=res.data.name; | |||
@@ -630,8 +689,11 @@ export default { | |||
this.editoragentobj.cityId=res.data.cityId; | |||
this.editoragentobj.address=res.data.address; | |||
// this.editoragentobj.operationStaff=res.data.operationStaff; | |||
this.editoragentobj.area = [this.editoragentobj.provinceId, this.editoragentobj.cityId]; | |||
}); | |||
// this.findMyAgent() | |||
console.log(this.editoragentobj.area); | |||
this.getparentIdList() | |||
this.clickprovinceId2(this.editoragentobj.provinceId) | |||
this.dialogVisible2=true; | |||
@@ -717,9 +779,11 @@ export default { | |||
reset1(){ | |||
this.$refs.addagentobj.resetFields(); | |||
this.editoragentobj.area=[] | |||
}, | |||
reset2(){ | |||
this.$refs.editoragentobj.resetFields(); | |||
this.editoragentobj.area=[] | |||
}, | |||
//更换 | |||
inforeplace(row){ | |||
@@ -930,7 +994,17 @@ export default { | |||
this.pageNum=val; | |||
this.getcompanyList() | |||
}, | |||
locationsChange(e) { | |||
console.log(e); | |||
if (!e) return; | |||
if(this.dialogVisible){ | |||
this.addagentobj.provinceId = e[0]; | |||
this.addagentobj.cityId = e[1]; | |||
}else{ | |||
this.editoragentobj.provinceId = e[0]; | |||
this.editoragentobj.cityId = e[1]; | |||
} | |||
}, | |||
}, | |||
}; | |||
</script> | |||
@@ -510,7 +510,8 @@ export default { | |||
// this.page.openTime = this.customtime[0]; | |||
// this.page.closeTime = this.customtime[1]; | |||
this.Confirmthecontrast = false; | |||
// this.trendtrendAnalysis() | |||
// this.trendtrendAnalysis() | |||
this.houseTrends(); | |||
}, | |||
selChange() { | |||
this.choicValue = ""; | |||
@@ -319,7 +319,7 @@ | |||
</el-table-column> | |||
<el-table-column prop="createTime" label="添加时间"> </el-table-column> | |||
<el-table-column prop="address" label="操作" fixed="right" width="150"> | |||
<template slot-scope="scope"> | |||
<template slot-scope="scope" v-if="scope.row.userRoleType!=11||scope.row.userRoleType!=12||scope.row.userRoleType!=13"> | |||
<el-button | |||
@click="editTwo(scope.row)" | |||
v-if="sys_user_edit1" | |||
@@ -1011,6 +1011,7 @@ export default { | |||
}, | |||
edit(row) { | |||
console.log(row); | |||
this.resetFlag=true | |||
this.time = [ | |||
row.startWorking.substring(0, 10), | |||
row.endWorking.substring(0, 10), | |||