Merge branch 'dev' of https://gitea.dykj.co/sundongyu/dykj-college-back-office-management-system into dev
This commit is contained in:
commit
735135a86b
|
@ -21,7 +21,7 @@ const ReceiptList = Mock.mock([
|
|||
billserial: "@integer(100000000,199999999)1",
|
||||
proposer: "孙东宇",
|
||||
billType: "@integer(0,4)",
|
||||
receiptNum: "@integer(1,10)张",
|
||||
receiptNum: "@integer(1,10)",
|
||||
receiptDate: "@date",
|
||||
useInfo: "@csentence",
|
||||
},
|
||||
|
@ -34,7 +34,7 @@ const ReceiptList = Mock.mock([
|
|||
billserial: "@integer(100000000,199999999)1",
|
||||
proposer: "杨春宇",
|
||||
billType: "@integer(0,4)",
|
||||
receiptNum: "@integer(1,10)张",
|
||||
receiptNum: "@integer(1,10)",
|
||||
receiptDate: "@date",
|
||||
useInfo: "@csentence",
|
||||
},
|
||||
|
@ -47,7 +47,7 @@ const ReceiptList = Mock.mock([
|
|||
billserial: "@integer(100000000,199999999)1",
|
||||
proposer: "吕才卓",
|
||||
billType: "@integer(0,4)",
|
||||
receiptNum: "@integer(1,10)张",
|
||||
receiptNum: "@integer(1,10)",
|
||||
receiptDate: "@date",
|
||||
useInfo: "@csentence",
|
||||
},
|
||||
|
@ -60,7 +60,7 @@ const ReceiptList = Mock.mock([
|
|||
billserial: "@integer(100000000,199999999)1",
|
||||
proposer: "刘欣宇",
|
||||
billType: "@integer(0,4)",
|
||||
receiptNum: "@integer(1,10)张",
|
||||
receiptNum: "@integer(1,10)",
|
||||
receiptDate: "@date",
|
||||
useInfo: "@csentence",
|
||||
},
|
||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1607,7 +1607,7 @@
|
|||
},
|
||||
"node_modules/pinia-plugin-persistedstate": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-3.2.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-3.2.1.tgz",
|
||||
"integrity": "sha512-MK++8LRUsGF7r45PjBFES82ISnPzyO6IZx3CH5vyPseFLZCk1g2kgx6l/nW8pEBKxxd4do0P6bJw+mUSZIEZUQ==",
|
||||
"peerDependencies": {
|
||||
"pinia": "^2.0.0"
|
||||
|
|
7
src/api/password.js
Normal file
7
src/api/password.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import request from "@/utils/request";
|
||||
// 统一管理接口
|
||||
const API = {
|
||||
PASSWORD_URL: "/api/password",
|
||||
};
|
||||
|
||||
export const reqPassword = () => request.post(API.PASSWORD_URL);
|
7
src/api/students.js
Normal file
7
src/api/students.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import request from "@/utils/request";
|
||||
// 统一管理接口
|
||||
const API = {
|
||||
STUDENT_URL: "/api/student",
|
||||
};
|
||||
|
||||
export const reqStudent = () => request.post(API.STUDENT_URL);
|
|
@ -1,39 +1,50 @@
|
|||
<template>
|
||||
<div style="height: 100%">
|
||||
<t-menu>
|
||||
<t-submenu value="3" title="首页">
|
||||
<t-submenu value="1" title="首页">
|
||||
<template #icon>
|
||||
<t-icon name="home" />
|
||||
</template>
|
||||
<t-menu-item value="3-1" to="/home">
|
||||
<t-menu-item value="1-1" to="/home">
|
||||
<span>首页</span>
|
||||
</t-menu-item>
|
||||
</t-submenu>
|
||||
<t-submenu value="1" title="财务票据管理">
|
||||
<t-submenu value="2" title="财务票据管理">
|
||||
<template #icon>
|
||||
<t-icon name="application" />
|
||||
</template>
|
||||
<t-menu-item value="1-1" to="/Bill/BillStock">
|
||||
<t-menu-item value="2-1" to="/Bill/BillStock">
|
||||
<span>票据入库管理</span>
|
||||
</t-menu-item>
|
||||
<t-menu-item value="1-2" to="/Bill/BillCancel">
|
||||
<t-menu-item value="2-2" to="/Bill/BillCancel">
|
||||
<span>票据退库管理</span>
|
||||
</t-menu-item>
|
||||
<t-menu-item value="1-3" to="/Bill/BillReceipt">
|
||||
<t-menu-item value="2-3" to="/Bill/BillReceipt">
|
||||
<span>票据领用管理</span>
|
||||
</t-menu-item>
|
||||
<t-menu-item value="2-4" to="/Bill/BillQuitneck">
|
||||
<span>票据退领管理</span>
|
||||
</t-menu-item>
|
||||
</t-submenu>
|
||||
<t-submenu value="2" title="应收款管理">
|
||||
<t-submenu value="3" title="应收款管理">
|
||||
<template #icon>
|
||||
<t-icon name="application" />
|
||||
</template>
|
||||
<t-menu-item value="2-1" to="/accounts">
|
||||
<t-menu-item value="3-1" to="/accounts">
|
||||
<span>应收款管理</span>
|
||||
</t-menu-item>
|
||||
<t-menu-item value="2-2" to="/billCollected">
|
||||
<t-menu-item value="3-2" to="/billCollected">
|
||||
<span>学生收款</span>
|
||||
</t-menu-item>
|
||||
</t-submenu>
|
||||
<t-submenu value="4" title="学生管理">
|
||||
<template #icon>
|
||||
<t-icon name="application" />
|
||||
</template>
|
||||
<t-menu-item value="4-1" to="/Students">
|
||||
<span>学生管理</span>
|
||||
</t-menu-item>
|
||||
</t-submenu>
|
||||
</t-menu>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<t-content class="table-box">
|
||||
<div class="table-header">
|
||||
<div>
|
||||
<h4 style="font-size: 110%">票据列表</h4>
|
||||
<h4 style="font-size: 110%">票据退库列表</h4>
|
||||
</div>
|
||||
<div>
|
||||
<t-button
|
||||
|
@ -87,7 +87,7 @@
|
|||
:columns="columns"
|
||||
:pagination="pagination"
|
||||
class="table"
|
||||
:max-height="650"
|
||||
:max-height="550"
|
||||
>
|
||||
<template #billType="{ row }">
|
||||
<div v-for="item in billType" :key="item">
|
||||
|
@ -294,10 +294,12 @@ const columns = ref([
|
|||
fixed: "right",
|
||||
},
|
||||
]);
|
||||
|
||||
// 效验规则
|
||||
const FORM_RULES = {
|
||||
approver: [{ required: true, message: "请输入审批人", trigger: "blur" }],
|
||||
approvalDate: [
|
||||
{ required: true, message: "请选择入库日期", trigger: ["blur", "change"] },
|
||||
{ required: true, message: "请选择入库日期", trigger: "change" },
|
||||
],
|
||||
approvalReason: [
|
||||
{ required: true, message: "请输入审批原因", trigger: "blur" },
|
||||
|
|
389
src/pages/finance-bill-manage/billQuitneck.vue
Normal file
389
src/pages/finance-bill-manage/billQuitneck.vue
Normal file
|
@ -0,0 +1,389 @@
|
|||
<template>
|
||||
<div class="back-color" style="overflow-y: hidden">
|
||||
<t-layout style="height: 100%; background-color: #f5f7fb">
|
||||
<t-aside class="asideTree">
|
||||
<t-space direction="vertical">
|
||||
<t-tree
|
||||
:data="personName"
|
||||
hover
|
||||
transition
|
||||
activable
|
||||
expandAll
|
||||
:expand-mutex="mutex"
|
||||
expand-on-click-node="true"
|
||||
@click="onClick"
|
||||
/>
|
||||
</t-space>
|
||||
</t-aside>
|
||||
<t-content>
|
||||
<t-layout style="height: 100%; background-color: #f5f7fb">
|
||||
<t-header class="scarch-box">
|
||||
<t-form
|
||||
ref="form"
|
||||
:data="scarchData"
|
||||
label-width="calc(2em + 40px)"
|
||||
layout="inline"
|
||||
scroll-to-first-error="smooth"
|
||||
class="scarch-from"
|
||||
@reset="resetting"
|
||||
@submit="headerQuery"
|
||||
>
|
||||
<div style="margin-left: 1rem; margin-top: 1px">
|
||||
<t-form-item label="票据编号:" name="billserial">
|
||||
<t-input
|
||||
v-model="scarchData.billserial"
|
||||
maxlength="10"
|
||||
></t-input>
|
||||
</t-form-item>
|
||||
|
||||
<t-form-item label="退领时间:" name="receiptDate">
|
||||
<t-date-picker v-model="scarchData.receiptDate" clearable />
|
||||
</t-form-item>
|
||||
<t-form-item
|
||||
label="票据类型:"
|
||||
name="billType"
|
||||
style="margin-bottom: 0.3rem"
|
||||
>
|
||||
<t-select
|
||||
v-model="scarchData.billType"
|
||||
placeholder="请选择票据类型"
|
||||
clearable
|
||||
>
|
||||
<t-option
|
||||
v-for="item in billType"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
></t-option>
|
||||
</t-select>
|
||||
</t-form-item>
|
||||
</div>
|
||||
<t-form-item style="margin-right: 1rem">
|
||||
<t-button theme="primary" type="submit">查询</t-button>
|
||||
<t-button theme="primary" type="reset">重置</t-button>
|
||||
</t-form-item>
|
||||
</t-form>
|
||||
</t-header>
|
||||
<t-content class="table-box">
|
||||
<div class="table-header">
|
||||
<div>
|
||||
<h4 style="font-size: 110%">票据退领列表</h4>
|
||||
</div>
|
||||
<div>
|
||||
<t-button
|
||||
shape="circle"
|
||||
theme="primary"
|
||||
@click="refresh"
|
||||
style="margin-left: 0.8rem"
|
||||
>
|
||||
<template #icon><load-icon /></template>
|
||||
</t-button>
|
||||
</div>
|
||||
</div>
|
||||
<t-base-table
|
||||
hover
|
||||
row-key="index"
|
||||
:loading="loading"
|
||||
:data="tableData"
|
||||
:columns="columns"
|
||||
:pagination="pagination"
|
||||
class="table"
|
||||
:max-height="550"
|
||||
>
|
||||
<template #billType="{ row }">
|
||||
<div v-for="item in billType" :key="item">
|
||||
<span v-if="row.billType === item.value">{{
|
||||
item.label
|
||||
}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #receiptNum="{ row }">
|
||||
{{ `${row.receiptNum}张` }}
|
||||
</template>
|
||||
</t-base-table>
|
||||
</t-content>
|
||||
</t-layout>
|
||||
</t-content>
|
||||
</t-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, nextTick } from "vue";
|
||||
import { MessagePlugin } from "tdesign-vue-next";
|
||||
import { LoadIcon } from "tdesign-icons-vue-next";
|
||||
import { useReceiptList } from "@/stores/billReceipt";
|
||||
|
||||
const receiptList = useReceiptList();
|
||||
const personName = ref([]);
|
||||
const tableData = ref([]);
|
||||
const data = ref([]);
|
||||
const loading = ref(false);
|
||||
const visiblePost = ref(false);
|
||||
const columns = ref([
|
||||
{
|
||||
colKey: "serial-number",
|
||||
title: "序号",
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
colKey: "billserial",
|
||||
title: "票据编号",
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
colKey: "proposer",
|
||||
title: "申请人",
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
colKey: "billType",
|
||||
title: "票据类型",
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
colKey: "quitneckNum",
|
||||
title: "退领数量",
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
colKey: "quitneckDate",
|
||||
title: "退领时间",
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
colKey: "quitneckInfo",
|
||||
title: "退领原来",
|
||||
ellipsis: true,
|
||||
align: "center",
|
||||
width: 200,
|
||||
},
|
||||
]);
|
||||
// 票据类型
|
||||
const billType = ref([
|
||||
{ label: "票据类型1", value: 0 },
|
||||
{ label: "票据类型2", value: 1 },
|
||||
{ label: "票据类型3", value: 2 },
|
||||
{ label: "票据类型4", value: 3 },
|
||||
{ label: "票据类型5", value: 4 },
|
||||
]);
|
||||
const dialogData = ref({
|
||||
quitneckDate: "",
|
||||
quitneckReason: "",
|
||||
quitneckNum: "",
|
||||
});
|
||||
|
||||
// 查询表单
|
||||
const scarchData = ref({
|
||||
billserial: "",
|
||||
});
|
||||
|
||||
// 分页
|
||||
const pagination = ref({
|
||||
defaultCurrent: 1,
|
||||
defaultPageSize: 10,
|
||||
total: 50,
|
||||
});
|
||||
|
||||
// 获取票据列表
|
||||
const personList = async () => {
|
||||
personName.value = await receiptList.getPersonNameList();
|
||||
};
|
||||
|
||||
// 效验规则
|
||||
const FORM_RULES = {
|
||||
quitneckNum: [{ required: true, message: "请输入退领张数", trigger: "blur" }],
|
||||
quitneckDate: [
|
||||
{ required: true, message: "请选择退领日期", trigger: "change" },
|
||||
],
|
||||
quitneckReason: [
|
||||
{ required: true, message: "请输入退领原因", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
|
||||
// 查询
|
||||
const headerQuery = () => {
|
||||
tableData.value = data.value;
|
||||
console.log(
|
||||
scarchData.value.billserial,
|
||||
scarchData.value.billType,
|
||||
scarchData.value.receiptDate
|
||||
);
|
||||
if (
|
||||
scarchData.value.billserial === "" &&
|
||||
(scarchData.value.billType === undefined ||
|
||||
scarchData.value.billType === "") &&
|
||||
(scarchData.value.receiptDate === undefined ||
|
||||
scarchData.value.receiptDate === "")
|
||||
) {
|
||||
getNewTable();
|
||||
} else {
|
||||
const list = tableData.value.filter((item) => {
|
||||
let arrList;
|
||||
if (scarchData.value.billserial === item.billserial) {
|
||||
arrList = item;
|
||||
}
|
||||
if (scarchData.value.billType === item.billType) {
|
||||
arrList = item;
|
||||
}
|
||||
if (scarchData.value.receiptDate === item.receiptDate) {
|
||||
arrList = item;
|
||||
}
|
||||
if (
|
||||
scarchData.value.billserial === "" &&
|
||||
scarchData.value.billType === "" &&
|
||||
scarchData.value.receiptDate === ""
|
||||
) {
|
||||
arrList = item;
|
||||
}
|
||||
return arrList;
|
||||
});
|
||||
tableData.value = list;
|
||||
pagination.value.total = list.length;
|
||||
}
|
||||
};
|
||||
// 查询表单重置
|
||||
const resetting = () => {
|
||||
scarchData.value = {
|
||||
billserial: "",
|
||||
billType: "",
|
||||
receiptDate: "",
|
||||
};
|
||||
getNewTable();
|
||||
};
|
||||
const rowItem = ref({});
|
||||
const Quitneck = (value) => {
|
||||
dialogData.value = {
|
||||
quitneckDate: "",
|
||||
quitneckReason: "",
|
||||
quitneckNum: "",
|
||||
};
|
||||
visiblePost.value = true;
|
||||
rowItem.value = value;
|
||||
};
|
||||
// 表单提交
|
||||
const quitneckAdd = async ({ validateResult, firstError }) => {
|
||||
if (validateResult === true) {
|
||||
if (rowItem.value.row.receiptNum - dialogData.value.quitneckNum < 0) {
|
||||
return MessagePlugin.error("退领数量不能大于领用数量");
|
||||
}
|
||||
dialogData.value.quitneckNum =
|
||||
rowItem.value.row.receiptNum - dialogData.value.quitneckNum;
|
||||
dialogData.value.id = rowItem.value.row.id;
|
||||
await receiptList.getquitneckNum(dialogData.value);
|
||||
getTableData();
|
||||
MessagePlugin.success("提交成功");
|
||||
visiblePost.value = false;
|
||||
} else {
|
||||
console.log("Validate Errors: ", firstError, validateResult);
|
||||
}
|
||||
};
|
||||
const onClick = async (context) => {
|
||||
// 判断是否为顶层节点(无父节点)
|
||||
if (context.node.value === "t1") {
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
// 获取票据列表
|
||||
tableData.value = await receiptList.getReceiptList({
|
||||
name: context.node.label,
|
||||
});
|
||||
data.value = await receiptList.getReceiptList({
|
||||
name: context.node.label,
|
||||
});
|
||||
pagination.value.total = tableData.value.length;
|
||||
const timerId = setTimeout(() => {
|
||||
loading.value = false;
|
||||
clearInterval(timerId);
|
||||
}, 300);
|
||||
};
|
||||
// 刷新列表
|
||||
const refresh = () => {
|
||||
getTableData();
|
||||
};
|
||||
// 判断menuManagement里面是否存在数据
|
||||
const getPersonName = () => {
|
||||
let arr = JSON.parse(localStorage.getItem("ReceiptList"));
|
||||
if (arr) {
|
||||
personName.value = arr.personName;
|
||||
} else {
|
||||
personList();
|
||||
}
|
||||
};
|
||||
// 判断menuManagement里面是否存在数据
|
||||
const getTableData = async () => {
|
||||
let arr = JSON.parse(localStorage.getItem("ReceiptList"));
|
||||
if (arr.receiptList.length > 0) {
|
||||
loading.value = true;
|
||||
tableData.value = arr.receiptList;
|
||||
pagination.value.total = tableData.value.length;
|
||||
const timerId = setTimeout(() => {
|
||||
loading.value = false;
|
||||
clearInterval(timerId);
|
||||
}, 300);
|
||||
} else {
|
||||
await nextTick();
|
||||
// 找到第一个具有子节点的节点并模拟点击
|
||||
const firstNodeWithChildren = personName.value.find(
|
||||
(node) => Array.isArray(node.children) && node.children.length > 0
|
||||
);
|
||||
if (firstNodeWithChildren) {
|
||||
const simulatedContext = {
|
||||
node: {
|
||||
label: "孙东宇",
|
||||
},
|
||||
};
|
||||
onClick(simulatedContext);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
getPersonName();
|
||||
getTableData();
|
||||
// 等待 personName 数据加载完成
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.asideTree {
|
||||
margin-right: 2rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 1rem;
|
||||
}
|
||||
.scarch-box {
|
||||
width: 100%;
|
||||
background-color: @base-white-color;
|
||||
margin-bottom: 2rem;
|
||||
.scarch-from {
|
||||
height: 60px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.table-box {
|
||||
height: 41rem;
|
||||
background-color: @base-white-color;
|
||||
padding: 1rem;
|
||||
padding-top: 0;
|
||||
.table-header {
|
||||
height: 3rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
:deep(.t-tree--transition .t-tree__label) {
|
||||
width: 10rem;
|
||||
}
|
||||
:deep(.t-form__controls-content) {
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="back-color">
|
||||
<div class="back-color" style="overflow-y: hidden">
|
||||
<t-layout style="height: 100%; background-color: #f5f7fb">
|
||||
<t-aside class="asideTree">
|
||||
<t-space direction="vertical">
|
||||
|
@ -67,7 +67,7 @@
|
|||
<t-content class="table-box">
|
||||
<div class="table-header">
|
||||
<div>
|
||||
<h4 style="font-size: 110%">票据列表</h4>
|
||||
<h4 style="font-size: 110%">票据领用列表</h4>
|
||||
</div>
|
||||
<div>
|
||||
<t-button
|
||||
|
@ -88,7 +88,7 @@
|
|||
:columns="columns"
|
||||
:pagination="pagination"
|
||||
class="table"
|
||||
:max-height="650"
|
||||
:max-height="550"
|
||||
>
|
||||
<template #billType="{ row }">
|
||||
<div v-for="item in billType" :key="item">
|
||||
|
@ -97,11 +97,90 @@
|
|||
}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #receiptNum="{ row }">
|
||||
{{ `${row.receiptNum}张` }}
|
||||
</template>
|
||||
<template #status="slotProps">
|
||||
<t-button
|
||||
theme="default"
|
||||
variant="text"
|
||||
size="small"
|
||||
@click="Quitneck(slotProps)"
|
||||
:disabled="slotProps.row.receiptNum === 0"
|
||||
>退领</t-button
|
||||
>
|
||||
</template>
|
||||
</t-base-table>
|
||||
</t-content>
|
||||
</t-layout>
|
||||
</t-content>
|
||||
</t-layout>
|
||||
<t-space>
|
||||
<t-dialog
|
||||
ref="postForm"
|
||||
v-model:visible="visiblePost"
|
||||
header="退领"
|
||||
width="40%"
|
||||
:confirm-on-enter="true"
|
||||
:on-close="closePost"
|
||||
:confirm-btn="null"
|
||||
:cancel-btn="null"
|
||||
>
|
||||
<t-space direction="vertical">
|
||||
<div>
|
||||
<t-form
|
||||
ref="formDialog"
|
||||
scroll-to-first-error="smooth"
|
||||
label-align="left"
|
||||
:rules="FORM_RULES"
|
||||
:data="dialogData"
|
||||
:colon="true"
|
||||
@submit="quitneckAdd"
|
||||
label-width="calc(2em + 55px)"
|
||||
@reset="onReset"
|
||||
>
|
||||
<t-form-item
|
||||
label="退领张数"
|
||||
name="quitneckNum"
|
||||
style="margin-bottom: 1.5rem; width: 35rem"
|
||||
>
|
||||
<t-input
|
||||
v-model="dialogData.quitneckNum"
|
||||
type="number"
|
||||
placeholder="请输入退领张数"
|
||||
></t-input>
|
||||
</t-form-item>
|
||||
<t-form-item
|
||||
label="退领时间"
|
||||
name="quitneckDate"
|
||||
style="margin-bottom: 1.5rem; width: 35rem"
|
||||
>
|
||||
<t-date-picker
|
||||
v-model="dialogData.quitneckDate"
|
||||
placeholder="请选择退领时间"
|
||||
clearable
|
||||
style="width: 35rem"
|
||||
/>
|
||||
</t-form-item>
|
||||
<t-form-item label="退领原因" name="quitneckReason">
|
||||
<t-textarea
|
||||
v-model="dialogData.quitneckReason"
|
||||
placeholder="请输入退领原因"
|
||||
></t-textarea>
|
||||
</t-form-item>
|
||||
<t-form-item>
|
||||
<t-space size="small">
|
||||
<t-button theme="primary" type="submit">提交</t-button>
|
||||
<t-button theme="default" variant="base" type="reset"
|
||||
>重置</t-button
|
||||
>
|
||||
</t-space>
|
||||
</t-form-item>
|
||||
</t-form>
|
||||
</div>
|
||||
</t-space>
|
||||
</t-dialog>
|
||||
</t-space>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -115,6 +194,8 @@ const receiptList = useReceiptList();
|
|||
const personName = ref([]);
|
||||
const tableData = ref([]);
|
||||
const data = ref([]);
|
||||
const loading = ref(false);
|
||||
const visiblePost = ref(false);
|
||||
const columns = ref([
|
||||
{
|
||||
colKey: "serial-number",
|
||||
|
@ -158,6 +239,13 @@ const columns = ref([
|
|||
align: "center",
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
colKey: "status",
|
||||
title: "操作",
|
||||
width: 120,
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
},
|
||||
]);
|
||||
// 票据类型
|
||||
const billType = ref([
|
||||
|
@ -167,6 +255,11 @@ const billType = ref([
|
|||
{ label: "票据类型4", value: 3 },
|
||||
{ label: "票据类型5", value: 4 },
|
||||
]);
|
||||
const dialogData = ref({
|
||||
quitneckDate: "",
|
||||
quitneckReason: "",
|
||||
quitneckNum: "",
|
||||
});
|
||||
|
||||
// 查询表单
|
||||
const scarchData = ref({
|
||||
|
@ -185,6 +278,17 @@ const personList = async () => {
|
|||
personName.value = await receiptList.getPersonNameList();
|
||||
};
|
||||
|
||||
// 效验规则
|
||||
const FORM_RULES = {
|
||||
quitneckNum: [{ required: true, message: "请输入退领张数", trigger: "blur" }],
|
||||
quitneckDate: [
|
||||
{ required: true, message: "请选择退领日期", trigger: "change" },
|
||||
],
|
||||
quitneckReason: [
|
||||
{ required: true, message: "请输入退领原因", trigger: "blur" },
|
||||
],
|
||||
};
|
||||
|
||||
// 查询
|
||||
const headerQuery = () => {
|
||||
tableData.value = data.value;
|
||||
|
@ -235,12 +339,39 @@ const resetting = () => {
|
|||
};
|
||||
getNewTable();
|
||||
};
|
||||
|
||||
const rowItem = ref({});
|
||||
const Quitneck = (value) => {
|
||||
dialogData.value = {
|
||||
quitneckDate: "",
|
||||
quitneckReason: "",
|
||||
quitneckNum: "",
|
||||
};
|
||||
visiblePost.value = true;
|
||||
rowItem.value = value;
|
||||
};
|
||||
// 表单提交
|
||||
const quitneckAdd = async ({ validateResult, firstError }) => {
|
||||
if (validateResult === true) {
|
||||
if (rowItem.value.row.receiptNum - dialogData.value.quitneckNum < 0) {
|
||||
return MessagePlugin.error("退领数量不能大于领用数量");
|
||||
}
|
||||
dialogData.value.quitneckNum =
|
||||
rowItem.value.row.receiptNum - dialogData.value.quitneckNum;
|
||||
dialogData.value.id = rowItem.value.row.id;
|
||||
await receiptList.getquitneckNum(dialogData.value);
|
||||
getTableData();
|
||||
MessagePlugin.success("提交成功");
|
||||
visiblePost.value = false;
|
||||
} else {
|
||||
console.log("Validate Errors: ", firstError, validateResult);
|
||||
}
|
||||
};
|
||||
const onClick = async (context) => {
|
||||
// 判断是否为顶层节点(无父节点)
|
||||
if (context.node.value === "t1") {
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
// 获取票据列表
|
||||
tableData.value = await receiptList.getReceiptList({
|
||||
name: context.node.label,
|
||||
|
@ -249,6 +380,10 @@ const onClick = async (context) => {
|
|||
name: context.node.label,
|
||||
});
|
||||
pagination.value.total = tableData.value.length;
|
||||
const timerId = setTimeout(() => {
|
||||
loading.value = false;
|
||||
clearInterval(timerId);
|
||||
}, 300);
|
||||
};
|
||||
// 刷新列表
|
||||
const refresh = () => {
|
||||
|
@ -267,7 +402,13 @@ const getPersonName = () => {
|
|||
const getTableData = async () => {
|
||||
let arr = JSON.parse(localStorage.getItem("ReceiptList"));
|
||||
if (arr.receiptList.length > 0) {
|
||||
loading.value = true;
|
||||
tableData.value = arr.receiptList;
|
||||
pagination.value.total = tableData.value.length;
|
||||
const timerId = setTimeout(() => {
|
||||
loading.value = false;
|
||||
clearInterval(timerId);
|
||||
}, 300);
|
||||
} else {
|
||||
await nextTick();
|
||||
// 找到第一个具有子节点的节点并模拟点击
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<t-content class="table-box">
|
||||
<div class="table-header">
|
||||
<div>
|
||||
<h4 style="font-size: 110%">票据列表</h4>
|
||||
<h4 style="font-size: 110%">票据入库列表</h4>
|
||||
</div>
|
||||
<div>
|
||||
<t-button theme="primary" size="small" @click="addStock">
|
||||
|
@ -73,7 +73,7 @@
|
|||
:columns="columns"
|
||||
:pagination="pagination"
|
||||
class="table"
|
||||
:max-height="650"
|
||||
:max-height="550"
|
||||
>
|
||||
<template #billType="{ row }">
|
||||
<div v-for="item in billType" :key="item">
|
||||
|
@ -407,14 +407,10 @@ const closePost = () => {
|
|||
// 表单校验
|
||||
const FORM_RULES = {
|
||||
billserial: [{ required: true, message: "请输入票据编号", trigger: "blur" }],
|
||||
billType: [
|
||||
{ required: true, message: "请选择票据类型", trigger: ["blur", "change"] },
|
||||
],
|
||||
billType: [{ required: true, message: "请选择票据类型", trigger: "change" }],
|
||||
stockNum: [{ required: true, message: "请输入库存数量", trigger: "blur" }],
|
||||
unit: [{ required: true, message: "请输入单位", trigger: "blur" }],
|
||||
stockDate: [
|
||||
{ required: true, message: "请选择入库日期", trigger: ["blur", "change"] },
|
||||
],
|
||||
stockDate: [{ required: true, message: "请选择入库日期", trigger: "change" }],
|
||||
operator: [{ required: true, message: "请输入操作员", trigger: "blur" }],
|
||||
};
|
||||
|
||||
|
|
|
@ -54,7 +54,8 @@
|
|||
import { MessagePlugin } from "tdesign-vue-next";
|
||||
import { reactive, ref, onMounted } from "vue";
|
||||
import { reqUser } from "@/api/login";
|
||||
import router from "@/router";
|
||||
import { useRouter } from "vue-router";
|
||||
import axios from 'axios';
|
||||
// import { TForm, TFormItem, TInput, TButton } from "tdesign-vue-next";
|
||||
// import { DesktopIcon, LockOnIcon } from "tdesign-icons-vue";
|
||||
|
||||
|
@ -62,7 +63,9 @@ const INITIAL_DATA = {
|
|||
account: "",
|
||||
password: "",
|
||||
};
|
||||
const from = ref();
|
||||
|
||||
const from = ref(null);
|
||||
const router = useRouter();
|
||||
const formData = reactive({
|
||||
...INITIAL_DATA,
|
||||
});
|
||||
|
@ -74,12 +77,8 @@ const rules = reactive({
|
|||
message: "必须填写",
|
||||
},
|
||||
{
|
||||
min: 10,
|
||||
message: "输入不正确",
|
||||
},
|
||||
{
|
||||
max: 10,
|
||||
message: "输入不正确",
|
||||
pattern: /^\d{10}$/, // 正则表达式只允许10位数字
|
||||
message: "学号必须是10位数字",
|
||||
},
|
||||
],
|
||||
password: [
|
||||
|
@ -92,40 +91,25 @@ const rules = reactive({
|
|||
message: "请输入 8 位密码",
|
||||
},
|
||||
{
|
||||
pattern: /[A-Z]+/,
|
||||
message: "密码必须包含大写字母",
|
||||
pattern: /^(?=.*[A-Z])(?=.*\d)[A-Za-z\d]{8,}$/u,
|
||||
message: "密码必须包含至少一个大写字母,并由字母和数字组成",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const onReset = () => {
|
||||
// 清空表单数据
|
||||
formData.account = "";
|
||||
formData.password = "";
|
||||
MessagePlugin.success("重置成功");
|
||||
};
|
||||
// const onSubmit = () => {
|
||||
// this.$refs.form.validateResult((valid,errors) => {
|
||||
// console.log(valid);
|
||||
// if (valid) {
|
||||
// MessagePlugin.success("提交成功");
|
||||
// } else {
|
||||
// MessagePlugin.error("提交失败");
|
||||
// console.log("Errors: ", errors);
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
onMounted(() => {
|
||||
reqUser();
|
||||
});
|
||||
|
||||
const onSubmit = async () => {
|
||||
try {
|
||||
const validateResult = await this.$refs.form.validate();
|
||||
if (validateResult.result) {
|
||||
await reqUser();
|
||||
const validateResult = await from.value?.validate();
|
||||
if (validateResult?.result) {
|
||||
await reqUser(formData.account, formData.password);
|
||||
MessagePlugin.success("提交成功");
|
||||
await router.push("/");
|
||||
} else {
|
||||
const firstError = validateResult.errors[0]?.message || "未知错误";
|
||||
const firstError = validateResult?.errors[0]?.message || "未知错误";
|
||||
console.log("Errors: ", validateResult.errors);
|
||||
MessagePlugin.warning(firstError);
|
||||
}
|
||||
|
@ -135,18 +119,9 @@ const onSubmit = async () => {
|
|||
}
|
||||
};
|
||||
|
||||
// const Login = async () => {
|
||||
// await reqUser();
|
||||
// };
|
||||
|
||||
onMounted(() => {
|
||||
reqUser();
|
||||
});
|
||||
|
||||
function handleForgotPasswordClick() {
|
||||
router.push("/password-reset")
|
||||
router.push("/password-reset");
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
import { MessagePlugin } from "tdesign-vue-next";
|
||||
import { reactive } from "vue";
|
||||
import router from "@/router";
|
||||
import {reqPassword} from "@/api/password"
|
||||
|
||||
const INITIAL_DATA = {
|
||||
account: "",
|
||||
|
@ -57,6 +58,14 @@ const formData = reactive({
|
|||
...INITIAL_DATA,
|
||||
});
|
||||
|
||||
const rePassword = (val) =>
|
||||
new Promise((resolve) => {
|
||||
const timer = setTimeout(() => {
|
||||
resolve(formData.password === val);
|
||||
clearTimeout(timer);
|
||||
});
|
||||
});
|
||||
|
||||
const rules = reactive({
|
||||
account: [
|
||||
{
|
||||
|
@ -65,12 +74,8 @@ const rules = reactive({
|
|||
type: "error",
|
||||
},
|
||||
{
|
||||
min: 10,
|
||||
message: "输入不正确",
|
||||
},
|
||||
{
|
||||
max: 10,
|
||||
message: "输入不正确",
|
||||
pattern: /^\d{10}$/, // 正则表达式只允许10位数字
|
||||
message: "学号必须是10位数字",
|
||||
},
|
||||
],
|
||||
password: [
|
||||
|
@ -84,8 +89,8 @@ const rules = reactive({
|
|||
message: "请输入 8 位密码",
|
||||
},
|
||||
{
|
||||
pattern: /[A-Z]+/,
|
||||
message: "密码必须包含大写字母",
|
||||
pattern: /^(?=.*[A-Z])(?=.*\d)[A-Za-z\d]{8,}$/u,
|
||||
message: "密码必须包含至少一个大写字母,并由字母和数字组成",
|
||||
},
|
||||
],
|
||||
rePassword: [
|
||||
|
@ -102,6 +107,11 @@ const rules = reactive({
|
|||
pattern: /[A-Z]+/,
|
||||
message: "密码必须包含大写字母",
|
||||
},
|
||||
{
|
||||
validator: rePassword,
|
||||
trigger: ["blur", "change"],
|
||||
message: "两次密码不一致",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
|
@ -109,69 +119,32 @@ const onReset = () => {
|
|||
MessagePlugin.success("重置成功");
|
||||
};
|
||||
|
||||
const onSubmit = ({ validateResult, firstError }) => {
|
||||
if (validateResult === true) {
|
||||
MessagePlugin.success("提交成功");
|
||||
} else {
|
||||
console.log("Errors: ", validateResult);
|
||||
MessagePlugin.warning(firstError);
|
||||
const onSubmit = async () => {
|
||||
try {
|
||||
const validateResult = await from.value?.validate();
|
||||
if (validateResult?.result) {
|
||||
await reqPassword(formData.account, formData.password, formData.rePassword);
|
||||
MessagePlugin.success("提交成功");
|
||||
await router.push("/");
|
||||
} else {
|
||||
const firstError = validateResult?.errors[0]?.message || "未知错误";
|
||||
console.log("Errors: ", validateResult.errors);
|
||||
MessagePlugin.warning(firstError);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("请求失败:", error);
|
||||
MessagePlugin.error("提交失败");
|
||||
}
|
||||
};
|
||||
|
||||
const onValidate = ({ validateResult, firstError }) => {
|
||||
if (validateResult === true) {
|
||||
onSubmit();
|
||||
console.log("Validate Success");
|
||||
} else {
|
||||
console.log("Validate Errors: ", firstError, validateResult);
|
||||
}
|
||||
};
|
||||
// 自定义异步校验器,使用 resolve 返回结果控制校验结果、校验信息、校验结果类型
|
||||
const userNameValidator = (val) =>
|
||||
new Promise((resolve) => {
|
||||
const timer = setTimeout(() => {
|
||||
if (["Zhang", "Li", "Wang"].includes(val)) {
|
||||
resolve({
|
||||
result: true,
|
||||
});
|
||||
} else {
|
||||
resolve({
|
||||
result: false,
|
||||
message: "用户名不存在",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
clearTimeout(timer);
|
||||
}, 10);
|
||||
});
|
||||
// 自定义校验器,不同的值输出不同的校验结果。支持异步校验(文案选自某密码重置站点,如有侵权,请联系我们删除)
|
||||
const passwordValidator = (val) => {
|
||||
if (val.length > 0 && val.length <= 2) {
|
||||
return {
|
||||
result: false,
|
||||
message: "太简单了!再开动一下你的小脑筋吧!",
|
||||
type: "error",
|
||||
};
|
||||
}
|
||||
if (val.length > 2 && val.length < 4) {
|
||||
return {
|
||||
result: false,
|
||||
message: "还差一点点,就是一个完美的密码了!",
|
||||
type: "warning",
|
||||
};
|
||||
}
|
||||
return {
|
||||
result: true,
|
||||
message: "太强了,你确定自己记得住吗!",
|
||||
type: "success",
|
||||
};
|
||||
};
|
||||
// 自定义异步校验器
|
||||
const rePassword = (val) =>
|
||||
new Promise((resolve) => {
|
||||
const timer = setTimeout(() => {
|
||||
resolve(formData.password === val);
|
||||
clearTimeout(timer);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
@ -1,46 +1,146 @@
|
|||
<template>
|
||||
<div>
|
||||
students
|
||||
<t-space direction="vertical">
|
||||
<!-- 按钮操作区域 -->
|
||||
<div>
|
||||
<t-radio-group v-model="size" variant="default-filled">
|
||||
<t-radio-button value="small">小尺寸</t-radio-button>
|
||||
<t-radio-button value="medium">中尺寸</t-radio-button>
|
||||
<t-radio-button value="large">大尺寸</t-radio-button>
|
||||
</t-radio-group>
|
||||
</div>
|
||||
|
||||
<t-space>
|
||||
<t-checkbox v-model="stripe">显示斑马纹</t-checkbox>
|
||||
<t-checkbox v-model="bordered">显示表格边框</t-checkbox>
|
||||
<t-checkbox v-model="hover">显示悬浮效果</t-checkbox>
|
||||
<t-checkbox v-model="tableLayout">宽度自适应</t-checkbox>
|
||||
<t-checkbox v-model="showHeader">显示表头</t-checkbox>
|
||||
<t-space direction="vertical">
|
||||
<t-form ref="searchForm" @reset="onReset">
|
||||
<t-form-item label="姓名" name="name">
|
||||
<t-input v-model="searchCriteria.name" placeholder="请输入姓名"></t-input>
|
||||
</t-form-item>
|
||||
<t-form-item label="学号" name="studentId">
|
||||
<t-input v-model="searchCriteria.studentId" placeholder="请输入学号"></t-input>
|
||||
</t-form-item>
|
||||
<t-form-item>
|
||||
<t-space size="10px">
|
||||
<t-button theme="primary" type="submit" @click="onSearch">查询</t-button>
|
||||
<t-button theme="default" variant="base" type="reset">重置</t-button>
|
||||
</t-space>
|
||||
</t-form-item>
|
||||
</t-form>
|
||||
|
||||
<!-- 当数据为空需要占位时,会显示 cellEmptyContent -->
|
||||
<t-table
|
||||
rowKey="index"
|
||||
:data="data"
|
||||
:columns="columns"
|
||||
:stripe="stripe"
|
||||
:bordered="bordered"
|
||||
:hover="hover"
|
||||
:size="size"
|
||||
:table-layout="tableLayout ? 'auto' : 'fixed'"
|
||||
:pagination="pagination"
|
||||
:showHeader="showHeader"
|
||||
cellEmptyContent="-"
|
||||
resizable
|
||||
></t-table>
|
||||
<t-space>
|
||||
<t-checkbox v-model="stripe">显示斑马纹</t-checkbox>
|
||||
<t-checkbox v-model="bordered">显示表格边框</t-checkbox>
|
||||
<t-checkbox v-model="hover">显示悬浮效果</t-checkbox>
|
||||
<t-checkbox v-model="tableLayout">宽度自适应</t-checkbox>
|
||||
<t-checkbox v-model="showHeader">显示表头</t-checkbox>
|
||||
</t-space>
|
||||
</div>
|
||||
|
||||
<t-table
|
||||
rowKey="studentId"
|
||||
:data="studentList"
|
||||
:columns="studentColumns"
|
||||
:stripe="stripe"
|
||||
:bordered="bordered"
|
||||
:hover="hover"
|
||||
:size="size"
|
||||
:table-layout="tableLayout ? 'auto' : 'fixed'"
|
||||
:pagination="pagination"
|
||||
:showHeader="showHeader"
|
||||
cellEmptyContent="-"
|
||||
resizable
|
||||
></t-table>
|
||||
</t-space>
|
||||
<!-- 动态操作列 -->
|
||||
<!-- <t-table-column label="操作">
|
||||
<template #default="{ row }">
|
||||
<t-button-group>
|
||||
<t-button @click="handleLeave(row)">休学</t-button>
|
||||
<t-button @click="handleWithdraw(row)">退学</t-button>
|
||||
<t-button @click="handleReturn(row)">复学</t-button>
|
||||
</t-button-group>
|
||||
</template>
|
||||
</t-table-column> -->
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, computed } from 'vue';
|
||||
import { MessagePlugin } from "tdesign-vue-next";
|
||||
import { ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { reqStudent } from "@/api/students";
|
||||
|
||||
const router = useRouter();
|
||||
const searchForm = ref(null);
|
||||
const initialStudentData = [];
|
||||
const total = 28;
|
||||
for (let i = 0; i < total; i++) {
|
||||
initialStudentData.push({
|
||||
studentId: `${'S'}${i + 1}`,
|
||||
name: ['贾明', '张三', '王芳'][i % 3],
|
||||
gender: ['男', '女'][i % 2],
|
||||
departmentCode: 'D' + (i % 4 + 1),
|
||||
department: ['计算机科学系', '数学系', '物理系', '化学系'][i % 4],
|
||||
className: 'C' + (i % 5 + 1),
|
||||
majorCode: 'M' + (i % 6 + 1),
|
||||
major: ['计算机科学与技术', '数学', '物理学', '化学', '生物学', '经济学'][i % 6],
|
||||
classCode: 'C' + (i % 5 + 1),
|
||||
classes: ['一班', '二班', '三班', '四班', '五班'][i % 5],
|
||||
});
|
||||
}
|
||||
|
||||
// 查询条件
|
||||
const searchCriteria = reactive({ name: '', studentId: '' });
|
||||
|
||||
// 学生列表数据
|
||||
const studentList = computed(() => {
|
||||
return initialStudentData.filter(student =>
|
||||
(!searchCriteria.name || student.name.includes(searchCriteria.name)) &&
|
||||
(!searchCriteria.studentId || student.studentId === searchCriteria.studentId)
|
||||
);
|
||||
});
|
||||
|
||||
// 表格列定义
|
||||
const studentColumns = ref([
|
||||
{
|
||||
colKey: 'studentId',
|
||||
title: '学号',
|
||||
},
|
||||
{
|
||||
colKey: 'name',
|
||||
title: '姓名',
|
||||
},
|
||||
{
|
||||
colKey: 'gender',
|
||||
title: '性别',
|
||||
},
|
||||
{
|
||||
colKey: 'department',
|
||||
title: '系院',
|
||||
},
|
||||
{
|
||||
colKey: 'major',
|
||||
title: '专业',
|
||||
},
|
||||
{
|
||||
colKey: 'classes',
|
||||
title: '班级',
|
||||
},
|
||||
]);
|
||||
|
||||
const size = ref('medium');
|
||||
const tableLayout = ref(false);
|
||||
const stripe = ref(false);
|
||||
const bordered = ref(false);
|
||||
const hover = ref(true);
|
||||
const showHeader = ref(true);
|
||||
|
||||
const pagination = reactive({
|
||||
defaultCurrent: 1,
|
||||
defaultPageSize: 5,
|
||||
total: initialStudentData.length,
|
||||
});
|
||||
|
||||
// 查询功能
|
||||
const onSearch = () => {
|
||||
pagination.defaultCurrent = 1;
|
||||
};
|
||||
|
||||
const onReset = () => {
|
||||
searchCriteria.name = '';
|
||||
searchCriteria.studentId = '';
|
||||
pagination.defaultCurrent = 1;
|
||||
MessagePlugin.success("重置成功");
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { createRouter, createWebHistory } from "vue-router";
|
||||
import FinanceBillManage from "./modules/financeBillManage";
|
||||
import ReceivablesManagement from "./modules/receivablesManagement";
|
||||
import StudentManage from "./modules/studentManage";
|
||||
import Login from "@/pages/login/index.vue";
|
||||
import Password from "@/pages/password/index.vue";
|
||||
import Student from "@/pages/students/student.vue";
|
||||
|
||||
import Layout from "@/layout/index.vue";
|
||||
const router = createRouter({
|
||||
|
@ -35,14 +35,10 @@ const router = createRouter({
|
|||
name: "password",
|
||||
component: Password,
|
||||
},
|
||||
{
|
||||
path: "/student",
|
||||
name: "student",
|
||||
component: Student,
|
||||
},
|
||||
...FinanceBillManage,
|
||||
...ReceivablesManagement
|
||||
]
|
||||
...ReceivablesManagement,
|
||||
...StudentManage,
|
||||
],
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
|
|
@ -2,6 +2,7 @@ import Layout from "@/layout/index.vue";
|
|||
import BillStockURL from "@/pages/finance-bill-manage/billStock.vue";
|
||||
import BillCancelURL from "@/pages/finance-bill-manage/billCancel.vue";
|
||||
import BillReceiptURL from "@/pages/finance-bill-manage/billReceipt.vue";
|
||||
import BillQuitneckURL from "@/pages/finance-bill-manage/billQuitneck.vue";
|
||||
|
||||
const financeBillManage = [
|
||||
{
|
||||
|
@ -34,6 +35,14 @@ const financeBillManage = [
|
|||
title: "票据领用",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "BillQuitneck",
|
||||
name: "billQuitneck",
|
||||
component: BillQuitneckURL,
|
||||
meta: {
|
||||
title: "票据退领",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
24
src/router/modules/studentManage.js
Normal file
24
src/router/modules/studentManage.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
import Layout from "@/layout/index.vue";
|
||||
// import studentURL from "@/pages/students/student";
|
||||
import studentURL from "@/pages/students/student.vue";
|
||||
|
||||
const financeBillManage = [
|
||||
{
|
||||
path: "/Student",
|
||||
name: "student",
|
||||
component: Layout,
|
||||
meta: { title: "学生", name: "resource" },
|
||||
children: [
|
||||
{
|
||||
path: "/Students",
|
||||
name: "students",
|
||||
component: studentURL,
|
||||
meta: {
|
||||
title: "学生管理",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default financeBillManage;
|
|
@ -24,6 +24,14 @@ export const useReceiptList = defineStore("ReceiptList", {
|
|||
this.receiptList = data;
|
||||
return this.receiptList;
|
||||
},
|
||||
async getquitneckNum(obj) {
|
||||
console.log(obj);
|
||||
const index = this.receiptList.findIndex((item) => item.id === obj.id);
|
||||
if (index !== -1) {
|
||||
this.receiptList[index].receiptNum = obj.quitneckNum;
|
||||
}
|
||||
console.log(this.receiptList);
|
||||
},
|
||||
},
|
||||
persist: true,
|
||||
});
|
||||
|
|
|
@ -15,10 +15,8 @@ export const useStock = defineStore("menuManagement", {
|
|||
},
|
||||
addStockList(arr) {
|
||||
const index = this.stockList.findIndex((item) => item.id === arr.id);
|
||||
console.log(arr);
|
||||
if (index !== -1) {
|
||||
this.stockList[index] = arr;
|
||||
console.log(this.stockList, "222");
|
||||
} else {
|
||||
arr.id = new Date().getTime();
|
||||
this.stockList.unshift(arr);
|
||||
|
|
|
@ -11,7 +11,7 @@ export default defineConfig({
|
|||
server: {
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://192.168.1.10:8000",
|
||||
target: "http://192.168.1.10:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user