qa-regulatory-gwj-app/pages/branch-information-management/branch-staff/list.vue

125 lines
3.2 KiB
Vue
Raw Permalink Normal View History

2023-11-07 10:08:37 +08:00
<template>
<view class="content">
<view class="search card">
<u--input
prefixIcon="search"
placeholder="请输入关键字"
border="surround"
v-model="CORP_NAME"
clearable
shape="circle"
></u--input>
2024-07-27 15:13:42 +08:00
<view class="bth-mini ml-10">
<u-button type="success" text="确定" @click="resetList"></u-button>
</view>
2023-11-07 10:08:37 +08:00
</view>
<u-list @scrolltolower="scrolltolower" v-if="list.length > 0">
<u-list-item v-for="(item, index) in list" :key="index">
<view>
<view class="flex-between main-title">
<text>{{ item.CORP_NAME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>
属地
<template v-if="item.prvinceName">{{ item.prvinceName }}</template>
<template v-if="item.cityName"> -- {{ item.cityName }}</template>
<template v-if="item.countryName"> --{{ item.countryName }}</template>
<template v-if="item.villageName"> -- {{ item.villageName }}</template>
</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>所属行业{{ item.INDUSTRY_NAME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
2024-10-10 10:14:31 +08:00
<text>主要负责人{{ item.CONTACTS }}</text>
<text>电话{{ item.CONTACTS_PHONE }}</text>
2023-11-07 10:08:37 +08:00
</view>
<view class="flex-between mt-10 subtitle">
2024-10-10 10:14:31 +08:00
<text>地址{{ item.ADDRESS_BUSINESS }}</text>
2023-11-07 10:08:37 +08:00
</view>
2024-07-27 15:13:42 +08:00
<view class="flex-end mt-10 btn">
2024-10-10 10:14:31 +08:00
<u-button type="primary" text="查看" size="mini"
@click="fnNavigatorDetail(item.CORPINFO_ID)"></u-button>
2023-11-07 10:08:37 +08:00
</view>
</view>
</u-list-item>
</u-list>
<empty v-else></empty>
</view>
</template>
<script>
import {getCorpInfoList} from "../../../api";
export default {
data() {
return {
CORP_NAME: '',
pageSize: 10,
currentPage: 1,
totalPage: 0,
list: [],
}
},
computed: {
userInfo() {
return this.$store.getters.getUserInfo
}
},
onLoad() {
this.resetList()
},
2024-10-10 10:14:31 +08:00
methods: {
async getData() {
2023-11-07 10:08:37 +08:00
let resData = await getCorpInfoList({
USER_ID: this.userInfo.USER_ID,
CORP_NAME: this.CORP_NAME,
showCount: this.pageSize,
currentPage: this.currentPage,
});
2024-10-10 10:14:31 +08:00
this.list = [...this.list, ...resData.varList];
2023-11-07 10:08:37 +08:00
this.totalPage = resData.page.totalPage;
},
resetList() {
2024-10-10 10:14:31 +08:00
this.pageSize = 10
this.currentPage = 1
2023-11-07 10:08:37 +08:00
this.list = []
this.getData()
},
2024-10-10 10:14:31 +08:00
fnNavigatorDetail(CORPINFO_ID) {
2023-11-07 10:08:37 +08:00
uni.$u.route({
url: '/pages/branch-information-management/branch-staff/detail-list',
params: {
CORPINFO_ID,
}
})
},
scrolltolower() {
this.currentPage++;
2024-10-10 10:14:31 +08:00
if (this.totalPage >= this.currentPage) this.getData();
2023-11-07 10:08:37 +08:00
},
}
}
</script>
2024-07-27 15:13:42 +08:00
<style scoped lang="scss">
2024-10-10 10:14:31 +08:00
.search {
2024-07-27 15:13:42 +08:00
display: flex;
2024-10-10 10:14:31 +08:00
.ml-10 {
2024-07-27 15:13:42 +08:00
margin-left: 10rpx;
}
2024-10-10 10:14:31 +08:00
.bth-mini {
2024-07-27 15:13:42 +08:00
width: 100rpx;
}
2023-11-07 10:08:37 +08:00
2024-07-27 15:13:42 +08:00
}
2024-10-10 10:14:31 +08:00
.btn {
2024-07-27 15:13:42 +08:00
width: 100rpx;
float: right;
}
2023-11-07 10:08:37 +08:00
</style>