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 storeList = ['1号立体库', '2号立体库', '3号立体库', '4号立体库', '5号立体库', '6号立体库', '7号立体库', '8号立体库'] export function getStoreList() { let store = '' store += storeList[parseInt(Math.random() * storeList.length)] return store } // 库区 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 = '' name = nameList[parseInt(Math.random() * (nameList.length))] return name } // 客户数据 const compList = ['台玻', 'FUYAO福耀', 'SG南玻', 'XYG信义玻璃', '耀皮', '福莱特玻璃', 'CLFG洛玻', 'SHABO沙玻', 'KIBING旗滨', '金晶玻璃', '济南金昊', '东莞佳美特', '汇中矿产', '文盛新材料', '西点化学', '开源塑胶', '奥驰商贸', '竹中科技', '程龙玻璃'] export function getCompTyleList() { let comp = '' comp = compList[parseInt(Math.random() * (compList.length))] return comp } // 客户联系人 const contactList = ['张总', '李总', '王总', '孙总', '赵总', '周总', '钱总', '吴总', '郑总', '杨总', '朱总', '蒋总', '江总', '马总'] export function getContactList() { let name = '' name = contactList[parseInt(Math.random() * (contactList.length))] return name } // 手机号前三位 const phoneList = ['139', '138', '137', '136', '135', '134', '159', '158', '157', '150', '151', '152', '188', '187', '182', '183', '184', '178', '130', '131', '132', '156', '155', '186', '185', '176', '133', '153', '189', '180', '181', '177'] export function getPhoneList() { let name = '' name = phoneList[parseInt(Math.random() * (phoneList.length))] return name } // 物品名称 const goodsList = ['钢化玻璃', '磨砂玻璃', '喷砂玻璃', '压花玻璃', '夹丝玻璃', '夹层玻璃'] export function getGoodsList() { let name = '' name = goodsList[parseInt(Math.random() * (goodsList.length))] return name } // 玻璃编码List export function getGlassCodeList() { let materialCode = 'SJG' for (let i = 0; i < 4; i++) { materialCode += parseInt(Math.random() * 89 + 10) } return materialCode } // 角色编码List export function getRoleCodeList() { let materialCode = 'R' for (let i = 0; i < 4; i++) { materialCode += parseInt(Math.random() * 89 + 10) } return materialCode } // 角色名称List export function getRoleNameList() { const materialCode = ['超级管理员', '管理员', '1号线管理员', '2号线管理员', '1号线加工人员', '2号线加工人员', '质检1组', '质检2组', '质检3组', '质检4组'] return materialCode }