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

调整

parent 77764da1
......@@ -82,16 +82,21 @@
title: "耗时",
field: "timespan",
formatter(a, b, duration) {
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){
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;
hours = (hours < 10) ? "0" + hours : hours;
minutes = (minutes < 10) ? "0" + minutes : minutes;
seconds = (seconds < 10) ? "0" + seconds : seconds;
return hours + ":" + minutes + ":" + seconds + "." + milliseconds;
}
return hours + ":" + minutes + ":" + seconds + "." + milliseconds;
}
},
{
......
<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">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Xzgw @saveGw='saveGw' :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="sj(ctx.basePage)" size='mini' type="primary">上架</el-button>
</template>
......@@ -14,6 +16,7 @@
<script>
import Edit from './edit.vue'
import Xzgw from './xzgw.vue'
export default {
data() {
......@@ -205,10 +208,33 @@
},
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: {
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 @@
<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="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>
......@@ -74,15 +74,22 @@
}
},
{
title: "库位",
field: "mbkwCode",
title: "起始位",
field: "gwName",
formatter(row,b,v){
return row.kwName||row.gwName
},
width: 140,
},
{
title: "工位",
field: "gwName",
title: "目标位",
field: "mbkwCode",
formatter(row,b,v){
return row.mbkwCode||row.mbgwCode||row.gwName
},
width: 140,
},
{
title: "容器",
field: "rqCode",
......@@ -113,9 +120,25 @@
fieldType: "ftDateTime"
},
{
title: "耗时(ms)",
title: "耗时",
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: "维护人",
......
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