|
@@ -4,23 +4,24 @@ import Mock from 'mockjs'
|
|
|
const Random = Mock.Random
|
|
|
|
|
|
export function oingList() { //我的待办列表
|
|
|
- let model = http
|
|
|
- list.count = 100
|
|
|
- list.list = []
|
|
|
+ let model = JSON.parse(JSON.stringify(http))
|
|
|
+ let listModel= JSON.parse(JSON.stringify(list))
|
|
|
+ listModel.count = 100
|
|
|
+ listModel.list = []
|
|
|
|
|
|
for (let i = 0; i < 15; i++) {
|
|
|
- list.list.push(Mock.mock({
|
|
|
+ listModel.list.push(Mock.mock({
|
|
|
id: '@increment',//待办编号
|
|
|
'title|1': ['备货申请', '采购入库', '咨询确认单审批', '销售确认单审批', '销售出库', '售后退货申请', '售后退货', '采购调拨', '采购盘点'],//流程名称
|
|
|
orderNo: '@guid',//单据号
|
|
|
'type|1': ['待审核', '待采购反馈', '待发货', '待收货', '待申请售后'],//当前节点
|
|
|
timestamp: +Mock.Random.date('T'),//停留时间
|
|
|
author: '@cname',//发起人
|
|
|
- reviewer: '@ctitle',//发起部门
|
|
|
+ 'reviewer|1': ['采购部', '网络部', '信息部', '财务部', '客服部', '项目部', '人事部'],//发起部门
|
|
|
addTime: '@datetime', //创建时间
|
|
|
}))
|
|
|
}
|
|
|
- model.data = list
|
|
|
+ model.data = listModel
|
|
|
|
|
|
return {
|
|
|
url: 'process/oingList',
|
|
@@ -30,91 +31,28 @@ export function oingList() { //我的待办列表
|
|
|
}
|
|
|
|
|
|
export function doneList() { //我的已办列表
|
|
|
- let model = http
|
|
|
- list.count = 100
|
|
|
- list.list = []
|
|
|
+ let model = JSON.parse(JSON.stringify(http))
|
|
|
+ let listModel= JSON.parse(JSON.stringify(list))
|
|
|
+ listModel.count = 100
|
|
|
+ listModel.list = []
|
|
|
|
|
|
for (let i = 0; i < 15; i++) {
|
|
|
- list.list.push(Mock.mock({
|
|
|
+ listModel.list.push(Mock.mock({
|
|
|
id: '@increment',//待办编号
|
|
|
'title|1': ['备货申请', '采购入库', '咨询确认单审批', '销售确认单审批', '销售出库', '售后退货申请', '售后退货', '采购调拨', '采购盘点'],//流程名称
|
|
|
orderNo: '@guid',//单据号
|
|
|
'type|1': ['待审核', '待采购反馈', '待发货', '待收货', '待申请售后'],//当前节点
|
|
|
timestamp: +Mock.Random.date('T'),//停留时间
|
|
|
author: '@cname',//发起人
|
|
|
- reviewer: '@ctitle',//发起部门
|
|
|
+ 'reviewer|1': ['采购部', '网络部', '信息部', '财务部', '客服部', '项目部', '人事部'],//发起部门
|
|
|
addTime: '@datetime', //创建时间
|
|
|
}))
|
|
|
}
|
|
|
- model.data = list
|
|
|
+ model.data = listModel
|
|
|
|
|
|
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
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+}
|