Commit 27a20435 authored by 李苏's avatar 李苏 💬

wcs tasl manage

parent da766bc8
<template>
<BasePage class="min_full" :config="config" >
<template #dialog="ctx" >
<BasePage :power="power" class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx" >
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
<el-button @click="ksrw(ctx.basePage)" size='mini' type="primary">开始任务</el-button>
<el-button @click="qxrw(ctx.basePage)" size='mini' type="primary">取消任务</el-button>
<el-button @click="wcrw(ctx.basePage)" size='mini' type="primary">完成任务</el-button>
</template>
</BasePage>
......@@ -13,72 +16,235 @@
<script>
import Edit from './edit.vue'
export default{
data(){
return{
config:{
export default {
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: true,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url:'jcsj/gysfl',
tableTitle: [
{title: "编码", field: "code", fieldType:"upper", width: 140},
{title: "名称", field: "name", width: 140},
{title: "停用", field: "tybz",fieldType:"tybz"},
{title: "停用日期", field: "tyrq", fieldType:"ftDate"},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"},
url: 'lxyl/wcs/wcsTask',
tableTitle: [{
title: "任务号",
field: "djid",
width: 140
},
{
title: "任务类型",
field: "type",
width: 140,
transform: {
"url": "lxyl/wcs/wcsTask/init/rlzt",
"label": "name",
"value": "id"
}
},
{
title: "业务类型",
field: "djly",
width: 140,
transform: {
"url": "lxyl/wcs/wcsTask/init/djly",
"label": "name",
"value": "id"
}
},
{
title: "库位",
field: "kwName",
width: 140,
},
{
title: "工位",
field: "gwName",
width: 140,
},
{
title: "开始时间",
field: "kssj",
fieldType: "ftDateTime"
},
{
title: "结束时间",
field: "jssj",
fieldType: "ftDateTime"
},
{
title: "耗时(ms)",
field: "timespan",
width: 140,
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
],
queryParams:[[
queryParams: [
[{
label: '日期',
startProp: "start",
endProp: "end",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value:''
label: '任务类型',
prop: 'type',
span: 4,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "lxyl/wcs/wcsTask/init/type",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '名称',
prop: 'name',
span: 6,
type: 'input',
value:''
"label": "状态",
"prop": "zt",
"span": 4,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "lxyl/wcs/wcsTask/init/zt",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '任务号',
prop: 'djid',
span: 4,
type: 'input',
value: ''
},
]],
/* 默认启停用 */
showqt:true,
// qtUrl:'',
/* 树的支持*/
// hasTree:false,
// treeTitle:'',
// treeDefaultProps: {
// children: 'children',
// label: 'name',
// fatherId: 'pid',
// sonId: 'id',
// rootName: "全部",
// rootId:'root'
// },
// treeQueryParams:{
// },
// treeUrl:''
],
[{
"label": "业务类型",
"prop": "djly",
"span": 4,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "lxyl/wcs/wcsTask/init/djly",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '业务单号',
prop: 'lydjDjid',
span: 4,
type: 'input',
value: ''
},
]
],
}
}
},
methods: {
ksrw(ctx){
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('lxyl/wcs/wcsTask/init/begin', {
id: ctx.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.refresh()
}
})
})
} else {
this.$warning('请选中一条数据')
}
},
qxrw(ctx){
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('lxyl/wcs/wcsTask/init/cancel', {
id: ctx.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.refresh()
}
})
})
} else {
this.$warning('请选中一条数据')
}
},
wcrw(ctx){
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
this.$post('lxyl/wcs/wcsTask/init/complete', {
id: ctx.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.refresh()
}
})
})
} else {
this.$warning('请选中一条数据')
}
}
/* 示例*/
// demo(basePage){
// }
},
components:{
components: {
Edit
}
}
</script>
<style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment