Commit 344d49be authored by 李苏's avatar 李苏 💬

功能调整

parent 505a3a30
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
width: 140 width: 140
}, },
{ {
title: "物料数量", title: "码盘数量",
field: "sl", field: "mpsl",
width: 140 width: 140
}, },
{ {
......
<template> <template>
<RelDialog bigTitle detailTable='MPZYMX' @getFormDetail='getFormDetail' width="70%" :type='type' :editApp='editApp' <RelDialog @getForm='getForm' bigTitle detailTable='MPZYMX' @getFormDetail='getFormDetail' width="70%" :type='type' :editApp='editApp'
:app='app' :buttonApp='buttonApp'> :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules"> <el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<!-- 弹框插件--> <!-- 弹框插件-->
...@@ -54,6 +54,33 @@ ...@@ -54,6 +54,33 @@
Mp Mp
}, },
methods: { methods: {
formatMilliseconds(milliseconds) {
// 将毫秒转换为秒
var seconds = Math.floor(milliseconds / 1000);
// 计算小时数
var hours = Math.floor(seconds / 3600);
// 计算分钟数
var minutes = Math.floor((seconds % 3600) / 60);
// 计算剩余的秒数
var remainingSeconds = seconds % 60;
// 构建时间字符串
var timeString = '';
if (hours > 0) {
timeString += hours + '小时 ';
}
if (minutes > 0) {
timeString += minutes + '分钟 ';
}
timeString += remainingSeconds + '秒';
return timeString;
},
getForm(form){
if(form.timespan){
form.transtimespan=this.formatMilliseconds(form.timespan)
}
},
mpSave(list) { mpSave(list) {
/* 可持续添加*/ /* 可持续添加*/
let iscf=false let iscf=false
...@@ -88,6 +115,34 @@ ...@@ -88,6 +115,34 @@
mounted() { mounted() {
this.form.zyrName=this.username this.form.zyrName=this.username
this.form.zyrid=this.userid this.form.zyrid=this.userid
/* add隐藏*/
let newItem=[
{
label: '开始时间',
prop: 'kssj',
span: 8,
type: 'datetime',
readonly:true,
},
{
label: '结束时间',
prop: 'jssj',
span: 8,
type: 'datetime',
readonly:true
},
{
label: '耗时',
prop: 'transtimespan',
span: 8,
type: 'input',
readonly:true
},
]
if(this.type!='add'){
newItem.forEach(item=> this.editColItemList.push(item))
}
}, },
data() { data() {
return { return {
...@@ -209,27 +264,7 @@ ...@@ -209,27 +264,7 @@
span: 16, span: 16,
type: 'input', type: 'input',
}, },
{
label: '开始时间',
prop: 'kssj',
span: 8,
type: 'datetime',
readonly:true
},
{
label: '结束时间',
prop: 'jssj',
span: 8,
type: 'datetime',
readonly:true
},
{
label: '耗时',
prop: 'hs',
span: 8,
type: 'input',
readonly:true
},
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<template #toolbar="ctx"> <template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="mpwc(ctx.basePage)" size='mini' type="primary">码盘完成</el-button> <el-button @click="mpwc(ctx.basePage)" size='mini' type="primary">码盘完成</el-button>
<el-button @click="qxwc(ctx.basePage)" size='mini' type="primary">取消完成</el-button>
</template> </template>
</BasePage> </BasePage>
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
<script> <script>
import Edit from './edit.vue' import Edit from './edit.vue'
export default { export default {
data() { data() {
return { return {
...@@ -185,6 +186,22 @@ ...@@ -185,6 +186,22 @@
getRow(val) { getRow(val) {
this.$emit('getRow', val) this.$emit('getRow', val)
}, },
qxwc(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
this.$post('wms/rkgl/mpzy/cancelComplete',{
id:ctx.singleItem.id
}).then(res=>{
if(res.success){
this.$success('操作成功')
ctx.refresh()
}
})
}else{
this.warning('请选中一条数据')
}
},
mpwc(ctx){ mpwc(ctx){
if(ctx.singleItem&&ctx.singleItem.id){ if(ctx.singleItem&&ctx.singleItem.id){
this.$post('wms/rkgl/mpzy/complete',{ this.$post('wms/rkgl/mpzy/complete',{
...@@ -195,11 +212,11 @@ ...@@ -195,11 +212,11 @@
ctx.refresh() ctx.refresh()
} }
}) })
}else{ }else{
this.warning('请选中一条数据') this.warning('请选中一条数据')
} }
} }
}, },
components: { components: {
......
...@@ -39,8 +39,8 @@ module.exports = { ...@@ -39,8 +39,8 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.30.254:18080/dmg`, // target: `http://192.168.30.254:18080/dmg`,
// target: `http://192.168.30.254:28084/erp`, // target: `http://192.168.30.254:28084/erp`,
// target: `http://192.168.30.103:9080/lxyl`, target: `http://192.168.30.111:9080/lxyl`,
target: `http://localhost:9080/lxyl`, // target: `http://localhost:9080/lxyl`,
// target:'http://192.168.30.105:9081/erp', // target:'http://192.168.30.105:9081/erp',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
......
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