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

立库相关调整

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