diff --git a/mock/modules/sdy.js b/mock/modules/sdy.js index f748914..cf606e8 100644 --- a/mock/modules/sdy.js +++ b/mock/modules/sdy.js @@ -13,6 +13,20 @@ const data = Mock.mock({ } ] }) +const loans = Mock.mock({ + "list|45": [ + { + "id|+1": 1, + 'proposer': '@cname', + 'student': '@integer(100000000,999999999)', + 'allowance': '@integer(10000,50000)', + 'department': '@pick(["机电工程系","护理分院","建筑系","材料科学与工程系","环境科学与工程系"])', + 'cation': '@pick(["2021-2022学年度","2022-2023学年度"])', + 'loanTerm': '@pick(["已放款","未放款"])', + 'timeofapplication': '@date("yyyy-MM-dd")', + } + ] +}) export default [ { url: '/get-sdy-managment-list', @@ -58,5 +72,38 @@ export default [ code: 200, } } - } + }, + // 借款管理 + { + url: '/get-sdy-loan-list', + method: 'get', + response: () => { + return { + code: 200, + data: loans + } + } + }, + // 添加借款人 + { + url: '/post-sdy-loan-add', + method: 'post', + response: (req) => { + const newLoan = { + id: loans.list.length + 1, + proposer: req.body.proposer, + student: req.body.student, + allowance: req.body.allowance, + department: req.body.department, + cation: req.body.cation, + loanTerm: req.body.loanTerm, + timeofapplication: req.body.timeofapplication, + } + loans.list.push(newLoan) + return { + code: 200, + data: newLoan + } + } + }, ] \ No newline at end of file diff --git a/mock/modules/ycy.js b/mock/modules/ycy.js index 69091dd..94304eb 100644 --- a/mock/modules/ycy.js +++ b/mock/modules/ycy.js @@ -8,7 +8,6 @@ const StockList = Mock.mock({ billserial: "@integer(100000000,199999999)1", billType: "@integer(0,4)", stockNum: "@integer(1,2)", - unit: "@cword(张本,1)", stockDate: "@date", operator: "@cname", remark: " @integer(10000000000,19999999999)", @@ -182,6 +181,21 @@ const breakageList = Mock.mock({ }, ], }); +// +const detailReportList = Mock.mock({ + "list|5": [ + { + "id|+1": 0, + branch: "@cname", + stockNum: "@integer(1,20)张", + cancelNum: "@integer(0,20)张", + receiveNum: "@integer(0,20)张", + breakNum: "@integer(0,20)张", + destoryNum: "@integer(0,20)张", + grossBillRatio: "25%", + }, + ], +}); export default [ { @@ -252,4 +266,14 @@ export default [ }; }, }, + { + url: "/api/detailReportList", + method: "get", + response: () => { + return { + code: 200, + data: detailReportList, + }; + }, + }, ]; diff --git a/package-lock.json b/package-lock.json index 7f33dcb..243e37f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "axios": "^1.6.8", "dayjs": "^1.11.10", + "echarts": "^5.5.0", "less": "^4.2.0", "mockjs": "^1.1.0", "pinia": "^2.1.7", @@ -1024,6 +1025,20 @@ "node": ">=0.4.0" } }, + "node_modules/echarts": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.5.0.tgz", + "integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==", + "dependencies": { + "tslib": "2.3.0", + "zrender": "5.5.0" + } + }, + "node_modules/echarts/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, "node_modules/ee-first": { "version": "1.1.1", "license": "MIT" @@ -2058,6 +2073,19 @@ "version": "3.1.1", "dev": true, "license": "ISC" + }, + "node_modules/zrender": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.5.0.tgz", + "integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==", + "dependencies": { + "tslib": "2.3.0" + } + }, + "node_modules/zrender/node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" } } } diff --git a/package.json b/package.json index 98f0615..beb66d2 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,9 @@ "dependencies": { "axios": "^1.6.8", "dayjs": "^1.11.10", + "echarts": "^5.5.0", + "exceljs": "^4.4.0", + "file-saver": "^2.0.5", "less": "^4.2.0", "mockjs": "^1.1.0", "pinia": "^2.1.7", diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index df36fcf..0000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/src/api/finance-bill-manage/detailReportList.js b/src/api/finance-bill-manage/detailReportList.js new file mode 100644 index 0000000..82162bf --- /dev/null +++ b/src/api/finance-bill-manage/detailReportList.js @@ -0,0 +1,7 @@ +import request from "@/utils/requestMock"; + +const API = { + DETAILREPORT_LIST: "/detailReportList", +}; + +export const reqDetailReportList = () => request.get(API.DETAILREPORT_LIST); diff --git a/src/api/receivables-management/management.js b/src/api/receivables-management/management.js index f7740e3..317622d 100644 --- a/src/api/receivables-management/management.js +++ b/src/api/receivables-management/management.js @@ -1,8 +1,17 @@ import request from '@/utils/request' - +// 收款管理 export function APIReceivablesList() { return request.get('/get-sdy-managment-list') } +//查询收款 export function APIReceivablesAdd(data) { return request.post('/post-sdy-managment-find', data) +} +//贷款管理 +export function APILoansList() { + return request.get('/get-sdy-loan-list') +} +//查询贷款 +export function APILoansAdd(data) { + return request.post('/post-sdy-loan-add', data) } \ No newline at end of file diff --git a/src/components/echarts/bar.vue b/src/components/echarts/bar.vue new file mode 100644 index 0000000..7d94e15 --- /dev/null +++ b/src/components/echarts/bar.vue @@ -0,0 +1,89 @@ + + + + + + + + + diff --git a/src/components/echarts/line.vue b/src/components/echarts/line.vue new file mode 100644 index 0000000..3e21e69 --- /dev/null +++ b/src/components/echarts/line.vue @@ -0,0 +1,117 @@ + + + + 111111 + + + + + + + diff --git a/src/components/echarts/pie.vue b/src/components/echarts/pie.vue new file mode 100644 index 0000000..8343c39 --- /dev/null +++ b/src/components/echarts/pie.vue @@ -0,0 +1,82 @@ + + + + + + + + + diff --git a/src/layout/components/LayoutAside.vue b/src/layout/components/LayoutAside.vue index 7647ca5..15d9975 100644 --- a/src/layout/components/LayoutAside.vue +++ b/src/layout/components/LayoutAside.vue @@ -31,6 +31,9 @@ 票据核销 + + 报表明细 + @@ -42,6 +45,12 @@ 学生收款 + + 助学贷款 + + + 收费日报 + diff --git a/src/pages/finance-bill-manage/billBreakage.vue b/src/pages/finance-bill-manage/billBreakage.vue index 38f6784..1a1771e 100644 --- a/src/pages/finance-bill-manage/billBreakage.vue +++ b/src/pages/finance-bill-manage/billBreakage.vue @@ -174,6 +174,7 @@ { if (validateResult === true) { dialogData.value = { - ...rowItem.row.value, + ...rowItem.value.row, + breakStatus: Number(dialogData.value.Status), }; await destroyList.auditDestroyList(dialogData.value); getNewTable(); - MessagePlugin.success("提交成功"); visiblePost.value = false; + MessagePlugin.success("提交成功"); } else { console.log("Validate Errors: ", firstError, validateResult); } diff --git a/src/pages/finance-bill-manage/billStock.vue b/src/pages/finance-bill-manage/billStock.vue index c9593bb..9b86ff4 100644 --- a/src/pages/finance-bill-manage/billStock.vue +++ b/src/pages/finance-bill-manage/billStock.vue @@ -75,6 +75,9 @@ class="table" :max-height="550" > + + {{ `${row.stockNum}张` }} + {{ item.label }} @@ -134,6 +137,7 @@ - - - + + + + + + + + + + + 查询 + 重置 + + + + + + + 报表明细 + + + + 导出报表明细 + + + + + + + + + {{ `${row.quitneckNum}张` }} + + + + + + + + + + diff --git a/src/pages/home/components/homeCenter.vue b/src/pages/home/components/homeCenter.vue new file mode 100644 index 0000000..71e32ab --- /dev/null +++ b/src/pages/home/components/homeCenter.vue @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + diff --git a/src/pages/home/components/homeFooter.vue b/src/pages/home/components/homeFooter.vue new file mode 100644 index 0000000..7c05996 --- /dev/null +++ b/src/pages/home/components/homeFooter.vue @@ -0,0 +1,40 @@ + + + + + + + + + diff --git a/src/pages/home/components/homeHeader.vue b/src/pages/home/components/homeHeader.vue new file mode 100644 index 0000000..acb7bf9 --- /dev/null +++ b/src/pages/home/components/homeHeader.vue @@ -0,0 +1,90 @@ + + + + + + + + + {{ item.title }} + {{ item.num }} + + + + + + + + + diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue index 677f24b..af7b30f 100644 --- a/src/pages/home/index.vue +++ b/src/pages/home/index.vue @@ -1,7 +1,41 @@ - + + + + + + + + + + + + + - + - + diff --git a/src/pages/receivables-management/billCollected.vue b/src/pages/receivables-management/billCollected.vue index df23924..c02a631 100644 --- a/src/pages/receivables-management/billCollected.vue +++ b/src/pages/receivables-management/billCollected.vue @@ -14,6 +14,9 @@ 填写电子票据 + 申请为减免学生 @@ -170,6 +173,7 @@ const editableCellState = cellParams => { return row.status !== 2 } const tableRef = ref() +//收费表格 const columns = computed(() => [ { title: '学生姓名', @@ -289,12 +293,22 @@ const columns = computed(() => [ }, { title: '操作', - colKey: 'operation' + width: 300, + colKey: 'operation', + align: 'center' } ]) +// 发票 const handleEdit = row => { router.push({ - path: 'bill-bill', + path: '/bill-bill', + query: row + }) +} +// 申请为减免学生 +const waivarForm = row => { + router.push({ + path: '/waivar-form', query: row }) } diff --git a/src/pages/receivables-management/daily.vue b/src/pages/receivables-management/daily.vue new file mode 100644 index 0000000..6ac5ab5 --- /dev/null +++ b/src/pages/receivables-management/daily.vue @@ -0,0 +1,7 @@ + + 1 + + + + + diff --git a/src/pages/receivables-management/studentLoan.vue b/src/pages/receivables-management/studentLoan.vue new file mode 100644 index 0000000..7a20386 --- /dev/null +++ b/src/pages/receivables-management/studentLoan.vue @@ -0,0 +1,402 @@ + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + 申请助学贷款 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/pages/receivables-management/waiverForm.vue b/src/pages/receivables-management/waiverForm.vue new file mode 100644 index 0000000..374a172 --- /dev/null +++ b/src/pages/receivables-management/waiverForm.vue @@ -0,0 +1,257 @@ + + + + + 申请人情况 + + + + + 学号 + + + 姓名 + + + 性别 + + + 出身年月 + + + + + 专业 + + + 班级 + + + 证号 + + + 身份证号 + + + + + + 家庭住址 + + + + 邮政编码 + + + + 联系电话 + + + + 年缴学费 + + + + + + + + 家庭情况 + + + 1 + + + + + 减免申请 + + + 2 + + + + + 辅导员意见 + + + 3 + + + + + 学工部意见 + + + 1 + + + + + + 主管院长审批意见 + + + + 4 + + + + 备注 + + + + 填写完毕立刻生低档 + + + + + + + diff --git a/src/router/modules/financeBillManage.js b/src/router/modules/financeBillManage.js index 9da78d7..642f93f 100644 --- a/src/router/modules/financeBillManage.js +++ b/src/router/modules/financeBillManage.js @@ -5,6 +5,7 @@ import BillReceiptURL from "@/pages/finance-bill-manage/billReceipt.vue"; import BillQuitneckURL from "@/pages/finance-bill-manage/billQuitneck.vue"; import BillBreakagekURL from "@/pages/finance-bill-manage/billBreakage.vue"; import BillDestroyURL from "@/pages/finance-bill-manage/billDestroy.vue"; +import DetailReportURL from "@/pages/finance-bill-manage/detailReport.vue"; const financeBillManage = [ { @@ -61,6 +62,14 @@ const financeBillManage = [ title: "票据核销", }, }, + { + path: "DetailReport", + name: "detailReport", + component: DetailReportURL, + meta: { + title: "报表明细", + }, + }, ], }, ]; diff --git a/src/router/modules/receivablesManagement.js b/src/router/modules/receivablesManagement.js index 6339314..2f199e8 100644 --- a/src/router/modules/receivablesManagement.js +++ b/src/router/modules/receivablesManagement.js @@ -25,6 +25,24 @@ const ReceivablesManagement = [ name: "BillBill", component: () => import("@/pages/receivables-management/Bill.vue"), meta: { title: "票据", hidden: false }, + }, + { + path: "/student-loan", + name: "StudentLoan", + component: () => import("@/pages/receivables-management/studentLoan.vue"), + meta: { title: "助学贷款", }, + }, + { + path: "/waivar-form", + name: "WaivarForm", + component: () => import("@/pages/receivables-management/waiverForm.vue"), + meta: { title: "学生减免单", hidden: false }, + }, + { + path: "/daily", + name: "Daily", + component: () => import("@/pages/receivables-management/daily.vue"), + meta: { title: "收费日报", }, } ], }, diff --git a/src/stores/billDestroy.js b/src/stores/billDestroy.js index d4a463e..9cd9510 100644 --- a/src/stores/billDestroy.js +++ b/src/stores/billDestroy.js @@ -8,15 +8,32 @@ export const useDestroy = defineStore("destroyList", { }, actions: { async getDestroyList() { - this.destroyList = JSON.parse( - localStorage.getItem("breakageList") - ).destroyList; - console.log(this.destroyList); + const storedData = localStorage.getItem("breakageList"); + if (storedData) { + const parsedData = JSON.parse(storedData); + this.destroyList = parsedData.destroyList; + } return this.destroyList; }, auditDestroyList(item) { - console.log(item); - // let arr = thisz + const storedData = localStorage.getItem("breakageList"); + if (storedData) { + const parsedData = JSON.parse(storedData); + parsedData.destroyList = parsedData.destroyList.filter( + (i) => i.id !== item.id + ); + parsedData.breakageList = parsedData.breakageList.map((i) => { + console.log(i.id, item.id); + if (i.id === item.id) { + console.log(item.breakStatus); + return { ...i, breakStatus: item.breakStatus }; // 返回更新后的对象 + } + return i; // 保持其他项不变 + }); + console.log(parsedData.breakageList); + localStorage.setItem("breakageList", JSON.stringify(parsedData)); + this.destroyList = parsedData.destroyList; // 更新store中的destroyList状态 + } }, }, persist: true, diff --git a/src/utils/excel.js b/src/utils/excel.js new file mode 100644 index 0000000..17e7935 --- /dev/null +++ b/src/utils/excel.js @@ -0,0 +1,24 @@ +import ExcelJS from "exceljs"; +import saveAs from "file-saver"; // 引入FileSaver.js以使用saveAs函数 + +const ExcelUtils = (title, titleFile, columns, addRow) => { + // 创建一个新的工作簿 + const workbook = new ExcelJS.Workbook(); + // 添加一个新的工作表 + const worksheet = workbook.addWorksheet(title); + // 添加表头 + worksheet.columns = columns; + // 添加数据行 + for (const row of addRow) { + worksheet.addRow(row); + } + // 写入文件并下载 + workbook.xlsx.writeBuffer().then((buffer) => { + const blob = new Blob([buffer], { + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + }); + saveAs(blob, `${titleFile}.xlsx`); + }); +}; + +export { ExcelUtils };