fix:供应商账单测试
This commit is contained in:
@@ -21,16 +21,16 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8" style="display: flex;flex-direction: column; justify-content: center;align-items: center;">
|
||||
<div>账单总金额(全部/本月)</div>
|
||||
<div>2000/1000</div>
|
||||
<div>{{ state.summaryData.amountPayable }} / {{ state.summaryData.mouthAmountPayable }}</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" style="display: flex;flex-direction: column; justify-content: center;align-items: center;">
|
||||
<div>已付款总金额(全部/本月)</div>
|
||||
<div>2000/1000</div>
|
||||
<div>{{ state.summaryData.actualPaymentAmount }} / {{ state.summaryData.mouthActualPaymentAmount }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;flex-direction: column; justify-content: center;align-items: center;">
|
||||
<div>未付款总金额(全部/本月)</div>
|
||||
<div>2000/1000</div>
|
||||
<div>{{ state.summaryData.unPaidAmount }} / {{ state.summaryData.mouthUnPaidAmount }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
@@ -38,15 +38,14 @@
|
||||
<div class="head-container">
|
||||
<el-card shadow="never">
|
||||
<el-table v-loading="state.tableData.loading" :data="state.tableData.list">
|
||||
<el-table-column prop="id" label="ID" width="80" />
|
||||
<el-table-column prop="status" label="供应商" width="220" />
|
||||
<el-table-column prop="status" label="账单金额" width="160" />
|
||||
<el-table-column prop="status" label="已付款金额" width="160" />
|
||||
<el-table-column prop="status" label="未付款金额" width="160" />
|
||||
<el-table-column prop="createdAt" label="备注" />
|
||||
<el-table-column prop="name" label="供应商" width="220" />
|
||||
<el-table-column prop="amountPayable" label="账单金额" width="200" />
|
||||
<el-table-column prop="actualPaymentAmount" label="已付款金额" width="200" />
|
||||
<el-table-column prop="unPaidAmount" label="未付款金额" width="200" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column label="操作" width="120">
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" size="small" link @click="handleTo(scope.row.id)">
|
||||
<el-button type="primary" size="small" link @click="handleTo(scope.row)">
|
||||
账单记录
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -64,13 +63,14 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ShopApi from "@/api/account/shop";
|
||||
import AuthAPI from "@/api/supplier/index";
|
||||
const router = useRouter();
|
||||
|
||||
const state = reactive({
|
||||
query: {
|
||||
name: "",
|
||||
},
|
||||
summaryData: {},
|
||||
tableData: {
|
||||
list: [],
|
||||
page: 1,
|
||||
@@ -80,18 +80,27 @@ const state = reactive({
|
||||
},
|
||||
});
|
||||
onMounted(() => {
|
||||
getSummary();
|
||||
|
||||
getTableData();
|
||||
});
|
||||
// 获取商家列表
|
||||
|
||||
async function getSummary() {
|
||||
try {
|
||||
const res = await AuthAPI.getSummary();
|
||||
state.summaryData = res;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
// 获取账单列表
|
||||
async function getTableData() {
|
||||
state.tableData.loading = true;
|
||||
try {
|
||||
const res = await ShopApi.getList({
|
||||
const res = await AuthAPI.getPage({
|
||||
page: state.tableData.page,
|
||||
size: state.tableData.size,
|
||||
shopName: state.query.name,
|
||||
account: state.query.account,
|
||||
status: state.query.status,
|
||||
key: state.query.name,
|
||||
});
|
||||
state.tableData.loading = false;
|
||||
state.tableData.list = res.records;
|
||||
@@ -100,9 +109,9 @@ async function getTableData() {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
function handleTo(id) {
|
||||
function handleTo(row) {
|
||||
// router.push({ path: "/finance/supplierBill/billingRecord", query: { id: e.id } });
|
||||
router.push({ name: "financeBillingRecord", query: { id: id } });
|
||||
router.push({ name: "financeBillingRecord", query: { vendorId: row.vendorId, supplierName: row.name } });
|
||||
|
||||
}
|
||||
// 重置查询
|
||||
|
||||
Reference in New Issue
Block a user