From b0706b2ee5c9dcc5cc9013dddb7335a5176c4386 Mon Sep 17 00:00:00 2001 From: ycy <2861518472@qq.com> Date: Sat, 6 Apr 2024 18:20:58 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E7=A5=A8=E6=8D=AE=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=AE=8C=E6=88=90,=E6=9F=A5=E8=AF=A2=E5=AE=8C=E6=88=90,?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mock/modules/ycy.js | 9 +- package.json | 1 + src/main.js | 23 +- src/pages/finance-bill-manage/billStock.vue | 353 ++++++++++++++++++-- src/stores/billStock.js | 31 ++ src/stores/index.js | 9 + vite.config.js | 8 + 7 files changed, 381 insertions(+), 53 deletions(-) create mode 100644 src/stores/billStock.js create mode 100644 src/stores/index.js diff --git a/mock/modules/ycy.js b/mock/modules/ycy.js index 2ff4322..34581ae 100644 --- a/mock/modules/ycy.js +++ b/mock/modules/ycy.js @@ -3,8 +3,8 @@ const StockList = Mock.mock({ "list|20-30": [ { "id|+1": "0", - billserial: "@integer(10000000000,19999999999)", - billType: "@integer(0,5)", + billserial: "@integer(100000000,199999999)1", + billType: "@integer(0,4)", stockNum: "@integer(1,2)", unit: "@cword(张本,1)", stockDate: "@date", @@ -19,12 +19,9 @@ export default [ url: "/api/stockList", method: "get", response: () => { - const obj = { - list: StockList, - }; return { code: 200, - data: obj, + data: StockList, }; }, }, diff --git a/package.json b/package.json index e6303e4..c275677 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "less": "^4.2.0", "mockjs": "^1.1.0", "pinia": "^2.1.7", + "pinia-plugin-persistedstate": "^3.2.1", "tdesign-vue-next": "^1.9.3", "vite-plugin-mock": "^3.0.1", "vue": "^3.4.21", diff --git a/src/main.js b/src/main.js index 12a4bcf..90cd15a 100644 --- a/src/main.js +++ b/src/main.js @@ -1,16 +1,19 @@ -import './style/index.css' +import "./style/index.css"; -import { createApp } from 'vue' -import { createPinia } from 'pinia' -import TDesign from 'tdesign-vue-next'; +import { createApp } from "vue"; +import { createPinia } from "pinia"; +import piniaPluginPersistedstate from "pinia-plugin-persistedstate"; +import TDesign from "tdesign-vue-next"; -import App from './App.vue' -import router from './router' +import App from "./App.vue"; +import router from "./router"; -const app = createApp(App) +const app = createApp(App); -app.use(createPinia()) -app.use(router) +const pinia = createPinia(); +pinia.use(piniaPluginPersistedstate); +app.use(pinia); +app.use(router); app.use(TDesign); -app.mount('#app') +app.mount("#app"); diff --git a/src/pages/finance-bill-manage/billStock.vue b/src/pages/finance-bill-manage/billStock.vue index ed57b49..595b7d0 100644 --- a/src/pages/finance-bill-manage/billStock.vue +++ b/src/pages/finance-bill-manage/billStock.vue @@ -5,83 +5,277 @@ ref="form" :data="formData" label-width="calc(2em + 40px)" - :layout="formData.layout" + layout="inline" scroll-to-first-error="smooth" class="scarch-from" + @reset="resetting" + @submit="headerQuery" >