123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <template>
- <view>
- <u-navbar
- title="选择收费员"
- title-color="#fff"
- :border-bottom="false"
- :custom-back="customBack"
- back-icon-color="#CCE8FF"
- :background="{background: '#4D68DC' }">
- </u-navbar>
- <u-search placeholder="搜索收费员姓名" v-model="keyword" @search="search" @custom="search"></u-search>
- <mescroll-uni ref="mescrollRef" @init="mescrollInit" :top="config.platform=='h5'?220:300" @down="downCallback" :up="upOption" @up="upCallback" @emptyclick="emptyClick">
- <view class="">
- <u-radio-group v-model="selected" @change="radioGroupChange" width="50%">
- <u-radio
- @change="radioChange(item)"
- v-for="(item, index) in dataList" :key="item.id"
- :name="item.id"
- :disabled="item.disabled"
- >
- {{item.payeeName}}
- </u-radio>
- </u-radio-group>
- </view>
- </mescroll-uni>
- </view>
- </template>
- <script>
- import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
- export default{
- mixins: [MescrollMixin],
- data(){
- return{
- keyword:'',
- selected:'',
- upOption:{
- page: {
- size: 150
- },
-
-
- noMoreSize: 4,
- empty:{
- tip: '~ 暂无数据 ~',
-
- }
- },
- dataList:[],
- }
- },
- onLoad(){
-
- },
- onShow(){
- },
- watch:{
-
-
-
-
-
-
-
-
-
- },
- methods:{
- customBack(){
- uni.navigateBack();
- },
-
- upCallback(page) {
-
-
-
-
- let params ={
- pageNum:page.num,
- pageSize:page.size,
- payeeName:this.keyword,
-
- }
- this.$u.api.payeeList(params).then(curPageData=>{
- console.log('curPageData',curPageData)
-
- this.mescroll.endSuccess(curPageData.data.length);
-
-
- if(page.num == 1) this.dataList = [];
-
-
-
-
-
-
-
- this.dataList=this.dataList.concat(curPageData.data);
- }).catch((err)=>{
- uni.showToast({
- title:'链接失败'
- });
- console.log('err',err)
-
- this.mescroll.endErr();
- })
- },
-
- emptyClick(){
-
- },
- radioChange(item){
-
-
- this.$u.vuex('vuex_selected_payee.name',item.payeeName)
- },
- radioGroupChange(e){
-
- this.selected = e;
- this.$u.vuex('vuex_selected_payee.id',e)
- console.log('radioGroupChange');
- uni.navigateBack();
- },
- search(){
- this.dataList = [];
- this.mescroll.resetUpScroll();
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .u-search{
- margin: 24rpx!important;
- }
- .u-radio-group{
- display: flex;
- margin: 24rpx;
- .u-radio{
- margin-bottom: 24rpx;
- }
- }
- </style>
|