| @@ -1,7 +1,7 @@ | |||||
| import request from '@/utils/request' | import request from '@/utils/request' | ||||
| // 待处理任务 | // 待处理任务 | ||||
| export function todoTaskList(params) { | |||||
| export function accountingTodoTaskList(params) { | |||||
| return request({ | return request({ | ||||
| url: '/accounting/task/todoTaskList', | url: '/accounting/task/todoTaskList', | ||||
| method: 'get', | method: 'get', | ||||
| @@ -10,7 +10,7 @@ export function todoTaskList(params) { | |||||
| } | } | ||||
| // 已处理任务 | // 已处理任务 | ||||
| export function processedTaskList(params) { | |||||
| export function accountingProcessedTaskList(params) { | |||||
| return request({ | return request({ | ||||
| url: '/accounting/task/processedTaskList', | url: '/accounting/task/processedTaskList', | ||||
| method: 'get', | method: 'get', | ||||
| @@ -1,9 +1,9 @@ | |||||
| import request from '@/utils/request' | import request from '@/utils/request' | ||||
| // 任务 | // 任务 | ||||
| export function taskList(params) { | |||||
| export function managerAllTaskList(params) { | |||||
| return request({ | return request({ | ||||
| url: '/agentcenter/task/taskList', | |||||
| url: '/manager/task/allTaskList', | |||||
| method: 'get', | method: 'get', | ||||
| params: params, | params: params, | ||||
| }) | }) | ||||
| @@ -106,7 +106,7 @@ export const constantRoutes = [ | |||||
| component: () => import('@/views/abnormal/abnormal'), | component: () => import('@/views/abnormal/abnormal'), | ||||
| hidden: true | hidden: true | ||||
| },*/ | },*/ | ||||
| //处理中 | |||||
| /* //处理中 | |||||
| { | { | ||||
| path: '/processing', | path: '/processing', | ||||
| component: () => import('@/views/processing/processing'), | component: () => import('@/views/processing/processing'), | ||||
| @@ -135,7 +135,7 @@ export const constantRoutes = [ | |||||
| path: '/allTasks', | path: '/allTasks', | ||||
| component: () => import('@/views/allTasks/allTasks'), | component: () => import('@/views/allTasks/allTasks'), | ||||
| hidden: true | hidden: true | ||||
| }, | |||||
| },*/ | |||||
| ] | ] | ||||
| // 动态路由,基于用户权限动态去加载 | // 动态路由,基于用户权限动态去加载 | ||||
| @@ -111,33 +111,7 @@ | |||||
| </div> | </div> | ||||
| <div class="right_main"> | |||||
| <div class="title"> | |||||
| <i></i> | |||||
| <p>任务日期</p> | |||||
| </div> | |||||
| <div class="time_main"> | |||||
| <span class="sanjiao-top" @click="addDate"></span> | |||||
| <p @click = "selectionRange">{{year}}</p> | |||||
| <el-date-picker | |||||
| v-model="year" | |||||
| type="year" | |||||
| class="pickerTime" | |||||
| ref = "datePicker" | |||||
| value-format="yyyy" | |||||
| placeholder="选择年" | |||||
| @change="chooseMonth(1)" | |||||
| > | |||||
| </el-date-picker> | |||||
| <span class="sanjiao-bottom" @click="reduceDate"></span> | |||||
| </div> | |||||
| <div class="month_main"> | |||||
| <p v-for="(item,index) in 12" @click="chooseMonth(index + 1)" :class="{'active': isCurrentMonth(index + 1)}">{{index+1}}月<i v-if="isCurrentMonth(index + 1)"></i></p> | |||||
| </div> | |||||
| </div> | |||||
| <RightYearMonthSelector class="right_main" :year.sync="parms.orderYear" :month.sync="parms.orderMonth" @dateChanged="chooseMonth"/> | |||||
| </div> | </div> | ||||
| @@ -149,68 +123,53 @@ | |||||
| import {cityTree, deptTree} from "@/api/misc/misc_dept"; | import {cityTree, deptTree} from "@/api/misc/misc_dept"; | ||||
| import {ENV} from "@/utils/env"; | import {ENV} from "@/utils/env"; | ||||
| import {date_format} from "@/utils/date"; | import {date_format} from "@/utils/date"; | ||||
| import {taskList} from "@/api/agentcenter/task"; | |||||
| import {managerAllTaskList} from "@/api/agentcenter/task"; | |||||
| import RightYearMonthSelector from "@/components/framework/RightYearMonthSelector.vue"; | |||||
| export default { | export default { | ||||
| name: "processing", | name: "processing", | ||||
| components: {RightYearMonthSelector}, | |||||
| data() { | data() { | ||||
| return { | return { | ||||
| year: date_format('%Y'), | |||||
| cityCode: null, | |||||
| townCode: null, | |||||
| deptOptions: [], | deptOptions: [], | ||||
| month: date_format('%m'), | |||||
| list: [], | list: [], | ||||
| total: 0, | total: 0, | ||||
| parms: { | |||||
| countyCode: null, | |||||
| townCode: null, | |||||
| orderYear: date_format('%Y'), | |||||
| orderMonth: date_format('%m'), | |||||
| }, | |||||
| } | } | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| this.getDeptTree(); | this.getDeptTree(); | ||||
| }, | }, | ||||
| methods:{ | methods:{ | ||||
| addDate(){ | |||||
| this.year = Number(this.year) + 1 ; | |||||
| this.chooseMonth(1); | |||||
| }, | |||||
| reduceDate(){ | |||||
| this.year = Number(this.year) - 1 ; | |||||
| this.chooseMonth(1); | |||||
| }, | |||||
| selectionRange(){ | |||||
| this.$refs.datePicker.focus(); | |||||
| }, | |||||
| getDeptTree() { | getDeptTree() { | ||||
| cityTree({rootId: ENV.UserDeptId()}).then((resp) => { | cityTree({rootId: ENV.UserDeptId()}).then((resp) => { | ||||
| this.deptOptions = resp.data; | this.deptOptions = resp.data; | ||||
| if(this.deptOptions.length) | if(this.deptOptions.length) | ||||
| this.cityCode = this.deptOptions[0].orgCode; | |||||
| this.parms.countyCode = this.deptOptions[0].orgCode; | |||||
| }); | }); | ||||
| }, | }, | ||||
| getTaskList() { | getTaskList() { | ||||
| if(!this.townCode || !this.year || !this.month) | |||||
| if(!this.parms.townCode || !this.parms.orderYear || !this.parms.orderMonth) | |||||
| return; | return; | ||||
| taskList({ | |||||
| townCode: this.townCode, | |||||
| orderYear: this.year, | |||||
| orderMonth: this.month, | |||||
| }).then((resp) => { | |||||
| managerAllTaskList(this.parms).then((resp) => { | |||||
| this.list = resp.rows; | this.list = resp.rows; | ||||
| this.total = resp.total; | this.total = resp.total; | ||||
| }) | }) | ||||
| }, | }, | ||||
| chooseCity(cmd) { | chooseCity(cmd) { | ||||
| this.cityCode = cmd; | |||||
| this.townCode = null; | |||||
| this.parms.countyCode = cmd; | |||||
| this.parms.townCode = null; | |||||
| }, | }, | ||||
| chooseTown(cmd) { | chooseTown(cmd) { | ||||
| this.townCode = cmd; | |||||
| this.parms.townCode = cmd; | |||||
| this.getTaskList(); | this.getTaskList(); | ||||
| }, | }, | ||||
| isCurrentMonth(m) { | |||||
| return parseInt(this.month) === m; | |||||
| }, | |||||
| chooseMonth(month) { | |||||
| this.month = month >= 10 ? '' + month : ('0' + month); | |||||
| chooseMonth(year, month) { | |||||
| this.getTaskList(); | this.getTaskList(); | ||||
| }, | }, | ||||
| }, | }, | ||||
| @@ -221,19 +180,19 @@ export default { | |||||
| cityName() { | cityName() { | ||||
| if(!this.deptOptions.length) | if(!this.deptOptions.length) | ||||
| return ''; | return ''; | ||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.cityCode); | |||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.parms.countyCode); | |||||
| return dept ? dept.deptName : ''; | return dept ? dept.deptName : ''; | ||||
| }, | }, | ||||
| townList() { | townList() { | ||||
| if(!this.deptOptions.length) | if(!this.deptOptions.length) | ||||
| return []; | return []; | ||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.cityCode); | |||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.parms.countyCode); | |||||
| return dept ? dept.children || [] : []; | return dept ? dept.children || [] : []; | ||||
| }, | }, | ||||
| townName() { | townName() { | ||||
| if(!this.townList.length) | if(!this.townList.length) | ||||
| return ''; | return ''; | ||||
| let dept = this.townList.find((x) => x.orgCode === this.townCode); | |||||
| let dept = this.townList.find((x) => x.orgCode === this.parms.townCode); | |||||
| return dept ? dept.deptName : ''; | return dept ? dept.deptName : ''; | ||||
| }, | }, | ||||
| }, | }, | ||||
| @@ -84,7 +84,7 @@ | |||||
| </div> | </div> | ||||
| <RightYearMonthSelector class="right_main" :year.sync="year" :month.sync="month" @dateChanged="chooseMonth"/> | |||||
| <RightYearMonthSelector class="right_main" :year.sync="parms.orderYear" :month.sync="parms.orderMonth" @dateChanged="chooseMonth"/> | |||||
| </div> | </div> | ||||
| @@ -97,7 +97,7 @@ import RightYearMonthSelector from "@/components/framework/RightYearMonthSelecto | |||||
| import {date, date_format} from "@/utils/date"; | import {date, date_format} from "@/utils/date"; | ||||
| import {cityTree} from "@/api/misc/misc_dept"; | import {cityTree} from "@/api/misc/misc_dept"; | ||||
| import {ENV} from "@/utils/env"; | import {ENV} from "@/utils/env"; | ||||
| import {processedTaskList} from "@/api/agentcenter/accounting_task"; | |||||
| import {accountingProcessedTaskList} from "@/api/agentcenter/accounting_task"; | |||||
| export default { | export default { | ||||
| name: "processed", | name: "processed", | ||||
| @@ -105,13 +105,15 @@ export default { | |||||
| data() { | data() { | ||||
| return { | return { | ||||
| deptOptions: [], | deptOptions: [], | ||||
| cityCode: null, | |||||
| townCode: null, | |||||
| list: [], | list: [], | ||||
| total: 0, | total: 0, | ||||
| year: date_format('%Y'), | |||||
| month: date_format('%m'), | |||||
| overdue: 0, | overdue: 0, | ||||
| parms: { | |||||
| countyCode: null, | |||||
| townCode: null, | |||||
| orderYear: date_format('%Y'), | |||||
| orderMonth: date_format('%m'), | |||||
| }, | |||||
| } | } | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| @@ -122,27 +124,22 @@ export default { | |||||
| cityTree({rootId: ENV.UserDeptId()}).then((resp) => { | cityTree({rootId: ENV.UserDeptId()}).then((resp) => { | ||||
| this.deptOptions = resp.data; | this.deptOptions = resp.data; | ||||
| if(this.deptOptions.length) | if(this.deptOptions.length) | ||||
| this.cityCode = this.deptOptions[0].orgCode; | |||||
| this.parms.countyCode = this.deptOptions[0].orgCode; | |||||
| }); | }); | ||||
| }, | }, | ||||
| chooseCity(cmd) { | chooseCity(cmd) { | ||||
| this.cityCode = cmd; | |||||
| this.townCode = null; | |||||
| this.parms.countyCode = cmd; | |||||
| this.parms.townCode = null; | |||||
| this.getTaskList(); | this.getTaskList(); | ||||
| }, | }, | ||||
| chooseTown(cmd) { | chooseTown(cmd) { | ||||
| this.townCode = cmd; | |||||
| this.parms.townCode = cmd; | |||||
| this.getTaskList(); | this.getTaskList(); | ||||
| }, | }, | ||||
| getTaskList() { | getTaskList() { | ||||
| if(!this.cityCode || !this.year || !this.month) | |||||
| if(!this.parms.countyCode || !this.parms.orderYear || !this.parms.orderMonth) | |||||
| return; | return; | ||||
| processedTaskList({ | |||||
| countyCode: this.cityCode, | |||||
| townCode: this.townCode, | |||||
| orderYear: this.year, | |||||
| orderMonth: this.month, | |||||
| }).then((resp) => { | |||||
| accountingProcessedTaskList(this.parms).then((resp) => { | |||||
| this.list = resp.rows; | this.list = resp.rows; | ||||
| this.total = resp.total; | this.total = resp.total; | ||||
| this.overdue = resp.overdue; | this.overdue = resp.overdue; | ||||
| @@ -162,21 +159,21 @@ export default { | |||||
| cityName() { | cityName() { | ||||
| if(!this.deptOptions.length) | if(!this.deptOptions.length) | ||||
| return ''; | return ''; | ||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.cityCode); | |||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.parms.countyCode); | |||||
| return dept ? dept.deptName : ''; | return dept ? dept.deptName : ''; | ||||
| }, | }, | ||||
| townList() { | townList() { | ||||
| if(!this.deptOptions.length) | if(!this.deptOptions.length) | ||||
| return []; | return []; | ||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.cityCode); | |||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.parms.countyCode); | |||||
| return [{orgCode: '', deptName: '全部'}, ...(dept ? dept.children || [] : [])]; | return [{orgCode: '', deptName: '全部'}, ...(dept ? dept.children || [] : [])]; | ||||
| }, | }, | ||||
| townName() { | townName() { | ||||
| if(!this.townList.length) | if(!this.townList.length) | ||||
| return ''; | return ''; | ||||
| if(!this.townCode) | |||||
| if(!this.parms.townCode) | |||||
| return '全部'; | return '全部'; | ||||
| let dept = this.townList.find((x) => x.orgCode === this.townCode); | |||||
| let dept = this.townList.find((x) => x.orgCode === this.parms.townCode); | |||||
| return dept ? dept.deptName : ''; | return dept ? dept.deptName : ''; | ||||
| }, | }, | ||||
| }, | }, | ||||
| @@ -65,7 +65,7 @@ | |||||
| </el-table> | </el-table> | ||||
| </div> | </div> | ||||
| <RightYearMonthSelector class="right_main" :year.sync="year" :month.sync="month" @dateChanged="chooseMonth"/> | |||||
| <RightYearMonthSelector class="right_main" :year.sync="parms.orderYear" :month.sync="parms.orderMonth" @dateChanged="chooseMonth"/> | |||||
| </div> | </div> | ||||
| @@ -76,7 +76,7 @@ | |||||
| <script> | <script> | ||||
| import {cityTree} from "@/api/misc/misc_dept"; | import {cityTree} from "@/api/misc/misc_dept"; | ||||
| import {ENV} from "@/utils/env"; | import {ENV} from "@/utils/env"; | ||||
| import {todoTaskList} from "@/api/agentcenter/accounting_task"; | |||||
| import {accountingTodoTaskList} from "@/api/agentcenter/accounting_task"; | |||||
| import {date, date_format} from "@/utils/date"; | import {date, date_format} from "@/utils/date"; | ||||
| import RightYearMonthSelector from "@/components/framework/RightYearMonthSelector.vue"; | import RightYearMonthSelector from "@/components/framework/RightYearMonthSelector.vue"; | ||||
| @@ -86,12 +86,14 @@ export default { | |||||
| data() { | data() { | ||||
| return { | return { | ||||
| deptOptions: [], | deptOptions: [], | ||||
| cityCode: null, | |||||
| townCode: null, | |||||
| list: [], | list: [], | ||||
| total: 0, | total: 0, | ||||
| year: date_format('%Y'), | |||||
| month: date_format('%m'), | |||||
| parms: { | |||||
| countyCode: null, | |||||
| townCode: null, | |||||
| orderYear: date_format('%Y'), | |||||
| orderMonth: date_format('%m'), | |||||
| }, | |||||
| } | } | ||||
| }, | }, | ||||
| created() { | created() { | ||||
| @@ -102,25 +104,21 @@ export default { | |||||
| cityTree({rootId: ENV.UserDeptId()}).then((resp) => { | cityTree({rootId: ENV.UserDeptId()}).then((resp) => { | ||||
| this.deptOptions = resp.data; | this.deptOptions = resp.data; | ||||
| if(this.deptOptions.length) | if(this.deptOptions.length) | ||||
| this.cityCode = this.deptOptions[0].orgCode; | |||||
| this.parms.countyCode = this.deptOptions[0].orgCode; | |||||
| }); | }); | ||||
| }, | }, | ||||
| chooseCity(cmd) { | chooseCity(cmd) { | ||||
| this.cityCode = cmd; | |||||
| this.townCode = null; | |||||
| this.parms.countyCode = cmd; | |||||
| this.parms.townCode = null; | |||||
| }, | }, | ||||
| chooseTown(cmd) { | chooseTown(cmd) { | ||||
| this.townCode = cmd; | |||||
| this.parms.townCode = cmd; | |||||
| this.getTaskList(); | this.getTaskList(); | ||||
| }, | }, | ||||
| getTaskList() { | getTaskList() { | ||||
| if(!this.townCode || !this.year || !this.month) | |||||
| if(!this.parms.townCode || !this.parms.orderYear || !this.parms.orderMonth) | |||||
| return; | return; | ||||
| todoTaskList({ | |||||
| townCode: this.townCode, | |||||
| orderYear: this.year, | |||||
| orderMonth: this.month, | |||||
| }).then((resp) => { | |||||
| accountingTodoTaskList(this.parms).then((resp) => { | |||||
| this.list = resp.rows; | this.list = resp.rows; | ||||
| this.total = resp.total; | this.total = resp.total; | ||||
| }) | }) | ||||
| @@ -139,19 +137,19 @@ export default { | |||||
| cityName() { | cityName() { | ||||
| if(!this.deptOptions.length) | if(!this.deptOptions.length) | ||||
| return ''; | return ''; | ||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.cityCode); | |||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.parms.countyCode); | |||||
| return dept ? dept.deptName : ''; | return dept ? dept.deptName : ''; | ||||
| }, | }, | ||||
| townList() { | townList() { | ||||
| if(!this.deptOptions.length) | if(!this.deptOptions.length) | ||||
| return []; | return []; | ||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.cityCode); | |||||
| let dept = this.deptOptions.find((x) => x.orgCode === this.parms.countyCode); | |||||
| return dept ? dept.children || [] : []; | return dept ? dept.children || [] : []; | ||||
| }, | }, | ||||
| townName() { | townName() { | ||||
| if(!this.townList.length) | if(!this.townList.length) | ||||
| return ''; | return ''; | ||||
| let dept = this.townList.find((x) => x.orgCode === this.townCode); | |||||
| let dept = this.townList.find((x) => x.orgCode === this.parms.townCode); | |||||
| return dept ? dept.deptName : ''; | return dept ? dept.deptName : ''; | ||||
| }, | }, | ||||
| }, | }, | ||||