From e315541d29ad429cfab11d0ad95b40500d9122c4 Mon Sep 17 00:00:00 2001 From: "na.guo" Date: Tue, 4 Aug 2020 13:34:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=8A=9B=E6=8E=92=E5=90=8D=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/ebiz/institutionalPerform.js | 18 +- .../components/Selectors.vue | 115 ++++++ .../components/js/util.js | 15 + .../css/InstitutionalManpower.scss | 8 + .../InstitutionalManpower/index.vue | 345 ++++++++++++++++++ .../ebiz/institutionalPerform/UnderOffice.vue | 223 ++++++----- 6 files changed, 608 insertions(+), 116 deletions(-) create mode 100644 src/views/ebiz/institutionalPerform/InstitutionalManpower/components/Selectors.vue create mode 100644 src/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/util.js create mode 100644 src/views/ebiz/institutionalPerform/InstitutionalManpower/css/InstitutionalManpower.scss create mode 100644 src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue 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/InstitutionalManpower/components/Selectors.vue b/src/views/ebiz/institutionalPerform/InstitutionalManpower/components/Selectors.vue new file mode 100644 index 000000000..796be9a61 --- /dev/null +++ b/src/views/ebiz/institutionalPerform/InstitutionalManpower/components/Selectors.vue @@ -0,0 +1,115 @@ + + + + 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..1bb35f413 --- /dev/null +++ b/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue @@ -0,0 +1,345 @@ + + + + diff --git a/src/views/ebiz/institutionalPerform/UnderOffice.vue b/src/views/ebiz/institutionalPerform/UnderOffice.vue index 00a9e80b8..1113f3822 100644 --- a/src/views/ebiz/institutionalPerform/UnderOffice.vue +++ b/src/views/ebiz/institutionalPerform/UnderOffice.vue @@ -1,19 +1,19 @@ + - + - + @@ -22,20 +22,15 @@ - 截至{{timeVal}} + 截至{{ timeVal }} - {{sortTypeText}} + {{ sortTypeText }} - + @@ -63,20 +58,14 @@ - +
-
- +
+
@@ -86,32 +75,32 @@ - - - - - - - - - - - - - - - - - - - - -
排名 机构预收件数 承保件数 操作
1合计{{ysbbTotal.toFixed(2)}}{{bzbfTotol.toFixed(2)}}{{cbbfTotal.toFixed(2)}}{{ysjsTotal}}{{cbjsTotal}}
{{index+1}} -
{{item.name}}
-
{{item.ysbb}}{{item.bzbf}}{{item.cbbf}}{{item.ysjs}}{{item.cbjs}} - 查看 -
-
+ + + 1 + 合计 + {{ ysbbTotal.toFixed(2) }} + {{ bzbfTotol.toFixed(2) }} + {{ cbbfTotal.toFixed(2) }} + {{ ysjsTotal }} + {{ cbjsTotal }} + + + {{ index + 1 }} + +
{{ item.name }}
+ + {{ item.ysbb }} + {{ item.bzbf }} + {{ item.cbbf }} + {{ item.ysjs }} + {{ item.cbjs }} + + 查看 + + + +
@@ -128,11 +117,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), @@ -145,10 +134,10 @@ export default { ysbbTotol: 0, cbjsTotal: 0, cbbfTotal: 0, - ysbbTotal:0, + ysbbTotal: 0, bzbfTotal: 0, tableData: [], - bzbfTotol:0, + bzbfTotol: 0, timeVal: '', sortTypeText: '预收标保', queryColumns: ['预收件数', '预收标保', '承保件数', '承保标保', '承保标保'], @@ -167,8 +156,8 @@ export default { dateType: 'now', dateVal: '', curTab: '', - shitimeVal:"", - curMainType:"01" + shitimeVal: '', + curMainType: '01' } }, methods: { @@ -186,10 +175,13 @@ export default { } return val }, - onClickMain(name) { + onClickMain(name) { console.log(name) if (name == 1) { - this.curMainType = '02' + //this.curMainType = '02' + this.$router.push({ + path: '/institutionalPerform/InstitutionalManpower' + }) } else { this.curMainType = '01' } @@ -201,28 +193,28 @@ 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() } }, toDetail(manageCode) { this.$router.push({ - path: '/institutionalPerform/serviceDepartOffice', + path: '/institutionalPerform/UnderOffice', query: { manageCode: manageCode, - timeVal:this.timeVal, - showText:this.showText - }, + timeVal: this.timeVal, + showText: this.showText + } }) }, //修改月、天的格式,保持两位数显示 @@ -254,7 +246,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 @@ -265,7 +257,7 @@ export default { }, onConfirmDate(value, index) { // 点击确定那么文字“截至”就隐藏 - this.showText=false; + this.showText = false if (this.curTab == 1) { // now:当前 y:年 m:月 d:日 // 日 @@ -273,24 +265,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 @@ -316,18 +305,18 @@ export default { this.getlComPremDetil() }, onBack() { - this.$router.go(-1); + this.$router.go(-1) }, //获取列表 getlComPremDetil() { let $this = this let data = { - manageCode: "8645", - manageLv: "02", + manageCode: '8645', + manageLv: '02', sortType: this.sortType, queryType: this.dateType, date: this.dateVal, - //01:保费排行 02:人力排行 + //01:保费排行 02:人力排行 type: this.curMainType } // 去除对象里面是空的属性 @@ -337,7 +326,7 @@ export default { } } branchOfficeApi(data) - .then((res) => { + .then(res => { if (res.result == 0) { console.log(res.content.list) $this.tableData = res.content.list @@ -347,12 +336,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) @@ -362,10 +351,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', { @@ -375,26 +364,29 @@ export default { route: { flag: '', extra: { - url: location.origin + '/#/institutionalPerform/BranchOffice', - }, - }, - }, - ], + url: location.origin + '/#/institutionalPerform/BranchOffice' + } + } + } + ] }) }, 1000) }, mounted() { -// 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.getCurrentDate() setInterval(this.getCurrentDate, 1000 * 60) this.getlComPremDetil() - }, + } }