任务管理时间 字典

master
Mr.sun 2 years ago
parent 0f19bd8a4a
commit ad326f5d98
  1. 4
      src/components/heavyTable/index.vue
  2. 84
      src/views/taskManagement/index.vue

@ -141,9 +141,11 @@
v-if="paging"
class="pagination"
>
<!-- v-if="paging.total / paging.size > 1" -->
<!-- v-show="paging.total>0" -->
<el-pagination
background
v-if="paging.total / paging.size > 1"
v-show="paging.total>0"
:current-page.sync="paging.page"
:page-size="paging.size"
:total="paging.total"

@ -6,17 +6,19 @@
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
label-width="80px"
>
<el-form-item label="任务日期">
<el-date-picker
v-model="value1"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
label-width="180px"
style="width: 340px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '00:00:00']"
></el-date-picker>
</el-form-item>
@ -267,6 +269,7 @@
<script>
import { getBasePointGroup, updatePoint, addPoint } from '@/api/wcs/base/agvPoint.js'
import { getWcsDeviceList } from '@/api/wcs/base/wcsDevice.js'
import { getDictLabel } from '@/utils/index'
import { queryTaskManagement, reissueTask, cancelTask } from '@/api/wcs/busFunctions/taskManagement.js'
import moment from 'moment'
// import { getTableHeader } from '@/api/wms/tableHeader/table'
@ -283,7 +286,7 @@ export default {
size: 50, //
total: 0
},
value1: [moment().locale('zh-cn').format('yyyy-MM-DD'), moment().locale('zh-cn').format('yyyy-MM-DD')],
value1: [moment().locale('zh-cn').format('yyyy-MM-DD 00:00:00'), moment().locale('zh-cn').add(1, 'days').format('yyyy-MM-DD 00:00:00')],
//
devNameArr: [],
@ -312,52 +315,35 @@ export default {
label: '任务状态',
prop: 'taskStatus',
istrue: true,
filter(row) {
// console.log(row, value)
// console.log(row)
if (row.taskStatus == '0') {
return '未下发'
} else if (row.taskStatus == '1') {
return '执行中'
} else if (row.taskStatus == '2') {
return '已完成'
} else if (row.taskStatus == '3') {
return '已取消'
} else if (row.taskStatus == '-1') {
return '异常'
} else if (row.taskStatus == '4') {
return 'a到b任务完成'
} else {
return row.taskStatus
}
filter(row, value) {
return getDictLabel(value, _that.dict.type.task_status)
}
// filter(row) {
// // console.log(row, value)
// // console.log(row)
// if (row.taskStatus == '0') {
// return ''
// } else if (row.taskStatus == '1') {
// return ''
// } else if (row.taskStatus == '2') {
// return ''
// } else if (row.taskStatus == '3') {
// return ''
// } else if (row.taskStatus == '-1') {
// return ''
// } else if (row.taskStatus == '4') {
// return 'ab'
// } else {
// return row.taskStatus
// }
// }
},
{
label: '任务类型',
prop: 'taskType',
istrue: true,
filter(row) {
// console.log(row, value)
// console.log(row)
if (row.taskType == '1') {
return '注塑缴库'
} else if (row.taskType == '2') {
return '人工缴库'
} else if (row.taskType == '3') {
return '领料出库'
} else if (row.taskType == '4') {
return '人工叫料'
} else if (row.taskType == '5') {
return '空台车入库'
} else if (row.taskType == '6') {
return '台车出库'
} else if (row.taskType == '7') {
return '四向车换层'
} else if (row.taskType == '8') {
return '锁定库存出库'
} else {
return '--'
}
filter(row, value) {
return getDictLabel(value, _that.dict.type.task_type)
}
},
{
@ -395,6 +381,8 @@ export default {
disable(row, prop) {
if (row.taskStatus == '2') {
return true
} else if (row.taskStatus == '0') {
return true
}
}
},
@ -404,6 +392,10 @@ export default {
disable(row, prop) {
if (row.taskStatus == '2') {
return true
} else if (row.taskStatus == '0') {
return true
} else if (row.taskStatus == '3') {
return true
}
}
}
@ -627,7 +619,7 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
;(this.value1 = [moment().locale('zh-cn').format('yyyy-MM-DD 07:30:00'), moment().locale('zh-cn').add(1, 'days').format('yyyy-MM-DD 07:30:00')]), this.resetForm('queryForm')
this.handleQuery()
},
//

Loading…
Cancel
Save