Commit 01f6a95e authored by 周毅's avatar 周毅

修改页面

parent 15dabe91
......@@ -7,6 +7,7 @@
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="akck(ctx.basePage)" size='mini' type="primary">新增</el-button>
<el-button @click="close(ctx.basePage)" size='mini' type="primary">关闭</el-button>
</template>
</BasePage>
......@@ -103,16 +104,16 @@
var result = "";
if (days > 0) {
result += days + "";
result += days + "";
}
if (hours > 0) {
result += hours + " 小时 ";
result += hours + "小时";
}
if (minutes > 0) {
result += minutes + " 分钟 ";
result += minutes + "分钟";
}
if (seconds > 0) {
result += seconds + "";
result += seconds + "";
}
return result;
......@@ -215,6 +216,23 @@
ctx.DialogTitle = '选择库存'
ctx.DialogWidth = '80vw'
ctx.showDialog = true
},
close(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
this.$post('lxyl/ckgl/ckrw/lkck/close',{
id:ctx.singleItem.id
}).then(res=>{
if(res.success){
this.$success('任务关闭成功!')
ctx.refresh()
}
})
}else{
this.warning('请选择一条数据!')
}
}
},
components: {
......
......@@ -116,7 +116,7 @@
},
{
label: '单据编号',
prop: 'djidinfo',
prop: 'djid',
span: 6,
type: 'input',
value: ''
......
......@@ -101,7 +101,7 @@
{
title: "耗时",
field: "timespan",
width: 180,
width: 140,
formatter(a, b, duration) {
if (duration == 0 || !duration) {
return "0";
......@@ -113,16 +113,16 @@
var result = "";
if (days > 0) {
result += days + "";
result += days + "";
}
if (hours > 0) {
result += hours + " 小时 ";
result += hours + "小时";
}
if (minutes > 0) {
result += minutes + " 分钟 ";
result += minutes + "分钟";
}
if (seconds > 0) {
result += seconds + "";
result += seconds + "";
}
return result;
......@@ -255,7 +255,7 @@
close(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
this.$post('lxyl/ckgl/ckrw/lkck/close',{
this.$post('lxyl/rkgl/sjrw/lkrk/close',{
id:ctx.singleItem.id
}).then(res=>{
if(res.success){
......
......@@ -29,7 +29,7 @@
config: {
/* 基本配置*/
url: 'wms/rkgl/mpzy/query/rktz',
queryUrl:'wms/rkgl/mpzy/query/rktz',
queryUrl:'wms/sjrw/query/rktz',
tableTitle: [
{
title: "状态",
......
......@@ -5,6 +5,7 @@
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="start(ctx.basePage)" size='mini' type="primary">开始</el-button>
<el-button @click="close(ctx.basePage)" size='mini' type="primary">关闭</el-button>
</template>
......@@ -42,10 +43,10 @@
"label": "name",
"value": "id"
},
width: 120
width: 80
},
{
title: "任务类型",
title: "类型",
field: "type",
"transform": {
"url": "lxyl/wcs/lkrw/init/type",
......@@ -53,9 +54,9 @@
"value": "id"
},
width: 120
width: 80
}, {
title: "号",
title: "任务号",
field: "djid",
fieldType: "upper",
width: 140
......@@ -86,21 +87,6 @@
field: "rqCode",
width: 140
},
{
title: "设备",
field: "deviceName",
width: 140
},
{
title: "单据来源",
field: "djly",
"transform": {
"url": "lxyl/wcs/lkrw/init/djly",
"label": "name",
"value": "id"
},
width: 120
},
{
title: "开始时间",
field: "kssj",
......@@ -114,7 +100,7 @@
{
title: "耗时",
field: "timespan",
width: 180,
width: 140,
formatter(a, b, duration) {
if (duration == 0 || !duration) {
return "0";
......@@ -126,16 +112,16 @@
var result = "";
if (days > 0) {
result += days + "";
result += days + "";
}
if (hours > 0) {
result += hours + " 小时 ";
result += hours + "小时";
}
if (minutes > 0) {
result += minutes + " 分钟 ";
result += minutes + "分钟";
}
if (seconds > 0) {
result += seconds + "";
result += seconds + "";
}
return result;
......@@ -148,12 +134,27 @@
width: 200
},
{
title: "维护人",
field: "whr"
title: "设备",
field: "hjName",
width: 140
},
{
title: "单据来源",
field: "djly",
"transform": {
"url": "lxyl/wcs/lkrw/init/djly",
"label": "name",
"value": "id"
},
width: 120
},
{
title: "创建人",
field: "cjr"
},
{
title: "维护时间",
field: "whsj",
title: "创建时间",
field: "cjsj",
fieldType: "ftDateTime"
},
],
......@@ -194,6 +195,22 @@
// demo(basePage){
// }
start(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
this.$post('lxyl/wcs/lkrw/start',{
id:ctx.singleItem.id
}).then(res=>{
if(res.success){
this.$success('任务启动成功!')
ctx.refresh()
}
})
}else{
this.warning('请选择一条数据!')
}
},
close(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
this.$post('lxyl/wcs/lkrw/close',{
......
......@@ -6,9 +6,9 @@
<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>
<el-button @click="execute(ctx.basePage)" size='mini' type="primary">手动执行</el-button>
<el-button @click="complete(ctx.basePage)" size='mini' type="primary">完成</el-button>
<el-button @click="close(ctx.basePage)" size='mini' type="primary">关闭</el-button>
</template>
</BasePage>
......@@ -41,7 +41,7 @@
{
title: "状态",
field: "zt",
width: 140,
width: 80,
transform: {
"url": "lxyl/wcs/wcsTask/init/zt",
"label": "name",
......@@ -49,14 +49,9 @@
}
},
{
title: "任务号",
field: "djid",
width: 140
},
{
title: "任务类型",
title: "类型",
field: "type",
width: 140,
width: 80,
transform: {
"url": "lxyl/wcs/wcsTask/init/type",
"label": "name",
......@@ -64,14 +59,9 @@
}
},
{
title: "业务类型",
field: "djly",
width: 140,
transform: {
"url": "lxyl/wcs/wcsTask/init/djly",
"label": "name",
"value": "id"
}
title: "任务号",
field: "djid",
width: 140
},
{
title: "起始位",
......@@ -89,26 +79,11 @@
},
width: 140,
},
{
title: "容器",
field: "rqCode",
width: 140,
},
// {
// title: "工位",
// field: "gwName",
// width: 140,
// },
{
title: "来源单号",
field: "lydh",
width: 140,
// formatter:(row,b,v)=>{
// let id=row.sjtzDjid||row.jhtzDjid||row.kccjDjid
// return id
// }
},
{
title: "开始时间",
field: "kssj",
......@@ -122,31 +97,61 @@
{
title: "耗时",
field: "timespan",
width: 140,
formatter(a, b, duration) {
if(duration==0||!duration){
return 0
}else{
var milliseconds = parseInt((duration % 1000) / 100),
seconds = Math.floor((duration / 1000) % 60),
minutes = Math.floor((duration / (1000 * 60)) % 60),
hours = Math.floor((duration / (1000 * 60 * 60)) % 24);
if (duration == 0 || !duration) {
return "0";
} else {
var days = Math.floor(duration / (1000 * 60 * 60 * 24));
var hours = Math.floor((duration % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((duration % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((duration % (1000 * 60)) / 1000);
hours = (hours < 10) ? "0" + hours : hours;
minutes = (minutes < 10) ? "0" + minutes : minutes;
seconds = (seconds < 10) ? "0" + seconds : seconds;
var result = "";
if (days > 0) {
result += days + "天";
}
if (hours > 0) {
result += hours + "小时";
}
if (minutes > 0) {
result += minutes + "分";
}
if (seconds > 0) {
result += seconds + "秒";
}
return hours + ":" + minutes + ":" + seconds + "." + milliseconds;
return result;
}
}
},
{
title: "维护人",
field: "whr"
title: "业务类型",
field: "djly",
width: 140,
transform: {
"url": "lxyl/wcs/wcsTask/init/djly",
"label": "name",
"value": "id"
}
},
{
title: "维护时间",
field: "whsj",
title: "来源单号",
field: "lydh",
width: 140,
// formatter:(row,b,v)=>{
// let id=row.sjtzDjid||row.jhtzDjid||row.kccjDjid
// return id
// }
},
{
title: "创建人",
field: "cjr"
},
{
title: "创建时间",
field: "cjsj",
fieldType: "ftDateTime"
},
],
......@@ -230,16 +235,14 @@
},
methods: {
ksrw(ctx){
execute(ctx){
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', {
this.$confirm('确定要重新执行任务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
ctx.$refs.TablePager.loading=true
this.$post('lxyl/wcs/wcsTask/start', {
id: ctx.singleItem.id
}).then(res => {
......@@ -256,9 +259,9 @@
this.$warning('请选中一条数据')
}
},
qxrw(ctx){
close(ctx){
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', {
this.$confirm('确定要关闭任务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......@@ -280,9 +283,9 @@
this.$warning('请选中一条数据')
}
},
wcrw(ctx){
complete(ctx){
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', {
this.$confirm('确定要完成任务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......
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