소스 검색

完成任务

master
zhaodengke 1 년 전
부모
커밋
95bbcba612
3개의 변경된 파일30개의 추가작업 그리고 7개의 파일을 삭제
  1. +9
    -0
      src/api/agentcenter/accounting_task.js
  2. +3
    -0
      src/views/processed/processed.vue
  3. +18
    -7
      src/views/taskAllocation/todo.vue

+ 9
- 0
src/api/agentcenter/accounting_task.js 파일 보기

@@ -17,3 +17,12 @@ export function accountingProcessedTaskList(params) {
params: params, params: params,
}) })
} }

// 完成任务
export function finishTask(data) {
return request({
url: '/accounting/task/finish',
method: 'post',
data: data,
})
}

+ 3
- 0
src/views/processed/processed.vue 파일 보기

@@ -124,7 +124,10 @@ 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.parms.countyCode = this.deptOptions[0].orgCode; this.parms.countyCode = this.deptOptions[0].orgCode;
this.getTaskList();
}
}); });
}, },
chooseCity(cmd) { chooseCity(cmd) {


+ 18
- 7
src/views/taskAllocation/todo.vue 파일 보기

@@ -23,8 +23,7 @@
<span class="sanjiao-right"></span> <span class="sanjiao-right"></span>
<p>{{townName}}</p> <p>{{townName}}</p>
</div> </div>
<div class="select_address">
</div>
<!-- <div class="select_address"></div>-->
</div> </div>
<el-dropdown-menu slot="dropdown" style="width: 16vw;text-align: center;"> <el-dropdown-menu slot="dropdown" style="width: 16vw;text-align: center;">
<el-dropdown-item v-for="(item,index) in townList"> <el-dropdown-item v-for="(item,index) in townList">
@@ -57,7 +56,7 @@
<el-table-column prop="endAt" label="截止日期" sortable /> <el-table-column prop="endAt" label="截止日期" sortable />
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit"></el-button>
<el-button type="primary" size="mini" icon="el-icon-edit" @click="finishTask(scope.row)"></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -74,7 +73,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 {accountingTodoTaskList} from "@/api/agentcenter/accounting_task";
import {accountingTodoTaskList, finishTask} 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";


@@ -102,19 +101,23 @@ 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.parms.countyCode = this.deptOptions[0].orgCode; this.parms.countyCode = this.deptOptions[0].orgCode;
this.getTaskList();
}
}); });
}, },
chooseCity(cmd) { chooseCity(cmd) {
this.parms.countyCode = cmd; this.parms.countyCode = cmd;
this.parms.townCode = null; this.parms.townCode = null;
this.getTaskList();
}, },
chooseTown(cmd) { chooseTown(cmd) {
this.parms.townCode = cmd; this.parms.townCode = cmd;
this.getTaskList(); this.getTaskList();
}, },
getTaskList() { getTaskList() {
if(!this.parms.townCode || !this.parms.orderYear || !this.parms.orderMonth)
if(!this.parms.countyCode || !this.parms.orderYear || !this.parms.orderMonth)
return; return;
accountingTodoTaskList(this.parms).then((resp) => { accountingTodoTaskList(this.parms).then((resp) => {
this.list = resp.rows; this.list = resp.rows;
@@ -127,6 +130,14 @@ export default {
dateFormatter(row, column, cellValue, index) { dateFormatter(row, column, cellValue, index) {
return cellValue ? date(cellValue, 'yyyy-MM-dd HH:mm:ss', 'yyyy-MM-dd') : ''; return cellValue ? date(cellValue, 'yyyy-MM-dd HH:mm:ss', 'yyyy-MM-dd') : '';
}, },
finishTask(row) {
finishTask({
taskId: row.id,
}).then((resp) => {
this.$message.success('完成成功');
this.getTaskList();
});
},
}, },
mounted(){ mounted(){


@@ -222,8 +233,8 @@ export default {
align-items: center; align-items: center;
& .select_address:nth-child(1){ & .select_address:nth-child(1){
margin-right: 0vw; margin-right: 0vw;
border-top-right-radius: initial;
border-bottom-right-radius: initial;
/* border-top-right-radius: initial;
border-bottom-right-radius: initial;*/
} }
& .select_address:nth-child(2){ & .select_address:nth-child(2){
margin-right: 0vw; margin-right: 0vw;


불러오는 중...
취소
저장