| | |
| | | <input name="vipName" v-model="formData.vipName" type="text" maxlength="20" placeholder="请填写会员姓名" placeholder-class='placeholder'/> |
| | | </view> |
| | | <view class="input-group-row"> |
| | | <text class="label">会员编号<text class="require">*</text></text> |
| | | <text class="label">会员编号</text> |
| | | <input name="vipNo" v-model="formData.vipNo" type="text" maxlength="10" placeholder="请填写会员编号" placeholder-class='placeholder'/> |
| | | </view> |
| | | <view class="input-group-row"> |
| | | <text class="label">资金密码<text class="require">*</text></text> |
| | | <text class="label">资金密码</text> |
| | | <input name="password" v-model="formData.password" type="password" maxlength="6" placeholder="6位数字格式密码" placeholder-class='placeholder'/> |
| | | </view> |
| | | <view class="input-group-row"> |
| | |
| | | <text class="label">备注</text> |
| | | <input name="remark" v-model="formData.remark" maxlength="60" type="text" placeholder="请填写备注" placeholder-class='placeholder'/> |
| | | </view> |
| | | <!-- <navigator url="./addLabel" hover-class="none" class="input-group-row"> |
| | | <view class="input-group-cloume" @click="toLabel"> |
| | | <text class="label">标签</text> |
| | | <view class="right-text"> |
| | | <text class="tag" v-for="item in formData.labels">{{item.label}}</text> |
| | | <view class="tag-wrap"> |
| | | <text class="tag" v-for="item in labels">{{item.label}}</text> |
| | | </view> |
| | | </navigator> --> |
| | | </view> |
| | | <view class="footer"> |
| | | <button form-type="submit" :disabled="isDisabled" class="blue-btn ">保存</button> |
| | | </view> |
| | |
| | | id: '', |
| | | isDisabled: false, |
| | | arrivalWayList: [], |
| | | recommendName: '' |
| | | recommendName: '', |
| | | labels: [] |
| | | } |
| | | }, |
| | | onLoad(options) { |
| | |
| | | const result = res.mapInfo.vipInfo; |
| | | const {province, city, area} = result; |
| | | for(var key in this.formData){ |
| | | this.formData[key] = result[key]; |
| | | if(key!='labels'){ |
| | | this.formData[key] = result[key]; |
| | | } |
| | | } |
| | | this.labels = result.labels; |
| | | let arr = [province, city, area].filter((item) => { |
| | | return item |
| | | }) |
| | |
| | | this.$toast.info('请填写会员姓名'); |
| | | return false; |
| | | } |
| | | if(!vipNo){ |
| | | this.$toast.info('请填写会员编号'); |
| | | return false; |
| | | } |
| | | if(!/^\d{6}$/.test(password)){ |
| | | this.$toast.info('请填写6位数字格式的密码'); |
| | | return false; |
| | | } |
| | | // if(!vipNo){ |
| | | // this.$toast.info('请填写会员编号'); |
| | | // return false; |
| | | // } |
| | | // if(!/^\d{6}$/.test(password)){ |
| | | // this.$toast.info('请填写6位数字格式的密码'); |
| | | // return false; |
| | | // } |
| | | if(!this.$utils.checkPhone(phone)){ |
| | | this.$toast.info('请填写正确的手机号码'); |
| | | return false; |
| | |
| | | } else { |
| | | url = '/api/vip/addVip'; |
| | | } |
| | | let labels = this.formData.labels.map((item) => { |
| | | return item.label |
| | | this.formData.labels = this.labels.map((item) => { |
| | | return item.id |
| | | }); |
| | | this.formData.labels = labels; |
| | | this.$httpUtils.request(url, this.formData, 'POST').then((res) => { |
| | | if(res.status == 200){ |
| | | console.log(prevPage.$vm.loadMemberList) |
| | |
| | | this.recommendName = item.vipName; |
| | | this.formData.recommendId = item.id; |
| | | }); |
| | | }, |
| | | setLabel(selectItem){ |
| | | this.labels = selectItem; |
| | | |
| | | }, |
| | | toLabel(){ |
| | | let labels = this.labels.map((item) => { |
| | | return item.id |
| | | }); |
| | | let str = labels.length?labels.join(','):''; |
| | | uni.navigateTo({ |
| | | url: './addLabel?selectId='+str |
| | | }) |
| | | } |
| | | } |
| | | } |