任务管理时间 字典

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" v-if="paging"
class="pagination" class="pagination"
> >
<!-- v-if="paging.total / paging.size > 1" -->
<!-- v-show="paging.total>0" -->
<el-pagination <el-pagination
background background
v-if="paging.total / paging.size > 1" v-show="paging.total>0"
:current-page.sync="paging.page" :current-page.sync="paging.page"
:page-size="paging.size" :page-size="paging.size"
:total="paging.total" :total="paging.total"

@ -6,17 +6,19 @@
size="small" size="small"
:inline="true" :inline="true"
v-show="showSearch" v-show="showSearch"
label-width="100px" label-width="80px"
> >
<el-form-item label="任务日期"> <el-form-item label="任务日期">
<el-date-picker <el-date-picker
v-model="value1" v-model="value1"
style="width: 240px" label-width="180px"
value-format="yyyy-MM-dd" style="width: 340px"
type="daterange" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-" range-separator="-"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
:default-time="['00:00:00', '00:00:00']"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
@ -267,6 +269,7 @@
<script> <script>
import { getBasePointGroup, updatePoint, addPoint } from '@/api/wcs/base/agvPoint.js' import { getBasePointGroup, updatePoint, addPoint } from '@/api/wcs/base/agvPoint.js'
import { getWcsDeviceList } from '@/api/wcs/base/wcsDevice.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 { queryTaskManagement, reissueTask, cancelTask } from '@/api/wcs/busFunctions/taskManagement.js'
import moment from 'moment' import moment from 'moment'
// import { getTableHeader } from '@/api/wms/tableHeader/table' // import { getTableHeader } from '@/api/wms/tableHeader/table'
@ -283,7 +286,7 @@ export default {
size: 50, // size: 50, //
total: 0 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: [], devNameArr: [],
@ -312,52 +315,35 @@ export default {
label: '任务状态', label: '任务状态',
prop: 'taskStatus', prop: 'taskStatus',
istrue: true, istrue: true,
filter(row) { filter(row, value) {
// console.log(row, value) return getDictLabel(value, _that.dict.type.task_status)
// 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) {
// // 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: '任务类型', label: '任务类型',
prop: 'taskType', prop: 'taskType',
istrue: true, istrue: true,
filter(row) { filter(row, value) {
// console.log(row, value) return getDictLabel(value, _that.dict.type.task_type)
// 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 '--'
}
} }
}, },
{ {
@ -395,6 +381,8 @@ export default {
disable(row, prop) { disable(row, prop) {
if (row.taskStatus == '2') { if (row.taskStatus == '2') {
return true return true
} else if (row.taskStatus == '0') {
return true
} }
} }
}, },
@ -404,6 +392,10 @@ export default {
disable(row, prop) { disable(row, prop) {
if (row.taskStatus == '2') { if (row.taskStatus == '2') {
return true return true
} else if (row.taskStatus == '0') {
return true
} else if (row.taskStatus == '3') {
return true
} }
} }
} }
@ -627,7 +619,7 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { 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() this.handleQuery()
}, },
// //

Loading…
Cancel
Save