freight-web/src/PagesStatistics/supplierChecking.vue

82 lines
1.9 KiB
Vue
Raw Normal View History

2024-03-04 07:10:11 +00:00
<template>
2024-04-08 01:52:52 +00:00
<Search :name="'供应商名称'" @handleSearch="handleSearch"/>
2024-03-04 07:10:11 +00:00
<view class="c-card">
<StatisticCard :list="list" />
<view class="detail">
2024-04-08 01:52:52 +00:00
<view v-for="(item, index) in billList" :key="index" @click="getDetail(item)">
<text>{{ item.supplierName }}</text>
<text class="num">¥{{ item.unPayTotalPrice }} <text class="tip"></text></text>
2024-03-04 07:10:11 +00:00
</view>
</view>
</view>
</template>
<script setup lang="ts">
import Search from "@/components/Search/index.vue";
import StatisticCard from "@/components/StatisticCard/index.vue";
2024-04-08 01:52:52 +00:00
import { ReceiveApi } from "@/services";
2024-03-04 07:10:11 +00:00
const list = reactive([
{
2024-04-08 01:52:52 +00:00
num: 0,
2024-03-04 07:10:11 +00:00
name: "应付供应商",
},
{
2024-04-08 01:52:52 +00:00
num: 0,
2024-03-04 07:10:11 +00:00
name: "应付金额",
},
]);
2024-04-08 01:52:52 +00:00
const handleSearch = (v:string) => {
getList(v)
}
const billList = ref<any>([])
2024-03-04 07:10:11 +00:00
const getDetail = (item: any) => {
uni.navigateTo({
2024-04-08 01:52:52 +00:00
url: "/pagesStatistics/billDetail?type=1&id="+ item.userId +`&name=${item.supplierName}`, // 要跳转到的页面路径
2024-03-04 07:10:11 +00:00
});
};
2024-04-08 01:52:52 +00:00
const getList = (v: string) => {
ReceiveApi.getReconciliation({userName: v}).then((res:any) => {
if (res.code === 200) {
list[0].num = res.data.supplierNum
list[1].num = res.data.unPayTotalPrice
billList.value = res.data.unPaySupplierVos
}
})
}
onMounted(() => {
getList('')
})
2024-03-04 07:10:11 +00:00
</script>
<style lang="scss" scoped>
.c-card {
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
margin: 30rpx 25rpx;
}
.detail {
border-top: 18rpx solid #f8f8f8;
padding: 20rpx;
font-family: Source Han Sans CN;
font-weight: 400;
2024-04-08 01:52:52 +00:00
font-size: 28rpx;
2024-03-04 07:10:11 +00:00
color: #000000;
> view {
display: flex;
justify-content: space-between;
padding: 20rpx 10rpx;
.num {
color: #ec0f3e;
}
.tip {
color: $u-primary;
margin-left: 20rpx;
font-weight: 500;
font-size: 24rpx;
}
}
> view + view {
border-top: 1px solid rgba(233, 233, 233, 0.76);
}
}
</style>