|
|
@@ -31,10 +31,9 @@
|
|
|
<tree
|
|
|
@getList="chooseUser"
|
|
|
:type="radio"
|
|
|
-
|
|
|
:managementSource="2"
|
|
|
ref="treeManage"
|
|
|
- :list="radio=='a' ?treeData :userTreeData"
|
|
|
+ :list="radio == 'a' ? treeData : userTreeData"
|
|
|
></tree>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -175,6 +174,14 @@
|
|
|
allowClear
|
|
|
></a-input>
|
|
|
</a-form-item>
|
|
|
+ <a-form-item label="领导人" :colon="false">
|
|
|
+ <a-input
|
|
|
+ placeholder="请输入领导人"
|
|
|
+ v-model="formState.leaderName"
|
|
|
+ style="width: 200px"
|
|
|
+ allowClear
|
|
|
+ ></a-input>
|
|
|
+ </a-form-item>
|
|
|
<a-form-item
|
|
|
style="
|
|
|
flex: 1;
|
|
|
@@ -186,7 +193,12 @@
|
|
|
"
|
|
|
>
|
|
|
<a-button type="primary" @click="getList">查询</a-button>
|
|
|
- <a-button type="primary" style="margin-left: 10px;" @click="exportList">导出</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ @click="exportList"
|
|
|
+ >导出</a-button
|
|
|
+ >
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
|
|
|
@@ -198,7 +210,7 @@
|
|
|
@clear="onClear"
|
|
|
@change="onChange"
|
|
|
:loading="loading"
|
|
|
- :scroll="{ x: 'calc(1500px + 50%)', y: 700 }"
|
|
|
+ :scroll="{ x: 'calc(1500px + 50%)', y: 700 }"
|
|
|
>
|
|
|
<div slot="operation" slot-scope="{ text, record }">
|
|
|
<a-button type="link" @click="watchMessage({ text, record })"
|
|
|
@@ -213,8 +225,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
- <script>
|
|
|
+
|
|
|
+<script>
|
|
|
import StandardTable from "@/components/table/StandardTable";
|
|
|
// import mixin from "../../minins/mixin";
|
|
|
import tree from "@/components/tree/agentChanell";
|
|
|
@@ -290,6 +302,7 @@ export default {
|
|
|
userName: "",
|
|
|
userId: "",
|
|
|
treeUserId: "",
|
|
|
+ leaderName: "",
|
|
|
},
|
|
|
backLinePersonnel: {},
|
|
|
columns: columns,
|
|
|
@@ -311,19 +324,18 @@ export default {
|
|
|
cityList: [],
|
|
|
areaList: [],
|
|
|
storeList: [],
|
|
|
-
|
|
|
+
|
|
|
amount: {},
|
|
|
radio: "a",
|
|
|
treeType: 1,
|
|
|
userId: "",
|
|
|
agencyId: "",
|
|
|
- treeUserId:"",
|
|
|
- dateType:"",
|
|
|
- timeType:"",
|
|
|
- userTreeData:[],
|
|
|
- treeData:[],
|
|
|
+ treeUserId: "",
|
|
|
+ dateType: "",
|
|
|
+ timeType: "",
|
|
|
+ userTreeData: [],
|
|
|
+ treeData: [],
|
|
|
process: process.env.VUE_APP_API_BASE_URL,
|
|
|
-
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
|
@@ -334,15 +346,19 @@ export default {
|
|
|
// this.$refs.treeManage.getUserTree();
|
|
|
},
|
|
|
methods: {
|
|
|
- exportList(){
|
|
|
- this.$API.business.businessAgentExcel({
|
|
|
- ...this.formState,
|
|
|
+ exportList() {
|
|
|
+ this.$API.business
|
|
|
+ .businessAgentExcel({
|
|
|
+ ...this.formState,
|
|
|
managementSource: 2,
|
|
|
treeType: this.treeType,
|
|
|
- timeType:this.timeType,
|
|
|
- treeUserId:this.treeUserId?this.treeUserId:this.formState.treeUserId
|
|
|
- }).then(res=>{
|
|
|
- if (res.data.code == 200) {
|
|
|
+ timeType: this.timeType,
|
|
|
+ treeUserId: this.treeUserId
|
|
|
+ ? this.treeUserId
|
|
|
+ : this.formState.treeUserId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
let url = this.process + res.data.data; // 3.创建一个临时的url指向blob对象
|
|
|
let a = document.createElement("a");
|
|
|
a.href = url;
|
|
|
@@ -352,15 +368,14 @@ export default {
|
|
|
} else {
|
|
|
this.$message.error(res.msg);
|
|
|
}
|
|
|
- })
|
|
|
-
|
|
|
+ });
|
|
|
},
|
|
|
timeChange(val) {
|
|
|
console.log(val);
|
|
|
- this.dateType=val.dateType
|
|
|
- this.timeType=val.timeType
|
|
|
+ this.dateType = val.dateType;
|
|
|
+ this.timeType = val.timeType;
|
|
|
this.formState = { ...val };
|
|
|
- this.formState.treeUserId = this.treeUserId;
|
|
|
+ this.formState.treeUserId = this.treeUserId;
|
|
|
|
|
|
this.getUserTree();
|
|
|
},
|
|
|
@@ -374,28 +389,40 @@ export default {
|
|
|
if (res.data.code === 200) {
|
|
|
if (this.radio == "a") {
|
|
|
this.treeType = 1;
|
|
|
- this.formState.treeUserId = res.data.data.deptList!=null
|
|
|
- ? res.data.data.deptList.length>0 ?res.data.data.deptList[0].id
|
|
|
- : "" :''
|
|
|
+ this.formState.treeUserId =
|
|
|
+ res.data.data.deptList != null
|
|
|
+ ? res.data.data.deptList.length > 0
|
|
|
+ ? res.data.data.deptList[0].id
|
|
|
+ : ""
|
|
|
+ : "";
|
|
|
} else {
|
|
|
this.treeType = 2;
|
|
|
- this.formState.treeUserId = res.data.data.userList!=null
|
|
|
- ? res.data.data.userList.length>0 ?res.data.data.userList[0].id
|
|
|
- : "" :''
|
|
|
+ this.formState.treeUserId =
|
|
|
+ res.data.data.userList != null
|
|
|
+ ? res.data.data.userList.length > 0
|
|
|
+ ? res.data.data.userList[0].id
|
|
|
+ : ""
|
|
|
+ : "";
|
|
|
}
|
|
|
- this.agencyId = res.data.data.deptList!=null
|
|
|
- ? res.data.data.deptList.length>0 ?res.data.data.deptList[0].id
|
|
|
- : "" :'';
|
|
|
- this.userId = res.data.data.userList!=null
|
|
|
- ? res.data.data.userList.length>0 ?res.data.data.userList[0].id
|
|
|
- : "" :'';
|
|
|
+ this.agencyId =
|
|
|
+ res.data.data.deptList != null
|
|
|
+ ? res.data.data.deptList.length > 0
|
|
|
+ ? res.data.data.deptList[0].id
|
|
|
+ : ""
|
|
|
+ : "";
|
|
|
+ this.userId =
|
|
|
+ res.data.data.userList != null
|
|
|
+ ? res.data.data.userList.length > 0
|
|
|
+ ? res.data.data.userList[0].id
|
|
|
+ : ""
|
|
|
+ : "";
|
|
|
this.userTreeData = res.data.data.userList;
|
|
|
this.treeData = res.data.data.deptList;
|
|
|
this.getList();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
treeChange() {
|
|
|
if (this.radio == "a") {
|
|
|
this.treeType = 1;
|
|
|
@@ -408,7 +435,7 @@ export default {
|
|
|
},
|
|
|
chooseUser(val) {
|
|
|
this.formState.treeUserId = val.id;
|
|
|
- this.treeUserId=val.id
|
|
|
+ this.treeUserId = val.id;
|
|
|
|
|
|
if (val.type == "a") {
|
|
|
this.treeType = 1;
|
|
|
@@ -431,24 +458,23 @@ export default {
|
|
|
this.getVerification();
|
|
|
},
|
|
|
watchMessage(item) {
|
|
|
-
|
|
|
this.$router.push({
|
|
|
path: "/business/agent/message",
|
|
|
query: {
|
|
|
- user:JSON.stringify( {
|
|
|
+ user: JSON.stringify({
|
|
|
...item,
|
|
|
treeType: this.treeType,
|
|
|
treeUserId: this.formState.treeUserId,
|
|
|
}),
|
|
|
- dateType:this.dateType,
|
|
|
- timeType:this.timeType,
|
|
|
- time:JSON.stringify( {
|
|
|
+ dateType: this.dateType,
|
|
|
+ timeType: this.timeType,
|
|
|
+ time: JSON.stringify({
|
|
|
signingTimeEnd: this.formState.signingTimeEnd,
|
|
|
signingTimeStart: this.formState.signingTimeStart,
|
|
|
enterTimeEnd: this.formState.enterTimeEnd,
|
|
|
enterTimeStart: this.formState.enterTimeStart,
|
|
|
}),
|
|
|
- isEnter:this.formState.signingTimeEnd ? false : true
|
|
|
+ isEnter: this.formState.signingTimeEnd ? false : true,
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
@@ -463,18 +489,18 @@ export default {
|
|
|
...this.formState,
|
|
|
managementSource: 2,
|
|
|
treeType: this.treeType,
|
|
|
- timeType:this.timeType,
|
|
|
- treeUserId:this.treeUserId?this.treeUserId:this.formState.treeUserId
|
|
|
-
|
|
|
-
|
|
|
+ timeType: this.timeType,
|
|
|
+ treeUserId: this.treeUserId
|
|
|
+ ? this.treeUserId
|
|
|
+ : this.formState.treeUserId,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
this.loading = false;
|
|
|
this.tableList = res.data.data.records;
|
|
|
- this.pagination.current=res.data.data.current
|
|
|
-
|
|
|
- this.pagination.total=res.data.data.total
|
|
|
+ this.pagination.current = res.data.data.current;
|
|
|
+
|
|
|
+ this.pagination.total = res.data.data.total;
|
|
|
}
|
|
|
});
|
|
|
this.$API.business
|
|
|
@@ -482,10 +508,10 @@ export default {
|
|
|
...this.formState,
|
|
|
managementSource: 2,
|
|
|
treeType: this.treeType,
|
|
|
- timeType:this.timeType,
|
|
|
- treeUserId:this.treeUserId?this.treeUserId:this.formState.treeUserId
|
|
|
-
|
|
|
-
|
|
|
+ timeType: this.timeType,
|
|
|
+ treeUserId: this.treeUserId
|
|
|
+ ? this.treeUserId
|
|
|
+ : this.formState.treeUserId,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
@@ -510,7 +536,7 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
- <style lang='less' scoped>
|
|
|
+<style lang="less" scoped>
|
|
|
.quote {
|
|
|
display: flex;
|
|
|
> div:first-child {
|
|
|
@@ -679,4 +705,4 @@ export default {
|
|
|
.ant-form-item {
|
|
|
display: flex;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|