fix:增加收银中心,供应商账单,分店管理修改
This commit is contained in:
139
src/views/finance/supplierBill/index.vue
Normal file
139
src/views/finance/supplierBill/index.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<el-card shadow="never">
|
||||
<el-alert title="当前列表仅作为数据记录,不产生任何实际交易。" type="warning" show-icon :closable="false"
|
||||
style="margin-bottom: 15px;" />
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-input v-model="state.query.name" clearable placeholder="请输入供应商名称" style="width: 100%"
|
||||
class="filter-item" @keyup.enter="getTableData" />
|
||||
</el-col>
|
||||
|
||||
<el-col :span="16">
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-card shadow="never">
|
||||
<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>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" style="display: flex;flex-direction: column; justify-content: center;align-items: center;">
|
||||
<div>已付款总金额(全部/本月)</div>
|
||||
<div>2000/1000</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>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
<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 label="操作" width="120">
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" size="small" link @click="handleTo(scope.row.id)">
|
||||
账单记录
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination v-model:current-page="state.tableData.page" v-model:page-size="state.tableData.size"
|
||||
:total="state.tableData.total" :page-sizes="[10, 20, 30, 50, 100]"
|
||||
layout="total, sizes , prev, pager ,next, jumper " @current-change="paginationChange" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ShopApi from "@/api/account/shop";
|
||||
const router = useRouter();
|
||||
|
||||
const state = reactive({
|
||||
query: {
|
||||
name: "",
|
||||
},
|
||||
tableData: {
|
||||
list: [],
|
||||
page: 1,
|
||||
size: 10,
|
||||
loading: false,
|
||||
total: 0,
|
||||
},
|
||||
});
|
||||
onMounted(() => {
|
||||
getTableData();
|
||||
});
|
||||
// 获取商家列表
|
||||
async function getTableData() {
|
||||
state.tableData.loading = true;
|
||||
try {
|
||||
const res = await ShopApi.getList({
|
||||
page: state.tableData.page,
|
||||
size: state.tableData.size,
|
||||
shopName: state.query.name,
|
||||
account: state.query.account,
|
||||
status: state.query.status,
|
||||
});
|
||||
state.tableData.loading = false;
|
||||
state.tableData.list = res.records;
|
||||
state.tableData.total = res.totalRow * 1;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
function handleTo(id) {
|
||||
// router.push({ path: "/finance/supplierBill/billingRecord", query: { id: e.id } });
|
||||
router.push({ name: "financeBillingRecord", query: { id: id } });
|
||||
|
||||
}
|
||||
// 重置查询
|
||||
function resetHandle() {
|
||||
state.query.name = "";
|
||||
getTableData();
|
||||
}
|
||||
// 分页回调
|
||||
function paginationChange(e) {
|
||||
state.tableData.page = e;
|
||||
getTableData();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.head-container {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.shop_info {
|
||||
display: flex;
|
||||
|
||||
.info {
|
||||
flex: 1;
|
||||
padding-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-link {
|
||||
min-height: 23px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user