Commit 93a3de55 authored by 李苏's avatar 李苏 💬

调整

parent 77764da1
...@@ -82,16 +82,21 @@ ...@@ -82,16 +82,21 @@
title: "耗时", title: "耗时",
field: "timespan", field: "timespan",
formatter(a, b, duration) { formatter(a, b, duration) {
var milliseconds = parseInt((duration % 1000) / 100), if(duration==0){
seconds = Math.floor((duration / 1000) % 60), return 0
minutes = Math.floor((duration / (1000 * 60)) % 60), }else{
hours = Math.floor((duration / (1000 * 60 * 60)) % 24); 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);
hours = (hours < 10) ? "0" + hours : hours; hours = (hours < 10) ? "0" + hours : hours;
minutes = (minutes < 10) ? "0" + minutes : minutes; minutes = (minutes < 10) ? "0" + minutes : minutes;
seconds = (seconds < 10) ? "0" + seconds : seconds; seconds = (seconds < 10) ? "0" + seconds : seconds;
return hours + ":" + minutes + ":" + seconds + "." + milliseconds;
}
return hours + ":" + minutes + ":" + seconds + "." + milliseconds;
} }
}, },
{ {
......
<template> <template>
<BasePage @getRow='getRow' :power='power' class="min_full" style="height: 100%;" :config="config"> <BasePage ref="basePage" @getRow='getRow' :power='power' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Xzgw @saveGw='saveGw' :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="sj(ctx.basePage)" size='mini' type="primary">上架</el-button>
</template> </template>
...@@ -14,6 +16,7 @@ ...@@ -14,6 +16,7 @@
<script> <script>
import Edit from './edit.vue' import Edit from './edit.vue'
import Xzgw from './xzgw.vue'
export default { export default {
data() { data() {
...@@ -205,10 +208,33 @@ ...@@ -205,10 +208,33 @@
}, },
methods: { methods: {
saveGw(form){
let params={
gwid:form.gwid,
rqid:form.rqid
}
this.$post('lxyl/rkgl/sjrw/lkrk/start',params).then(res=>{
if(res.success){
this.$refs.basePage.refresh()
}
})
},
sj(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
ctx.DialogTitle='上架选择工位'
ctx.DialogWidth='30vw'
ctx.showDialog=true
}else{
this.warning('请选中一条数据')
}
}
}, },
components: { components: {
Edit Edit,Xzgw
} }
} }
......
<template>
<DefaultDialog v-loading='isLoading' :element-loading-text="text" :app='app'>
<div slot="form" style="">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this" class="editRow">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
v-if="(item.show==false)?false:true" :prop='item.prop' :key="item.prop" :type="item.type"
:typeConfig='item.typeConfig' :rule="item.rule" />
<!-- 额外数据 -->
</el-row>
</el-form>
</div>
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">确 定</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
props: {
app: {
type: Object,
default: () => {
return {}
}
}
},
async mounted() {
/* 初始化数据 */
},
data() {
return {
isLoading: false,
text: '加载中',
readonly: false,
editColItemList: [{
label: '工位',
prop: 'gwid',
span: 24,
required: true,
type: 'RelSelect',
typeConfig: {
src: 'lxyl/jcsj/ugw/query',
transform: {
value: 'id',
label: 'name'
}
}
},
]
}
},
methods: {
save() {
this.form.rqid=this.app.singleItem.rqid
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('saveGw',this.form)
this.app.showDialog=false
}
})
}
}
}
</script>
<style scoped>
</style>
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
<template #toolbar="ctx"> <template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> --> <!-- <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="ksrw(ctx.basePage)" size='mini' type="primary">开始</el-button>
<el-button @click="qxrw(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="wcrw(ctx.basePage)" size='mini' type="primary">完成</el-button>
</template> </template>
</BasePage> </BasePage>
...@@ -74,15 +74,22 @@ ...@@ -74,15 +74,22 @@
} }
}, },
{ {
title: "库位", title: "起始位",
field: "mbkwCode", field: "gwName",
formatter(row,b,v){
return row.kwName||row.gwName
},
width: 140, width: 140,
}, },
{ {
title: "工位", title: "目标位",
field: "gwName", field: "mbkwCode",
formatter(row,b,v){
return row.mbkwCode||row.mbgwCode||row.gwName
},
width: 140, width: 140,
}, },
{ {
title: "容器", title: "容器",
field: "rqCode", field: "rqCode",
...@@ -113,9 +120,25 @@ ...@@ -113,9 +120,25 @@
fieldType: "ftDateTime" fieldType: "ftDateTime"
}, },
{ {
title: "耗时(ms)", title: "耗时",
field: "timespan", field: "timespan",
width: 140, formatter(a, b, duration) {
if(duration==0){
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);
hours = (hours < 10) ? "0" + hours : hours;
minutes = (minutes < 10) ? "0" + minutes : minutes;
seconds = (seconds < 10) ? "0" + seconds : seconds;
return hours + ":" + minutes + ":" + seconds + "." + milliseconds;
}
}
}, },
{ {
title: "维护人", title: "维护人",
......
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