freight-web/src/pagesApp/supplierMgt.vue

112 lines
2.5 KiB
Vue
Raw Normal View History

2024-03-04 07:10:11 +00:00
<template>
<view class="c-card">
<view class="search">
<u-search
placeholder="请输入供应商名称"
2024-03-14 03:14:12 +00:00
v-model="state.name"
2024-03-04 07:10:11 +00:00
:showAction="false"
:bgColor="'#fff'"
:borderColor="'rgba(0, 0, 0, 0.1)'"
:placeholderColor="'#C1C1C1'"
2024-03-14 03:14:12 +00:00
@search="handleSearch()"
2024-03-04 07:10:11 +00:00
></u-search>
<view class="btn"> 新增 </view>
</view>
2024-03-14 03:14:12 +00:00
<view class="box" v-for="(item, index) in pageList.list" :key="index">
2024-03-04 07:10:11 +00:00
<view>
<view>
2024-03-14 03:14:12 +00:00
<view>{{ item.name }}</view>
<view>卡号{{ item.cardCode }}</view>
2024-03-04 07:10:11 +00:00
</view>
<view class="btn"> 删除 </view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
2024-03-14 03:14:12 +00:00
import { ProfileApi } from "@/services";
import { UsersType } from "@/utils/enum";
const state = reactive({
name: "",
});
const pageList: PageResult<User> = reactive({
total: 0,
list: [],
pageNum: 1,
pageSize: 10,
});
const handleSearch = () => {
getUserList()
};
const getUserList = () => {
ProfileApi.getInventoryUserPage({
pageSize: 10,
pageNum: 1,
userType: UsersType.Purchaser,
name: state.name,
}).then((res) => {
if (res.code === 200) {
if (res.code === 200) {
(pageList as any).list = (res.data as any).list;
}
}
});
};
onMounted(() => {
getUserList();
});
2024-03-04 07:10:11 +00:00
</script>
<style lang="scss" scoped>
.c-card {
margin: 30rpx 25rpx;
.search {
display: flex;
align-items: center;
justify-content: space-between;
.btn {
background: #00dcee;
border-radius: 24rpx;
border: 1px solid #00dcee;
font-weight: 500;
2024-03-14 03:14:12 +00:00
font-size: 26rpx;
2024-03-04 07:10:11 +00:00
color: #ffffff;
margin-left: 50rpx;
padding: 6rpx 30rpx;
}
}
.box {
background: #ffffff;
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
border-radius: 13rpx;
padding: 10rpx 25rpx;
font-weight: 400;
2024-03-14 03:14:12 +00:00
font-size: 26rpx;
2024-03-04 07:10:11 +00:00
color: #000000;
line-height: 41rpx;
margin-top: 30rpx;
> view {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0rpx;
.btn {
background: #ff9d55;
border-radius: 24rpx;
font-weight: 500;
2024-03-14 03:14:12 +00:00
font-size: 26rpx;
2024-03-04 07:10:11 +00:00
color: #ffffff;
padding: 6rpx 30rpx;
}
.btn_text {
font-weight: 500;
font-size: 24rpx;
color: #00dcee;
}
}
> view + view {
border-top: 1px solid rgba(233, 233, 233, 0.76);
}
}
}
</style>