dykj-college-back-office-ma.../mock/modules/ycy.js

87 lines
1.5 KiB
JavaScript

import Mock from "mockjs";
const StockList = Mock.mock({
"list|20-30": [
{
"id|+1": 0,
billserial: "@integer(100000000,199999999)1",
billType: "@integer(0,4)",
stockNum: "@integer(1,2)",
unit: "@cword(张本,1)",
stockDate: "@date",
operator: "@cname",
remark: " @integer(10000000000,19999999999)",
},
],
});
const personName = () => {
return [
{
label: "员工名单",
children: [
{
label: "孙东宇",
},
{
label: "杨春宇",
},
{
label: "吕才卓",
},
{
label: "刘欣宇",
},
],
},
];
};
const CancelList = Mock.mock({
"list|20-30": [
{
"id|+1": 0,
billserial: "@integer(100000000,199999999)1",
billType: "@integer(0,4)",
cancelNum: "@integer(1,10)张",
appleDate: "@date",
proposer: "@cname",
approvalStatus: "@integer(0,3)",
reason: " @integer(10000000000,19999999999)",
},
],
});
export default [
{
url: "/api/stockList",
method: "get",
response: () => {
return {
code: 200,
data: StockList,
};
},
},
{
url: "/api/cancelList",
method: "get",
response: () => {
return {
code: 200,
data: CancelList,
};
},
},
{
url: "/api/personName",
method: "get",
response: () => {
const list = personName();
return {
code: 200,
data: list,
};
},
},
];