Commit d00a6d4f authored by 李苏's avatar 李苏 💬

立库相关调整

parent 56734c6f
...@@ -25,8 +25,10 @@ ...@@ -25,8 +25,10 @@
</template> </template>
<script> <script>
import Xzgw from './xzgw.vue' import Xzgw from './xzgw.vue'
import wlsx from 'common/src/mixin/wlsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
export default { export default {
mixins:[wlsx,wlphsx],
props: { props: {
app: { app: {
type: Object, type: Object,
......
...@@ -53,6 +53,16 @@ ...@@ -53,6 +53,16 @@
fieldType: "upper", fieldType: "upper",
width: 140 width: 140
}, },
{
title: "仓库",
field: "ckName",
width: 140
},
{
title: "业务日期",
field: "ywrq",
fieldType: "ftDate"
},
{ {
title: "起始位", title: "起始位",
field: "kwName", field: "kwName",
...@@ -71,32 +81,42 @@ ...@@ -71,32 +81,42 @@
{ {
title: "开始时间", title: "开始时间",
field: "kssj", field: "kssj",
fieldType: "ftDate" fieldType: "ftDateTime"
}, },
{ {
title: "结束时间", title: "结束时间",
field: "jssj", field: "jssj",
fieldType: "ftDate" fieldType: "ftDateTime"
}, },
{ {
title: "耗时", title: "耗时",
field: "timespan", field: "timespan",
width: 240,
formatter(a, b, duration) { formatter(a, b, duration) {
if(duration==0){ if (duration == 0 || !duration) {
return 0 return "0";
}else{ } else {
var milliseconds = parseInt((duration % 1000) / 100), var days = Math.floor(duration / (1000 * 60 * 60 * 24));
seconds = Math.floor((duration / 1000) % 60), var hours = Math.floor((duration % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
minutes = Math.floor((duration / (1000 * 60)) % 60), var minutes = Math.floor((duration % (1000 * 60 * 60)) / (1000 * 60));
hours = Math.floor((duration / (1000 * 60 * 60)) % 24); var seconds = Math.floor((duration % (1000 * 60)) / 1000);
hours = (hours < 10) ? "0" + hours : hours; var result = "";
minutes = (minutes < 10) ? "0" + minutes : minutes; if (days > 0) {
seconds = (seconds < 10) ? "0" + seconds : seconds; result += days + " 天 ";
}
return hours + ":" + minutes + ":" + seconds + "." + milliseconds; if (hours > 0) {
result += hours + " 小时 ";
}
if (minutes > 0) {
result += minutes + " 分钟 ";
}
if (seconds > 0) {
result += seconds + " 秒 ";
} }
return result;
}
} }
}, },
{ {
......
...@@ -24,8 +24,10 @@ ...@@ -24,8 +24,10 @@
</DefaultDialog> </DefaultDialog>
</template> </template>
<script> <script>
import wlsx from 'common/src/mixin/wlsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
export default { export default {
mixins:[wlsx,wlphsx],
props: { props: {
app: { app: {
type: Object, type: Object,
......
...@@ -91,27 +91,42 @@ ...@@ -91,27 +91,42 @@
{ {
title: "开始时间", title: "开始时间",
field: "kssj", field: "kssj",
fieldType: "ftDate" fieldType: "ftDateTime"
}, },
{ {
title: "结束时间", title: "结束时间",
field: "jssj", field: "jssj",
fieldType: "ftDate" fieldType: "ftDateTime"
}, },
{ {
title: "耗时", title: "耗时",
field: "timespan", field: "timespan",
width: 240,
formatter(a, b, duration) { formatter(a, b, duration) {
var milliseconds = parseInt((duration % 1000) / 100), if (duration == 0 || !duration) {
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 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; var result = "";
minutes = (minutes < 10) ? "0" + minutes : minutes; if (days > 0) {
seconds = (seconds < 10) ? "0" + seconds : seconds; result += days + " 天 ";
}
if (hours > 0) {
result += hours + " 小时 ";
}
if (minutes > 0) {
result += minutes + " 分钟 ";
}
if (seconds > 0) {
result += seconds + " 秒 ";
}
return hours + ":" + minutes + ":" + seconds + "." + milliseconds; return result;
}
} }
}, },
{ {
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
title: "耗时", title: "耗时",
field: "timespan", field: "timespan",
formatter(a, b, duration) { formatter(a, b, duration) {
if(duration==0){ if(duration==0||!duration){
return 0 return 0
}else{ }else{
var milliseconds = parseInt((duration % 1000) / 100), var milliseconds = parseInt((duration % 1000) / 100),
......
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