11-wms-zjl #3

Merged
juzi merged 3 commits from 11-wms-zjl into master 2022-10-21 16:43:42 +08:00
12 changed files with 264 additions and 118 deletions
Showing only changes of commit c892dcfe98 - Show all commits

161
src/utils/wmsDic.js Normal file
View File

@ -0,0 +1,161 @@
import moment from 'moment'
// 托盘List
export function getTrayList() {
let trayID = 'TP'
for (let i = 0; i < 3; i++) {
trayID += parseInt(Math.random() * 89 + 10)
}
return trayID
}
// 成品内控码List
export function getProductList() {
let prodCode = 'CP'
for (let i = 0; i < 5; i++) {
prodCode += parseInt(Math.random() * 89 + 10)
}
return prodCode
}
// 客户标签号List
export function getCustomerCodeList() {
let customerCode = '2022'
for (let i = 0; i < 5; i++) {
customerCode += parseInt(Math.random() * 89 + 10)
}
return customerCode
}
// 成品规格List
export function getProductSpecList() {
const list = ['50*50mm', '70*50mm', '70*70mm', '100*50mm', '100*70mm', '100*100mm', '100*120mm', '120*120mm']
const spec = list[parseInt(Math.random() * (list.length))]
return spec
}
// 批次List
export function getBatchList() {
let batch = '2022'
for (let i = 0; i < 8; i++) {
batch += parseInt(Math.random() * 89 + 10)
}
return batch
}
// 包装机List
export function getPackList() {
let batch = '0'
batch += parseInt(Math.random() * 8 + 1)
return batch
}
// 入库单号List
export function getReceiptNoList() {
let receiptNo = 'RQD2022'
for (let i = 0; i < 3; i++) {
receiptNo += parseInt(Math.random() * 89 + 10)
}
return receiptNo
}
// 出库单号List
export function getOutboundNoList() {
let receiptNo = 'CKD2022'
for (let i = 0; i < 3; i++) {
receiptNo += parseInt(Math.random() * 89 + 10)
}
return receiptNo
}
// 盘点单号List
export function getInventoryNoList() {
let inventoryNumber = 'PD2022'
for (let i = 0; i < 3; i++) {
inventoryNumber += parseInt(Math.random() * 89 + 10)
}
return inventoryNumber
}
// 入库作业号List
export function getOperationCodeList() {
let operationCode = 'RQ'
for (let i = 0; i < 5; i++) {
operationCode += parseInt(Math.random() * 89 + 10)
}
return operationCode
}
// 出库库作业号List
export function getOperationCode2List() {
let operationCode = 'CQ'
for (let i = 0; i < 5; i++) {
operationCode += parseInt(Math.random() * 89 + 10)
}
return operationCode
}
// 库区
const KQList = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N']
export function getKQList() {
let KQ = ''
KQ += KQList[parseInt(Math.random() * KQList.length)]
return KQ
}
// 货位
export function getHWList() {
let HW = 'HW'
HW += KQList[parseInt(Math.random() * KQList.length)]
for (let i = 0; i < 2; i++) {
HW += parseInt(Math.random() * 9)
HW += parseInt(Math.random() * 8 + 1)
}
return HW
}
// 缓存区
export function getHCQList() {
let HW = 'HCQ'
HW += KQList[parseInt(Math.random() * KQList.length)]
for (let i = 0; i < 2; i++) {
HW += parseInt(Math.random() * 9)
HW += parseInt(Math.random() * 8 + 1)
}
return HW
}
// 司机/AGB编号List
export function getDriverCodeList() {
let driverCode = 'D'
for (let i = 0; i < 5; i++) {
driverCode += parseInt(Math.random() * 89 + 10)
}
return driverCode
}
// 随机生成开始和结束时间
export function getTimeArr() {
const sj = parseInt(Math.random() * 365)
const sj2 = sj + parseInt(Math.random() * 60 + 1)
const temp = []
const start = moment().subtract(sj2, 'days').subtract(sj2, 'hour').subtract(sj2, 'minutes').subtract(sj2, 'seconds').format('YYYY-MM-DD hh:mm:ss')
temp.push(start)
const end = moment().subtract(sj, 'days').subtract(sj, 'hour').subtract(sj, 'minutes').subtract(sj, 'seconds').format('YYYY-MM-DD hh:mm:ss')
temp.push(end)
return temp
}
// 物料编码List
export function getMaterialCodeList() {
let materialCode = 'WL'
for (let i = 0; i < 4; i++) {
materialCode += parseInt(Math.random() * 89 + 10)
}
return materialCode
}
// 名字
const nameList = ['张明', '李燕', '王国庆', '张强', '周敏']
export function getNameList() {
let name = 'WL'
name = nameList[parseInt(Math.random() * (nameList.length))]
return name
}

View File

@ -36,6 +36,7 @@ import Pagination from '@/components/Pagination'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn' import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import accetpGoodsAdd from './components/accetpGoodsAdd.vue' import accetpGoodsAdd from './components/accetpGoodsAdd.vue'
import { getTrayList, getProductList, getCustomerCodeList, getProductSpecList, getBatchList, getPackList } from '@/utils/wmsDic'
const topBtnConfig = [ const topBtnConfig = [
{ {
type: 'add', type: 'add',
@ -127,18 +128,15 @@ export default {
getList() { getList() {
const temp = [] const temp = []
const num = 20 const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
const packCodeList = ['01', '02', '03', '04', '05']
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.trayID = '1020' + i obj.trayID = getTrayList()
obj.internalControlCode = '202210200001' + i obj.internalControlCode = getProductList()
obj.customerCode = '20221020100' + i obj.customerCode = getCustomerCodeList()
obj.num = parseInt(Math.random() * 200 + 100) obj.num = parseInt(Math.random() * 1000)
const sj = Math.floor(Math.random() * 5) obj.productDpec = getProductSpecList()
obj.productDpec = spcList[sj] obj.batch = getBatchList()
obj.batch = '20221003' + i obj.packCode = getPackList()
obj.packCode = packCodeList[sj]
temp.push(obj) temp.push(obj)
} }
this.list = temp this.list = temp

View File

@ -36,6 +36,7 @@ import Pagination from '@/components/Pagination'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn' import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import inStoreDocumentsAdd from './components/inStoreDocumentsAdd.vue' import inStoreDocumentsAdd from './components/inStoreDocumentsAdd.vue'
import { getTrayList, getReceiptNoList, getProductList, getCustomerCodeList, getProductSpecList, getBatchList, getPackList } from '@/utils/wmsDic'
const topBtnConfig = [ const topBtnConfig = [
{ {
type: 'add', type: 'add',
@ -131,19 +132,16 @@ export default {
getList() { getList() {
const temp = [] const temp = []
const num = 20 const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
const packCodeList = ['01', '02', '03', '04', '05']
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.receiptNo = '200101' + i obj.receiptNo = getReceiptNoList()
obj.trayID = '1020' + i obj.trayID = getTrayList()
obj.internalControlCode = '202210200001' + i obj.internalControlCode = getProductList()
obj.customerCode = '20221020100' + i obj.customerCode = getCustomerCodeList()
obj.num = parseInt(Math.random() * 200 + 100) obj.num = parseInt(Math.random() * 1000)
const sj = Math.floor(Math.random() * 5) obj.productDpec = getProductSpecList()
obj.productDpec = spcList[sj] obj.batch = getBatchList()
obj.batch = '20221003' + i obj.packCode = getPackList()
obj.packCode = packCodeList[sj]
temp.push(obj) temp.push(obj)
} }
this.list = temp this.list = temp

View File

@ -24,6 +24,7 @@ import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable' import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import { getOperationCodeList, getReceiptNoList, getHWList, getDriverCodeList, getTimeArr } from '@/utils/wmsDic'
const tableProps = [ const tableProps = [
{ {
prop: 'operationCode', prop: 'operationCode',
@ -105,12 +106,13 @@ export default {
const num = 20 const num = 20
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.operationCode = '200101' + i const timeArrList = getTimeArr()
obj.receiptNo = '1020' + i obj.operationCode = getOperationCodeList()
obj.goodsArea = '1-1-' + i obj.receiptNo = getReceiptNoList()
obj.startTime = '2022-10-' + (i + 1) obj.goodsArea = getHWList()
obj.endTime = '2022-10-' + (i + 2) obj.startTime = timeArrList[0]
obj.driverCode = 'd20152' + i obj.endTime = timeArrList[1]
obj.driverCode = getDriverCodeList()
temp.push(obj) temp.push(obj)
} }
this.list = temp this.list = temp

View File

@ -7,8 +7,6 @@
:height="tableH" :height="tableH"
:table-config="tableProps" :table-config="tableProps"
:table-data="list" :table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/> />
<pagination <pagination
v-show="total > 0" v-show="total > 0"
@ -24,6 +22,7 @@ import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable' import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import { getMaterialCodeList, getKQList, getProductSpecList } from '@/utils/wmsDic'
const tableProps = [ const tableProps = [
{ {
prop: 'productName', prop: 'productName',
@ -88,15 +87,12 @@ export default {
getList() { getList() {
const temp = [] const temp = []
const num = 20 const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
const storeAreaList = ['A区', 'B区', 'C区', 'D区', 'E区']
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.productName = i + 1 obj.productName = ''
const sj = Math.floor(Math.random() * 5) obj.spec = getProductSpecList()
obj.spec = spcList[sj] obj.materialCode = getMaterialCodeList()
obj.materialCode = '20314655' + i obj.storeArea = getKQList() + '区'
obj.storeArea = storeAreaList[sj]
obj.num = Math.floor(Math.random() * 2000) obj.num = Math.floor(Math.random() * 2000)
temp.push(obj) temp.push(obj)
} }

View File

@ -7,8 +7,6 @@
:height="tableH" :height="tableH"
:table-config="tableProps" :table-config="tableProps"
:table-data="list" :table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/> />
<pagination <pagination
v-show="total > 0" v-show="total > 0"
@ -24,6 +22,8 @@ import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable' import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import { getProductSpecList, getMaterialCodeList, getTrayList, getHWList, getBatchList } from '@/utils/wmsDic'
import moment from 'moment'
const tableProps = [ const tableProps = [
{ {
prop: 'productName', prop: 'productName',
@ -63,7 +63,8 @@ const tableProps = [
}, },
{ {
prop: 'batch', prop: 'batch',
label: '批次号' label: '批次号',
minWidth: 200
}, },
{ {
prop: 'num', prop: 'num',
@ -123,22 +124,19 @@ export default {
getList() { getList() {
const temp = [] const temp = []
const num = 20 const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
const statusList = ['已分配', '未分配', '状态1', '状态2', '状态3']
const storeAreaList = ['A区', 'B区', 'C区', 'D区', 'E区']
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.productName = i + 1 obj.productName = ''
const sj = Math.floor(Math.random() * 5) const sj = Math.floor(Math.random() * 720 + 10)
obj.spec = spcList[sj] obj.spec = getProductSpecList()
obj.status = statusList[sj] obj.status = ''
obj.materialCode = '20314655' + i obj.materialCode = getMaterialCodeList()
obj.storeArea = storeAreaList[sj] obj.goodsArea = getHWList()
obj.goodsArea = '1-1-' + i obj.storeArea = obj.goodsArea[2] + '区'
obj.trayID = '10210' + i obj.trayID = getTrayList()
obj.productionTime = '2022-10-' + (i + 2) obj.productionTime = moment().subtract(sj, 'days').subtract(sj, 'hour').subtract(sj, 'minutes').subtract(sj, 'seconds').format('YYYY-MM-DD hh:mm:ss')
obj.validityTime = Math.floor(Math.random() * 36) + '个月' obj.validityTime = parseInt(sj / 5) + '个月'
obj.batch = '202210255643' + i obj.batch = getBatchList()
obj.num = Math.floor(Math.random() * 2000) obj.num = Math.floor(Math.random() * 2000)
temp.push(obj) temp.push(obj)
} }

View File

@ -24,6 +24,7 @@ import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable' import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import { getHWList, getKQList } from '@/utils/wmsDic'
const tableProps = [ const tableProps = [
{ {
prop: 'goodsAreaCode', prop: 'goodsAreaCode',
@ -113,14 +114,14 @@ export default {
const num = 20 const num = 20
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.goodsAreaCode = '3200101' + i obj.goodsAreaCode = getHWList()
obj.goodsAreaName = '3200101' + i obj.goodsAreaName = ''
obj.goodsAreaStatus = i + 1 obj.goodsAreaStatus = ''
obj.roadway = Math.floor(Math.random() * 5 + 1) obj.roadway = Math.floor(Math.random() * 5 + 1) + '号巷'
obj.storeArea = i obj.storeArea = obj.goodsAreaCode[2] + '区'
obj.store = i obj.store = getKQList() + '仓库'
obj.warehousingLock = i obj.warehousingLock = ''
obj.outboundLock = i obj.outboundLock = ''
temp.push(obj) temp.push(obj)
} }
this.list = temp this.list = temp

View File

@ -24,6 +24,8 @@ import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable' import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import { getInventoryNoList, getMaterialCodeList, getProductSpecList, getTrayList, getNameList } from '@/utils/wmsDic'
import moment from 'moment'
const tableProps = [ const tableProps = [
{ {
prop: 'inventoryNumber', prop: 'inventoryNumber',
@ -115,20 +117,18 @@ export default {
getList() { getList() {
const temp = [] const temp = []
const num = 20 const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
const nameList = ['张明', '李燕', '王一', '张强', '王四']
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.inventoryNumber = '200101' + i obj.inventoryNumber = getInventoryNoList()
obj.productName = i + 1 obj.productName = ''
const sj = Math.floor(Math.random() * 5) obj.spec = getProductSpecList()
obj.spec = spcList[sj] obj.materialCode = getMaterialCodeList()
obj.materialCode = '20314655' + i obj.trayID = getTrayList()
obj.trayID = '1020' + i
obj.num = Math.floor(Math.random() * 2000) obj.num = Math.floor(Math.random() * 2000)
obj.takeNum = Math.floor(Math.random() * 2000) obj.takeNum = parseInt(Math.random() * 2) ? obj.num + Math.floor(Math.random() * 20 - 10) : obj.num
obj.takeTime = '2022-10-' + (i + 2) const sj = Math.floor(Math.random() * 5)
obj.operator = nameList[sj] obj.takeTime = moment().add(sj, 'days').add(sj, 'hour').add(sj, 'minutes').add(sj, 'seconds').format('YYYY-MM-DD hh:mm:ss')
obj.operator = getNameList()
temp.push(obj) temp.push(obj)
} }
this.list = temp this.list = temp

View File

@ -36,6 +36,8 @@ import Pagination from '@/components/Pagination'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn' import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import outStoreDocumentsAdd from './components/outStoreDocumentsAdd.vue' import outStoreDocumentsAdd from './components/outStoreDocumentsAdd.vue'
import { getOutboundNoList, getHCQList, getProductSpecList } from '@/utils/wmsDic'
import moment from 'moment'
const topBtnConfig = [ const topBtnConfig = [
{ {
type: 'add', type: 'add',
@ -127,16 +129,15 @@ export default {
getList() { getList() {
const temp = [] const temp = []
const num = 20 const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.outboundOrderNo = '1020' + i obj.outboundOrderNo = getOutboundNoList()
obj.customerName = '客户' + i obj.customerName = ''
obj.shipmentCacheArea = '20221020100' + i obj.shipmentCacheArea = getHCQList()
obj.num = parseInt(Math.random() * 200 + 100) obj.num = parseInt(Math.random() * 1000)
const sj = Math.floor(Math.random() * 5) obj.spec = getProductSpecList()
obj.spec = spcList[sj] const sj = Math.floor(Math.random() * 100)
obj.deliveryTime = '2022-10-' + (i + 1) obj.deliveryTime = moment().add(sj, 'days').add(sj, 'hour').add(sj, 'minutes').add(sj, 'seconds').format('YYYY-MM-DD hh:mm:ss')
temp.push(obj) temp.push(obj)
} }
this.list = temp this.list = temp

View File

@ -34,6 +34,7 @@ import Pagination from '@/components/Pagination'
import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn' import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import outStoreDocumentsAdd from './components/outStoreDocumentsAdd.vue' import outStoreDocumentsAdd from './components/outStoreDocumentsAdd.vue'
import { getOperationCode2List, getOutboundNoList, getHWList, getHCQList, getTimeArr, getDriverCodeList } from '@/utils/wmsDic'
const tableProps = [ const tableProps = [
{ {
prop: 'operationCode', prop: 'operationCode',
@ -131,16 +132,18 @@ export default {
const num = 20 const num = 20
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.operationCode = '200101' + i const timeArrList = getTimeArr()
obj.outboundOrderNo = '1020' + i obj.operationCode = getOperationCode2List()
obj.goodsArea = '1-1-' + i obj.outboundOrderNo = getOutboundNoList()
obj.shipmentCacheArea = '20221020100' + i obj.goodsArea = getHWList()
obj.startTime = '2022-10-' + (i + 1) obj.shipmentCacheArea = getHCQList()
obj.endTime = '2022-10-' + (i + 2) obj.startTime = timeArrList[0]
obj.driverCode = 'd20152' + i obj.endTime = timeArrList[1]
obj.driverCode = getDriverCodeList()
temp.push(obj) temp.push(obj)
} }
this.list = temp this.list = temp
console.log(this.list)
this.total = num this.total = num
}, },
btnClick(val) { btnClick(val) {

View File

@ -1,11 +1,3 @@
<!--/*
* @Author: zwq
* @Date: 2020-12-29 15:41:11
* @LastEditTime: 2022-04-15
* @LastEditors: juzi
* @Description: 拆分了搜索区和功能按钮区增加了toptitle
*/
-->
<template> <template>
<div class="app-container"> <div class="app-container">
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" /> <head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
@ -18,8 +10,6 @@
:height="tableH" :height="tableH"
:table-config="tableProps" :table-config="tableProps"
:table-data="list" :table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/> />
<pagination <pagination
v-show="total > 0" v-show="total > 0"
@ -36,6 +26,8 @@ import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable' import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import { getReceiptNoList, getProductSpecList, getMaterialCodeList } from '@/utils/wmsDic'
import moment from 'moment'
const tableProps = [ const tableProps = [
{ {
prop: 'orderCode', prop: 'orderCode',
@ -119,18 +111,16 @@ export default {
getList() { getList() {
const temp = [] const temp = []
const num = 20 const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.orderCode = '20314655' + i obj.orderCode = getReceiptNoList()
const sj = Math.floor(Math.random() * 5) obj.type = ''
obj.spec = spcList[sj] obj.productName = ''
obj.materialCode = '20314655' + i const sj = Math.floor(Math.random() * 100)
obj.productName = '10210' + i obj.spec = getProductSpecList()
obj.time = '2022-10-' + (i + 2) obj.materialCode = getMaterialCodeList()
obj.type = Math.floor(Math.random() * 36) + '型' obj.num = Math.floor(Math.random() * 2000 + 200)
obj.batch = '202210255643' + i obj.time = moment().subtract(sj, 'days').subtract(sj, 'hour').subtract(sj, 'minutes').subtract(sj, 'seconds').format('YYYY-MM-DD hh:mm:ss')
obj.num = Math.floor(Math.random() * 2000)
temp.push(obj) temp.push(obj)
} }
this.list = temp this.list = temp

View File

@ -18,8 +18,6 @@
:height="tableH" :height="tableH"
:table-config="tableProps" :table-config="tableProps"
:table-data="list" :table-data="list"
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
/> />
<pagination <pagination
v-show="total > 0" v-show="total > 0"
@ -36,6 +34,8 @@ import HeadForm from '@/components/basicData/HeadForm'
import BaseTable from '@/components/BaseTable' import BaseTable from '@/components/BaseTable'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { tableHeight } from '@/utils/index' import { tableHeight } from '@/utils/index'
import { getOutboundNoList, getProductSpecList, getMaterialCodeList } from '@/utils/wmsDic'
import moment from 'moment'
const tableProps = [ const tableProps = [
{ {
prop: 'orderCode', prop: 'orderCode',
@ -119,18 +119,16 @@ export default {
getList() { getList() {
const temp = [] const temp = []
const num = 20 const num = 20
const spcList = ['50*50m', '100*50m', '100*100m', '70*100m', '100*120m']
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const obj = {} const obj = {}
obj.orderCode = '20314655' + i obj.orderCode = getOutboundNoList()
obj.type = ''
obj.productName = ''
const sj = Math.floor(Math.random() * 5) const sj = Math.floor(Math.random() * 5)
obj.spec = spcList[sj] obj.spec = getProductSpecList()
obj.materialCode = '20314655' + i obj.materialCode = getMaterialCodeList()
obj.productName = '10210' + i obj.time = moment().subtract(sj, 'days').subtract(sj, 'hour').subtract(sj, 'minutes').subtract(sj, 'seconds').format('YYYY-MM-DD hh:mm:ss')
obj.time = '2022-10-' + (i + 2) obj.num = Math.floor(Math.random() * 2000 + 200)
obj.type = Math.floor(Math.random() * 36) + '型'
obj.batch = '202210255643' + i
obj.num = Math.floor(Math.random() * 2000)
temp.push(obj) temp.push(obj)
} }
this.list = temp this.list = temp