diff --git a/src/api/ebiz/billingDetail/billingDetail.js b/src/api/ebiz/billingDetail/billingDetail.js index 95c847517..667435e18 100644 --- a/src/api/ebiz/billingDetail/billingDetail.js +++ b/src/api/ebiz/billingDetail/billingDetail.js @@ -9,10 +9,10 @@ export function queryOutOrderList(data) { data }) } -//日期查询 - export function getDayDetail(data) { +//获取当前人机构 + export function getBranchByUser(data) { return request({ - url: getUrl(`/agent/Performance/getDayDetail`, 1), + url: getUrl(`/data/branch/getBranchByUser`, 1), method: 'post', data }) diff --git a/src/components/ebiz/billingDetail/tableDetail.vue b/src/components/ebiz/billingDetail/tableDetail.vue index be97e206c..861cb1a50 100644 --- a/src/components/ebiz/billingDetail/tableDetail.vue +++ b/src/components/ebiz/billingDetail/tableDetail.vue @@ -8,13 +8,11 @@ - {{item.convokeOrgCn}} - {{item.splan}} - {{item.estimatePeople}} - {{item.estimatePremium}} - {{item.rplan}} - {{item.realityPeople}} - {{item.estimateGetPremium}} + {{item.name}} + {{item.productName}} + {{item.prem}} + {{item.commitDate}} + {{item.appntDate}} @@ -86,14 +84,14 @@ table { } } .th-fixed { - position: sticky; + // position: sticky; left: 0; - width:100px; + width:150px; padding: 0 5px; } .td-fixed { - position: sticky; - width:100px; + // position: sticky; + width:150px; padding: 0 5px; left: 0; text-decoration: underline; diff --git a/src/views/ebiz/billingDetail/billingDetail.vue b/src/views/ebiz/billingDetail/billingDetail.vue index 4ae703b9a..da8e9c6e4 100644 --- a/src/views/ebiz/billingDetail/billingDetail.vue +++ b/src/views/ebiz/billingDetail/billingDetail.vue @@ -70,6 +70,8 @@ import { Icon } from 'vant' import tableDetail from '@/components/ebiz/billingDetail/tableDetail' import { getComPerformance, getOrgList } from '@/api/ebiz/branchOffice/branchOffice' import FieldDatePicter from '@/components/ebiz/FieldDatePicter' +import { queryOutOrderList, getBranchByUser } from '@/api/ebiz/billingDetail/billingDetail' + // 当前时间 const currentDate = new Date() export default { @@ -80,7 +82,7 @@ export default { return this.OrgLv2Name !== '全国' }, province() { - const name = ['全国'] + const name = [] this.OrgLv2s.forEach((item) => { name.push(item.name) }) @@ -111,22 +113,24 @@ export default { tableData: [], maxDate: new Date(), filterDate: '', - postDate:'',//实际给后台传的时间 + postDate: '', //实际给后台传的时间 + pageNum: 1, + pageSize: 10, + manageLv: 1, //当前人机构等级 // 二级机构筛选是否显示 isOrgLv2ConditionShow: false, // 三级机构筛选是否显示 isOrgLv3ConditionShow: false, // 四级机构筛选是否显示 isOrgLv4ConditionShow: false, - orgCode:0, - OrgLv2Name: '全国', + OrgLv2Name: '', OrgLv4Name: '全部', OrgLv3Name: '全部', - OrgLv2Code: 0, + OrgLv2Code: '', OrgLv2s: [], - OrgLv3Code: 0, + OrgLv3Code: '', OrgLv3s: [], - areaCode: 0, + areaCode: '', OrgLv4s: [], params: { @@ -157,27 +161,45 @@ export default { * 查询机构下拉列表 * manageCode, manageLv传空查全国所有二级机构 **/ + let resData = await getBranchByUser({}) + if (resData.result != '0') return this.$toast(resData.resultMessage) + this.manageLv = resData.content.level console.log('getOrgList :>> ', getOrgList) const res = await getOrgList({ bussinessType: 'normal', - manageCode: '', - manageLv: '', + manageCode: resData.content.code, + manageLv: '0' + resData.content.level, }) if (res.result === '0') { this.OrgLv2s.push(...res.content) + this.OrgLv2Name = this.OrgLv2s[0].name + this.OrgLv2Code = this.OrgLv2s[0].code + // this.orgCode = this.OrgLv2s[0].code + this.onOrgLv2ConditionConfirm(this.OrgLv2Name) } else { this.$toast(res.resultMessage) } - queryOutOrderList({ - appntDate:new Date(), - orgCode:this.orgCode, - }).then(res=>{ - - }) // 查询默认数据 // const result = await this.getRankData() // this.setSummarizingData(result) }, + // 查询列表数据 + queryOutOrderList() { + queryOutOrderList({ + appntDate: this.postDate, + distCode: this.OrgLv2Code, + depCode: this.OrgLv3Code, + orgCode: this.areaCode, + pageNum: this.pageNum, + pageSize: this.pageSize, + }).then((res) => { + if (res.result == 0) { + if (res.content) { + this.tableData = this.tableData.concat(res.content.list) + } + } + }) + }, // 筛选二级机构 async onOrgLv2ConditionConfirm(data) { this.isOrgLv2ConditionShow = false @@ -194,11 +216,16 @@ export default { this.OrgLv2Name = data this.OrgLv4Name = '全部' this.OrgLv3Name = '全部' + this.OrgLv3Code = '' + this.areaCode = '' + + this.pageNum = 1 + this.queryOutOrderList() // 查询三级机构 const res = await getOrgList({ bussinessType: 'normal', manageCode: this.OrgLv2Code, - manageLv: '02', + manageLv: '0' + (this.manageLv + 1), }) this.OrgLv3s.splice(0) this.OrgLv3s.push(...res.content) @@ -219,11 +246,16 @@ export default { this.params.manageLv = '02' } this.OrgLv3Name = '全部' + this.OrgLv2Code = '' + this.areaCode = '' + + this.pageNum = 1 + this.queryOutOrderList() // 查询四级机构 const res = await getOrgList({ bussinessType: 'normal', manageCode: this.OrgLv3Code, - manageLv: '03', + manageLv: '0' + (this.manageLv + 2), }) this.OrgLv4s.splice(0) this.OrgLv4s.push(...res.content) @@ -243,10 +275,20 @@ export default { this.params.manageCode = this.OrgLv3Code this.params.manageLv = '03' } + this.OrgLv2Code = '' + this.OrgLv3Code = '' + this.pageNum = 1 + this.queryOutOrderList() // this.setRankData() }, }, created() { + let date = new Date() + let month = date.getMonth() + 1 + if (month <= 9) { + month = '0' + month + } + this.postDate = date.getFullYear() + '-' + month this.initData() }, }