| | |
| | | <view class="content"> |
| | | <view class="row regis-info"> |
| | | <text class="info-title"><!-- <span style="color: red;">* --></span>客户名称: </text> |
| | | <input class="input" type="text" v-model="tenantName" placeholder="请输入客户名称" placeholder-class="placeholder" /> |
| | | <picker @change="tenantNameSelect" :range="tenantNameArray" class="tenant-select"> |
| | | <label class="" v-model="tenantName">{{ tenantNameArrayType }}</label> |
| | | </picker> |
| | | <!-- <input class="input" type="text" v-model="tenantName" placeholder="请输入客户名称" placeholder-class="placeholder" /> --> |
| | | </view> |
| | | <view class="row regis-info-linkman"> |
| | | <text class="info-title"><!-- <span style="color: red;">* --></span>联系人: </text> |
| | |
| | | </view> |
| | | <view class="row regis-info"> |
| | | <text class="info-title"><!-- <span style="color: red;">* --></span>客户类型: </text> |
| | | <input class="input" type="text" v-model="type" placeholder="请输入客户类型" placeholder-class="placeholder" /> |
| | | <picker @change="typeSelect" :range="typeArray" class="type-select"> |
| | | <label class="" v-model="typeArrayType">{{ typeArrayType }}</label> |
| | | </picker> |
| | | <!-- <input class="input" type="text" v-model="type" placeholder="请输入客户类型" placeholder-class="placeholder" /> --> |
| | | </view> |
| | | <view class="row regis-info-desc"> |
| | | <text class="info-title"><!-- <span style="color: red;">* --></span>域名地址: </text> |
| | |
| | | export default{ |
| | | data () { |
| | | return { |
| | | id:"", |
| | | tenantName:"", |
| | | linkman:"", |
| | | contactNumber:"", |
| | |
| | | display1:'none', |
| | | display2:'none', |
| | | display3:'none', |
| | | array:[], |
| | | index:0, |
| | | value: '', |
| | | tenantlist:[ |
| | | { |
| | | value: '选项1', |
| | | label: '黄金糕' |
| | | } |
| | | ] |
| | | tenantArr:[], |
| | | tenantNameArray:[], |
| | | tenantNameArrayIndex:0, |
| | | tenantNameArrayType:'---请选择---', |
| | | typeArray:["学校","医院","小区"], |
| | | typeArrayIndex:0, |
| | | typeArrayType:'---请选择---' |
| | | } |
| | | }, |
| | | onLoad() { |
| | | |
| | | }, |
| | | mounted(){ |
| | | this.getTenantList(); |
| | | }, |
| | | methods: { |
| | | |
| | | //获取客户信息 |
| | | getTenantList(){ |
| | | var that = this; |
| | | uni.request({ |
| | | url: 'https://web.byisf.com/api/blade-system/tenant/page', |
| | | method:'GET', |
| | | success: (res) => { |
| | | that.tenantArr = res.data.data.records; |
| | | if(that.tenantArr.length>0 ){ |
| | | for (var i = 0; i < that.tenantArr.length; i++) { |
| | | if(that.tenantArr[i].tenantName!=""){ |
| | | that.tenantNameArray.push(that.tenantArr[i].tenantName); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | //客户名称下拉改变事件 |
| | | tenantNameSelect(e) { |
| | | var that = this; |
| | | this.tenantNameArrayIndex = e.target.value; |
| | | this.tenantNameArrayType=this.tenantNameArray[this.tenantNameArrayIndex]; |
| | | //获取id |
| | | for (var i = 0; i < that.tenantArr.length; i++) { |
| | | if(that.tenantArr[i].tenantName==that.tenantNameArrayType){ |
| | | that.id = that.tenantArr[i].id; |
| | | that.linkman = that.tenantArr[i].linkman; |
| | | that.contactNumber = that.tenantArr[i].contactNumber; |
| | | that.address = that.tenantArr[i].address; |
| | | that.type = that.tenantArr[i].type; |
| | | if(that.tenantArr[i].type=="1"){ |
| | | that.typeArrayType = '学校'; |
| | | } |
| | | if(that.tenantArr[i].type=="2"){ |
| | | that.typeArrayType = '医院'; |
| | | } |
| | | if(that.tenantArr[i].type=="3"){ |
| | | that.typeArrayType = '小区'; |
| | | } |
| | | that.domain = that.tenantArr[i].domain; |
| | | } |
| | | } |
| | | |
| | | }, |
| | | |
| | | //客户类型下拉改变事件 |
| | | typeSelect(e){ |
| | | var that = this; |
| | | this.typeArrayIndex = e.target.value; |
| | | this.typeArrayType=this.typeArray[this.typeArrayIndex]; |
| | | if(that.typeArrayType == '学校'){ |
| | | that.type = 1; |
| | | } |
| | | if(that.typeArrayType =='医院'){ |
| | | that.type = 2; |
| | | } |
| | | if(that.typeArrayType =='小区'){ |
| | | that.type = 3; |
| | | } |
| | | }, |
| | | |
| | | //提交修改 |
| | | confirm(){ |
| | | uni.request({ |
| | | // url: 'http://localhost:89/equipment/equipment/AppSubmit?'+params, //仅为示例,并非真实接口地址。 |
| | | url: 'https://web.byisf.com/api/blade-system/tenant/submit', //仅为示例,并非真实接口地址。 |
| | | url: 'https://web.byisf.com/api/blade-system/tenant/submit', |
| | | method:'POST', |
| | | data:{ |
| | | "id":this.id, |
| | | "tenantName":this.tenantName, |
| | | "linkman":this.linkman, |
| | | "contactNumber":this.contactNumber, |
| | |
| | | letter-spacing: 2rpx; |
| | | } |
| | | |
| | | .region-select { |
| | | .tenant-select{ |
| | | position: relative; |
| | | left: 40rpx; |
| | | top: 20rpx; |
| | | width: 400rpx; |
| | | height: 60rpx; |
| | | /* border: 1rpx solid #C8C9CC; */ |
| | | left: 35rpx; |
| | | top: 28rpx; |
| | | } |
| | | |
| | | .type-select{ |
| | | position: relative; |
| | | left: 45rpx; |
| | | top: 28rpx; |
| | | } |
| | | </style> |