|
|
|
@ -95,19 +95,48 @@
|
|
|
|
|
|
|
|
|
|
<u-form-item |
|
|
|
|
:custom-style="{ |
|
|
|
|
padding:'34rpx 0' |
|
|
|
|
padding:'34rpx 0', |
|
|
|
|
position:'relative' |
|
|
|
|
}" |
|
|
|
|
label="公司全称" |
|
|
|
|
prop="userInfo.company" |
|
|
|
|
borderBottom |
|
|
|
|
|
|
|
|
|
> |
|
|
|
|
<view class="" v-if="tipShow && tips.length > 0" style=" |
|
|
|
|
background-color:#fff; |
|
|
|
|
border:2rpx solid #dedede; |
|
|
|
|
border-radius: 20rpx; |
|
|
|
|
position: absolute; |
|
|
|
|
top:110%; |
|
|
|
|
z-index: 10; |
|
|
|
|
padding:0 20rpx; |
|
|
|
|
"> |
|
|
|
|
<view |
|
|
|
|
v-for="(item,index) in tips" |
|
|
|
|
class="" |
|
|
|
|
style=" |
|
|
|
|
border-bottom:2rpx solid #dedede; |
|
|
|
|
padding:20rpx 0; |
|
|
|
|
min-width:150rpx; |
|
|
|
|
" |
|
|
|
|
@click="selectTip(item)"> |
|
|
|
|
<u-text :text="item" size="28"></u-text> |
|
|
|
|
</view> |
|
|
|
|
<view style="padding:20rpx 0;display:flex;justify-content: flex-end;text-align: right;" @click="tipShow = false;"> |
|
|
|
|
<u-button text="关闭提示" size="mini" custom-style="background-color:#FF9545;"></u-button> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<u-input |
|
|
|
|
fontSize="28" |
|
|
|
|
placeholder="请输入" |
|
|
|
|
v-model="model.userInfo.company" |
|
|
|
|
border="none" |
|
|
|
|
></u-input> |
|
|
|
|
@change="filterTip" |
|
|
|
|
@focus="filterTip" |
|
|
|
|
> |
|
|
|
|
</u-input> |
|
|
|
|
|
|
|
|
|
</u-form-item> |
|
|
|
|
<u-form-item |
|
|
|
|
:custom-style="{ |
|
|
|
@ -202,6 +231,9 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
companyTip:[], |
|
|
|
|
tipShow:false, |
|
|
|
|
tips:[], |
|
|
|
|
model: { |
|
|
|
|
userInfo: { |
|
|
|
|
name:'', |
|
|
|
@ -327,9 +359,25 @@ export default {
|
|
|
|
|
mounted() { |
|
|
|
|
this.initForm(); |
|
|
|
|
this.getPickerData(); |
|
|
|
|
|
|
|
|
|
this.getTips(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
selectTip(item){ |
|
|
|
|
this.model.userInfo.company = item; |
|
|
|
|
this.tipShow = false; |
|
|
|
|
}, |
|
|
|
|
getTips(){ |
|
|
|
|
systemConfig({ |
|
|
|
|
type:'company' |
|
|
|
|
}).then(res => { |
|
|
|
|
this.companyTip = res.data; |
|
|
|
|
}); |
|
|
|
|
[].filter(res => res.indexOf(this.model.userInfo.company)) |
|
|
|
|
}, |
|
|
|
|
filterTip(){ |
|
|
|
|
this.tips = this.companyTip.filter(res => (res.indexOf(this.model.userInfo.company)!==-1)) |
|
|
|
|
this.tipShow = true; |
|
|
|
|
}, |
|
|
|
|
initForm(){ |
|
|
|
|
if(uni.getStorageSync('user')){ |
|
|
|
|
this.model.userInfo = uni.getStorageSync('user'); |
|
|
|
|