diff --git a/src/router/ebiz/institutionalPerform.js b/src/router/ebiz/institutionalPerform.js index 4ba415b18..0f70e6bc9 100644 --- a/src/router/ebiz/institutionalPerform.js +++ b/src/router/ebiz/institutionalPerform.js @@ -7,8 +7,10 @@ const GroupOffice = () => import('@/views/ebiz/institutionalPerform/GroupOffice' const PersonalOffice = () => import('@/views/ebiz/institutionalPerform/PersonalOffice') const ServiceDepartOffice = () => import('@/views/ebiz/institutionalPerform/ServiceDepartOffice') const RegionalOffice = () => import('@/views/ebiz/institutionalPerform/RegionalOffice') + +const InstitutionalManpower = () => import('@/views/ebiz/institutionalPerform/InstitutionalManpower') export default [ - // 分公司 + // 分公司 { path: '/institutionalPerform/BranchOffice', name: 'BranchOffice', @@ -27,7 +29,7 @@ export default [ title: '机构业绩', index: 1 } - }, + }, // 营销服务部 03 { path: '/institutionalPerform/serviceDepartOffice', @@ -37,7 +39,7 @@ export default [ title: '机构业绩', index: 1 } - }, + }, // 区公司 04 { path: '/institutionalPerform/districtOffice', @@ -87,5 +89,15 @@ export default [ title: '机构业绩', index: 1 } + }, + { + //活动人力 + path: '/institutionalPerform/institutionalManpower', + name: 'InstitutionalManpower', + component: InstitutionalManpower, + meta: { + title: '机构业绩', + index: 1 + } } ] diff --git a/src/views/ebiz/institutionalPerform/DepartmentOffice.vue b/src/views/ebiz/institutionalPerform/DepartmentOffice.vue index 2cd87e340..d8d2d61fe 100644 --- a/src/views/ebiz/institutionalPerform/DepartmentOffice.vue +++ b/src/views/ebiz/institutionalPerform/DepartmentOffice.vue @@ -6,14 +6,14 @@ --> - + - + @@ -24,21 +24,16 @@ 截至 - {{timeVal}} + {{ timeVal }} - {{sortTypeText}} + {{ sortTypeText }} - + @@ -66,13 +61,7 @@ - + @@ -93,22 +82,22 @@ 1 合计 - {{ysbbTotal.toFixed(2)}} - {{bzbfTotol.toFixed(2)}} - {{cbbfTotal.toFixed(2)}} - {{ysjsTotal}} - {{cbjsTotal}} + {{ ysbbTotal.toFixed(2) }} + {{ bzbfTotol.toFixed(2) }} + {{ cbbfTotal.toFixed(2) }} + {{ ysjsTotal }} + {{ cbjsTotal }} - - {{index+1}} + + {{ index + 1 }} -
{{item.name}}
+
{{ item.name }}
- {{item.ysbb}} - {{item.bzbf}} - {{item.cbbf}} - {{item.ysjs}} - {{item.cbjs}} + {{ item.ysbb }} + {{ item.bzbf }} + {{ item.cbbf }} + {{ item.ysjs }} + {{ item.cbjs }} 查看 @@ -131,7 +120,7 @@ export default { components: { // XTable, [Tabs.name]: Tabs, - [Tab.name]: Tab, + [Tab.name]: Tab }, data() { return { @@ -171,7 +160,7 @@ export default { dateType: 'now', dateVal: '', curTab: '', - shitimeVal: '', + shitimeVal: '' } }, methods: { @@ -190,9 +179,11 @@ export default { return val }, onClickMain(name) { - console.log(name) if (name == 1) { - this.curMainType = '02' + //this.curMainType = '02' + this.$router.push({ + path: '/institutionalPerform/InstitutionalManpower' + }) } else { this.curMainType = '01' } @@ -224,8 +215,8 @@ export default { query: { manageCode: manageCode, timeVal: this.timeVal, - showText: this.showText, - }, + showText: this.showText + } }) }, //修改月、天的格式,保持两位数显示 @@ -330,7 +321,7 @@ export default { queryType: this.dateType, date: this.dateVal, //01:保费排行 02:人力排行 - type: this.curMainType, + type: this.curMainType } // 去除对象里面是空的属性 for (var key in data) { @@ -339,7 +330,7 @@ export default { } } branchOfficeApi(data) - .then((res) => { + .then(res => { if (res.result == 0) { console.log(res.content.list) $this.tableData = res.content.list @@ -352,7 +343,7 @@ export default { $this.ysbbTotal = 0 $this.bzbfTotol = 0 // 业绩排名的 总计计算 - $this.tableData.map(function (val) { + $this.tableData.map(function(val) { $this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb) $this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb) $this.ysjsTotal = Number($this.ysjsTotal) + Number(val.ysjs) @@ -364,8 +355,8 @@ export default { console.log($this.tableData) } }) - .catch((err) => {}) - }, + .catch(err => {}) + } }, created() { setTimeout(() => { @@ -377,11 +368,11 @@ export default { route: { flag: '', extra: { - url: location.origin + '/#/institutionalPerform/BranchOffice', - }, - }, - }, - ], + url: location.origin + '/#/institutionalPerform/BranchOffice' + } + } + } + ] }) }, 1000) }, @@ -390,7 +381,7 @@ export default { this.timeVal = this.$route.query.timeVal || '' this.showText = this.$route.query.showText this.getlComPremDetil() - }, + } } diff --git a/src/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/util.js b/src/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/util.js new file mode 100644 index 000000000..c9ad87785 --- /dev/null +++ b/src/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/util.js @@ -0,0 +1,15 @@ +export default { + add0(m) { + return m < 10 ? '0' + m : m + }, + getLastDay(y, m) { + y = y || new Date().getFullYear() + m = m || new Date().getMonth() + return new Date(y, m + 1, 0).getDate() + }, + getMonthLastDay(y, m) { + y = y || new Date().getFullYear() + m = m || new Date().getMonth() + return y + '-' + this.add0(m + 1) + '-' + new Date(y, m + 1, 0).getDate() + } +} diff --git a/src/views/ebiz/institutionalPerform/InstitutionalManpower/css/InstitutionalManpower.scss b/src/views/ebiz/institutionalPerform/InstitutionalManpower/css/InstitutionalManpower.scss new file mode 100644 index 000000000..0d9c95f28 --- /dev/null +++ b/src/views/ebiz/institutionalPerform/InstitutionalManpower/css/InstitutionalManpower.scss @@ -0,0 +1,8 @@ +.van-row { + line-height: 1.6rem; +} +.van-tabs__nav--card .van-tab { + &:last-child { + border-right: none !important; + } +} diff --git a/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue b/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue new file mode 100644 index 000000000..2a605cd72 --- /dev/null +++ b/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue @@ -0,0 +1,344 @@ + + + + diff --git a/src/views/ebiz/institutionalPerform/PersonalOffice.vue b/src/views/ebiz/institutionalPerform/PersonalOffice.vue index 43a8835ce..7aaeca707 100644 --- a/src/views/ebiz/institutionalPerform/PersonalOffice.vue +++ b/src/views/ebiz/institutionalPerform/PersonalOffice.vue @@ -1,19 +1,19 @@ @@ -124,11 +113,11 @@ export default { components: { // XTable, [Tabs.name]: Tabs, - [Tab.name]: Tab, + [Tab.name]: Tab }, data() { return { - showText:true, + showText: true, YearColumns: ['2020', '2019'], minDate: new Date(2019, 0, 1), maxDate: new Date(2020, 10, 1), @@ -143,8 +132,8 @@ export default { cbbfTotal: 0, bzbfTotal: 0, tableData: [], - ysbbTotal:0, - bzbfTotol:0, + ysbbTotal: 0, + bzbfTotol: 0, timeVal: '', sortTypeText: '预收标保', queryColumns: ['预收件数', '预收标保', '承保件数', '承保标保', '承保标保'], @@ -163,8 +152,8 @@ export default { dateType: 'now', dateVal: '', curTab: '', - shitimeVal:"", - curMainType:"01" + shitimeVal: '', + curMainType: '01' } }, methods: { @@ -183,9 +172,11 @@ export default { return val }, onClickMain(name) { - console.log(name) if (name == 1) { - this.curMainType = '02' + //this.curMainType = '02' + this.$router.push({ + path: '/institutionalPerform/InstitutionalManpower' + }) } else { this.curMainType = '01' } @@ -197,21 +188,21 @@ export default { this.showDatePicker = true } else if (name == 2) { this.showMonthPicker = true - } else if(name == 3) { + } else if (name == 3) { this.showYearPicker = true } else { // "截至"文字显示出来 - this.showText=true + this.showText = true // 实时的时候date清空 this.dateType = 'now' this.dateVal = '' // 左侧时间实时赋值 - this.timeVal= this.shitimeVal + this.timeVal = this.shitimeVal // 调接口 - this.getlComPremDetil() + this.getlComPremDetil() } }, - + //修改月、天的格式,保持两位数显示 add0(m) { return m < 10 ? '0' + m : m @@ -241,7 +232,7 @@ export default { // 一直在获取时间 this.shitimeVal = this.add0(curMonth) + '-' + this.add0(curDay) + timeStr // 存页面上值得一个变量 - this.timeVal= this.shitimeVal + this.timeVal = this.shitimeVal }, dateFormat(time) { // 时间格式化 2019-09-08 @@ -252,7 +243,7 @@ export default { }, onConfirmDate(value, index) { // 点击确定那么文字“截至”就隐藏 - this.showText=false; + this.showText = false if (this.curTab == 1) { // now:当前 y:年 m:月 d:日 // 日 @@ -260,24 +251,21 @@ export default { this.dateVal = this.dateFormat(this.currentDate) console.log(this.dateVal) // 左侧时间实时赋值 - this.timeVal=this.dateVal + this.timeVal = this.dateVal } else if (this.curTab == 2) { // 月 this.dateType = 'm' this.dateVal = this.dateFormat(this.currentMonthDate) // 左侧时间实时赋值 - this.timeVal=this.dateVal.substring(0,7) + this.timeVal = this.dateVal.substring(0, 7) } else if (this.curTab == 3) { // 年 this.dateType = 'y' - this.dateVal = value+'-' + '01' + '-' + '01' + this.dateVal = value + '-' + '01' + '-' + '01' // 左侧时间实时赋值 - this.timeVal=this.dateVal.substring(0,4) + this.timeVal = this.dateVal.substring(0, 4) } - this.showDatePicker=false, - this.showMonthPicker=false, - this.showYearPicker= false, - this.getlComPremDetil() + ;(this.showDatePicker = false), (this.showMonthPicker = false), (this.showYearPicker = false), this.getlComPremDetil() }, onConfirm(value, index) { this.sortTypeText = value @@ -303,19 +291,19 @@ export default { this.getlComPremDetil() }, onBack() { - this.$router.go(-1); + this.$router.go(-1) }, //获取列表 getlComPremDetil() { let $this = this let data = { manageCode: this.$route.query.manageCode, - manageLv: "08", + manageLv: '08', sortType: this.sortType, queryType: this.dateType, date: this.dateVal, - //01:保费排行 02:人力排行 - type: this.curMainType, + //01:保费排行 02:人力排行 + type: this.curMainType } // 去除对象里面是空的属性 for (var key in data) { @@ -324,7 +312,7 @@ export default { } } branchOfficeApi(data) - .then((res) => { + .then(res => { if (res.result == 0) { console.log(res.content.list) $this.tableData = res.content.list @@ -334,12 +322,12 @@ export default { $this.cbjsTotal = 0 $this.cbbfTotal = 0 $this.bzbfTotal = 0 - $this.ysbbTotal =0 - $this.bzbfTotol=0 + $this.ysbbTotal = 0 + $this.bzbfTotol = 0 // 业绩排名的 总计计算 - $this.tableData.map(function (val) { - $this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb) - $this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb) + $this.tableData.map(function(val) { + $this.bzbfTotol = Number($this.bzbfTotol) + Number(val.ysbb) + $this.ysbbTotal = Number($this.ysbbTotal) + Number(val.ysbb) $this.ysjsTotal = Number($this.ysjsTotal) + Number(val.ysjs) $this.ysbbTotol = Number($this.ysbbTotol) + Number(val.ysbb) $this.cbjsTotal = Number($this.cbjsTotal) + Number(val.cbjs) @@ -349,10 +337,10 @@ export default { console.log($this.tableData) } }) - .catch((err) => {}) - }, + .catch(err => {}) + } }, - created() { + created() { setTimeout(() => { // eslint-disable-next-line no-undef EWebBridge.webCallAppInJs('webview_right_button', { @@ -362,20 +350,20 @@ export default { route: { flag: '', extra: { - url: location.origin + '/#/institutionalPerform/BranchOffice', - }, - }, - }, - ], + url: location.origin + '/#/institutionalPerform/BranchOffice' + } + } + } + ] }) }, 1000) }, mounted() { setInterval(this.getCurrentDate(), 1000 * 60) - this.timeVal=this.$route.query.timeVal||"" - this.showText=this.$route.query.showText + this.timeVal = this.$route.query.timeVal || '' + this.showText = this.$route.query.showText this.getlComPremDetil() - }, + } }