|
@@ -227,11 +227,13 @@ export default { |
|
|
for (let i = 0; i < 20; i++) { |
|
|
for (let i = 0; i < 20; i++) { |
|
|
const obj = {} |
|
|
const obj = {} |
|
|
const sj = parseInt(Math.random() * 200) |
|
|
const sj = parseInt(Math.random() * 200) |
|
|
|
|
|
const sj2 = parseInt(Math.random() * 31) |
|
|
obj.customerName = compList[parseInt(Math.random() * (compList.length))] |
|
|
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.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.productName = productList[parseInt(Math.random() * (productList.length))] |
|
|
obj.planNum = parseInt(Math.random() * 800 + 100) + '(m²)' |
|
|
obj.planNum = parseInt(Math.random() * 800 + 100) + '(m²)' |
|
|
obj.planDelivery = moment().add(sj, 'days').format('YYYY-MM-DD') |
|
|
|
|
|
|
|
|
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.status = parseInt(Math.random() * 3 + 1) |
|
|
obj.status = 4 |
|
|
obj.status = 4 |
|
|
arr2.push(obj) |
|
|
arr2.push(obj) |
|
@@ -244,7 +246,7 @@ export default { |
|
|
obj.orderCode = 'ODFG' + moment().subtract(sj, 'days').subtract(sj, 'hours').subtract(sj, 'minute').subtract(sj, 'second').format('YYYYMMDDHHmmss') |
|
|
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.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() * 50 + 50) + '%' |
|
|
|
|
|
|
|
|
obj.yield = parseInt(Math.random() * 10 + 90) + '%' |
|
|
// obj.shiftCosts = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2) |
|
|
// 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) |
|
|
// obj.energyCosts = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2) |
|
|
// obj.equipmentCost = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2) |
|
|
// obj.equipmentCost = obj.status === 1 ? parseInt(0).toFixed(2) : parseInt(Math.random() * 800 + 100).toFixed(2) |
|
|