Browse Source

init

newStyle
lancer 2 years ago
parent
commit
f8552d0997
3 changed files with 1133 additions and 875 deletions
  1. +901
    -714
      src/views/Customer/AgentManagement.vue
  2. +102
    -79
      src/views/Customer/CompanyRecord.vue
  3. +130
    -82
      src/views/building/index.vue

+ 901
- 714
src/views/Customer/AgentManagement.vue
File diff suppressed because it is too large
View File


+ 102
- 79
src/views/Customer/CompanyRecord.vue View File

@@ -3,9 +3,9 @@
<!-- 头 -->
<div class="app-top">
<div class="app-titel" style="margin-top: 5px">
<div class="label">代理商名称:</div>
<div class="label">代理商名称:</div>
<div>
<el-input v-model="operatorName"></el-input>
<el-input v-model="operatorName"></el-input>
</div>
<div class="label">公司名称:</div>
<div>
@@ -19,8 +19,8 @@
v-model="operationStaffName"
></el-input>
</div> -->
<div class="label">运营人员:</div>
<div >
<div class="label">运营人员:</div>
<div>
<!-- <el-input maxlength="10" class="div-inp" clearable v-model="operationalName"></el-input> -->
<el-select
v-model="operationStaffId"
@@ -56,17 +56,17 @@
>
</el-option>
</el-select> -->
<el-cascader
:props="props1"
@change="locationsChange1"
:options="addressOptions"
placeholder="省/市"
size="small"
separator="/"
v-model="area"
filterable
clearable
></el-cascader>
<el-cascader
:props="props1"
@change="locationsChange1"
:options="addressOptions"
placeholder="省/市"
size="small"
separator="/"
v-model="area"
filterable
clearable
></el-cascader>
</div>

<div class="app-titel" style="margin-top: 15px">
@@ -96,12 +96,8 @@
align="center"
>
</el-table-column>
<el-table-column
prop="operatorName"
label="代理商"
align="center"
>
</el-table-column>
<el-table-column prop="operatorName" label="代理商" align="center">
</el-table-column>
<el-table-column
:show-overflow-tooltip="true"
width="120px"
@@ -118,7 +114,9 @@
label="公司地区"
align="center"
>
<template slot-scope="scope"> {{scope.row.provinceName}}{{scope.row.cityName}} </template>
<template slot-scope="scope">
{{ scope.row.provinceName }}{{ scope.row.cityName }}
</template>
</el-table-column>
<el-table-column label="联系人信息" align="center">
<template slot-scope="scope">
@@ -296,7 +294,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" :loading="loadingFlag" @click="add()">保存</el-button>
<el-button type="primary" :loading="loadingFlag" @click="add()"
>保存</el-button
>
</div>
</el-dialog>

@@ -382,7 +382,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible2 = false">取 消</el-button>
<el-button type="primary" :loading="loadingFlag" @click="editor()">保存</el-button>
<el-button type="primary" :loading="loadingFlag" @click="editor()"
>保存</el-button
>
</div>
</el-dialog>

@@ -415,7 +417,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible3 = false">取 消</el-button>
<el-button type="primary" :loading="loadingFlag" @click="replace()">保存</el-button>
<el-button type="primary" :loading="loadingFlag" @click="replace()"
>保存</el-button
>
</div>
</el-dialog>

@@ -449,7 +453,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="operaVisible = false">取 消</el-button>
<el-button type="primary" :loading="loadingFlag" @click="saveOpera()">保存</el-button>
<el-button type="primary" :loading="loadingFlag" @click="saveOpera()"
>保存</el-button
>
</div>
</el-dialog>

@@ -481,7 +487,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="agentVisible = false">取 消</el-button>
<el-button type="primary" :loading="loadingFlag" @click="saveAgent()">保存</el-button>
<el-button type="primary" :loading="loadingFlag" @click="saveAgent()"
>保存</el-button
>
</div>
</el-dialog>
</div>
@@ -599,7 +607,7 @@ export default {
props1: {
lazy: true,
checkStrictly: true,
expandTrigger:'hover',
expandTrigger: "hover",
async lazyLoad(node, resolve) {
// console.log(node, 123);
const { level } = node;
@@ -624,12 +632,12 @@ export default {
};
});
resolve(nodes);
}else{
resolve()
} else {
resolve();
}
},
},
area:[],
area: [],
addagentobj: {
agentId: "", // 代理商名称
name: "", // 公司名称
@@ -699,7 +707,7 @@ export default {
agentVisible: false,
resetFlag: false,
passFlag: false,
loadingFlag:false,
loadingFlag: false,
operatorName: "", //代理商名称
operationStaffName: "", //运营人员名称
name: "", //公司名称
@@ -708,8 +716,8 @@ export default {
pageSize: 10,
provinceId: "",
areaList: [],
operaList:[],
operationStaffId:'',
operaList: [],
operationStaffId: "",
orgType: "",
sysFlag: "0",
replaceagentobj: {
@@ -807,17 +815,16 @@ export default {
this.orgType = localStorage.getItem("orgType");
// 获取地区列表
// this.getCityList();
this.getOperaList()
this.getOperaList();
this.getcompanyList();
},
methods: {
getOperaList(){
this.$api.http.getAllOperationsStaff().then((res) => {
this.operaList = res.data;
// this.operaVisible = true;
// console.log(2);
});

getOperaList() {
this.$api.http.getAllOperationsStaff().then((res) => {
this.operaList = res.data;
// this.operaVisible = true;
// console.log(2);
});
},
getCityList() {
this.$api.api.getAreaList({ parentId: 0 }).then((res) => {
@@ -835,7 +842,7 @@ export default {
saveAgent() {
this.$refs.agentForm.validate((valid) => {
if (valid) {
this.loadingFlag=true
this.loadingFlag = true;
console.log(this.agentForm);
this.$api.api
.bindAgent({
@@ -844,12 +851,15 @@ export default {
})
.then((res) => {
setTimeout(() => {
this.loadingFlag=false
console.log('防重')
}, 1);
this.loadingFlag = false;
console.log("防重");
}, 1);
this.$message.success("操作成功");
this.agentVisible = false;
this.Screeningofempty();
})
.catch((err) => {
this.loadingFlag = false;
});
}
});
@@ -858,7 +868,7 @@ export default {
this.$refs.operaForm.validate((valid) => {
if (valid) {
// console.log(valid,this.operaForm);
this.loadingFlag=true
this.loadingFlag = true;
this.$api.api
.zkoperationrecordSaveCompany({
orgType: 2,
@@ -869,12 +879,15 @@ export default {
.then((res) => {
console.log(res);
setTimeout(() => {
this.loadingFlag=false
console.log('防重')
}, 1);
this.loadingFlag = false;
console.log("防重");
}, 1);
this.$message.success("操作成功");
this.operaVisible = false;
this.Screeningofempty();
})
.catch((err) => {
this.loadingFlag = false;
});
}
});
@@ -1059,20 +1072,25 @@ export default {
}
this.$refs.replaceagentobj.validate((valid) => {
if (valid) {
this.loadingFlag=true
this.$api.http.changeAccount(this.replaceagentobj).then((res) => {
if (res.code == 0) {
setTimeout(() => {
this.loadingFlag=false
console.log('防重')
this.loadingFlag = true;
this.$api.http
.changeAccount(this.replaceagentobj)
.then((res) => {
if (res.code == 0) {
setTimeout(() => {
this.loadingFlag = false;
console.log("防重");
}, 1);
this.dialogVisible3 = false;
this.$refs.replaceagentobj.resetFields();
this.Screeningofempty();
} else {
this.$message.error(res.message);
}
});
this.dialogVisible3 = false;
this.$refs.replaceagentobj.resetFields();
this.Screeningofempty();
} else {
this.$message.error(res.message);
}
})
.catch((err) => {
this.loadingFlag = false;
});
} else {
return false;
}
@@ -1209,21 +1227,26 @@ export default {
if (!this.resetFlag) {
return;
}
this.loadingFlag=true
this.loadingFlag = true;
this.addagentobj.pid = 0;
this.$api.http.AddaddOrg(this.addagentobj).then((res) => {
if (res.code == 0) {
setTimeout(() => {
this.loadingFlag=false
console.log('防重')
this.$api.http
.AddaddOrg(this.addagentobj)
.then((res) => {
if (res.code == 0) {
setTimeout(() => {
this.loadingFlag = false;
console.log("防重");
}, 1);
this.dialogVisible = false;
this.$refs.addagentobj.resetFields();
this.Screeningofempty();
} else {
this.$message.error(res.message);
}
});
this.dialogVisible = false;
this.$refs.addagentobj.resetFields();
this.Screeningofempty();
} else {
this.$message.error(res.message);
}
})
.catch((err) => {
this.loadingFlag = false;
});
} else {
return false;
}
@@ -1237,9 +1260,9 @@ export default {
this.name = "";
this.pageNum = 1;
this.provinceId = "";
this.cityId = "";
this.operationStaffId = "";
this.area=[]
this.cityId = "";
this.operationStaffId = "";
this.area = [];
this.getcompanyList();
},
//筛选


+ 130
- 82
src/views/building/index.vue View File

@@ -127,7 +127,7 @@
>
</el-option>
</el-select> -->
<el-cascader
<el-cascader
:props="props1"
@change="locationsChange1"
:options="addressOptions"
@@ -139,7 +139,7 @@
clearable
></el-cascader>
</div>
<div v-if="orgType == 0||orgType == 1" class="div-lab">
<div v-if="orgType == 0 || orgType == 1" class="div-lab">
<div class="label">运营人员:</div>
<!-- <el-input
v-model="searchForm.operationalPeople"
@@ -148,7 +148,7 @@
class="div-inp"
placeholder="请输入内容"
></el-input> -->
<el-select
<el-select
v-model="searchForm.operationStaffId"
placeholder="请选择"
class="div-inp"
@@ -260,7 +260,9 @@
align="center"
:key="Math.random()"
>
<template slot-scope="scope"> {{scope.row.provinceName}}{{scope.row.cityName}} </template>
<template slot-scope="scope">
{{ scope.row.provinceName }}{{ scope.row.cityName }}
</template>
</el-table-column>

<el-table-column
@@ -275,18 +277,29 @@
</template>
</el-table-column>


<el-table-column :key="Math.random()" width="100" prop="managerPhone" label="管理员账号" align="center">
<el-table-column
:key="Math.random()"
width="100"
prop="managerPhone"
label="管理员账号"
align="center"
>
<template slot-scope="{ row }">
{{ row.managerPhone || "-" }}
</template>
</el-table-column>

<el-table-column :key="Math.random()" prop='operationStaffName' v-if="orgType==0||orgType==1" label="运营人员" align="center">
<el-table-column
:key="Math.random()"
prop="operationStaffName"
v-if="orgType == 0 || orgType == 1"
label="运营人员"
align="center"
>
</el-table-column>

<el-table-column
:key="Math.random()"
:key="Math.random()"
prop="houseType"
label="楼盘类型"
align="center"
@@ -313,7 +326,12 @@
>
</el-table-column>

<el-table-column prop="endWorking" width="100" label="合同结束日期" align="center">
<el-table-column
prop="endWorking"
width="100"
label="合同结束日期"
align="center"
>
</el-table-column>

<el-table-column label="添加日期" width="100" align="center">
@@ -571,7 +589,9 @@
</el-form>
<div style="display: flex; justify-content: space-around">
<el-button @click="changeFlag = false">取 消</el-button>
<el-button type="primary" @click="changeSure" :loading="loadingFlag">确 定</el-button>
<el-button type="primary" @click="changeSure" :loading="loadingFlag"
>确 定</el-button
>
</div>
</el-dialog>

@@ -606,7 +626,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="operaVisible = false">取 消</el-button>
<el-button type="primary" :loading="loadingFlag" @click="saveOpera()">保存</el-button>
<el-button type="primary" :loading="loadingFlag" @click="saveOpera()"
>保存</el-button
>
</div>
</el-dialog>

@@ -638,7 +660,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="agentVisible = false">取 消</el-button>
<el-button type="primary" :loading="loadingFlag" @click="saveAgent()">保存</el-button>
<el-button type="primary" :loading="loadingFlag" @click="saveAgent()"
>保存</el-button
>
</div>
</el-dialog>
</div>
@@ -756,10 +780,10 @@ export default {
}
},
},
props1: {
props1: {
lazy: true,
checkStrictly: true,
expandTrigger:'hover',
expandTrigger: "hover",
async lazyLoad(node, resolve) {
// console.log(node, 123);
const { level } = node;
@@ -784,12 +808,12 @@ export default {
};
});
resolve(nodes);
}else{
resolve()
} else {
resolve();
}
},
},
area:[],
area: [],
editFlag: false,
changeFlag: false,
operaVisible: false,
@@ -802,16 +826,16 @@ export default {
provinceId: "",
serviceStatus: "",
houseType: "",
timeType:'0',
timeType: "0",
// residueTime: 7,
startWorking: "",
endWorking: "",
agentName: "",
operationalPeople: "",
operationStaffId:'',
operationStaffId: "",
},
areaList: [],
operaList:[],
operaList: [],
options1: [
{
value: "0",
@@ -865,7 +889,7 @@ export default {
dialogVisible: false,
dialogVisible1: false,
agentVisible: false,
loadingFlag:false,
loadingFlag: false,
time: [],
addressOptions: [],
accountForm: {
@@ -969,10 +993,10 @@ export default {
this.searchForm.endWorking = this.starTime[1];
this.searchForm.serviceStatus = this.$route.query.serviceStatus;
this.searchForm.houseType = "0";
this.searchForm.timeType='1'
this.searchForm.timeType = "1";
}
if(this.$route.query.time){
this.starTime=[this.$route.query.time,this.$route.query.time]
if (this.$route.query.time) {
this.starTime = [this.$route.query.time, this.$route.query.time];
this.searchForm.startWorking = this.starTime[0];
this.searchForm.endWorking = this.starTime[1];
}
@@ -980,7 +1004,7 @@ export default {
// 获取公司列表数据
this.getOrgList();
// 获取运营人员
this.getOperaList()
this.getOperaList();
// this.getAllOperationsStaff();
// 获取地区列表
// this.getCityList();
@@ -988,11 +1012,11 @@ export default {
this.zkhousePage();
},
methods: {
getOperaList(){
getOperaList() {
if (this.orgType == 1) {
this.$api.http
.getAllOperationsStaffByAgent({
agentId: localStorage.getItem('agentId'),
agentId: localStorage.getItem("agentId"),
})
.then((res) => {
// console.log(1);
@@ -1021,7 +1045,7 @@ export default {
saveAgent() {
this.$refs.agentForm.validate((valid) => {
if (valid) {
this.loadingFlag=true
this.loadingFlag = true;
console.log(this.agentForm);
this.$api.api
.saveAgent({
@@ -1029,13 +1053,16 @@ export default {
id: this.agentForm.houseId,
})
.then((res) => {
setTimeout(() => {
this.loadingFlag=false
console.log('防重')
}, 1);
setTimeout(() => {
this.loadingFlag = false;
console.log("防重");
}, 1);
this.$message.success("操作成功");
this.zkhousePage();
this.agentVisible = false;
})
.catch((err) => {
this.loadingFlag = false;
});
}
});
@@ -1053,7 +1080,7 @@ export default {
this.$refs.operaForm.validate((valid) => {
if (valid) {
// console.log(valid,this.operaForm);
this.loadingFlag=true
this.loadingFlag = true;
this.$api.api
.zkoperationrecordSaveHouse({
orgType: 3,
@@ -1064,13 +1091,16 @@ export default {
})
.then((res) => {
console.log(res);
setTimeout(() => {
this.loadingFlag=false
console.log('防重')
}, 1);
setTimeout(() => {
this.loadingFlag = false;
console.log("防重");
}, 1);
this.$message.success("操作成功");
this.operaVisible = false;
this.zkhousePage();
})
.catch((err) => {
this.loadingFlag = false;
});
}
});
@@ -1146,35 +1176,45 @@ export default {
if (!this.resetFlag) {
return;
}
this.loadingFlag=true
this.loadingFlag = true;
// 编辑
if (this.editFlag) {
this.$api.api.editZkhouse(this.ruleForm).then((res) => {
console.log(res);
if (res.code == 0) {
this.dialogVisible = false;
setTimeout(() => {
this.loadingFlag=false
console.log('防重')
}, 1);
this.$message.success("编辑成功");
this.zkhousePage();
}
});
this.$api.api
.editZkhouse(this.ruleForm)
.then((res) => {
console.log(res);
if (res.code == 0) {
this.dialogVisible = false;
setTimeout(() => {
this.loadingFlag = false;
console.log("防重");
}, 1);
this.$message.success("编辑成功");
this.zkhousePage();
}
})
.catch((err) => {
this.loadingFlag = false;
});
} else {
// 添加
this.$api.api.addZkhouse(this.ruleForm).then((res) => {
console.log(res);
if (res.code == 0) {
this.dialogVisible = false;
setTimeout(() => {
this.loadingFlag=false
console.log('防重')
}, 1);
this.$message.success("新增楼盘成功");
this.zkhousePage();
}
});
this.$api.api
.addZkhouse(this.ruleForm)
.then((res) => {
console.log(res);
if (res.code == 0) {
this.dialogVisible = false;
setTimeout(() => {
this.loadingFlag = false;
console.log("防重");
}, 1);
this.$message.success("新增楼盘成功");
this.zkhousePage();
}
})
.catch((err) => {
this.loadingFlag = false;
});
}
}
});
@@ -1272,21 +1312,25 @@ export default {
this.$message.error("平台用户与楼盘用户不能重复添加!");
return;
}
this.$refs.accountForm.validate((valid) => {
if (valid) {
this.loadingFlag=true
this.$api.api.updateManagerPhone(this.accountForm).then((res) => {
if (res.code == 0) {
this.changeFlag = false;
setTimeout(() => {
this.loadingFlag=false
this.$refs.accountForm
.validate((valid) => {
if (valid) {
this.loadingFlag = true;
this.$api.api.updateManagerPhone(this.accountForm).then((res) => {
if (res.code == 0) {
this.changeFlag = false;
setTimeout(() => {
this.loadingFlag = false;
}, 1);
this.$message.success("编辑成功");
this.zkhousePage();
}
});
}
});
this.$message.success("编辑成功");
this.zkhousePage();
}
});
}
})
.catch((err) => {
this.loadingFlag = false;
});
},
del(row) {
console.log(row, "删除");
@@ -1348,9 +1392,13 @@ export default {
orgType: localStorage.getItem("orgType"),
agentId: localStorage.getItem("agentId"),
orgCode: localStorage.getItem("orgCode"),
operationType:localStorage.getItem("orgType")==0?'1':localStorage.getItem("orgType")==1?'2':'',
operationType:
localStorage.getItem("orgType") == 0
? "1"
: localStorage.getItem("orgType") == 1
? "2"
: "",
...this.searchForm,

};
if (this.orgType == 0) {
obj.residueTime = null;
@@ -1425,15 +1473,15 @@ export default {
serviceStatus: "",
provinceId: "",
houseType: "",
timeType:'0',
timeType: "0",
// residueTime: 7,
startWorking: "",
endWorking: "",
agentName: "",
operationalPeople: "",
operationStaffId:''
operationStaffId: "",
};
this.area=[]
this.area = [];
this.currentPage = 1;
this.zkhousePage();
},
@@ -1465,7 +1513,7 @@ export default {
this.ruleForm.provinceId = e[0];
this.ruleForm.cityId = e[1];
},
locationsChange1(e) {
locationsChange1(e) {
console.log(e);
if (!e) return;
this.searchForm.provinceId = e[0];


Loading…
Cancel
Save