From c03aed34df5814b248c53fe425f4849c1472b58c Mon Sep 17 00:00:00 2001 From: ycy <2861518472@qq.com> Date: Mon, 8 Apr 2024 14:08:50 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E2=9C=A8=20feat:=20=E7=A5=A8=E6=8D=AE?= =?UTF-8?q?=E9=80=80=E9=A2=86=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mock/modules/ycy.js | 54 ++++++++ .../finance-bill-manage/billQuitneck.vue | 116 ++++-------------- src/pages/finance-bill-manage/billReceipt.vue | 9 +- src/stores/billQuitneck.js | 56 +++++++++ src/stores/billReceipt.js | 7 +- 5 files changed, 146 insertions(+), 96 deletions(-) create mode 100644 src/stores/billQuitneck.js diff --git a/mock/modules/ycy.js b/mock/modules/ycy.js index 323e6ba..1885209 100644 --- a/mock/modules/ycy.js +++ b/mock/modules/ycy.js @@ -67,6 +67,60 @@ const ReceiptList = Mock.mock([ ], }, ]); +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, + billserial: "@integer(100000000,199999999)1", + proposer: "刘欣宇", + billType: "@integer(0,4)", + receiptNum: "@integer(1,10)", + receiptDate: "@date", + useInfo: "@csentence", + }, + ], + }, +]); const personName = () => { return [ diff --git a/src/pages/finance-bill-manage/billQuitneck.vue b/src/pages/finance-bill-manage/billQuitneck.vue index 1c71a8f..d08b829 100644 --- a/src/pages/finance-bill-manage/billQuitneck.vue +++ b/src/pages/finance-bill-manage/billQuitneck.vue @@ -36,8 +36,8 @@ > - - + + - - 票据入库管理 + 票据入库 - 票据退库管理 + 票据退库 - 票据领用管理 + 票据领用 - 票据退领管理 + 票据退领 - 票据报损管理 + 票据报损 + + + 票据核销 diff --git a/src/pages/finance-bill-manage/billBreakage.vue b/src/pages/finance-bill-manage/billBreakage.vue index c653c4d..38f6784 100644 --- a/src/pages/finance-bill-manage/billBreakage.vue +++ b/src/pages/finance-bill-manage/billBreakage.vue @@ -231,7 +231,16 @@ clearable /> - + + + @@ -305,6 +314,13 @@ const columns = ref([ align: "center", width: "100", }, + { + colKey: "breakInfo", + title: "报损原因", + ellipsis: true, + align: "center", + width: "100", + }, { colKey: "status", title: "操作", @@ -365,6 +381,7 @@ const dialogData = ref({ billType: "", breakNum: Number, breakDate: "", + breakInfo: "", }); // 查询表单 @@ -444,6 +461,7 @@ const breakageAdd = () => { billType: "", breakNum: Number, breakDate: "", + breakInfo: "", }; }; @@ -458,6 +476,7 @@ const FORM_RULES = { breakNum: [{ required: true, message: "请输入报损数量", trigger: "blur" }], breakDate: [{ required: true, message: "请选择报损日期", trigger: "change" }], operator: [{ required: true, message: "请输入操作员", trigger: "blur" }], + breakInfo: [{ required: true, message: "请输入报损原因", trigger: "blur" }], }; // 新增 diff --git a/src/pages/finance-bill-manage/billDestroy.vue b/src/pages/finance-bill-manage/billDestroy.vue new file mode 100644 index 0000000..fc4a6a6 --- /dev/null +++ b/src/pages/finance-bill-manage/billDestroy.vue @@ -0,0 +1,406 @@ + + + + + diff --git a/src/router/modules/financeBillManage.js b/src/router/modules/financeBillManage.js index c4aff91..9da78d7 100644 --- a/src/router/modules/financeBillManage.js +++ b/src/router/modules/financeBillManage.js @@ -4,6 +4,7 @@ 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"; import BillBreakagekURL from "@/pages/finance-bill-manage/billBreakage.vue"; +import BillDestroyURL from "@/pages/finance-bill-manage/billDestroy.vue"; const financeBillManage = [ { @@ -52,6 +53,14 @@ const financeBillManage = [ title: "票据报损", }, }, + { + path: "BillDestroy", + name: "billDestroy", + component: BillDestroyURL, + meta: { + title: "票据核销", + }, + }, ], }, ]; diff --git a/src/stores/billBreakage.js b/src/stores/billBreakage.js index 9569d3e..52d451e 100644 --- a/src/stores/billBreakage.js +++ b/src/stores/billBreakage.js @@ -5,6 +5,7 @@ export const useBreakage = defineStore("breakageList", { state: () => { return { breakageList: [], + destroyList: [], }; }, actions: { @@ -22,6 +23,8 @@ export const useBreakage = defineStore("breakageList", { this.breakageList.unshift(arr); localStorage.setItem("breakageList", JSON.stringify(this.breakageList)); } + this.destroyList.push(arr); + localStorage.setItem("destroyList", JSON.stringify(this.breakageList)); return this.breakageList; }, deleteBreakageList(item) { diff --git a/src/stores/billDestroy.js b/src/stores/billDestroy.js new file mode 100644 index 0000000..6aeac69 --- /dev/null +++ b/src/stores/billDestroy.js @@ -0,0 +1,19 @@ +import { defineStore } from "pinia"; + +export const useDestroy = defineStore("destroyList", { + state: () => { + return { + destroyList: [], + }; + }, + actions: { + async getDestroyList() { + this.destroyList = JSON.parse( + localStorage.getItem("breakageList") + ).destroyList; + console.log(this.destroyList); + return this.destroyList; + }, + }, + persist: true, +}); From fecbc1d0961811b1fccd173ab819981105e5ed6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E6=89=8D=E5=8D=93?= <2284808383@qq.com> Date: Mon, 8 Apr 2024 18:13:54 +0800 Subject: [PATCH 4/4] stu --- mock/index.js | 4 +- mock/modules/lcz.js | 40 +++++ src/api/students.js | 8 +- src/pages/students/student.vue | 262 ++++++++++++++++++++++----------- 4 files changed, 220 insertions(+), 94 deletions(-) create mode 100644 mock/modules/lcz.js diff --git a/mock/index.js b/mock/index.js index 26d10f5..692d1ff 100644 --- a/mock/index.js +++ b/mock/index.js @@ -1,6 +1,8 @@ import sdy from './modules/sdy' import ycy from './modules/ycy' +import lcz from './modules/lcz' export default [ ...sdy, - ...ycy + ...ycy, + ...lcz, ] \ No newline at end of file diff --git a/mock/modules/lcz.js b/mock/modules/lcz.js new file mode 100644 index 0000000..766a4e6 --- /dev/null +++ b/mock/modules/lcz.js @@ -0,0 +1,40 @@ +import Mock from "mockjs"; + +function randomGender() { + return ['男', '女'][Math.floor(Math.random() * 2)]; +} +const student = Mock.mock({ + "list|100": [ + { + id: '@id', + name: '@cname', + gender: randomGender(), + studentId: '@id', + department: function () { + return ['计算机科学系', '数学系', '物理系', '化学系'][this.random(0, 3)]; + }, + major: function () { + return ['计算机科学与技术', '数学', '物理学', '化学', '生物学', '经济学'][this.random(0, 5)]; + }, + classes: function () { + return ['一班', '二班', '三班', '四班', '五班'][this.random(0, 4)]; + }, + status: function () { + return ['休学', '退学', '复学'][this.random(0, 2)]; + } + } + ] +}) + +export default [ + { + url: '/api/student', + method: 'post', + response: (config) => { + return { + code: 200, + data: student.list + }; + } + } +]; \ No newline at end of file diff --git a/src/api/students.js b/src/api/students.js index b85d7e0..54f6343 100644 --- a/src/api/students.js +++ b/src/api/students.js @@ -1,7 +1,5 @@ import request from "@/utils/request"; -// 统一管理接口 -const API = { - STUDENT_URL: "/api/student", -}; -export const reqStudent = () => request.post(API.STUDENT_URL); \ No newline at end of file +export function APIStudent(data) { + return request.post('/api/student', data) +} \ No newline at end of file diff --git a/src/pages/students/student.vue b/src/pages/students/student.vue index dad652e..1592743 100644 --- a/src/pages/students/student.vue +++ b/src/pages/students/student.vue @@ -1,129 +1,193 @@