更新
This commit is contained in:
136
financialCenter/serviceStation/components/charge.vue
Normal file
136
financialCenter/serviceStation/components/charge.vue
Normal file
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<view>
|
||||
<uni-popup @change="change" ref="popup" type="bottom" background-color="#fff">
|
||||
<view style="height:35vh; display: flex;flex-direction: column;">
|
||||
<view style="display: flex;">
|
||||
<uni-easyinput @input="iconClick" @confirm="confirmFn" style="width: 90%; margin: 0 auto;"
|
||||
prefixIcon="search" v-model="nameOrPhone" placeholder="请输入内容" />
|
||||
</view>
|
||||
<picker-view @change="pickerChange" style="flex: 1;">
|
||||
<picker-view-column>
|
||||
<view style="display: flex;align-items: center;justify-content: center;"
|
||||
v-for="(item,index) in list" :key="index">{{ item.userName || item.nickName}}</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
<view @click="buttenFn" class="butten">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from '@/api/financialCenter/serviceStation.js'
|
||||
export default {
|
||||
name: 'charge',
|
||||
props: {
|
||||
value: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value: function(n, o) {
|
||||
// console.log('监听', n)
|
||||
if (n) {
|
||||
this.$refs.popup.open('bottom')
|
||||
} else {
|
||||
this.$refs.popup.close()
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getlist()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
nameOrPhone: '',
|
||||
determine: null,
|
||||
list: [
|
||||
|
||||
],
|
||||
seleData: null,
|
||||
seachValue: '',
|
||||
getData: {
|
||||
pageSize: 5,
|
||||
currentPage: 1,
|
||||
params: {
|
||||
nameOrPhone: '',
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
iconClick() {
|
||||
if (!this.getData.params.nameOrPhone) {
|
||||
this.getlist()
|
||||
}
|
||||
},
|
||||
buttenFn() {
|
||||
clearTimeout(this.determine)
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.determine = setTimeout(() => {
|
||||
this.$emit('chargeChange', this.seleData)
|
||||
uni.hideLoading()
|
||||
this.$emit('input', false)
|
||||
}, 700)
|
||||
},
|
||||
getlist() {
|
||||
if (!this.nameOrPhone) {
|
||||
this.list = []
|
||||
this.list.unshift({
|
||||
userName: '全部',
|
||||
id: ''
|
||||
})
|
||||
this.seleData = this.list[0]
|
||||
return
|
||||
}
|
||||
serve.liekQuery(this.nameOrPhone).then(res => {
|
||||
if (res.code !== 20000) return
|
||||
if (res.data.length == 0) {
|
||||
uni.showToast({
|
||||
title: '暂无数据',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.list = res.data
|
||||
this.list.unshift({
|
||||
userName: '全部',
|
||||
id: ''
|
||||
})
|
||||
this.seleData = this.list[0]
|
||||
// console.log('this.list', this.list)
|
||||
// console.log('this.seleData', this.seleData)
|
||||
// console.log(res, '负责人组件')
|
||||
})
|
||||
},
|
||||
pickerChange(e) {
|
||||
this.seleData = this.list[e.detail.value[0]]
|
||||
},
|
||||
change(e) {
|
||||
this.$emit('input', e.show)
|
||||
},
|
||||
confirmFn() {
|
||||
this.getlist()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.butten {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 35rpx;
|
||||
color: #ffffff;
|
||||
width: 60%;
|
||||
margin: 10rpx auto;
|
||||
border-radius: 10px;
|
||||
background: #007AFF;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
</style>
|
||||
@@ -5,11 +5,21 @@
|
||||
<uni-nav-bar @clickLeft='jump(-1)' :border="false" color='white' backgroundColor="rgba(0,0,0,0)"
|
||||
left-icon="back" title="油站账户管理" />
|
||||
<view class="seach">
|
||||
<uni-easyinput @confirm='seachFn' style="border-radius:12rpx ;" prefixIcon="search"
|
||||
<uni-easyinput @confirm='seachFn' style="border-radius:12rpx; margin-bottom: 10rpx;" prefixIcon="search"
|
||||
placeholder-style="color:#bbb;font-weight: 100;" confirmType="搜索"
|
||||
v-model="paramter.params.accountName" placeholder="请输入油站账户名称">
|
||||
</uni-easyinput>
|
||||
<!-- <uni-easyinput class="input" style="border-radius:12rpx ;" prefixIcon="search"
|
||||
placeholder-style="color:#bbb;font-weight: 100;" placeholder="业务负责人姓名/手机号">
|
||||
</uni-easyinput> -->
|
||||
<view style="display: flex; align-items: center;margin-top: 10rpx;">
|
||||
|
||||
<view class="input" @click="selectLeader">{{paramter.params.name || '运营负责人'}} </view>
|
||||
<uni-data-select class="select" v-model="paramter.params.accountState"
|
||||
:localdata="range" @change="changeSelect"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="flex:1;overflow: hidden;">
|
||||
<view v-if="!tableList.length"
|
||||
@@ -29,26 +39,51 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<charge @chargeChange='chargeChange' v-model="controlWindows.charge" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from '@/api/financialCenter/serviceStation.js'
|
||||
|
||||
import charge from './components/charge.vue'
|
||||
export default {
|
||||
components: {
|
||||
charge
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
controlWindows: {
|
||||
charge: false
|
||||
},
|
||||
styles: {},
|
||||
paramter: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
sorted:{
|
||||
createTime:'desc'
|
||||
sorted: {
|
||||
createTime: 'desc'
|
||||
},
|
||||
params: {
|
||||
accountName: ''
|
||||
}
|
||||
},
|
||||
tableList: []
|
||||
tableList: [],
|
||||
range: [{
|
||||
value: "0",
|
||||
text: "禁用"
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
text: "启用"
|
||||
},
|
||||
{
|
||||
value: "-1",
|
||||
text: "冻结"
|
||||
}, {
|
||||
value: "-5",
|
||||
text: "作废"
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -59,6 +94,17 @@
|
||||
// this.getByPage()
|
||||
// },
|
||||
methods: {
|
||||
chargeChange(item) {
|
||||
this.paramter.params.businessLeader = item.id
|
||||
this.paramter.params.name = item.userName
|
||||
this.seachFn()
|
||||
},
|
||||
selectLeader() {
|
||||
this.controlWindows.charge = true
|
||||
},
|
||||
changeSelect() {
|
||||
this.seachFn()
|
||||
},
|
||||
seachFn() {
|
||||
this.tableList = []
|
||||
this.paramter.currentPage = 1
|
||||
@@ -106,6 +152,27 @@
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.input {
|
||||
/* display: inline-block; */
|
||||
/* margin-top: 10rpx; */
|
||||
height: 70rpx;
|
||||
border-radius: 12rpx;
|
||||
width: 69%;
|
||||
background: #fff;
|
||||
line-height: 70rpx;
|
||||
padding-left: 30rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.select {
|
||||
/* margin-top: 10rpx; */
|
||||
margin-left: 2%;
|
||||
display: inline-block;
|
||||
width: 29%;
|
||||
background: #fff;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.uni-easyinput__content {
|
||||
background-color: #fff;
|
||||
}
|
||||
@@ -162,5 +229,4 @@
|
||||
color: #778899;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user