| | |
| | | </view> |
| | | <view class="input-group-row"> |
| | | <text class="label">推荐人</text> |
| | | <view class="right-text"> |
| | | <picker mode="selector" range-key="vipName" :range="referrerList" @change="referrerChange"> |
| | | <view> |
| | | <navigator :url="'./selectCustomer?selectId='+formData.recommendId" hover-class="none" class="right-text"> |
| | | <text :class="recommendName?'':'gray'">{{recommendName?recommendName:'请选择推荐人'}}</text> |
| | | <text class="iconfont iconjiantouarrow486 gray"></text> |
| | | </view> |
| | | </picker> |
| | | </view> |
| | | <text class="iconfont iconarrow-backimg gray"></text> |
| | | </navigator> |
| | | </view> |
| | | <view class="input-group-row"> |
| | | <text class="label">备注</text> |
| | |
| | | id: '', |
| | | isDisabled: false, |
| | | arrivalWayList: [], |
| | | referrerList: [], |
| | | recommendName: '' |
| | | } |
| | | }, |
| | |
| | | loadReferrerList(){ |
| | | this.$httpUtils.request('/api/vip/findAllVipInfo').then((res) => { |
| | | if(res.status == 200){ |
| | | this.referrerList = res.rows; |
| | | let result = res.rows; |
| | | if(this.id){ |
| | | for(var i in this.referrerList){ |
| | | if(this.referrerList[i].id === this.formData.recommendId){ |
| | | this.recommendName = this.referrerList[i].vipName; |
| | | for(var i in result){ |
| | | if(result[i].id === this.formData.recommendId){ |
| | | this.recommendName = result[i].vipName; |
| | | break; |
| | | } |
| | | } |
| | |
| | | wayChange(e){ |
| | | this.formData.arrivalWay = this.arrivalWayList[e.detail.value].value; |
| | | }, |
| | | referrerChange(e){ |
| | | this.formData.recommendId = this.referrerList[e.detail.value].id; |
| | | this.recommendName = this.referrerList[e.detail.value].vipName; |
| | | }, |
| | | valid(){ |
| | | const {vipName, vipNo, phone, sex} = this.formData; |
| | | if(!vipName){ |
| | |
| | | this.isDisabled = false; |
| | | }) |
| | | }, |
| | | setData(item){ |
| | | this.recommendName = item.name; |
| | | this.formData.recommendId = item.id; |
| | | } |
| | | } |
| | | } |
| | | </script> |