|
|
@@ -4,7 +4,7 @@
|
|
|
<task-search @search="reload"></task-search>
|
|
|
<!-- <taskDialog-search></taskDialog-search> -->
|
|
|
<el-tabs v-model="tabValue" type="card" @tab-click="handleTabClick">
|
|
|
- <!-- <el-tab-pane
|
|
|
+ <el-tab-pane
|
|
|
label="我的任务"
|
|
|
name="1"
|
|
|
v-if="$hasPermission('mes:taskreport:myorder')"
|
|
|
@@ -13,10 +13,10 @@
|
|
|
label="全部任务"
|
|
|
name="2"
|
|
|
v-if="$hasPermission('mes:taskreport:allorder')"
|
|
|
- ></el-tab-pane> -->
|
|
|
+ ></el-tab-pane>
|
|
|
|
|
|
- <el-tab-pane label="我的任务" name="1"></el-tab-pane>
|
|
|
- <el-tab-pane label="全部任务" name="2"></el-tab-pane>
|
|
|
+ <!-- <el-tab-pane label="我的任务" name="1"></el-tab-pane>
|
|
|
+ <el-tab-pane label="全部任务" name="2"></el-tab-pane> -->
|
|
|
</el-tabs>
|
|
|
</el-card>
|
|
|
<ele-pro-table
|
|
|
@@ -45,6 +45,13 @@
|
|
|
</el-link>
|
|
|
</template>
|
|
|
<template v-slot:action="{ row }">
|
|
|
+ <!-- <el-link
|
|
|
+ v-if="tabValue == '2'"
|
|
|
+ :underline="false"
|
|
|
+ type="primary"
|
|
|
+ @click="reassignTask(row)"
|
|
|
+ >转派
|
|
|
+ </el-link> -->
|
|
|
<el-link
|
|
|
:underline="false"
|
|
|
type="primary"
|
|
|
@@ -58,6 +65,37 @@
|
|
|
</ele-pro-table>
|
|
|
<modifyDialog ref="modifyRef" />
|
|
|
<Ddtails ref="detailsRef" @success="reload" />
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="选择人员"
|
|
|
+ :visible.sync="dialogFormVisible"
|
|
|
+ width="30%"
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <el-form :model="form">
|
|
|
+ <el-form-item label="人员">
|
|
|
+ <el-select
|
|
|
+ size="mini"
|
|
|
+ class="content_num"
|
|
|
+ filterable
|
|
|
+ v-model="form.userId"
|
|
|
+ placeholder="请选择任务人员"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in teamList"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :key="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="chooseUser">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -65,6 +103,7 @@
|
|
|
import TaskSearch from './components/task-search.vue';
|
|
|
import Ddtails from './components/Ddtails.vue';
|
|
|
import modifyDialog from '@/views/taskList/components/modifyDialog.vue';
|
|
|
+ import { getteampage } from '@/api/produceWord/index.js';
|
|
|
import {
|
|
|
pageByCurrentUser,
|
|
|
pageByCurrentUserLeader,
|
|
|
@@ -81,7 +120,12 @@
|
|
|
{ label: '待生产', value: 4 },
|
|
|
{ label: '生产中', value: 5 },
|
|
|
{ label: '待下达', value: 8 }
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ form: {
|
|
|
+ userId: ''
|
|
|
+ },
|
|
|
+ dialogFormVisible: false,
|
|
|
+ teamList: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -329,7 +373,7 @@
|
|
|
{
|
|
|
columnKey: 'action',
|
|
|
label: '操作',
|
|
|
- width: 150,
|
|
|
+ width: 200,
|
|
|
align: 'center',
|
|
|
resizable: false,
|
|
|
fixed: 'right',
|
|
|
@@ -340,25 +384,25 @@
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
- console.log(
|
|
|
- this.$hasPermission('mes:taskreport:myorder'),
|
|
|
- this.$hasPermission('mes:taskreport:allorder')
|
|
|
- );
|
|
|
+ // console.log(
|
|
|
+ // this.$hasPermission('mes:taskreport:myorder'),
|
|
|
+ // this.$hasPermission('mes:taskreport:allorder')
|
|
|
+ // );
|
|
|
|
|
|
- // if (this.$hasPermission('mes:taskreport:myorder')) {
|
|
|
- // this.tabValue = '1';
|
|
|
- // }
|
|
|
+ if (this.$hasPermission('mes:taskreport:myorder')) {
|
|
|
+ this.tabValue = '1';
|
|
|
+ }
|
|
|
|
|
|
- // if (this.$hasPermission('mes:taskreport:allorder')) {
|
|
|
- // this.tabValue = '2';
|
|
|
- // }
|
|
|
+ if (this.$hasPermission('mes:taskreport:allorder')) {
|
|
|
+ this.tabValue = '2';
|
|
|
+ }
|
|
|
|
|
|
- // if (
|
|
|
- // !this.$hasPermission('mes:taskreport:myorder') &&
|
|
|
- // !this.$hasPermission('mes:taskreport:allorder')
|
|
|
- // ) {
|
|
|
- // this.tabValue = '';
|
|
|
- // }
|
|
|
+ if (
|
|
|
+ !this.$hasPermission('mes:taskreport:myorder') &&
|
|
|
+ !this.$hasPermission('mes:taskreport:allorder')
|
|
|
+ ) {
|
|
|
+ this.tabValue = '';
|
|
|
+ }
|
|
|
|
|
|
// console.log(this.tabValue);
|
|
|
// console.log(
|
|
|
@@ -378,18 +422,38 @@
|
|
|
/* 表格数据源 */
|
|
|
datasource({ page, limit, where }) {
|
|
|
// console.log(this.tabValue, 'this.tabValue');
|
|
|
- // if (this.tabValue && this.tabValue != 0) {
|
|
|
- let api =
|
|
|
- this.tabValue === '1' ? pageByCurrentUser : pageByCurrentUserLeader;
|
|
|
- return api({
|
|
|
- ...where,
|
|
|
- pageNum: page,
|
|
|
- size: limit
|
|
|
+ if (this.tabValue && this.tabValue != 0) {
|
|
|
+ let api =
|
|
|
+ this.tabValue === '1' ? pageByCurrentUser : pageByCurrentUserLeader;
|
|
|
+ return api({
|
|
|
+ ...where,
|
|
|
+ pageNum: page,
|
|
|
+ size: limit
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ chooseUser() {
|
|
|
+ if (!this.form.userId) {
|
|
|
+ return this.$message.warning('请选择转派人员');
|
|
|
+ }
|
|
|
+
|
|
|
+ this.dialogFormVisible = false;
|
|
|
+
|
|
|
+ this.reload();
|
|
|
+ },
|
|
|
+
|
|
|
+ async reassignTask(item) {
|
|
|
+ this.form.userId = '';
|
|
|
+ await getteampage({ name: item.assignTeamName }).then((res) => {
|
|
|
+ this.teamList = res.list[0].userVOList;
|
|
|
});
|
|
|
- // } else {
|
|
|
- // return [];
|
|
|
- // }
|
|
|
+
|
|
|
+ this.dialogFormVisible = true;
|
|
|
},
|
|
|
+
|
|
|
reload(where) {
|
|
|
this.$refs.table.reload({ page: 1, where });
|
|
|
},
|
|
|
@@ -414,7 +478,11 @@
|
|
|
weight: row.weight,
|
|
|
quantity: row.quantity,
|
|
|
durationText: row.durationText,
|
|
|
- apsAssigneeId: row.id
|
|
|
+ apsAssigneeId: row.id,
|
|
|
+ batchNo: row.batchNo,
|
|
|
+ productCode: row.productCode,
|
|
|
+ productName: row.productName,
|
|
|
+ specification: row.specification
|
|
|
};
|
|
|
let form = {
|
|
|
realEndTime: row.realEndTime,
|