import http from "@/mock/model/http" import list from "@/mock/model/list" import Mock from 'mockjs' const Random = Mock.Random export function oingList() { //我的待办列表 let model = http list.count = 100 list.list = [] for (let i = 0; i < 15; i++) { list.list.push(Mock.mock({ id: '@increment',//待办编号 'title|1': ['备货申请', '采购入库', '咨询确认单审批', '销售确认单审批', '销售出库', '售后退货申请', '售后退货', '采购调拨', '采购盘点'],//流程名称 orderNo: '@guid',//单据号 'type|1': ['待审核', '待采购反馈', '待发货', '待收货', '待申请售后'],//当前节点 timestamp: +Mock.Random.date('T'),//停留时间 author: '@cname',//发起人 reviewer: '@ctitle',//发起部门 addTime: '@datetime', //创建时间 })) } model.data = list return { url: 'process/oingList', type: 'post', data: model } } export function doneList() { //我的已办列表 let model = http list.count = 100 list.list = [] for (let i = 0; i < 15; i++) { list.list.push(Mock.mock({ id: '@increment',//待办编号 'title|1': ['备货申请', '采购入库', '咨询确认单审批', '销售确认单审批', '销售出库', '售后退货申请', '售后退货', '采购调拨', '采购盘点'],//流程名称 orderNo: '@guid',//单据号 'type|1': ['待审核', '待采购反馈', '待发货', '待收货', '待申请售后'],//当前节点 timestamp: +Mock.Random.date('T'),//停留时间 author: '@cname',//发起人 reviewer: '@ctitle',//发起部门 addTime: '@datetime', //创建时间 })) } model.data = list return { url: 'process/doneList', type: 'post', data: model } } export function storeListAll() { let model = http model.data = [] for (let i = 0; i < 50; i++) { let father = Mock.mock({ id: '@increment',//id name: '@ctitle(5)',//公司名称 child: [] }) for (let j = 0; j < 10; j++) { father.child.push(Mock.mock({ id: '@increment',//id name: '@ctitle(5)',//仓库名称 })) } model.data.push(father) } return { url: 'process/storeListAll', type: 'post', data: model } } export function statistics() { let model = http model.data= Mock.mock({ value1: '@integer(300, 5000)',//当前库存 value2: '@integer(300, 5000)',//待入库 value3: '@integer(300, 5000)',//待出库 value4: '@integer(300, 5000)',//可用库存 value5: '@integer(300, 5000)',//在途库存 }) return { url: 'process/statistics', type: 'post', data: model } } export function storeLog() { let model = http model.data= Mock.mock({ value1: '@integer(300, 5000)',//当前库存 value2: '@integer(300, 5000)',//待入库 value3: '@integer(300, 5000)',//待出库 value4: '@integer(300, 5000)',//可用库存 value5: '@integer(300, 5000)',//在途库存 }) return { url: 'process/storeLog', type: 'post', data: model } }