| @@ -1,7 +1,7 @@ | |||
| import request from '@/utils/request' | |||
| // 待处理任务 | |||
| export function todoTaskList(params) { | |||
| export function accountingTodoTaskList(params) { | |||
| return request({ | |||
| url: '/accounting/task/todoTaskList', | |||
| method: 'get', | |||
| @@ -10,7 +10,7 @@ export function todoTaskList(params) { | |||
| } | |||
| // 已处理任务 | |||
| export function processedTaskList(params) { | |||
| export function accountingProcessedTaskList(params) { | |||
| return request({ | |||
| url: '/accounting/task/processedTaskList', | |||
| method: 'get', | |||
| @@ -1,9 +1,9 @@ | |||
| import request from '@/utils/request' | |||
| // 任务 | |||
| export function taskList(params) { | |||
| export function managerAllTaskList(params) { | |||
| return request({ | |||
| url: '/agentcenter/task/taskList', | |||
| url: '/manager/task/allTaskList', | |||
| method: 'get', | |||
| params: params, | |||
| }) | |||
| @@ -106,7 +106,7 @@ export const constantRoutes = [ | |||
| component: () => import('@/views/abnormal/abnormal'), | |||
| hidden: true | |||
| },*/ | |||
| //处理中 | |||
| /* //处理中 | |||
| { | |||
| path: '/processing', | |||
| component: () => import('@/views/processing/processing'), | |||
| @@ -135,7 +135,7 @@ export const constantRoutes = [ | |||
| path: '/allTasks', | |||
| component: () => import('@/views/allTasks/allTasks'), | |||
| hidden: true | |||
| }, | |||
| },*/ | |||
| ] | |||
| // 动态路由,基于用户权限动态去加载 | |||
| @@ -111,33 +111,7 @@ | |||
| </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> | |||
| @@ -149,68 +123,53 @@ | |||
| import {cityTree, deptTree} from "@/api/misc/misc_dept"; | |||
| import {ENV} from "@/utils/env"; | |||
| 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 { | |||
| name: "processing", | |||
| components: {RightYearMonthSelector}, | |||
| data() { | |||
| return { | |||
| year: date_format('%Y'), | |||
| cityCode: null, | |||
| townCode: null, | |||
| deptOptions: [], | |||
| month: date_format('%m'), | |||
| list: [], | |||
| total: 0, | |||
| parms: { | |||
| countyCode: null, | |||
| townCode: null, | |||
| orderYear: date_format('%Y'), | |||
| orderMonth: date_format('%m'), | |||
| }, | |||
| } | |||
| }, | |||
| created() { | |||
| this.getDeptTree(); | |||
| }, | |||
| 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() { | |||
| cityTree({rootId: ENV.UserDeptId()}).then((resp) => { | |||
| this.deptOptions = resp.data; | |||
| if(this.deptOptions.length) | |||
| this.cityCode = this.deptOptions[0].orgCode; | |||
| this.parms.countyCode = this.deptOptions[0].orgCode; | |||
| }); | |||
| }, | |||
| getTaskList() { | |||
| if(!this.townCode || !this.year || !this.month) | |||
| if(!this.parms.townCode || !this.parms.orderYear || !this.parms.orderMonth) | |||
| return; | |||
| taskList({ | |||
| townCode: this.townCode, | |||
| orderYear: this.year, | |||
| orderMonth: this.month, | |||
| }).then((resp) => { | |||
| managerAllTaskList(this.parms).then((resp) => { | |||
| this.list = resp.rows; | |||
| this.total = resp.total; | |||
| }) | |||
| }, | |||
| chooseCity(cmd) { | |||
| this.cityCode = cmd; | |||
| this.townCode = null; | |||
| this.parms.countyCode = cmd; | |||
| this.parms.townCode = null; | |||
| }, | |||
| chooseTown(cmd) { | |||
| this.townCode = cmd; | |||
| this.parms.townCode = cmd; | |||
| this.getTaskList(); | |||
| }, | |||
| isCurrentMonth(m) { | |||
| return parseInt(this.month) === m; | |||
| }, | |||
| chooseMonth(month) { | |||
| this.month = month >= 10 ? '' + month : ('0' + month); | |||
| chooseMonth(year, month) { | |||
| this.getTaskList(); | |||
| }, | |||
| }, | |||
| @@ -221,19 +180,19 @@ export default { | |||
| cityName() { | |||
| if(!this.deptOptions.length) | |||
| 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 : ''; | |||
| }, | |||
| townList() { | |||
| if(!this.deptOptions.length) | |||
| 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 || [] : []; | |||
| }, | |||
| townName() { | |||
| if(!this.townList.length) | |||
| 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 : ''; | |||
| }, | |||
| }, | |||
| @@ -84,7 +84,7 @@ | |||
| </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> | |||
| @@ -97,7 +97,7 @@ import RightYearMonthSelector from "@/components/framework/RightYearMonthSelecto | |||
| import {date, date_format} from "@/utils/date"; | |||
| import {cityTree} from "@/api/misc/misc_dept"; | |||
| import {ENV} from "@/utils/env"; | |||
| import {processedTaskList} from "@/api/agentcenter/accounting_task"; | |||
| import {accountingProcessedTaskList} from "@/api/agentcenter/accounting_task"; | |||
| export default { | |||
| name: "processed", | |||
| @@ -105,13 +105,15 @@ export default { | |||
| data() { | |||
| return { | |||
| deptOptions: [], | |||
| cityCode: null, | |||
| townCode: null, | |||
| list: [], | |||
| total: 0, | |||
| year: date_format('%Y'), | |||
| month: date_format('%m'), | |||
| overdue: 0, | |||
| parms: { | |||
| countyCode: null, | |||
| townCode: null, | |||
| orderYear: date_format('%Y'), | |||
| orderMonth: date_format('%m'), | |||
| }, | |||
| } | |||
| }, | |||
| created() { | |||
| @@ -122,27 +124,22 @@ export default { | |||
| cityTree({rootId: ENV.UserDeptId()}).then((resp) => { | |||
| this.deptOptions = resp.data; | |||
| if(this.deptOptions.length) | |||
| this.cityCode = this.deptOptions[0].orgCode; | |||
| this.parms.countyCode = this.deptOptions[0].orgCode; | |||
| }); | |||
| }, | |||
| chooseCity(cmd) { | |||
| this.cityCode = cmd; | |||
| this.townCode = null; | |||
| this.parms.countyCode = cmd; | |||
| this.parms.townCode = null; | |||
| this.getTaskList(); | |||
| }, | |||
| chooseTown(cmd) { | |||
| this.townCode = cmd; | |||
| this.parms.townCode = cmd; | |||
| this.getTaskList(); | |||
| }, | |||
| getTaskList() { | |||
| if(!this.cityCode || !this.year || !this.month) | |||
| if(!this.parms.countyCode || !this.parms.orderYear || !this.parms.orderMonth) | |||
| 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.total = resp.total; | |||
| this.overdue = resp.overdue; | |||
| @@ -162,21 +159,21 @@ export default { | |||
| cityName() { | |||
| if(!this.deptOptions.length) | |||
| 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 : ''; | |||
| }, | |||
| townList() { | |||
| if(!this.deptOptions.length) | |||
| 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 || [] : [])]; | |||
| }, | |||
| townName() { | |||
| if(!this.townList.length) | |||
| return ''; | |||
| if(!this.townCode) | |||
| if(!this.parms.townCode) | |||
| 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 : ''; | |||
| }, | |||
| }, | |||
| @@ -65,7 +65,7 @@ | |||
| </el-table> | |||
| </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> | |||
| @@ -76,7 +76,7 @@ | |||
| <script> | |||
| import {cityTree} from "@/api/misc/misc_dept"; | |||
| 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 RightYearMonthSelector from "@/components/framework/RightYearMonthSelector.vue"; | |||
| @@ -86,12 +86,14 @@ export default { | |||
| data() { | |||
| return { | |||
| deptOptions: [], | |||
| cityCode: null, | |||
| townCode: null, | |||
| list: [], | |||
| total: 0, | |||
| year: date_format('%Y'), | |||
| month: date_format('%m'), | |||
| parms: { | |||
| countyCode: null, | |||
| townCode: null, | |||
| orderYear: date_format('%Y'), | |||
| orderMonth: date_format('%m'), | |||
| }, | |||
| } | |||
| }, | |||
| created() { | |||
| @@ -102,25 +104,21 @@ export default { | |||
| cityTree({rootId: ENV.UserDeptId()}).then((resp) => { | |||
| this.deptOptions = resp.data; | |||
| if(this.deptOptions.length) | |||
| this.cityCode = this.deptOptions[0].orgCode; | |||
| this.parms.countyCode = this.deptOptions[0].orgCode; | |||
| }); | |||
| }, | |||
| chooseCity(cmd) { | |||
| this.cityCode = cmd; | |||
| this.townCode = null; | |||
| this.parms.countyCode = cmd; | |||
| this.parms.townCode = null; | |||
| }, | |||
| chooseTown(cmd) { | |||
| this.townCode = cmd; | |||
| this.parms.townCode = cmd; | |||
| this.getTaskList(); | |||
| }, | |||
| getTaskList() { | |||
| if(!this.townCode || !this.year || !this.month) | |||
| if(!this.parms.townCode || !this.parms.orderYear || !this.parms.orderMonth) | |||
| return; | |||
| todoTaskList({ | |||
| townCode: this.townCode, | |||
| orderYear: this.year, | |||
| orderMonth: this.month, | |||
| }).then((resp) => { | |||
| accountingTodoTaskList(this.parms).then((resp) => { | |||
| this.list = resp.rows; | |||
| this.total = resp.total; | |||
| }) | |||
| @@ -139,19 +137,19 @@ export default { | |||
| cityName() { | |||
| if(!this.deptOptions.length) | |||
| 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 : ''; | |||
| }, | |||
| townList() { | |||
| if(!this.deptOptions.length) | |||
| 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 || [] : []; | |||
| }, | |||
| townName() { | |||
| if(!this.townList.length) | |||
| 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 : ''; | |||
| }, | |||
| }, | |||