11.24修改
This commit is contained in:
@@ -72,6 +72,7 @@ import screenfull from 'screenfull'
|
||||
import BaseTable from './components/baseTable.vue'
|
||||
import moment from 'moment'
|
||||
import orderStatus from './components/orderStatus.vue'
|
||||
import { rateFormatter2 } from '@/filters/index'
|
||||
const orderPool = [
|
||||
{
|
||||
prop: 'customerName',
|
||||
@@ -125,6 +126,7 @@ const orderMonitiring = [
|
||||
{
|
||||
prop: 'completion',
|
||||
label: '完成率',
|
||||
filter: rateFormatter2,
|
||||
minWidth: 24.8
|
||||
},
|
||||
{
|
||||
@@ -224,17 +226,15 @@ export default {
|
||||
arr1.push(obj)
|
||||
}
|
||||
this.orderList = arr1
|
||||
const timeArr = ["2022-10-01", "2022-10-03", "2022-10-04", "2022-10-07","2022-10-11", "2022-10-12", "2022-10-15", "2022-10-18", "2022-10-19", "2022-10-21", "2022-10-23", "2022-10-26", "2022-10-27"]
|
||||
for (let i = 0; i < 20; i++) {
|
||||
const obj = {}
|
||||
const sj = parseInt(Math.random() * 200)
|
||||
const sj2 = parseInt(Math.random() * 31)
|
||||
obj.customerName = compList[parseInt(Math.random() * (compList.length))]
|
||||
obj.orderCode = 'ODFG' + moment().subtract(sj, 'days').subtract(sj, 'hours').subtract(sj, 'minute').subtract(sj, 'second').format('YYYYMMDDHHmmss')
|
||||
obj.productName = productList[parseInt(Math.random() * (productList.length))]
|
||||
obj.planNum = parseInt(Math.random() * 800 + 100) + '(m²)'
|
||||
obj.planDelivery = moment("20221001").add(sj2, 'days').format('YYYY-MM-DD')
|
||||
// obj.planDelivery = moment().add(sj, 'days').format('YYYY-MM-DD')
|
||||
// obj.status = parseInt(Math.random() * 3 + 1)
|
||||
obj.planDelivery = timeArr[i]
|
||||
obj.status = 4
|
||||
arr2.push(obj)
|
||||
}
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
obj.customerName = compList[parseInt(Math.random() * (compList.length))]
|
||||
obj.orderCode = 'ODFG' + moment().subtract(sj, 'days').subtract(sj, 'hours').subtract(sj, 'minute').subtract(sj, 'second').format('YYYYMMDDHHmmss')
|
||||
obj.status = parseInt(Math.random() * 3 + 1)
|
||||
obj.completion = obj.status === 1 ? '0.00%' : (obj.status === 3 ? '100%' : parseInt(Math.random() * 100) + '%')
|
||||
obj.completion = obj.status === 1 ? 0.00 : (obj.status === 3 ? 100 : parseInt(Math.random() * 100))
|
||||
obj.yield = parseInt(Math.random() * 10 + 90) + '%'
|
||||
// obj.shiftCosts = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2)
|
||||
// obj.energyCosts = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2)
|
||||
@@ -259,6 +259,9 @@ export default {
|
||||
obj.totalCost = '0'
|
||||
temp.push(obj)
|
||||
}
|
||||
temp.sort(function (a, b) {
|
||||
return new Date(a.completion) - new Date(b.completion)
|
||||
})
|
||||
this.orderMonitiringList = temp
|
||||
},
|
||||
change() {
|
||||
|
||||
Reference in New Issue
Block a user