fix:增加收银中心,供应商账单,分店管理修改
This commit is contained in:
145
src/views/finance/supplierBill/billingRecord.vue
Normal file
145
src/views/finance/supplierBill/billingRecord.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<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-button type="primary" @click="getTableData" plain>批量付款</el-button>
|
||||
<el-text tag="b" size="large" style="margin-left: 15px;">供应商:供应商名称</el-text>
|
||||
</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 label="耗材信息">
|
||||
<template v-slot="scope">
|
||||
<div>{{ scope.row.shopName }}({{ scope.row.shopName }})</div>
|
||||
<div>账号:{{ scope.row.shopName }}</div>
|
||||
<div>联系电话:{{ scope.row.phone }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="账单金额" width="120" />
|
||||
<el-table-column prop="status" label="已付款金额" width="120" />
|
||||
<el-table-column prop="status" label="未付款金额" width="120" />
|
||||
<el-table-column prop="status" label="创建时间" width="120" />
|
||||
<el-table-column prop="createdAt" label="备注" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" size="small" link @click="handlePayment(scope.row)">
|
||||
付款
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" link @click="handleRecord(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>
|
||||
<payment ref="refPayment" @refresh="getTableData"></payment>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ShopApi from "@/api/account/shop";
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import payment from "./components/payment.vue";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const state = reactive({
|
||||
query: {
|
||||
name: "",
|
||||
},
|
||||
tableData: {
|
||||
list: [],
|
||||
page: 1,
|
||||
size: 10,
|
||||
loading: false,
|
||||
total: 0,
|
||||
},
|
||||
});
|
||||
onMounted(() => {
|
||||
console.log(route.query);
|
||||
if (route.query.id) {
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
const refPayment = ref();
|
||||
function handlePayment(item) {
|
||||
refPayment.value.open(item);
|
||||
}
|
||||
// 付款记录
|
||||
function handleRecord(id) {
|
||||
router.push({ name: "financePaymentRecord", 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