11.23修改 #15

Merged
juzi merged 1 commits from zjl into master 2022-11-24 09:20:58 +08:00
2 changed files with 5 additions and 3 deletions

View File

@ -182,7 +182,7 @@ export default {
obj.time = moment().subtract(sj, 'days').subtract(sj, 'hours').subtract(sj, 'minute').subtract(sj, 'second').format('YYYY-MM-DD HH:mm:ss')
obj.productLine = sj % 2 ? 'A' : 'B'
obj.spec = productList[parseInt(Math.random() * (productList.length))]
obj.batch = moment().subtract(sj, 'days').format('YYYYMMDD')
obj.batch = moment().subtract(sj, 'days').subtract(sj, 'hours').format('YYYYMMDDHH')
obj.num = parseInt(Math.random() * 800 + 100) + ' (片)'
arr.push(obj)
}

View File

@ -227,11 +227,13 @@ export default {
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().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 = 4
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.status = parseInt(Math.random() * 3 + 1)
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.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)