|
@@ -44,9 +44,14 @@
|
|
|
>{{ row.workOrderCode }}
|
|
>{{ row.workOrderCode }}
|
|
|
</el-link>
|
|
</el-link>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template v-slot:disposalStatus="{ row }">
|
|
|
|
|
+ <el-tag v-if="row.disposalStatus == 1" type="success">已接受</el-tag>
|
|
|
|
|
+ <el-tag v-if="row.disposalStatus == 2" type="danger">已拒绝</el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
<el-link
|
|
<el-link
|
|
|
- v-if="tabValue == '2'"
|
|
|
|
|
|
|
+ v-if="tabValue == '2' && row.disposalStatus == '2'"
|
|
|
:underline="false"
|
|
:underline="false"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
@click="reassignTask(row)"
|
|
@click="reassignTask(row)"
|
|
@@ -56,11 +61,58 @@
|
|
|
:underline="false"
|
|
:underline="false"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
@click="details('report', row)"
|
|
@click="details('report', row)"
|
|
|
|
|
+ v-if="row.disposalStatus == '1' || tabValue == '2'"
|
|
|
>报工
|
|
>报工
|
|
|
</el-link>
|
|
</el-link>
|
|
|
- <el-link :underline="false" type="primary" @click="viewRecords(row.id)"
|
|
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="viewRecords(row.id)"
|
|
|
|
|
+ v-if="row.disposalStatus == '1' || tabValue == '2'"
|
|
|
>报工记录
|
|
>报工记录
|
|
|
</el-link>
|
|
</el-link>
|
|
|
|
|
+
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
|
+ icon="el-icon-info"
|
|
|
|
|
+ title="确定接收任务吗?"
|
|
|
|
|
+ @confirm="receiveTask(row.id, '1')"
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ row.disposalStatus != '1' &&
|
|
|
|
|
+ row.disposalStatus != '2' &&
|
|
|
|
|
+ tabValue != '2'
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button slot="reference" type="text">接收任务</el-button>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
|
+ icon="el-icon-info"
|
|
|
|
|
+ title="确定拒绝任务吗?"
|
|
|
|
|
+ @confirm="receiveTask(row.id, '2')"
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ row.disposalStatus != '1' &&
|
|
|
|
|
+ row.disposalStatus != '2' &&
|
|
|
|
|
+ tabValue != '2'
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button slot="reference" type="text">拒绝任务</el-button>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- <el-link
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="receiveTask(row)"
|
|
|
|
|
+ v-if="row.disposalStatus != '1'"
|
|
|
|
|
+ >接收任务
|
|
|
|
|
+ </el-link> -->
|
|
|
|
|
+
|
|
|
|
|
+ <!-- <el-link
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="rejectTask(row)"
|
|
|
|
|
+ v-if="row.disposalStatus != '1'"
|
|
|
|
|
+ >拒绝任务
|
|
|
|
|
+ </el-link> -->
|
|
|
</template>
|
|
</template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
<modifyDialog ref="modifyRef" />
|
|
<modifyDialog ref="modifyRef" />
|
|
@@ -69,6 +121,7 @@
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
title="选择人员"
|
|
title="选择人员"
|
|
|
:visible.sync="dialogFormVisible"
|
|
:visible.sync="dialogFormVisible"
|
|
|
|
|
+ v-if="dialogFormVisible"
|
|
|
width="30%"
|
|
width="30%"
|
|
|
center
|
|
center
|
|
|
>
|
|
>
|
|
@@ -107,8 +160,11 @@
|
|
|
import {
|
|
import {
|
|
|
pageByCurrentUser,
|
|
pageByCurrentUser,
|
|
|
pageByCurrentUserLeader,
|
|
pageByCurrentUserLeader,
|
|
|
- listUpdateRealTimeRecord
|
|
|
|
|
|
|
+ listUpdateRealTimeRecord,
|
|
|
|
|
+ taskManagement,
|
|
|
|
|
+ transferTasks
|
|
|
} from '@/api/workOrderList';
|
|
} from '@/api/workOrderList';
|
|
|
|
|
+ import { revokeWork } from '@/api/manufacture/spreadWorkOrder';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: { TaskSearch, Ddtails, modifyDialog },
|
|
components: { TaskSearch, Ddtails, modifyDialog },
|
|
@@ -122,7 +178,8 @@
|
|
|
{ label: '待下达', value: 8 }
|
|
{ label: '待下达', value: 8 }
|
|
|
],
|
|
],
|
|
|
form: {
|
|
form: {
|
|
|
- userId: ''
|
|
|
|
|
|
|
+ userId: '',
|
|
|
|
|
+ id: ''
|
|
|
},
|
|
},
|
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
|
teamList: []
|
|
teamList: []
|
|
@@ -348,6 +405,13 @@
|
|
|
// },
|
|
// },
|
|
|
width: 120
|
|
width: 120
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'disposalStatus',
|
|
|
|
|
+ label: '任务接收状态',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ slot: 'disposalStatus',
|
|
|
|
|
+ width: 120
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
prop: 'customerName',
|
|
prop: 'customerName',
|
|
|
label: '客户名称',
|
|
label: '客户名称',
|
|
@@ -384,35 +448,20 @@
|
|
|
},
|
|
},
|
|
|
created() {},
|
|
created() {},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- // console.log(
|
|
|
|
|
- // this.$hasPermission('mes:taskreport:myorder'),
|
|
|
|
|
- // this.$hasPermission('mes:taskreport:allorder')
|
|
|
|
|
- // );
|
|
|
|
|
|
|
+ if (this.$hasPermission('mes:taskreport:allorder')) {
|
|
|
|
|
+ this.tabValue = '2';
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (this.$hasPermission('mes:taskreport:myorder')) {
|
|
if (this.$hasPermission('mes:taskreport:myorder')) {
|
|
|
this.tabValue = '1';
|
|
this.tabValue = '1';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (this.$hasPermission('mes:taskreport:allorder')) {
|
|
|
|
|
- this.tabValue = '2';
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
if (
|
|
if (
|
|
|
!this.$hasPermission('mes:taskreport:myorder') &&
|
|
!this.$hasPermission('mes:taskreport:myorder') &&
|
|
|
!this.$hasPermission('mes:taskreport:allorder')
|
|
!this.$hasPermission('mes:taskreport:allorder')
|
|
|
) {
|
|
) {
|
|
|
this.tabValue = '';
|
|
this.tabValue = '';
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- // console.log(this.tabValue);
|
|
|
|
|
- // console.log(
|
|
|
|
|
- // this.$hasPermission('mes:taskreport:myorder'),
|
|
|
|
|
- // 'mes:taskreport:myorder'
|
|
|
|
|
- // );
|
|
|
|
|
- // console.log(
|
|
|
|
|
- // this.$hasPermission('mes:taskreport:allorder'),
|
|
|
|
|
- // 'mes:taskreport:allorder'
|
|
|
|
|
- // );
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
handleTabClick(e) {
|
|
handleTabClick(e) {
|
|
@@ -435,18 +484,59 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- chooseUser() {
|
|
|
|
|
|
|
+ async chooseUser() {
|
|
|
if (!this.form.userId) {
|
|
if (!this.form.userId) {
|
|
|
return this.$message.warning('请选择转派人员');
|
|
return this.$message.warning('请选择转派人员');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const data = this.teamList.find((it) => it.id == this.form.userId);
|
|
|
|
|
+
|
|
|
|
|
+ await transferTasks({
|
|
|
|
|
+ assigneeId: data.id,
|
|
|
|
|
+ assigneeName: data.name,
|
|
|
|
|
+ id: this.form.id
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
this.dialogFormVisible = false;
|
|
this.dialogFormVisible = false;
|
|
|
|
|
|
|
|
this.reload();
|
|
this.reload();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ async receiveTask(id, type) {
|
|
|
|
|
+ await taskManagement({
|
|
|
|
|
+ id,
|
|
|
|
|
+ disposalStatus: Number(type)
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // async receiveTask(item) {
|
|
|
|
|
+ // await taskManagement({
|
|
|
|
|
+ // id: item.id,
|
|
|
|
|
+ // disposalStatus: 1
|
|
|
|
|
+ // }).then((res) => {
|
|
|
|
|
+ // console.log(res);
|
|
|
|
|
+ // this.reload();
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
|
|
+
|
|
|
|
|
+ // async rejectTask(item) {
|
|
|
|
|
+ // await taskManagement({
|
|
|
|
|
+ // id: item.id,
|
|
|
|
|
+ // disposalStatus: 2
|
|
|
|
|
+ // }).then((res) => {
|
|
|
|
|
+ // console.log(res);
|
|
|
|
|
+ // this.reload();
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
|
|
+
|
|
|
async reassignTask(item) {
|
|
async reassignTask(item) {
|
|
|
this.form.userId = '';
|
|
this.form.userId = '';
|
|
|
|
|
+ this.form.id = item.id;
|
|
|
await getteampage({ name: item.assignTeamName }).then((res) => {
|
|
await getteampage({ name: item.assignTeamName }).then((res) => {
|
|
|
this.teamList = res.list[0].userVOList;
|
|
this.teamList = res.list[0].userVOList;
|
|
|
});
|
|
});
|