2024-04-06 14:17:49 +08:00
|
|
|
import Mock from "mockjs";
|
2024-04-08 16:29:46 +08:00
|
|
|
|
|
|
|
// 入库列表
|
2024-04-06 14:17:49 +08:00
|
|
|
const StockList = Mock.mock({
|
|
|
|
"list|20-30": [
|
|
|
|
{
|
2024-04-07 16:03:27 +08:00
|
|
|
"id|+1": 0,
|
2024-04-06 18:20:58 +08:00
|
|
|
billserial: "@integer(100000000,199999999)1",
|
|
|
|
billType: "@integer(0,4)",
|
2024-04-06 15:29:30 +08:00
|
|
|
stockNum: "@integer(1,2)",
|
|
|
|
unit: "@cword(张本,1)",
|
2024-04-06 14:17:49 +08:00
|
|
|
stockDate: "@date",
|
|
|
|
operator: "@cname",
|
|
|
|
remark: " @integer(10000000000,19999999999)",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
});
|
2024-04-08 16:29:46 +08:00
|
|
|
|
|
|
|
// 领用列表
|
2024-04-08 10:37:44 +08:00
|
|
|
const ReceiptList = Mock.mock([
|
|
|
|
{
|
|
|
|
"list|20-30": [
|
|
|
|
{
|
|
|
|
"id|+1": 0,
|
|
|
|
billserial: "@integer(100000000,199999999)1",
|
|
|
|
proposer: "孙东宇",
|
|
|
|
billType: "@integer(0,4)",
|
2024-04-08 12:02:00 +08:00
|
|
|
receiptNum: "@integer(1,10)",
|
2024-04-08 10:37:44 +08:00
|
|
|
receiptDate: "@date",
|
|
|
|
useInfo: "@csentence",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"list|20-30": [
|
|
|
|
{
|
|
|
|
"id|+1": 0,
|
|
|
|
billserial: "@integer(100000000,199999999)1",
|
|
|
|
proposer: "杨春宇",
|
|
|
|
billType: "@integer(0,4)",
|
2024-04-08 12:02:00 +08:00
|
|
|
receiptNum: "@integer(1,10)",
|
2024-04-08 10:37:44 +08:00
|
|
|
receiptDate: "@date",
|
|
|
|
useInfo: "@csentence",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"list|20-30": [
|
|
|
|
{
|
|
|
|
"id|+1": 0,
|
|
|
|
billserial: "@integer(100000000,199999999)1",
|
|
|
|
proposer: "吕才卓",
|
|
|
|
billType: "@integer(0,4)",
|
2024-04-08 12:02:00 +08:00
|
|
|
receiptNum: "@integer(1,10)",
|
2024-04-08 10:37:44 +08:00
|
|
|
receiptDate: "@date",
|
|
|
|
useInfo: "@csentence",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"list|20-30": [
|
|
|
|
{
|
|
|
|
"id|+1": 0,
|
2024-04-08 14:08:50 +08:00
|
|
|
billserial: "@integer(100000000,199999999)1",
|
|
|
|
proposer: "刘欣宇",
|
|
|
|
billType: "@integer(0,4)",
|
|
|
|
receiptNum: "@integer(1,10)",
|
|
|
|
receiptDate: "@date",
|
|
|
|
useInfo: "@csentence",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]);
|
2024-04-08 16:29:46 +08:00
|
|
|
|
|
|
|
// 退领列表
|
2024-04-08 14:08:50 +08:00
|
|
|
const quitneckList = Mock.mock([
|
|
|
|
{
|
|
|
|
list: [
|
|
|
|
{
|
|
|
|
"id|+1": 0,
|
|
|
|
billserial: "@integer(100000000,199999999)1",
|
|
|
|
proposer: "孙东宇",
|
|
|
|
billType: "@integer(0,4)",
|
|
|
|
receiptNum: "@integer(1,10)",
|
|
|
|
receiptDate: "@date",
|
|
|
|
useInfo: "@csentence",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
list: [
|
|
|
|
{
|
|
|
|
"id|+1": 0,
|
|
|
|
billserial: "@integer(100000000,199999999)1",
|
|
|
|
proposer: "杨春宇",
|
|
|
|
billType: "@integer(0,4)",
|
|
|
|
receiptNum: "@integer(1,10)",
|
|
|
|
receiptDate: "@date",
|
|
|
|
useInfo: "@csentence",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
list: [
|
|
|
|
{
|
|
|
|
"id|+1": 0,
|
|
|
|
billserial: "@integer(100000000,199999999)1",
|
|
|
|
proposer: "吕才卓",
|
|
|
|
billType: "@integer(0,4)",
|
|
|
|
receiptNum: "@integer(1,10)",
|
|
|
|
receiptDate: "@date",
|
|
|
|
useInfo: "@csentence",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
list: [
|
|
|
|
{
|
|
|
|
"id|+1": 0,
|
2024-04-08 10:37:44 +08:00
|
|
|
billserial: "@integer(100000000,199999999)1",
|
|
|
|
proposer: "刘欣宇",
|
|
|
|
billType: "@integer(0,4)",
|
2024-04-08 12:02:00 +08:00
|
|
|
receiptNum: "@integer(1,10)",
|
2024-04-08 10:37:44 +08:00
|
|
|
receiptDate: "@date",
|
|
|
|
useInfo: "@csentence",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]);
|
2024-04-07 18:02:23 +08:00
|
|
|
|
2024-04-08 16:29:46 +08:00
|
|
|
// 人员名单
|
2024-04-07 18:02:23 +08:00
|
|
|
const personName = () => {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
label: "员工名单",
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
label: "孙东宇",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "杨春宇",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "吕才卓",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "刘欣宇",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-04-08 16:29:46 +08:00
|
|
|
// 退库列表
|
2024-04-07 16:03:27 +08:00
|
|
|
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)",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
});
|
2024-04-06 15:06:22 +08:00
|
|
|
|
2024-04-08 16:29:46 +08:00
|
|
|
// 报损列表
|
|
|
|
const breakageList = Mock.mock({
|
|
|
|
"list|20-30": [
|
|
|
|
{
|
|
|
|
"id|+1": 0,
|
|
|
|
billserial: "@integer(100000000,199999999)1",
|
|
|
|
billType: "@integer(0,4)",
|
|
|
|
breakNum: "@integer(1,2)",
|
|
|
|
breakDate: "@date",
|
|
|
|
operator: "@cname",
|
|
|
|
breakStatus: "@integer(0,2)",
|
2024-04-08 18:03:48 +08:00
|
|
|
breakInfo: "@csentence",
|
2024-04-08 16:29:46 +08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
});
|
|
|
|
|
2024-04-06 15:29:30 +08:00
|
|
|
export default [
|
|
|
|
{
|
2024-04-06 15:44:32 +08:00
|
|
|
url: "/api/stockList",
|
2024-04-06 15:29:30 +08:00
|
|
|
method: "get",
|
|
|
|
response: () => {
|
|
|
|
return {
|
|
|
|
code: 200,
|
2024-04-06 18:20:58 +08:00
|
|
|
data: StockList,
|
2024-04-06 15:29:30 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
2024-04-07 16:03:27 +08:00
|
|
|
{
|
|
|
|
url: "/api/cancelList",
|
|
|
|
method: "get",
|
|
|
|
response: () => {
|
|
|
|
return {
|
|
|
|
code: 200,
|
|
|
|
data: CancelList,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
2024-04-07 18:02:23 +08:00
|
|
|
{
|
|
|
|
url: "/api/personName",
|
|
|
|
method: "get",
|
|
|
|
response: () => {
|
|
|
|
const list = personName();
|
|
|
|
return {
|
|
|
|
code: 200,
|
|
|
|
data: list,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
2024-04-08 10:37:44 +08:00
|
|
|
{
|
|
|
|
url: "/api/receiptList",
|
|
|
|
method: "post",
|
|
|
|
response: (req) => {
|
|
|
|
if (req.body.name === "孙东宇") {
|
|
|
|
return {
|
|
|
|
code: 200,
|
|
|
|
data: ReceiptList[0].list,
|
|
|
|
};
|
|
|
|
} else if (req.body.name === "杨春宇") {
|
|
|
|
return {
|
|
|
|
code: 200,
|
|
|
|
data: ReceiptList[1].list,
|
|
|
|
};
|
|
|
|
} else if (req.body.name === "吕才卓") {
|
|
|
|
return {
|
|
|
|
code: 200,
|
|
|
|
data: ReceiptList[2].list,
|
|
|
|
};
|
|
|
|
} else {
|
|
|
|
return {
|
|
|
|
code: 200,
|
|
|
|
data: ReceiptList[3].list,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
2024-04-08 16:29:46 +08:00
|
|
|
{
|
|
|
|
url: "/api/breakageList",
|
|
|
|
method: "get",
|
|
|
|
response: () => {
|
|
|
|
return {
|
|
|
|
code: 200,
|
|
|
|
data: breakageList,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
2024-04-06 15:29:30 +08:00
|
|
|
];
|