Compare commits

...

2 Commits

8 changed files with 276 additions and 18 deletions

View File

@ -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,
};
},
},
];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,7 @@
import request from "@/utils/requestMock";
const API = {
DETAILREPORT_LIST: "/detailReportList",
};
export const reqDetailReportList = () => request.get(API.DETAILREPORT_LIST);

View File

@ -31,6 +31,9 @@
<t-menu-item value="2-6" to="/Bill/BillDestroy">
<span>票据核销</span>
</t-menu-item>
<t-menu-item value="2-7" to="/Bill/DetailReport">
<span>报表明细</span>
</t-menu-item>
</t-submenu>
<t-submenu value="3" title="应收款管理">
<template #icon>

View File

@ -174,6 +174,7 @@
<t-input
v-model="dialogData.billserial"
placeholder="请输入票据编号"
maxlength="10"
></t-input>
</t-form-item>
<t-form-item

View File

@ -75,6 +75,9 @@
class="table"
:max-height="550"
>
<template #stockNum="{ row }">
{{ `${row.stockNum}` }}
</template>
<template #billType="{ row }">
<div v-for="item in billType" :key="item">
<span v-if="row.billType === item.value">{{ item.label }}</span>
@ -134,6 +137,7 @@
<t-input
v-model="dialogData.billserial"
placeholder="请输入票据编号"
maxlength="10"
></t-input>
</t-form-item>
<t-form-item
@ -167,17 +171,6 @@
placeholder="请输入入库数量"
></t-input>
</t-form-item>
<t-form-item
label="入库单位"
name="unit"
:span="10"
style="margin-bottom: 0.5rem"
>
<t-input
v-model="dialogData.unit"
placeholder="请输入入库单位"
></t-input>
</t-form-item>
<t-form-item
label="入库时间"
name="stockDate"
@ -260,12 +253,6 @@ const columns = ref([
align: "center",
width: "100",
},
{
colKey: "unit",
title: "单位(如:本、张)",
align: "center",
width: "100",
},
{
colKey: "stockDate",
title: "入库日期",

View File

@ -0,0 +1,227 @@
<template>
<div class="back-color" style="overflow-y: hidden">
<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">
<t-form-item label="部门:" name="branch">
<t-input v-model="scarchData.branch"></t-input>
</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 #quitneckNum="{ row }">
{{ `${row.quitneckNum}` }}
</template>
</t-base-table>
</t-content>
</t-layout>
</div>
</template>
<script setup>
import { ref, onMounted } from "vue";
import { MessagePlugin } from "tdesign-vue-next";
import { LoadIcon } from "tdesign-icons-vue-next";
import { reqDetailReportList } from "@/api/finance-bill-manage/detailReportList";
const tableData = ref([]);
const dataList = ref([]);
const loading = ref(false);
const columns = ref([
{
colKey: "serial-number",
title: "序号",
width: 50,
},
{
colKey: "branch",
title: "部门",
align: "center",
width: 100,
},
{
colKey: "stockNum",
title: "入库量",
align: "center",
width: 100,
},
{
colKey: "cancelNum",
title: "退库量",
align: "center",
width: 100,
},
{
colKey: "receiveNum",
title: "领用量",
align: "center",
width: 100,
},
{
colKey: "breakNum",
title: "报损量",
align: "center",
width: 100,
},
{
colKey: "destoryNum",
title: "核销量",
align: "center",
width: 100,
},
{
colKey: "grossBillRatio",
title: "总票据比例",
ellipsis: true,
align: "center",
width: 100,
},
]);
//
const scarchData = ref({});
//
const pagination = ref({
defaultCurrent: 1,
defaultPageSize: 10,
total: 50,
});
//
const tableList = async () => {
loading.value = true;
const { data } = await reqDetailReportList();
tableData.value = data.list;
dataList.value = data.list;
pagination.value.total = tableData.value.length;
const timerId = setTimeout(() => {
loading.value = false;
clearInterval(timerId);
}, 300);
};
//
const headerQuery = () => {
tableData.value = dataList.value;
if (scarchData.value.branch === "") {
tableData.value = data.value;
pagination.value.total = tableData.value.length;
} else {
const list = tableData.value.filter((item) => {
let arrList;
if (scarchData.value.branch === item.branch) {
arrList = item;
}
return arrList;
});
tableData.value = list;
pagination.value.total = list.length;
}
};
//
const resetting = () => {
scarchData.value = {
branch: "",
};
tableData.value = dataList.value;
pagination.value.total = tableData.value.length;
};
//
const refresh = () => {
tableList();
};
onMounted(() => {
tableList();
});
</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;
}
}
.layoutPage {
height: 100%;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
span {
font-size: 20px;
font-weight: 800;
color: #191919;
}
}
:deep(.t-tree--transition .t-tree__label) {
width: 10rem;
}
:deep(.t-form__controls-content) {
justify-content: space-between;
}
</style>

View File

@ -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: "报表明细",
},
},
],
},
];