feat: 票据入库管理页面完成

This commit is contained in:
ycy 2024-04-06 14:17:49 +08:00
parent 5b66b7a60f
commit a949bff448
4 changed files with 127 additions and 25 deletions

16
mock/modules/ycy.js Normal file
View File

@ -0,0 +1,16 @@
import Mock from "mockjs";
const StockList = Mock.mock({
"list|20-30": [
{
"id|+1": "0",
billserial: "@integer(10000000000,19999999999)",
billType: "@integer(0,5)",
stockNum: "前端",
unit: "前端",
stockDate: "@date",
operator: "@cname",
remark: " @integer(10000000000,19999999999)",
},
],
});

View File

@ -1,12 +1,12 @@
<template>
<div class="box">
<div style="height: 100%">
<t-menu>
<t-submenu value="1" title="财务票据管理">
<template #icon>
<t-icon name="application" />
</template>
<t-menu-item value="1-1" to="/Bill/BillStock">
<span>菜单二</span>
<span>票据入库管理</span>
</t-menu-item>
</t-submenu>
<t-submenu value="2" title="应收款管理">

View File

@ -4,28 +4,93 @@
<t-form
ref="form"
:data="formData"
label-width="calc(2em + 24px)"
label-width="calc(2em + 40px)"
:layout="formData.layout"
scroll-to-first-error="smooth"
@reset="onReset"
@submit="onSubmit"
class="scarch-from"
>
<t-form-item label="名字" name="name">
<t-input v-model="formData.name"></t-input>
</t-form-item>
<div style="margin-left: 1rem">
<t-form-item label="票据编号:" name="name">
<t-input v-model="formData.name"></t-input>
</t-form-item>
<t-form-item label="密码" name="password">
<t-input v-model="formData.password" type="password"></t-input>
<t-form-item label="入库日期:" name="password">
<t-input v-model="formData.password"></t-input>
</t-form-item>
</div>
<t-form-item>
<t-button theme="primary" @click="onSubmit">查询</t-button>
<t-button theme="primary" @click="onReset">重置</t-button>
</t-form-item>
</t-form>
</div>
<div class="table-box">
<t-base-table
row-key="index"
:data="tableData"
:columns="columns"
></t-base-table>
</div>
</div>
</template>
<script setup>
import { reactive } from "vue";
import { reactive, ref } from "vue";
import { MessagePlugin } from "tdesign-vue-next";
const tableData = ref();
const columns = ref([
{
title: "票据编号",
colkey: "billserial",
align: "center",
width: 100,
},
{
title: "票据类型",
colkey: "billType",
align: "center",
width: 100,
},
{
title: "入库数量",
colkey: "stockNum",
align: "center",
width: 100,
},
{
title: "单位(如:本、张)",
colkey: "unit",
align: "center",
width: 100,
},
{
title: "入库日期",
colkey: "stockDate",
align: "center",
width: 100,
},
{
title: "操作员",
colkey: "operator",
align: "center",
width: 100,
},
{
title: "备注",
colkey: "remark",
align: "center",
width: 100,
},
{
colKey: "status",
title: "操作",
width: 120,
align: "center",
fixed: "right",
},
]);
const formData = reactive({
layout: "inline",
name: "",
@ -49,7 +114,21 @@ const onSubmit = ({ validateResult, firstError }) => {
<style scoped lang="less">
.scarch-box {
width: 100%;
height: 10%;
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;
}
/deep/ .t-form__controls-content {
justify-content: space-between;
}
</style>

View File

@ -10,7 +10,7 @@
:labelWidth="80"
class="login-form"
>
<h2 class="login-title">登录</h2>
<h2 class="login-title">登录</h2>
<t-form-item name="account">
<t-input
clearable
@ -31,7 +31,9 @@
</t-input>
</t-form-item>
<t-form-item>
<t-button theme="primary" type="submit" block>登录</t-button>
<t-button theme="primary" type="submit" block @click="Login"
>登录</t-button
>
</t-form-item>
</t-form>
</t-space>
@ -41,6 +43,7 @@
<script setup>
import { MessagePlugin } from "tdesign-vue-next";
import { reactive } from "vue";
import { reqLogin } from "@/api/login/index";
// import { DesktopIcon, LockOnIcon } from "tdesign-icons-vue";
const INITIAL_DATA = {
@ -61,9 +64,13 @@ const onSubmit = ({ validateResult, firstError }) => {
MessagePlugin.warning(firstError);
}
};
const Login = async () => {
await reqLogin();
};
</script>
<style lang="scss" scoped>
<style lang="less" scoped>
.login-container {
position: absolute;
width: 100%;
@ -73,16 +80,16 @@ const onSubmit = ({ validateResult, firstError }) => {
overflow: hidden;
}
.login-form {
width:450px;
margin:200px;
background-color:rgba(255,255,255,0.8);
padding:80px;
border-radius:20px;
width: 450px;
margin: 200px;
background-color: rgba(255, 255, 255, 0.8);
padding: 80px;
border-radius: 20px;
}
.login-title {
text-align:center;
font-size:24px;
margin-bottom:40px;
color:#333
text-align: center;
font-size: 24px;
margin-bottom: 40px;
color: #333;
}
</style>